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
public class ConfirmationModule : NancyModule | |
{ | |
public ConfirmationModule(IBus bus) | |
{ | |
Get["confirm/done"] = p => | |
{ | |
return View["ConfirmationDone"]; | |
}; |
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
[TestClass()] | |
public class ConfirmationModuleTest | |
{ | |
private Mock<IBus> _bus; | |
private Browser _browser; | |
[TestInitialize] | |
public void Setup() | |
{ | |
_bus = new Mock<IBus>(); |
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; | |
namespace EventSourcing | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
var acc = new Account(); |
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
public class Constants | |
{ | |
/// <summary> | |
/// String containing the value "normal" | |
/// </summary> | |
public const string NORMAL_FOLDER = "normal"; | |
/// <summary> | |
/// String containing the value "backup" | |
/// </summary> |
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
What happened here was the gradual habituation of the people, little by little, to being governed by surprise; to receiving decisions deliberated in secret; to believing that the situation was so complicated that the government had to act on information which the people could not understand, or so dangerous that, even if the people could not understand it, it could not be released because of national security. |
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
We are told that the flush and fsync primitives are broken on some versions of Windows and Linux. This is unfortunate. It opens SQLite up to the possibility of database corruption following a power loss in the middle of a commit. However, there is nothing that SQLite can do to test for or remedy the situation. SQLite assumes that the operating system that it is running on works as advertised. If that is not quite the case, well then hopefully you will not lose power too often. | |
Source: http://www.sqlite.org/atomiccommit.html |
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
fromAll().when({ | |
$init: function () { | |
return { }; | |
}, | |
$any: function(state, event) { | |
var eventType = event.eventType; | |
if (state.hasOwnProperty(eventType)) { | |
state[eventType] += 1; | |
} else { | |
state[eventType] = 1; |
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
1. http://www.amazon.co.uk/Solitude-Thomas-Cave-Georgina-Harding/dp/0747599742/ref=sr_1_1?ie=UTF8&qid=1389214927&sr=8-1&keywords=the+solitude+of+thomas+cave | |
2. http://www.amazon.co.uk/Walk-Wild-Side-Nelson-Algren/dp/1841956805/ref=sr_1_1?ie=UTF8&qid=1389214888&sr=8-1&keywords=A+walk+on+the+wild+side | |
3. http://www.amazon.co.uk/Cities-Plain-Boder-Trilogy-Border/dp/0330511203/ref=sr_1_1?ie=UTF8&qid=1389214902&sr=8-1&keywords=cities+of+the+plain |
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
var Config = require('../config.js').Config; | |
var eventstore = require('eventstore'); | |
var storage = require('eventstore.mongodb'); | |
var es; | |
var S4 = function() { | |
return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); | |
}; |
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
// Udi style w Static Domain Events | |
var dispatcher = new RecordingDomainEventsDispatcher(); | |
DomainEvents.Dispatcher = dispatcher; | |
var customer = new Customer(new Address()); | |
customer.Move(new Address()); | |
Console.WriteLine("Customer moved: " + dispatcher.RecordedDomainEvent(new CustomerMoved())); |