GitHub: FsCheck
Learning Resources
GitHub: FsCheck
Learning Resources
(* =================================== | |
Code from my series of posts "Six approaches to dependency injection" | |
=================================== *) | |
open System | |
(* ====================================================================== | |
4. Dependency Injection |
Byobu is a suite of enhancements to tmux, as a command line | |
tool providing live system status, dynamic window management, | |
and some convenient keybindings: | |
F1 * Used by X11 * | |
Shift-F1 Display this help | |
F2 Create a new window | |
Shift-F2 Create a horizontal split | |
Ctrl-F2 Create a vertical split | |
Ctrl-Shift-F2 Create a new session |
// The NUnit and Chessie Nuget packages are required for this | |
// To install NUnit and Chessie run the following commands from the Package Manager Console | |
// PM> Install-Package NUnit -Version 2.6.4 | |
// PM> Install-Package Chessie | |
using System; | |
using System.Text.RegularExpressions; | |
using Chessie.ErrorHandling; | |
using Chessie.ErrorHandling.CSharp; | |
using Microsoft.FSharp.Core; |
// JS array equivalents to C# LINQ methods - by Dan B. | |
// First: This version using older JavaScript notation for universal browser support (scroll down for ES6 version): | |
// Here's a simple array of "person" objects | |
var people = [ | |
{ name: "John", age: 20 }, | |
{ name: "Mary", age: 35 }, | |
{ name: "Arthur", age: 78 }, | |
{ name: "Mike", age: 27 }, |
// stolen from http://stackoverflow.com/a/25396283 | |
// add this in the "callback" block of the highlight plugin definition | |
// https://github.com/hakimel/reveal.js/blob/master/index.html#L399 | |
[].forEach.call( document.querySelectorAll( '.highlight' ), function( v, i ) { | |
hljs.highlightBlock(v); | |
}); |
[HttpPost] | |
public HttpResponseMessage CreateCustomer(string name, string billingInfo) | |
{ | |
Result<BillingInfo> billingInfoResult = BillingInfo.Create(billingInfo); | |
Result<CustomerName> customerNameResult = CustomerName.Create(name); | |
return Result.Combine(billingInfoResult, customerNameResult) | |
.OnSuccess(() => _paymentGateway.ChargeCommission(billingInfoResult.Value)) | |
.OnSuccess(() => new Customer(customerNameResult.Value)) | |
.OnSuccess( |
(* | |
enterprise-tic-tac-toe-2.fsx | |
Follow up to the example of implementing "enterprise" tic-tac-toe in a functional way. | |
* Added true capability based security. | |
Related blog post: http://fsharpforfunandprofit.com/posts/enterprise-tic-tac-toe-2/ | |
*) |
$/
artifacts/
build/
docs/
lib/
packages/
samples/
src/
tests/
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers