Archive for 2010 March

  • Removing index.php From URL in CodeIgniter

    2010
    14
    Mar
    2

    In Code Ignitor by default all URLs except the default home contains "index.php" by default in the URL, For example http://localhost/index.php/class/function.

    In order to make the URLs "cleaner", we have to remove "index.php" from the URL. This is done using the mod_rewrite module in apache to redirect all traffic to index.php/. The following code inside .htaccess does the redirection.

    Read More

  • JQuery make dynamic draggable and droppable containers

    2010
    14
    Mar
    1

    The jquery UI javascript has the Draggable and Droppable Interactions inorder to implement a drag drop UI. By default draggable and droppable containers are marked draggable and droppable by jQuery when the page loades, As shown in the code snippet below for the jQuery Drag code and jQuery Drop Code,

    jQuery Drop Code using jQuery droppable

    $(".dropTarget").droppable({
            drop: function(event, ui) {
               // Drop Logic
            }
        });

    jQuery Drag Code using jQuery Draggable

     

    Read More

  • Permission Denied on Hosts File (Windows 7)

    2010
    08
    Mar
    2

    On Windows 7, I was trying to edit the host file using Komodo and was getting Permission Denied, and tried notepad too still got permission denied. I thought initially it was McAfee Anti Virus that was disabling the edit of host file as this file is an important system configuration file.

    Read More

  • PHP file_get_contents giving garbled output

    2010
    08
    Mar

    Are you getting garbled values when using file_get_contents fetching an external URL (website scrapping using php) and wondering what went wrong ? The content is appearing to have wierd characters instead of normal HTML output because of GZIP output encoding by the website you are fetching.

     <?php echo file_get_contents("http://www.example.com"); ?>

    You can fix this issue in multiple ways.

    Method 1 : Accept-Encoding

    Read More

  • CHDK for Canon SX120 IS Camera ( Canon Hack Development Kit )

    2010
    06
    Mar
    7

    Canon SX 120 IS CHDK Camera

    CHDK is not yet officially released for Canon SX 120 IS, but I found a development version which works for my Canon SX 120 IS.

    About CHDK

    Read More

  • Sony Vaio Gamma error and color is not saved (Nvidia Geforce GT 300)

    2010
    02
    Mar

    The default settings on my Sony Vaio CW Series laptop had wrong Gamma settings, therefore the color reproduction on the screen was slightly on the redish side.

    The setting on the Display on Control Panel was not getting saved due to some reason (Windows 7). This issue can be resolved by changing the Gamma setting on the Nvidia Control Panel as shown highlighted in the image below. The Control Panel can be accessed from the desktop by Right-Click on the desktop.


    Read More

  • Correct Colors displayed on Laptop / LCD Screen on Windows 7

    2010
    02
    Mar

    Laptop and LCD Monitors are poor in reproducing the actual colors compared to conventional Cathode Ray Tube (CRT) Monitors. If not properly caliberated, the colours displayed can vary drastically. If you are using a laptop or LCD monitor, see the coloured box below.

     


    The above box is a very light gray color. If your gamma or colour is not caliberated correctly the box can appear reddish, bluish or greenish.

    Read More

  • Make WWW::Mechanize do not exit on GET Errors

    2010
    02
    Mar
    2

    When using PERL and WWW::Mechanize, your script can stop if there is some error in GETing a URL (such as 404 Not Found, 403 Permission Denied). Instead of resuming, the script terminates. If you want the script to continue resuming, you have to pass

    autocheck => 0

    in the Mechanize class constructor as shown below

    my $mech = WWW::Mechanize->new(autocheck => 0);

    Read More

  • Sony Vaio CW VPCCW26FG Windows Experience Index

    2010
    01
    Mar

    The Sony Vaio CW Series (VPCCW26FG) Got Experience index of

    5.8

    More Details

    Component Details Subscore
    Processor Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz 6.7
    Memory (RAM) 4.00 GB 5.9
    Graphics NVIDIA GeForce GT 330M 6.3
    Gaming graphics 2263 MB Total available graphics memory 6.3

    Read More