Guldasta (A bouquet of flowers)

… because life is about varied experiences

  • Subscribe

  • Blog Stats

    • 37,543 hits
  • Disclaimer

    All which I express here are my independent views/opinions and are not necessarily influenced by any organization I work/correspond with.

Archive for September, 2008

‘knew’ to me …

Posted by imdad on September 13, 2008

(infact not very ‘knew’ to me) .. i had been experiencing this for quite a while now .. remembered to blog it just now:

i have a notebook (Acer laptop) .. which runs xp .. the lazy-me just closes the lid, and the laptop hibernates.

Chrome window does not respond (actually the tabs crash on reloading the page) after resuming from the hibernation .. !!!

Firefox and IE work well …

I have reported a bug 😉

Posted in IT | Tagged: , | Leave a Comment »

Prototype.js lessons

Posted by imdad on September 13, 2008

Hey,
I repeated the same mistake .. so i chose to warn you.

Wrong Code:

coolFunction1 = function(){
  var data;
  new Ajax.Request('some_weird_url_json.php',{
    OnSuccess: funtion(transport){
      data = transport.responseJSON;
    }
  });
  display(data); // attempting to use the 'data' variable
}

What we wud expect is that the whatever value we have got back through the ajax request will be immediately available, WRONG, callback OnSuccess is only triggered ‘on-success’, so any attempt to use the latest ‘data’ should be inside this callback.

Correct Code:

coolFunction1 = function(){
  var data;
  new Ajax.Request('some_weird_url_json.php',{
    OnSuccess: funtion(transport){
      data = transport.responseJSON;
      display(data); // phew .. tht was the problem
    }
  });
}

Posted in IT | Tagged: | 2 Comments »

‘knew’ to me …

Posted by imdad on September 13, 2008

Just found out that the built in chrome plugin to render pdf files is a bit buggy … =>

Posted in IT | Tagged: | 1 Comment »

httpd/apache not parsing php

Posted by imdad on September 9, 2008

My .php files where not being parsed at the server and where being offered as download files at the remote browser. I googled the problem:

  • enable php in apache
  • httpd not parsing php
  • apache not running php

I was redirected to various forums, helping with the appropriate config… But all was fine with my config, the AddType, AddHandler all were present in the httpd.conf and conf.d/php.conf files and also the appropriate php5 module was loaded.

Then i went my root folder, public_html, in my case (may be /var/www/html/ in your case).
There i listed all the files .. also the HIDDEN ones.

there was a .htaccess file … whose contents were:

AddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4

I DELETED this file.
Atlast, the server was now parsing the php code.

Posted in IT | Tagged: | 2 Comments »

stuck with Chrome ..

Posted by imdad on September 4, 2008

I am writing this post through the chrome browser, because the adjacent firefox browser is stuck with a very very heavy javascript script.

Now the beauty is that i ran the same script on this Chrome browser also (in another tab) but it has already finished.

What were the tests?

Well .. i used the wz_jsgraphics library along with prototypes sugar candy methods to draw some complex structures on the browser.

also .. i found the javascript debugger nice .. its gdb like command interface suits me ..

Posted in IT | Tagged: , | Leave a Comment »