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
1-28-2015 NYC LPEP $20.16 | |
1-29-2015 DEN $17.06 | |
1-30-2015 Aden Food Market $11.89 | |
1-30-2015 ZIZI LIMONA $96.65 | |
1-31-2015 FOODTOWN $67.49 | |
2-4-2015 NYC-TAXI $15.96 | |
2-4-2015 DRAM $21.00 | |
2-4-2015 BALTHAZAR $42.40 | |
2-5-2015 DINER $31.13 | |
2-7-2015 DOTORY $23.60 |
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 InnerSchool = (function(){ | |
function Course(name){ | |
this.name = name; | |
} | |
function School(name){ | |
this.name = name; | |
this.courses = []; | |
} |
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
// School, Student, Course | |
// function communicateSlogan(){ | |
// return this.name + " : " + this.slogan; | |
// } | |
// | |
// var flatiron = { | |
// name: "The Flatiron School", | |
// slogan: "Learn to program, and pick locks", | |
// saySlogan: communicateSlogan | |
// }; |
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
➜ time bin/rspec | |
... | |
Finished in 0.12155 seconds (files took 1.09 seconds to load) | |
3 examples, 0 failures | |
bin/rspec 1.38s user 0.24s system 98% cpu 1.646 total | |
➜ time rspec | |
... | |
Finished in 0.11989 seconds (files took 1.31 seconds to load) |
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
>> [*1..100].reject{|num| num.odd?} | |
=> [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100] | |
>> [*1..100].reject(&:odd?) | |
=> [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100] | |
>> odd_proc = &:odd? | |
SyntaxError: (irb):43: syntax error, unexpected & | |
odd_proc = &:odd? | |
^ | |
from /Users/StevenNunez/.rubies/ruby-2.1.1/bin/irb:11:in `<main>' | |
>> odd_proc = :odd?.to_proc |
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
class Grid | |
attr_reader :coordinate_list | |
def initialize(coordinate_list) | |
@coordinate_list = coordinate_list | |
end | |
def find_all_matches(x, y) | |
find_target_pixels(x,y).each do |t_x, t_y| | |
if eligable_for_painting?([t_x, t_y], [x,y]) | |
matches << [t_x, t_y] |
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
Final Projects from BEWD 5 | |
Flash sale app | |
http://intense-stream-5307.herokuapp.com/ | |
Ten Thousand Hours | |
http://infinite-basin-5033.herokuapp.com | |
Photobooth app | |
http://hidden-reaches-9583.herokuapp.com/ |
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
$navbar-default-brand-color: #3c3c1d; | |
$navbar-default-bg: #e68f3f; | |
$jumbotron-bg: #ba8751; | |
$body-bg: #dac19e; | |
$panel-bg: #f4efdd; | |
$brand-primary: #9b2d0a; | |
$text-color: #491407; | |
$link-color: #ba8751; | |
$btn-primary-color: #f4efdd; | |
$navbar-height: 70px; |
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
#Say we have Category and Shirt models. We have a tags join model the bind the 2 together. | |
# Models look like this | |
class Category < ActiveRecord::Base | |
has_many :tags | |
has_many :shirts, through: :tags | |
end | |
class Shirt < ActiveRecord::Base | |
has_many :tags |
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
# make sure you gem install mechanize | |
require 'mechanize' | |
# fake it like we're safari | |
a = Mechanize.new { |a| a.user_agent_alias = 'Mac Safari'} | |
# look up all mail boxes in 10001. This returns 50 results. | |
a.get('https://tools.usps.com/go/POLocatorAction!input.action?address=10001&radius=1000&locationTypeQ=collectionbox#paginationTop') | |
# a is now 'on' that page | |
# returns all of the location ids on the page | |
a.page.search('#locationID').map(&:text) | |
# This will probably be replaced by a model of Collection box |