Category: Tips

Generate and Format Last Updated in PHP 0

Generate and Format Last Updated in PHP

As a reader of many on line product reviews, I am always interested in the time this review is relevant for. As time pass things change and review get stale.

If you have this need as a webmaster and your review is file based (as appose to DB) you can use the filemtime function to automatically generate the last updated:


$LAST_UPDATED = date ("F d Y", filemtime('review.php'));

Where review.php is the file that holds the product review for example.

What’s a shareholders’ agreement? 0

What’s a shareholders’ agreement?

You have a great idea for the next big startup and a good friend or two to implement it. It does not matter if it is an Open Source or Non Open Source company you got to know your basics:

Tip: how to write an XML document with JSP for AJAX applications 2

Tip: how to write an XML document with JSP for AJAX applications

AJAX applications usually connect to a server side application and request data in the form of XML. When the server side is written in JSP (Java Server Pages), for example a spring-framework web application with JSP views, writing the XML response is sometimes problematic.

The problem:

When using JSP to format the data in to XML and send it to the AJAX application, the XML is not recognized as XML (empty DOM object) and the AJAX application does not function properly.

Removing the Ant Configuration Selection in eclipse 10

Removing the Ant Configuration Selection in eclipse

When I updated to eclipse 3.2 I found a new irritating feature:

The problem:
The first time when selecting the Run As-> Ant build… on any of the ant tasks (targets) you have in your build.xml file, you get a window called “modify attributes and launch.”

After that any time you try to run an ant task (with or without the build…) you get an annoying “Ant Configuration Selection” window that makes the ant running process a click longer.