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
namespace Sample | |
open WebSharper | |
open WebSharper.JavaScript | |
open WebSharper.Sitelets | |
open WebSharper.UI.Next | |
open WebSharper.UI.Next.Html | |
module Resources = | |
open WebSharper.Core.Resources |
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
namespace MacroTest | |
open WebSharper | |
open WebSharper.JavaScript | |
open WebSharper.JQuery | |
open WebSharper.UI.Next | |
open WebSharper.UI.Next.Client | |
open WebSharper.UI.Next.Html | |
open WebSharper.Core.Quotations | |
open WebSharper.Core.JavaScript.Core |
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
module UserTable = | |
open System.IO | |
type List = | |
static member Write (path:string) (data:'a list) = | |
use writer = new StreamWriter(path) | |
data |> List.iter writer.WriteLine | |
let makeRow (data: string) = | |
sprintf "id_%s_1,User %s 1,[email protected],TOKENHASH" | |
<| data.Replace('-', '_') |
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
// -------------------------------------------------------------------------------------- | |
// Build instances used in build.fsx to create Targets | |
// -------------------------------------------------------------------------------------- | |
module BuildInstances | |
// Add new instances here | |
// | |
let instances = [ | |
"earth" |
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
namespace RouterTest | |
open WebSharper | |
open WebSharper.JavaScript | |
open WebSharper.JQuery | |
open WebSharper.UI.Next | |
open WebSharper.UI.Next.Client | |
open WebSharper.UI.Next.Html | |
[<JavaScript>] |
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
type private ConfigMacro () = | |
interface M.IMacro with | |
member this.Translate(q, tr) = | |
match q with | |
| Q.CallOrCallModule (_, []) -> | |
let rec convert (obj: obj) = | |
match obj.GetType() with | |
| ty when ty.IsGenericType && ty.GetGenericTypeDefinition() = typedefof<list<_>> -> | |
C.NewArray <| (obj :?> seq<_> |> List.ofSeq |> List.map convert) | |
| ty when ty.IsPrimitive || ty = typeof<string> -> !~ (C.String (string obj)) |
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
namespace DragnDropUInNext | |
open WebSharper | |
open WebSharper.JavaScript | |
open WebSharper.JQuery | |
open WebSharper.UI.Next | |
open WebSharper.UI.Next.Client | |
open WebSharper.UI.Next.Html | |
open WebSharper.JQueryUI |
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
module Domain.Core | |
type Breed = | |
| Papillon | |
| Corgy | |
type Dog = | |
{ breed : Breed | |
name : string } | |
override x.ToString() = |
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
@echo off | |
cls | |
C:\"Program Files (x86)"\"Microsoft SDKs"\F#\4.0\Framework\v4.0\Fsi.exe .\script.fsx %1 %2 %3 |
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
[<JavaScript>] | |
module BootstrapUI = | |
open WebSharper.UI.Next | |
open WebSharper.UI.Next.Html | |
open WebSharper.UI.Next.Client | |
module Button = | |
type private ButtonColor = | |
| Default | |
| Primary |