initial commit of ban detection project, still missing features and have to do more in regards to js
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
function javaHashCode(string, K) {
|
||||
var hash = 0;
|
||||
if (string.length === 0) {
|
||||
return hash;
|
||||
}
|
||||
for (var i = 0; i < string.length; i++) {
|
||||
char = string.charCodeAt(i);
|
||||
hash = K*((hash<<5)-hash)+char;
|
||||
hash = hash & hash;
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
Reference in New Issue
Block a user