In Java programming, it is very common to use threads to perform multi tasks simultaneously. Starting a thread is pretty easy but stopping a thread might be a headache for some programmers, especially when the thread needs to run a task that takes some times. … [Read more...]
Java: Format Bytes Array into Hexadecimal String
Sometimes, we may want to format a bytes array into hexadecimal (base-16) format for debugging purpose or for better readability. One byte has 8 bits and one byte can be represent by two hexadecimal characters (0 - 15 and A - F). … [Read more...]
Get Paid to Be a Hacker!
Have you ever thought getting paid to be a hacker? I said a “hacker” but it is an ethical hacker. Many people misunderstand the word “hacker”. Unlike cracker, a hacker is always ethical. So what does an ethical hacker do? An Ethical hacker (or the white hat hacker) is a computer expert with great knowledge in computer and network security. He or she attacks on systems on beha … [Read more...]
WordPress: Make Your WordPress A Little Bit More Secure
When you login into your Wordpress Admin using wrong username, your Wordpress will prompt you an error message: Invalid username. When you login into your Wordpress Admin using wrong password, your Wordpress will prompt you an error message: Incorrect password. You may not notice the two error messages above actually give the intruder some hints about your login in … [Read more...]
Java: Least Recently Used (LRU) Cache
Least Recently Used or in short LRU is an performance optimizing algorithm. LRU algorithm is widely used in software programming as well as in hardware instructions (e.g. CPU). In many case, in programming, we may want to cache some data from physical disk, for example database and files, but we cannot load all the data into memory due to the memory limitation on the server o … [Read more...]