Sunday, August 26, 2018

acmart formatting

To remove the citation information below abstract add the following in the main file.
\settopmatter{printacmref=false} 
To remove footnote with conference information in the first column 
\renewcommand\footnotetextcopyrightpermission[1]{}

Wednesday, February 28, 2018

Shortening the Authors list using et al in ACM Latex

Edit the .bst file and replace the following section of the code
FUNCTION {format.names}
nameptr #1 >
        {
          nameptr #A
          #1 + =
          numnames #B
          > and
            { "others" 't :=
              #1 'namesleft := }
            'skip$
          if$
And replace A with the number of authors that you want to displace
and B with the max number of authors that this snipet won't be applied. 

Wednesday, February 8, 2017

Installing tcpdump for Android

  • Download a tcpdump precompiled binary for ARM (Tcpdump-4.2.1-arm.tar.gz) from http://omappedia.org/wiki/USB_Sniffing_with_tcpdump. Decompress to obtain the tcpdump binary.
  • Connect Android device to computer via USB cable, open a command terminal and execute the following commands:
adb push tcpdump /sdcard/tcpdump
adb shell
su
mount -o remount,rw /system
cat /sdcard/tcpdump > /system/bin/tcpdump
chown root:shell /system/bin/tcpdump
chmod 754 /system/bin/tcpdump
mount -o remount,ro /system
rm /sdcard/tcpdump
tcpdump -X -n -s 0 port 80
Source: https://josetrochecoder.wordpress.com/2013/11/04/installing-tcpdump-for-android/

Recovery and installing customer OS in Android phone

First download the platform-tools from Android SDK website. And then extract the tool and place your terminal to this directory. Now you are ready to run different commands. For example, running adb devices lists the connected device with the computer.
- To reboot the bootloader adb reboot bootloader
- To unloack the device fastboot oem unlock
-  To flash a new image fastboot flash boot <address of the image file>

Rooting android device
https://www.wondershare.com/android/how-to-root-nexus-5.html

Thursday, September 29, 2016

Tips in submitting IEEE camera ready version

As a rule IEEE requires to submit the source file of the article. If the article is written using LaTEX, the source file should be converted to .DVI format and the graphics should be in vector format, e.g. .eps format. 

To convert pdf graphics to eps format:
use pdftops 
for p in $PDF; do
        pdftops -f 1 -l 1 -eps "$p"
done

To convert tex file to DVI, use latex 

$(basename).dvi: $(TEXT) $(FIGURES) *.bib
             latex $(basename).tex #first dvi
             bibtex $(basename).aux #add biblo files
             latex $(basename).tex # generate teh dvi
             latex $(basename).tex #not sure if necessary
             dvipdfm $(basename).dvi # generate pdf

The put every files in one directory and zip it and upload ;)

Monday, August 26, 2013

Recover Deleted Files in Linux

You need only few microseconds to lose your files which you have done by spending more that few hours or days even. But thanks to Smart guys there are ways to recover it fully or partially.
First of all,  come on, Calm down! it is not only yours but also happened to others.... just follow these simple steps:

  1. Install a tool called "foremost" which  is used for recovering deleted files. Type sudo apt-get install foremost in your shell terminal. 
  2. Find the name of your disk by using the command sudo fdisk -l.  This command lists all the drives found in your system including the pen drives (if plugged)Assume we want to recover the files deleted  from a disk /dev/sdb1 
  3. Create an image of the drive you want to recover by using sudo dd if=/dev/sdb1 of=/home/myimg.img, Where /dev/sdb1 is the name of the drive to be recovered and /home/myimg.img is the out put location and file of the recovered file. 
    Please note that, make sure  to have enough space in out put directory. If you don't have you can use external storage devices.  This step may take long time depending on your disk size and how large your files have been. So be patient and wait until it finish. If you are not patient google for other solutions or redo the work :-) 
  4. Once the recovery  image is created give a permission for the user by typing sudo chown name.name /home/myimg.img Where name is the name of the user in your system. 
  5. Create a directory for your recovery files. Lets use the home directory; use this command  mkdir recovery when recovery can be any valid name  directory.
  6. Use this command and recover your files. foremost -vqQ -o recovery/ -t type -i mypendriveimage.img Where the option -t type specifies the file format (e.g. pdf, doc...) you want to recover from the image.  This tool currently supports some common formats only. As a result ofg this you may not get back the file you are looking. After this step completes check the recovery directory, and you can get the recovered files organized by file format. However, the file name of the files is a number not the original file names. It is a bit difficult to filter your file from very huge (really depends on your files) list of files. Most probably the first file recovered may be the latest file created in your system. You can check audit.txt file created during the recovery to know which is recovered first.  Otherwise use other commands such as grep to get your files or manually (would be very tiresome and may be easier to redo the work :-) ) check each files.... 
Still you don't get your files.... Uhmmmm .... be calm and google around or redo it. Or Write a program that can recover deleted files.... and share to us as welll ;-) 

The best way is DON'T DO SHIFT PLUS DELETE unless you're quite certain that you don't need the files in the future.  

Reference: 

Wednesday, July 24, 2013

'tasksel: aptitude failed (100)' error while Installing LAMP server in Ubuntu

While installing LAMP server in Ubuntu tasksel: aptitude failed (100) may occur. This might be due to a previous installed mysql database server or a trace of mysql in /etc/lib directory. So, the simple solution is to remove mysql database server. Other wise use other methods than 'tasksel' to install LAMP :)