Skip to main content

Posts

Set up MS SQL 2008 Express with Seam

1. Download MS SQL 2008 Express from http://www.microsoft.com/express/sql/download/ 2. Install MS SQL 2008 Express 3. SQL Server Configuration Manager => Set IPAll => TCP port = 1433 4. SQL Server Management Studio => set security to mixed mode authentication => restart SQL Server http://www.hostmysite.com/support/vps/windows/mixedmode/ 5. Create login as you need 6. Use sqljdbc.jar as MS SQL JDBC Connection Driver <= It doesn't work 7. Go to Data Source Explorer 8. Create New data source -> choose SQL Server -> Choose driver Microsoft SQL Server 2000 Driver for JDBC 9. Jar list required msbase.jar, mssqlserver.jar, msutil,jar 10. Test connection 11. Create Seam web project -> choose data source which we just created

Android: forward port

Write socket application listen at port 5000 to allow this port on your machine, you have to forward port At server adb forward tcp:5000 tcp:5000 MAC OS X: use Authoxy 3.4 http://www.brothersoft.com/authoxy-download-196371.html and allow other computer to connect WindowXP : use stcppipe.exe -b 127.0.0.1 5000 5000 Ubuntu: aproxy from http://www.dilledabb.de/projects/aproxy/aproxy-current.tar.gz 1. sudo make install 2. make aproxy folder in "LIBDIR=/usr/local/lib/aproxy" 3. create file .aproxyrc and .aproxyrules as explained in readme In .aproxyrules add the following line $R{5001} = [ "localhost" , 5000 ]; Note: *R is a alias for *Proxy::Config::ForwardRules. You can also write $Proxy::Config::ForwardRules{5001} = [ "localhost" ,5000 ] ; The above line means the following: * setup a listening socket on port 5001 on the local machine. * when a client connects to port 5001 the connection will be forwarded to localhost port 5000. 4. Run ./aproxy.pl .apro

Upgrade Android to 1.5

http://developer.android.com/sdk/1.5_r1/upgrading.html Download Android SDK 1.5 Point SDK Location to this 1.5 Change .bash_profile Do Software update -> uninstall the previous ADT 0.8 and install new ADT 0.9 Go to tools folder - ./android list targets - ./android create avd --name Rss --target 2 When u need run program. point the target to the ADT that you just created

Android: RSS feed

Problem of SAXParser CNN RSS (copyright) Problem : It cannot read special character (c) in copyright tag Solution : use tagsoup instead import org.ccil.cowan.tagsoup.Parser; /*SAXParserFactory spf = SAXParserFactory.newInstance(); SAXParser sp = spf.newSAXParser(); XMLReader xr = sp.getXMLReader(); RSSHandler myHandler = new RSSHandler(id); xr.setContentHandler(myHandler); xr.parse(new InputSource(url.openStream())); rssfeed = myHandler.getrssfeed(0); */ XMLReader xr = new Parser(); RSSHandler myHandler = new RSSHandler(id); xr.setContentHandler(myHandler); xr.parse(new InputSource(url.openStream())); rssfeed = myHandler.getrssfeed(0);

Android: make vnc work and building zImage

Download android kernel from http://code.google.com/p/android/downloads/detail?name=linux-2.6.25-android-1.0_r1.tar.gz&can=2&q= Extract to /kernel.git Edit file following linux-2.6.23-android-m3-rc20-kbde.patch which can download from http://code.google.com/p/android-vnc/source/checkout Note: modified a few files such as /kernel.git/Makefile, /kernel.git/drivers/input/keyboard/Makefile, /kernel.git/drivers/input/keyboard/Kconfig, /kernel.git/drivers/input/keyboard/kbde.c Get config file from your working phone/emulator $adb pull /proc/config.gz . $gunzip config.gz $mv config .config Put .config file into /kernel.git/ Put it in android environment which can compile e.g. /mydroid/kernel.git Building zImag e ******************************* Go into kernel directory $ cd ~/mydroid/kernel.git/ #don't need to this coz we already have .config => $ make msm_defconfig ARCH=arm $ make ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi- Run vnc *