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
// SafeHandle.Close()... | |
using System; | |
using System.Runtime.InteropServices; | |
class MySafeHandle : SafeHandle { | |
public MySafeHandle () | |
: base (IntPtr.Zero, ownsHandle:false) | |
{ |
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
#include <vector> | |
#include <string> | |
#include <iostream> | |
using namespace std; | |
class BigNumber | |
{ | |
private: | |
vector<int> v; | |
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
#!/usr/bin/env csharp | |
var args = Environment.GetCommandLineArgs (); | |
for (int i = 0; i < args.Length; ++i) { | |
Console.WriteLine ("{0}: {1}", i, args [i]); | |
} |
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
namespace MobileSample_Android | |
{ | |
[Application(Label = "AndroidPlayground")] | |
public class App : Application | |
{ | |
readonly AutoSuspendHelper suspendHelper; | |
public App(IntPtr handle, JniHandleOwnership transfer) | |
: base (handle, transfer) | |
{ |
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 Test { | |
public static void Main () | |
{ | |
} | |
static void A () | |
{ | |
int[] value = {1}; | |
} |
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
$ mono lesshaste.exe | |
Prepping Test | |
data50000000.txt | |
Starting Test | |
Started: Total Time | |
Started: Reading Data | |
Started: Read From Disk | |
Finished: Read From Disk in 18871ms |
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
start: str=begin | |
inner: str=outer | |
end: str=begin |
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
#/usr/bin/env perl -w | |
use strict; | |
use Mail::SPF; | |
my $spf_server = Mail::SPF::Server->new( | |
# Optional custom default for authority explanation: | |
default_authority_explanation => 'See http://www.%{d}/why/id=%{S};ip=%{I};r=%{R}', | |
max_dns_interactive_terms => 18 | |
); |
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
enum Test | |
{ | |
Hello, | |
Heya | |
} | |
var test = Test.Hello; | |
Console.WriteLine(test.GetType().IsEnum); | |
Console.WriteLine("Property Count: {0}", test.GetType().GetProperties().Length); |
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
$ csharp -r:System.Numerics.dll | |
Mono C# Shell, type "help;" for help | |
Enter statements below. | |
csharp> using System.Numerics; | |
csharp> var b = new BigInteger(3); | |
csharp> var r = BigInteger.Pow(b, 1000); | |
csharp> r; | |
1322070819480806636890455259752144365965422032752148167664920368226828597346704899540778313850608061963909777696872582355950954582100618911865342725257953674027620225198320803878014774228964841274390400117588618041128947815623094438061566173054086674490506178125480344405547054397038895817465368254916136220830268563778582290228416398307887896918556404084898937609373242171846359938695516765018940588109060426089671438864102814350385648747165832010614366132173102768902855220001 |