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
user system total real | |
Binary - Bill: 0.000000 0.000000 0.000000 ( 0.000014) | |
Iterative - Bill: 0.000000 0.000000 0.000000 ( 0.000012) | |
Binary - Bob: 0.000000 0.000000 0.000000 ( 0.000020) | |
Iterative - Bob: 0.000000 0.000000 0.000000 ( 0.000007) | |
Binary - Joe: 0.000000 0.000000 0.000000 ( 0.000005) | |
Iterative - Joe: 0.000000 0.000000 0.000000 ( 0.000005) | |
Binary - Sally: 0.000000 0.000000 0.000000 ( 0.000007) | |
Iterative - Sally: 0.000000 0.000000 0.000000 ( 0.000005) | |
Binary - Sussie: 0.000000 0.000000 0.000000 ( 0.000007) |
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
THING = "thing_one" | |
puts THING | |
if defined? THING | |
puts "defined? THING is truthy" | |
else | |
puts "defined? THING is falsey" | |
end |
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 _if(bool, func1, func2) { | |
if(bool === true){ | |
return func1(); | |
} else { | |
return func2(); | |
} | |
}; | |
//Test | |
Test.assertEquals(_if(true, function(){console.log("True")}, function(){console.log("false")}), 'True') |
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
// NOPE | |
String.prototype.padLeft = function(ch, n) { | |
var newString = this; | |
while(newString.length < n){ | |
newString = ch + newString; | |
} | |
if(typeOf(ch) === "string"){ | |
return newString; |
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 './snowplow-distro'; | |
if (!window['onespot_tracker']) { | |
window.GlobalSnowplowNamespace = window.GlobalSnowplowNamespace || []; | |
window.GlobalSnowplowNamespace.push('onespot_tracker'); | |
window['onespot_tracker'] = function() { (window['onespot_tracker'].q = window['onespot_tracker'].q || []).push(arguments); }; | |
window['onespot_tracker'].q = window['onespot_tracker'].q || []; | |
} | |
window.onespot_tracker('newTracker', 'client-javascript', 'sp.os-data.com', { // Initialise a tracker |