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").submit(function(click) { | |
click.preventDefault(); | |
var action = $(this).attr("action") | |
var roll = Math.floor(Math.random()*6)+1; | |
console.log("roll before ajax", roll); | |
// var method = $(this).attr("method") | |
$.post(action,{"value" : roll }, function(rod_name){ | |
var roll_html = $(rod_name).find("#die").html(); |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<!-- SQL XML created by WWW SQL Designer, http://code.google.com/p/wwwsqldesigner/ --> | |
<!-- Active URL: http://socrates.devbootcamp.com/sql.html --> | |
<sql> | |
<datatypes db="mysql"> | |
<group label="Numeric" color="rgb(238,238,170)"> | |
<type label="Integer" length="0" sql="INTEGER" re="INT" quote=""/> | |
<type label="Decimal" length="1" sql="DECIMAL" re="DEC" quote=""/> | |
<type label="Single precision" length="0" sql="FLOAT" quote=""/> | |
<type label="Double precision" length="0" sql="DOUBLE" re="DOUBLE" quote=""/> |
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 'mathn' | |
# def time_logger(function) | |
# start = Time.now | |
# function | |
# puts "It took #{(Time.now - start)/60} minutes to run #{function}" | |
# end | |
# PROBLEM 2 | |
# def fibonacci | |
# fib_array = [1,2] |
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 reverse(string) | |
return string if string.length <= 1 | |
reverse(string[1..-1]) + string[0] | |
end | |
puts reverse("string") | |
puts reverse("racecar") | |
def palindrome(string) | |
puts string |
NewerOlder