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.pad = function(size){ | |
if(typeof(size) !== "number"){size = 2;} | |
var s = String(this); | |
while (s.length < size) s = "0" + s; | |
return s; | |
} |
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
$ -> | |
papers = [100,101,201,320] | |
courses = ["COMPSCI","PSYCH","RUSSIAN"] | |
$('input[name="course_search"]').keyup => | |
add_course course for course in courses when course is this.value | |
add_course = (course) -> alert "#{course}" |