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
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
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" |
NewerOlder