This file contains hidden or 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
| var foo = new Subject<int> (); | |
| foo.Subscribe(Console.WriteLine) | |
| foo.OnNext(4); | |
| >> 4 | |
| foo.OnNext(10); | |
| >> 10 |
This file contains hidden or 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.Diagnostics; | |
| using System.Globalization; | |
| using System.Linq; | |
| using System.Net; | |
| using System.Reactive.Linq; | |
| using System.Reflection; | |
| using System.Text; | |
| using System.Text.RegularExpressions; |
This file contains hidden or 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 IObservable<RecoveryOptionResult> Throw(UserError error) | |
| { | |
| var handlers = (overriddenRegisteredUserErrorHandlers != null) ? | |
| new[] { overriddenRegisteredUserErrorHandlers } : | |
| registeredUserErrorHandlers.ToArray().Reverse(); | |
| // NB: This is a little complicated - here's the idea: we have a | |
| // list of handlers that we're running down *in order*. If we find | |
| // one that doesn't return null, we're going to return this as an | |
| // Observable with one item (the result). |
This file contains hidden or 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 Person : ReactiveObject | |
| { | |
| public string FamilyName | |
| { | |
| get { return <FamilyName>k__BackingField;} | |
| set | |
| { | |
| if (!string.Equals(<FamilyName>k__BackingField, value)) | |
| { | |
| raisePropertyChanging("FamilyName"); |
This file contains hidden or 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
| static readonly string[] videoCardBlacklist = {"8086:0116"}; | |
| static void DisableHwRenderingForCrapVideoCards() | |
| { | |
| if (!String.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("MY_VIDEO_CARD_REALLY_WORKS"))) | |
| { | |
| return; | |
| } | |
| int osVersion = Environment.OSVersion.Version.Major * 100 + Environment.OSVersion.Version.Minor; | |
| if (osVersion < 601) |
This file contains hidden or 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
| <#@ template debug="false" hostspecific="true" language="C#" #> | |
| <#@ import namespace="System.IO" #> | |
| <#@ output extension=".cs" #> | |
| using System; | |
| using System.Windows; | |
| <# | |
| var pathEntries = System.Environment.GetEnvironmentVariable("PATH").Split(Path.PathSeparator); | |
| FileInfo gitFileInfo = null; |
This file contains hidden or 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 IEnumerable<TAcc> Scan<T, TAcc>(this IEnumerable<T> This, TAcc initialValue, Func<TAcc, T, TAcc> accFunc) | |
| { | |
| TAcc acc = initialValue; | |
| foreach (var x in This) | |
| { | |
| acc = accFunc(acc, x); | |
| yield return acc; | |
| } | |
| } |
This file contains hidden or 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 UIKitExportEnv : ExportEnv | |
| { | |
| public UIKitExportEnv (string name, Model model) | |
| : base (name, model) | |
| { | |
| } | |
| protected override void WriteTexture (ITexture texture, ExportedFile file) | |
| { | |
| var width = texture.Width; |
This file contains hidden or 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
| class Info { | |
| // instance variables | |
| String brandName; | |
| String shirtSize; | |
| String cut; | |
| String date; | |
| PImage musicImg; |
This file contains hidden or 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
| class Flannel { | |
| // instance variables | |
| int date; | |
| int primColor; | |
| int secondColor; | |
| int stackOrder = 0; | |
| float x; | |
| float y; |