Futurama: Using Java Technology to Build Robots That Can See, Hear Speak, and Move

Fun article on developer.java.sun.com called Futurama: Using Java Technology to Build Robots That Can See, Hear Speak, and Move. It explains how to use the Java speech API to capture speech, the Java Media Framework to capture webcam images, and the open source leJOS environment for controlling Lego Mindstorms robots.

On a semi-related note, if you have an MP3 collection (um… yeah I guess that’s all of you), you should check out the .NET application that Joe just released called LANMP3. Pretty cool stuff.

Windows Tail

[update 10:08pm] I know that tail exists for Windows by using cgywin or some of the other ports. If you view the article you’ll see that this utility isn’t run from the command line and uses VB.NET code, which I thought was a interesting…]

From the artima newsletter: Windows tail: “The UNIX operating system has long had a set of really good text file processing utilities. On of the utilities is a program named tail. What tail does is it displays the bottom of a file and then waits for any new information to be written to the end of that file then it displays that information, scrolling up as it goes along. This is perfect for monitoring log files to watch them actually grow as information is being written to them.

Windows has no such command. Also, in the spirit of Windows, I thought it would only be appropriate to have this command using a GUI user interface instead of the command line user interface employed by the UNIX version.

Enter Windows Tail, or wtail.exe. This is a program written in VB.NET using the Microsoft DOTNET Framework 1.1 which must be installed on your system in order for this program to run.

ScreenTaker

I downloaded and installed ScreenTaker by SymbianWare, a nifty little piece of software that gives you the ability to take screen shots of the applications on your Symbian based phone. If you’re using it on the 3650, you should read the instructions on the website, don’t pay attention to the instructions that come with the application. You should press ‘Pencil key + Menu key’ or ‘Pencil key + *’ to take a screen shot.

The picture above is a screen shot taken of my J2ME stopwatch application. I updated the jar & jad files tonight.. download’em again if it didn’t work for you the first time.

Why Web Developers Need JavaServer Faces

Short article at onjava.com entitled: Why Web Developers Need JavaServer Faces. Not much meat to it, but it sure the sparks are flying the comments section. If you don’t want to read it, here’s my data extraction:

· JSF prescribes an architecture for UI rendering to different clients.

· JSF provides rich client like event handling.

· JSF defines functionality for data conversion, validation, and localization.

That’s it… the entire support for why Web Developers need JSF. Pretty weak isn’t it?

Retrieving ‘recordcount’ property in .NET

Spent a bit this morning wading through .NET documentation trying to find out how one retrieves the number of records returned from a query. Turns out it’s pretty simple. First you get your query rolling:

// get the connection string from settings
String cs = System.Configuration.ConfigurationSettings.AppSettings[“connectionString”].ToString();
// get a sql connection using the connection string
SqlConnection sqlcon = new SqlConnection(cs);
SqlDataAdapter adapter= new SqlDataAdapter(“select * from yourtable”, sqlcon);
DataSet dataset = new DataSet();
adapter.Fill(dataset,”mytable”);

At this point you’ve run the query and you have a DataSet which you can then loop over like any other collection, ie:

foreach (DataRow d in dataset.Tables[“mytable”].Rows)

or you can retrieve the number of rows:

DataRowCollection drc = dataset.Tables[“mytable”].Rows;
Console.WriteLine(“there are ” + drc.Count + ” rows in the query.”);

or even quicker like this:

Console.WriteLine(“there are ” + dataset.Tables[“mytable”].Rows.Count + ” rows in the query.”);

Back to work….