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.Diagnostics; | |
using System.Reflection; | |
class App { | |
const int C = 1000000; | |
static void TimeReflection (PropertyInfo p, string value) | |
{ | |
var sw = Stopwatch.StartNew (); |
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
diff --git a/mcs/class/monodoc/Makefile b/mcs/class/monodoc/Makefile | |
index 3ebba80..8e550e1 100644 | |
--- a/mcs/class/monodoc/Makefile | |
+++ b/mcs/class/monodoc/Makefile | |
@@ -141,7 +141,7 @@ Monodoc.Ecma/EcmaUrlParser.cs: Monodoc.Ecma/EcmaUrlParser.jay $(topdir)/jay/skel | |
$(topdir)/$(thisdir)/jay.sh $(topdir) $< $@ $(JAY_FLAGS) | |
parser.exe: Monodoc.Ecma/EcmaUrlParser.cs Monodoc.Ecma/EcmaUrlTokenizer.cs Monodoc.Ecma/EcmaUrlParserDriver.cs Monodoc.Ecma/EcmaDesc.cs | |
- mcs /out:$@ /debug $^ | |
+ mcs /out:$@ /unsafe /debug $^ |
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
$ mono mono-api-info.exe --help | |
--abi Generate ABI, not API; includes only classes with | |
instance fields which are not [NonSerialized]. | |
-L, --lib=DIRECTORY Check for assembly references in DIRECTORY. | |
-r=ASSEMBLY Read and register the file ASSEMBLY, and add the | |
directory containing ASSEMBLY to the search path. | |
-h, -?, --help Show this message and exit. |
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
void foo () {} | |
void bar () | |
{ | |
return foo (); | |
} | |
int main () | |
{ | |
bar (); |
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
struct B { | |
int a; | |
}; | |
struct D { | |
struct B base; | |
int d; | |
}; | |
int |
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.Runtime.InteropServices; | |
using Microsoft.Win32.SafeHandles; | |
class App { | |
public static void Main () | |
{ | |
var ph = WinApi.GetCurrentProcess(); | |
var _o = WinApi.GetStdHandle(WinApi.STD_OUTPUT_HANDLE); | |
Console.WriteLine("GetStdHandle(STD_OUTPUT_HANDLE)={0}", _o.ToString("x")); |
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
Anonymous UUID: F71F8AE2-95DB-054B-547F-2A6AC263EA0B | |
Mon Jun 1 06:11:26 2015 | |
*** Panic Report *** | |
panic(cpu 2 caller 0xffffff800d934a81): "hfs_UNswap_BTNode: invalid backward link (0x000d2bf9 == 0x000d2bf9)\n"@/SourceCache/xnu/xnu-2782.20.48/bsd/hfs/hfs_endian.c:303 | |
Backtrace (CPU 2), Frame : Return Address | |
0xffffff8755da3a90 : 0xffffff800d52bda1 | |
0xffffff8755da3b10 : 0xffffff800d934a81 | |
0xffffff8755da3b60 : 0xffffff800d925107 |
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
class Node { | |
public Node Next; | |
public string Value; | |
} | |
var a = new Node { | |
Value = "a", | |
Next = new Node { | |
Value = "a.b" | |
} |
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
// SafeHandle.Close()... | |
using System; | |
using System.Runtime.InteropServices; | |
class MySafeHandle : SafeHandle { | |
public MySafeHandle () | |
: base (IntPtr.Zero, ownsHandle:false) | |
{ |
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
#include <vector> | |
#include <string> | |
#include <iostream> | |
using namespace std; | |
class BigNumber | |
{ | |
private: | |
vector<int> v; | |