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 WrappedOverlayExample = React.createClass({ | |
handleClose: function () { | |
this.refs.overlay.fadeOut(function () { | |
this.props.onClose(); | |
}.bind(this)); | |
}, | |
render: function () { | |
return ( | |
<Overlay ref="overlay"> |
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 would add variable support and inline JS support | |
var RCSPreprocess = (function () { | |
var varRegExp = /\$([a-z0-9-_]+)/ig, | |
singleVarRegExp = /\$([a-z0-9-_]+)/i, | |
codeRegExp = /\$\{([\s\S]+)\}\$/igm, | |
varDefineRegExp = /\$([a-z0-9-_]+): ([^;]+);/ig, | |
rcsVars = {}; | |
function process (example) { | |
example = example.replace(varDefineRegExp, function (string, name, value) { |
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
@component TestName { | |
width: 100px; | |
height: 100px; | |
.state-test & { | |
width: 223px; | |
} | |
.header { | |
width: 100px; |
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
/* Component CSS for TestName */ | |
.app-component.app-test-name { | |
width: 100px; | |
height: 100px; | |
} | |
.app-component.app-test-name.app-test-name_state-test { | |
width: 223px; | |
} | |
.app-component.app-test-name .app-test-name_header { | |
width: 100px; |
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
// Easing.easeInElastic(percent); | |
var Easing = { | |
// t: current time, b: begInnIng value, c: change In value, d: duration | |
swing: function (x, t, b, c, d) { | |
if (arguments.length === 1) { | |
t = arguments[0]; x = 0; b = 0; c = 1; d = 1; | |
} | |
return Easing.easeOutQuad(x, t, b, c, d); | |
}, |
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
INSERT INTO usd_exchange_rates (`date`,`EUR`,`GBP`) VALUES | |
("1975-01-02 00:00:00", 0.7633, 0.4281),("1975-01-03 00:00:00", 0.7585, 0.4271),("1975-01-06 00:00:00", 0.7524, 0.4252),("1975-01-07 00:00:00", 0.751, 0.4246),("1975-01-08 00:00:00", 0.7554, 0.4258),("1975-01-09 00:00:00", 0.7551, 0.4256),("1975-01-10 00:00:00", 0.7534, 0.4251),("1975-01-13 00:00:00", 0.754, 0.4248),("1975-01-14 00:00:00", 0.7588, 0.4261),("1975-01-15 00:00:00", 0.7562, 0.4254),("1975-01-16 00:00:00", 0.7546, 0.4249),("1975-01-17 00:00:00", 0.7537, 0.4249),("1975-01-20 00:00:00", 0.7503, 0.4244),("1975-01-21 00:00:00", 0.7487, 0.4231),("1975-01-22 00:00:00", 0.7416, 0.4183),("1975-01-23 00:00:00", 0.7404, 0.42),("1975-01-24 00:00:00", 0.7384, 0.4196),("1975-01-27 00:00:00", 0.7324, 0.4168),("1975-01-28 00:00:00", 0.7357, 0.4197),("1975-01-29 00:00:00", 0.7429, 0.4218),("1975-01-30 00:00:00", 0.7418, 0.421),("1975-01-31 00:00:00", 0.7423, 0.42),("1975-02-03 00:00:00", 0.745, 0.4211),("1975-02-04 00:00:00", 0.7518, 0.4221),("1975-02-05 |
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 () { | |
function TaskWorker ($config) { | |
this.worker = this.createWorker(); | |
this.worker.addEventListener('message', this.onWorkerMessage.bind(this)); | |
this.tasks = []; | |
this.onTaskComplete = $config.onTaskComplete; | |
this.lastTaskTimestamp = null; | |
} | |
TaskWorker.prototype = { | |
functionToObjectURL: function (func) { |
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
String.prototype.rgb = function (r, g, b) { | |
return "\x1b[38;2;" + r + ";" + g + ";" + b + "m" + this + "\x1b[0m"; | |
}; |
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 userActivity = [ | |
1.2, | |
2, | |
0, | |
74, | |
6, | |
3, | |
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
import flash.display.Loader; | |
import flash.display.LoaderInfo; | |
/* | |
* pull a var from the embed and return it, if there is no param matching the name | |
* return a default value | |
*/ | |
function getEmbedParam(name:String, defaultValue:String):String | |
{ | |
var parameters:Object = LoaderInfo(stage.loaderInfo).parameters; |