tclogo



HotelsCombined.com

Pages

Archives

Categories


Recent Postings

Recent Comments

Feeds

RSS2 feed

Links

Most Popular Posts

Archive for March 2007

Getting first and last day of the month

Saturday, 31st March 2007 11:30pm
Earlier today I was working on this form with two textboxes which had to initially show the first and last day of the current month respectively.


So I wanted a compact way of doing this using PHP without using a function or method and show the date in format d/m/yyyy. The first day of the month is straight forward and I could have used something simple like this:


$dtFirstDay = "1/" . date("m") ."/" . date("Y") ;


This could have done it but in the end I settled for a method with similar formulations for both first day and last day and hence:


$dtFirstDay = date("j/n/Y", mktime(0, 0, 0, date("m") , date("d")-date("d")+1, date("Y")));


and for last day:


$dtLastDay = date("j/n/Y", mktime(0, 0, 0, date("m")+1 , date("d")-date("d"), date("Y")));

delicious delicious | digg digg

Category: Php | Comments : 17

Monitoring PC temperatures

Thursday, 15th March 2007 9:59pm
For a little while now I have been monitoring the temperature inside my PC using a simple utility called SpeedFan.


I decided to start monitoring the temperatures inside my PC one day when I heard some unusual noise from the fan and I just thought that it was good to have an idea of what is happening rather than for the PC to just stop functioning or start giving problems and I saw that SpeedFan could easily do the job for me.


Basically what SpeedFan does is monitor the data collected by the system and then make it available for the user to peruse and take action if necessary. The action I took last time was to simply clean out the dust and since then everything seems to be fine.


I also quite like the fact with SpeedFan I am able to run my PC as quietly as possible and depending on your computer hardware you can also change the fan speed which is a handy function.


It would be interested to hear what other similar applications others use to achieve the same thing.

delicious delicious | digg digg

Category: Freeware | Comments : 1

Failure to execute child process

Sunday, 4th March 2007 7:40pm
A fortnight ago when I tried to launch Firefox on Ubuntu I got this error: There was an error launching the application. Details: failed to execute child process "firefox" (No such file or directory)


My first reaction was to just uninstall it and then install it again and so I tried uninstalling Firefox using the Synaptic Manager and then re-installing it again and I still got the same error.


I also tried to uninstall using the command line using
apt-get remove firefox


and then installing using
sudo aptitude update && sudo aptitude install firefox


or reconfiguring it with
dpkg-reconfigure firefox


but all this failed and also after getting no answer from the Ubuntu forum in the end I decided to just use Konquerer and Opera instead.


However, after this morning's update which incidentally also included a Firefox update, my Firefox is working once again but I still have to figure out exactly what the failure to execute child process error was all about.

delicious delicious | digg digg

Category: Ubuntu | Comments : 5