Skip to main content

Posts

Showing posts from June, 2014

I Think Its Time To Be HAPPY Because I Deserve It!

I Think Its Time To  Be HAPPY   Because I Deserve It! I Think Its Time To Be HAPPY (smile) Because I Deserve It!

Some People will stay in your Heart even if you are gone in theirs

Some People will stay in your Heart even if you are gone in theirs Some People will stay in your Heart.. even if you are gone in theirs.

Don't just go through life GROW through life

Don't just go through life, GROW through life Don't just go through life, GROW through life

Surround Yourself with People Who Believe in Your DREAMS

Surround Yourself with People Who Believe in Your  DREAMS Surround Yourself with People Who Believe in Your #DREAMS

Don't point fingers. Stand & Deal

Don't point fingers. Stand  & Deal Don't point fingers. Stand & Deal

Always Have PAIN in Your Life

Always Have PAIN in Your Life Always Have "#PAIN" in Your Life P : Possitive A : Attitude I  : IN N : NEGATIVE SITUATIONS

True love is usually the most inconvenient kind.

True love   is usually the most inconvenient kind. True love is usually the most inconvenient kind.

Stay Away From ANGER It HURTS Only YOU!

Stay Away From ANGER It HURTS Only YOU! Stay Away From #ANGER It HURTS Only #YOU!

I'M GONNA MAKE THE REST OF MY LIFE THE BEST OF MY LIFE

I'M GONNA MAKE THE REST OF MY LIFE THE BEST OF MY  LIFE I'M GONNA MAKE THE REST OF MY LIFE THE #BEST OF MY #LIFE

MUSIC makes the world A Better Place! #Happy World Music Day!

Happy World Music Day MUSIC makes the world A Better Place! #Happy World Music Day!

Know YOURSELF & You will win all BATTLES

Know #YOURSELF & You will win all #BATTLES

GOD gives you SIGNAL whenever You are in Problem

GOD gives you SIGNAL whenever You are in Problem GOD gives you SIGNAL whenever You are in Problem

Facebook Down

Facebook Down In 6 Months this is the third time when facebook server was not able to respond it client requests. Reason is still unknown. But After almost 35-40 minutes it again working fine. So Enjoy Face booking.

BE SLOW TO CRITICIZE AND FAST TO APPRECIATE

BE SLOW TO #CRITICIZE AND FAST TO #APPRECIATE

Life has two rules

Life has two rules: 1. Never Quit 2. Always remember Rule 1

Don't waste your TIME with explanations, People only hear what they want to hear.

Don't waste your TIME with explanations, People only hear what they want to hear.

Virus Removal or Spyware Removal for Your Computer's Security

by  Vikram kumar Everyone can be vulnerable to spyware, or the programs that can enter your computer’s system and monitor your computer use due to various objectives and motives. It is one of the many forms of malware, or malicious software that exist in the computer world. This software is intended to cause annoying behaviors in your computer and it can be as worse as slowing it down or crashing it. Virus is also another form of malware, and it can be easily passed from one system to another. Mac repair Hallandale can help you in handling such issue and they are also well verse in Apple repair Miami. It is everybody’s right to have only private access to our computer but it being accessed by somebody else is inevitable now that major advancements have already been done in computer technology. Rationally speaking, it is one of the sad realities in computer and Internet technology that we have to accept but do proactive moves about.  While viruses and spywares already exist, what w

HOME is where the LOVE is.

HOME is where the LOVE is.

The greatest gift (gift) I ever had came from GOD I call him DAD! #HappyFather'sDay

The greatest gift I ever had came from GOD I call him DAD! #HappyFather'sDay

LIFE consists in what a person is thinking of all day.

LIFE consists in what a person is thinking of all day.

Innocent droplets of Rain Make almost all Events Quite natural.

Innocent droplets of Rain Make almost all Events Quite natural.

Plenty of Programs of UNIX

Hey Guys Check Out The Following Link of Plenty of Programs of UNIX Download & Enjoy The Stuff. Follow The Given Link Below  Download UNIX Programs Bunch Here

Write programs to demonstrate communication between two processes. First process while send content of file to second process. Second process displays content by changing case.

#include #include #include main(int agrc,char *argv[]) {     int fd[2],pid,n,f,ch;     char buffer[2048],*cha;     if(pipe(fd)==-1)     {         printf(" problem to create the pipe \n ");         exit(0);     }     else     {         pid=fork();         if(pid!=0)         {             close(fd[0]);             f = open("hardik",O_RDONLY);             while((n = read(f,buffer,2048)) > 0)             {                 write(fd[1],buffer,n);             }             close(fd[1]);         }         else         {             close(fd[1]);             ch = 0;             while((n=read(fd[0],cha,1)) > 0)             {                 if(*cha >= 'a' && *cha <= 'z')                 {                     printf("%c",*cha - 32);                 }                 else if(*cha >= 'A' && *cha <= 'Z')                 {                     printf("%c",

Write a program to create a pipe and share between parent and child process. Parent writes content to pipe from the file and child reads the content and display number of characters.

#include #include #include #include main(int agrc,char *argv[]) {     int fd[2],pid,n,f,ch;     char buffer[2048];     if(pipe(fd)==-1)     {         printf(" problem to create the pipe \n ");         exit(0);     }     else     {         pid=fork();         if(pid!=0)         {             close(fd[0]);             f = open("hardik",O_RDONLY);             while((n = read(f,buffer,2048)) > 0)             {                 write(fd[1],buffer,n);             }             close(fd[1]);         }         else         {             close(fd[1]);             ch = 0;             while((n=read(fd[0],buffer,2048)) > 0)             {                 ch = ch + n;             }             printf("Number of Charecter:-%d",ch-1);             close(fd[0]);         }     } }

Write a program to execute ls command in child process. Parent process must wait for child termination.

#include #include #include main() {     int pid,w,Status;     printf("PRENT PROCESS PORTION  \n");     pid=fork();     if(pid==0)     {         printf("child process part \n ");         execl("/bin/ls","ls",0);     }     sleep(3);     w = wait(&Status);     printf("parent process after child execution \n "); }

Write a program to create a child process in which child process displays number of line sent by parent process.

#include #include #include #include #include main(int agrc,char *argv[]) {     int fd[2],pid,line=0,n;     char buffer[2048]="Milind Audichya\Dhruv Naik\Uzer Pathan\n",buffer2[1];     if(pipe(fd)==-1)     {         printf(" problem to create the pipe \n ");         exit(0);     }     else     {         pid=fork();         if(pid!=0)         {             printf("Perent Send Data To Chlid Data is:- %s ",buffer);             close(fd[0]);             write(fd[1],buffer,strlen(buffer));             close(fd[1]);         }         else         {             close(fd[1]);             printf("Chlid Process Read The Content send by the Perent.");             while((n=read(fd[0],buffer2,1)) == 1)             {                 if(buffer2[0] == '\n')                 {                     line++;                 }             }             printf("Number of line send by Perent:-%d",line);          

Write a program to create three child process. The parent process send the signal to terminate all these child processes.

#include #include main() {     int pid[3],status,i;     for(i=0;i<3 i="" p="">    {     pid[i]=fork();     printf("\n new created child process value is :%d",pid[i]);     }     for(i=0;i<3 i="" p="">    {         if(pid[i])         {             printf("for terminate the process  \n");             kill(pid[i],9);             printf("termination of the child process :%d \n ",pid[i]);         }     } } }

Write a program to create a child process. Parent process will display message child process terminated on termination of child process. (Hint: catch SIGCHLD signal in parent)

# include # include # include # include # include void handler(int sig) {       printf("Iam in handler ...%d\n",sig); }   main() {     int status;     pid_t pid;     signal(SIGCHLD,handler);     pid = fork();     printf("Child Process id is : %d\n", pid);     if( pid == 0 )         {         printf("child process id is  %d\n",getpid());         exit(0);     }     sleep(3);     pid = wait(&status);     printf("process terminated is %d\n",pid); }

Write a program to create a child process. Parent process will display three messages. First message will displayed before creation of child process. Second message will displayed only if child process is alive. Last message will displayed after completion of child process.

#include #include main(int argc,char *argv[]) { int pid,w,status; printf("parent process before the child process created \n"); pid=fork(); if(pid==0) { printf("Parent process during creating the child process \n"); } sleep(3); w=wait(&status); printf(" parent process after the executing child process \n"); } /* sai@sai-VirtualBox:~/Desktop$ cc -o p4 p4.c p4.c: In function main: p4.c:8:2: warning: incompatible implicit declaration of built-in function printf [enabled by default] sai@sai-VirtualBox:~/Desktop$ ./p4 parent process before the child process created Parent process during creating the child process parent process after the executing child process parent process after the executing child process */

Write a command line program to accept file name followed by a number say N1. Display line N1 in reverse order of its characters.

#include #include #include #include #include char buffer[2048]; void readLine(int fd, int LineNo); main(int argc,char *argv[]) {    int fd,LineNo;      if(argc != 3)    {        printf("Enter The Two Argument First File Name And Other Line No..!!");        exit(0);          }              fd = open(argv[1],O_RDONLY);    if(fd == -1)    {        printf("File Is Not Open");        exit(0);    }    LineNo = atoi(argv[2]);    readLine(fd,LineNo); } void readLine(int fd, int LineNo) {    int count,i,line=0,t=0,j;    char Line[100],OneL[100],ch[]= { ' ', ' '};    while((count = read(fd,buffer,sizeof(buffer))) > 0)    {        for (i=0;i < count;i++)        {            if(buffer[i] == '\n')            {                Line[t++] = '\0';                t=0;                strcpy(OneL,Line);                strcpy(Line,ch);                              line++;                            

Write a command line program to accept number say N1. Display all files from the current directory, whose size is greater than N1.

#include #include #include #include #include #include char path[50]; int main(int argc, char* argv[]) {     int size;     // to get the Current Directory Path Used This System Call..!!       getcwd(path,50);     printf("Current Directory Path Is:%s\n",path);     DIR *mydir;     struct dirent *myfile;     struct stat mystat;     mydir = opendir(path);     while((myfile = readdir(mydir)) != NULL)     {         stat(myfile->d_name, &mystat);       size = atoi(argv[1]);     if(mystat.st_size > size)     {         printf("%d",mystat.st_size);         printf(" %s\n", myfile->d_name);       }             }     closedir(mydir); }

Write a program which take a file name as a command line argument. Count the number of characters, number of words, number of line, number of vowels and display them on screen.

#include #include #include char buffer[2048]; int main(int argc,char *argv[]) {     int fdold;     int count;     int i,word,space,vovals,line,ch;     word = 0;     space = 0;     vovals = 0;     line = 0 ;     ch=0; if(argc  == 2) {     fdold = open(argv[1],O_RDONLY);       if(fdold == -1)     {         printf("cannot open file ");     }     else     {         while((count = read(fdold,buffer,sizeof(buffer))) > 0)         {             for (i=0;i             {                 if(buffer[i] == ' ' || buffer[i] == '.')                 {                     word++;                 }                 if(buffer[i] == ' ')                 {                     space++;                 }                 if(buffer[i] == 'a' || buffer[i] == 'e' || buffer[i] == 'i' || buffer[i] == 'o' || buffer[i] == 'u' ||                     buffer[i] == 'A' || buffer[i] == 'E

Use Your SMILE TO CHANGE THE WORLD

Use Your SMILE "TO CHANGE THE WORLD" but "DON'T LET THIS WORLD CHANGE YOUR SMILE"

Love Yourself First

Love Yourself First Love Yourself First & Everything else falls into line.

Plenty of Programs of JSP & Servlet

Hey Guys Check Out The Following Link of Plenty of Programs of JSP & Servlet. Download & Enjoy The Stuff. Follow The Given Link Below  Download JSP & Servlet Program Bunch Here

If you want to shine like sun..

If you want to shine like sun first you have to burn like it.

Money can’t buy happiness

Money can’t buy happiness, but it sure makes misery easier to live with.

Write a c program using system calls to display content of file.

/* Write a c program using system calls to display content of file. Kindly add header files like :stdio.h,sys/types.h,   sys/stat.h, unistd.h,string.h,fcntl.h  */ int main(int argc, char *argv[]) {         int fd=0,r=0,i=0;         char buf[1024];         if(argc >= 2)         {         for(i=1;i         {                 fd=open(argv[i],O_RDONLY);                 if(fd == -1)                 {                         printf("file not exist");                 }   else                 {                 while((r=read(fd,buf,1024))>0)                         write(1,buf,r);                 }         }         }         else         {                 printf("enter appropriate arguments");         }         return 0; }

Write A C Program To Create A File And Write Something in it using System Calls.

/*Write A C Program To Create A File And Write Something in it using System Calls.*/ #include #include #include #include #include #include int main(int argc ,char *argv[]) {         int i=0,fd;         for(i=1;i         {                 fd=creat(argv[i],S_IREAD|S_IWRITE);                 write(fd,"file created",12);                 write(1,"file created\n",13);                 close(fd);         }         return 0; } See Also: Write any C program using write() system call. Write shell script that do equivalent to cut–c 5-10 utility Write C program that display name of all empty file and remove from directory.

Write shell script that do equivalent to cut–c 5-10 utility

#Write shell script that do equivalent to cut–c 5-10 utility. echo "Script Name : $0" i=0 lines=`cat $1 | wc -l` echo "No of lines in file named $1 : $lines" while [ $i -ne $lines ] do line=`head -$i $1 | tail -1` #echo $line #cutline= `echo expr substr "$line" 5 10` cutline=`echo $line | tail -c +5 | head -c 5` echo $cutline i=`expr $i + 1` #echo $i done echo "Done" See Also : Write C program that display name of all empty file and remove from directory.

Write C program that display name of all empty file and remove from directory.

/* Write C program that display name of all empty file and remove from directory   */ #include #include #include int main() { DIR *dp=opendir("."); struct dirent *files; struct stat stbuf; int siz=0,cnt=0; while((files=readdir(dp))!=NULL) { if(lstat(files->d_name,&stbuf)==-1) { printf("cant link"); } else { if(S_ISREG(stbuf.st_mode)) { siz=(int)stbuf.st_size; if(siz==0) { printf(" %s is empty file of size= %d \n",files->d_name,siz); //remove(files->d_name); unlink(files->d_name); cnt++; } } } } printf("\n number of empty file %d",cnt); return 0; }

Some Useful Short Cut Keys & Combinations To Work Fast

Keyboard Shorcuts (Microsoft Windows) 1. CTRL+C (Copy) 2. CTRL+X (Cut) 3. CTRL+V (Paste) 4. CTRL+Z (Undo) 5. DELETE (Delete) 6. SHIFT+DELETE (Delete the selected item permanently without placing the item in the Recycle Bin) 7. CTRL while dragging an item (Copy the selected item) 8. CTRL+SHIFT while dragging an item (Create a shortcut to the selected item) 9. F2 key (Rename the selected item) 10. CTRL+RIGHT ARROW (Move the insertion point to the beginning of the next word) 11. CTRL+LEFT ARROW (Move the insertion point to the beginning of the previous word) 12. CTRL+DOWN ARROW (Move the insertion point to the beginning of the next paragraph) 13. CTRL+UP ARROW (Move the insertion point to the beginning of the previous paragraph) 14. CTRL+SHIFT with any of the arrow keys (Highlight a block of text) SHIFT with any of the arrow keys (Select more than one item in a window or on the desktop, or select text in a document) 15. CTRL+A (Select all) 16.

Failure is not an option

Failure is not an option. It's bundled with your software.

Inventors of programming languages and various technologies

Inventors of programming languages and various technologies C was developed by Dennis Ritchie Dennis Ritchie C++ was developed by Bjarne Stroustrup Bjarne Stroustrup Java is developed by James Gosling . James Gosling . Net is developed by Microsoft . Microsoft Php (hypertext preprocessor) developed by Rasmus Lerdorf . Rasmus Lerdorf Java Script designed by Brenden Eich . Brenden Eich J query is a platform whose original author : John Resig John Resig Pascal is developed by Niklaus Wirth. Niklaus Wirth. Python was developed by Guido van Rossum . Guido van Rossum Pearl is developed by Larry wall. Larry wall See This Too : Do Not Give Up Who invented Electric bulb? Basic Knowledge on Cloud Computing