Subtracting two dimensional arrays in PHP
In the development a WordPress plugin I had to subtract two dimensional arrays. I tried array_diff() function, unfortunately it doesn’t seem to work for two dimensional arrays. Even if it worked, it...
View ArticleTrying cakePHP, lets see how it goes.
My growing list of direct AD sales was becoming hard to manage, dealing with direct AD sales was taking more time than it should actually take. It’s not streamlined. I lost AD revenue several times...
View ArticleMake command not found in Mac OSX
If you get a -bash: make: command not found error while trying to compile from source, you have to install xcode and then in xcode goto preferences->downloads and install xcode developer tools...
View ArticleError whil creating super user in django1.4 on MAC
I got the following error while trying to create a super user from shell for django1.4. File "/Library/Python/2.7/site-packages/django/contrib/auth/management/__init__.py", line 85, in...
View ArticleWhere are python site packages located in MAC OSX Mountain Lion
Python site packages are located at Library/Python/2.7/site-packages
View ArticleRight way to break Django code for debugguing
Django traceback is a very helpful tool in Django development. It saves us from the boring tasking of writing print statements to track variables. Traceback doesn’t kick when there is no error. There...
View ArticleMongod error | exception in initAndListen std::exception:...
I got this error while trying to start mongodb on amazon ec2. Running this command in the terminal solved the problem. export LC_ALL=C I don’t have any idea about what it means at this time except that...
View ArticleWhat do Dollar and Caret ( $ and ^) sign in Django urls mean?
$ and ^ are regular expression characters that have a special meaning: the caret means “require that the pattern matches the start of the string,” and the dollar sign means “require that the pattern...
View ArticleRestrict Django Templates From Deleting Data.
Django allows method calls inside template system. Though this is an useful feature, some of the methods will have side effects. Mostly the ones that alter data. Say, for instance, you have a...
View ArticleDjnago | Set the defulat ordering rule for queries in the models
Though we can specify order explicitly in queries like below Posts.objects.order_by('published') it is repetitive and most of the times we will want to order by a particular field. We can specify the...
View ArticleUnable to connect mysql on OSX form PHP
If you are unable to connect to mysql from PHP and you are sure that MYSQL is running, then try changing your host name from localhost to 127.0.0.1
View Article2 Common errors while setting up phpMyAdmin on Mac OSX
You might encounter the following two errors while installing phpMyAdmin on OSX Login without password is forbidden by the configuration ( See AllowNoPassword ) #2002 can not login tot the MySQL server...
View Articleerror: command ‘cc’ failed with exit status 1; Can’t install PIL, Pillow,...
If you are getting the following error when installing python packages using PIP or easy_install, don’t worry. You have come to the right place for solution. First make sure you have developer tools...
View ArticleAdding dynamic classes to your custom WordPress widgets
I recently released an ad management plugin for WordPress called “Easy AdSense Ads & Scripts Manager“. In this plugin we have a custom widget with option to remove the padding and borders (if any)...
View ArticleHow to enable auto complete for git commands and branches on Mac OSX terminal...
If you want to enable tab auto complete at the command line on Mac OSX terminal, there is a handy auto-completion script you can use.<a...
View ArticlejQuery/Javascript click event not working on and elements in iOS Safari webkit
Recently we had to add a expand collapse icons for the navigation menu on mobile devices in our WordPress theme. We can not use pseudo-classes :after and :before as they are not part of the dom and any...
View Article
More Pages to Explore .....