Packt's Author of the Year Award: The finalists

June 3, 2009

I am thrilled to hear that I am one of the finalists for the Author of the Year Award. Thanks to all who voted!

In the next stage of evaluation a panel of judges will select one of the six finalists to be named "Author of the Year".

http://packtauthor2009.posterous.com/announcing-packt-author-award...

TweetyPants: Mashup of the Day at Programmable Web

June 2, 2009

TweetyPants was selected as the "Mashup of the Day" on ProgrammableWeb.

TweetyPants demonstrates how QueryPath can be used to combine multiple XML and HTML sources. It takes a user's recent Twitter activity, cleans it up a little, and then submits it for analysis to OpenAmplify. OpenAmplify returns...

Escaping JavaScript in QueryPath

June 1, 2009

Sometimes the HTML you parse with QueryPath will contain JavaScript or other embedded scripting languages. And sometimes such scripts will contain characters that the XML parser might misinterpret as XML or HTML structures.

There are two ways to escape such content -- both of which are standard,...

A Set of Objects in PHP: Arrays vs. SplObjectStorage

May 29, 2009

One of my projects, QueryPath, performs many tasks that require maintaining a set of unique objects. In my quest to optimize QueryPath, I have been looking into various ways of efficiently storing sets of objects in a way that provides expedient containment checks. In other words, I want a data structure...

SQLite "Database table is locked" errors in PDO

May 28, 2009

While working on various PHPUnit tests, I was running some database queries. During the tear-down for my tests, I repeatedly received the following error:

General error: 6 database table is locked

The line of code generating this error (from my unit test's tearDown()) was this:

$db->exec('DROP TABLE...

Executing a SPARQL Query from QueryPath

May 28, 2009

The Semantic Web. It is a concept that has sparked heated debate for years. While the debate may continue to rage for some time, there are already a host of technologies that can be used to build advanced applications based on XML technology. In this article, we will see how the SPARQL query language...

Updated Drupal module checkout package

May 28, 2009

Early this year I posted a short shell script for checking out modules from Drupal.org's CVS repository. After doing several merges and branches, I decided I'd better re-write the script to avoid using -r HEAD when checking out from HEAD.

The revised version of the script now looks like this. You...

Pseudo-class and Pseudo-element Reference for QueryPath

May 24, 2009

The CSS 3 Selector specification defines pseudo-classes and pseudo-elements. QueryPath implements as many of these as is possible.

This is a draft reference that will probably be included in QueryPath 2.0. Read on to view the entire document. <!--break-->

Supported Pseudo-classes

There are three...

Perl Pie: If you only learn how to do one thing with Perl, this is it.

May 21, 2009

Ever run into that situation where you need to run a find-and-replace inside of multiple documents? Ever wanted to do this with a regular expression, without having to use any complex sed redirection? Here's a pattern for doing this in perl.

No, you don't need to be a Perl guru to use this command...

TweetyPants Video

May 20, 2009

Here's a screencast walk-through of the TweetyPants intelligence analyzer.

Enter a user's screen name and TweetyPants does an analysis of recent tweets by that user. It then rates the user's style, smarts, and shizzle. No, it doesn't do anything useful. <!--break-->