Wednesday, 15 September 2010

iPad Validating eBook Readers

According to WSJ, iPads are not killing the sales of eBook readers. In fact, they seem to be accelerating their sales. This makes sense to me. First, the iPad and future tablets are driving down the prices of the readers. In addition, Kindle for the iPad validates the usefulness of having all your books in electronic form.

Tuesday, 14 September 2010

The Death of RSS and Web Greatly Exaggerated

It seems that with the shutdown of the Bloglines web site, some folks think this spells the end of RSS. And Wired Magazine thinks the Web is dead.  The rise of Skype, Facebook, and RSS are gonna kill it. It seems rumors of demise are everywhere and are also greatly exaggerated.



Yes, iPhone applications, Twitter and Facebook are on the rise. The last two sites are firmly based on Web technology and both offer RSS feeds to tracking account information. Frankly, an RSS feed for a few select Twitter accounts provides a much better way to read the site than trying to watch the fire hose that is your twitter feed. And most of those mobile phone applications are simply custom web applications, nothing more.



Now if you are talking about using your browser on a desktop computer to surf, I think that is on the way down. More and more surfing, buying, you name it on the web, is gonna be done on laptops, netbooks, tablets, and phones. All these smaller devices are gonna have browsers and browsing capabilities much more powerful than desktops have today.



The Web and RSS are not gonna die. But the way we use these technologies is changing fast.



A Real Linux/Unix Terminal for Windows with Cygwin

Linux LogoIf you have not heard of it before, Cygwin is a set of Linux/Unix utilities made to run on Windows. Cygwin includes a plethora of tools including databases, programming languages, and command line utilities. But what I use it for mostly is to have a bash shell for Windows. That allows me to use most of the aliases, symbolic links, and other tricks I use to navigate Linux or Mac OS/X on Windows. It also makes file manipulation a lot easier.



The default Cygwin installation uses the same command window as the Windows command prompt. Which is a little clunky, to say the least. Specifically, cutting and pasting text is a pain in the rear. You have to jump back and forth to the menu to cut and paste text. It is slow, clunky, and annoying.



The solution. Install rxvt with Cygwin. This is a terminal emulator that gives you all those cool cut and paste shell features on Windows. Just install rxvt from the shell options as part of your Cygwin install. Then, create a batch file like this in your Cygwin directory.



@echo off

C:

chdir \cygwin\bin

start rxvt -sr -sl 10000 -fg white -bg black -fn Consolas-20 -fb Consolas-20 -fm Consolas-20 -tn cygwin -e /bin/bash --login -i






I called my file, term.bat. Run the bat file and you get a bash shell and window that behaves just like it would on Linux or a Mac. Yays!



Credit to c2.com for a pointer that got me started on this.

Monday, 13 September 2010

javax.naming.NamingException: Lookup failed for 'jdbc/dbname' in SerialContext

Duke WavingWhile trying to deploy a Java EE6 Web application with NetBeans and Glassfish V3, the application deployment fails with the following error.



SEVERE: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method java.lang.RuntimeException: javax.naming.NamingException: Lookup failed for 'jdbc/dbname' in SerialContext [Root exception is javax.naming.NameNotFoundException: dbname not found]


What does this mean? Basically, you have not defined the JDBC resource in the Web Application. In my case, neither the Database Connection Pool nor the JDBC resource had been defined. Once the persistence resources are defined, the application should deploy without any errors.



When first analyzing the problem, I thought, incorrectly, that since the persistence resources were defined in an included library, no definition was required in the Web application. This is not the case.



Update

A reader made a fair point that no pointers on how to create the JDBC resource or Connection Pool are included in this post. Here are the steps assuming you already have a Java EE project created. Right click your project and select the following menu options.

  • Connection Pool New -> Other -> Glassfish -> JDBC Connection Pool

  • JDBC Resource New -> Other -> Glassfish -> JDBC Resource

The wizard for each will walk you through the setup. Hope that helps.

Sunday, 12 September 2010

Tablet Support Android a Ways Off

Google LogoAccording to this Mashable story, tablet support for Android is still a ways out. Real support will have to wait until Android v3.



I'm kind of surprised that Google is this far behind. Expect Apple to up the ante with an iPad 2 in the spring.

Thursday, 9 September 2010

How to set battery status of Android Emulator using the Emulator Console

In last two exercise "Detect Battery Level" and "Detect Battery Info", the apps about battery checking have been built. We have to set the battery status on Android Emulator to check our apps. To change the battery status on Android Emulator, Emulator Console can be used.

To connect to the console of any running emulator instance at any time, use this command:

telnet localhost <console-port>

Where <console-port> is the number shown on your emulator.

Details of the usage, refer to the section Using the Emulator Console of the document Android Emulator.

Wednesday, 8 September 2010

TinyUmbrella with 4.1 Support





UPDATE: It appears Apple is not signing 4.0.2 SHSH requests anymore. As a result I've updated TinyUmbrella to 4.1.4 which will default to grab the 4.1 SHSH for iDevices (3.2.2 for iPads).




I put my money where my mouth is. I tested my code on my own iPhone 4 and was able to update to 4.1 without touching my baseband.

The only doctoring I did was removing my private info. The newest version of TinyUmbrella will have an added side-benefit of allowing you to update to 4.1 without the fear of baseband update. Of course, in order to downgrade back to 4.0.x you need to have your SHSH saved on Cydia or locally. Have fun :)





I've also seen a TON of questions about how to update from 4.0.x to 4.1 WITHOUT updating your baseband. I'll give you a quick rundown of how to do it.



  • Get the latest TinyUmbrella (4.1.3)

  • READ THE README TinyUmbrella README NOW Yes. You Read it.

  • Run TinyUmbrella.

  • Start TSS Server

  • Open iTunes

  • Restore 4.1 (NOT UPDATE) Yes this requires you to download 4.1 Here

  • Let iTunes error with 1004 error (baseband update failed - we want this :) )

  • Kick Device Out of Recovery

  • \o/ -- You are now on 4.1 with 1.59.00 baseband!

Also, here is another good tutorial with more details.



I have heard a few folks voice concerns about how they can downgrade their 2.x baseband to 1.59.00 on iPhone4. Here are the basic steps:



  • Close TinyUmbrella (if open)

  • Close iTunes (if open)

  • Remove ALL lines in your hosts file that contain gs.apple.com

  • Windows: Start -> cmd -> ipconfig /flushdns

  • Mac: Terminal -> dscacheutil -flushcache

  • Start iTunes

  • Restore (NOT UPDATE) Stock 4.0.2 iPhone 4 - 4.0.2 Download

Note that this will only work while Apple is signing 4.0.2 SHSH requests. This is due to the way Apple now updates/restores Baseband Firmware for the iPhone 4 different from the way it did to prior devices. Lucky us...