Wednesday, July 04, 2007
BIRT: BIRT 2.2 has been released
Java: Sorting Dates
package dateSort;
import java.text.DateFormat;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.Iterator;
public class DateSort {
public static void main(String[] args) {
ArrayList dates = new ArrayList();
DateFormat parser = DateFormat.getDateInstance();
try {
dates.add(new Date());
dates.add(parser.parse("Jan 01, 2005"));
dates.add(parser.parse("Jan 01, 2003"));
} catch (ParseException e) {
e.printStackTrace();
}
for (Iterator i = dates.iterator(); i.hasNext();)
{
Date currentDate = (Date) i.next();
System.out.println(currentDate);
}
Collections.sort(dates);
System.out.println("After Sort:------------------");
for (Iterator i = dates.iterator(); i.hasNext();)
{
Date currentDate = (Date) i.next();
System.out.println(currentDate);
}
}
}
Phone: Hacking the Motorola Razr V3C
Much like the rest of sheep, I was almost caught up in the iPhone madness. Truth be told, it is a really cool device once you get your hands on it. It doesn’t do anything that any other mobile device doesn’t already do, its just that much more intuitive and stylish. I liked it so much, and features that I commonly need are right at my finger tips in such a user friendly way that I almost caved in. However, sanity took hold of my senses again and I reevaluated. Perhaps that spider from the MacBook did bite me and inject me with some sort of Apple loving poison. However, I withheld my impulse buying, and reassessed my mobile needs.
When I broke it down, there are only a few things I do wirelessly with my phone, such as read the news, that I would still like to do. So basic web browsing is needed. This is provided, although poorly, through my phones browser. So it would be nice to use some other browser, such as the one with my PDA or my Laptop. Second is Internet access. Often times I arrive in a city for an assignment, and I need directions, maps, and such, and the ones provided on my phone are piss poor. Having access to Yahoo or Google maps would be really nice. Also, I spend some time in airports, and I sure as hell am not going to pay what most airports are asking for Internet access. It would be nice if I could plug in my laptop to my phone and have Internet access. Make sense since my phone is Internet enabled. Plus, I would like to add custom MP3 Ringtones, just like all those slick little kiddies do with their phones nowadays.
Well, the problem was that my phone is a Motorola Razr V3C provided by Verizon, who after a little research, locks their phones down. My phone has all those features mentioned above, they are just locked out. As fortune would have it, some adventurous phone hackers have figured out how to unlock all those features that I so desire from my phone. These hacks will void the warranty on your phone, and in some cases the legality of these hacks are questionable, or are at least in that fair-use grey area.
First thing first, is I wanted to get Internet access to my phone for my laptop. This was the biggest thing since it would take care of 90 percent of my needs. After a little digging, and thanks to the good folks at HackTheRazr.com, I came across Motorola Driver Installer, which will install the Motorola USB Modem Driver, and clean the USB drivers anytime I change them, which will become important in the next few steps. Once installed, I plug my phone in, and now my phone recognizes as a USB Modem. This replaces phone charger drivers I had been using and adds additional functionality. Following the directions here, I was able to get the dial-up Internet access. This is the only part that is questionable to me in terms of legality, and I wasn’t able to find any definitive information regarding it, except that using the EVDO network was a violation of Verizons Terms of Service, and possibly a theft of service since they charge 60 bucks for their BroadBand over phone service. It seems that using the 1X hack mentioned on their page, however, is in the grey area since it is a service that Verizon provides to all Nation Wide subscribers, called NationalAccess. Its just a violation of the warranty to hack the phone.
So, I needed to setup a few tools to hack the phone to disable EVDO, and make a few other changes. This is called SEEM Editing. The Seem Edits I wanted to do are well documented on the HackTheRazr site, so I won’t duplicate them here. But the next steps I followed were to first learn about how to edit seems. Follow the steps very carefully here. Although it is not noteated in this document, when you install Phone Programmer and PST, and first plug in your phone, you will install new drivers for your phone, removing the USB Modem drivers. This is important to remember since you will not be able to use the dialer for Internet access, and you will also not be able to user certain other programs, such as BitPIM, with the PST drivers installed. In order to get that functionality back, you will need to use the Motorola Driver Installer again and select Clean and ReInstall from the options, which will revert you back to the USB Modem drivers. I suppose this is what the HackTheRazr author meant when he said we would be reinstalling drivers a lot when hacking the phone.
So, following the seem editing guide above, I enabled the Vibrate then Ring feature, which was something that my last cell phone had, that ircked me that this one did not. I also added the following other seem edits, as listed here.
-Enabled USB transfers
-Enabled MultiMedia Studio
-Enabled Dial Up Networking
-Enable File Access with QPST, or enable access to NVM (needed for enabling Dial Up Networking with my BlueTooth enabled PDA, as outlined here).
Then, with the seem edits I wanted out of the way, I followed the remaining steps in a few of the other guides. I tested out the Internet DUN via USB cable which worked great, and I tested out the DUN through Bluetooth with my PDA.
Using the BitPIM to narrow down my MP3’s and resample them, and P2kExplorer tools to install them, I was able to create my custom MP3’s for Ringtons. I was fairly exicted by this, until I ran into an issue. For some annoying reason, my MP3 ringtones wouldn’t play on my phone. The MP3’s played just fine, however when my phone ran, the tones didn’t come out. Turns out there is one extra step. In the root directory of the phone, or /a/ when browsing under P2kExplorer, there are two files that need to be deleted anytime I add a new MP3 to the phone, MyToneDB.db and TmpTneDB.db. Deleting these two files and restarting the phone gave me my MP3 ringtones.
To sum it up, my phone now gives me the mobile Internet access, the MP3 Ringtones, and has added new life to both the phone itself and my PDA, which has pretty much been discarded to the confines of my briefcase to never see the light of day until now. Why Verizon would not enable these features is beyond me. While not nearly as stylish as the iPhone, I now have all the mobile capabilities that I required, and got to get a little hands on to get them, so it has a little more meaning to me now. I can use the Internet for email while waiting in airports, I can use my PDA to pull up maps when I arrive places using my PDA without having to power my laptop up, and its available through BlueTooth, so I don’t need to plug in any wires or anything. With the addition of Opera Mobile to my PDA, the browser is actually usable and viewable. And I don’t need to pay out 500+ dollars to get an iPhone, face the service cancellation fees that Verizon would charge if I switched to AT&T, not to mention not having to put up with AT&T’s horrible service (5 year contract is a little steep, especially after reading some of the horror stories from the AT&T side of the iPhone launch). If Apple decided to expand their carrier base and add Verizon to the mix, I’ll seriously consider making that my next phone. In the meantime, I get the slight raised emotion of knowing I did something a little underhanded to get my phone the way it is, which satisfies the inner rebellious teenager that I refuse to let go of some 9 years after leaving my teens.