Skip directly to content

Blogs

Array to Hash in Ruby

on Thu, 08/11/2011 - 19:18

To be able to converting hash into array in Ruby is easy but how do we convert an array into a hash? This tutorial did the ruby array to hash trick.

Mysql "If exists update else insert" performance dilemma

on Thu, 12/16/2010 - 07:57

Everyone who uses databases is in the habit of using "If exists update else insert" in the software program. Irrespective of the software program (Oracle, Mysql, Sql Server) and irrespective of the language (Php, ASP, Java). Ever wondered what is the efficient way of doing it.

Typically, we do it this way:

Creating a PDF file with PHP: Tutorial

on Sat, 05/08/2010 - 07:55

In PHP, we have a nice open source library for PDF file generation, FPDF. This library has an extention FPDI that allows for manipulating PDF files. FPDI extracts the content of the pdf, allows you to change it and then output the changed pdf.

Top 5 Javascript slider

on Fri, 04/30/2010 - 07:53

Are you in search of the 'X' factor for your website which could scale it up from its boring look and feel?

You must consider introducing a bit of Javascript element and see the difference. A Javascript slider would be a good first beginning. Images always give a cutting edge to any website and if it is in a slide-show format with beautiful transitional effects what else could you be asking for?

Use Javascript sliders to add life to your website. Let us profile the Top 5 Javascript sliders for you so that you can make up that decision:

Speed up your website using GZIP

on Wed, 04/21/2010 - 07:53

Browser v/s Server – Optimizing Site Using GZIP Compression

In the online world if ever a browser and server interacted in a chat environment, this is what would definitely come up:

SVN Cheatsheet

on Fri, 04/09/2010 - 07:48

This cheatsheet is a quick reference for using SVN,

Create a Repository on Linux: svnadmin create

 To store projects in Subversion/SVN, first you must create a repository.

Drupal Cron Stuck? Log the progress.

on Fri, 04/09/2010 - 07:47

Challenge with Drupal 6 Cron

Drupal cron getting stucked is quite a common problem with Drupal 6 and I found out an interesting way to figure out the reason why it is getting stuck.

Logging as always

As always, the solution is to log at the correct place. Drupal cron is invoked at includes/common.inc in the function drupal_cron_run (around line 2727), so we begin here logging into watchdog. We have to start logging when the cron starts for a particular module and when it finishes as follows:

Firefox tips and tricks

on Tue, 04/06/2010 - 07:45

I was faced with a annoying problem on Firefox for a couple of days now before my mighty brain discovered a fix.

The zoom size on some of the Firefox pages was getting reset to a value below normal and on every page load I had to hit ctrl+0 to get the page reset to its default size. I resolved this issue by making changes to my Firefox zoom limits.

Yum has depsolving problems. What to do?

on Tue, 03/30/2010 - 07:44

Did you ever try to install an application on CentOS using powerful "yum" and had following errors showing up:

Enable mod_rewrite module on apache on Ubuntu

on Tue, 03/16/2010 - 07:42

If you are using Drupal, clean URLs may not work out of the box on your Ubuntu machine. You would need to enable mod_rewrite module on your apache to do that.

Therefore, first enable the module as follows:

sudo a2enmod rewrite

Change all occurrence of "AllowOverRide None" to "AllowOverRide All". Basically all "None" to "All" in the following file:

sudo vi /etc/apache2/sites-available/default

Restart Apache:

Pages