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
CREATE TABLE jeopardy( | |
ID INTEGER NOT NULL PRIMARY KEY | |
, Show_Number INTEGER | |
, Air_Date TEXT | |
, Round TEXT | |
, Category TEXT | |
, Value TEXT | |
, Question TEXT | |
, Answer TEXT | |
); |
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
/* Source: http://www.boxofficemojo.com/alltime/world/ */ | |
CREATE TABLE topmovies( | |
Rank INTEGER, | |
Title TEXT, | |
Studio TEXT, | |
Worldwide REAL, | |
Domestic REAL, | |
DomesticPct REAL, | |
Overseas REAL, | |
OverseasPct REAL, |
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
// How to add a bookmarklet to Chrome: https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=chrome%20bookmarklet | |
javascript:(function getScreenshot() {var openScreenshot = function(e) {window.open(e.originalEvent.data);}; $(window).unbind("message.getScreenshot", openScreenshot); $(window).bind("message.getScreenshot", openScreenshot); ScratchpadUI.liveEditor.postFrame({ screenshot: true, screenshotSize: 400 });})(); |
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
assertEqual: function(actual, expected) { | |
// Uses TraceKit to get stacktrace of caller, | |
// it looks for the line number of the first anonymous eval | |
// Stack traces are pretty nasty and not standardized yet | |
// so this is not as elegant as one might hope. | |
// Safari doesn't even give line numbers for anonymous evals, | |
// so they can go sit in the dunce corner today. | |
// This returns 0 if not found, which will mean that all | |
// the assertion failures are shown on the first line. | |
var getLineNum = function(stacktrace) { |
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> | |
<body> | |
<style> | |
h1{ | |
background-color: yellow; | |
} | |
h2{ | |
background-color: lightblue; | |
} | |
</style> |
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
Error.prepareStackTrace = function(error, structuredStackTrace) { | |
return structuredStackTrace; | |
}; | |
var getNumberFromChromeTrace = function(stack) { | |
// find first eval | |
var evalSite = null; | |
for (var i = 0; i < stack.length; i++) { | |
if (stack[i].isEval()) { | |
evalSite = stack[i]; |
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 externals; | |
var localStorage = (function() { return this.localStorage; })(); | |
var prompt = (function() { return this.constructor.prototype.prompt.bind(this); })(); | |
var wopen = (function() { return this.constructor.prototype.open.bind(this); })(); | |
var prompt2 = (function() { return this.prompt.bind(this); })(); | |
var wopen2 = (function() { return this.open.bind(this); })(); | |
localStorage.knowsPass_ID7232115911023911 = "xzz"; | |
println(localStorage.knowsPass_ID7232115911023911); | |
prompt("What is the password?"); |
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
"""Scores for any type of entity. | |
This is used to rank entities, for example the list of top forks of a | |
scratchpad and the current "hottest" scratchpads. | |
""" | |
import math | |
import datetime | |
import functools |
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
/** | |
* LocalStore is a *super* simple abstraction around localStorage for easy | |
* get/set/delete. We may end up wanting something more powerful like | |
* BankersBox, but for now this is much lighter weight. | |
* | |
* If you ever need to completely wipe LocalStore for *all* users when, | |
* say, changing the format of data being cached, just bump up the "version" | |
* property below. | |
*/ | |
window.LocalStore = { |
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
/* global initProcessingStubs */ | |
importScripts("processing-stubs.js?cachebust=" + (new Date()).toDateString()); | |
self.onmessage = function(event) { | |
var data = event.data, | |
context = data.context, | |
code = "with(arguments[0]){\n" + | |
data.code + | |
"\nif (typeof draw !== 'undefined' && draw){draw();}}", |