"O GOD THEE I PRAY INCREASE MY KNOWLEDGE DAY BY DAY"

.

For Success

For Success
Know more than other Work more than other But, Expect less than other

Its a necessary and sufficient condition-----

Its a necessary and sufficient condition-----
"If you win, you need not have to explain.........But if you lose, you should not be there to explain!"

16 September 2009

Linux- Vi editor commands


General Startup
To use vi: vi filename
To exit vi and save changes: ZZ or :wq
To exit vi without saving changes: :q!
To enter vi command mode: [esc]


Counts
A number preceding any vi command tells vi to repeat
that command that many times.
Cursor Movement

h move left (backspace)

j move down

k move up

l move right (spacebar)

[return] move to the beginning of the next line

$ last column on the current line

0 move cursor to the first column on the
current line

^ move cursor to first nonblank column on the
current line

w move to the beginning of the next word or
punctuation mark

W move past the next space

b move to the beginning of the previous word
or punctuation mark

B move to the beginning of the previous word,
ignores punctuation

e end of next word or punctuation mark

E end of next word, ignoring punctuation

H move cursor to the top of the screen

M move cursor to the middle of the screen

L move cursor to the bottom of the screen



Screen Movement

G move to the last line in the file

xG move to line x

z+ move current line to top of screen

z move current line to the middle of screen

z- move current line to the bottom of screen

^F move forward one screen

^B move backward one line

^D move forward one half screen

^U move backward one half screen

^R redraw screen
( does not work with VT100 type terminals )

^L redraw screen
( does not work with Televideo terminals )



Inserting

r replace character under cursor with next
character typed

R keep replacing character until [esc] is hit

i insert before cursor

a append after cursor

A append at end of line

O open line above cursor and enter append mode



Deleting

x delete character under cursor

dd delete line under cursor

dw delete word under cursor

db delete word before cursor



Copying Code

yy (yank)'copies' line which may then be put by
the p(put) command. Precede with a count for
multiple lines.



Put Command
brings back previous deletion or yank of lines,
words, or characters

P bring back before cursor

p bring back after cursor


Find Commands

? finds a word going backwards

/ finds a word going forwards

f finds a character on the line under the
cursor going forward

F finds a character on the line under the
cursor going backwards

t find a character on the current line going
forward and stop one character before it

T find a character on the current line going
backward and stop one character before it

; repeat last f, F, t, T



Miscellaneous Commands

. repeat last command

u undoes last command issued

U undoes all commands on one line

xp deletes first character and inserts after
second (swap)

J join current line with the next line

^G display current line number

% if at one parenthesis, will jump to its mate

mx mark current line with character x

'x find line marked with character x

NOTE: Marks are internal and not written to the file.



Line Editor Mode
Any commands form the line editor ex can be issued
upon entering line mode.

To enter: type ':'

To exit: press[return] or [esc]



ex Commands
For a complete list consult the
UNIX Programmer's Manual



READING FILES
copies (reads) filename after cursor in file
currently editing

:r filename



WRITE FILE

:w saves the current file without quitting



MOVING

:# move to line #

:$ move to last line of file



SHELL ESCAPE
executes 'cmd' as a shell command.

:!'cmd'


LINUX COMMANDS
#1: top
I figured it was fitting to put the top command at the top. Although top is actually responsible for listing currently running tasks, it is also the first command Linux users turn to when they need to know what is using their memory (or even how much memory a system has). I often leave the top tool running on my desktop so I can keep track of what is going on at all times. Sometimes, I will even open up a terminal (usually aterm), place the window where I want it, and then hide the border of the window. Without a border, the terminal can’t be moved, so I always have quick access to the information I need.
Top is a real-time reporting system, so as a process changes, it will immediately be reflected in the terminal window. Top does have some helpful arguments (such as the -p argument, which will have top monitor only user-specified PIDs), but running default, top will give you all the information you need on running tasks.
#2: ln
To many administrators, links are an invaluable tool that not only make users lives simpler but also drastically reduce disk space usage. If you are unaware of how links can help you, let me pose this simple scenario: You have a number of users who have to access a large directory (filled with large files) on a drive throughout the day. The users are all on the same system, and you don’t want to have to copy the entire directory to each user’s ~/ directory. Instead, just create a link in each user’s ~/ directory to the target. You won’t consume space, and the users will have quick access. Of course when spanning drives, you will have to use symlinks. Another outstanding use for links is linking various directories to the Apache doc root directory. Not only can this save space, it’s often advantageous from a security standpoint.
#3: tar/zip/gzip
Tar, zip, and gzip are archival/compression tools that make your administrator life far easier. I bundle these together because the tools can handle similar tasks yet do so with distinct differences (just not different enough to warrant their own entry in this article). Without these tools, installing from source would be less than easy. Without tar/zip/gzip, creating backups would require more space than you might often have.
One of the least used (but often most handy) features of these tools is the ability to extract single files from an archive. Now zip and gzip handle this more easily than tar. With tar, to extract a single file, you have to know the exact size of the file to be extracted. One area where tar/zip/gzip make administration simple is in creating shells scripts that automate a backup process. All three tools can be used with shell scripts and are, hands down, the best, most reliable backup tools you will find.
#4: nano, vi, emacs
I wasn’t about to place just one text editor here, for fear of stoking the fires of the “vi vs. emacs” war. To top that off, I figured it was best to throw my favorite editor — nano — into the mix. Many people would argue that these aren’t so much commands as they are full-blown applications. But all these tools are used within the command line, so I call them “commands.” Without a good text editor, administering a Linux machine can become problematic.
Imagine having to attempt to edit /etc/fstab or /etc/samba/smb.conf with OpenOffice. Some might say this shouldn’t be a problem, but OpenOffice tends to add hidden end-of-line characters to text files, which can really fubar a configuration file. For the editing of configuration or bash files, the only way to go is with an editor such as nano, vi, or emacs.
#5: grep
Many people overlook this amazingly useful tool. Grep prints lines that match a user-specified pattern. Say, for instance, that you are looking at an httpd.conf file that’s more than 1,000 lines long, and you are searching for the “AccessFileName .htaccess” entry. You could comb through that file only to come across the entry at line 429, or you can issue the command grep -n “AccessFileName .htaccess” /etc/httpd/conf/http.conf. Upon issuing this command you will be returned “439:AccessFileName .htaccess” which tells you the entry you are looking for is on, surprise of all surprises, line 439.
The grep command is also useful for piping other commands to. An example of this is using grep with the ps command (which takes a snapshot of current running processes.) Suppose you want to know the PID of the currently crashed Firefox browser. You could issue ps aux and search through the entire output for the Firefox entry. Or you could issue the command ps aux|grep firefox, at which point you might see something like this:
jlwallen 17475 0.0 0.1 3604 1180 ? Ss 10:54 0:00 /bin/sh /home/jwallen/firefox/firefoxjlwallen 17478 0.0 0.1 3660 1276 ? S 10:54 0:00 /bin/sh /home/jlwallen/firefox/run-mozilla.sh /home/jlwallen/firefox/firefox-bin

jlwallen 17484 11.0 10.7 227504 97104 ? Sl 10:54 11:50 /home/jlwallenfirefox/firefox-bin

jlwallen 17987 0.0 0.0 3112 736 pts/0 R+ 12:42 0:00 grep --color firefox
Now you know the PIDs of every Firefox command running.
#6: chmod
Permissions anyone? Linux administration and security would be a tough job without the help of chmod. Imagine not being able to make a shell script executable with chmod u+x filename. Of course it’s not just about making a file executable. Many Web tools require certain permissions before they will even install. To this end, the command chmod -R 666 DIRECTORY/ is one very misused command. Many new users, when faced with permissions issues trying to install an application, will jump immediately to 666 instead of figuring out exactly what permissions a directory or folder should have.
Even though this tool is critical for administration, it should be studied before jumping in blindly. Make sure you understand the ins and outs of chmod before using it at will. Remember w=write, r=read, and x=execute. Also remember UGO or User, Group, and Other. UGO is a simple way to remember which permissions belong to whom. So permission rw- rw- rw- means User, Group, and Other all have read and write permissions. It is always best to keep Other highly restricted in their permissions.
#7: dmesg
Call me old-school if you want, but any time I plug a device into a Linux machine, the first thing I do is run the dmesg command. This command displays the messages from the kernel buffer. So, yeah, this is an important one. There is a lot of information to be garnered from the dmesg command. You can find out system architecture, gpu, network device, kernel boot options used, RAM totals, etc.
A nice trick is to pipe dmesg to tail to watch any message that comes to dmesg. To do this, issue the command dmesg | tail -f and the last few lines of dmesg will remain in your terminal. Every time a new entry arrives it will be at the bottom of the “tail.” Keep this window open when doing heavy duty system administration or debugging a system.
#8: kill/killall
One of the greatest benefits of Linux is its stability. But that stability doesn’t always apply to applications outside the kernel. Some applications can actually lock up. And when they do, you want to be able to get rid of them. The quickest way to get rid of locked up applications is with the kill/killall command. The difference between the two commands is that kill requires the PID (process ID number) and killall requires only the executable name.
Let’s say Firefox has locked up. To kill it with the kill command you would first need to locate the PID using the command ps aux|grep firefox command. Once you got the PID, you would issue kill PID (Where PID is the actual PID number). If you didn’t want to go through finding out the PID, you could issue the command killall firefox (although in some instances it will require killall firefox-bin). Of course, kill/killall do not apply (nor should apply) to daemons like Apache, Samba, etc.
#9: man
How many times have you seen “RTFM”? Many would say that acronym stands for “Read the Fine* Manual” (*This word is open for variation not suitable for publication.) In my opinion, it stands for “Read the Fine Manpage.” Manpages are there for a reason — to help you understand how to use a command. Manpages are generally written with the same format, so once you gain an understanding of the format, you will be able to read (and understand) them all. And don’t underestimate the value of the manpage. Even if you can’t completely grasp the information given, you can always scroll down to find out what each command argument does. And the best part of using manpages is that when someone says “RTFM” you can say I have “RTFMd.”
#10: mount/umount
Without these two commands, using removable media or adding external drives wouldn’t happen. The mount/umount command is used to mount a drive (often labeled like /dev/sda) to a directory in the Linux file structure. Both mount and umount take advantage of the /etc/fstab file, which makes using mount/umount much easier. For instance, if there is an entry in the /etc/fstab file for /dev/sda1 that maps it to /data, that drive can be mounted with the command mount /data. Typically mount/umount must have root privileges (unless fstab has an entry allowing standard users to mount and unmount the device). You can also issue the mount command without arguments and you will see all drives that are currently mounted and where they’re mapped to (as well as the type of file system and the permissions).
cat
cat [options] [files]
Read (concatenate) one or more files and print them on standard output. Read standard input if no files are specified or if - is specified as one of the files; input ends with EOF. You can use the > operator to combine several files into a new file, or >> to append files to an existing file. When appending to an existing file, use Ctrl-D, the end-of-file symbol, to end the session.
Options
-A, --show-all
Same as -vET.
-b, --number-nonblank
Number all nonblank output lines, starting with 1.
-e
Same as -vE.
-E, --show-ends
Print $ at the end of each line.
-n, --number
Number all output lines, starting with 1.
-s, --squeeze-blank
Squeeze down multiple blank lines to one blank line.
-t
Same as -vT.
-T, --show-tabs
Print TAB characters as ^I.
-u
Ignored; retained for Unix compatibility.
-v, --show-nonprinting
Display control and nonprinting characters, with the exception of LINEFEED and TAB.
Examples
cat ch1 Display a file cat ch1 ch2 ch3 > all Combine files cat note5 >> notes Append to a file cat > temp1 Create file at terminal. To exit, enter EOF (Ctrl-D). cat > temp2 << STOP Create file at terminal. To exit, enter STOP.

Source and courtesy of Google

12 September 2009

changed DMS into OOPS in IIIrd semester in RTU

3CS4 OBJECT ORIENTED PROGRAMMING (Common to Comp. Engg. & Info. Tech)
Units Contents of the subject

Introduction: Review of structures in C, accessing members of structures using
structure variables, pointer to structures, passing structures to functions, structures as user defined data types.
II
Introduction to programming paradigms- (Process oriented and Object oriented).
Concept of object, class, objects as variables of class data type, difference in
structures and class in terms of access to members, private and public members of a class, data & function members. Characteristics of OOP- Data hiding, Encapsulation, data security. Basics of C++: Structure of C++ programs, introduction to defining member functions within and outside a class, keyword using, declaring class, creating objects, constructors & destructor functions, Initializing member values with and without use of constructors, simple programs to access & manipulate data members, cin and cout functions. Dangers of returning reference to a private data member, constant objects and members function, composition of classes, friend functions and classes, using this pointer, creating and destroying objects dynamically using new and delete operators. Static class members, container classes and iterators, proxy classes.
III
Operator overloading: Fundamentals, Restrictions, operator functions as class
members v/s as friend functions. Overloading stream function, binary operators and
unary operators. Converting between types.
IV
Inheritance: Base classes and derived classes, protected members, relationship
between base class and derived classes, constructors and destructors in derived
classes, public, private and protected inheritance, relationship among objects in an
inheritance hierarchy, abstract classes, virtual functions and dynamic binding, virtual
destructors.
V
Multiple inheritance, virtual base classes, pointers to classes and class members,
multiple class members. Templates, exception handling.

<span style="font-style:italic;">3CS7 PROGRAMMING IN C++ (Common to Comp. Engg. & Info. Tech)
S. No. List of Experiments

1
To write a simple program for understanding of C++ program structure without any
CLASS declaration. Program may be based on simple input output, understanding of
keyword using.
2
Write a C++ program to demonstrate concept of declaration of class with public &
private member, constructors, object creation using constructors, access restrictions,
defining member functions within and outside a class. Scope resolution operators,
accessing an object’s data members and functions through different type of object
handle name of object, reference to object, pointer to object, assigning class objects
to each other.
3
Program involving multiple classes (without inheritance) to accomplish a task.
Demonstrate composition of class.
4 Demonstration Friend function friend classes and this pointer.
5
Demonstration dynamic memory management using new & delete & static class
members.
6
Demonstration of restrictions an operator overloading, operator functions as member
function and/ or friend function, overloading stream insertion and stream extraction,
operators, overloading operators etc.
7
Demonstrator use of protected members, public & private protected classes, multilevel
inheritance etc.
8
Demonstrating multiple inheritance, virtual functions, virtual base classes, abstract
classes

DSA -Theory

Rajasthan Technical University, Kota
Detailed Syllabus for B.Tech. (Computer Engineering)
Session 2009-10 (Main Examination)
3CS3 DATA STRUCTURES & ALGORITHMS (Common to Comp. Engg. & Info. Tech)
I Definition & characteristics of algorithms, structures. Difficulties in estimating
exact execution time of algorithms. Concept of complexity of program.
Asymptotic notations: Big-Oh, theta, Omega- Definitions and examples,
Determination of time and space complexity of simple algorithms without
recursion. Representing a function in asymptotic notations viz 5n2-6n=_(n2)
Arrays: Array as storage element, Row major & column major form of arrays,
computation of address of elements of n dimensional array.
II Arrays as storage elements for representing polynomial of one or more degrees
for addition & multiplication, sparse matrices for transposing & multiplication,
stack, queue, dequeue, circular queue for insertion and deletion with condition
for over and underflow, transposition of sparse matrices with algorithms of
varying complexity (Includes algorithms for operations as mentioned).
Evaluation of Expression: Concept of precedence and associativity in
expressions, difficulties in dealing with infix expressions, Resolving precedence
of operators and association of operands, postfix & prefix expressions,
conversion of expression from one form to other form using stack (with &
without parenthesis), Evaluation of expression in infix, postfix & prefix forms
using stack. Recursion.
III Linear linked lists: singly, doubly and circularly connected linear linked listsinsertion,deletion at/ from beginning and any point in ordered or unordered lists.
Comparison of arrays and linked lists as data structures.Linked implementation of stack, queue and dequeue. Algorithms for/of insertion,deletion of stack, queue, dequeue implemented using linked structures.Polynomial representation using linked lists for addition, Concepts of HeadNode in linked lists.Searching: Sequential and binary search.
IV Non-Linear Structures: Trees definition, characteristics concept of child, sibling,
parent child relationship etc, binary tree: different types of binary trees based on
distribution of nodes, binary tree (threaded and unthreaded) as data structure,
insertion, deletion and traversal of binary trees, constructing binary tree from traversal results. Threaded binary Tree. Time complexity of insertion, deletion
and traversal in threaded and ordinary binary trees. AVL tree: Concept of
balanced trees, balance factor in AVL trees, insertion into and deletion from
AVL tree, balancing AVL tree after insertion and deletion. Application of trees
for representation of sets.
V Graphs: Definition, Relation between tree & graph, directed and undirected
graph, representation of graphs using adjacency matrix and list. Depth first and
breadth first traversal of graphs, finding connected components and spanning
tree. Single source single destination shortest path algorithms.
Sorting: Insertion, quick, heap, topological and bubble sorting algorithms for
different characteristics of input data. Comparison of sorting algorithms in term
of time complexity.
NOTE:
1. Algorithm for any operation mentioned with a data structure or required to
implement the particular data structure is included in the curriculum.

For my III sem's students- DSA LAB

3CS8 DATA STRUCTURES LAB (Common to Comp. Engg. & Info. Tech)
S. No. List of Experiments
1
Write a simple C program on a 32 bit compiler to understand the concept of array
storage, size of a word. The program shall be written illustrating the concept of row
major and column major storage. Find the address of element and verify it with the
theoretical value. Program may be written for arrays upto 4-dimensions.
2
Simulate a stack, queue, circular queue and dequeue using a one dimensional array
as storage element. The program should implement the basic addition, deletion and
traversal operations.
3
Represent a 2-variable polynomial using array. Use this representation to implement
addition of polynomials.
4
Represent a sparse matrix using array. Implement addition and transposition
operations using the representation.
5
Implement singly, doubly and circularly connected linked lists illustrating operations
like addition at different locations, deletion from specified locations and traversal.
6 Repeat exercises 2, 3 & 4 with linked structures.
7 Implementation of binary tree with operations like addition, deletion, traversal.
8
Depth first and breadth first traversal of graphs represented using adjacency matrix
and list.
9 Implementation of binary search in arrays and on linked Binary Search Tree.
10 Implementation of insertion, quick, heap, topological and bubble sorting algorithms.

For my First year's (B.Tech)Students-new syallabus

COMPUTER PROGRAMMING LAB [109]
The lab is to be conducted on Linux platform. vi editor is to be used.
Class B. Tech. 1st Semester Evaluation
Schedule per week Practical : 2 Maximum Marks = 75 [Sessional (45) & Practical (30)]
S. No. List of Experiments
Simple OS Commands, vi editor, compiling program, compiler options, linking libraries.
Simple input output program integer, real character and string. (Formatted & Unformatted)
Conditional statement programs (if, if-else-if, switch-case)
Looping Program. (for, while, do-while)
Program based on array (one, two and three dimensions)
Program using Structure and Union.
Program using Function (with and without recursion)
Simple programs using pointers.
File handling.


COMPUTER PROGRAMMING AND IT [104]
Class B. Tech. 1st Semester Evaluation
Schedule per week Lectures : 3 Maximum Marks = 100 [Mid-term (20) & End-term (80)]
Units Contents of the Subject
I
• Introduction: Stored Program Architecture of Computers, Evolution of Processors (In
terms of word length & Speed only), Storage Device- Primary Memory and Secondary
Storage, Working Principle of Primary Storage devices- RAM, ROM, PROM, EPROM,
EEPROM, Random, Direct, Sequential access methods.
• Language Translators – Concept of High-Level, Assembly and Low Level programming
languages. Working of Assembler, Interpreter and compiler. Representing Algorithms
through flow chart, pseudo code, step by step etc.
II
• Number System: Data Representation, Concept of radix and representation of numbers in
radix r with special cases of r=2, 8, 10 and 16 with conversion from radix r1 to radix r2. r’s
and (r-1)’s complement. Representation of Integer in sign-magnitude, signed 1’s and 2’s
complement. Floating point representation. Concept of bias and normalization.
Representation of alphabets.
• Binary Codes: Binary arithmetic, Addition and subtraction of Integers and floating point
numbers. Multiplication of Integers. Gray code, BCD 8421 and 2421, Excess-3 and
Excess-3 gray codes.
III
• Programming in C: Structure of C Program, Concept of Preprocessor, Macro Substitution,
Intermediate code, Object Code, Executable Code. Compilation Process,
• Basic Data types, Importance of braces ({ }) in C Program, enumerated data type,
Identifiers, Scope of Variable, Storage Class, Constants, Expressions in C, Type Casting,
Control Statements, printf( ), scanf ( ), reading single character. Command Line
Arguments.
IV
Arrays in C, Pointers, Using pointers to represent arrays, Dynamic Memory allocation,
Structures, using typedef, Arrays of Structures & pointers, File Handling (Opening in
different modes & closing of file, fscanf & fprintf only).
V
Functions in C, Passing Parameters (By value & Reference), using returned data, Passing
arrays, structures, array of structures, pointer to structures etc., passing characters and
strings, The void pointer.

03 September 2009

Read this slowly,
"God I love u and I need u, come into my heart now"
.
.
.
.
.
.
.
read it again and again its my experience "i feel very cool and getting so many peace in my brain ,head, sholdier,cheast,stomech,legs... even through in whole body relaxes and in the last a supe power is generated and i got free with all tensions"
u can also try , its not harmless and share ur experience also
best of luck........

net------

• LAN - Local Area Network
• WLAN - Wireless Local Area Network
• WAN - Wide Area Network
• MAN - Metropolitan Area Network
• SAN - Storage Area Network, System Area Network, Server Area Network, or sometimes Small Area Network
• CAN - Campus Area Network, Controller Area Network, or sometimes Cluster Area Network
• PAN - Personal Area Network
• DAN - Desk Area Network