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.Linq; | |
namespace layered | |
{ | |
class MainClass | |
{ | |
public static void Main(string[] args) { | |
var data = new DataLayer(); | |
var business = new BusinessLayer(data); |
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 PipelineOf<T> : IFilterOf<T> | |
{ | |
public class Result | |
{ | |
public static Result Success(T value) | |
{ | |
return new Result {IsSuccess = true, Value = value}; | |
} | |
public static Result Failure(Exception exception) |
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; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
namespace ancientcode { | |
public class TextManager { | |
private TextManagerHelper hlp = new TextManagerHelper(); | |
private Random rnd = new Random(); |
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
class RollMade { | |
public int Pins; | |
} |
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.Linq; | |
using System.Collections.Generic; | |
class BowlingGameBareBones | |
{ | |
#region Event definitions | |
abstract class Event {} | |
class Rolled : Event { | |
public uint Pins; |
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; | |
using System.IO; | |
using System.Linq; | |
using System.Threading; | |
using Newtonsoft.Json; // NuGet package dependency | |
namespace eventorientation | |
{ |
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 static class Experimenter | |
{ | |
private static ILogging __log; | |
public static void Init(ILogging log) => __log = log; | |
public static bool Try(string logMsg, Action experiment) | |
{ | |
try | |
{ |
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
_ _ _ _ _ _ _ | |
| _| _||_||_ |_ ||_||_| | |
||_ _| | _||_| ||_| _| | |
_ _ _ _ _ _ _ | |
|_||_|| || ||_ | | ||_ | |
| _||_||_||_| | | | _| |
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 Game { | |
private int[] rolls = new int[21]; | |
private int currentRoll = 0; | |
public void roll(int pins) { | |
rolls[currentRoll++] = pins; | |
} | |
public int score() { | |
var frames = Detect_frames (rolls); |
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
# Build image with Node.js, Elm and Nginx | |
FROM debian:latest | |
# prepare | |
RUN apt-get -y update | |
RUN apt-get -y install apt-utils | |
# install curl, http://stackoverflow.com/questions/27273412/cannot-install-packages-inside-docker-ubuntu-image | |
RUN apt-get -y install curl |
NewerOlder