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
using System; | |
using System.Collections.Generic; | |
using Castle.MicroKernel.Registration; | |
using Castle.MicroKernel.Resolvers.SpecializedResolvers; | |
using Castle.Windsor; | |
namespace Mike.Spikes | |
{ | |
public class WindsorCircularArrayRefs | |
{ |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Castle.MicroKernel.Registration; | |
using Castle.Windsor; | |
namespace Mike.Spikes | |
{ | |
public class CanResolveByGenericTypeConstraints | |
{ |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" > | |
<head> | |
<title>Geolocation Demo</title> | |
<script src="http://ajax.microsoft.com/ajax/jQuery/jquery-1.4.2.min.js" type="text/javascript"></script> | |
<script src="http://maps.google.com/maps/api/js?sensor=false"></script> | |
<script src="Geolocation.js" type="text/javascript"></script> | |
<style type="text/css"> | |
body |
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
var Suteki = Suteki || {}; | |
Suteki.new_eventBus = (function(){ | |
var self = {}; | |
var subscriptions = {}; | |
var unsubscribeTokens = []; | |
var subscriptionPointers = []; |
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
// run unit tests in node like this: | |
// node Suteki.TestRunner.js | |
// | |
// Unit tests should be named like this: | |
// Suteki.<name target>.Tests.js | |
// | |
// A test looks like this: | |
// | |
// (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
using System; | |
namespace Suteki.Monads | |
{ | |
public class FunctionComposition | |
{ | |
public void AddTwoNumbers() | |
{ | |
var result = | |
from a in 3.ToIdentity() |
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
using System; | |
using System.Data; | |
using FluentNHibernate.Cfg; | |
using FluentNHibernate.Cfg.Db; | |
using FluentNHibernate.Conventions; | |
using FluentNHibernate.Mapping; | |
using NHibernate; | |
using NHibernate.Cfg; | |
using NHibernate.SqlTypes; | |
using NHibernate.Tool.hbm2ddl; |
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
using System; | |
namespace Suteki.Common.Windsor | |
{ | |
public class IoC | |
{ | |
private static Func<Type, object> resolve; | |
private static Action<object> release; | |
public static T Resolve<T>() |
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
using System.Linq; | |
using Castle.Windsor; | |
namespace Suteki.Common.Windsor | |
{ | |
public static class WindsorExtensions | |
{ | |
public static void CheckRegistration<TService, TImplementation>(this IWindsorContainer container) | |
{ | |
var handlers = container.Kernel.GetHandlers(typeof(TService)); |
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
import List | |
import Control.Applicative | |
euler1 = sum $ nub $ [3,6..999] ++ [5,10..999] | |
fib = let fib' a b = a : fib' b (a+b) in fib' 0 1 | |
euler2 = sum . (filter even) . takeWhile (<4000000) $ fib | |
factor n = [x|x <- [2..(floor(sqrt(fromInteger n)))], n `mod` x == 0] |
OlderNewer