Archive for March 2007
Getting first and last day of the month
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")));
Monitoring PC temperatures
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.
Failure to execute child process
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.