Author Archives - mubashshir

Possible update counterCache Function

I haven’t tested this yet. But it is a possible update counterCache function.   <code> function counterCheck( ) {   $counterTemplate = “UPDATE :atable AS :amodel SET :counter = ( SELECT COUNT( FROM :table AS :model WHERE :model.:foreignkey = )”;   $updates = array();   $models = Configure::listObjects(‘model’) ;   foreach ($models as $model)…

monitor the memory usage of unix server

“To monitor the memory usage of unix server, you can log in and run the ‘top’ command at the command line.  Hit q to quit the program  On the Swap line, if the free value approaches zero, the system is seriously running out of RAM.  Another symptom is the load average (on the top line)…

service httpd restart

If you notice the server starting to thrash, as root you can type “service httpd restart” and Apache will be restarted freeing all the memory it has consumed.  However, but the time it has reached this point, it is hard to log in and run any commands.

FlowingData: How to Make an Interactive Network Visualization

I have looked at d3 network visualization demos / tutorials before. I always tell myself I will do it. But I need to get on this. Link below is to a tutorial on flowing data.