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 <stdio.h> | |
int main () | |
{ | |
int t = 0; | |
for (int i = 0 ; i <= 10000 ; ++i) | |
t +=i; | |
printf ("%d\n", t); | |
return 0; | |
} |
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 <stdio.h> | |
int main () | |
{ | |
int t = 0; | |
int i = 10000; | |
while (i > 0) { | |
t +=i; | |
i--; | |
} | |
printf ("%d\n", t); |
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
.section __TEXT,__text,regular,pure_instructions | |
.macosx_version_min 10, 10 | |
.globl _main | |
.align 4, 0x90 | |
_main: ## @main | |
.cfi_startproc | |
## BB#0: | |
pushq %rbp | |
Ltmp0: | |
.cfi_def_cfa_offset 16 |
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
.section __TEXT,__text,regular,pure_instructions | |
.macosx_version_min 10, 10 | |
.globl _main | |
.align 4, 0x90 | |
_main: ## @main | |
.cfi_startproc | |
## BB#0: | |
pushq %rbp | |
Ltmp0: | |
.cfi_def_cfa_offset 16 |
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 static class NSArrayControllerPatch | |
{ | |
static readonly IntPtr selSetFilterPredicate_Handle = ObjCRuntime.Selector.GetHandle ("setFilterPredicate:"); | |
[System.Runtime.InteropServices.DllImport ("/usr/lib/libobjc.dylib", EntryPoint="objc_msgSend")] | |
public extern static void void_objc_msgSend_IntPtr (IntPtr receiver, IntPtr selector, IntPtr arg1); | |
public static void SetFilterPredicate (this NSArrayController c, NSPredicate p) | |
{ | |
void_objc_msgSend_IntPtr (c.Handle, selSetFilterPredicate_Handle, p == null ? IntPtr.Zero : p.Handle); |
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 static class NSArrayControllerPatch | |
{ | |
static readonly IntPtr selSetFilterPredicate_Handle = ObjCRuntime.Selector.GetHandle ("setFilterPredicate:"); | |
[System.Runtime.InteropServices.DllImport ("/usr/lib/libobjc.dylib", EntryPoint="objc_msgSend")] | |
public extern static void void_objc_msgSend_IntPtr (IntPtr receiver, IntPtr selector, IntPtr arg1); | |
public static void SetFilterPredicate (this NSArrayController c, NSPredicate p) | |
{ | |
void_objc_msgSend_IntPtr (c.Handle, selSetFilterPredicate_Handle, p == null ? IntPtr.Zero : p.Handle); |
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
// A quick and dirty "how often is the GC being called, in 1/4 second increments | |
// Useful if you think your allocation pattern is hurting but can't load up in a real profiler | |
static int currentGC = 0; | |
static int currentCount = 0; | |
static void Main (string[] args) | |
{ | |
Task.Factory.StartNew (() => { | |
while (true) | |
{ | |
int now = GC.CollectionCount (0); |
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
Building Solution: SQLiteConnection (Debug|x86) | |
Build started 8/10/2016 1:41:14 PM. | |
__________________________________________________ | |
Project "/Users/donblas/Downloads/SQLiteConnection/SQLiteConnection/SQLiteConnection.csproj" (Build target(s)): | |
Target _DetectAppManifest: | |
FindItemWithLogicalName Task | |
Items: |
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
Microsoft (R) Build Engine version 15.1.0.0 | |
Copyright (C) Microsoft Corporation. All rights reserved. | |
/Library/Frameworks/Mono.framework/Versions/4.8.0/lib/mono/msbuild/15.0/bin/MSBuild.dll /v:diag 46RosTest.csproj | |
Build started 2/17/2017 5:30:38 PM. | |
Environment at start of build: | |
LANG = en_US.UTF-8 | |
TERM = xterm-256color | |
SHLVL = 1 | |
XPC_SERVICE_NAME = 0 |
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
$ cat foo.cs | |
namespace Test | |
{ | |
public class Adder | |
{ | |
public static int Add (int a, int b) => a + b; | |
} | |
} | |
$ mcs foo.cs /t:library |
OlderNewer