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
| xxxxxxxx // benchmarks on | |
| 00:00:00.xxxxxxx // 1st call | |
| 00:00:00.xxxxxxx // 2nd call with cached | |
| 00:00:00.xxxxxxx // 3rd-1000000th calls with cached | |
| 1st run | |
| ctor method invoke | |
| 00:00:00.0087014 | |
| 00:00:00.0007445 | |
| 00:00:00.3629976 |
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
| *.doc diff=astextplain | |
| *.DOC diff=astextplain | |
| *.docx diff=astextplain | |
| *.DOCX diff=astextplain | |
| *.dot diff=astextplain | |
| *.DOT diff=astextplain | |
| *.pdf diff=astextplain | |
| *.PDF diff=astextplain | |
| *.rtf diff=astextplain | |
| *.RTF diff=astextplain |
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 MyType = System.Func<object, System.IObservable<System.Tuple<string, System.Collections.Generic.Dictionary<string, HeuristicTreeInformation>>>>; | |
| var x = new MyType(....); |
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 async static Task<T> TimeoutAfter<T>(Task<T> task, int delay) | |
| { | |
| await TaskEx.WhenAny(task, TaskEx.Delay(delay)); | |
| if (!task.IsCompleted) | |
| throw new TimeoutException("Timeout hit."); | |
| return await task; | |
| } |
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
| dynamic result = fb.Post("id/tags", new[] { | |
| new { x = "40", y = "40", id = "...", tag_text = "..." | |
| }); |
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
| <%@ Page Language="C#" %> | |
| <!DOCTYPE html> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head id="Head1" runat="server"> | |
| <title></title> | |
| </head> | |
| <body> | |
| <form id="form1" runat="server"> |
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
| namespace WebSocketHelloEchoServer.SocketIo | |
| { | |
| using System; | |
| using System.Collections.Concurrent; | |
| using System.Collections.Generic; | |
| using System.Globalization; | |
| using System.Linq; | |
| using System.Net.WebSockets; | |
| using System.Reflection; |
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 fb = new FacebookApi(); | |
| dynamic result = await fb.ApiAsync( | |
| method: "GET" | |
| path: "me/feed", | |
| parameters: new { fields= new[] {"id", "name"}, | |
| cancel: CancellationToken.None, | |
| onUploadProgress:null, // IProgress<Tuple <long,byte[]>> -> totalBytesReceived, byteBuffer | |
| onDownloadProgress: null); | |
| var headers = result.headers; |
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
| // http://ox.no/files/MapReduce.cs | |
| public static class MapReduce | |
| { | |
| public static Task<TResult> Start<TInput, TPartialResult, TResult>(Func<TInput, TPartialResult> map, Func<TPartialResult[], TResult> reduce, params TInput[] inputs) | |
| { | |
| var mapTasks = CreateMapTasks(map, inputs); | |
| var reduceTask = CreateReduceTask(reduce, mapTasks); |
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 Microsoft.Phone.Controls; | |
| public static class WebBrowserScriptExtensions | |
| { | |
| public static object ExecuteCode(this WebBrowser browser, string code) | |
| { | |
| return browser.InvokeScript("eval", "(function(){\r\n" + code + "\r\n})();"); | |
| } |