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
unsafe static string itoa_int32(int snum) { | |
char* s = stackalloc char[12]; | |
char* ps = s; | |
int num1 = snum, num2, num3, div; | |
if (snum < 0) { | |
*ps++ = '-'; | |
//Can't negate int min | |
if (snum == -2147483648) | |
return "-2147483648"; | |
num1 = -num1; |
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
using System; | |
using System.Collections; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Reflection.Emit; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Threading; |
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
static void Test(string name, Action action) { | |
var count = 10000; | |
var stopWatch = new Stopwatch(); | |
stopWatch.Start(); | |
for (var i = 0; i < count; i++) | |
action(); | |
stopWatch.Stop(); | |
Console.WriteLine("Iteration: {0}", count); | |
Console.WriteLine("Completed {0} in Avg {1} Milliseconds", name, stopWatch.ElapsedMilliseconds); | |
Console.WriteLine(); |
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
Test("Regular Loop", () => | |
{ | |
var itemx = GetList(list, list2); | |
}); | |
Test("Regular Loop2", () => | |
{ | |
var itemx = GetList2(list, list2); | |
}); |
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
@{ | |
<span>@specialRender('Olamide')</span> | |
<span>@specialRender('TJ')</span> | |
<span>@specialRender('Dara')</span> | |
} | |
@helper specialRender(x){ | |
<span>Hello World to @x</span><br/> | |
} |
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
@{ | |
var bar = 'Bar'; | |
var foo = 'Foo'; | |
<span>@foo. @bar.</span> | |
@{ | |
bar += ' Another'; | |
foo += bar; | |
<p>@bar</p> | |
@{ | |
<span>@foo. @bar.</span> |
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
<span>[email protected]</span> | |
<!--<script src='http://code.jquery.com/jquery-1.9.1.min.js'></script>--> | |
<script type='text/javascript'> | |
var Model = {}, | |
ViewResponse = function () { | |
return { |
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
<span>Hello<span data-id='_1'></span></span> | |
<!--<script src='http://code.jquery.com/jquery-1.9.1.min.js'></script>--> | |
<script type='text/javascript'> | |
var Model = {}, | |
ViewResponse = function () { | |
return { |
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
<span special = '_1_a' class='test' id='_2_a'><span data-id='_3'></span></span> | |
<!--<script src='http://code.jquery.com/jquery-1.9.1.min.js'></script>--> | |
<script type='text/javascript'> | |
var Model = {}, | |
ViewResponse = function () { | |
return { |
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
<span class='test' id='_1_a'><span data-id='_2'></span></span> | |
<!--<script src='http://code.jquery.com/jquery-1.9.1.min.js'></script>--> | |
<script type='text/javascript'> | |
var Model = {}, | |
ViewResponse = function () { | |
return { |