Sunday, 29 September 2013

We got a new home.!!!

We have been shifted to our new home
If you have java script enabled in your browser, you'll be redirected automatically our domain.  If you are facing any problem with redirection or you are not being redirected just navigate manually by entering in your browser.


Friday, 2 August 2013

A tiny introduction to Regular Expressions

In this tiny post I am going to give you some information about regular expressions.
A Regular expression in computer science is a  specialized string of characters representing one or more strings of characters having a special format. In other words, a regular expression is a generalised representation of a particular family of strings.
For example the regular expression "^([a-z])([0-9])$" represents a set of strings containing two characters, first letter being a lower case alphabet and the second one being a digit between 0 and 9. That means a set containing strings like a6, a3, s5 and so on.
So what those symbols mean? :
In the above example you can see some special characters like '^' and '$'. But what's that weird string mean?. If this is your question, the answer is simple. They mean what they meant to. Well, don't worry, I will help you to get out of this doubt. The caret symbol( '^' ) tells the regular expression engine about what character should be at the beginning of the string to qualify it as the correct match for the regular expression under consideration. Now coming to the next character '('. The parenthesis is used for grouping in regular expressions as you do in mathematics. Nothing more interesting about it. Let's move to the next character '['. This has a special meaning in regular expressions. The things enclosed inside '[ ]' are called ranges. They are called so because the regular expression engine expands it before matching. For example the range [0-3] will be expanded to (0|1|2|3). Here you can see one more special character '|' or pipe symbol. This is an operator and it is called 'OR'. This tells the engine to match any of the character among all the members inside the range. Let's not go in deep about it and let me continue with our example. So far we have one rule which says the string should start with one of the lower case alphabets. I hope you are getting the picture. Now let's continue to the next group. Next group contains a range '[0-9]'. You know what it means. The next character is '$' or the dollar symbol. This does the exact opposite of the caret symbol. That means, it defines what should be the last character. So now from the range 0-9 and the dollar symbol we have another rule which says that the string should end with a single digit integer. Now from the two rules we have, you can easily understand why the regular expression above represents a3, k3 etc.
Uses of Regular Expressions :
Regular Expressions play a vital role in almost all branches of computer science. Compilers do the extensive usage of regular expressions to check the syntax and even for parsing the source code written by a programmer. Also in web development regular expressions are used for verifying URLs, email addresse etc.
So far we had just a small introduction to regular expressions. There are lot of things in regular expressions and it is impossible to put it all in one post. I suggest you to search on internet for information about this particular topic if you are interested about it.
That's all folks!
Thank you for visiting and don't forget to come back. Also I welcome you for commenting if I deserve anything (good or bad, just comment).

Saturday, 1 June 2013

Basic Terminal Commands

Today i am going to show some of basic terminal commands for doing some basic tasks.

Creating Files:

The 'touch' utility sets the modification and access times to the current time of day. If the file doesn't exist, it is created with the default permissions and attributes.

touch /path/filename

    Above command will create an empty text formatted file in the path and filename provided. If a file with same name already exist, that file will be overwrittenand all it's contents will be lost.
To prevent this following command can be used.

touch /path/filename >> /path/filename

The above command will only alter the the modification date and time settings if the file specified is already exist. Otherwise a new empty file will be created.

Creating Folders/Directories: 

For creating Folders, command 'mkdir' can be used. The general syntax is as below.
mkdir /path/folder_name/

If the command provided only with the directory name without the path, then a directory with the given name will be created in the current directory.

Copying Files/Folders:

'cp' is the command for copying Files and Folders. The general command given below can be used to copy files by replacing the source and destination.

cp /source_file /destination_file

Note: In order to copy directories, '-r' should be used which copies a directory along with it's subdirectories also. i.e., '-r' invokes the recursive copying process.

Removing Files/Folders :

'rm' is the command to remove Files/Folders in UNIX like systems (at-least in Ubuntu). To remove a file located at 'path' use the following command.

rm path/file_name
Note: Use -r if you want to delete a directory tree as you do while copying files and subdirectories of a folder. Here also '-r' invokes recursive execution of 'rm' command for all contents of the parent directory supplied as the path argument.  

Installing Packages:

Installalling packages in Ubuntu is very easy with  "apt-get" and "dpkg" commands. "apt-get" can be used to download and install softwares.
==> If you have already downloaded the debian(*.deb) packages and want to install it then you can use command 'dpkg' as

sudo dpkg -i package_name 
  sudo - Gives Super User or root permissions for the command 'dpkg'
  dpkg - Debian Package Manager
  -i   - Instructs the 'dpkg' to install the specified package
  package_name - Path to your downloaded *.deb package file.

==> If you don't have the software package you want to install then you can use 'apt-get' command to download and install the package from the Ubuntu repositories.
sudo apt-get install package_name

  sudoGives Super User or root permissions for the command 'apt-get'
  apt-get - A simple command line interface for downloading and
installing packages.
  install - Option to instruct the 'apt-get' util to install the downloaded package.
  package_name - Name of the package that you want to download and install from the Ubuntu repositories.

Note:- The package name for apt-get command should be exactly as in the repositories. Otherwise apt-get command will fail with errors.


Wednesday, 3 April 2013

Synaptic Package Manager

What is Synaptic Package Manager?

Synaptic Package Manager is a graphical front-end for the Ubuntu package management system 'apt'. Synaptic brings a very user friendly software management environment combining the power of 'apt' and the simplicity in usage of graphical user interface. Using Synaptic user can install, remove, configure, or upgrade software packages, browse, sort and search the list of available software packages, manage repositories, or upgrade the whole system. And also can queue up a number of actions before executing them. Synaptic will inform the user about dependencies (additional packages required by the software package you have chosen) as well as conflicts with other packages that are already installed on the system. 

How to get Synaptic Package Manager?

Synaptic Package Manager can be installed from both terminal and from Ubuntu Software Center very easily.
1. To Install it from Terminal:
      Open Terminal and type "sudo apt-get install synaptic"
2. To install it from Software Center:
      i. Search for Synaptic or Synaptic Package Manager
      ii. And install the Synaptic Package Manager

For more information on how to use Synaptic Package Manager, you can refer to the Ubuntu Official Documentation.

Updating Ubuntu Package Repositary

What is Repositary?

Repositories are servers which contain sets of packages. In other words Package Repositary is a database where informations about all the softwares available for Ubuntu is stored.
Software in Ubuntu's repository is divided into four categories or components - main, restricted, universe and multiverse.

  • Main - The main component contains applications that are free software, can be freely redistributed and are fully supported by the Ubuntu team.

  • Restricted - Supported software that is not available under a completely free license and also not complete support may not be available.

  • Universe - The universe component is a snapshot of the free, open-source, and Linux world. It houses almost every piece of open-source software, all built from a range of public sources. Canonical does not provide a guarantee of regular security updates for software in the universe component

  • Multiverse - The multiverse component contains software that is not free, which means the licensing requirements of this software do not meet the Ubuntu main component licence policy. The onus is on you to verify your rights to use this software and comply with the licensing terms of the copyright holder. This software is not supported and usually cannot be fixed or updated.  Use it at your own risk.

Why updating is necessary?

There are many situations or reasons where you need to update Ubuntu software repositary. One common reason is that, by updating the repositary, you can have a quick access to latest softwares available for Ubuntu. Also in some situations the Ubuntu software repositary may get deleted. When the software repositary is erased you can't install the required softwares from terminal. So in that case to put everything up, you have to update your repositary.

So how to update from Terminal?

It is very easy to update your software repositary through terminal. Just follow the steps.
  1. Open the terminal.
  2. You should have a internet connection to update your repositary.
  3. Then in the terminal enter the command apt-get update
  4. Then the 'apt-get' command will ask you for the admin password.
  5. After entering the admin password the update process starts.