Skip to content

Instantly share code, notes, and snippets.

public class StructureMapHttpControllerActivator : IHttpControllerActivator
{
private readonly IContainer _container;
public StructureMapHttpControllerActivator(IContainer container)
{
_container = container;
}
public IHttpController Create(
//This is for your web api controllers.
public class HttpControllerActivator : IHttpControllerActivator
{
private readonly IContainer _container;
public HttpControllerActivator(IContainer container)
{
_container = container;
}
public class StructureMapDependencyResolver : ServiceLocatorImplBase
{
private const string StructuremapNestedContainerKey = "Structuremap.Nested.Container";
public IContainer Container { get; set; }
private HttpContextBase HttpContext
{
get
{
// All the user to register where the context comes from

I like Learn You a Haskell as a reference and cheat-sheet but I found it a little slow for learning Haskell.

Here's my recommended order for just learning Haskell:

http://www.seas.upenn.edu/~cis194/lectures.html Brent Yorgey's course is the best I've found so far and replaces both Yann Esposito's HF&H and the NICTA course. This course is particularly valuable as it will not only equip you to write Haskell but also help you understand parser combinators.

Real World Haskell is available online. (Thanks bos!)

I recommend RWH as a reference (thick book). The chapters for parsing and monads are great for getting a sense for where monads are useful. Other people have said that they've liked it a lot. Perhaps a good follow-up for practical idioms after you've got the essentials of Haskell down?

using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using Fasterflect; // http://nuget.org/packages/fasterflect -- PM> Install-Package fasterflect
namespace Overby.Data
{
public class BulkInsertEventArgs<T> : EventArgs
using System.Globalization;
using System.Threading;
var test = "aaaaaaaaaaaaaaaaaaaa";
var cultures = CultureInfo.GetCultures(CultureTypes.AllCultures);
foreach(var culture in cultures)
{
Thread.CurrentThread.CurrentCulture = culture;
var gulp = require('gulp'),
gulpif = require('gulp-if'),
less = require('gulp-less'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
rename = require('gulp-rename'),
clean = require('gulp-clean'),
runSequence = require('run-sequence'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Raven.Client.Document;
namespace ConsoleApplication1
{
class FakePersonDocumentThing
{
var units = imageMetadata.Units.Some() ? imageMetadata.Units : new Dictionary<string, int>();
var ratePlans = imageMetadata.RatePlans.Some() ? imageMetadata.RatePlans : new Dictionary<string, int>();
var relatedDocuments = units.Concat(ratePlans);
var patchCommands = new List<ScriptedPatchCommandData>();
foreach (var relatedDocument in relatedDocuments)
{
var photo = new Photo
{
Url = imageMetadata.Id,
public class ReliableDocumentSession : DocumentSession
{
private static readonly HashSet<WebExceptionStatus> TransientErrors = new HashSet<WebExceptionStatus>(new[]
{
WebExceptionStatus.ConnectFailure,
WebExceptionStatus.ConnectionClosed,
WebExceptionStatus.KeepAliveFailure,
WebExceptionStatus.Pending,
WebExceptionStatus.PipelineFailure,
WebExceptionStatus.ProtocolError,