Saturday, November 10, 2012

Trot Diamond, 2005-2012

Trot has gone to herd the chickens in heaven. He was born with fifteen years of love inside him, but used them up in only seven. 

Saturday, October 06, 2012

113 hours

I just finished with a project I've had on my list for the longest time. I watched all seven seasons of The West Wing, my favorite TV show of all time. It only took me 40 days to watch 154 episodes, about 113 hours running time. And no, I have no idea how I managed that!

Wednesday, October 03, 2012

Android Calendar tip

I stumbled onto a useful feature in the Android Calendar this morning.

I'd been trying without any luck to find a way to make Agenda the default tab. I'd long given up wondering why the Week view wasn't available anymore.

Then mostly out of frustration, I long-pressed the Agenda icon and all of a sudden I was looking at this screen:



So it turns out you can choose which Calendar views to choose from and which order they appear in at the bottom of the Calendar screen. Yay!

Saturday, September 29, 2012

Ubuntu notes

Some Ubuntu notes-to-self, because I'm running over VNC and don't have the whole start menu thing going on...
File Manager $ nautilus
Terminal $ gnome-terminal
System Settings $ gnome-control-center
Update Manager $ sudo update-manager
Backup deja-dup (ui?)
$ wmctrl

Wednesday, September 05, 2012

VNC tip

I was connected to one of my VNC servers with Chicken and I don't know why, but all of a sudden I got an error, was disconnected from the server, and wasn't able to reconnect...

Unknown message type 5

The google wasn't much help, so I just tried stabbing at it, and luckily, it didn't take long for something to happen.

Turns out that if went to the Connection Profiles and UN-checked ZRLE, I was able to reconnect again.

Nope, it's happening again.  :-(

But fortunately, Mac OS's built-in Screen Sharing does seem to work just fine. :-)

Useful ssh tricks

Here are a couple useful things I found recently: Corkscrew, for ssh-ing out of a firewall Using ssh -L to set up a port you can VNC through

Thursday, August 16, 2012

Rezound ICS Linking Fixed!!

After the recent over-the-air upgrade of my HTC Rezound to Ice Cream Sandwich, I found that an important feature of Android (and indeed of every operating system) no longer worked: clicking links no longer launched the application responsible for handling that type of link.

I found the problem written up on Talk Android and realized I had a couple of choices:

  1. I could restore my Rezound back to Gingerbread (Oh no you can't)
  2. I could root my phone and make the fix.

As technical as I am, rooting is still kind of scary/daunting. I was really wishing I could go back to Gingerbread. But the Ice Cream Sandwich is so tasty! So root it would be.

My first search led me to an extremely helpful guide on Android Forums. I followed the instructions there for unlocking my bootloaded using htcdev, a tool that HTC provided. One thing I should say here is when the instructions call for using adb on the PC, you want your phone to be up and running and plugged into your PC. If you're using fastboot on the PC, your phone will want to be in the fastboot state, which, as much as it should have been obvious to me, wasn't at first.

Then I installed Amon Ra as my recovery, and I'm linking to it because that's proper, but you really should go to Android Forums and read up on all of this.

And next, to be honest, I wasn't quite sure what to do. I was under the FALSE impression that you needed to flash a ROM to be root. Don't know why I thought that, but it's not the case.

But where I ended up at this point was really great, the All-In-One Tool. It would have done the bootloader unlocking for me if I hadn't done that already. It also does five flavors of recovery flashing, which I wasn't needing at that point. What I did need, though, was Super User. And the instructions were muddy clear, so let me add some advice about that. You want to run the Perm Root (GB/ICS) command while the phone is plain old up and running, since adb is used to push a zip file, SuperSU.zip. It's after that file has been pushed that you want to reboot into recovery and use that recovery's zip installer. The output of the Perm Root command tends to give the impression that you're already rooted, but that's not the case until you've used recovery to do the installation of the zip.

So now I was rooted, but I wasn't done. I had copied /system/build.prop to my desktop, made the necessary edits* and pushed it back to my phone as /sdcard/build.prop.new, but I needed to put it back into /system. To do this, I used Mount /system (rw / ro) to make /system writable and I used Root Explorer (File Manager) to move build.prop.new to /system, rename build.prop to build.prop.old and finally rename build.prop.new to build.prop.

*Oh, and by the way, I found "ro.da1.enable" in build.prop twice, so I just made all of the changes twice.

Once I rebooted my phone, the good old linking behavior was fixed. Just as for centuries, clicking a Microsoft Word Document link on my desktop browser has always launched Microsoft Word, clicking on an Amazon MP3 link now launches the Amazon MP3 app, just as the gods intended.

Now that I'm able to declare victory, thanks to lots of help from the Internets, I'm off to click some thank-you and donation buttons.

Saturday, August 11, 2012

Screen capture!

My HTC Rezound has been upgraded (ha!!) to Ice Cream Sandwich, and I wondered whether screen shots might be possible. It is!! Just power/vol- and voila!!


Monday, April 16, 2012

Emacs Colors Begone

Thanks to Bjørn Hansen, I now know how to rid my Emacs of the annoying syntax coloring!

(setq-default global-font-lock-mode nil)

I'm not sure what version of Emacs that was for, but here's what I had to do (a couple times, actually) in version 23.1.1...

M-x global-font-lock-mode

Monday, April 09, 2012

Database Dropped

If you're like me, you will someday experience that terrifying, dreadful feeling upon reading these words on your phpMyAdmin screen...

Wednesday, March 07, 2012

Fun with words

What do each of the following have in common?

  • something
  • tenletters
  • eighteencharacters
  • two words

Sunday, March 04, 2012

layout.xml -> Activity.java

I made a bunch of changes to a layout file this morning and wished I had a quick way to get all of those elements into my java code so I could make it go. So I popped into Emacs and wrote a little function to do it! And here it is. Enjoy!
(defun xml-to-java ()
  (interactive)
  (progn
    (setq tmp (buffer-string))
    (switch-to-buffer "tmp")
    (insert tmp)
    (goto-char (point-min))
    (save-excursion
      (replace-regexp "[\n\t ]+" " ")
      )
    (save-excursion
      (replace-regexp
       " *<\\(\\w+\\)[^>]*android:id=\"@\\+id/\\(\\w+\\)\"[^>]*>"
       "\nprivate \\1 \\2;\n\\2 = (\\1) findViewById(R.id.\\2);\n")
      )
    (save-excursion
      (replace-regexp " *<!-- \\([^>]*\\) -->" "\n/* \\1 */\n")
      )
    (save-excursion
      (replace-regexp " *<[^>]*>" "")
      )
    (save-excursion
      (replace-string "\n\n" "\n")
      )
    )
  )

Thursday, February 23, 2012

Facebook Subscriptions

Here's another link I can never find when I need it... maybe you need it to!

Facebook Subscriptions

Very handy if you want to unsubscribe from annoying f-book friends.

Hat tip: Quora

Thursday, February 16, 2012

Google Calendar v3 Entry Update

Here's something that would make a nice addition to the Google Calendar Developer's Guide (v3)...

I've been trying to update an event and all I've been getting back is a cryptic 400 error, "unsupported output format" -- BIG HELP!!

Well maybe if it had said input format... I don't know what made me try this, but when I set the Content-Type header of my PUT request (application/json) -- IT WORKS!!

Saturday, January 28, 2012

HTTP Clients for Android

Android Developers Blog: Android’s HTTP Clients

I read the above post back in the fall and thought, "yeah yeah, I'm using HttpURLConnection, so need to think about this at all."

Well this week I found some odd, frustrating behavior and decided to try the Apache HTTP Client to see if it gave different results. And oh boy, does it -- it always just works!

OP Jesse says Apache has "fewer bugs" on Froyo, which is my target release. I guess I should have switched sooner. But now I have!

Sunday, January 22, 2012

Android Emulator | Android Developers

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.

Android Emulator | Android Developers

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!! :)

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!

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!

Survey

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!!