This Sencha ExtJS code snippet shows how to use the Ext.Element down method to get the value from a textfield:

I’ve been stuffing receipts and junk into a compartment in my car for years, and cleaned it out yesterday. This card is by far the best thing I found in there (find Haines, AK on a map, and you might know why). As I’m shredding things, I just saw that on this day two years ago I was in Virginia Beach.

A SO page has a nice example of how to capitalize each word in a string in JavaScript:

function capitalizeEachWord(str) {
    return str.replace(/\w\S*/g, function(txt) {
        return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();

You can test this code at like this:

Well played, Apple. Happy Earth Day. (Image from here.)

Bummer, I thought Apple’s earnings call was today, not tomorrow. I think an important thing to look at is their stock repurchase program. There are currently 891.9M shares outstanding, with their stock at $530/share. As they continue to buy back their shares, it stands to reason that the price of the remaining shares will increase (all other variables being equal). is a nice way to test JavaScript snippets. It’s a little like a REPL, but you need to press “run” for it to evaluate anything, and printing to the JavaScript console seems like the best way to see output.

Apple earns more than Google, HP, Intel, and Cisco combined. Wow.

I’m glad to see companies like Headspace offer meditation apps, and that they are separating a) meditation from b) religion.

On the campus of the University of Colorado in Boulder this morning: “Be mindful even when your mind is full.”

A few examples of how to implement left-trim and right-trim on strings in Scala:

def ltrim(s: String) = s.replaceAll("^\\s+", "")
def rtrim(s: String) = s.replaceAll("\\s+$", "")

In a related note, here’s a method that removes all blank strings from a Seq, List, or Array of strings:

Summary: My “Wikipedia Reader” application reads Wikipedia pages to you. The current release is a very rough Version 0.1 (alpha) release. What’s new: 1) It works. 2) It’s packaged as a Mac OS X application. 3) It supports the use of multiple reading voices.

Update: I’ll get a new build out this weekend that eliminates the bugs shown in the video.

In my spare time I’ve been working on an application I call a “Wikipedia Reader” (or Wikipedia Page Reader). As its name implies, it reads Wikipedia pages and speaks the page content to you. The functionality is shown in this 112-second video:

I noticed recently that a Scala/Java Swing application I am developing on Mac OS X 10.9 has blurry text when it’s run as a Mac application. The text looks fine when I run the application through SBT, but looks blurry when I package it and run it as a Mac OS X application.

A solution is to put this text in the application’s Info.plist file:

The goal of serving mankind is a noble one. Unless, of course, it happens to be in a Twilight Zone episode. ;)

I just ran across this old Facebook post, from a trip I made to Virginia last year.

When you get into learning about dividend investing, you’ll eventually learn about the DRiP list, maintained by Dave Fish.