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
type I<'T> = interface end | |
type I1<'T> = inherit I<'T> | |
type I2<'T> = inherit I<'T> | |
type A = | |
inherit I1<int> | |
inherit I2<double> |
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
interface I<T> | |
{} | |
interface I1<T> : I<T> | |
{} | |
interface I2<T> : I<T> | |
{} | |
class A : I1<int>, I2<double> | |
{} |
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
#r @"System.Management.Automation.dll" | |
#r @"PowerShellTypeProvider.dll" | |
type PS = FSharp.PowerShell.PowerShellTypeProvider< PSSnapIns="", Is64BitRequired=false > | |
PS.``Get-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
*** Assembly Binder Log Entry (10/30/2013 @ 11:29:27 PM) *** | |
The operation failed. | |
Bind result: hr = 0x80070002. The system cannot find the file specified. | |
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll | |
Running under executable D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe | |
--- A detailed error log follows. | |
=== Pre-bind state information === |
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 shift (s:string) (k:int) = | |
System.String( | |
s.ToCharArray() | |
|> Array.map (function | |
| x when 'a' <= x && x <='z' -> | |
let code = int(x)-int('a') | |
char(int('a') + (code + k + 26) % 26) | |
| x -> x ) | |
) |
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\mongocsharpdriver.1.8.3\lib\net35\" | |
#r "MongoDB.Driver.dll" | |
#r "MongoDB.Bson.dll" | |
open System | |
open MongoDB.Bson | |
open MongoDB.Bson.Serialization.Attributes | |
open MongoDB.Driver | |
open MongoDB.Driver.Builders | |
open MongoDB.Driver.Linq |
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 List<Dependency> GetDependency(Tree tree) | |
{ | |
var tlp = new PennTreebankLanguagePack(); | |
var gsf = tlp.grammaticalStructureFactory(); | |
var gs = gsf.newGrammaticalStructure(tree); | |
var dependencies = gs.typedDependenciesCollapsedTree(); | |
return (from TypedDependency dependency in dependencies.toArray() | |
select new Dependency | |
{ |
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\Nuget.Core.2.8.3\lib\net40-Client" | |
#r "NuGet.Core.dll" | |
#r "System.Xml.Linq.dll" | |
let repository = | |
NuGet.PackageRepositoryFactory.Default.CreateRepository | |
"https://nuget.org/api/v2" | |
type NuGetStat = | |
{ Id: string; DownloadCount: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
#r "../packages/FSharp.ComProvider.1.0.0-pre1/lib/net40/FSharp.ComProvider.dll" | |
#r @"../packages/FSharp.Data.2.1.0/lib/net40/FSharp.Data.dll" | |
open FSharp.Data | |
type SpeechService = TypeLib.``Microsoft Speech Object Library``.``5.4`` | |
let speech = SpeechService.SpVoiceClass() | |
type js = JsonProvider<"""{ "type": "success", "value": { "id": 42, "joke": "Joke here." } }""" > | |
let getJoke num = |
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
#r @"packages\Streams.0.2.5\lib\Streams.Core.dll" | |
open System | |
open System.IO | |
open System.Collections.Generic | |
open Nessos.Streams | |
// make Visual Studio use the script directory | |
Directory.SetCurrentDirectory(__SOURCE_DIRECTORY__) |