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.Reactive; | |
using System.Reactive.Linq; | |
namespace RxFireAndForget | |
{ | |
public static class RxExtensions | |
{ | |
/// <summary> | |
/// Creates an observable that, when subscribed to, will subscribe to the underlying observable, |
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 class MetaElement<T> | |
{ | |
public MetaElement(T value, bool isLast, bool isFirst, int index) | |
{ | |
this.Value = value; | |
this.IsLast = isLast; | |
this.IsFirst = isFirst; | |
this.Index = index; | |
} | |
public int Index { get; private set; } |
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; |
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
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
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.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 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 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
function isFunction(functionToCheck) { | |
var getType = {}; | |
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]'; | |
} | |
ko.bindingHandlers.react = { | |
init: function () { | |
return { | |
controlsDescendantBindings: true |
OlderNewer