I don't know how to love someone ... so duck

She stood in front of me crying, her body shaking, her hands clenched. “I don’t know how to love someone ... so duck,” she said, sobbing.

“What?,” I said, ducking.

She looked at me funny. “What are you doing?,” she asked.

“I’m ducking.”


“You said ‘duck.’”

“Duck? No, I didn’t say ‘duck,’ I said, I don’t know how to love someone so dark,” she said, now crying and laughing at the same time.

(A little flash fiction inspired by me mis-hearing the lyrics of a song by Marian Call. Needs improvement, I know, but I’m traveling today, and that’s all I’ve got.)

Cato - a template based, database driven source code generator

Welcome to the main page for my Cato application. Here’s what the marketing department wrote about Cato:

“Cato is a free, open source, template-based, database-driven, GUI app that lets you generate text -- source code, configuration files, etc. -- for any programming language or tool, based on the tables in your database.”

If you know what the code generator does in Ruby on Rails, Cato works just like that, but it’s not specific to any programming language or framework.

Scala - How to capitalize each word in a string

Here’s a quick example of how to capitalize each word in a String using Scala:

scala> "employee salary".split(' ').map(_.capitalize).mkString(" ")
res2: String = Employee Salary

The way this works is that you split the given String into “words” with split, which creates an Array[String]; then capitalize each word in the array with map; then convert the array back to a String.

How to set Java FlowLayout to flow left, and control horizontal and vertical spacing


This code shows how to create a Java FlowLayout that flows left and has horizontal spacing of ten pixels and vertical spacing of five pixels:

FlowLayout flowLayout = new FlowLayout(FlowLayout.LEFT, 10, 5);

Here’s what the FlowLayout constructor arguments look like:

FlowLayout(int align, int horizontalSpacing, int verticalSpacing);

FlowLayout 'align' property definitions

The align property can be any of these:

Syndicate content