Sep 25, 2012

Management Myths

Myths: 

1) We have OUR OWN STANDARDS AND PROCEDURE for building software,that provide my people with everything they need to know?
2) If we get behind schedule, we can HIRE MORE PROGRAMMERS and keep up with work.
3) Give the the SOFTWARE PROJECT TO A THIRD PARTY, and then just
 relax and let third party build it.

Software Myths

There are mainly three myths about software that are following
  • Management Myths
  • Customer Myths
  • Practitioner’s Myths

Sep 10, 2012

Software Applications


  1.     system software
  2.     application software
  3.     scientific software
  4.     embedded software
  5.     product-line software
  6.     web applications
  7.     real-time software

What is Software?


    Software is programs that when executed provide desired features, function, and performance a particular task.

Jul 21, 2011

Speed up your internet by 20%

Microsoft reserves 20% of your available bandwidth for their own purposes like Windows Updates and interrogating your PC etc

You can get it back:

Click Start then Run and type "gpedit.msc" without quotes. This opens the group policy editor.

Then go to:
--> Local Computer Policy
--> Computer Configuration
--> Administrative Templates

--> Network

--> QOS Packet Scheduler

--> Limit Reservable Bandwidth.

Double click on Limit Reservable bandwidth.

It will say it is not configured, but the truth is under the 'Explain' tab i.e." By default, the Packet Scheduler limits the system to 20 percent of the bandwidth of a connection, but you can use this setting to override the default."
So the trick is to ENABLE reservable bandwidth, then set it to ZERO. This will allow the system to reserve nothing, rather than the default 20%.It works on Win 2000 as well.

Increase your RAM and so system speed

1). Start any application, say Word. Open some large documents.


2). Press CTRL+SHIFT+ESC to open Windows Task Manager and click Processes tab and sort the list in descending order on Mem Usage. You will notice that WINWORD.EXE will be somewhere at the top, using multiple MBs of memory.



3). Now switch to Word and simply minimize it. (Don't use the Minimize All Windows option of the task bar).



4). Now go back to the Windows Task Manager and see where WINWORD.EXE is listed. Most probably you will not find it at the top. You will typically have to scroll to the bottom of the list to find Word. Now check out the amount of RAM it is using. Surprised? The memory utilization has reduced by a huge amount.



5). Minimize each application that you are currently not working on by clicking on the Minimize button & you can increase the amount of available RAM by a substantial margin. Depending upon the number and type of applications you use together, the difference can be as much as 50 percent of extra RAM.

In any multitasking system, minimizing an application means that it won't be utilized by the user right now. Therefore, the OS automatically makes the application use virtual memory & keeps bare minimum amounts of the code in physical RAM.

Apr 2, 2011

Write a program to perform all operations on singly Circular linked list

#include
#include
struct abc
{
int info;
struct abc *link;
};
struct abc *f = NULL, *prev = NULL;
void main()
{
int ch;
do
{
clrscr();
printf("\n Linked list");
printf("\n 1. Insert");
printf("\n 2. Display");
printf("\n 3. Delete ");
printf("\n 4. Search");
printf("\n 5. Exit");
printf("\n Enter your choice :");
scanf("%d",&ch);
switch(ch)
{
case 1:
insert();
getch();
continue;
case 2:
display();
getch();
continue;
case 3:
delete();
getch();
continue;
case 4:
search();
getch();
continue;
}
}while(ch!= 5);
}
insert()
{
struct abc *new;
new = (struct abc *) malloc(sizeof(struct abc));
printf("\n Enter value :");
scanf("%d",&new->info);
if(f==NULL && prev == NULL)
{
f=new;
prev= new;
new->link = f;
return;
}
prev->link = new;
new->link = f;
prev = new;
return;
}
display()
{
struct abc *x;
if(f==NULL && prev == NULL)
{
printf("\n Linked List is Empty");
return;
}
x=f;
do
{
printf("\n Value is : %d", x->info);
x = x->link;
}while(x!=f);
return;
}
delete()
{
struct abc *p,*q;
int x;
if(f==NULL && prev == NULL)
{
printf("\n Linked List is Empty");
return;
}
printf("\n Enter element to delete : ");
scanf("%d",&x);
if(f->info == x && f == prev)
{
f = NULL;
prev = NULL;
return;
}
if(f->info == x)
{
f = f->link;
prev->link = f;
return;
}
p=f;
do
{
q=p;
p=p->link;
}while(p!=f && p->info != x);

if(p->info == x && p == prev)
{
q->link = p->link;
prev = q;
return;
}
if(p->info == x)
{
q->link = p->link;
return;
}
printf("\n Element not found in the list ");
return;
}
search()
{

struct abc *p,*q;
int x,flag=0;
if(f==NULL && prev == NULL)
{
printf("\n Linked List is Empty");
return;
}
printf("\n Enter element to search : ");
scanf("%d",&x);
p=f;
do
{
if(p->info == x)
{
flag = 1;
break;
}
p=p->link;
}while(p!= f);
if(flag)
printf("\n Element found in the list ");
else
printf("\n Element not found in the list ");
return;
}

Write a program to perform all operations on singly unordered linked list

#include
#include
struct abc
{
int info;
struct abc *link;
};
struct abc *f = NULL, *prev = NULL;
void main()
{
int ch;
do
{
clrscr();
printf("\n Linked list");
printf("\n 1. Insert");
printf("\n 2. Display");
printf("\n 3. Delete ");
printf("\n 4. Search");
printf("\n 5. Sort");
printf("\n 6. Exit");
printf("\n Enter your choice :");
scanf("%d",&ch);
switch(ch)
{
case 1:
insert();
getch();
continue;
case 2:
display();
getch();
continue;
case 3:
delete();
getch();
continue;
case 4:
search();
getch();
continue;
case 5:
sort();
getch();
continue;
}
}while(ch!= 6);
}
insert()
{
struct abc *new;
new = (struct abc *) malloc(sizeof(struct abc));
printf("\n Enter value :");
scanf("%d",&new->info);
if(f==NULL && prev == NULL)
{
f=new;
prev= new;
new->link = NULL;
return;
}
prev->link = new;
new->link = NULL;
prev = new;
return;
}
display()
{
struct abc *x;
if(f==NULL && prev == NULL)
{
printf("\n Linked List is Empty");
return;
}
x=f;
while(x!=NULL)
{
printf("\n Value is : %d", x->info);
x = x->link;
}
return;
}
delete()
{
struct abc *p,*q;
int x;
if(f==NULL && prev == NULL)
{
printf("\n Linked List is Empty");
return;
}
printf("\n Enter element to delete : ");
scanf("%d",&x);
if(f->info == x && f == prev)
{
f = NULL;
prev = NULL;
return;
}
if(f->info == x)
{
f = f->link;
return;
}
p=f;
while(p!=NULL && p->info != x)
{
q=p;
p=p->link;
}
if(p->info == x && p == prev)
{
q->link = p->link;
prev = q;
return;
}
if(p->info == x)
{
q->link = p->link;
return;
}
printf("\n Element not found in the list ");
return;
}
search()
{

struct abc *p,*q;
int x,flag=0;
if(f==NULL && prev == NULL)
{
printf("\n Linked List is Empty");
return;
}
printf("\n Enter element to search : ");
scanf("%d",&x);
p=f;
while(p!=NULL)
{
if(p->info == x)
{
flag = 1;
break;
}
p=p->link;
}
if(flag)
printf("\n Element found in the list ");
else
printf("\n Element not found in the list ");
return;
}
sort()
{
struct abc *p,*q;
int x;
if(f==NULL && prev == NULL)
{
printf("\n Linked List is Empty");
return;
}
for(p=f;p!=NULL;p=p->link)
{
for(q=p;q!=NULL;q=q->link)
{
if(p->info > q->info)
{
x = p->info;
p->info = q->info;
q->info = x;
}
}
}
display();
return;
}

Write a program to perform all operations on singly ordered linked list

#include
#include
struct abc
{
int info;
struct abc *link;
};
struct abc *f = NULL, *prev = NULL;
void main()
{
int ch;
do
{
clrscr();
printf("\n Linked list");
printf("\n 1. Insert");
printf("\n 2. Display");
printf("\n 3. Delete ");
printf("\n 4. Search");
printf("\n 5. Exit");
printf("\n Enter your choice :");
scanf("%d",&ch);
switch(ch)
{
case 1:
insert();
getch();
continue;
case 2:
display();
getch();
continue;
case 3:
delete();
getch();
continue;
case 4:
search();
getch();
continue;
}
}while(ch!= 5);
}
insert()
{
struct abc *new,*p,*q;
new = (struct abc *) malloc(sizeof(struct abc));
printf("\n Enter value :");
scanf("%d",&new->info);
if(f==NULL && prev == NULL)
{
f=new;
prev= new;
new->link = NULL;
return;
}
if(new->info <=f->info)
{
new->link = f;
f=new;
return;
}
if(new->info >= prev->info)
{
prev->link = new;
new->link = NULL;
prev = new;
return;
}
p =f;
while(p->info <= new->info)
{
q=p;
p=p->link;
}
q->link = new;
new->link = p;
return;
}
display()
{
struct abc *x;
if(f==NULL && prev == NULL)
{
printf("\n Linked List is Empty");
return;
}
x=f;
while(x!=NULL)
{
printf("\n Value is : %d", x->info);
x = x->link;
}
return;
}
delete()
{
struct abc *p,*q;
int x;
if(f==NULL && prev == NULL)
{
printf("\n Linked List is Empty");
return;
}
printf("\n Enter element to delete : ");
scanf("%d",&x);
if(f->info == x && f == prev)
{
f = NULL;
prev = NULL;
return;
}
if(f->info == x)
{
f = f->link;
return;
}
p=f;
while(p!=NULL && p->info != x)
{
q=p;
p=p->link;
}
if(p->info == x && p == prev)
{
q->link = p->link;
prev = q;
return;
}
if(p->info == x)
{
q->link = p->link;
return;
}
printf("\n Element not found in the list ");
return;
}
search()
{

struct abc *p,*q;
int x,flag=0;
if(f==NULL && prev == NULL)
{
printf("\n Linked List is Empty");
return;
}
printf("\n Enter element to search : ");
scanf("%d",&x);
p=f;
while(p!=NULL)
{
if(p->info == x)
{
flag = 1;
break;
}
p=p->link;
}
if(flag)
printf("\n Element found in the list ");
else
printf("\n Element not found in the list ");
return;
}

mkdir

mkdir command is used to create directories. The command is followed by the names of the directories to be created.

$ mkdir virani

This command creates the directories virani

$ mkdir stud1 stud2 stud3

This command will create three directories stud1,stud2,and stud3.

$ mkdir virani virani/sci virani/arts

This creates three directories virani,two sub directories sci and arts under virani.The order of specifying arguments is important; you obviously can’t create a sub directory before creation of its parent directory.

Sometimes the system refuses to create a directory:

$mkdir maths

mkdir : can’t make directory maths

This can happen due to these reasons:
• The directory maths may already exist.
• There may be an ordinary file by that name in the current directory.
• The user doesn’t have the permission to create a directory.

who am i

The who command ,when used with the arguments “am” and “I”, displays a single line output only,i.e the login detail pertaining to the user who invoked this command.


$ who am i
vsc tty01 Dec 25 09:35

who command

who command gives the list of the users currently working on various terminals.
$who
vsc tty01 Dec 25 09:35
atmiya tty02 Dec 25 08:50
student tty03 Dec 25 09:45

$who –Hu

USER LINE LOGIN-TIME IDLE PID COMMENTS

vsc tty01 Dec 25 09:35 . 24
student tty02 Dec 25 09:40 0:30 25

-H is for header and –u option provides more detailed list
The idle column shows that student seems to be idling for last6 30 minutes. PID shows the process identification number.

passwd command



passwd command is used to change passwords
$ passwd
old password:
new password:
Re-enter new password:

            Passwd when invoked by ordinary user ,it asks for old password. After which it demands to enter new password twice. if you are logged on as root you can directly change the password.

In Linux
[root@localhost]passwd vsc
changing password for vsc
new password:

Mar 30, 2011

Change the Location of Special Folders

This tweak allows changing the location of special folders on the system. Any of the folders listed in the registry key may be moved.

[Start] [Run] [Regedit]

Go to : HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\UserShell Folders

Modify/Create String value of Data type REG_SZ Named [Various Folder Names]

Data Type: REG_SZ [String Value] // Value Name: Consult RegEdit for Folder Names

Value Data: [Move the folder to the new desired location using explorer, and then edit the matching folder in RegEdit to reflect the new folder location]

Exit Registry and Reboot

Program to implement all the operations on stack

#include<stdio.h>
#include<conio.h>
int stack[100],tos=-1;
void main()
{
    int ch;
    do
    {
        clrscr();
        printf("\n Stack ");
        printf("\n 1. PUSH");
        printf("\n 2. POP");
        printf("\n 3. PEEP");
        printf("\n 4. DISPLAY");
        printf("\n 5. Exit");
        printf("\n Enter your choice :");
        scanf("%d",&ch);
        switch(ch)
        {
            case 1:
                push();
                getch();
                continue;
            case 2:
                pop();
                getch();
                continue;
            case 3:
                peep();
                getch();
                continue;
            case 4:
                display();
                getch();
                continue;
        }
    }while(ch!=5);
}
push()
{
    int x;
    if(tos==99)
    {
        printf("\n Stack is Full");
        return;
    }
    printf("\n Enter value : ");
    scanf("%d",&x);
    stack[++tos] = x;
    return;
}
pop()
{
    int x;
    if(tos==-1)
    {
        printf("\n Stack is Empty");
        return;
    }
    x = stack[tos--];
    printf("\n Element popped ... %d",x);
    return;
}
peep()
{
    if(tos==-1)
    {
        printf("\n Stack is Empty");
        return;
    }
    printf("\n Element on top of the stack : %d",stack[tos]);
    return;
}
display()
{
    int x;
    if(tos==-1)
    {
        printf("\n Stack is Empty");
        return;
    }
    for(x=tos;x>=0;x--)
        printf("\n Element on stack[%d] is  : %d",x+1,stack[x]);
    return;
}


C Program For Bubble Short Method

#include<stdio.h>
#include<conio.h>
void main()
{
    int *p,i,n;
    clrscr();
    printf("\n How many elements to sort :");
    scanf("%d",&n);

    p=(int *) malloc(sizeof(int) *n);
    for(i=0;i<n;i++)
    {
        printf("\n Enter Value :" );
        scanf("%d",(p+i));
    }
    sort(p,n);
    getch();
}
sort(int *p,int n)
{
    int i,j,k;
    for(i=0;i<n;i++)
    {
        for(j=0;j<(n-1);j++)
        {
            if(*(p+j) > *(p+(j+1)))
            {
                k = *(p+j);
                *(p+j) = *(p+(j+1));
                *(p+(j+1)) = k;
            }
        }
    }
    for(i=0;i<n;i++)
    {
        printf("\n Value is  : %d",*(p+i));
    }
}

Program to create a binary tree and produce the output using all three traversal methods of binary tree.

#include<stdio.h>
#include<conio.h>

struct abc
{
    int info;
    struct abc *left,*right;
};
struct abc *root = NULL, *node,*p,*q;
void main()
{
    int ch;
    do
    {
        clrscr();
        printf("\n Binary Tree");
        printf("\n 1. Insert element");
        printf("\n 2. Preorder Traversal");
        printf("\n 3. Inorder Traversal");
        printf("\n 4. Postorder Traversal");
        printf("\n 5. Exit");
        printf("\n Enter your choice :");
        scanf("%d",&ch);
        switch(ch)
        {
            case 1:
                insert();
                getch();
                continue;
            case 2:
                p = root;
                preorder(p);
                getch();
                continue;
            case 3:
                p = root;
                inorder(p);
                getch();
                continue;
            case 4:
                p = root;
                postorder(p);
                getch();
                continue;
        }
    }while(ch!=5);
}
insert()
{
    node = (struct abc *) malloc(sizeof(struct abc));
    printf("\n Enter element : ");
    scanf("%d",&node->info);
    if(root == NULL)
    {
        root = node;
        node->left = NULL;
        node->right = NULL;
        return;
    }
    p = root;
    find(p);
    return;
}
find( struct abc *p)
{
    if(node->info < p->info)
    {
        if(p->left != NULL)
            find(p->left);
        else
        {
            p->left = node;
            node->left = NULL;
            node->right = NULL;
            return;
        }
    }
    else if(node->info > p->info)
    {
        if(p->right != NULL)
            find(p->right);
        else
        {
            p->right = node;
            node->left = NULL;
            node->right = NULL;
            return;
        }
    }
    else
    {
        printf("\n Duplicate Element not allowed");
        return;
    }
    return;
}
preorder(struct abc *p)
{
    printf("\n Element is : %d",p->info);
    if(p->left != NULL)
        preorder(p->left);
    if(p->right != NULL)
        preorder(p->right);
    return;
}
inorder(struct abc *p)
{

    if(p->left != NULL)
        inorder(p->left);
    printf("\n Element is : %d",p->info);
    if(p->right != NULL)
        inorder(p->right);
    return;
}
postorder(struct abc *p)
{
    if(p->left != NULL)
        postorder(p->left);
    if(p->right != NULL)
        postorder(p->right);
    printf("\n Element is : %d",p->info);
    return;
}

C Program For The BinarySearch

#include<stdio.h>
#include<conio.h>
// Binary search
void main()
{
    int x[10],low,high,mid,y,i,j,k;
    clrscr();
    for(i=0;i<=9;i++)
    {
        printf("\n Enter value :");
        scanf("%d",&x[i]);
    }
    for(i<=0;i<=9;i++)
    {
        for(j=i+1;j<=9;j++)
        {
            if(x[i] > x[j])
            {
                k=x[i];
                x[i]=x[j];
                x[j] = k;
            }
        }
    }
    printf("\n Enter value to search :");
    scanf("%d",&y);
    high = 10;
    low =0;
    while(low <= high)
    {
        mid = (low + high) /2;
        if(y < x[mid])
            high = mid -1;
        else if(y>x[mid])
            low = mid +1;
        else
        {
            printf("\n Element found on %dth location ",mid+1);
            break;
        }
    }
}

Mar 29, 2011

Increase Internet Download Connections

Increase Simultaneous Internet Download Connections. Increases the number of allowed simultaneous connections to ten (10).

[Start] [Run] [Regedit]

Go to: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings

Modify/Create DWORD Value of Data type REG_DWORD Named [MaxConnectionsPer1_0Server]
Setting for Value Data: [0000000a]

Modify/Create DWORD Value of Data type REG_DWORD Named [MaxConnectionsPerServer]
Setting for Value Data: [0000000a]

Exit Registry / Reboot

Create a Hidden User Account

This tweak allows an account that is normally displayed on the Welcome screen to be hidden from view. To log on using the account it's necessary to use the Log On To Windows dialog box similar to the one in Windows 2000 i.e. press CTRL+ALT+DEL twice.

[Start] [Run] [Regedit]

Go to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon\SpecialAccounts\UserList

Modify/Create DWORD Value of Data type REG_DWORD Named [Type Name of Account to be Hidden]
Setting for Value Data: [0 = Account is Hidden / 1 = Enabled]

Exit Registry / Reboot

While the account is hidden on the Welcome screen, note that the account profile will be visible in C:\Documents and Settings or wherever user profiles are stored as well as in Local Users and Groups.