Tuesday, July 12, 2011

Install rgdal on Mac OSX

sudo R64 CMD INSTALL --configure-args='--with-gdal-config=/Library/Frameworks/GDAL.framework/unix/bin/gdal-config --with-proj-include=/Library/Frameworks/PROJ.framework/unix/include --with-proj-lib=/Library/Frameworks/PROJ.framework/unix/lib' rgdal_0.7-5.tar.gz

Thursday, July 7, 2011

Installing Maven for Flash Builder

I have been trying to get more familiar with Maven for sometime, but have not got the time to go to the details of setting it up and put it into practice with real project. Recently we had a Flex project which involves multiple modules. I think it is a good time to get a real start on Maven with Flash Builder.

The good friend of google search on Maven + Flash Builder results in some links on these. I tried to get to those that were published within the last year.

Maven is now an integrated part of the new Eclipse Indigo release, and maven can be installed with a few mouse click.


  1. go to Help --> Install New Software

  2. Select Indigo - http://download.eclipse.org/release/indigo on the Work with dropdown list

  3. type m2e in the search box

  4. check m2e - Maven Integration for Eclipse

  5. PastedGraphic-2011-07-7-15-36.jpg

  6. click Next --> Next, on the last window, accept the terms of license agreement and click Finish.

  7. The last step, Click Restart Now to apply the newly installed m2e.

  8. PastedGraphic1-2011-07-7-15-36.jpg

Thursday, June 30, 2011

VPN Failed to connect

VNP occassionally fail to connect on my mac. It seems to be a minor crash in racoon somewhere*. Manually restarting the process seems to do the trick:

mac:~ $ ps -ef | grep racoon
0 23301 1 0 0:01.01 ?? 0:01.68 /usr/sbin/racoon
501 24444 24439 0 0:00.00 ttys000 0:00.00 grep racoon

sudo kill 23301
sudo /usr/sbin/racoon

Wednesday, June 1, 2011

Install Mono on CentOS

In addition to Mono website, Mono is available also at http://ftp.novell.com/pub/mono/download-stable/RHEL_5/x86_64/.

First, create a repository description in /etc/yum.repos.d. Create file mono.repo with content

[Mono]
name=Mono Stack (RHEL_5)
type=rpm-md
baseurl=http://ftp.novell.com/pub/mono/download-stable/RHEL_5/
gpgcheck=1
gpgkey=http://ftp.novell.com/pub/mono/download-stable/RHEL_5/repodata/repomd.xml.key
enabled=1


Second, install the Mono “server” stack:
        yum clean all
        yum install monotools-addon-server

Wait for all packages installed. The binary file will be installed at /opt/novell/mono/bin.

To setup the running environment, run
        source /opt/novel/mono/bin/mono-addon-environment.sh

To verify everything is installed:
        mono --version

Saturday, May 7, 2011

Android App Architecture

This is a set of notes that I made for my own reference.

Android application does not have a main method as desktop application have. This is because Android application is invoked by the Android system whenever any part of the application is needed, and the Android will instantiates corresponding java objects. This is made possible by components based architecture.

Android application is a collection of components (activities, services, content provider, and broadcast receivers). Not all these components need to exist at the same time in the same application. But all the components share resources, e.g. databases, file systems etc.. The components communicate with each other by intents, which are described by a manifest in application package.

What is Activity and Service?

Activities are components in Android App to presents user interface, which is similar to like WinForms in .NET desktop application. A service is similar to activity but with no user interface. A service runs in the background all the time.

replicate directory structure only

To replicate a directory structure only:

find * -type d -exec mkdir [TARGETDIR]/\{\} \;

Wednesday, May 4, 2011

Air for Android

Missing functions from Air SDK
  • activating phone vibration
  • access android native contact list
  • creating android intents
  • messaging to status bar
  • enable one air app to open another
  • creating widgets
To convert desktop air app to android
  • the WindowedApplication application MXML tag needs to be changed to ViewNavigatorApplication. WindowedApplication assumes there is a NativeWindow, which is not the case on Android.
  • In the Application descriptor, the namespace must be 2.6 or later and the visible tag must be set to true.
The following desktop functionalities are not supported on Android:

ActionScript 2, ContextMenu, DatagramSocket, Dockicon, EncryptedLocalStore, HTMLoader, LocalConnection, NativeMenu, NativeWindow, PrintJob, SecureSocket, ServerSocket, StorageVolumeInfo, SystemTrayIcon, Updater, XMLSignatureValidator