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
function obj(o) { | |
function F() {} | |
F.prototype = o; | |
return new F(); | |
} | |
function inheritPrototype(sub, sup) { | |
var p = obj(sup.prototype); | |
p.constructor = sub; | |
sub.prototype = p; |
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
requirejs.config({ | |
paths: { | |
"underscore": "http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.4/underscore-min", | |
"jquery": "http://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min", | |
"backbone": "http://cdnjs.cloudflare.com/ajax/libs/backbone.js/0.9.10/backbone-min" | |
}, | |
shim: { | |
// Using non-AMD compatible javascript module with the shim config of require.js. | |
"underscore": { | |
exports: "_" |
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
<!-- Syntax Highlighter Additions START --> | |
<link href='http://alexgorbatchev.com/pub/sh/current/styles/shCore.css' rel='stylesheet' type='text/css'/> | |
<link href='http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/> | |
<!-- Remove Vertical Scrollbar --> | |
<style type='text/css'> | |
.syntaxhighlighter { | |
overflow-y: hidden !important; | |
overflow-x: auto !important; | |
} | |
</style> |
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
<!-- Syntax Highlighter Additions START --> | |
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js' type='text/javascript'/> | |
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shAutoloader.js' type='text/javascript'/> | |
<script language='javascript' type='text/javascript'> | |
//<![CDATA[ | |
SyntaxHighlighter.defaults['toolbar'] = false; | |
SyntaxHighlighter.config.bloggerMode = true; | |
function alexgorbatchev() { | |
var args = arguments; |
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
var assert = require("assert"); | |
var async = require("async"); | |
var fs = require("fs"); | |
var files = ["node_modules/async/LICENSE", "node_modules/async/package.json"]; | |
async.map(files, fs.stat, function(err, results) { | |
console.log("map: " + JSON.stringify(results)); | |
}); |
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
package pig.pigtest; | |
import java.util.concurrent.atomic.AtomicLong; | |
import org.junit.Test; | |
public class AtomicTest { | |
private AtomicLong v1 = new AtomicLong(0); | |
private long v2 = 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
public class ConcurrentStack<E> { | |
AtomicReference<Node<E>> head = new AtomicReference<Node<E>>(); | |
public void push(E item) { | |
Node<E> newHead = new Node<E>(item); | |
Node<E> oldHead; | |
do { | |
oldHead = head.get(); | |
newHead.next = oldHead; |
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
<!doctype html> | |
<html> | |
<head> | |
<title>The HTML5 Outline</title> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<h1>I WANT YOU!</h1> | |
<div> | |
<h2>Backend Engineer</h2> |
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
<!doctype html> | |
<html> | |
<head> | |
<title>The HTML5 Outline</title> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<h1>I WANT YOU!</h1> | |
<div> | |
<h2>Backend Engineer</h2> |
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
<!doctype html> | |
<html> | |
<head> | |
<title>The HTML5 Outline</title> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<h1>I WANT YOU!</h1> | |
<article> | |
<h2>Backend Engineer</h2> |
OlderNewer