VNC on Linux is not secure. Most implementations of VNC servers for Linux allows password only up to 8 characters. Such a VNC server is very vulnerable to brute-force attack. This article discuss a secure way to use VNC. The VNC (vino) server is started only when needed, thus reduce …
Add an Entry into the Right-click Menu in Windows
To add an entry into the right-click menu in Windows, edit the registry following the steps below.
-
Open the registry. You can search for
regeditin Windows Start menu and run it. -
Navigate to the key
HKEY_CLASSES_ROOT\Directory\Background\shellin the registry. -
Create another key with any name (e …
Lvalue Reference and Rvalue Reference

Difference betwen Lvalue and Rvalue Reference
-
Lvalue and Rvalue are terrible names. They are due to historical reasonal but people stuck with these names.
-
A lvalue reference has a name while a rvalue reference has no name, in other words, a lvalue reference is persistent while a rvalue reference is …
Interact with System Clipboard in Vim
The following are ways for a Vim session to interact (copy/cut, paste) with other Vim sessions or other applications.
Use X Windows Clipboard Directly
If you prefer to use X windows clipboard as the default buffer for Vim,
put set clipboard=unnamedplus in your .vimrc file.
This obviously makes …
Stick Breaking Problems
The following is a popular brain teaser problem about probability.
Randomly select two points on a unit stick to break it into 3 pieces, what is the probability that the 3 pieces can form a triangle?
The critical thing here is how are the two points selected. The most popular …
Copy Arrays in Java
There are several different ways to copy arrays of object (primitive types) in Java.
However,
the fastest way seems to be System.arraycopy.
This methed is implemented using native code and only performs a shallow copy.
Acutally most methods for copying arrays in Java perform shallow copy.
int arr1[] = {0 …