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
TarGZ = function(){}; | |
// Load and parse archive, calls onload after loading all files. | |
TarGZ.load = function(url, onload, onstream, onerror) { | |
var o = new TarGZ(); | |
o.onload = onload; | |
o.onerror = onerror; | |
o.onstream = onstream; | |
o.load(url); | |
return o; |
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 DrawingFeature : Feature { | |
private Drawing drawing_; | |
public event EventHandler DrawingChanged; | |
private NonBlockingMutex inDrawingChanged_; | |
protected void OnDrawingChanged() | |
{ | |
using (inDrawingChanged_.AcquireOrThrow()) { | |
if (DrawingChanged != null) { | |
DrawingChanged(this, EventArgs.Empty); |
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; | |
public static class Program { | |
public static void Main (string[] args) { | |
int x = 1; | |
string y = "y"; | |
Func<string> a = () => { | |
return String.Format("x={0}, y={1}", x, y); | |
}; |
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; // Hello | |
public static class Program { | |
public enum SimpleEnum { | |
A, | |
B = 3, | |
C, | |
D = 10 | |
} |
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
/* The Computer Language Benchmarks Game | |
http://shootout.alioth.debian.org/ | |
contributed by Marek Safar | |
*/ | |
using System; | |
public static class Program { | |
const int minDepth = 4; |
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; | |
public interface I { | |
void Foo (); | |
} | |
public class A : I { | |
public void Foo () { | |
Console.WriteLine("A"); | |
} |
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; | |
public interface I { | |
void Foo (); | |
} | |
public class A : I { | |
public void Foo () { | |
Console.WriteLine("A"); | |
} |
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.Reflection; | |
using System.Collections.Generic; | |
public static class Program { | |
public static void Main (string[] args) { | |
Common.Util.ListMembers<MethodInfo>( | |
typeof(T), | |
BindingFlags.DeclaredOnly | BindingFlags.Static | BindingFlags.Public | |
); |