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 fs = require('fs'); | |
var generateBaseClass = function () { | |
var baseClass = 'var BaseClass=function(){};\n'; | |
for (var i = 1; i <= 100; ++i) { | |
baseClass += 'BaseClass.prototype.method' + i + '=function(){return ' + i + '}\n'; | |
} | |
return baseClass; | |
} |
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
NewClass = Class.extend("OptionalDisplayName", { | |
constructor: function () {}, | |
properties: { | |
property1: {set: true, get: true, initial: 'Initial value'}, | |
property2: {get: function () { return true; }} | |
}, | |
statics: { | |
staticField1: null, |
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
<div id="cse" style="width: 100%;">Loading</div> | |
<script src="http://www.google.com/jsapi" type="text/javascript"></script> | |
<script type="text/javascript"> | |
function parseQueryFromUrl () { | |
var queryParamName = "q"; | |
var search = window.location.search.substr(1); | |
var parts = search.split('&'); | |
for (var i = 0; i < parts.length; i++) { | |
var keyvaluepair = parts[i].split('='); |