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
module Huffman | |
open System | |
open System.IO | |
type bit = bool | |
type path = bit list | |
type BinaryTreeNode = | |
| Leaf of byte * frequency:int |
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
-- this file Embedded resource | |
SELECT * FROM "Sellers" | |
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
nuget install canopy -Version 2.0.1 -OutputDirectory packages -ExcludeVersion -Prerelease | |
nuget install Selenium.Chrome.WebDriver -Version 2.38.0 -OutputDirectory packages -ExcludeVersion |
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
printfn "hello world" | |
open System.Runtime.InteropServices | |
let mutable name = "toto" | |
name <- "tata" | |
let display text = | |
printfn "%s" text |
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
#I @"../../packages/Newtonsoft.Json/lib/net45/" | |
#I @"../../packages/Lucene.Net/lib/NET40/" | |
#r "Lucene.Net.dll" | |
open System | |
open System.IO | |
open System.Globalization | |
open Lucene | |
open Lucene.Net |
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
let suffixedBy (suffix : string) baseSt = baseSt + suffix | |
let sayHello name = "Hello " + name | |
let toNode = // ? | |
let toBold = toNode "b" | |
let toBody= toNode "body" | |
let toParagraph= toNode "p" | |
let toHtml = toNode "html" | |
// Imperative style |
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
// recursive | |
let rec fiboRec = | |
function | |
| 0L -> 0L | |
| 1L -> 1L | |
| n -> fiboRec (n-1L) + fiboRec (n-2L) | |
#time |
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
#I @"packages/SQLProvider/lib/" | |
#r "FSharp.Data.SqlProvider.dll" | |
open FSharp.Data.Sql | |
let [<Literal>] connectionString = "..." | |
let [<Literal>] resolutionPath = "" | |
type sql = SqlDataProvider<Common.DatabaseProviderTypes.MSSQLSERVER, | |
connectionString, |
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
mkdir C:\mongodb | |
mkdir C:\mongodb\log | |
mkdir C:\mongodb\db | |
cd C:\mongodb | |
mongod.exe --install --config C:\mongodb\mongod.cfg | |
net start MongoDb |
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
<!-- fix some build bugs --> | |
<Choose> | |
<When Condition="'$(VisualStudioVersion)' == '11.0'"> | |
<PropertyGroup Condition=" '$(FSharpTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets') "> | |
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath> | |
</PropertyGroup> | |
</When> | |
<When Condition="'$(VisualStudioVersion)' == '15.0'"> | |
<PropertyGroup Condition=" '$(FSharpTargetsPath)' == '' AND Exists('$(MSBuildProgramFiles32)\Microsoft SDKs\F#\4.1\Framework\v4.0\Microsoft.FSharp.Targets') "> |
NewerOlder