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 "bigdecimal" | |
keywords = [ | |
"abstract", "default", "if", "private", "throw", "boolean", "do", | |
"implements", "protected", "throws", "break", "double", "import", | |
"public", "transient", "byte", "else", "instanceof", "return", "try", | |
"case", "extends", "int", "short", "void", "catch", "final", | |
"interface", "static", "volatile", "char", "finally", "long", "super", | |
"while", "class", "float", "native", "switch", "true", "const", "for", | |
"new", "synchronized", "false", "null" |
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
# Shamelessly ripped from http://fightingforalostcause.net/misc/2006/compare-email-regex.php | |
describe "The perfect email regex" do | |
before(:all) do | |
@regex = /^([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$/i | |
end | |
def matches(email) | |
!!email.match(@regex) | |
end |
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 -> | |
gSmallShadow: new google.maps.MarkerImage("http://labs.google.com/ridefinder/images/mm_20_shadow.png", new google.maps.Size(22, 20), new google.maps.Point(0, 0), new google.maps.Point(6, 20)) | |
gYellowIcon: new google.maps.MarkerImage("http://labs.google.com/ridefinder/images/mm_20_yellow.png", new google.maps.Size(12, 20), new google.maps.Point(0, 0), new google.maps.Point(6, 20)) | |
places: {} | |
updatePlaces: -> | |
bounds: map.getBounds() | |
ne: bounds.getNorthEast() | |
sw: bounds.getSouthWest() | |
$.ajax({ |
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
--- | |
party: | |
- name: Kyogre | |
moves: - Thunder | |
- Ice Beam | |
- Water Spout | |
- Calm Mind | |
item: Leftovers | |
- name: Rayquaza |
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 earth-radius 6371) | |
(defn degree-to-radian [deg] | |
(* deg (/ Math/PI 180))) | |
(defn distance [lata lnga latb lngb] | |
(let [lata-r (degree-to-radian lata) | |
lnga-r (degree-to-radian lnga) | |
latb-r (degree-to-radian latb) | |
lngb-r (degree-to-radian lngb) |