Monthly Archives: December 2007

Using different Date and Datetime format in CakePHP 1.2

This is a really old post. I’ve wrote a new one which you can find it here.

Here I would like to show you a behaviour which will help you to handle different date format than yyyy-mm-dd supported from the database. The reason why I created this behaviour is because in most of my projects I had a requirement to display the date format in human readable format.

So, without extra words here is the behaviour class /Update: thanks to Shark from the comments below we have datetime support as well/:

Continue reading

My experience with Windows Vista

Linux vs. WindowsWhen I started my new job as I mentioned earlier, I got brand new laptop – Lenovo 3000 n200. The machine is quite powerful, but unfortunately it show a defect in the beginning – halted unexpected on OS start and because I throw the wrapping box, the supplier refused to change the machine with new and they suggest to repair it /In fact this is the second reason why I was so quiet last month ;)/.

Quite strange practice – to keep the wrapping box. Imagine what we should do with other desktops, printers, servers and even a rack, if we need to keep all these boxes in the office!!!

So, I had to return it and now I am using a spare machine with Windows Vista Home Edition installed on it. Well, during these almost three weeks I decided to write about my experience with Windows after almost 2 years on Ubuntu Linux.
Continue reading

htmlSQL class – quite nice way of parsing html

Today I found a class written in PHP which implement the idea of using SQL syntax while parsing HTML documents – htmlSQL. The idea of the author – Jonas David John – is quite simple. If you want to parse a HTML document, let’s way you want to parse all divs with class “row”,the syntax will look like normal SQL:

SELECT * FROM div WHERE $class == "row"

Looking familiar isn’t it? There is also function connect() /which define the html source/ and fetch_array() which contain the results after the query.

There are few examples included in the library package and here is the simplest one:
Continue reading

I am alive…

Yes, I am!

There is a reason why I am so quiet these days. As “many” of my fans noticed in my CV 😀 – I’ve changed my job. I moved in the new company called Insch Quotient. The company is brand new and I was quite busy with organizing the hardware supply and as well as other non development stuff. Well somebody need to do this and who is the best person than CTO which in fact is my new position :).

Hopefully soon I will return to my normal mood – infront of the computer most of the time.