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

This is a little unusual for me, but I'm putting the following code here so I can remember how I implement a ViewPager in my current Android application. I want to put this code out here in its current state before it gets more complicated. In fact, I only wish I had copied it out here earlier, before I made it as complicated as it is.

The only things that are important to know are:

I was just working on centering some components in an Android LinearLayout and came upon this helpful advice:

android:gravity takes care of its children,
android:layout_gravity takes care of itself

So, in my case, where I wanted to center two buttons horizontally in a LinearLayout, I used android:gravity="center".

Lucy (of Peanuts), looking for enlightenment. :) (Image from this Twitter page.)

I think anyone who has been developing web services for a long time feels a bit like this. Image from this Twitter page.

Photo from this Twitter page, which links to a story about a Cheechako’s Alaska.

Ice halos in New Mexico, January, 2015. Photo from this page.

As a quick note, I just configured this website (alvinalexander.com) to have both a desktop version and a new mobile version. I do this by using Nginx to detect mobile devices and redirect the mobile users from the alvinalexander.com URL to the m.alvinalexander.com URL.

The Nginx mobile redirect configuration

The relevant part of my Nginx configuration is shown here:

I’ve heard of this spring training hitting drill that Joe Maddon brought with him to the Cubs, but this is the most detailed account I’ve read about it so far. Image from the Chicago Sun-Times.

‘twas the day before the Iditarod, and trucks were bringing snow into Anchorage, Alaska while it was 42 degrees and raining. It seems like Alaska’s weather is on the east coast of the Lower 48. Image from this Twitter page.

I was surprised to read on Computerworld that Firefox continues to lose market share. A couple of years ago it felt very slow on Mac OS X, but these days it’s much better, and I use it as much as I use Chrome. (Maybe they lost users when it was slower, and they never came back.)

These photos are of the Mendenhall ice caves in Junea, Alaska. See this Twitter page for the full images and more information.

I usually like the work that Jonathan Ive does, and I’m sure that constantly pushing for thinner/lighter helps to push technology, but if a couple millimeters more could give users more battery life I think that would be a better choice, and best for the “user experience.” (Image comes from this story.)

The Cubs are wearing “14” hats in honor of Mr. Cub, Ernie Banks, who passed away a few weeks ago. Let’s play two today! (Image from the Cubs Twitter feed.)

The REI store in Anchorage, Alaska closed yesterday for “an abundance of caution,” as they became concerned about an asbestos abatement treatment at a neighboring facility.

The 2015 Iditarod race starts tomorrow in Anchorage, Alaska. More information at the official Iditarod website.