Skip to content

Instantly share code, notes, and snippets.

namespace crap
{
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
public class PartialAppPlayground
{
private static Dispatcher<IHandlerResult> _dispatcher;
@gregoryyoung
gregoryyoung / ProbabilityKata2
Created June 10, 2011 09:51
Probability Kata part 2
OK so now you have implemented the kata. Your tests should look something like this:
We can say that the tests define the object "in a calculus of itself". They are not state based tests, they define how the behaviours of the object interact with each other.
To see the real value of this let's introduce some change ... I hear real system's do this occasionally. Because this is a high performance system decimal math is too slow. You now need to use floats instead.
Need help on floating point math? Check out: http://www-users.math.umd.edu/~jkolesar/mait613/floating_point_math.pdf
You will need to use a non-exact equality... How will this change your code?
There are no "full stack developers". Its a silly buzzword. Sadly working on kernel issues, a real time networked embedded system, or implementing a TCP stack is a different world than building an advertising website in PHP on MySQL.
Even if they did exist there are so many things to know that they would not have the depth required to actually solve an issue in any.
new FSMDefinition<State>().CompletesWith<Completed>().
InState(State.Initial).With((state, x) => {
//dosomething
return State.Middle;
}).
InState(State.Middle).With((state, x) => {
//do something else
Send(new NextMessage(...));
return State.Ending;
}).
using System;
using System.CodeDom;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using EventStore.ClientAPI;
using EventStore.ClientAPI.Embedded;
@gregoryyoung
gregoryyoung / gist:7690486
Created November 28, 2013 11:31
updated to support actions to funcs
namespace crap
{
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
public class PartialAppPlayground
commit 273e4c4bca3ff94106eb4a75dfe2f8f829f052a4
Author: Greg Young <gregoryyoung1@gmail.com>
Date: Mon Apr 18 15:20:14 2016 +0100
add TTL to httpsend messages
commit bc2d462fadec1d7a8e00260936e70bd73185c568
Author: James Nugent <james.nugent@bathasu.com>
Date: Mon Jul 7 11:25:36 2014 +0100
#endif
/* Time counting */
#define MONO_PROFILER_GET_CURRENT_TIME(t) {\
struct timeval current_time;\
gettimeofday (&current_time, NULL);\
(t) = (((guint64)current_time.tv_sec) * 1000000) + current_time.tv_usec;\
} while (0)
static gboolean use_fast_timer = FALSE;
29 try {
30
31 switch (Integer.parseInt(rel)) {
32 case 1:
33 case 2:
34 case 3:
35 case 4:
36 case 5:
37 case 6:
38 case 7:
public class Nothing
{
private Nothing() {}
public static readonly Nothing Value=new Nothing();
public override string ToString()
{
return "Nothing";
}
}