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 blogs = [ | |
{"Title" : "Rebuilding shit", | |
"Post" : "I think progress has been made\. I think progress has been made\. I think progress has been made\. I think progress has been made\. I think progress has been made\. I think progress has been made\. I think progress has been made\. I think progress has been made\. ", | |
"Footer" : "September 3rd 2012" | |
}, | |
{"Title" : "Second post containting stuff", | |
"Post" : "Practice makes perfect\. Practice makes perfect\. Practice makes perfect\. Practice makes perfect\. Practice makes perfect\. Practice makes perfect\. " , | |
"Footer" : "October 2nd 2012" |
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
max_prime = 51 | |
array = Array.new(max_prime) { |i| i } | |
not_primes = [] | |
primes = [] | |
array.each do |i| | |
if i > 1 && i <= (max_prime ** 0.5) | |
0.upto(max_prime) do |j| | |
sieve = i**2 + (j * i) # Sieve_of_Eratosthenes algorithm to find non-primes |
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
$(document).ready(function(){ | |
$('form').on('submit',function(e){ | |
e.preventDefault(); | |
$.ajax({ | |
type:'post', | |
url:'/rolls' | |
}).done(function(data){ | |
$('#die').html('<img src=' + data + ".png>"); |
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){ |
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
#!/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
//------------------------------------------------------------------------------------------------------------------ | |
// 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
# 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
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 |
OlderNewer