Skip to main content

Posts

Getting the phone number of your SIM card

If you need to know the phone number of a Sun Cellular SIM card, dial *99# from your phone and it will respond with the phone number. Thanks to suncelltweets for replying. The phone number can be stored in the SIM card and some phones are able to display that. For Globe on a Blackberry, it displayed Unknown number when you press the green phone key. I also tried this on Smart but it did not work. This seems like an operator specific feature and Sun has been able to provide that.

Android 2.1 Eclair on HTC Magic

Finally. I made the leap from official Android 1.5 with HTC Sense to a rooted 2.1 Eclair. The rumors said HTC was going to release an update in March, then May, then June and now September. I had enough of the waiting. Apps (Twitter, NY Times) that run only in 2.0+ were being released and I felt left out. Now, which ROM should I choose? The net pointed to Cyanogen as the most respected Android developer. I then started to read and reread the instructions on Cyanogen's wiki . You'll be asked to download a total of 9 files. I had done the Gold Card method before so I didn't need to do it again. The rooting and upgrade to 5.0.7 took a lot less time than expected. Everything went smoothly and I was able to boot into Eclair after about an hour of work. Everything was faster and more responsive than before. The look and feel was actually very nice. There were some things I missed like the Sense Gallery, the built-in Facebook-Contacts integration, the Sense calendar widget, th...

My Android Apps

After more than a month of installing and uninstalling apps in my HTC Magic, I have the following recommendations. This doesn't include the native apps (People, Browser, Camera, etc.) Most Used NewsRob - syncs to Google Reader, for my daily news Aldiko - reading ebooks, in ePub format, used together with Calibre (desktop application) Seesmic - twitter client, better than Peep because it shows more tweets on the screen Facebook - you know this 3banana - used for storing notes that syncs with a web client Astrid gStrings Sometimes Used Google Maps Barcode Scanner - for checking barcode quality KeePassDroid - password keeper Evernote - this would have been most used if it had offline capability Foursquare - still testing this out, also on my blackberry GPS Status Abduction ActionPotato Robo Defense Advanced Task Killer Free Rarely Used Astro Google Translate Google Sky Map Gem Miner Frozen Bubble Fring CadreBible Graviturn Handcent SMS handyCalc Jewels ...

HTC Magic ROM Upgrade

I got the black HTC Magic from Smart last December. It came with the stock android 1.5 OS when it came out of the box with no Google integration and Android Market. I am pretty sure the average phone user will be turned off from what they see. There are absolutely no interesting applications included. I wouldn't be surprised why this was one of the slowest selling models in Smart. They started offering this unit for P3500 in Plan 3500. I believe it is now free under Plan 1800. Fortunately, an HTC Sense ROM upgrade was available at that time. The ROM was posted in the HTC website on November 10. Make sure you apply the Singapore/Philippines ROM and not the Malaysia/Indonesia/Vietnam one as that one does not have Market. My unit was apparently registered as a Malaysia model and I couldn’t download the Singapore/Philippines ROM. Communicating with HTC and Smart was not at all helpful and gave me canned responses. I couldn't download the Singapore/Philippines ROM ( update Dec ...

MySQL 5.1 goes GA

I was quite surprised when I browsed dev.mysql.com and found that 5.1 was already on GA. There was no mention of this in the mysql.com site. It seems that they're holding off on the announcement until all the mirrors have it because some of the Asian mirrors still do not have it. Most of the US mirrors though have it. We'll be transitioning to this release to take advantage of partitioning.

iReport Default Date Parameter

If you want to set a default date for a jasperreports parameter, you can enter the following in the default value expression of the parameter. new Date() However, if you wanted the default to be relative from today, for example, 3 days ago, you will need to do go outside of the standard java date libraries (Date, Calendar) because JR parameter does not allow you to have multiple statements. You can write your own utility package or you can use Joda , a replacement library for the JDK date and time library. To use Joda in iReports, you need to extract the jar file and add it to Options -> Classpath. You may also drop the jar file in iReports' lib directory. You will also need to add this library to your application or report server. For setting a default date 5 days prior from today, use this: new org.joda.time.DateTime().minusDays(5).toDate() or this if you want the time part set to the beginning of the day: new org.joda.time.LocalDate().toDateTimeAtStartOfDay().minusDays(5).to...

selective table restore from mysqldump

I recently had to restore a corrupted table that had resulted from a full disk. I had been using automysqlbackup as my backup script. Each database had a corresponding backup file. It would have been easy to use a text editor to edit out the tables that you didn't want to restore but this database had grown to 1G. STEP 1: Restore table structure If the table structure is corrupted, you need to retrieve the CREATE TABLE statements from the backup. To do this you can use grep: zcat backup.sql.gz | grep -A 20 'CREATE TABLE `tablename1`' > tablestructure.sql This command will create tablestructure.sql containing the CREATE TABLE statement and 20 lines after that. You may have to change the parameter from 20 to whatever to get the entire statement. Once tablestructure.sql had been edited to only contain the proper CREATE TABLE statement, you may now restore the table structure. mysql -u user -p dbname STEP 2: Extract and restore the table data This command will create a sql ...