This file contains hidden or 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
<script type="text/javascript"> | |
$(document).ready(function() { | |
var app = $.sammy(function() { | |
this.get('#/', function() { | |
clear_book_information_panel_when_needed(); | |
}); | |
this.get('#/:book_name/Details', function() { |
This file contains hidden or 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
<?xml version="1.0"?> | |
<output> | |
<blogpost> | |
<url>http://cre8ivethought.com/blog/2010/08/22/importing-comments-into-disqus/</url> | |
<title>Title of the post</title> | |
<guid>{the guid that Disqus has for the post, often it is just the url}</guid> | |
<comments> | |
<comment> | |
<isAnon>1</isAnon> | |
<score>1</score> |
This file contains hidden or 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
function positive_int() { return $(test "$@" -eq "$@" > /dev/null 2>&1 && test "$@" -ge 0 > /dev/null 2>&1); } | |
function sizetw() { | |
if [[ $# -eq 2 ]] && $(positive_int "$1") && $(positive_int "$2"); then | |
printf "\e[8;${1};${2};t" | |
return 0 | |
fi | |
return 1 | |
} |
This file contains hidden or 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 Fohjin.DDD.Events.Account | |
{ | |
[Serializable] | |
public class CashWithdrawnEvent : DomainEvent | |
{ | |
public decimal Balance { get; private set; } | |
public decimal Amount { get; private set; } | |
public CashWithdrawnEvent(decimal balance, decimal amount) | |
{ |
This file contains hidden or 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 Test.Fohjin.DDD | |
{ | |
[Specification] | |
public abstract class BaseTestFixture | |
{ | |
protected Exception CaughtException; | |
protected virtual void Given() { } | |
protected abstract void When(); | |
protected virtual void Finally() { } |
This file contains hidden or 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 Fohjin.DDD.BankApplication.Views | |
{ | |
public partial class ClientSearchForm : Form, IClientSearchFormView | |
{ | |
public ClientSearchForm() | |
{ | |
InitializeComponent(); | |
RegisterClientEvents(); | |
} |
This file contains hidden or 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 Fohjin.DDD.Domain.Client | |
{ | |
public class Client : BaseAggregateRoot<IDomainEvent>, IOrginator | |
{ | |
private Address _address; | |
public Client() | |
{ | |
registerEvents(); | |
} |
This file contains hidden or 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
void IEventProvider.LoadFromHistory(IEnumerable<IDomainEvent> domainEvents) | |
{ | |
if (domainEvents.Count() == 0) | |
return; | |
foreach (var domainEvent in domainEvents) | |
{ | |
apply(domainEvent.GetType(), domainEvent); | |
} |
This file contains hidden or 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 Fohjin.DDD.EventStore.Storage.Memento | |
{ | |
public interface IOrginator | |
{ | |
IMemento CreateMemento(); | |
void SetMemento(IMemento memento); | |
} | |
} |
This file contains hidden or 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 Fohjin.Refactoring | |
{ | |
public class ClassToBeRefactored | |
{ | |
public void DoSomething() | |
{ | |
DependencyA dependencyA = new DependencyA(); | |
DependencyB dependencyB = new DependencyB(); | |
} | |
} |