Posts

MySQL Tips

1) Restore DB a) mysql --user=root --password=root maheshsql_db < "C:\mydbbkp.sql" 2) MYSQL Get all table rows and size of each table in DB a)   SELECT   table_schema   "Data Base Name" ,   SUM (   data_length   +   index_length )   /   1024   /   1024   "Data Base Size in MB"   FROM   information_schema . TABLES   GROUP   BY   table_schema ; b)   SELECT   TABLE_NAME ,   table_rows ,   data_length ,   index_length ,   round ((( data_length   +   index_length )   /   1024   /   1024 ), 2 )   "Size in MB"   FROM   information_schema . TABLES   WHERE   table_schema   =   "schema_name" ; c)   SELECT   SUM ( round ((( data_length   +   index_length )   /   1024   /   1024 ), 2 ))   "Size in MB"   FROM   information_schema . TABLES   WHERE   table_schema   =   "schema_name" ; 3) Count no of tables in DB a)   SELECT   count(*)   FROM   information_schema.tables   WHERE   table_schema     =   &

Bharat Gas Online Refill

If you are a Bharat Gas (from Bharat Petroleum) customer, you can book your cylinder online. Just visit this page and register your details (your Consumer number can be found in any previous cylinder booking slip). After that, you can choose your login ID and Password and proceed to book your cylinder online by visiting the same website. One additional feature, which would be useful for the consumers would be the inclusion of ‘expected date of delivery’, which is missing currently. Apart from Online refill booking, you can book your cylinder through SMS or IVRS. To book cylinder through SMS, you first have to register your mobile number. You can either register by visiting the above link and providing your mobile number or send an SMS as: REG DistributorSAPcode ConsumerNumber And send it to 52725 (Airtel, Tata, Vodafone, Idea or MTNL) or to 57333 (for others). For example, type REG 123456 789012 and send it to above numbers Once you are done with registering your mobile n

#1045 - Access denied for user 'root'@'localhost' (using password: NO/YES)

#1045 - Access denied for user 'root'@'localhost' (using password: NO)                                       OR #1045 - Access denied for user 'root'@'localhost' (using password: YES) If you were restored the MySQL Database, then set the password which is current restored Database at phpMyAdmin\config.inc file 1)     $cfg['Servers'][$i]['user'] = 'root';     $cfg['Servers'][$i]['password'] = 'maheshRestoredDBPassword'; 2) You can try Login from command line C:\xampp\mysql\bin>mysql --user=root --password=maheshRestoredDBPassword

Javascript Prototype - Unobtrusive Timeout And Abort Methods

Reference links 1) http://www.prototypejs.org/learn/introduction-to-ajax 2) http://positionabsolute.net/blog/2008/07/prototype-ajax-request-timeout.php 3) http://www.1point21.org/web-development/javascript/javascript-prototype-unobtrusive-timeout-and-abort-methods 4) https://prototype.lighthouseapp.com/projects/8886/tickets/370-ajaxoptions-ontimeout-enhancement
This is good website about Environmental gadgets.   http://www.envirogadget.com/alternative-energy/alt%D0%B5rn%D0%B0t%D1%96v%D0%B5-en%D0%B5rgy-%D1%96n-ir%D0%B5l%D0%B0nd/

jQuery getJSON with timeout

function testAjax () {         var params = "test=123" ;         var isneedtoKillAjax = true ; // set this true         // Fire the checkajaxkill method after 10 seonds         setTimeout ( function () {             checkajaxkill ();         }, 10000 ); // 10 seconds                         // For testing purpose set the sleep for 12 seconds in php page         var myAjaxCall = jQuery . getJSON ( 'index2.php' , params , function ( data , textStatus ){                           isneedtoKillAjax = false ; // set to false             // Do your actions based on result (data OR textStatus)         });         function checkajaxkill (){             // Check isneedtoKillAjax is true or false,             // if true abort the getJsonRequest             if ( isneedtoKillAjax ){                 myAjaxCall . abort ();                 alert ( 'killing the ajax call' );                             } else {