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: 9 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: 12 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: 20 days ago by Christer van der Meeren

  • SFTP with SSH.Net

    SFTP with SSH.Net

    1 people like this

    Posted: 26 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

  • Chain of responsibility II

    Unlike the previous chain of responsibility, this version use the pipeline to chain responsibilities.

    98 people like this

    Posted: 6 years ago by Tao Liu

  • Implementing active objects with a MailboxProcessor

    Mailbox processors can easily be used to implement active objects. This example shows how to do that with a reusable wrapper type and minimal boilerplate code in the actual class definitions. Supports both asynchronous calls and synchronous calls. For the latter case, exceptions are automatically propagated back to the caller.

    90 people like this

    Posted: 6 years ago by Wolfgang Meyer

  • Split a list

    Three ways to split a list in half (but not necessarily in the middle). A forth version added that's very short and should be fast, as we only use List.fold. New champ found.

    75 people like this

    Posted: 6 years ago by Dmitri Pavlenkov

Snippets by tags

kata (17) xml (12) silverlight (21) string (18) parsing (22) f# (42) tutorial (17) fold (19) agent (20) regex (12) web (23) math (32) reflection (18) seq (50) lists (13) quotations (17) collections (16) wpf (18) http (15) lazy (18)

View all...

Database contains 2175 snippets out of which 1497 is public.