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
// Hooks up Castle Windsor as the container for your Caliburn.Micro application. | |
// Turns on support for delegate factory methods (e.g. passing the factory "Func<XyzEditViewModel>" as a constructor arg) | |
// Dependencies: In addition to Caliburn.Micro you will need to reference Castle.Core and Castle.Windsor | |
public class CastleBootstrapper<TRootViewModel> : Bootstrapper<TRootViewModel> | |
{ | |
private ApplicationContainer _container; | |
protected override void Configure() | |
{ |
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
// @hammett: "Linq doesn't have a Partition operation that returns two sets? (filtered/complement).. sad!" | |
// GroupBy can be seen as a partition. We specialize it to have exactly two groups: | |
public static class PartitionExtension | |
{ | |
public static Tuple<IEnumerable<T>, IEnumerable<T>> Partition<T>(this IEnumerable<T> enumeration, Func<T, bool> criteria) | |
{ | |
var whole = enumeration.GroupBy(criteria); |
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
-module(fizzbuzz). | |
-export([playto/1]). | |
-include_lib("eunit/include/eunit.hrl"). | |
playto(Upper) -> | |
[case | |
{X rem 3, X rem 5} of | |
{0, 0} -> fizzBuzz; | |
{0, _} -> fizz; |
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
# You will need to make this file executable (chmod u+x) and run it with sudo | |
apt-get -y install build-essential m4 libncurses5-dev libssh-dev unixodbc-dev libgmp3-dev libwxgtk2.8-dev libglu1-mesa-dev fop xsltproc default-jdk | |
mkdir -p /src/erlang | |
cd /src/erlang | |
wget http://www.erlang.org/download/otp_src_R14B03.tar.gz | |
tar -xvzf otp_src_R14B03.tar.gz | |
chmod -R 777 otp_src_R14B03 | |
cd otp_src_R14B03 | |
./configure | |
make |
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
sudo apt-get -y install build-essential m4 libncurses5-dev libssh-dev unixodbc-dev libgmp3-dev libwxgtk2.8-dev libglu1-mesa-dev fop xsltproc default-jdk | |
sudo mkdir -p /src/erlang | |
cd /src/erlang | |
sudo wget http://www.erlang.org/download/otp_src_R14B02.tar.gz | |
sudo tar -xvzf otp_src_R14B02.tar.gz | |
sudo chmod -R 777 otp_src_R14B02 | |
cd otp_src_R14B02 | |
sudo ./configure | |
sudo make | |
sudo make install |
NewerOlder