example

A Play Framework data entry form example

Table of Contents1 - Define the routes2 - Create a controller3 - Create the template/form4 - What the form looks like5 - Play form input helpers6 - Form resources

If you’d like an example of how to create a data entry form using the Play Framework v2.6, here’s a complete example.

This website is a little one-man operation. If you found this information helpful, I’d appreciate it if you would share it.

“Notes,” a Scala + JavaFX demo application

I wrote a little “Notes” application using Scala and JavaFX to go along with my “Hello, Scala” tutorial. If you’d like to see how it works, here’s a two-minute video:

The source code for the project is at this Github URL:

This website is a little one-man operation. If you found this information helpful, I’d appreciate it if you would share it.

How to create a LibGDX Dialog (example)

If you ever need to create a Dialog in LibGDX, I can confirm that this example code works:

This website is a little one-man operation. If you found this information helpful, I’d appreciate it if you would share it.

SBT: Example build.sbt variables/settings (from PPrint)

Because I think it’s often best to “learn by example,” I’ve become a connoisseur of SBT build.sbt examples, and this build.sbt file from Lihaoyi’s PPrint project demonstrates a lot of SBT variables:

This website is a little one-man operation. If you found this information helpful, I’d appreciate it if you would share it.

A collection of 100+ Scala String examples

This page contains a collection of over 100 Scala String examples, including strings functions, format specifiers, and more. I don’t provide too many details about how things work in these examples; this is mostly just a collection of examples that can be used as a reference page or cheat sheet. (I do show the output of most examples.)

First, here are some basic uses of the Scala String class to help get us warmed up:

This website is a little one-man operation. If you found this information helpful, I’d appreciate it if you would share it.

Source code for an Android AsyncTask (REST client) example

I just got back into using an Android AsyncTask, and it took me a little while to re-load the concepts in my head. I used AsyncTask’s a few years ago, but haven’t used them since.

To help remember how they work, I created a little AsyncTask example project, and I’ve included all of the source code for that project here. I’ll show all of the source code for my classes and configuration files, and then explain the code at the end.

This website is a little one-man operation. If you found this information helpful, I’d appreciate it if you would share it.

The SBT syntax to add multiple library dependencies (Scala)

As a quick note, the Scala Simple Build Tool (SBT) syntax to add multiple library dependencies is this:

libraryDependencies ++= Seq(
    "com.typesafe.akka" %% "akka-actor" % "2.1.1",
    "com.typesafe.akka" %% "akka-remote" % "2.1.1"
)

This website is a little one-man operation. If you found this information helpful, I’d appreciate it if you would share it.

An Akka actors ‘remote’ example

While doing some crazy things with SARAH, I realized that the best way to solve a particular problem was to use remote Akka actors. I haven’t had the opportunity to work with Akka much since finishing the Scala Cookbook, so I dug around trying to find a simple Akka remote “Hello, world” example. Unable to find a good one, I read some stuff, and created it myself.

This website is a little one-man operation. If you found this information helpful, I’d appreciate it if you would share it.