Jul 28, 2011

printf Cheat Sheet

Duke WavingFound a really good printf cheat sheet:

printf cheat sheet


Read a Text File Using JDK7

Duke WavingHere is a really simple example of how to read a text file using JDK7. The main new feature you will see is the try with resources block on line 10. The program just numbers the lines of a text files up to 9999 lines long.

LineNumber.java
   1 import java.io.BufferedReader;
   2 import java.io.FileNotFoundException;
   3 import java.io.FileReader;
   4 import java.io.IOException;
   5 
   6 public class LineNumber {
   7     public static void main(String[] args){
   8         String fileName = args[0];
   9     
  10         try(BufferedReader reader = new BufferedReader(new FileReader(fileName))){
  11             String line = ""; int c = 1;
  12             while((line = reader.readLine()) != null){
  13                 System.out.printf("%4d %s\n", c, line);
  14                 c++;
  15             }
  16             
  17         } catch (FileNotFoundException e) {
  18             e.printStackTrace();
  19         } catch (IOException e){
  20             e.printStackTrace();
  21         }
  22     }    
  23 }

Text Version of the Source Code

Jul 27, 2011

10 Google Plus Tips

Mashable has this story with 10 Google+ tips. Lots of great ideas. For example, use empty circles to save notes or links. Also lots of information on how to control who sees what with posts. A must read for any G+ user.

Jul 26, 2011

Launch Options for Windows 7 Taskbar

Microsoft Logo
If you are a Windows 7 power user, there are a lot of times you need to run an application as administrator. Or perform some other function other than launching app. Typically this is done by right clicking an app icon. However, apps on the Windows 7 Taskbar can only be unpinned from the bar when right clicked. Or so I thought...

Turns out if you shift right click an app on the Taskbar, you get the application pop up menu allowing you to perform special operations like "Run as Administrator". A time saver, much better than hunting for the app from the application menu.

Jul 22, 2011

Symbolic Links with Windows 7

Microsoft Logo
Did you know that Windows Vista and 7 support symbolic links? What are symbolic links you ask? Essentially it is a alias for a directory or file. Symbolic links have been a feature of Unix based operating systems for many years. For example, let's say I have a directory named: "C:\really\long\directory\name".

So I don't want to type that over and over again, instead I can make a sym link named "C:\rldir" and doing a "cd rldir" moves into a directory that is an alias for the real directory.

The How To Geek Has the Details: Using Symlinks with Windows Vista

Jul 21, 2011

Kicking and Taking

My new favorite add of all time. Literally kicking b*!# and taking names. lol. :)

Cult of Mac has detailed the steps to create an install DVD once you have you downloaded OS X Lion.

How to Make a Mac OS X Lion Bootable Install

If you can wait until August, Apple Stores will be selling the Lion on thumb drives for $69. Not sure which route I'll go but with as busy as I am now, it will be a few months before I try an install.

Jul 19, 2011

With Windows 8, Laptops get Faster and Cheaper

Microsoft Logo
According to CNET, expect a number of ARM processor based Windows 8 laptops in the next couple of years. But as the article points out, Intel is also working on high performance low power chips for the mobile market. What does this mean? Good things for us geeks. Competition should give us a lot of really awesome inexpensive laptops.

Who knows? Maybe Macbook Air type laptops will be common place and really cheap. :)

Jul 15, 2011

Free JavaScript Patterns Book

Webkit icon
ReadWriteWeb has found a free patterns book. Covers some GOF patterns and other stuff. Since it uses JavaScript, anyone with a browser should be able to play around with the code. And the price is right. :)

Sony wants to be a Tablet Playa


The folks over at Technologizer have a nice write up on new Android tablets coming from Sony. The designs are a little bit more radical than what we have seen before. They look really nice, wonder what the price is gonna be.

Jul 13, 2011

How to: Make a Google+ Desktop App - Mashable

Christina Warren at Mashable has some great ideas on how to launch Google Plus from your desktop and make it pretty much act like a normal application.

HOW TO: Make a Google+ Desktop App

This could be applied to other web sites and web applications. Good stuff.

Jul 11, 2011

Evernote Feedback - Need Sync Indicators

Internet IconI couldn't find any easy way to give the Evernote folks some feedback so I will try here. I need to write a longer post as more of a review having used it for a month now, but that can wait.

Evernote User Interface Request
Please provide a simple visual indicator that tells me.
(1) I have synced and am up to date.
(2) I need to sync
(3) Evernote can't connect to the sync server currently.

The real problem right now is my new iMac is so fast, I can't see if I have synced or not. The status text disappears too fast. (Okay, I'm bragging a little bit now. :) How about a Green icon when all synced up. Yellow when I need to sync. Red when sync isn't available? Thanks for your attention.

Jul 9, 2011

Yours Truly is now on Google Plus

Google LogoIt is true. I am indeed on Google Plus thanks to World of Warcraft friend Yvonne.

First impressions. This is what Facebook should be. Much easier to manage and categorize your friends using circles. And everything is not public! Plus a much cleaner and clutter free interface.

If you want an invite, send me your GMail email address and I will try to get an invite to you. The invite link is not always available. Not sure if they only turn it on at certain times? Or if I have a daily or weekly quota? Anyway, I will do my best to get you added if you are interested.

MikeW

Jul 8, 2011

Engadget Editors/Writers Moving to "This is My Next"

Webkit icon
AllThings D has the write up on the exodus of Engadget writers to a new venture. This is my Next is a placeholder for a yet unnamed new gadget blog. I heard Josh on Twit a couple of times and it sounds like they want to focus more on quality and less on quantity. Who has time to read 50 posts a day? Heck who has time to read 30 a day from one site? So I whole-heartedly agree with this new move.

As is typical, when some organizations get really big they lose their focus on what is important. Once your readers become cash cows, you are headed for trouble.

Jul 7, 2011

JDK 7 Launch Going on Right Now

Duke WavingWant to see the JDK 7 launch event? It is going on live right now. More information can be found here. I am not sure if there are still login slots available, but you can always check it out if interested.

Mac OS X Proxy Settings Do Not Work

Problem: You have just turned on proxy support for Mac OS X. However, even though your proxy settings are correct, Safari and Chrome cannot connect to any web site. In addition, no proxy settings work, Auto Proxy Discovery, Automatic Proxy Configuration, and Web Proxy (HTTP). The settings are correct, but the browser cannot connect.

When this happened to me, Firefox and SeaMonkey worked just fine. Bizarre and frustrating.

Solution: Reboot you system. Yep, that's it.

In my particular case, as soon as I rebooted with Auto Proxy Discovery checked, everything on my system began to work fine. I hope this post helps save the time of other poor soul who runs into this. lol. No idea why the reboot is required.

Jul 5, 2011

Nook Touch Loses Charge or Discharges Quickly

Is your brand new Nook Touch lasting 4 days instead of 2 months? The Nook Touch can't hold a charge? This is the problem I ran into days after getting this wonderful new e-reader.

Solution:
This appears to be a software problem. To "fix" the battery try the following.

(1) Turn your Nook all the way off. Hold the On/Off button for like 5 seconds. A popup will appear asking if you wish to turn off the device. Confirm this and let the machine go off. Wait a minute or so. Hold the On/Off button for about 5 seconds to get the device to turn on.

According to the Nook forums, this has solved the problem for a number for people. However I had to do a little more.

(2) Let your Nook battery run all the way down. The Nook will display a message stating that you must plug in your Nook if you wish to turn it on. I was unable (or too impatient) to drain the device any further. I then plugged the device in for 4.5 hours. Then I did step (1) above.

The 2nd set of steps was given to me by Nook tech support. It worked for me. If neither of these methods works for you, please call Barnes and Noble Tech Support.