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
System.Threading.Tasks.TaskCanceledException: {"A task was canceled."} | |
at Neo4jClient.GraphClient.Neo4jClient.IRawGraphClient.ExecuteCypher(CypherQuery query) in D:\temp\8815004\Neo4jClient\GraphClient.cs:line 1053 | |
at Neo4jClient.Cypher.CypherFluentQuery.ExecuteWithoutResults() in D:\temp\8815004\Neo4jClient\Cypher\CypherFluentQuery.cs:line 388 | |
at [email protected](FSharpList`1 data) in C:\dev\git\Sfag\src\Sfag.GraphView\WriteToNeo4j.fs:line 37 | |
at Microsoft.FSharp.Primitives.Basics.List.iter[T](FSharpFunc`2 f, FSharpList`1 x) | |
at Microsoft.FSharp.Collections.ListModule.Iterate[T](FSharpFunc`2 action, FSharpList`1 list) | |
at WriteToNeo4j.mergeNodes[T](GraphClient client, NodeMetaData nodeMeta, IEnumerable`1 nodes) in C:\dev\git\Sfag\src\Sfag.GraphView\WriteToNeo4j.fs:line 33 | |
at [email protected](IEnumerable`1 nodes) in C:\dev\git\Sfag\src\Sfag.GraphView\WriteToNeo4j.fs:line 107 | |
at IndexingImpl.saveState(GraphClient client, IndexingState state) in C:\de |
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 FSM = | |
type FSM<'TState, 'TEvent, 'TCommand when 'TEvent : comparison and 'TState : comparison> = | |
{ | |
Transitions: Map<'TState, Map<'TEvent, 'TState>> | |
CurrentState: 'TState | |
InitState: 'TState | |
Commands: Map<'TState, 'TCommand list> | |
ResetEvents: 'TEvent list | |
CommandChannel: 'TCommand -> unit | |
} |
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
/// Discriminated union representing two messages - one for sending | |
/// numbers to the agent and one for resetting the state of the agent | |
type CounterMessage = | |
| Update of float | |
| Reset | |
// Simple agent that calculates average and can be reset | |
let counter = MailboxProcessor.Start(fun agent -> | |
let rec loop sum count = async { |
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
#r "packages/Suave/lib/net40/Suave.dll" | |
open System | |
open Suave | |
open Suave.Filters | |
open Suave.Successful | |
open Suave.RequestErrors | |
open System.Text.RegularExpressions | |
[<AutoOpen>] |
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
Copy `build.fsx` manually to root as a starting point for your build file. |
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
open Microsoft.FSharp.Reflection | |
module MA = | |
type A = { AStr: string} | |
type B = { BInt: int} | |
type private DU = | |
| A of A | |
| B of B |
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
(* | |
Based on the excellent blog series by Scott Wlaschin: http://fsharpforfunandprofit.com/posts/understanding-parser-combinators/ | |
Inspired by Elm Route Parser: http://package.elm-lang.org/packages/etaque/elm-route-parser/2.2.1/ | |
*) | |
[<AutoOpen>] | |
module Parsing = | |
open System |
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
using System; | |
using System.CodeDom; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace AsyncDiff | |
{ |
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 Time = int*int | |
type Day = int | |
type OpeningHour = Day*Time | |
type DayGroup = | |
{ | |
Days: int list | |
Time: Time | |
} | |
let openingHour day startTime endTime = day,(startTime,endTime) |
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
source https://nuget.org/api/v2 | |
nuget FSharp.Data framework: net45 | |
nuget MySql.Data framework: net45 | |