Skip to main content

Posts

Metaheuristics

Generally speaking heuristics aim to find a good enough solution to a problem in a reasonable amount of time. These are mostly based on experiences and common sense. Metaheutistics iteratively tries to improve a candidate solution with respect to a given measure of quality.They rarely make assumptions about the problem being optimized They can search very large spaces of candidate solutions. Whereas they do not guarantee the finding of an optimal solution. Some of the popularly used metaheuristics for optimization problems are: • Simulated Annealing (SA), • Particle Swarm Optimization (PSO), • Differential Evolution (DE), • Genetic Algorithm (GA), • Evolutionary Strategy (ES).

secure shell (ssh)

Two machines running a server and a client running respectively can be connected securely via ssh.  ssh user@serverIP example: ssh tom@203.159.11.42 Every time a user logs in to the server user have to provide password for getting into the server.Whereas passwordless authentication using the public key is considered more secure while loggin to a remote server. For that the following steps should be followed: 1. Generate public/private rsa key pair: ssh-keygen -t rsa When password is asked just hit a "ENTER" to leave it empty 2.Now use ssh to create a directory ~/.ssh as user (e.g. "tom") on server(e.g. 203.159.11.42). ssh tom@203.159.11.42 -p .ssh 3.Copy key to remote server cat .ssh/id_rsa.pub | ssh tom@203.159.11.42 'cat >> .ssh/authorized_keys' After finishing these three steps, login to the remote server with ssh will not require password.

Installing NS-3 in Ubuntu

Installing testing it and running NS-3 in Ubuntu 10.04 NS-3 is a discrete-event network simulator basically for simulating Internet systems. #The list of Dependency for ns 3.12(sorry if something is missing): sudo apt-get install gcc g++ python sudo apt-get install gcc g++ python python-dev sudo apt-get install mercurial sudo apt-get install bzr sudo apt-get install gdb valgrind sudo apt-get install gsl-bin libgsl0-dev libgsl0ldbl sudo apt-get install flex bison sudo apt-get install g++-3.4 gcc-3.4 sudo apt-get install tcpdump sudo apt-get install sqlite sqlite3 libsqlite3-dev sudo apt-get install libxml2 libxml2-dev sudo apt-get install libgtk2.0-0 libgtk2.0-dev sudo apt-get install libgtk2.0-0 libgtk2.0-dev sudo apt-get install vtun lxc sudo apt-get install uncrustify sudo apt-get install doxygen graphviz imagemagick sudo apt-get install texlive texlive-pdf texlive-latex-extra texlive-generic-extra texlive-generic-recommended sudo apt-get install python-sphinx dia t...

Graph: Ms Excel 2010

To plot a graph in Microsoft Excel 2010 by taking the column data as axis in the graph: 1.Highlight the column data that you wish to plot. 2.Insert-> scatter graph If you wish to plot a chart of X1 and X2 against Y X2 X1 Y 88 123 100 188 234 200 350 345 300 500 456 400 Select these columns, goto insert and then click scatter chart. This will give the following chart: But this is not what we want. Now plot X2 and Y , then plot X1 and Y. Then copy the curve from a plot and paste the curve to another plot. If you wish to edit the style of the plot. For e.g. changing the thickness of the graph line: 1. Right click on the graph -> format data series -> line style -> width (you can specify the thickness value here) If you wish to scale the range of x-axis and y-axis data values: 1. Double click on th ex-axis -> axis options -> set the minimum/maximum values ( you can also change other values as you need) If you wish to label some data points: 1. Double click on the curve -...

VirtualBox in ubuntu10.04

VirtualBox is a virtualization tool which allows us to install and run different OS like windows and linux. I had tried installing ubuntu10.04 over ubuntu 10.04. To install it in Ubuntu (10.04 for now): i. go to Ubuntu Software Center and search for Oracle VM VirtualBox, then click install. ii. Goto virtualbox.org -> Downloads and get the package that you need for your system (For e.g. ".deb" package for Ubuntu) iii. Install virtualbox from commandline: sudo apt-get update sudo apt-get install virtualbox-4.1 If writing the version number fails then trying without version number might work: sudo apt-get install virtualbox After installing the Virtualbox, we can install any Operating System over it. Installing a new OS is more or less similar to installing an OS in a new computer but you need to do some more before proceeding to install the new OS: i. Open the VirtualBox window, then Press New button and create a new Virtual Machine. ii. Specify the Name (e.g...

Post Scripts in blogs

Posting scripts in the blogs is not straightforward. I came across some ways to do so: Method #1: Simple Approach: This will display the script as follows: Print("This is my code in codebox"); Method#2: Better Approach: 1. Login to your Blogger account. 2. Goto Design and then Edit HTML. Then you will see the script for your current blog template. 3. Backup your current template by clicking at "Download Full Template". You may skip this step if you are confident that you do not need it afterwards. 4. Find ]]></b:skin> in the code and add the following code just before ]]></b:skin> : .code {color: #006AB0; border : 1px solpd #DfADADA;padding : 5px 5px;font-family : Consolas, "Courier New", Courier, mono, serif;font-size : 12px;background-color : #fAfAfA; width : 90%;overflow : auto;margin : 10px 0 10px 10px; border-left : 20px solid #DADADA;max-height : 500px;min-height : 16px;line-height : 16px;} .code:hover {background-c...