How to use callback functions in php frameworks
Cakephp, Codeigniter, Symphony, Kohana etc all these OOP framework. I feel comfort with cakephp for its wonderful features. BTW – you should be careful when you use callback function like array_filter, array_walk etc inside your code with OOP script, error/wrong may happen for new php programmer. Mistakenly you may call them in wrong way, lets consider the following codes -
Read the rest of this entry »
Low disk space issue in windows
I use windows xp for my home pc. For the last few days – my life became hell for the low disk space issue. I was trying to find out the culprit. As first step, i’ve deleted temp files (Got temp files From Start Menu>Run, then %temp%). After two/three days, the notification( low disk space) again came. Then i’ve deleted windows updates files which may be useful for rollback, these files are c:/windows/$hf_mig$/ folder and folders like
c:/windows/$NtUninstallKB915865$/
……………………..
…………………….
I’ve deleted them as i didn’t use rollback for any windows update before and no chance for future too
. It released a huge space.
Read the rest of this entry »
Drupal error in Mac – shows blank page?
I played with Mac somtimes before and i love my Mac(mini) but as a windows user it was little tough for me to get into in. Yesterday my OS chrashed(windows sucks), so i think(not sure?) – i will be fulltime Mac user(at office). BTW – i was working on a realty project with drupal with two of my mates using assembla(http://www.assembla.com/) svn. So i got a working copy on my Mac and tried to run it using MAMP. After run it – i saw just a white page!!!
Read the rest of this entry »
10 tips to speed up your ExpressionEngine sites
1. Cache
Cache, cache and cache. It’s the first step to make your site faster. It’s great news that expressionengine comes with excellent cache features – query cache, tag cache, template cache etc – turn them on.
Query Cache – Query Caching caches the output of your database, saving each query as a text file. When your visitors access your web pages, the cache files are examined to see if the particular queries being requested exist in cached form. If they do, ExpressionEngine uses the cached data instead of querying your database. This provides a significant reduction in your overall database load. The query caching system is completely dynamic.
This feature is found under Admin>Weblog Administration > Global Weblog Preferences.
NOTE: Dynamic weblog query caching will cause weblog queries to not behave as expected when set to: orderby=”random”
Read the rest of this entry »
New array functions introduced in php5
Here is the list of new array functions introduced in php5 so far –
array_combine — Creates an array by using one array for keys and another for its values
<?php
$a = array('green', 'red', 'yellow');
$b = array('avocado', 'apple', 'banana');
$c = array_combine($a, $b);
print_r($c);
?>
Array
(
[green] => avocado
[red] => apple
[yellow] => banana
)
Macbook Pro 13.3
Nikon D90