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
| /* http://meyerweb.com/eric/tools/css/reset/ | |
| v2.0 | 20110126 | |
| License: none (public domain) | |
| */ | |
| html, body, div, span, applet, object, iframe, | |
| h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
| a, abbr, acronym, address, big, cite, code, | |
| del, dfn, em, img, ins, kbd, q, s, samp, | |
| small, strike, strong, sub, sup, tt, var, |
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
| String.prototype.visualLength = (function() { | |
| var that = this, | |
| ruler = document.getElementById('ruler'); | |
| if (!ruler) { | |
| ruler = document.createElement('span'); | |
| document.body.appendChild(ruler); | |
| } | |
| ruler.style.visibility = 'hidden'; | |
| return function () { | |
| ruler.innerHTML = that; |
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
| if (!document.getElementsByClassName) { | |
| document.getElementsByClassName = function(search) { | |
| var d = document, elements, pattern, i, results = []; | |
| if (d.querySelectorAll) { // IE8 | |
| return d.querySelectorAll("." + search.replace(/\s+/g, '.')); | |
| } | |
| if (d.evaluate) { // IE6, IE7 | |
| pattern = ".//*[contains(concat(' ', @class, ' '), ' " + search + " ')]"; | |
| elements = d.evaluate(pattern, d, null, 0, null); | |
| while ((i = elements.iterateNext())) { |
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
| def using (v, &block) | |
| begin | |
| block.call | |
| ensure | |
| v.close unless v.nil? if v.class.method_defined? :close | |
| end | |
| end | |
| class Resource | |
| def name () |
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
| public static class EnumerableEx | |
| { | |
| public static bool Any(this IEnumerable e) | |
| { | |
| using (var i = enumerable.GetEnumerator()) | |
| { | |
| return i.MoveNext(); | |
| } | |
| } |
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
| [].concat( | |
| Object.getOwnPropertyNames(Object), | |
| Object.getOwnPropertyNames(window) | |
| ).map(function(x){return {name:x,length:JSFuck.encode(x).length};}) | |
| .sort(function(x,y) {return x.length-y.length;}) | |
| .forEach(function(x) {console.log(x);}) |
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
| Compiling the source code.... | |
| $mcs main.cs -out:demo.exe 2>&1 | |
| main.cs(37,13): warning CS0219: The variable `ids1' is assigned but its value is never used | |
| main.cs(40,13): warning CS0219: The variable `ids1' is assigned but its value is never used | |
| Compilation succeeded - 2 warning(s) | |
| Executing the program.... | |
| $mono demo.exe | |
| SelectMany method chain : 00:00:00.7027228 | |
| SelectMany linq : 00:00:00.6438793 |
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
| -pascalCase+ | |
| -nativeTypeSystem | |
| -organizeUsings | |
| -separateInterfaceConstants | |
| -junitConversion | |
| -maxColumns 400 | |
| -namespaceMapping org.mozilla.javascript Rhino | |
| -fullyQualify Cipher |
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
| ======== | |
| Array.ForEach: 341.4, Min: 338, Max: 346 | |
| Array for i != Length; ++i: 355.5, Min: 352, Max: 365 | |
| Array for ++i: 356.8, Min: 350, Max: 381 | |
| Array for: 397.9, Min: 391, Max: 420 | |
| Array for i != Length: 410.6, Min: 398, Max: 468 | |
| Array for, cached length: 413.5, Min: 399, Max: 502 | |
| Array foreach: 437.9, Min: 433, Max: 447 | |
| List<T>.ForEach: 489.7, Min: 480, Max: 540 | |
| IList<T> for, cached length: 590.5, Min: 582, Max: 619 |
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
| public class Rectangle { | |
| public Rectangle(decimal width, decimal height) { | |
| Width = width; | |
| Height = height; | |
| } | |
| public decimal Area() { | |
| return Width * Height; | |
| } | |
| public decimal Width { get; private set; } | |
| public decimal Height { get; private set; } |