Search This Blog

15 February, 2013

In Microsoft Word 2010 Leveled Numbering list turns to black box



I searched some forums and got the fix, please follow the below points

1. Put your cursor on the heading just right of the black box
2. Use the left arrow key on your keyboard to move left until the black box turns grey
3. Use the keyboard combination ctrl+shift+s, the dialog "Apply Styles" should appear
4. In this box, click "reapply"



08 February, 2013

taking screenshot in android 4.0 and above

 Taking a Screenshot in Android 4.x

To take a screenshot on your android device from version 4 and above , press the Volume Down and Power keys at the same time.

The screenshot will be saved on the gallery->Screenshots folder, \


you can select it and share through mail/bluetooth etc. and other sharing methods available, same as sharing a normal photos.

05 January, 2013

android: sending SMS programmatically


In android app, if you want to send SMS using the carrier network, you can use the below function. Pass the destination mobile number and the SMS string within specified characters.


public boolean sendSMS(String dstAddress, String smsMessage)
    {
   
    try {
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(dstAddress, null, smsMessage, null, null);
Toast.makeText(getApplicationContext(), "SMS Sent!",
Toast.LENGTH_LONG).show();
} catch (Exception e) {
Toast.makeText(getApplicationContext(),
"SMS failed, please try again later!",
Toast.LENGTH_LONG).show();
e.printStackTrace();
return false;
}
return true;
    }

06 October, 2012

Wireshark compilation from source-code

for Ubuntu
        step1: sudo apt-get install autoconf bison flex libtool libgtk2.0-dev libpcap-dev libc-ares-dev /
libsmi2-dev libgnutls-dev libgcrypt11-dev libkrb5-dev libcap2-bin libgeoip-dev libortp-dev /
libportaudio-dev

step2: tar -xvf wireshark-1.8.0.tar.bz2

step3: cd /tmp/wireshark-1.8.0

step4: ./configure --enable-setcap-install

step5: make

step6: make install

step7: ldconfig


13 September, 2012

Importing Large MySql File Using phpMyAdmin

For importing large MySQL file using phpmyadmin follow the below procedure
i am using XAMPP, same should work with WAMP also

1) Go to the phpmyadmin folder D:\xampp\phpMyAdmin  or D:\xampp\phpMyAdmin\libraries\config.default.php
2) Open the file config.inc.php
3) find the line or insert the below line, this says the upload folder should be where we will be storing the sql file for importing
 $cfg['UploadDir'] = 'upload';
4) Create a folder  ‘upload'  in C:\xampp\phpMyAdmin

Now we can place large sql file, created using mysqldump or mysql export. I had placed a sql file with file name test-db-dump.sql

5) Now go the DB through phpMyAdmin and click on the import tab as seen below,



 
  In the combo box you can see the file we copied,  Now  hit the Go button in the bottom of the page, it will import the whole sql file to your database.


NOTE:
If you get the below error
 Fatal error: Maximum execution time of 300 seconds exceeded in

Edit the phpMyAdmin\libraries\config.default.php
$cfg['ExecTimeLimit'] = 300;


change the 300 to 1000 or more






24 August, 2012

Trimming all fields in MySQL database

UPDATE `table1` SET `tbl_column1`= trim(`tbl_column1`);

The above SQL query  will trim all the fields in the tbl_column1


19 August, 2012

adding user to sudo or admin group in ubuntu

If your system has an admin or sudo group, then we can add the user to that group using the following command.

adduser <username> admin or

adduser <username> sudo.

you should be in sudo or admin login to use the above command

after that if you are not able to get the sudo bash or su -, if you get the below message again

<username> is not in the sudoers file.  This incident will be reported.


Now login to the root user, if you  have permission or boot using Linux resuce CD or boot the PC in recovery mode

1) In root user mode, Type visudo and press enter
this will open /etc/sudoers
add one line...
<username>  ALL = (ALL) ALL


tmux enabling mouse interaction

Add the below line to the ~/.tmux.conf setw -g mouse on save the file and exit from the tmux shell, you should be able to use your mouse to ...