I hereby claim:
- I am absoludacris06 on github.
- I am nsaldivar (https://keybase.io/nsaldivar) on keybase.
- I have a public key ASBA_Wqiks6lgZk228rrR38Qo1x7wcCPu7jSngCwv6_B0go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
class List | |
attr_reader :title, :tasks | |
def initialize(title, tasks = []) | |
@title = title | |
@tasks = tasks | |
end | |
def add_task(task) | |
tasks << task |
$(function(){ | |
$("form").on("submit", function(e) { | |
e.preventDefault(); | |
$("#errors li").remove(); | |
var errors = []; | |
var email = $(this).find("input[name=email]").val(); | |
var password = $(this).find("input[name=password]").val(); | |
if (!checkEmail(email)) { | |
errors.push("Must be a valid email address."); | |
} |
$(document).ready(function () { | |
var rollThatShit = function(){ | |
return Math.floor(Math.random() * 6) + 1; | |
}; | |
$('#vegas').submit(function(e){ | |
e.preventDefault(); | |
$.ajax({ | |
url: this.action, |
<!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> |
# Exercise 1 | |
def mean(numbers) | |
sum = numbers.inject(:+) | |
return sum / numbers.length | |
end | |
# This will throw an error. Change this line so that it works. | |
sample_avg = mean([5, 3, 6, 10]) |