Remove Duplicates from Sorted Array


Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this in place with c…


Text Justification


Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified. You should pack your words in a greedy approach; that is,…


[转] 胡适在北京大学毕业典礼上的讲话(1932年6月27日)



How to clone all remote branches with Git

Question: I have a master and a development branch, both pushed to remote git repository. How to clone all remote branches with Git


  1. clone the remote git repository: git clone git://
  2. Question: …


Proxy Firefox through a SSH tunnel

Have you ever wanted to visit sites during the day from a location that denied access to those sites? What you need is the ability to create a secure and encrypted ssh connection to tunnel your browse…


dpkg: error processing tex-common

Got the problem while installing latex-cjk-chinese

fmtutil-sys failed. Output has been stored in
Please include this file if you report a bug.

dpkg: error processing tex-common (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

After checking the file fmtutil.t6EnBlWW, I find the problem is

! I can't find file `loadhyph-zh-latn.tex'.

Got the problem while installing latex-cjk-chinese<…