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
'use strict'; | |
function leakyArgs (item) { | |
var args = Array.prototype.slice.call(arguments, 1); | |
var total = item; | |
for (var i = 0, length = args.length; i < length; i++) { | |
total += args[i] + (300 * 234 * 234234 * 235 * 23433); | |
} | |
return total; | |
} |
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 jade = require('jade'); | |
// compile | |
var fn = jade.compile('p string of jade'); | |
console.log(fn()); |
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 foo = {}; | |
Object.defineProperty(foo, 'bar', { | |
value: 123, | |
anotherKey: "hello world", | |
extraKey: true | |
}); | |
var descriptor = Object.getOwnPropertyDescriptor(foo, 'bar'); |
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
<x-element></x-element> | |
<x-another-element></x-another-element> | |
<!-- web components should not modify anything apart from their children --> | |
<x-another-element> | |
<p>lala</p> | |
</x-another-element> |
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
describe.only("Bug #56: process out of memory", function () { | |
before(function () { | |
this.db = TEST_SERVER.use('Security', 'plocal'); | |
this.queryText = "select *, map( 'schoolLocations', $slocs, 'governingInstitutions', $gis, 'clbs', $clbs, 'schoolCommunities', $scs, 'mainStructures', $mss ) as relations from School let slocE = outE()[ @class = 'controls' ], giE = inE()[ @class = 'controls' ], scE = inE()[ @class = 'controls' ], clbE = inE()[ @class = 'provides_services_for' ], msE = outE()[ @class = 'has_property' ], locs = list( (select format( '/schoollocations/%s', in.key ) as href, startDate, endDate from $slocE where in.@class = 'SchoolLocation' ) ), gis = list( (select format( '/governinginstitutions/%s', out.key ) as href, startDate, endDate from $giE where out.@class = 'GoverningInstitution' ) ), scs = list( (select format( '/schoolcommunities/%s', out.institutionNumber ) as href, startDate, endDate from $scE where out.@class = 'SchoolCommunity' ) ), clbs = list( (select format( '/clbs/%s', ou |
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 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
<article about="/spin/latest/"> | |
<partial template="article-header"> | |
<h1>What's been spinning on the radio?</h1> | |
</partial> | |
<partial template="signup-link" /> | |
<p> | |
<span property="stats.total"></span> | |
<if condition="stats.total == 1">Recent spin.</if> | |
<else>Recent spins.</else> | |
Click for full playlist. |
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
class AutoWhat | |
constructor: -> | |
console.log "constructing" | |
foo: => console.log this | |
window["whatever"] = -> | |
AutoWhat::constructor.apply this, arguments | |
for attr, val of AutoWhat:: | |
window["whatever"]::[attr] = val | |
b = new whatever |
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
from pygments.formatter import Formatter | |
import json | |
class Formatter(Formatter): | |
name = 'JSON' | |
aliases = ['json'] | |
filenames = [] | |
def format(self, tokensource, outfile): | |
arr = [] |
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
# Set up our requirements | |
request = require "request" | |
chai = require "chai" | |
chai.should() | |
# The API provides several methods for interacting with users. | |
describe "API user", -> | |
# Get a list of records. The set of returned attributes for list may be different from view. | |
describe "list", -> |