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
| <html> | |
| <head> | |
| <script type="text/javascript" src="lib/jquery-1.6.2.js"></script> | |
| <script type="text/javascript" src="lib/rx.js"></script> | |
| <script type="text/javascript" src="lib/rx.jQuery.js"></script> | |
| </head> | |
| <body> | |
| <p id="content">Do you still remember the Konami code?</p> | |
| <p id="hint" style="display: none">Up Up Down Down Left Right Left Right b a Enter</p> | |
| </body> |
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 grouped = input.GroupBy(x => x.Login); | |
| var loginTimes = grouped.Select(x => { | |
| return x.Window(x, _ => Observable.Empty<Unit>().Delay(TimeSpan.FromMinutes(5), sched)) | |
| .SelectMany(y => y.Count()) | |
| .Select(n => new { Login = x.Key, Times = n }); | |
| }).Merge(); | |
| loginTimes.Where(x => x.Times > 2) | |
| .Select(x => String.Format("Bad user {0}!", x.Login)) |
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
| +-----------------------+ | |
| | | | |
| | Step 1. Get drunk | | |
| | | | |
| +-----------+-----------+ | |
| | | |
| | | |
| | +----------------------+ |
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
| Administrator@DEMETER ~/Desktop/libgit2-xp-mingw (development|MERGING) | |
| $ ./libgit2_test.exe | |
| Suite "core": .................... | |
| OK (20 tests) | |
| Suite "rawobjects": ................................ | |
| OK (32 tests) | |
| Suite "objread": ........... | |
| OK (11 tests) | |
| Suite "objwrite": ....... | |
| OK (7 tests) |
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
| Module Module1 | |
| Sub Main() | |
| "Hello World!" | |
| End Sub | |
| End Module |
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
| // Is there a BOM of various kinds? (http://en.wikipedia.org/wiki/Byte_order_mark) | |
| var BOMPatterns = new[] | |
| { | |
| new {Pattern = new byte[] {0xEF, 0xBB, 0xFF}, Encoding = Encoding.UTF8}, | |
| new {Pattern = new byte[] {0xFE, 0xFF}, Encoding = Encoding.BigEndianUnicode}, | |
| new {Pattern = new byte[] {0xFF, 0xFE}, Encoding = Encoding.Unicode}, | |
| new {Pattern = new byte[] {0xFF, 0xFE, 0x00, 0x00}, Encoding = Encoding.UTF32}, | |
| new {Pattern = new byte[] {0x2B, 0x2F, 0x76, 0x38}, Encoding = Encoding.UTF7}, | |
| new {Pattern = new byte[] {0x2B, 0x2F, 0x76, 0x39}, Encoding = Encoding.UTF7}, | |
| new {Pattern = new byte[] {0x2B, 0x2F, 0x76, 0x2B}, Encoding = Encoding.UTF7}, |
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 void EnsureSetup() | |
| { | |
| // NB: We don't actually care what this method does, it'll just make | |
| // sure the static ctor gets run. Its content is non-empty so the | |
| // optimizer can't nuke it. Tricky! | |
| Console.Write(""); | |
| } |
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
| Start / Run / gpedit.msc / Local Computer Policy / | |
| Computer Configuration / Administrative Templates / | |
| Windows Components / Windows Update / Re-prompt for restart with scheduled installations |
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 IObservable<WebResponse> MakeWebRequest( | |
| Uri uri, | |
| Dictionary<string, string> headers = null, | |
| string content = null, | |
| int retries = 3, | |
| TimeSpan? timeout = null) | |
| { | |
| var request = Observable.Defer(() => | |
| { | |
| var hwr = WebRequest.Create(uri); |
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
| IObservable<CacheEntry> downloadUriAndSave(Uri uri, string cacheDirectory, DateTimeOffset? expiration, Dictionary<string, string> headers, string content) | |
| { | |
| var request = Observable.Defer(() => | |
| { | |
| var hwr = WebRequest.Create(uri); | |
| if (headers != null) | |
| { | |
| headers.ForEach(x => hwr.Headers[x.Key] = x.Value); | |
| } |