This file contains hidden or 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 'bitarray' | |
| require 'murmurhash3' | |
| class SpellCheckFilter | |
| def initialize | |
| @lines = File.readlines('/usr/share/dict/words') | |
| @bit_array = BitArray.new(10000000) | |
| end | |
| def seed_bit_array |
This file contains hidden or 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(){ | |
| $('#previous_frame').on("click", function(){ | |
| var $last = $('.frames li:last-child') | |
| $('.frames').prepend($last) | |
| $last.css({left:'-33%'}) | |
| $last.animate({left:'0%'}) | |
| }); | |
| $('#next_frame').on("click",function(){ | |
| var $first = $('.frames li:first-child'); |
This file contains hidden or 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(){ | |
| $("#input").on("submit", function(event){ | |
| event.preventDefault(); | |
| var arrayfrominput = $(this).serializeArray(); | |
| var email_regex = new RegExp("[a-zA-Z]+[@]+[a-zA-Z]+[.]+[a-zA-z]") | |
| if (!email_regex.test(arrayfrominput[0]["value"])) | |
| alert("that email is bogus"); | |
| }); |
This file contains hidden or 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
| <!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> |