DHTML/CSS
::
December 27, 2006 at 1:15 am
· Filed under .NET, DHTML/CSS, Lotus Notes/Domino, PHP, Photoshop, SEO, XML
My company rolls its own version of Xerces for our products. We can add fixes or enhancements without fear of conlicts. Over the years, the list of things to do has decreased. Now it is just about down to removing...
Permalink
December 26, 2006 at 4:26 pm
· Filed under .NET, DHTML/CSS, Lotus Notes/Domino, PHP, Photoshop, SEO, XML
I was just putting together a small test program and I thought I would try using PDO. I really haven't done anything serious with PDO, just try it a couple times. After recompiling PHP to include the mysql driver for PDO, I coded up the first version of my test program:
?
$db = new PDO('mysql:host=localhost;dbname=example', 'example', 'secret');
?
$tags = $db->prepare("
SELECT
*
FROM
bookmark_tags, tags
WHERE
bookmark_tags.bookmark_id = ? AND
tags.id = bookmark_tags.tag_id
ORDER BY
tags.name");
?
$bookmarks = $db->prepare("SELECT * FROM bookmarks ORDER BY Title");
$bookmarks->execute();
while ($bookmark = $bookmarks->fetchObject()) {
echo "{$bookmark->title} ";
$tags->execute(array($bookmark->id));
while ($tag = $tags->fetchObject()) {
echo $tag->name, " ";
}
?
echo "n";
}
echo "n";
?
Unfortunately, this didn't work and it took me a few minutes to figure out why. Actually, I still don't know exactly why it doesn't work, but I did find a way to make it work: by using two separate connections, one for each prepared statement. It doesn't seem like you can have two active statements at the same time on the same connection. I find this hard to believe, so I'm probably doing something wrong.
The other thing I didn't care for with this PDO code is the non-standard method of iteration with the while loop. Well, the while loop is perfectly standard if you are coming from the PHP 4 style functional DB APIs. However, it doesn't seem to fit in with the PHP 5 Iterator and foreach integration. PDO doesn't seem to provide a distinct result set object, or a method of iterating over a result set using the standard PHP Iterator interface.
Now, I can understand why this may be the case. The PDO interface seems to be designed to bind to php variables. Thats not going to work with the Iterator interface. However, I am not using that mode and don't want to use that mode. It would be nice to be able to acquire an iterator for an example of use such as the one above without having to use fetchAll and ArrayIterator.
Using the Iterator style makes it easier for me to decouple my code from the data source and makes it easier to write test cases for that code.
I was a little bit disappointed. So I moved on to MDB2 with the same code ...
?
require_once 'MDB2.php';
require_once 'MDB2/iterator.php';
?
$db = MDB2::connect("mysql://example:secret@localhost/example");
?
$tagLookup = $db->prepare("
SELECT
*
FROM
bookmark_tags, tags
WHERE
bookmark_tags.bookmark_id = ? AND
tags.id = bookmark_tags.tag_id
ORDER BY
tags.name");
?
$bookmarkFinder = $db->prepare("SELECT * FROM bookmarks ORDER BY Title");
$bookmarks = new MDB2_Iterator($bookmarkFinder->execute(), MDB2_FETCHMODE_OBJECT);
echo ";
foreach($bookmarks as $bookmark) {
echo "{$bookmark->title} ";
?
$tags = new MDB2_Iterator($tagLookup->execute($bookmark->id), MDB2_FETCHMODE_OBJECT);
foreach($tags as $tag) {
echo $tag->name, " ";
}
?
echo "n";
}
echo "n";
?
I have about the same level of non-experience with MDB2 as with PDO, but my code worked perfectly on the first try and allowed me to use Iterator, which will be helpful to the next stage of my test.
I was a bit impressed. I'll see how well it handles the next stage of what I want to do.
(And yes, I know there is no error checking in the above code.)
Permalink
December 26, 2006 at 3:45 pm
· Filed under .NET, DHTML/CSS, Lotus Notes/Domino, PHP, Photoshop, SEO, XML
Announced today, Microsoft has apparently applied for the patent on "web feeds". This is one of those announcements that make people roll their eyes up in their heads in puzzlement and disgust, in what I think in this case is...
Permalink
December 26, 2006 at 3:15 pm
· Filed under .NET, DHTML/CSS, Lotus Notes/Domino, PHP, Photoshop, SEO, XML
I can now see the shape of the new real operating system ... one that doesn't have big fanfares and major release numbers and significant rollouts but instead simply is there, is organic, and evolves with time. It is pretty much ubiquitous, doesn't require a $200 license to play, and for the most part works not by pushing the edges of what's possible with the hardware at hand but by working with established technologies and tools, albeit sometimes in very new ways. It isn't produced by any one vendor, and it doesn't penalize a person because he doesn't have the latest and greatest hardware and software and the money to spend on all that premium content. It recognizes the value of advertising - advertising is, at its sole, the nervous system of capitalism, and in its place is valuable - but it doesn't bend to the point where the advertisers can corrupt the system. The new operating system places the emphasis instead upon the individual participant, not as a captive user or potential customer but as a creator in his or her own rights, no matter how simple the creations.
Permalink
December 26, 2006 at 2:45 pm
· Filed under .NET, DHTML/CSS, Lotus Notes/Domino, PHP, Photoshop, SEO, XML
re: Patent Applications in the RSS space >...We have always fully acknowledged the innovators and supporters of RSS, like Dave Winer, Nick Bradbury and many others... I think you misspelled 'innovators' - let me help. Did you mean 'inventors'? You...
Permalink
December 26, 2006 at 9:43 am
· Filed under .NET, DHTML/CSS, Lotus Notes/Domino, PHP, Photoshop, SEO, XML
Organizations often have hundreds of Notes/Domino databases across many servers, only a few of which have significant usage. Learn how to find and remove unused databases to reduce the disk space and complexity of your Notes/Domino environment.

Permalink
December 24, 2006 at 8:16 pm
· Filed under .NET, DHTML/CSS, Lotus Notes/Domino, PHP, Photoshop, SEO, XML
Dan Thies recently created a free video offering tips on how to use my free keyword list generator tool.
Permalink
December 24, 2006 at 2:02 am
· Filed under .NET, DHTML/CSS, Lotus Notes/Domino, PHP, Photoshop, SEO, XML
I've finally been able to play the Nintendo Wii, and sure, I want one. I had decided not to buy yet another version of Mario Kart and that the new controller would not yield itself to most games, that it would only work for some very specific ones . After I've tried it, I still think that couldn't be my main gaming machine, but I want one anyway. The controller works very well. I didn't have the impression that it was any more precise than, say, a Gyration mouse (it was quite clumsy to use on the menu screens), but it reacts accurately to fast movements, which is what matters in games. By the way, Nintendo has already succumbed to the pitfall of thinking the movement detection was a universally good idea. It isn't. The simple...(
read more)
Permalink
December 23, 2006 at 4:45 pm
· Filed under .NET, DHTML/CSS, Lotus Notes/Domino, PHP, Photoshop, SEO, XML
ongoing � JSON and XML From: Aristotle Pagaltzis (Dec 21 2006, at 18:52) Anders: It's a stretch to call the man who designed both RSS 2.0 and OPML an "XML partisan." I have no desire to get myself in any...
Permalink
December 22, 2006 at 7:44 pm
· Filed under .NET, DHTML/CSS, Lotus Notes/Domino, PHP, Photoshop, SEO, XML
David wrote, ... Thanks for the pointer to Lyx. Not sure how I've not heard of it before. Jon
Permalink
December 22, 2006 at 7:09 pm
· Filed under .NET, DHTML/CSS, Lotus Notes/Domino, PHP, Photoshop, SEO, XML
Jon, Small publishers would, I think, be far ahead of the game if they began to use Lyx. Based upon LaTeX, Lyx creates *far* better looking output than Word
Permalink
December 22, 2006 at 6:54 pm
· Filed under .NET, DHTML/CSS, Lotus Notes/Domino, PHP, Photoshop, SEO, XML
... Hash: SHA1 ... Have you looked at 'antiword -x db filename'? Its output looks a bit ugly (for example, blank lines turned into
pairs) on
Permalink
December 22, 2006 at 11:53 am
· Filed under .NET, DHTML/CSS, Lotus Notes/Domino, PHP, Photoshop, SEO, XML
David, ... I totally agree. But I have to experiment with Word 2003 (in XML view mode, not regular mode) since there is a heavy reliance by small publishers in
Permalink
December 22, 2006 at 11:44 am
· Filed under .NET, DHTML/CSS, Lotus Notes/Domino, PHP, Photoshop, SEO, XML
String and list handling are not completely covered in Formula language. Learn how SearchDomino.com member Peter Skold has circumvented that issue by "inventing" a Formula function to cull elements from a list.

Permalink
December 22, 2006 at 11:02 am
· Filed under .NET, DHTML/CSS, Lotus Notes/Domino, PHP, Photoshop, SEO, XML
Thanks, David. Yes, the two folks I was referred to as tops for training were Ken Holman of Crane Softwrights (whom I've spoken with and who saw my message and
Permalink
December 22, 2006 at 3:45 am
· Filed under .NET, DHTML/CSS, Lotus Notes/Domino, PHP, Photoshop, SEO, XML
Rob Weir has done some interesting stats on XML parse time of real documents and the effect of increasing the elements and attribute names. The blog article is calledThe Celerity of Velocity. The result? Even though we expanded some NCNames...
Permalink