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
#light | |
open System | |
let startTimer minutes checkinterval = | |
let endtime = DateTime.Now.AddMinutes(minutes) in | |
let rec interval endtime checkinterval = | |
if endtime <= DateTime.Now then | |
System.Console.WriteLine("Timer done") | |
else | |
System.Console.WriteLine("checked at " + DateTime.Now.ToShortTimeString()) |
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 System.Text; | |
using Machine.Specifications; | |
using NUnit.Framework.SyntaxHelpers; | |
namespace StringManipulationTests | |
{ |
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
when | |
[ | |
"I add two numbers" : [{ | |
ItShould : "sum them", | |
Means : function () { this.result.shouldEqual(this.num1 + this.num2);},{ | |
ItShould : "sum them", | |
Means : function () { this.result.shouldEqual(this.num1 + this.num2);}], | |
"I make unf" :[{ |
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
given["a two number addition solver"] | |
.with("solver", new additionSolver()) | |
.with("number", [1, 2]) | |
.withParametersAs("number") | |
.when("they are added", this.solver.add) | |
.itShould("sum them", function () this.result.shouldEqual(number[1] + number[2])) | |
.itShould("not subtract them", function () this.result.shouldNotBeDumb()); | |
given["a two number addition solver"] | |
.with("solver", new additionSolver()) |
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 Main() | |
{ | |
var rootList = new List<Node>(){new Node()}; // only ever one root, I assume. | |
var childrenAtThisLevel = FillLevel(rootList); | |
while(childrenAtThisLevel.Count > 0) | |
childrenAtThisLevel = FillLevel(childrenAtThisLevel); | |
} | |
List<Node> FillLevel(List<Node> childrenAtThisLevel) | |
{ |
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
require 'date' | |
class ChoreAssignmentController < ApplicationController | |
def assign_todays_chore | |
@users_chore_list.provide_todays_chore_to this | |
end | |
def todays_chore_is chore | |
@assignment = chore | |
end |
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
werewr |
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
window.ScreeningRoom = window.ScreeningRoom || {}; | |
ScreeningRoom.AjaxHelper = function(){ | |
this.siteRoot = "http://localhost:9292/"; | |
this.restResources = { | |
"add_viewer": siteRoot + "drafts/addviewer", | |
"add_opinion": siteRoot + "drafts/addopinion" | |
}; |
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
<html> | |
<head> | |
<title>Monte Carlo Calculus</title> | |
<script src="script/monte_carlo.js"></script> | |
<script> | |
var lex_this = function(chromosome){ | |
var tokens = []; | |
chromosome = chromosome.split('').slice(0); |
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
#! /usr/bin/env python | |
import sys | |
import random | |
import pymc | |
import numpy | |
from dendropy.mathlib import probability as prob | |
from dendropy.mathlib import statistics as stats | |
rng = random.Random() |
OlderNewer