Wednesday, 7 August 2013

Singapore Travel List

1. Merlion Park->Marina Bay Sands (Casino)->Gardens By The Bay->Singapore River (Bar/Jumbo/Xiaohonglou seafood)
2. VivoCity(Movie/Shopping/Nosignboardseafood/ThaiExpress)->walk to Sentosa (Universal Studio/Casino/Song of the Sea/Jumbo)
3. Somerset313->Orcahrd(Ippudo/DFS)
4. East Coast: BBQ

Tuesday, 6 August 2013

Set X11 Forwarding for gitk

Tools: Xshell, Xming, git
1) Install Xming. Run it.
2) Xshell setting: Connection->SSH->Tunneling, click Forwarding X11 connection to X DISPALY:(localhost 0.0);
3) ssh to you server, test X11 by command 'xclock &'; if X11 is set properly, then a clock would appear in you local desk.
4) install git (gitk is installed by default).
5) goto a git repo, type in command 'gitk &'; the GUI would come out automatically as :


Thursday, 4 July 2013

iPone App Development

In this blog, I will share some techniques/experience in developing iPhone Apps.

UIWebView is to display html content and other documents, e.g., pdf,  inside iPhone App.  It has three methods to load content to the view:
- loadData:MIMEType:textEncodingName:baseURL:
– loadHTMLString:baseURL:
– loadRequest:
Both content from remote server and local file can be loaded. By setting the delegate of the UIWebView instance, we can intercept the click actions on the view. For example,
– webView:shouldStartLoadWithRequest:navigationType:
can will be called whenever a request is to be sent from the html, i.e., a hyperlink is clicked. In this case, we can customize the click action(the target should be a link anchor) to segue to another view controller. We can also change the content of the view by calling javascript code:
– stringByEvaluatingJavaScriptFromString:

Monday, 10 June 2013

Vim configuration


I have known vim for a long time. But until recently, I get to know how to use it efficiently. The power of vim originates from its various plugins. Since there is no center repository for these plugins like textmate, some plugins are hard to install; Conflicts also appear now and then.

The first thing to do is to configure the compile parameters. Some options are turned on to support more plugins, e.g., command-T requires ruby is enabled by vim.

./configure --with-features=BIG --enable-pythoninterp --enable-rubyinterp --enable-gui=no --with-x --enable-cscope --prefix=/home/wangwei/software

Once vim is installed. The first plugin to download is pathogen, which helps to manage your plugins. Next, you can configure your .vimrc file for window split, cursor moving, folding, etc. A good example is from nvie. The most frequently plugins I am using are: NERD-Tree, which is a file system explorer; Pyclewn, a plugin for gdb and pdb; vim-flake8, which is a superset of pep8 and pyflake for python syntax and style check. Python syntax folding, a plugin for python code folding based on syntax(the default folding/unfolding toggle is the space key).

Pyclewn puts the standard output into /dev/null by default. To display the standard output, open another terminal, type tty command(let the result by /dev/pts/11), set the tty in vim by : Cinferiortty /dev/pts/11.

Wednesday, 5 June 2013

IntelliJ+Maven

I didn't know IntelliJ IDEA until last week, when I set up the develop environment for a project. But after using it for one week, I have to say it is an excellent tool for coding and source view.

Similar to ecllipse, IntelliJ IDEA has many plugins, such as MavenScala . But it integrates these plugins much better than ecllipse. For example, maven project can be imported and built easily as the video shows:


To debug the maven project, you need to install it firstly, which downloads the dependent libraries, compiles your project and installs it into your local maven repository. Then, you can set breakpoints in your source code, and start debug through IntelliJ's debug tool.

IntelliJ also supports source view well. Source insight is well known for viewing c and c++ code. But for java and scala, IntelliJ would be a better choice. It provides definition jumps, function list, folding etc..

Last but no least, Git is integrated as default.

I will update this page later when I learn new features of IntelliJ.