I have been working with XML parsing recently using the StAX (why use StAX?). However, I ran into an issue with the & (ampersand) since it is a reserved character in xml and needs to be escaped. But when the & was escaped the parser would fire multiple events, 1) text before the &, 2) the &, 3) text after the &. This was a bit hard to integrate with, so instead of putting a & in the xml file I just replaced it with a different character and did a search and replace once the data was parsed. This strategy saved me quite a bit of work.
Posted 1 year, 2 months ago at 3:36 pm. Add a comment
As shown here
Just to sumarize, there is a netbeans.conf file that needs to be modified. You can Ctrl-Click on the netbean app file to access the directory behind it from Finder. Also, I just set it to the current JDK as follows:
netbeans_jdkhome=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
so that it always uses the most recent JDK.
Posted 1 year, 3 months ago at 12:50 pm. Add a comment
I tried to update JAVA on MacOS X by using the /Application/Utilities/Java/Java Preferences.app. It seemed to work, but if you want it to work for root, then you need to run the application as root. you can do it on the command line as follows:
root# ./Applications/Utilities/Java/Java Preferences.app/Contents/MacOS/Java Preferences
I’m not sure if it was necssary but I also modified the symlinks also to point to 1.6 instead of 1.5.
ln -s /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK 1.6
you can delete the original symlink if necessary. As a word of warning, I have read that changing symlinks isn’t recommended by apple.
Posted 1 year, 3 months ago at 12:24 pm. Add a comment
The MovieTix application uses a native Android client application which accesses RESTful web services exposed on the internet via HTTP. The architecture that we used was based on the standard 3-tier model. The client tier is represented by the native Android mobile application. The web tier uses the Mongrel application server, which uses the Ruby on Rails framework. Lastly the database tier uses MySQL. The data is passed between client and server by using XML representations of the data as rendered by the Rails controllers. Once the client receives the data SAX is used to parse the data instead of DOM so that we don’t need to load the entire XML object into memory.
Partners: David Kuo, Ryan Zhou
Posted 1 year, 3 months ago at 7:22 pm. Add a comment
<uses-permission android:name=”android.permission.INTERNET” />
add this to the bottom of the manifest file right before
Someone said the new sdk requires permission for network calls.
Posted 1 year, 4 months ago at 12:22 am. Add a comment
There’s a simple trick I used to point a www.SomebodysDomain.com to my local machine since I’m doing development. He had hardcoded his domain name into his application which causes problems for when you don’t want to test on the production server.
I just edited my hosts file and added the line in /etc/hosts (OSX)
127.0.0.1 www.SomebodysDomain.com
Posted 1 year, 4 months ago at 12:18 am. Add a comment
Creating my first android application today. First challenge, “Application … has stopped unexpectedly.” After trying to create a new intent to open a new window. Put a try/catch around it and found out that it wasn’t printing exceptions to the console. And the cause of the exception was that the Activity that my Intent was trying to start was not found. Why wasn’t it found? Turns out it wasn’t listed in the manifest file. Added, worked… done. Using Eclipse for this project seemed a bit harder than using the compact framework on Visual Studio 2008 where a lot of programming help is given by the IDE.
Posted 1 year, 5 months ago at 12:26 am. Add a comment