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
class Program | |
{ | |
static void Main() | |
{ | |
const int iterations = 100; | |
const int repetitions = 100000; | |
long directDispatchStatic = 0, directDispatchInstance = 0, virtualDispatchBase = 0, | |
virtualDispatchOverride = 0, interfaceDispatch = 0; | |
var stopwatch = new Stopwatch(); |
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
[<TestFixture>] | |
type ``Recursion Exploration`` () = | |
//... | |
[<Test>] | |
member test.``Should not apply TCO.`` () = | |
CannotTCO |> should beGreaterThan maxStack | |
[<Test>] |
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
Session.asp | |
<% | |
Response.ContentType = "application/json" | |
If Request.QueryString("command") = "enumerate" Then | |
Response.Write("[") | |
Response.Write("{""Key"": ""key1"", ""Value"": ""value1"", ""DataType"": ""datatype1""},") |
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
open System | |
open System.IO | |
open System.Text.RegularExpressions | |
open System.Linq | |
let RegExGroups pattern (group1:string) (group2:string) source = | |
Regex.Matches(source, pattern, RegexOptions.IgnoreCase).Cast<Match>() | |
|> Seq.map (fun x -> (x.Groups.Item(group1).Value, x.Groups.Item(group2).Value)) | |
let IncludeRegEx = "<!--\\s*#include\\s+(?<type>\w*)\\s*=\\s*\"(?<url>.*)\"\\s*-->" |
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
Dr. Alan Kay on the Meaning of “Object-Oriented Programming” | |
http://www.purl.org/stefan_ram/pub/doc_kay_oop_en | |
Date: Wed, 23 Jul 2003 09:33:31 -0800 | |
To: Stefan Ram [removed for privacy] | |
From: Alan Kay [removed for privacy] | |
Subject: Re: Clarification of "object-oriented" | |
Content-Type: text/plain; charset="us-ascii" ; format="flowed" | |
Content-Length: 4965 | |
Lines: 117 |
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
///////////////////////////////////////////////////////////////////////////////// | |
// | |
// SQLCrackCl | |
// | |
// This will perform a dictionary attack against the | |
// upper-cased hash for a password. Once this | |
// has been discovered try all case variant to work | |
// out the case sensitive password. | |
// | |
// This code was written by David Litchfield to |
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
public class SqlHashedPassword | |
{ | |
private static readonly Random Random = new Random(); | |
private static readonly SHA1CryptoServiceProvider Hash = new SHA1CryptoServiceProvider(); | |
private static readonly byte[] Header = new byte[] {1, 0}; | |
private readonly byte[] _hash; | |
private readonly byte[] _salt; | |
private SqlHashedPassword(byte[] salt, byte[] hash) | |
{ |
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
public static T ThrowIfNull<T>(this T target) where T : class | |
{ | |
if (target == null) throw new NullReferenceException( | |
string.Format("Object reference of type '{0}' not set to an instance of an object.", typeof(T).FullName)); | |
return target; | |
} |
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
public class AuthenticationBehavior : IActionBehavior | |
{ | |
private readonly IUrlRegistry _registry; | |
private readonly CurrentRequest _request; | |
private readonly IOutputWriter _writer; | |
private readonly IActionBehavior _actionBehavior; | |
private readonly ISecureSession _secureSession; | |
public AuthenticationBehavior(IUrlRegistry registry, CurrentRequest request, IOutputWriter writer, IActionBehavior actionBehavior, ISecureSession secureSession) | |
{ |
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
[DllImport("user32.dll")] | |
static extern int GetWindowThreadProcessId(IntPtr windowHandle, IntPtr processId); | |
public void Close() | |
{ | |
var threadId = GetWindowThreadProcessId(Browser.hWnd, IntPtr.Zero); | |
Process.GetProcessesByName("iexplore").First(x => x.Threads.Cast<ProcessThread>().Any(y => y.Id == threadId)).Kill(); | |
} |