Skip to content

Instantly share code, notes, and snippets.

View stimms's full-sized avatar
💭
Talking at #MSIgniteToronto

Simon Timms stimms

💭
Talking at #MSIgniteToronto
View GitHub Profile
public class TokenReplacementCheckSheetProcessor : BaseChecksheetDecorator, IChecksheetDecorator
{
//A list of all the token resolvers known to the container
public IEnumerable<ITokenResolver> Resolvers {get;set;}
//A cache of the tokens to replace in a single check sheet
//It is time consuming to search a word document for the
//tokens so we try to do it only once for each sort of checkseet
public ICheckSheetTokenCache CheckSheetTokenCache {get;set;}
[Fact]
public void timeout()
{
var observable = Observable.Never<decimal>();
int timesRun = 0;
int timeouts = 0;
observable.Subscribe(x => timesRun++);
var testScheduler = new TestScheduler();
observable.Timeout(TimeSpan.FromSeconds(1), testScheduler).Subscribe(x => timesRun++,
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">
<dimension ref="A1:A4"/>
<sheetViews>
<sheetView tabSelected="1" workbookViewId="0">
<selection activeCell="A5" sqref="A5"/>
</sheetView>
</sheetViews>
<sheetFormatPr baseColWidth="10" defaultRowHeight="15" x14ac:dyDescent="0"/>
<sheetData>
forest = ["pine", "birch", "spruce"]
for tree in forest
console.log tree
@stimms
stimms / def.xml
Created June 14, 2013 03:58 — forked from anonymous/def.xml
<defs>
<marker id="lineEnd"
viewBox="0 0 10 10"
refX="1" refY="5"
markerWidth="6"
markerHeight="6"
orient="auto">
<path d="M 0 0 L 10 5 L 0 10 z"/>
</marker>
</defs>
# Script to test stemming for ElasticSearch. Working now!!
# Reference: http://stackoverflow.com/questions/4981001/why-elasticsearch-is-not-finding-my-term
require 'rubygems'
require 'net/http'
require 'yaml'
require 'json'
# kill the index
delete = Net::HTTP::Delete.new("/willindex")
@stimms
stimms / .block
Last active February 6, 2022 23:30 — forked from d3noob/.block
Sample of layout for question flow
license: mit