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 CacheItem { | |
| public DateTimeOffset? ExpirationDate { get; set; } | |
| } | |
| public void ExpireTheCacheItems() | |
| { | |
| allCacheItems | |
| .Where(x => DateTimeOffset.Now > (x.ExpirationDate ?? DateTimeOffset.Max)) | |
| .ForEach(x => x.Delete()); | |
| } |
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
| [SetUp] | |
| public void WhyTheHellDoesntCaliburnMicroDoThisForMe() | |
| { | |
| // NB: Dispatcher items don't run in unit test runners, yet succeed | |
| // when you queue them. But since there's good place where we can | |
| // write this so it's guaranteed to execute before any test, we get | |
| // to replicate this code everywhere. | |
| Execute.ResetWithoutDispatcher(); | |
| } |
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<IObservable<T>> Window( | |
| this IObservable<T> source, | |
| // An Observable that fires when Windows should open | |
| IObservable<TWindowOpening> windowOpenings, | |
| // A Func that given a Window opening, will determine when that window | |
| // should close. | |
| Func<TWindowOpening, IObservable<TWindowClosing>> windowClosingSelector); |
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
| private async void OnWebcamButton(object sender, RoutedEventArgs e) | |
| { | |
| var captureUi = new CameraCaptureUI(); | |
| var result = await captureUi.CaptureFileAsync(CameraCaptureUIMode.Photo); | |
| var file = await result.OpenForReadAsync(); | |
| var reader = new DataReader(file); | |
| byte[] data = new byte[reader.UnconsumedBufferLength]; | |
| await reader.LoadAsync(reader.UnconsumedBufferLength); | |
| reader.ReadBytes(data); |
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 IrbClient | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| Console.WriteLine("Remote IRB - type some shit"); | |
| using(new Context(2)) |
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 GitHub.Tests.Helpers | |
| { | |
| public class ZeroMqRxFixture | |
| { | |
| [Test] | |
| public void ClientServerSmokeTest() | |
| { | |
| string socketAddr = "tcp://localhost:19999"; | |
| var server = ZeroMQHost<string>.Create(() => |
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
| paul@laomedeia:~% /Applications/MacVim.app/Contents/MacOS/Vim --version | |
| VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jul 27 2011 19:46:24) | |
| MacOS X (unix) version | |
| Included patches: 1-260 | |
| Compiled by Bjorn Winckler <[email protected]> | |
| Huge version with MacVim GUI. Features included (+) or not (-): | |
| +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent | |
| +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments | |
| +conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff | |
| +digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi |
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
| lock(something) | |
| { | |
| try | |
| { | |
| if (foo) // THIS | |
| { | |
| Bar(); | |
| } | |
| else // LOOKS | |
| { |
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
| // Provides convenient way to check whether memory allocation have succeeded. | |
| #define alloc_assert(x) \ | |
| do {\ | |
| if (unlikely (!x)) {\ | |
| fprintf (stderr, "FATAL ERROR: OUT OF MEMORY (%s:%d)\n",\ | |
| __FILE__, __LINE__);\ | |
| _abort ("OUT OF MEMORY");\ | |
| }\ | |
| } while (false) |
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
| C:\Users\Administrator\Desktop\Windows>\Debuggers_x86\kd.exe -z .\lib\sundown.dll | |
| Microsoft (R) Windows Debugger Version 6.11.0001.404 X86 | |
| Copyright (c) Microsoft Corporation. All rights reserved. | |
| Loading Dump File [C:\Users\Administrator\Desktop\Windows\lib\sundown.dll] | |
| Symbol search path is: cache*C:\Debuggers_x86\sym;SRV*http://msdl.microsoft.com/download/symbols | |
| Executable search path is: | |
| ModLoad: 10000000 1000e000 C:\Users\Administrator\Desktop\Windows\lib\sundown.dll |