Pages

Wednesday, May 29, 2013

Find if variable exists or defined in javascript

For example

if(typeof selected_val === 'undefined')
{
 alert('Variable selected_val does not exist');
}

Changing password in phpmyadmin ubuntu 12.04

In the ubuntu console type the following one by one

sudo /etc/init.d/mysql stop
sudo mysqld_safe --skip-grant-tables &
mysql -u root
use mysql;
update user set password=PASSWORD("mynewpassword") where User='root';
flush privileges;
quit

Reset Mozilla Firefox

  1. Under the main menu click on Help -> Troubleshooting Information
  2. At the right side there will be a box to reset firefox
  3. Click on 'Reset Firefox...' button
  4. Firefox will now be restored to its default initial state

Monday, May 20, 2013

Set path to run java code in windows xp command line

Type the following code in the console

set path=%path%;C:\j2sdk1.4.2_04\bin;.;

where C:\j2sdk1.4.2_04\bin - represents the javac directory and the ending dot represents the current directory where file is stored.

Parse error in codeigniter on wamp

Change the value of the following line in \application\config\config.php from FALSE to TRUE.

$config['rewrite_short_tags'] = TRUE;

And in the wamp php.ini file

short_open_tag = On

This can be found under the heading

;;;;;;;;;;;;;;;;;;;;
; Language Options ;
;;;;;;;;;;;;;;;;;;;;