Ben Chuanlong Du's Blog

And let it direct your passion with reason.

Synchronize Files Using Dropbox

  1. Dropbox won't sync files that you don't have read permissions.

  2. You'd better not merge an old Dropbox folder while installing/configuring Dropbox.

  3. You'd better not store symbolic links in the Dropbox folder, because the symbolic links will be replaced by the real files/folders when synchronized to other computers.

  4. It …

Block JavaScript in Browsers Using NoScript

** Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement! **

To enable NoScript synchronization via Firefox Sync go to about:config (type this in URL bar) and change noscript.sync.enabled to true.

Tips for AWK

AWK Tutorial

  1. For small structured text files, it is suggested that you use the q command to manipulate it.

    For complicated logic, it is suggested that you use a scripting language (e.g., Python) instead. I personally discourage using of awk unless you have a large file (that q cannot …

Performance Tips for C++

Performance

  1. If there is some block of useless code, the compile is smart enough to ignore it and thus speed up the program.

  2. Use the option -O2 to generate optimized code when you are ready to publish your code.

  3. Define variables only when needed to avoid the overhead of creating …

Tips for VB/VB.net

About String Functions

  1. The uniform random variables generated by VB is pretty good. At least it's acceptable according to the test in R.

  2. String functions that return a string can be used with a dollar sign at the end, which is a faster version of the corresponding function.

  3. The function …