The Gambit feature for Openspace is ready! Inspired by Automator (for Macs), Scheduler (for Windows) and the unix cron, it is a really useful tool to help automate tasks based on a programmable Action -> Reaction rule. E.g. When the clock strikes 10, throw out the garbage, you get what I mean. There are a range of other Actions (something like a listener), such as OnAdminLogon, OnLogOff and etc.
Tuesday, November 6, 2007
Date/Time related Meta-level methods
I had written two new Openspace Meta class methods today. sf_getUnixTimestamp($id,$att,$iatt,$obj) returns the total seconds of a given object value since epoc. The second one (which rides on the prior function) sf_getZendDate($id,$att,$iatt,$obj) returns a ZendDate object. How are these function useful? The first is to do a DB query of a timestamp datatype without having to convert the resulting value into some readable format. ZF docs say this is the fastest means of getting data out of a database, using it to create a Zend_Date object. That is of course, what the second function does. Bottom line, Openspace developers now have a easy way to create Zend_Date objects, and this in turn, makes date and time manipulation so much more easier. Weeehoooooo!
Tuesday, October 30, 2007
Microtime()
Never thought I will ever come across the use of a microsecond but I did today. In churning out temporary files with a unique filename at a rate of about 16 per second, the microsecond comes in really useful, much more convenient and safe than using random numbers to gain uniqueness. The microtime() function is magic.
Monday, October 29, 2007
Friday, October 12, 2007
PHP and Oracle
http://www.networksasia.net/article.php?type=article&id_article=2189
This is a good article (see link). What's good:
- Oracle's Ken Jacobs (VP of Product Strategy) expects PHP to strengthen further
- PHP makes up 1/3 to 1/4 of web applications on the internet
- The New OCI8 driver for PHP will up PHP to DB performance
Saturday, October 6, 2007
PHP succeeding where Java isn't
http://www.news.com/Andreessen-PHP-succeeding-where-Java-isnt/2100-1012_3-5903187.html
This article (see Link) "PHP succeeding where Java isn't" is pretty good. Which one dominates does not really matter. Java is my mother tongue, but over the years, I had grown to really like using PHP, mostly for its incredible community, which is less dominant-centric than Java, by the looks of it.
Tuesday, August 14, 2007
DB Metadata: Getting all tables in a tablespace
I was asked by a colleague today:how to show all tables in an Oracle tablespace?:
SELECT UNIQUE(TABLE_NAME) FROM USER_TAB_COLUMNS
There's another way to do it using some form of other metadata available within Oracle. Anyhow, the USER_TAB_COLUMNS table contains a lot of other useful info especially when doing programming at/for the higher metas.
