Still waiting for the passport be cleared

Written by eddyxu on 25.07.2008 | Tech

There are more than 4 weeks after I was checked by the VO in Beijing. Yesterday, I made a phone call to D.C, those people just said that “You just wait. There is a long list. So we don’t know when it can be clear.”, which make me insane. Due to the uncertainty of the [...]

Let vim support auto completion for parentheses

Written by eddyxu on 04.07.2008 | Linux, Mac

Many modern text editors and IDEs have build-in parenthesis auto-completion. For vim, you can simply paste the following script into your $(HOME)/.vimrc

:inoremap ( ()<ESC>i
:inoremap ) <c-r>=ClosePair(’)’)
:inoremap { {}<ESC>i
:inoremap } <c-r>=ClosePair(’}’)
:inoremap [ []<ESC>i
:inoremap ] <c-r>=ClosePair(’]’)
:inoremap < <><ESC>i
:inoremap > <c-r>=ClosePair(’>’)
function ClosePair(char)
if getline(’.')[col('.') - 1] == a:char
return “\”
else
return a:char
endif
endf

 

Set system-wide environment variable in Mac

Written by eddyxu on 22.05.2008 | Linux, Mac

In osx, if you wanna set a environment variable which can be used outside the terminal, you can simply put it into ~/.MacOSX/environment.plist. However, the flaw of it is in this way it seems can not inherit some variables that were already made. 

One huge code optimizing

Written by eddyxu on 02.02.2008 | Tech

As I talked in my last blog, my prototype run 3 cases in about 1 mins. In today morning, I found I have a typo mistake in the innerest loop in my program, then after I fixed it, the time of program running reduced incredibly to 1.8 seconds, which is far more better than I [...]

Links

Light Reading