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
!!(new Boolean(false)) => true | |
(new Boolean(false)) ? true : false => true | |
(new Boolean(false)) == false => true | |
(new Boolean(false)) === false => false |
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
try: | |
import json | |
except ImportError: | |
import simplejson as json | |
# in setuptools | |
dependencies = [] | |
try: |
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
// By just injecting a script tag, we can version the template and exploit the cache | |
function loadTemplate(template, version) { | |
var src = '/media/bujagali/' + this.name + '.' + this.version + '.js'; | |
var headEl = document.getElementByTag('head')[0]; | |
var script; | |
script = document.createElement('script'); | |
script.type = 'text/javascript'; | |
script.src = src; | |
headEl.appendChild(script); |
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
//These vows | |
var vows = require('vows'), | |
assert = require('assert'), | |
sys = require('sys'), | |
zeromq = require('zeromq'); | |
vows.describe('ZeroMQ') | |
.addBatch({ | |
'A context': { | |
topic: function() { this.callback(new zeromq.Context()) }, |
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 Animal = new Cobra.Class({ | |
__init__: function(self) { | |
self.breathes = true; | |
} | |
}); | |
var Feline = new Cobra.Class({ | |
__extends__: Animal, | |
__init__: function(self) { | |
Cobra.Class.ancestor(Feline, '__init__', self); |
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
this.neilYoungModel = { items : [ | |
{data:"On The Beach", year:"1974"}, | |
{data:"Tonight's The Night", year:"1975"}, | |
{data:"Harvest", year:"1972"}, | |
{data:"Greendale", year:"2003"}, | |
{data:"Broken Arrow", year:"1996"}, | |
{data:"Everybody Knows...", year:"1969"}, | |
{data:"Zuma", year:"1975"}, | |
{data:"Unplugged", year:"1993"}, | |
{data:"Harvest Moon", year:"1992"} |
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
/* Copyright (C) 1991,1993,1995,1997,1998,2003,2004 | |
Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
Contributed by Torbjorn Granlund (tege@sics.se). | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. |
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
(let [channel-agents [ | |
; For every item in (:1 channels) (a list of channels), create | |
; an agent. Then do this for (:2 channels), which is a list of | |
; channels that belong in the second column. | |
(map | |
(fn [channel] | |
(send-off | |
(agent "") | |
(fn [_] | |
(flockr.channels/render-channel |
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
(tokyo-cabinet/use "trial.hdb" | |
(tokyo-cabinet/put "Hello World" "Saying Hi! to the big old world out there") | |
(println (tokyo-cabinet/get "Hello World"))) |