This file contains 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 ServiceBootstrapper : NancyBootstrapperBase<IWindsorContainer> | |
{ | |
bool _modulesRegistered; | |
protected override IEnumerable<IStartup> GetStartupTasks() | |
{ | |
return ApplicationContainer.ResolveAll<IStartup>(); | |
} | |
protected override INancyEngine GetEngineInternal() |
This file contains 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 Library1.Tests | |
open NUnit.Framework | |
open FsUnit | |
open Foq | |
type person = {Name : string ; PhoneNumber: string} | |
type IPhoneNumberRepository = | |
abstract member FindPhoneNumber : string -> string |
This file contains 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
[<CLIMutable>] | |
type Person = { Name : string; Age : int } | |
//Nuget: ImpromptuInterface.FSharp | |
use conn = new SqlCeConnection("Data Source=C:\Databases\MyDB.sdf;Persist Security Info=False;") | |
conn.Open() | |
let result = | |
conn.Query("SELECT * FROM People") |
This file contains 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
open canopy | |
open runner | |
start firefox | |
"Go to fona and add to basket" &&& fun _ -> | |
url "http://www.fona.dk" | |
let numberOfLineItems = (elements "#miniCartProducts li").Length | |
let total = read ".miniCartValue" |
This file contains 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
.Add("/scripts/libs/rx.min.js") | |
.Add("/scripts/libs/rx.time.min.js") | |
.Add("/scripts/libs/rx.jquery.min.js") | |
var observer = $(e.target).clickAsObservable().bufferWithTime(200) | |
.subscribe(function (events) { | |
console.log(events.length); | |
var $item = $(e.target).closest('.productItem'); | |
var quantity = parseInt($.trim($item.find('.qty').html())) + events.length + 1; |
This file contains 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
open Microsoft.Practices.Unity | |
type IRepository = | |
abstract member FindPhoneNumber : string -> string | |
type Repository() = | |
interface IRepository with | |
member this.FindPhoneNumber(name) = match name with "John" -> "87654321" | _ -> "" | |
let container = new UnityContainer() :> IUnityContainer |
This file contains 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 ExtensionFSharp | |
module CollectionExtensions = | |
type System.Collections.Generic.IEnumerable<'a> with | |
member this.ForEach(f:'a -> unit) = | |
for item in this do | |
f item | |
This file contains 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
<Application x:Class="WpfApplication1.App" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
StartupUri="MainWindow.xaml" xmlns:local="clr-namespace:WpfApplication1.ViewModels"> | |
<Application.Resources> | |
<local:ApplicationViewModel x:Key="MyApplicationViewModel" /> | |
</Application.Resources> | |
</Application> |
This file contains 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
<Application x:Class="WpfApplication1.App" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Startup="App_OnStartup"> | |
<Application.Resources> | |
<Style TargetType="Button"> | |
<Setter Property="FontSize" Value="20" /> | |
</Style> | |
</Application.Resources> |
This file contains 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> | |
<body> | |
<style> | |
element { | |
display:none; | |
} | |
</style> | |
<script src="CustomElements/custom-elements.js"></script> |
OlderNewer