Skip to content

Instantly share code, notes, and snippets.

@akumaburn
akumaburn / JavaUtil.java
Last active April 16, 2024 18:48
Bloomfilters for string similarity comparison, much faster than Damerau Levenshtein method
public class JavaUtil {
// This implementation is much faster than Levenshtein method in my testing.
// These variables will determine the probability of a false-positive
// Set as needed
private static final int BLOOM_FILTER_SIZE = 1024;
private static final int NUM_HASH_FUNCTIONS = 7;
// Note this function will only check the length of "match" (checking the end of "text", adjust as is needed)
@akumaburn
akumaburn / enable_nativebridge
Last active December 4, 2018 04:56 — forked from uzxmx/enable_nativebridge
android x86 /system/bin/enable_nativebridge
#!/system/bin/sh
PATH=/system/bin:/system/xbin
houdini_bin=0
dest_dir=/system/lib$1/arm$1
binfmt_misc_dir=/proc/sys/fs/binfmt_misc
if [ -z "$1" ]; then
if [ "`uname -m`" = "x86_64" ]; then