Monday, March 25, 2013

IntelliJ Tip - Imports Code Styles

One of the coding standards I follow is that all imports must be fully qualified. Out of the box, IntelliJ 12 has is configured so that if I import more than 3 classes from a package then those imports are collapse into one import ending in '*'.

To fix this do :

In IDE, click the wrench icon on top toolbar.
Then pick Code Style / Java and then 'Imports' tab

Set "Class count to use import with '*': to '999'.

Sunday, June 26, 2011

I've added a QR Code to the Blog

I read on Hacker News about someone's project, lilqr, for adding QR code to a website. It seems to work pretty good. I easily added the QR code by using blogger's "HTML/Javascript" widget. You just add the following tag, <img src="http://lilqr.com/qr">. I have my blog configured to render itself as a mobile site when viewed on a mobile device. Its a pretty handy way to switch to a mobile device while reading the blog on a desktop/laptop computer. I know that there are other tools for doing this, but I figured I'd give someone's new solution a try.

QR codes can also come in handy for publishing offline announcements or advertising. Perhaps I'll take advantage of this and tell people about my blog using flyers around town.

On Twitter, @TroyJMorris and @knakao have been going back and forth lately about the topic of QR codes. I do not see an easy way to link to the back and forth tweets. Maybe thats a what uniquely named hash tags are for. Dont'w know if QR codes are so geeky that they'll likely take off into the main stream, but its a decent try especially with the way smart phones and other portable devices are becoming ubiquitous.

Both android and iPhone have good apps for scanning QR codes and taking an appropriate action. Got the iPhone, I have started using an app named, Scan.



Thursday, January 6, 2011

To Solve iPhone error, "Could not activate cellular data network At&t"

Go to http://www.unlockit.co.nz from your iPhone.


Easy as pie. For AT&T in the U.S., the carrier choice is far down in the list displayed as "US - AT&T". You need to select the "Create Profile" menu item in order to modify your phone's APN so it points to the proper carrier.

Saturday, August 21, 2010

A couple of useful Mac OS commands

open .

This opens the current directory in a new Finder window.

open -a Preview *.jpg

This opens a new Preview window with all files in current directory ending in 'jpg'.



Thursday, August 5, 2010

Experimenting with google command line utilties

It is really quite nice to be able to perform google services actions from the command line. I've often, in the past, wanted to control one GUI based app or another via a command line. It never was a high enough priority to implement that sort of thing though. I can see this being useful when I want to quickly blog about some new bugget of information I run into. Now I need to find this sort of thing for twitter.

I first posted this message using the google command line tool. I've gone back and fixed a typo plus added a link back to the Google Blog entry which introduces these tools.

Sunday, July 18, 2010

Mac OS X Network Utilities

I ran the "Network Utilities" tool found in my Mac's "Utilities" folder. The "Sent Packets" and "Rcvd" packets are counted since the last system boot.

The way to see the time since last boot is to enter "uptime" in a terminal window.

My uptime as of writing this post is 10 days.

Thursday, June 10, 2010

How to deal with an Android emulator not seen by DDMS or ADB

Sometimes DDMS will not detect that I have the android emulator running. I have found that to solve this problem, I need to restart the emulator with "-wipe-data" parameter. This launches the emulated device with default settings.

"adb -devices" was also failing to show the emulated device.

When you do not specify '-wipe-data', the state of the emulated device is the same as it was last time the emulator was running.