London

I just got an email from my friend Rob Dixon, who lives near London (and in a 800 year old gate house). I had emailed him the day of the London terrorist attacks to check up on him, but only got a response today (he was traveling at the time and didn’t have access to email).

Rob, his wife Pam, and family, are doing fine … but one thing in his email struck me … and I thought it would bear repeating …

As a small child during the war with bombs falling all round us (we lived in Essex), I learnt at an early age that you just have to carry on. The terrorists will never win.

We will and they won’t 🙂

[tags]London[/tags]

News Media

The authorities maintain that the 42-year-old blogger, Joseph E. Duncan III of Fargo, N.D., took Dylan Groene, 9, and Dylan’s sister, Shasta, 8, from their rural Idaho home shortly before their 13-year-old brother, their mother and her boyfriend were found bludgeoned to death on May 16.

– New York Times article

What is he again? The 42-year-old North Dakota man? The 42-year-old suspected killer? No, he’s the 42-year-old blogger. The 42-year-old blogger supposedly kidnapped two children and murdered their mother and her boyfriend. The blogger bludgeoned the girl’s brother to death.

strip mining for whimsy.

(via Ryan)

This is a pretty good example of how the media paints very broad strokes on things they have an imperfect understanding of.

Another good example can be found whenever the news sources make reference to settlements in Israeli territories … they almost always refer to them as “Jewish settlements” … not “Israeli Settlements”. What makes them unique is not the fact that the residents are all jewish … but they are all Israeli.

Wrap JLabel Text

It took a bit of experimentation, but I think this routine could be used to allow a Java JLabel component to contained wrapped text.

This routine depends on the ability for JLabel text to contain HTML.

Basically it iterates through each word in the JLabel text, appends the word to a ‘trial’ string buffer, and determines if the trial string is larger than the JLabel’s container. If the trial string is larger, then it inserts a html break in the text, resets the trial string buffer, and moves on to the next word.

private void wrapLabelText(JLabel label, String text) {
	FontMetrics fm = label.getFontMetrics(label.getFont());
	Container container = label.getParent();
	int containerWidth = container.getWidth();

	BreakIterator boundary = BreakIterator.getWordInstance();
	boundary.setText(text);

	StringBuffer trial = new StringBuffer();
	StringBuffer real = new StringBuffer("<html>");

	int start = boundary.first();
	for (int end = boundary.next(); end != BreakIterator.DONE;
		start = end, end = boundary.next()) {
		String word = text.substring(start,end);
		trial.append(word);
		int trialWidth = SwingUtilities.computeStringWidth(fm,
			trial.toString());
		if (trialWidth > containerWidth) {
			trial = new StringBuffer(word);
			real.append("<br>");
		}
		real.append(word);
	}

	real.append("</html>");

	label.setText(real.toString());
}

Google Earth

Want to know more about a specific location? Dive right in — Google Earth combines satellite imagery, maps and the power of Google Search to put the world’s geographic information at your fingertips

Google Earth

This is extraordiarily cool … even if they think that our house is about a block south of where it really is.

Zombie Dogs

U.S. scientists have managed to revive dead dogs to life, by using a technique similar to cryogenation, in which the dogs’ blood was drained and replaced by a cold, saline liquid. A couple of hours, their blood was replaced, and an electric shock brought them back to life with no brain damage. The technology will be tested on humans within the next year.

Slashdot | U.S. Scientists Create Zombie Dogs

This just gives me the hebe-jebies.

Theater Hike

We went to see a “As you like it” performed by Theater Hikes at The Morton Arboretum today.

I really wasn’t expecting much, considering the venue and price of the tickets, but I was pleasantly surprised. It was pretty good for a community theater production.

Yes, it was hot… very hot. And humid. But there was a intermittent breeze and we moved around a bit.

The production values weren’t quite on par with Broadway or even Marriott Theatre, but given the situation, it was fun to watch. Somehow I don’t think Bill Shakespeare had jeans in mind when he wrote the play.

I think we’re going to try and see “Sleepy Hollow” in September … it will be cooler then. Not sure how they are going to do the headless horseman.

Google Secrets Out

Google have recently filed a US patent which reveals a great deal of how they rank your web site. Some of it you could never of guessed at…

Great Site Ranking in Google The Secrets Out

This is a very interesting read.

I am not, as a rule, all that concerned with search engine rankings for my sites. The number of sites that cover the same topics as I do are pretty small. Thus, if someone is looking for information, chances are they will stumble across my sites.