This is a Javascript demo of Merkle-Hellman Knapsack Cryptosystem. You can click all the “Generate” buttons from top to bottom, or specify your own private keys / modulo / multiplier. The length of the key is set to 16 bit.
Continue reading “Merkle-Hellman Knapsack Demo”
Month: January 2013
Spaces between Chinese and English Text
When typesetting with both Chinese and English (or other western languages), we may feel that they are squeezed too close together. In fact, a space is desired between Chinese and English texts. E.g., we prefer 中文 English 混合 over 中文English混合. This issue has been much resolved in Word or XeTeX (cctspace can be used for CJK in LaTeX to add tilde before and space after English texts), but on webpages, in Adobe Illustrator / InDesign and many other software, the manual adjustment can be tiresome. So I wrote a simple script to solve this issue. It automatically adds spaces between Chinese and English characters, remove spaces before and after Chinese punctuations as well as consecutive spaces. Hope this small tool can be useful to you.
Continue reading “Spaces between Chinese and English Text”
Trap of Yellow Light
China recently enacted a new regulation prohibiting drivers to pass the line during yellow light, which in my opinion totally defies the purpose of the light. Now I dread driving in China even more. I translated this piece into Chinese, just to add to the discussion. If you are interested to see the translated article, please switch to CHINESE.