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
/** | |
* | |
* Secure Hash Algorithm (SHA1) | |
* http://www.webtoolkit.info/ | |
* | |
**/ | |
function SHA1 (msg) { | |
function rotate_left(n,s) { |
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
// http://dustindiaz.com/autocomplete-fuzzy-matching | |
var people = ['Daniel', 'Dustin', 'David', 'Damarcus', 'Russ']; | |
function matchPeople(input) { | |
var reg = new RegExp(input.split('').join('\\w*').replace(/\W/, ""), 'i'); | |
return people.filter(function(person) { | |
if (person.match(reg)) { | |
return person; | |
} |