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

It’s often hard to find good Sencha ExtJS examples, but I ran across this one last night. It shows how to use a date column in a Sencha grid. I’ve highlighted the date column information in the source code below:

I’m currently working on a Play Framework server-side application that handles money/currency. (The application UI uses Sencha ExtJS, but that doesn’t matter for this example.)

From past experience I know that this means I need to use a decimal field in my MySQL database table. (MySQL also lets you declare this field type as numeric.) I further know that the MySQL JDBC driver uses a java.math.BigDecimal field to insert and select from this field type.

Scala FAQ: How do I convert from a Scala BigDecimal instance to a Java BigDecimal?

Call the bigDecimal method on your Scala BigDecimal instance, as shown in this example in the REPL:

scala> val sb = scala.math.BigDecimal(12345)
sb: scala.math.BigDecimal = 12345

scala> val jb = sb.bigDecimal
jb: java.math.BigDecimal = 12345

As you can see, invoking sb.bigDecimal returns a java.math.BigDecimal.

Per the website, “Squants is a framework of data types and a domain specific language (DSL) for representing Quantities, their Units of Measure, and their Dimensional relationships. The API supports typesafe dimensional analysis, improved domain models and more. All types are immutable and thread-safe.”

We had over an inch of new snow at daybreak this morning, but in less than two hours any snow exposed to the sunlight was gone. Amazing how that altitude+sun thing works.

Terry Francona tells a pitcher mid-inning that he’s made the team. Photo from this url.

Here are my abbreviated notes on what’s required to add a new “Transactions” panel to my current Sencha ExtJS application:

To add Save and Cancel buttons to a Sencha ExtJS form or panel, use the following code:

These are my notes on how to see HTTP headers in Google Chrome.

To see HTTP headers (from a GET, POST, etc.) in Chrome:

  1. Open the Dev console
  2. Go to Network tab
  3. Click on the URL you attempted, such as saveTransaction.php
  4. Click on ‘Headers’ tab in the resulting panel

This works in the Chrome browser as of late March, 2014.

The Chicago Bears’ Marc Trestman on the QB meeting room. From this Chicago Tribune link.

My 2006 MacBook Pro is now for sale on eBay at this URL.

I don’t have time to work on Sarah these days, so I’m glad to see someone else working on something like Siri for the Mac. That being said, “Sinus” is a horrible name. Ah-choo!

I’m glad to see more people addressing the problem of “distraction.” If you have a “monkey mind,” jumping from one thing to the next, you’ll never find enlightenment.

An asteroid with rings. I never would have guessed that a 90-mile diameter rock would have enough gravitational force to support rings. The story is here.

I got my cool see-thru highlighters from Japan yesterday. The long, clear stem lets you see what you’re actually highlighting, which is very nice.

Steve Jobs’ thoughts on Apple ever selling a tv.