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.Data; | |
public interface ICommandExecutor | |
{ | |
void ExecuteNonQuery(IDbCommand command); | |
} | |
public class CommandExecutor : ICommandExecutor | |
{ | |
public void ExecuteNonQuery(IDbCommand command) |
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
# don't ignore myself! | |
!.gitignore | |
# Visual Studio build objects | |
![Bb]in/ | |
csx/ | |
obj/ | |
# Visual Studio user-specific files | |
## Useful whenever working as part of a team or on software (like open source) that others will download |
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
var DT = (function(dt, $) { | |
dt.PenTool = function(id) { | |
var canvas = $(id); | |
var context = canvas[0].getContext("2d"); | |
var isMouseDown = false; | |
canvas.mousedown(function (e) { | |
isMouseDown = true; | |
context.moveTo(e.offsetX, e.offsetY); | |
}).mouseup(function() { |
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 NUnit.Framework; | |
[TestFixture] | |
public class Given_we_are_creating_an_object_with_a_single_string_parameter | |
{ | |
[Test] | |
public void We_sould_test_for_null_or_whitespace_parameters() | |
{ | |
TestHelpers.NullOrWhitespaceTest((s) => new ObjectWithStringParameter(s)); | |
} |
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 Timed<T> | |
{ | |
readonly DateTime _time; | |
readonly T _item; | |
public Timed(T item) | |
{ | |
if (item == null) throw new ArgumentNullException("item"); | |
_item = item; | |
} |
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; | |
namespace Reid.Collections | |
{ | |
public class MaxItemList<T> : IList<T> | |
{ | |
readonly IList<T> _list; | |
readonly int _maxItems; |
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 Newtonsoft.Json; | |
using System.Net; | |
using System.Net.Http; | |
using System.Text; | |
using System.Web.Http; | |
namespace DocSol.Webservice.Controllers | |
{ | |
public class ClientError : HttpResponseException | |
{ |
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
var MyNamespace = (function(namespace) { | |
if (!Array.prototype.filter) { | |
Array.prototype.filter = function(fun /*, thisp */) { | |
"use strict"; | |
if (this == null) throw new TypeError(); | |
var t = Object(this); | |
var len = t.length >>> 0; |
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
var ajax = (function (ajax, json) { | |
ajax.send = function (obj) { | |
var xmlhttp = new XMLHttpRequest(); | |
xmlhttp.onreadystatechange = function () { | |
if (xmlhttp.readyState == 4) { | |
if (xmlhttp.status >= 200 && xmlhttp.status < 300 && obj.complete) { | |
obj.complete(json.parse(xmlhttp.responseText)); | |
} | |
if (xmlhttp.status < 200 || xmlhttp.status >= 300) { |
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
<system.diagnostics> | |
<sources> | |
<source name="System.Net" tracemode="protocolonly" maxdatasize="1024"> | |
<listeners> | |
<add name="System.Net"/> | |
</listeners> | |
</source> | |
<source name="System.Net.Sockets"> | |
<listeners> | |
<add name="System.Net"/> |
OlderNewer