Big Al's Chicago - A sign in the Las Vegas airport.
Scala, Java, Unix, MacOS tutorials (page 323)
The classic book, Programming in Scala, states that you need to be careful about using var fields when defining equals methods. They specifically state:
Pitfall #3: Defining equals in terms of mutable fields.
Personally, I think I've always defined equals methods with mutable fields, at least in Java. They share the following source code example that demonstrates a problem when defining an equals method in a Scala class when used in a collection.
A nice table on how people think and learn.
From http://pinterest.com/pin/210754457534746058/
The XS Nightclub in Las Vegas, with David Guetta, March 15, 2013. I'm not saying I was there, because what happens in Vegas stays in Vegas, but if I was there, it was probably a helluva good time.
Photos courtesy of http://www.xslasvegas.com/photos/
Just a quick note today that I'm slowly building a new front page design for this website. My goal is to create more of a "Tumblr" design, where I can list everything that's new on the front page, including blog posts, bookmarks, short text blurbs, source code snippets, and photos. At the moment, all that shows up on the front page are blog posts, so if you only see the front page, you're only getting a very small idea of "What's new" here.
This is a quick example of how to use the geolocation web service at http://www.hostip.info/use.html using Scala:
/**
* an example of how to use the geolocation web service at
* http://www.hostip.info/use.html
* using scala
*/
object GetRestContent extends App {
val url = "http://api.hostip.info/get_json.php?ip=12.215.42.19"
val result = scala.io.Source.fromURL(url).mkString
println(result)
}
I don't show how to handle the JSON string in this example, but if you search this website you'll find other Scala JSON examples.
Here's a snippet of Scala code I use to get a list of all files beneath a given directory:
The road conditions on I-70 in Colorado on the drive back from Las Vegas.