Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { "_id" : ObjectId( "4e00e83608146e71e6edba81" ),
- ....
- "text" : "Text now exists in the database"}
- { "_id" : ObjectId( "4e00e83608146e71e6edba81" ),
- ....
- "text" : "Text now exists in the database",
- "tHash" : -4375633875013353634 }
- var hashCode = function(s) {
- if (s == null) return 0;
- if (s.length == 0) return 1;
- var hash = 0;
- for (var i = 0; i < s.length; i++) {
- hash = ((hash << 5) - hash) + s.charCodeAt(i);
- hash = hash & hash; // Convert to 32bit integer
- }
- return hash;
- };
Add Comment
Please, Sign In to add comment