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
// The following code references System.Web.Razor 2.0.0.0 | |
// Note that our model should have a concrete type in the following code | |
// (i.e. anonymous typed model is not supported). | |
using Microsoft.CSharp; | |
using RazorEngine.Compilation; | |
using RazorEngine.Compilation.ReferenceResolver; | |
using RazorEngine.Templating; | |
using System; |
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
using Microsoft.CSharp; | |
using RazorEngine.Compilation; | |
using RazorEngine.Compilation.ReferenceResolver; | |
using RazorEngine.Templating; | |
using System; | |
using System.CodeDom; | |
using System.CodeDom.Compiler; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Dynamic; |
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
#if INTERACTIVE | |
#r "..\\packages\\FSharp.Compiler.Service.0.0.89\\lib\\net45\\FSharp.Compiler.Service.dll" | |
#endif | |
open System | |
open Microsoft.FSharp.Compiler.SourceCodeServices | |
let sourceTok = FSharpSourceTokenizer([], "C:\\test.fsx") | |
let lines = """ |
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
<?xml version="1.0" encoding="utf-16"?> | |
<BootstrapperApplicationData xmlns="http://schemas.microsoft.com/wix/2010/BootstrapperApplicationData"> | |
<WixBundleProperties DisplayName="BootstrapperSetup" | |
LogPathVariable="WixBundleLog" | |
Compressed="no" Id="{a8199337-8ee3-4e4e-a2ee-6f518501d8f3}" | |
UpgradeCode="{27A4F806-DB94-478A-B639-BE690C45E390}" | |
PerMachine="yes" /> | |
<WixMbaPrereqInformation PackageId="Netfx4Full" | |
LicenseUrl="NetfxLicense.rtf" /> | |
<WixPackageFeatureInfo Package="DummyInstallationPackageId" |
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
using System; | |
static class Expr | |
{ | |
public static T If<T>(Func<bool> guard, T thenValue, T elseValue) | |
{ | |
return guard() ? thenValue : elseValue; | |
} | |
} |
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 System | |
open System.Net | |
open System.Text.RegularExpressions | |
let private matchedValue (matchResult:Match) (key:String) = | |
matchResult.Groups.[key].Value.Trim() |> WebUtility.HtmlDecode | |
let regex pattern options input = | |
let m = Regex.Match(input, pattern, options) | |
if m.Success then Some m else None |
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 SelfModule = | |
open System.Collections.Generic | |
type SelfObj(someOp: SelfObj -> unit) = | |
member self.op = someOp | |
member val Depth = 0 with get, set | |
let dict = new Dictionary<int, SelfObj>() | |
type SelfObj with |
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 IChristmasTrees2 = | |
| PlasticTree | |
| LiveTree | |
| HologramTree | |
let (|PlasticTreeType|_|) = function | |
| PlasticTree -> Some(PlasticTreeType) | |
| _ -> None |
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
// Pearls of Functional Algorithm Design | |
// Ch1-1 | |
let (--) us vs = us |>Seq.filter(fun i -> not (Seq.exists(fun j -> i=j) vs)) | |
let minfree xs = Seq.head([0..Seq.length xs] -- xs) | |
[8; 23; 9; 0; 12; 11; 1; 10; 13; 7; 41; 4; 14; 21; 5; 17; 3; 19; 2; 6] | |
|> minfree |
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
### Keybase proof | |
I hereby claim: | |
* I am yukitos on github. | |
* I am yukitos (https://keybase.io/yukitos) on keybase. | |
* I have a public key whose fingerprint is 2257 CD30 012D 6739 B948 271A 6BBD 7DCE 7766 C7DE | |
To claim this, I am signing this object: |