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
// Compile using: | |
// csc /target:winexe /noconfig /define:DEBUG FinalizerDemo.cs /r:System.dll /r:System.Windows.Forms.dll | |
// Self-contained demonstration code for: | |
// http://stackoverflow.com/questions/792660/is-gc-suppressfinalize-guaranteed | |
using WikiPad; | |
using System; | |
using System.Windows.Forms; |
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.Collections.Generic; | |
public class TransformedResult | |
{ | |
public IDataSource dataSource; | |
public TransformError errorList; | |
public bool HasErrors { | |
get { return errorList.HasErrors(); } |
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
// turns a sequence of key to many values into a new sequence | |
// where each value of a key from the first sequence becomes | |
// the a key in the second sequence and where its only value | |
// is its key from the first sequence. Example: | |
// | |
// [1, [one, un, einz]] | |
// [3, [two, deux, zwei]] | |
// [2, [three, trois, drei]] | |
// | |
// becomes: |
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; | |
using System.Linq; | |
using System.Text; | |
using System.Dynamic; | |
using System.Collections; | |
using System.Runtime.CompilerServices; | |
using System.IO; | |
static class Program |
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.Specialized; | |
using System.Xml; | |
using Elmah.Assertions; | |
static class Program | |
{ | |
static void Main() | |
{ | |
var config = new XmlDocument(); |
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
<errorFilter> | |
<test> | |
<!-- http://groups.google.com/group/elmah/t/cbe82cee76cc6321 --> | |
<and> | |
<is-type binding='Exception' | |
type='System.Web.HttpException, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' /> | |
<regex binding='Exception.Message' | |
pattern='invalid\s+viewstate' | |
caseSensitive='false' /> | |
<regex binding='Context.Request.UserAgent' |
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
// http://twitter.com/raboof/statuses/4974353119 | |
static partial class TryParse | |
{ | |
public static int? Int32(string str) | |
{ | |
return Int32(str, null); | |
} | |
public static int? Int32(string str, int? defaultValue) |
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
# Read It Later IE | |
# Utility to post IE sessions to http://readitlaterlist.com | |
# | |
# The MIT License | |
# | |
# Copyright (c) 2010, Atif Aziz | |
# | |
# Author(s): | |
# | |
# Atif Aziz, http://www.raboof.com/ |
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
// Copyright (c) 2010, Atif Aziz. All rights reserved. | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
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
# rempath - Resolves UNC paths for paths over network mapped drives | |
# Copyright (c) 2010 Atif Aziz. All rights reserved. | |
# | |
# Author(s): | |
# | |
# Atif Aziz, http://www.raboof.com | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: |