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 abstract class Thing | |
{ | |
} | |
public interface IMarker {} | |
public interface IUseful<T> : IMarker where T : Thing | |
{ | |
T DoSomething(); | |
} |
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
Commit:427165be593dbf9f1c561eca5cb1570da7dfcef6 | |
* Upgrading everything so we can use NHibernate 3.1 GA | |
First successful compile after upgrading dependencies to these new versions: | |
Lucene.Net - 2.9.2.2 | |
Newtonson.Json - 3.5.0.0 | |
NHibernate - 3.1.0.4000 (3.1 GA) | |
NHibernate Search - 0.0.0.0 (Built against NHibernate 3.1 GA + Lucene.Net 2.9.2.2) |
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 UnionQueryBuilder : IUnionQueryBuilder | |
{ | |
public IQuery BuildQuery(UnionDefinition definition) | |
{ | |
Dialect dialect = GetDialect(); | |
var builder = new SqlStringBuilder(); | |
builder.Add("select ") | |
.Add("u.Id") |
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
// --------------------------------------------------------------- | |
// Uses DeMorgans Law of formal logic to remove NOT's from the AST | |
// (This is advantageous when running queries against Lucene) | |
// http://en.wikipedia.org/wiki/De_Morgans_laws | |
// --------------------------------------------------------------- | |
public class DeMorgansExprVisitor : IExprVisitor<Expr> | |
{ | |
int _notCount; |
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.Net; | |
using System.Net.Http; | |
using System.Reflection; | |
using System.ServiceModel; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Web; |
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
[WcfSerialization::DataMember(Name = "Value", IsRequired = false, Order = 1)] | |
public string Value | |
{ | |
get { return value; } | |
set { value = value; } | |
} |
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
Database.RemoveForeignKey("QRTZ_CRON_TRIGGERS", "FK_QRTZ_CRON_TRIGGERS_QRTZ_TRIGGERS"); | |
Database.RemoveForeignKey("QRTZ_SIMPLE_TRIGGERS", "FK_QRTZ_SIMPLE_TRIGGERS_QRTZ_TRIGGERS"); | |
Database.RemoveForeignKey("QRTZ_SIMPROP_TRIGGERS", "FK_QRTZ_SIMPROP_TRIGGERS_QRTZ_TRIGGERS"); | |
Database.RemoveForeignKey("QRTZ_TRIGGERS", "FK_QRTZ_TRIGGERS_QRTZ_JOB_DETAILS"); | |
Database.RemoveTable("qrtz_calendars"); | |
Database.RemoveTable("qrtz_cron_triggers"); | |
Database.RemoveTable("qrtz_fired_triggers"); |
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
#!/usr/bin/env python | |
# Generate 15,000 users in Enterprise Tester with admin permissions... | |
import json | |
import requests | |
from requests.auth import HTTPBasicAuth | |
server = 'http://localhost:8080/EnterpriseTester' | |
proxyDict = { 'http': '127.0.0.1:8888'} # so we can capture requests in fiddler | |
auth = HTTPBasicAuth('Administrator', 'password') |
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
namespace MonkeyCoconuts | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
for (int i=0; i<10000000; i++) | |
{ | |
if (test(i)) | |
{ |
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
/// <summary> | |
/// MemoryTributary is a re-implementation of MemoryStream that uses a dynamic list of byte arrays as a backing store, instead of a single byte array, the allocation | |
/// of which will fail for relatively small streams as it requires contiguous memory. | |
/// </summary> | |
public class MemoryTributary : Stream /* http://msdn.microsoft.com/en-us/library/system.io.stream.aspx */ | |
{ | |
#region Constructors | |
public MemoryTributary() | |
{ |
OlderNewer