Archive for February, 2008
Standby … who needs it?
Posted by david | Filed under Tivo-nation
Last November we got a new Tivo HD … and one of my gripes about the new unit was it’s lack of a standby button.
Since we pipe the audio output of the Tivo through our stereo tuner, shutting off the TV didn’t stop the sound from coming out of the stereo. The solution was to put the Tivo into standby. Our Series 2 Tivo had a nice little Standby button that did that right quick. The new Tivo HD replaced the Standby button with a button to change the video aspect ratio. Nice if you actually have a HD TV (which we don’t, yet) but not so handy if you have a standard TV.
Well, after googling around a bit I finally found a perfect solution on TivoCommunity.
Just multi-task the power button.
To do this, hold down the “Tivo” and Power buttons until the LED stays lit, then enter the same code you used when programming the remote for volume. Now, when you push the power button on the Tivo remote, it shuts both the TV and the stereo off.
Works perfectly.
Unsprung Spring
Posted by david | Filed under Home
Once again the joys of home ownership are manifest … this morning, as Ginny was leaving for church, she found that the garage door wouldn’t open. It would come up part of the way, then stop. I got dressed and went out to look at it and determined that something was clearly broken. I was able to get the door up by pushing it as the opener was pulling it up.
After Ginny got on her way I started looking at the door in more detail … I noticed that the rail that the garage door opener used was flexing as the door was opening. I disconnected the door from the openers chain and noticed that the door was VERY heavy. Then I noticed the spring was broken.
Every now and then I’m able to get mechanical things repaired … if I put my mind to it … but I know that the garage door spring was something that I could not handle myself.
I did a bit of research and found a guy who would replace both springs for $170 … and he’ll do it today (Sunday). I figured better not look a gift horse in the mouth, and got it scheduled.
Hopefully it will just be the spring and it will be taken care of quickly.
The guy got here at noon and was gone 45 minutes later. Two new springs now hold the garage door up. I can highly recommend Priceless Garage Doors in Crystal Lake.
Finding the name of a Java object
Posted by david | Filed under Java, Technical Tidbits
I just discovered a technique that’s quite handy … at work I’m writing some java code that uses a lot of generic methods. The problem is, it’s quite difficult to figure out what actual field name in the java code is being referenced by the code (it’s being triggered by one or more events).
After digging around a bit, I created a little routine that will return the NAME of the field that a particular object represents.
private String getFieldName(Object o) { String name = "unknown"; Field[] fields = getClass().getDeclaredFields(); try { for (int i=0;i<fields.length;i++) { Field f = fields[i]; Object v = f.get(this); if (o == v) { name = f.getName(); break; } } } catch (Exception e) { name = e.getMessage(); } return name; }
Obviously I’m not sure this will work in 100% of the time, but it seems to work for me now.
One thing to note, however, the routine MUST be in the consuming class … it can’t be in a super class, as the f.get(this) call will result in a IllegalAccessException.