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 sys = require('sys'), | |
| http = require('http'), | |
| fs = require('fs'); | |
| var FILENAME = 'message.txt'; | |
| fs.writeFile(FILENAME, 'Hello Node', function (err) { | |
| if (err) throw err; | |
| console.log('It\'s saved!'); | |
| }); |
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
| obj = { | |
| a: 0, | |
| 2: 1 | |
| }; | |
| obj.a // 0 | |
| obj[2] // 1 | |
| obj.2 // Parse error |
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
| function hsb2hsl(h, s, b) { | |
| var hsl = {h:h}; | |
| hsl.l = (2 - s) * b; | |
| hsl.s = s * b; | |
| if (hsl.l <= 1 && hsl.l > 0) { | |
| hsl.s /= hsl.l; | |
| } else { | |
| hsl.s /= 2 - hsl.l; | |
| } |
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 none = ["none"]; | |
| var auto = ["auto"]; | |
| var inherit = ["inherit"]; | |
| var text = ["text"]; | |
| var infinite = ["infinite"]; | |
| var normal = ["normal"]; | |
| var color = []; | |
| var animationDirection = [ |
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
| (function(){ | |
| print("Hello World!"); | |
| })(); |
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
| puts "Hello World!" |
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 TOTAL = 3000; | |
| // Prepare test data | |
| var b = []; | |
| for (var i=0; i<TOTAL; ++i) { | |
| b[i] = [i]; | |
| } | |
| (function(){ |
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
| const ITERATIONS = 100000; | |
| (function(){ | |
| var start = new Date; | |
| for (var i=0; i<ITERATIONS; ++i) { | |
| Math.floor((i + ITERATIONS) / 2); | |
| } | |
| var end = new Date; | |
| print("Math.floor: "+ (end - start) +"ms"); | |
| })(); |
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
| WebKit$ WebKitTools/Scripts/run-webkit-tests | |
| Running build-dumprendertree | |
| === BUILDING NATIVE TARGET DumpRenderTree OF PROJECT DumpRenderTree WITH CONFIGURATION Release === | |
| Checking Dependencies... | |
| CompileC /Users/nikitavasilev/Code/WebKit/WebKitBuild/DumpRenderTree.build/Release/DumpRenderTree.build/Objects-normal/i386/AccessibilityController.o /Users/nikitavasilev/Code/WebKit/WebKitTools/DumpRenderTree/AccessibilityController.cpp normal i386 c++ com.apple.compilers.gcc.4_2 | |
| cd /Users/nikitavasilev/Code/WebKit/WebKitTools/DumpRenderTree | |
| /Developer/usr/bin/gcc-4.2 -x c++ -arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Werror -Wunused-function -Wunused-variable -DENABLE_DASHBOARD_SUPPORT -DWEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST -fvisibility=hidden -fvisibility-inlines-hidden -Wno-deprecated-declarations -mmacosx-version-min=10.5 -gdwarf-2 -I/Users/nikitavasilev/Code/WebKit/WebKitBuild/DumpRenderTree.build/Release/DumpRenderTree.build/Dump |
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
| <html> | |
| <head> | |
| <title>modify text bench</title> | |
| </head> | |
| <body> | |
| <table> | |
| <tr> | |
| <td>div.appendChild(document.createTextNode( text ))</td> | |
| <td id="text_node"></td> |