This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
class Unit | |
{ | |
public string Name {get; private set;} | |
protected Unit(string name) | |
{ | |
Name = name; | |
} | |
public static readonly Unit DimensionLess = new Unit(" "); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Mapbox GL JS debug page</title> | |
<meta charset='utf-8'> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
<link rel='stylesheet' href='/dist/mapbox-gl.css' /> | |
<style> | |
body { margin: 0; padding: 0; } | |
html, body, #map { height: 100%; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isFunction(functionToCheck) { | |
var getType = {}; | |
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]'; | |
} | |
ko.bindingHandlers.react = { | |
init: function () { | |
return { | |
controlsDescendantBindings: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.WindowsAzure.Storage; | |
using Microsoft.WindowsAzure.Storage.Blob; | |
using System; | |
using System.Linq; | |
using System.IO; | |
namespace DownloadAllBlobs | |
{ | |
class Program | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.WindowsAzure.Storage; | |
using Microsoft.WindowsAzure.Storage.Blob; | |
using System; | |
using System.Linq; | |
namespace SetNoCache | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
public static class EnumerableExtractRangeEx | |
{ | |
public static IEnumerable<IEnumerable<T>> ExtractRanges<T>(this IEnumerable<T> source, Func<T, bool> rangePredicate) | |
{ | |
using (var enumerator = source.GetEnumerator()) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
class Coord : ICoord | |
{ | |
public void Print(double lat, double lon) | |
{ | |
Console.WriteLine("Lon: {0}, Lat: {1}", lon, lat); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Globalization; | |
using System.Linq; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
var today = DateTime.Today; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="../Kendo/typescript/kendo.web.d.ts"/> | |
/// <reference path="../Scripts/typings/jquery/jquery.d.ts"/> | |
class ViewModel extends kendo.data.ObservableObject { | |
private _text = "asd"; | |
public set theText(v: string) { | |
if (this._text == v) return; | |
this._text = v; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class ObservableExtensions | |
{ | |
public static IObservable<T> FirstOrDefaultObservable<T>(this IObservable<T> source) | |
{ | |
return Observable | |
.Create<T>( | |
observer => | |
{ | |
bool hasFired = false; |
NewerOlder