- Download this application skeleton.
- Convert the app to use AJAX.
- Add any files you changed to your gist and submit your code.
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
class BoggleBoard | |
def initialize(board) | |
@board=board | |
end | |
def create_word(*coords) | |
coords.map { |coord| @board[coord.first][coord.last]}.join("") | |
end | |
def get_row(row) |
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. | |
//------------------------------------------------------------------------------------------------------------------ | |
Zoo = { | |
init: function(animals) { | |
this.animals = animals; | |
}, | |
bipeds: function() { |
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
$(function() { | |
$("form[name='sign_up']").submit(function(event) { | |
event.preventDefault(); | |
$("#errors").empty() | |
var email = validateEmail($("input[name='email']")); | |
var password = validatePassword($("input[name='password']")); | |
if (email == true) { | |
if (password == true) { | |
$("#errors").append("<ui>Success</ui>"); | |
} else { |
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
// Shorthand for $(document).ready(); | |
$(function() { | |
$("#previous_frame").click(function() { | |
$(".frames").animate({ | |
left: '+=360' | |
}, 500) | |
}) | |
$("#next_frame").click(function() { |
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
#=====bob | |
class Bob | |
hey:(words) -> | |
switch | |
when words.replace(/\s+/, '') == '' then "Fine. Be that way!" | |
when words == words.toUpperCase() then "Woah, chill out!" | |
when /\?$/.test(words) then "Sure." | |
else "Whatever." | |
module.exports = Bob |
I hereby claim:
- I am shidel-dev on github.
- I am joeshidel (https://keybase.io/joeshidel) on keybase.
- I have a public key whose fingerprint is 753D 97CF E6EB 09D7 973B 0754 11B7 FAC2 B8D8 72AF
To claim this, I am signing this object:
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
(ns words) | |
(use 'clojure.java.io) | |
(defn get-lines [fname] | |
(with-open [r (reader fname)] | |
(doall (line-seq r)))) | |
(defn divide [list] | |
(partition-all (/ (count list) 4) list)) |
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
Number.prototype.isCoprimeTo = function(num) { | |
if (this>num) var small = num, big = this; | |
else var small = this, big = num; | |
return (function(a, b) { | |
if (b == 0) return a; | |
return arguments.callee(b, a % b); | |
})(small, big) == 1 | |
} |
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
module Magic | |
def self.respond_to?(method_sym, include_private = false) | |
#Logic to decide which methods to respond to. | |
end | |
def self.method_missing(m, *args, &block) | |
#dynamically handle method calls | |
end | |
OlderNewer