I can never find this when I need it, i.e. when I forget which keys simulate the menu and search buttons. Note to self, they're F2 and F5.
DD Sez
My thoughts on politics, technology, running and... come to think of it, those are the only thoughts I've got!
Sunday, January 22, 2012
Friday, January 06, 2012
(Semi-) Auto-complete your declarations
Too lazy to type the class name of the variable you're declaring? Or maybe you can't remember the exact name of the class.
Well let's say you're declaring and assigning, like this:
SomeTypeName foo = something.getFoo();
But you can't remember the SomeTypeName part. Try this instead:
String foo = something.getFoo();
Eclipse will underline the error (oh yeah, you have to be using Eclipse, but who isn't??) and all you have to do it press Ctrl/1 (or Cmd-1 if you're on a Mac) and the quick fix will pop up,
Change type of 'foo' to 'SomeTypeName'
Just hit Enter and you're done! You're welcome!! :)
Well let's say you're declaring and assigning, like this:
SomeTypeName foo = something.getFoo();
But you can't remember the SomeTypeName part. Try this instead:
String foo = something.getFoo();
Eclipse will underline the error (oh yeah, you have to be using Eclipse, but who isn't??) and all you have to do it press Ctrl/1 (or Cmd-1 if you're on a Mac) and the quick fix will pop up,
Change type of 'foo' to 'SomeTypeName'
Just hit Enter and you're done! You're welcome!! :)
Saturday, December 10, 2011
SQLite.delete with args workaround
This Android SQLite code wasn't working:
getContentResolver().delete(LogProvider.URI, LogDatabase.COL + " < ?", new String[] { Long.toString(lval) });
But this code does:
getContentResolver().delete(LogProvider.URI, LogDatabase.COL + " < " + Long.toString(lval), null);
Don't know if it's a bug in SQLite or in the way I was calling it. Doesn't matter, it's an easy enough workaround. Hope this saves somebody else some trouble!
getContentResolver().delete(LogProvider.URI, LogDatabase.COL + " < ?", new String[] { Long.toString(lval) });
But this code does:
getContentResolver().delete(LogProvider.URI, LogDatabase.COL + " < " + Long.toString(lval), null);
Don't know if it's a bug in SQLite or in the way I was calling it. Doesn't matter, it's an easy enough workaround. Hope this saves somebody else some trouble!
Monday, December 05, 2011
Ballot Experiment
GraniteGeek at the Nashua Telegraph is doing an experiment with multi-choice ballots, and anyone can participate! Wish you could endorse Buddy Roemer's effort to get money out of elections? Afraid to vote for the candidate you truly like best because you would be "throwing your vote away"? Here is a chance to play with a system that fixes all that... Give it a try!
Friday, October 14, 2011
how to get screen to stay on when plugged in? - Android Forums
Want to listen to music with your Android device plugged in and keep the screen from shutting off? I did, and it was driving me crazy! I found the answer at Android Forums -- it's in Settings under Development, of all places!!
Thursday, October 06, 2011
createElement + iframe = NO
Don't use createElement to create IFRAME elements.
IE doesn't like it. Click here for the details and a workaround.
IE doesn't like it. Click here for the details and a workaround.
Wednesday, August 31, 2011
Droid2 Unrooting
I'm unrooting my Droid2 in case I ever need it to have that new-droid smell.
Anyway, here are some links I found useful:
Here are the instructions for getting RSD Lite and the SBF file you need:
http://droid2hacks.com/droid-2-hacks/how-to-unrootunbrick-droid-2-back-to-factory/
And here is a tip on what to do when you're stuck at "Please manually power up this phone" -- just go back into the bootloader (up-arrow/power) and plug back in if you became unplugged. Part of my problem may be that I was running under Parallels and I goofed when it asked me to retain the USB connection to the phone.
Anyway, here's the other thing. When you're done, if you go to your settings and it has forgotten your phone number, no need to panic. From here I learned that by dialing *228 and hitting SEND you'll connect to the automated programming system. You'll hear stuff in the earpiece but if you pull the phone away from your face, you'll actually see the phone telling you it's being programmed. As in activated.
And Here's something else I didn't know. When I was done, I still had all of my apps. I'm not sure how this is possible. I expected everything to be wiped out. Did I do it right? Did the flash really happen? I'm assuming that it did, since my phone had to be reactivated onto Verizon's network. Oh well, it does seem to have worked!
Anyway, here are some links I found useful:
Here are the instructions for getting RSD Lite and the SBF file you need:
http://droid2hacks.com/droid-2-hacks/how-to-unrootunbrick-droid-2-back-to-factory/
And here is a tip on what to do when you're stuck at "Please manually power up this phone" -- just go back into the bootloader (up-arrow/power) and plug back in if you became unplugged. Part of my problem may be that I was running under Parallels and I goofed when it asked me to retain the USB connection to the phone.
Anyway, here's the other thing. When you're done, if you go to your settings and it has forgotten your phone number, no need to panic. From here I learned that by dialing *228 and hitting SEND you'll connect to the automated programming system. You'll hear stuff in the earpiece but if you pull the phone away from your face, you'll actually see the phone telling you it's being programmed. As in activated.
And Here's something else I didn't know. When I was done, I still had all of my apps. I'm not sure how this is possible. I expected everything to be wiped out. Did I do it right? Did the flash really happen? I'm assuming that it did, since my phone had to be reactivated onto Verizon's network. Oh well, it does seem to have worked!
Subscribe to:
Posts (Atom)