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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading; | |
using ZeroMQ; | |
namespace Examples | |
{ |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading; | |
using ZeroMQ; | |
namespace Examples | |
{ |
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
// Are you an F# programer with a liberal point of view? | |
// Do you want to show your happiness at the advancement of gay right? | |
// But hate the convience of using a facebook app to rainbowify your profile photo? | |
// Simple, use this script instead! | |
open System.Drawing | |
open System.Runtime.InteropServices | |
open System.Drawing.Imaging | |
open System.IO |
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.Windows.Forms | |
open System.Drawing | |
let dt = 0.01 | |
let sigma=10. | |
let beta=8./3. | |
let rho=28.0 | |
let lorentzDeriv x y z dt sigma beta rho = |
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
robert@fotnmc:~/code/BitcoinFs$ nslookup seed.bitcoin.sipa.be | |
Server: 127.0.0.1 | |
Address: 127.0.0.1#53 | |
Non-authoritative answer: | |
Name: seed.bitcoin.sipa.be | |
Address: 71.172.136.155 | |
Name: seed.bitcoin.sipa.be | |
Address: 108.183.38.208 | |
Name: seed.bitcoin.sipa.be |
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
[{"Name":"Feck"},{"Name":"Arse"},{"Name":"Arse"}] |
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 ParkingMeterKata | |
open System | |
// coins accepted by the system | |
type Coin = | |
| TenCents = 10 | |
| TwentyCents = 20 | |
| FiftyCents = 50 | |
| OneEuro = 100 | |
| TwoEuro = 200 |
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
namespace MyNamespace | |
type IMyInterface = | |
abstract GetValue: unit -> string | |
type MyRecord = | |
{ MyField1: int | |
MyField2: string } | |
interface IMyInterface with | |
member x.GetValue() = x.MyField2 |
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
// Learn more about F# at http://fsharp.net | |
let rate = 0.04 | |
let baseSalary = 100000. | |
let baseYear = 2011 | |
let salaries = | |
Seq.unfold(fun (year, salary) -> | |
let nextYear, nextSalary = year + 1, salary * (1.0 + rate) |
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 Microsoft.SolverFoundation.Services | |
open Microsoft.SolverFoundation.Common | |
open System.Collections.Generic | |
open Microsoft.SolverFoundation.SfsWrapper | |
// helper functions for grouping elements of the solution | |
let flatten (matrix:'a[,]) = matrix |> Seq.cast<'a> |> Seq.toArray | |
let getColumn c (matrix:_[,]) = | |
flatten matrix.[*,c..c] |