Bloom Filters

  • Used for determining presence of an element in a set.
  • Uses a set of hash functions that return an integer.
  • The returned value is used as index into a bit vector.
  • hash1(element) => index1
  • hash2(element) => index2
  • To search an element, we check for both the index are set. If yes, element might be there. Else say No.

Java Fix: Applications Blocked by Security Settings for Windows 7

  • Are you seeing following errors?

  1. Java applications are blocked by your security settings.
  2. Missing Application-Name manifest attribute
  3. Missing required Permissions manifest attribute in main jar

  • Starting with Java 8, there is no medium risk setting in Security tab under Java
  • You will keep getting this error till you revert to older Java (suggested Java 7, it has hit end of life though).
  • Install both 32-bit and 64-bit versions. Why? Because browsers are still 32-bit, even on a 64-bit machine, 64-bit OS

Android Studio: hax kernel module is not installed

I faced a strange problem with installing HAX kernel module on Windows 7.

How to Install

  • Check if you have HAX downloaded. Do it by going to SDK manager and under extra, look for Intel x86 Emulator. Check it, if it was unchecked.
  • Now, look for SDK path in the SDK Manager window, top left.
  • I was unable to navigate to the SDK path on Windows explorer. The folder AppData was not visible at all!
  • So, the solution was to navigate to the same path with “cmd”. Just find out the executable and run it.
  • More help at StackOverflow link

Netlink Sockets: Addind a new socket family

  • Kernel version 3.13, Ubuntu 14.04
  • $ uname -a
    Linux ubuntu 3.13.0-37-generic #64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
  • We need two changes:
  • User space
    • Locate the file “netlink.h”
    • $ sudo locate “netlink.h”
    • You would get the header file at “/usr/include/linux/netlink.h”
    • Add the new family
    • #define NETLINK_MY     17
    • Keep the number less than 32
    • In you user application, add “#define NELINK_MY 17”
  • Kernel space
    • Locate the netlikn file for kernel space
    • /usr/src/linux-headers-3.13.0-24/include/uapi/linux/netlink.h
    • Add exact definition here as well
  • No recompilation of kernel is required.
  • References: