Showing posts with label Technology. Show all posts
Showing posts with label Technology. Show all posts

Saturday, 9 March 2013

Types of Network- LAN WAN MAN

Basically the networks are categorized on their design. The two most popular network design are "LAN" and "WAN".

Now a days offices and schools often have all their computers connected to each other. This is commonly known as Local Area Network or LAN.

 Wide Area Network or WAN, consists of computers that are connected over a wide geographic area, such as a city or a country. In this setup, information is transmitted via telephone lines or satellites.


Local Area Network (LAN) 

A LAN connects network devices over a relatively short distance. A networked office building, school, or home usually contains a single LAN, through sometimes one building will contain a few small LAN's and occasionally a LAN will span a group of nearby buildings.

Besides operating in limited space, LANs include several other distinctive features. LANs are typically owned, controlled and managed by a single person or organization. They also use certain specific connectivity technologies, primarily Ethernet and token ring.

Wide Area Network (WAN)

A Wide Area Network spans a large physical distance. A WAN like the Internet spans most of the world.  

A WAN is geographically dispersed collection of LANs. IN WAN mostly the LANs are connected with each other through a network device called as Router.  


WANs differ from LANs in several iportant ways. Like the internet, most WANs are not owned by one organization but rather exist under collective or disturbed ownership and Management.

Metropolitan Area Network

 A Metropolitan Area Network connects an area larger than a LAN but smaller than a WAN, such as a city, with dedicated or high performance hardware. 

MAN is one of number of types of networks. A MAN is relatively new class of network, it serves role similar to an Internet Service Providers(ISP), but for corporate users with large LANs.


There are three important features which distinguish MAN from LAN or WAN.

1. The network size falls intermediate between LAN and WAN. A MAN typically covers an area of between 5 and 50 kms diameter. Many MANs cover an area the size of a city, although in some cases MANs may be as small as a group of buildings or as large as Pune.

2. A MAN is not generally owned by a single organization. The equipments and communication links used in MAN are generally owned by either a consortium of users by a single network provider who sells the service to users. This level of service provided to each user must therefore be negotiated with the MAN operator and some performance guarantees are normally specified at the time.

3. A MAN ofter acts a high speed network to allow sharing of regional resources. It frequently used to provide a shared connection to other networks using a link to a WAN.


Monday, 4 March 2013

How to install Java 7 in Ubuntu


Java is a programming language and computing platform first released by Sun Microsystems in 1995. It is the underlying technology that powers state-of-the-art programs including utilities, games, and business applications. Java runs on more than 850 million personal computers worldwide, and on billions of devices worldwide, including mobile and TV devices.





Ubuntu is Fast, secure and stylishly simple, the Ubuntu operating system is used by 20 million people worldwide every day.









Prepare your Ubuntu

First you need to remove previous openjdk  version from your system, for this run the following command from your terminal

sudo apt-get purge openjdk*

If you installed java 7 from any other PPA and you are having problem with java then you have to do following steps before installing the PPA menctioned here

sudo rm /var/lib/dpkg/info/oracle-java7-installer*
sudo apt-get purge oracle-java7-installer*
sudo rm /etc/apt/sources.list.d/*java*
sudo apt-get update


Install java 7 in ubuntu 12.04

Open the terminal and run the following commands

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer 



Enjoy Coding ....... :)
Plz share your comments .....

Tuesday, 26 February 2013

Apache2 + Passenger Installation for rails on Ubuntu

There are some steps to install and configure apache2 & phusion passenger

To install Apache web server and its documentation & utilities on Linux machine using following commands

sudo apt-get install apache2




To Check the installation, Open web browser and type localhost or 127.0.0.1
It will look like this.

If you are using rvm, goto appropriate ruby version using rvm use 1.9.2(i'm having ruby version 1.9.2) and install passenger gem


gem install passenger

To install apache2 module in passenger type

passenger-install-apache2-module



If all depandencies are fullfilled, it will install otherwise it will give list of command you have to install to run passanger.

Snapshot of asking for dependencies. There are following dependencies.




Saturday, 23 February 2013

Improve your Programming Skills.

Follow Naming Conventions

The naming conventions are guidelines that focus on the program's physical structure and appearance. They make the code easier to read, understand and maintain.

As you know that variables, constants etc. make an important part of a application be it made in any programming language like VB, Ruby, JavaScript, Java etc. you must follow naming conventions while naming them. 

Most common guideline that you get is objects should be named with consistent prefix that makes it easy to identify the type of object. 



Ensure Clarity of Expressions

Expressions carry out the specified actions. Thus they must be clearly understood by the users. There should not be any compromise with the clarity of Expressions.

a) Avoid programming skills/tricks whose intent is not clear to the reader.

b) Never sacrifice clarity of expressions even if changed  code.

Use Commands and Indentation  

Comments play a very important role as they provide internal documentation of a program. Indentation makes the statements clear and readable. Sometimes, comments and indentation are not used to save on program writing time , but remember there should not be any compromise on readability and understandability. Comments are described in different ways in different languages.

a) Insert explanatory comments wherever applicable since they explain  the role and purpose of the other identifiers, variables, constants and statements.

b) Use comments to help identify programming constructs  (such as If...End If, Select.....End Select, Loops etc. ) greatly enhance program understanding.

c) Always indent statements to highlight nesting of groups of control statements.

 Insert Blank Lines and White Spaces

VB script learn
The insertion of blank lines and blank spaces at appropriate spaces also enhance the program readability. The blank lines are inserted to separate declaration blocks, comment, boxes and procedures. Normally, blank lines are inserted before labels, variables declaration.

Though formatting style does not make a difference  for the compiler but the reader face difficulty in understanding the program. Therefore, use of free formatting should be avoided and indentation and blank lines, spaces will be used while writing a program.      

"When program formatting is done to make a program more readable , it is called Prettyprinting.

Friday, 22 February 2013

RVM Installation on Ubuntu

Ruby Version Manager (RVM) makes it ridiculously easy to install and switch between multiple Ruby versions on OS X and Linux.

This tutorial  is only for Ubuntu

Set up Git
Download and install the latest version of Git with Synaptic.

I suggest you install git-core, git-gui, and git-doc.

sudo apt-get install git-core








Install RVM

You could go out and install Ruby from source yourself, but I recommend installing it instead using the Ruby Version Manager (RVM), for installing RVM first you have to install curl

sudo apt-get install curl

Then, install RVM following the instructions on the RVM website. Or follow our instructions.

bash < <(curl -sk https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)



echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc


source ~/.bashrc

Now you can see the rvm version by typing

rvm -v

Wooohoo ! RVM is installed.


Install Ruby


Before installing Ruby, first you have install the dependencies by typing the following command

sudo apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev autoconf libc6-dev libncurses5-dev automake libtool bison subversion

Now you can use use rvm to download, compile, and install Ruby by the command.

rvm install 1.9.3

rvm use 1.9.3 -default

The first command (rvm install) triggers the download/compile/install process, and installs Ruby and its gems under ~/.rvm, safely away from everything else on your system. The second command (rvm use) sets the 1.9.3 version of Ruby as the active default.

You can verify 1.9.3 is available by typing

ruby -v

Install Rails

After setting up ruby, we have to install Rails framework by typing

gem install rails -v 3.2.6

After setting up ruby, we have to install Rails framework by typing

rails -v