The following Java source code shows how to determine the screen size (dimensions) of the Android device your application is running on:

This is a collection of notes about what I learned today, February 23, 2015. Most of it is about Android.

I need to refresh my cursor data set before calling notifyDataSetChanged

When (a) adding, editing, or deleting items in a ListView and (b) using a CursorAdapter, I need to update my cursor object before calling notifyDataSetChanged. I created this method, which I call from my fragment’s onResume method:

“I use the term ‘force multiplier.’ The people in the group that make them better. He absolutely fits into that category. –- on reliever Jason Motte, from theories taken from a Colin Powell book. (Quote from this espn page.)

If you have a problem with your Apple Car, do you take it to the Apple Store to have a Genius fix it?

The comment shown from this FastCompany article seems to imply that either the Apple Watch is slow, or navigation is slow. “This doesn’t happen in seconds” doesn’t sound good.

From a translation of the Tao Te Ching:

The master, by residing in the Tao (the Way),
sets an example for all beings.

Because he doesn’t display himself,
people can see his light.

Because he has nothing to prove,
people can trust his words.

People interested in consulting would be wise to remember that last stanza.

This page has a nice collection of mostly handwritten logos (handwriting and fake handwriting).

Games Without Frontiers, released in 1980, is an interesting song. It begins with words that sound like, “She’s so popular,” but songfacts states that those words are actually, “Jeux Sans Frontières,” which is French for “Games Without Frontiers.” This information comes from Wikipedia: “The song’s title refers to Jeux Sans Frontières, a long-running TV show broadcast in several European countries, in which teams of residents representing a town in one of the participating countries would compete in games of skill while frequently dressed in bizarre costumes. The British version was titled It’s a Knockout, which Gabriel references in the lyrics. The lyrics themselves are an allegory of the childish antics of adults.”

Here’s the video on YouTube:

“Five Hour Apathy,” another great cartoon from

As a developer, you can use the adb push command to copy files from your computer’s hard drive to an Android device . However, I just ran into a problem where I couldn’t copy files to my Android emulator’s “data” directory, i.e., the /data/data filesystem. When I tried to copy a file using this command:

$ adb push foo.jpg /data/data/com.alvinalexander.myapp/files

I got this Android error:

If you ever need to get the root data directory of your Android application (app) from within your Java code, I can confirm that this approach works:

File rootDataDir = getActivity().getFilesDir();

When I log that directory like this:

Log.i(TAG, rootDataDir.toString());

it prints this output for my application:


where com.alvinalexander.mynewapp is the package name for my new Android app.

A cat tastes catnip for the first time, and journals the experience. :) (Image from

“The Way is not outside of you -- it is you.” (From Making Zen Your Own.)

Nansen and Joshu teamed up for some of the best stories in Zen literature. I’ve seen this exchange many times, but this particular translation comes from the book, Making Zen Your Own.

If you’re working with an Android application, this source code seems to work to load an image from a file:

Bitmap bitmap = BitmapFactory.decodeFile(pathToPicture);

The Bitmap and BitmapFactory classes are located in the package:


Assuming that your pathToPicture is correct, you can then add this bitmap image to an ImageView like this:

If you attempt to do a normal git push origin master after adding a tag, you’ll get an “Everything up-to-date” message from Git. In short, this is because you have to push a tag to the origin just like you push a branch. In my case I just created a tag named v0.1, so I pushed it like this:

git push origin v0.1

The command the output from git looks like this:

“Steve (Jobs) was the most focused person I’ve met in my life. It’s terrifying that when you really, truly focus, it seems a bit illegal. You can achieve so much.”

This is a photo from the KTUU Channel 2 News Facebook page in Anchorage, Alaska. It’s accompanied by this comment: “An aerial photo of Anchorage as I was preparing to land last night (19 Feb) at Lake Hood. Note the Star on the mountain behind the city!” -- Dave Oberg, Regal Air Service.

I don’t like the word “suffering” in Buddhism. In fact I dislike it, strongly. It’s a turnoff. I don’t feel like I’m suffering. I’ve had five operations so far, and cancer, too. But I’m not suffering. But if you realize the Pali word for this term is dukkha, and that word is interpreted more as “deep dissatisfaction,” okay, that I can relate to.

“Meditate as a hobby, not as a career.” ~ Clark Strand (from the book, A Beginner's Guide to Meditation)