Scala, Java, Unix, MacOS tutorials (page 238)

NBC has a pictorial with a few photos of the Dalton Highway, including this frozen outhouse. I drove it back in August, 2007, and several of the photos bring back memories.

According to this article on MysteriousUniverse.org, NASA scientists may have accidentally created a warp field. As they state in the article, “When lasers were fired through the EmDrive’s resonance chamber, it measured significant variances and, more importantly, found that some of the beams appeared to travel faster than the speed of light.” However, it’s possible that the effect that was seen was due to atmospheric heating, so the test now needs to be performed in a vacuum. (For the details, there’s a long Q&A thread running at NasaSpaceFlight.com.)

Without looking things up I don’t know when this changed, but ... to refer to a built-in Android color with the android:drawable XML tag, use code like this:

I’ve been looking into dividend-paying stocks recently, and I came across Procter & Gamble (PG). I’ve been wondering what their problems are, and then I just read this information, where the two highlights are information that’s new to me.

An “Earth gatha,” from this collection of gathas from Thich Nhat Hanh.

Happy Earth Day! Go on out and plant a tree, ’cause there is no Planet B. :)

A Siberian Husky appears to be drinking someone’s drink through a straw, because that’s the sort of thing they do. Photo from the Free Spirit Siberian Rescue page on Facebook.

Kris Bryant and Addison Russell have now both joined the Chicago Cubs (April 21, 2015).

Per this re/code article, Google Play paid developers over $7B for their Android apps in the last 12 months.

A few days ago the plan was to euthanize the black bears roaming around the Government Hill neighborhood in Anchorage, Alaska, but Governor Bill Walker called the Fish & Game Department to see if something else could be done, and now the bears are going to be relocated to an area about 60 miles southeast to an area known as Portage Valley. The full story is here at adn.com.

No accounting of this day would be complete without mentioning the snow. We’re expecting about an inch of snow today, with rain, possible lightning, and a high of 45F.

As I’ve come to learn over the last ten days, the hard part about diverticulitis isn’t necessarily the first “attack” (for lack of a better term), but trying to figure out what you can and can’t eat after this happens. This image from the Mayo Clinic website shows what you should eat initially. In theory you’re supposed to transition back to a high-fiber diet after a few days, and that’s the part I’m struggling with as I write this on April 16, 2015.

I just found this information on Android logging, debugging, and tracing on this page about signing your Android app.

As a quick note today, here’s a little Java method that I use to log Android memory use (RAM use) from an Activity or Fragment:

private void logMemoryInfo(Context context, String TAG) {
   ActivityManager activityManager = (ActivityManager) context.getSystemService(getActivity().ACTIVITY_SERVICE);
   int memoryClass = activityManager.getMemoryClass();
   ActivityManager.MemoryInfo memoryInfo = new ActivityManager.MemoryInfo();
   activityManager.getMemoryInfo(memoryInfo);

   Log.i(TAG, "\n------------ RAM -------------");
   Log.i(TAG, "mem class: " + memoryClass);
   Log.i(TAG, "mem avail: " + memoryInfo.availMem);
   Log.i(TAG, "low mem:   " + memoryInfo.lowMemory);
   Log.i(TAG, "threshold: " + memoryInfo.threshold);

   long mb = 1024*1024;
   Runtime runtime = Runtime.getRuntime();
   Log.i(TAG, "Used Memory:  " + (runtime.totalMemory() - runtime.freeMemory()) / mb);
   Log.i(TAG, "Free Memory:  " + runtime.freeMemory()  / mb);
   Log.i(TAG, "Total Memory: " + runtime.totalMemory() / mb);
   Log.i(TAG, "Max Memory:   " + runtime.maxMemory()   / mb);
}

When I was young I came across a book that I think was called The Inner Game of Tennis. In it, the author said the same thing that Nikola Mirotic’s teammates told him: When playing sports, don’t think, just play. (Note: The author of the tennis book has a more-recent book out titled, The Inner Game of Work.)