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

This brief Sencha tutorial shows how to convert the text in a Sencha ExtJS textfield to uppercase on the textfield blur event. I use this technique on the symbol field in a form where I let users enter stock symbols, such as “AAPL”, “GOOG”, etc.

First, the symbol field in my StockForm.js view component is defined like this:

The Chicago Cubs' Travis Wood had a very good year in 2013, much improved over 2012. This story on fangraphs.com from May, 2013, explains some of the improvement with a nice collection of stats.

If you need to see a simple PHP example that converts an array of data to a JSON string using the json_encode function, I hope this little script is helpful:

As a quick example, if you need to see some code for a Play Framework Anorm method that inserts an object into a relational database table and returns the auto-into (MySQL auto_increment) ID field on success, here you go:

Here are two PHP scripts I just wrote that use curl and curl_setopt. The first example makes a GET request, and the second example makes a POST request, and passes JSON data to the web service it accesses.

A PHP curl GET request

This first one makes an HTTP GET request and prints the data that is returned by the URL that it hits:

Mac OS X performance tuning tools and commands. From this tweet by Brendan Gregg.

From this cyberciti.biz web page: “The iotop command is top like the top utility for disk I/O. It watches I/O usage information output by the Linux kernel (requires v2.6.20 or later) and displays a table of current I/O usage by processes or threads on the system. This post explains how to install and use iotop to find out what's stressing (or program names) on your hard drives under Linux operating systems.”

From cyberciti.biz: “If you want to monitor network throughput on the command line interface, use nload. It is a console application which monitors network traffic and bandwidth usage in real time. It visualizes the incoming and outgoing traffic using two graphs and provides additional info like total amount of transferred data and min/max network usage.”

I know remarkably little about using JSHint with Sublime Text 2 at the moment, but I finally found that if I installed JSHint like this from the command line:

$ npm install -g jshint

after earlier installing JSHint from within Sublime Text 2, JSHint magically started working in Sublime Text.

I guessed this in part by finding a README file with the Sublime Text JSHint install:

To display an alert message dialog in Sencha Ext JS (ExtJS), use code like the following:

Ext.Msg.alert('Dialog Title', 'Your body text goes here ...');

This displays a simple JavaScript-like message dialog.

Rick Pitino speaking about Russ Smith after Louisville beat St. Louis in the 2014 NCAA tourney. Quote from espn.com.

Email market share from February, 2014, from emailclientmarketshare.com.

The look on your face when you get a good score on a test, where you guessed on half the questions. :)

Sunset in Denali, Alaska. Photo from the Denali National Park Twitter account.

UC San Francisco neuroscientist Adam Gazzaley, MD, PhD, is hoping to paint a fuller picture of what is happening in the minds and bodies of those suffering from brain disease with his new lab, Neuroscape, which bridges the worlds of neuroscience and high-tech.

I haven’t figured out the exact issue yet, but ever since I (a) switched to Mac OS X 10.9 and (b) added a second monitor to my old iMac, the mouse pointer/cursor seems to disappear from time to time. Actually, I can’t tell what it’s doing, so I move the mouse around frantically until it reappears.

To help resolve this problem, I just made my mouse cursor larger. You do this on your Mac by going to System Preferences, then Accessibility, then Display, and then adjust the “Cursor Size” slider until you get the mouse pointer size that you want. You can see in the image shown here that I’ve made mine a little larger than normal. (I was surprised that this is under “Display” and not under “Mouse”, but there it is.)

It was a dark and stormy night ... well, windy, anyway.

Gravity waves from the Big Bang may have been found. Story here at The Scientific American.