(string)
| 93 | |
| 94 | # djb2 is simple and effective: see http://www.cse.yorku.ca/~oz/hash.html |
| 95 | def hash_djb2(string): |
| 96 | val = 5381 |
| 97 | for s in string: |
| 98 | val = ((val * 33) & 0xFFFFFFFF) ^ ord(s) |
| 99 | return val |
| 100 | |
| 101 | |
| 102 | def colname_htable(query): |
no outgoing calls
no test coverage detected