Thursday, March 29, 2018

Adding biography section into elsevier latex article


Mostly in research community Latex is used to write the articles that are published in different journals. Biography section is the last section in all articles. IEEEtran and elsarticle are the most widely used latex template which offer multiple commands to represent the research content/data in different manner. For example, IEEEbiography command is used to write the biography section in IEEEtran template. But no such similar command is available if you write the article using elsarticle template.

In reality, you don’t need any special command to write author’s biography if you are using elsarticle template. You can compare both the papers. The first paper is published in IEEE and the second is published in Elsevier.
IEEE paper: http://ieeexplore.ieee.org/document/8169111/?anchor=authors
Elsevier paper: https://www.sciencedirect.com/science/article/pii/S0164121216300887#b1

In elsarticle template, you can use following simple code to add biography section.


Code:

1
2
3
4
5
6
\pagebreak
% Biography Section
%\section*{ }
\noindent \textbf{Author1 name} author description goes here.
\subsection*{  } % This subsection (with no heading) is added to give more space between two biographies
\noindent \textbf{Author2 name}  author description goes here. 

Output:

I have observed that, most of the Elsevier journals add the biography section in new page. For this purpose \pagebreak command should be added

Usually in the biography section contains no title is given. For which either you can complete ignore use of \section command or you can use \section command with no title.

The entire content (From Line 1 to Line 6) should be at the end of the document but must be before \end{document} command.


-Thats all

Monday, March 19, 2018

Scheduling Ubuntu program with gnome-schedule

In Ubuntu you can schedule any task to run automatic or on a specific time.
For this either you can use gnome-schedule GUI or using crontab command.

Using gnome-schedule

=========================
1.   First make sure your program is running properly.
2.   Open the terminal (using Ctrl+Atl+t shortcut key).
3.   Enter the following command to install gnome-schedule
sudo apt-get install gnome-schedule
4.   Enter gnome-schedule command in the terminal window to open the desired GUI, as given below.

5.   Now click on "New" button.
6.   Select "A task that launches recurrently" option to execute the programm repeatedly in a specific time inerval.


7. Enter the Description and Command in corresponding fields.
8. Click Advanced radio button to explicitly mention the execution time. Now click on "Add" button.
    Examples:
                    Minute: 5, Hour: 15,  Day: *, Month: *, Weekday: *
                          This will execute the program Everyday, every month, at time 15:05 (3:05 PM)

    Click here to see some examples.  


Using crontab command

==========================
1.   Open terminal (using Ctrl+Atl+t shortcut key).
2.   Enter crontab -e
3.   Add one line in following format at the end of the file.
          <minute> <hours> <day> <month> <weekday> <Command to execute>
4.   Now save the file.

That's all.




Friday, March 16, 2018

Different ways to open a notification/dialoge box in Ubuntu

Different ways to display a dialog box or a status message in Ubuntu.

1.   notify-send -i /home/user/Desktop/notifications.ico "MsgSummary"  "This is message body !!!"

2.
     gxmessage "This is message body"
     gxmessage -file message.txt
     gxmessage -center -timeout 3 -fg RED -file message.sh

3.
     whiptail --msgbox "This is the message" 10 50
     whiptail --yesno "Press wither yes or no" 10 50

4.
     dialog --msgbox "This is the message" 10 50

5.
     zenity --info --text="Here is the message body"
     zenity --calendar
     zenity --color-selection
     zenity --password

Please see user manual of each command for more detailed information.
You can find more ways. Please comment if more options are there to display a message.


-Thanks

Thursday, March 15, 2018

Making the backup process simple and automatic

Let's we have two Ubuntu servers:

Server-1: IP: 1.2.3.10 (source server )
                 user account name: user1
                 user account password: user1
                
Server-2: IP: 1.2.3.11 (Destination server)

--------------------------------------------------

On Server-1
1. Install openssh-server. You may install through terminal.
2. configure openssh-server if needed, else leave it to the default configuration.

On Server-2
1.  Install openssh-server and sshpass through the terminal.
2.  Change the current directory to $USER/Desktop/backup
3.  Create the directory "data"
3.  Create a password file "pw.txt" with following content.
"pw.txt" content
user1
 4.  Create a shell script file with the name "backup.sh" with following content.
backup.sh content
sshpass -f pw.txt scp -r user1@1.2.3.10:data/*  /home/server2/backup/data/

5.  Make sure pw.txt and backup.sh files are in the same directory.
6.  Execute following command in the terminal
    bash backup.sh
   This  will copy all the content from user1@1.2.3.10:data/ path on Server-1 to /home/server2/backup/data/ directory on Server-2.

--------------------------------------------------

Now its time to schedule the bash backup.sh command to execute in a specific time interval

Make sure you have gone thorugh crontab manual page or gnome-schedule GUI. You may also go through this page to know more details on crontab and gnome-schedule.

1.  Open terminal
2.  Enter following command
crontab -e
3. If you are executing this command for the first time, it will ask for the choice to open an editor.
4. In the editor add following line at the end of the file.
0,12 * * * * bash /home/server2/backup/backup.sh
5. Save and exit the editor.

You can also use gnome-schedule command to schedule the "backup.sh"


-Thats all



Sunday, March 11, 2018

Installing Docker on Ubuntu 14.04 OS [Update]

Steps:

  s1:    sudo apt-get update
  s2:    sudo apt-get install \
                  apt-transport-https \
                  ca-certificates \
                  curl \
                  software-properties-common
  s3:    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  s4:    sudo add-apt-repository \
                  "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
                  $(lsb_release -cs) \
                  stable edge"
  s5:    sudo apt-get update
  s6:    sudo apt-get install docker-ce
  s7:  For testing the docker
           sudo docker run hello-world

 Create the "docker" group
   sudo groupadd docker
Add the current user to the "docker" group
   sudo usermod -aG docker $USER

Now logout and then login again from the currnet session.

You can download and run the following shell script file.
InstallDocker.sh