Let's start out with something fun - Your own game!!
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
class ParentClass | |
def public_method | |
puts '[works] parent # public' | |
protected_method | |
end | |
protected # Can only be called from within the methods | |
def protected_method | |
puts '[works] parent # protected' | |
end |
Here is the Student Asessment
Morning 007s.
Your mission, should you choose to accept it, is to identify and eliminate the hacker who breached our secure data centers.
Morning 007s.
Your mission, should you choose to accept it, is to identify and eliminate the hacker who breached our secure data centers.
All the identities of your fellow WDI agents will be open and they will all be in great danger if we don't react fast.
Our security records indicate this following log access to the servers
______________$$$$$____________________________________________________ WDI 7 - Hong Kong
__$$$$_______$$$___$$$$$______________________________________________ Tue, March 31 2015
_$$$$$$_____$$$___$$$$$$$________________________________________________________________
$$$_$$$$___$$$__$$$$____$________________________________________________________________
$____$$$$_$$$$_$$$_______________________________________________________________________
_______$$$$$$$$$$___$$$$$________________________________________________________________
____$$$$$$$$$$$$_$$$$_$$$$$______________________________________________________________
___$$$$$$$$$$$$$$$$$_____$$$_____________________________________________________________
__$$$__$$$$$$$$$$$$________$_____________________________________________________________
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 stuff = [42, "forty-two", [], {}, (function(){}) ]; | |
var isAnObject = false; | |
for(var i=0; i < stuff.length; i++) { | |
isAnObject = stuff[i] instanceof Object; | |
console.log(stuff[i].constructor + ' instanceof Object? ' + isAnObject); | |
} |
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
loggest('Let\'s get the party STARTED'); | |
function loggest(txt){ | |
var length = (txt.length + 2); | |
if (length > 80) { length = 80 }; | |
console.log(txt); console.log(new Array(length + 2).join('-')); | |
} | |
function bindBehavior(config) { |
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
cal_bmi = (weight_kg, height_cm) -> | |
height_m = height_cm/100 | |
bmi = weight_kg / (height_m * height_m) | |
f_bmi = Math.floor(bmi) | |
diff = Math.round((bmi - f_bmi) * 10) | |
if diff == 10 # Need to bump up the whole thing instead | |
f_bmi += 1 | |
diff = 0 |
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
/// | |
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return | |
// | |
// $ brew update && install node | |
// $ node return.js | |
// | |
var print = function(t){ console.log(t) }; | |
var counter = function() { |