Recent snippets

  • Walkthrough: Creating an Asynchronous HTTP Handler

    The Microsoft tutorial Walkthrough: Creating an Asynchronous HTTP Handler did not describe how to use IHttpAsyncHandler from F#.
    It was also a bit complicated, because it did not show how to do it from Visual Studio. Here is the Visual Studio F# version. 1. Create empty ASP.NET Web Application. Call it FSharpHttpAsyncHandler. 2. Add a F# library project to the solution. Call it FSharpHttpAsyncHandler.Lib. 3. Add the following code to Library1.fs in FSharpHttpAsyncHandler.Lib 4. Add a reference to System.Web in FSharpHttpAsyncHandler.Lib 5. Add a reference to FSharpHttpAsyncHandler.Lib in FSharpHttpAsyncHandler. 6. Add the following to Web.config in FSharpHttpAsyncHandler. 7. In the Web tab of the project properties of FSharpHttpAsyncHandler, set Start url to http://localhost://whatever.SampleAsync 8. Run debug.

    1 people like this

    Posted: 7 days ago by Erling Hellenäs

  • FTPS download and upload a file

    FTPS = SSL encrypted FTP. SFTP = FTP over SSH.

    3 people like this

    Posted: 9 days ago by Tuomas Hietanen

  • ViewModelBase with strongly typed PropertyChanged subscription

    A base class for your view models with methods that take a code quotation of a property to subscribe to, and makes use of IObservable for strongly typed subscriptions to PropertyChanged for this property. You might want to use System.Reactive and insert `Observable.DistinctUntilChanged` after ``.

    2 people like this

    Posted: 18 days ago by Christer van der Meeren

  • SFTP with SSH.Net

    SFTP with SSH.Net

    1 people like this

    Posted: 24 days ago by Tuomas Hietanen

  • Azure Cosmos DB - Graph get started

    Translation of the Azure Cosmos DB Graph-get-started sample project ( A Cosmos DB account must first be created e.g. via the Azure Portal & from these the endpoint & authorization key are retrieved. Given these, the script creates: (i) Document Client (ii) Database (iii) Graph (aka Document Collection). From Gremlin expressions (strings) the command CreateGremlinQuery creates queries (IDocumentQueries) that can be executed to read from or modify the graph.

    2 people like this

    Posted: 1 month ago by roguetrainer

  • The Eff Monad via delimited continuations

    The Eff Monad via delimited continuations, based on

    1 people like this

    Posted: 1 month ago by NIck Palladinos

Popular snippets

  • Units of Measure

    Show's how to define units of measure to add stronger typing to your numerical functions.

    73 people like this

    Posted: 7 years ago by Robert Pickering

  • Chain of responsibility

    The following sample wants to make sure the person’s age is between 18 and 65, weight is no more than 200 and tall enough (>120).

    75 people like this

    Posted: 6 years ago by Tao Liu

  • Projecting lists

    Three functions showing how to implement projection for functional lists. First version uses naive recursion and the second one is tail-recursive using the accumulator parameter. The third version extends this with continuation passing.

    63 people like this

    Posted: 7 years ago by Tomas Petricek

Snippets by tags

quotations (17) staging (18) xml (12) fold (19) http (15) tryfsharp (48) learning f# (16) list (49) f# (42) algorithms (25) design patterns (18) wpf (18) dsl (22) array (18) lists (13) string (18) collections (16) tutorial (17) silverlight (21) computation builder (14)

View all...

Database contains 2175 snippets out of which 1497 is public.