Wednesday, September 28, 2005

Tidbit

The @ symbol has to be used in the xpath query if you need to access an attribute field of an element.


Eg. < employee id="19090" >
< name/ >
< age/ >
< /employee >

the xpath to select the 'id' in an XSLT wud be '< xsl:value-of select="/employee/@id/text()" > '

Saturday, August 06, 2005

QD software

There are many software availble in the internet (for free) for the Symbian OS. This is one good site where you can download lots of stuff http://mobango.com/.

This is a list of software thats got to be really useful for the QD

1. Ultramp3 mp3 player - Unlike the N-Gage the QD doesn't have a preinstalled mp3 player. ( as i mentioned the realone player in the CD didnt detect the mp3s in my MMC.)

2. Patch to store messages in MMC - If you are using your Blutooth dongle to transfer files between your PC and fone, you will need this software to move your message inbox to the MMC (so that you can transfer files greater than 4MB - fone memory).

3. File explorer - fexplorer111 . This software enables you to explore through the various drives in your fone like you do with the windows explorer. This can be real useful to move files from one drive to another and to delete unwanted files.

The rest are just stuff-for-fun and ARE real fun actually.

Another Tip :

How to change the wallpaper on the QD.

go to Settings->Device settings-> Standby mode->Wallpaper-> select yes here and select wallpaper from either from device memory or MMC.

Friday, August 05, 2005

The N-GAGE QD - tips n tricks

The QD



Things u need to get (apart from the fone):

1.MMC Card- The fone comes with a device memory of just 4mb, so you might ( else u gonna say the fone sucks) want to get an MMC card (a techie name for a flash memory card). These cards are available in capacities from 128 MB to 1 GB.
*** This is one important point i wanted to discuss about. I was a bit jittery( or maybe the card didnt fit properly - please verify this ) when i tried to push my 1 GB MMC card (Manufacturer NCP) through the slot, and it got stuck !! I cudnt pull the card back :( .. I had to rush to a service guy who pulled it out with a foreceps and told me that i had broken the lock :( ... Implying, evrytime i need to pull my card out i have to use a foreceps ( of course i will repair the lock) , so guys be careful while inserting your card. The usual procedure is - when u press your card once it gets locked and when you do it again it jumps out like in Digital cameras.

2.A Card reader- This USB device is a must if u need to transfer files(mp3s,sis files,jpegs) from your PC to the QD. This is usually a multipurpose device and can read from many types of cards ( even from cameras).

Things u need not get:

1.The Bluetooth Dongle : U need not get a bluetooth dongle if you got a card reader.you can transfer all kinds of files using your card reader.( but since my card was stuck i got a bluetooth 'dongle' - wat a weird name)

Tip:

And the real one player provided by nokia ( on CD - you got to install it yourself) didnt recognize my mp3s on the card , so i removed it and installed ultramp3 and it works fine.

Tuesday, August 02, 2005

JAXB and Castor ( no Pollux :( here )

JAXB and Castor are APIs that facilitate reading XML documents and mapping the content into java objects.

JAXB procedure


A schema definition document (.xsd) has to be made, which when ‘bind’ed to the API will create the java objects that need to be filled with the contents of the XML file.

It’s NOT possible to create your own classes, however you can modify the classes that the API generates by specifying options during binding.

Castor procedure


The java objects that need to be filled with the contents of the XML file, can be created by the user (this gives a lot flexibility when compared to JAXB), or they can be generated by the Sourcegenerator JAR.

The main difference is that this method does not need an XML schema definition. But we will need a mapping document for that purpose. The mapping document can also be generated using tools like org.exolab.castor.tools.MappingTool or 3rd party tools.

Monday, July 25, 2005

Uploading a large XML file into an XMLType column

The XML File is read as a string and is loaded into the XMLType column. The setString() statement was used to load the string (XMLType data) into the SQL prepared statement. As the string that had to be loaded was large (bigger than 4kb accepted by setString()) the statement was in error.

However there was a procedure suggested by ORACLE, where the setObject() is used instead of setString(). In which case, a CLOB is pushed into the prepared statement.
1. The getCLOB() method writes the contents of the string into a CLOB using ‘write’ method of the ‘Writer’ class and returns the CLOB.

Code Snippet:

CLOB tempClob = null;
// Open the CLOB in readwrite mode to enable writing
tempClob.open(CLOB.MODE_READWRITE);

// Get the output stream to write
Writer tempClobWriter = tempClob.getCharacterOutputStream();

// Write the data into the temporary CLOB
tempClobWriter.write(xmlData);

// Flush and close the stream
tempClobWriter.flush();
tempClobWriter.close();


2. The CLOB is then loaded into the prepared statement using setObject().

Code Snippet:

PreparedStatement insertsql = Con.prepareStatement(

"INSERT INTO PO_XML_TAB2 VALUES(200,

XMLType(?))");

insertsql.setObject(1, clob);


References

Friday, June 24, 2005

Le Roi est mort; Vive le Roi

I found maintaining a site that looked like absolutely junk html pages stolen from some old tutorial websites, was real tiresome. While recollecting the purpose that i had actually built the site for, i found it little different from the way a weblog functions. So i've switched sides... and if you want to have a look @ my old yucky site follow the link that says My Site.