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 process = require('process'); | |
var readline = require('readline'); | |
var randomNumber = Math.round(Math.random() * 10); | |
var lives = 5; | |
var terminal = readline.createInterface( | |
{ | |
input : process.stdin, | |
output : process.stdout |
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
// Write your Orange Tree code here - you may use constructor functions | |
var Tree = function(color) { | |
// this.age = age | |
this.color = color | |
} | |
Tree.prototype = { | |
age: 0, | |
grow: function() { |
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 express = require('express'); | |
var router = express.Router(); | |
var Xero = require('xero'); | |
var xero = new Xero(process.env.CONSUMER_KEY, process.env.CONSUMER_SECRET); | |
/* GET home page. */ | |
router.get('/', function(req, res, next) { | |
res.render('index', { | |
description: 'Luke and pete to make this awesome app' |
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
function intro(){ | |
// watch your indentation here. rule #1, perfectly indent your code, ALWAYS! | |
// else will lead to bugs and much confusion over nothing | |
var hi = document.getElementById('introduction'); | |
hi.style.display = 'initial'; | |
var img = document.getElementById('pic'); | |
img.style.display = 'none'; | |
} |
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
def mode(num_list) | |
new_array = [] | |
freq = num_list.inject(Hash.new(0)) { |h,v| h[v] += 1; h} | |
# can you tell me what 'h' or 'v' means? I just got it from stackoverflow maybe you can chane it to a value that is easy to understand | |
#-----------PETE: ---------------- | |
#easiest way to check what's going on is to print everything you don't understand: | |
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 | |
# articulate, reason, communicate and think about code | |
# key vocabulary is in '', e.g. 'highest level' | |
# I find the articulation and vocabulary around coding really important. | |
# You'll slowly pick it up from videos, stack overflow and tutorials. | |
# Perhaps it is worth a little focus in its own right... | |
# I welcome feedback: is this guide helpful or confounding? |
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
function B() { | |
this.name = 'flim'; | |
this.shell = '<div id="' + this.name + '""></div>'; | |
this.id = '#' + this.name; | |
this.lastCoords = this.getCoords(); | |
}; | |
B.prototype.start = function() { // | |
setInterval(this.move.bind(this), 100) | |
// setInterval(this.poop.bind(this), 150) |