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
body { | |
font-family: Helvetica; } | |
.container { | |
margin: 20px auto; | |
width: auto; | |
background: #f00; | |
padding: 20px; } | |
.container ul { | |
margin: 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
require 'csv' | |
class String | |
def titleize | |
split(/(\W)/).map(&:capitalize).join | |
end | |
end | |
def separate_word(word) | |
word.gsub(/[0-9\-\/\\\*\#()&'.]/,"").titleize.split(" ") |
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
def primesTRL(num) | |
ceiling = num | |
number_set = 2.upto(ceiling).map(&:to_i) | |
non_primes = {} | |
number_set.each do |prime| | |
next unless non_primes[prime].nil? | |
max_val = ceiling / prime | |
break if max_val < prime |
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
3;3;1 2 3 4 5 6 7 8 9 | |
5;5; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | |
4; 5; a b c d e f g h i j k l m n o p q r s t | |
6; 4; a b c d e f g h i j k l m n o p q r s t u v w x | |
4; 5; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | |
6; 3; a b c d e f g h i j k l m n o p q r | |
7; 4; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | |
12; 3; a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J | |
9; 4; a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J |
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
# Andrews' CODE | |
def times_table(rows) # <-- defines method and how many rows passed as argument | |
1.upto(rows) do |x| # <-- You start first loop with value x | |
line = "" | |
1.upto(rows) do |y| # <-- begin 2nd (nested) loop with value y | |
line += "#{x*y}\t" # <-- x=1 therefore 1*1, 1*2, 1*3. When done x=2 2*1, 2*2, 2*3.... (x=3, 3*1, 3*2, 3*3...) | |
end | |
puts line | |
end # <-- incremement to the next x value | |
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
//------------------------------------------------------------------------------------------------------------------ | |
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here. | |
//------------------------------------------------------------------------------------------------------------------ | |
//------------------------------------------------------------------------------------------------------------------ | |
// DRIVER CODE: Do **NOT** change anything below this point. Your task is to implement code above to make this work. | |
//------------------------------------------------------------------------------------------------------------------ |
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
#!/bin/sh | |
git filter-branch --env-filter ' | |
an="$GIT_AUTHOR_NAME" | |
am="$GIT_AUTHOR_EMAIL" | |
cn="$GIT_COMMITTER_NAME" | |
cm="$GIT_COMMITTER_EMAIL" | |
if [ "$GIT_COMMITTER_EMAIL" = "[email protected]" ] |
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
<!doctype html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css"> | |
<link rel="stylesheet" href="main.css"> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800"> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900"> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css"> | |
</head> |
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
//------------------------------------------------------------------------------------------------------------------ | |
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here. | |
//------------------------------------------------------------------------------------------------------------------ | |
var Zoo = { | |
bipeds: [], | |
quadrupeds: [], | |
other: [], | |
init: function(animals){ |