Blog
Useful PHP code snippets and functions | CatsWhoCode.com
Useful PHP code snippets and functions | CatsWhoCode.com.
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(:model.id) FROM :table AS :model WHERE :model.:foreignkey = :amodel.id )”; $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.
USGS Report Series 2011–1042: China’s Rare-Earth Industry
According to US researchers 95 percent of rare earth industry is controlled by China. I stumbled across this article while reading about Pentagon trying to buy up rare earth’s for various military uses. You can find it attached or in the link below. http://pubs.usgs.gov/of/2011/1042/
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. https://www.google.com/producer/editions/CAowtpoM/flowingdata/CAIiEP1jg1drOnN8PC3TcT9b0fUqMggEIhDlFy4k5ajnTsfC5QXSbl75KhwIACIQ_IySbXiwavHpyb8VqOTmZCoGCAowtpoM/how_to_make_an_interactive_netwo
How to setup local PHP debugging with PHPStorm and Xdebug |Antarctic Nest of Icephoenix
How to setup local PHP debugging with PHPStorm and Xdebug |Antarctic Nest of Icephoenix.
Many Eyes : Survey on Income and Living Conditions in Ireland 2010
Visualizations : Survey on Income and Living Conditions in Ireland 2010 I bought the book visualize this written by Nathan Yau creator of the website Flowingdata (one of my favorite data visualization websites). Below is one of the coolest tools I found on the program Many Eyes, I was playing around trying to program a tool…