Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
void Main() | |
{ | |
// create kernel with conventions | |
using(var kernel = InitializeKernel()) | |
{ | |
var backend = kernel.Get<IBackend>(); | |
Assert.That(backend, Is.Not.InstanceOfType(typeof(ProdBackend)) | |
.And.InstanceOfType(typeof(TestBackend))); | |
} |
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
Write-Host 'throw' | |
try | |
{ | |
try | |
{ | |
throw "exception" | |
} | |
catch | |
{ |
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
#time "on" | |
#load "Bootstrap.fsx" | |
open System | |
open Akka.Actor | |
open Akka.Configuration | |
open Akka.FSharp | |
open Akka.TestKit | |
// #Using Actor |
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
void Main() | |
{ | |
using(var kernel = new StandardKernel(new Module())) | |
{ | |
kernel.Load<FuncModule>(); // for sake of LinqPAD | |
var instance1 = kernel.Get<MyClass>(new ConstructorArgument("myArg", "test")); | |
var instance2 = kernel.Get<MyClass>(new ConstructorArgument("myArg", "test")); | |
Assert.That(instance1, Is.Not.Null.And.SameAs(instance2)); |
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
import socket | |
import sys | |
from contextlib import contextmanager | |
import click | |
so_reuseport = socket.SO_REUSEPORT | |
@contextmanager |
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
#I @".\packages\FsCheck.0.9.2.0\lib\net40-Client\" | |
#r @"FsCheck.dll" | |
// #time "on" | |
open FsCheck | |
// simple example | |
let revRevIsOrig (xs:list<int>) = List.rev(List.rev xs) = xs | |
Check.Quick revRevIsOrig;; |
NewerOlder