EmbLogic's Blog

Database Using Pipes

RCS file: server.c,v
Working file: server.c
head: 1.10
branch:
locks: strict
akshat: 1.10
access list:
symbolic names:
keyword substitution: kv
total revisions: 10; selected revisions: 10
description:
IPC PROJECT
Creating a server that stores information of employes.
Table of employe is created.
—————————-
revision 1.10 locked by: akshat;
date: 2014/03/20 20:45:35; author: akshat; state: Exp; lines: +4 -4
Everything is Done.
—————————-
revision 1.9
date: 2014/03/20 20:42:04; author: akshat; state: Exp; lines: +5 -5
Server sends every info related to that employe, Done.
This method is helpful in accessing information from a large database.
—————————-
revision 1.8
date: 2014/03/20 17:43:20; author: akshat; state: Exp; lines: +6 -3
oops.
—————————-
revision 1.7
date: 2014/03/20 17:41:00; author: akshat; state: Exp; lines: +3 -3
Information is transferred, lets see if client reads or not.
,
—————————-
revision 1.6
date: 2014/03/20 17:36:21; author: akshat; state: Exp; lines: +16 -11
Server is able to recieve the client request.
Server sends every information related to that employee.
—————————-
revision 1.5
date: 2014/03/20 15:02:04; author: akshat; state: Exp; lines: +5 -1
In server database is stored..DONE.
Client is accessing the server..DONE.
Client is able to send the entry to be searched ..DONE.
—————————-
revision 1.4
date: 2014/03/20 14:57:47; author: akshat; state: Exp; lines: +16 -10
now client have to give request to server for searching info of particular employe.
server will send every info stored in its database to client.
—————————-
revision 1.3
date: 2014/03/20 04:44:13; author: akshat; state: Exp; lines: +6 -1
including the header files.
—————————-
revision 1.2
date: 2014/03/20 04:39:56; author: akshat; state: Exp; lines: +14 -2
Created a client.
Client will search for a particular entry in servers database.
—————————-
revision 1.1
date: 2014/03/20 03:42:44; author: akshat; state: Exp;
Initial revision
=============================================================================

Posted in Uncategorized | Leave a comment

this is a program tyo copy the contents of one file into another

RCS file: 8p7.c,v
Working file: 8p7.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
this is a program to copy the contents of one file to another
—————————-
revision 1.1
date: 2014/03/20 10:47:06; author: emblogic; state: Exp;
Initial revision
=============================================================================

Posted in Uncategorized | Leave a comment

this is a program to convert the contents of a file into uppercaseand then write it to another file

RCS file: 8p4.c,v
Working file: 8p4.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
this is a program to convert the contents of a file into upper case
and write it to another file
—————————-
revision 1.1
date: 2014/03/20 10:42:22; author: emblogic; state: Exp;
Initial revision
=============================================================================

Posted in Uncategorized | Leave a comment

pointer program

head    1.1;
access;
symbols;
locks; strict;
comment    @ * @;

1.1
date    2014.03.20.07.44.20;    author emblogic;    state Exp;
branches;
next    ;

desc
@this is program of pointer
@

1.1
log
@Initial revision
@
text

@

Posted in Uncategorized | Leave a comment

Making the IPC by single FIFO at requsting client and at the processing client.

RCS file: server.c,v
Working file: server.c
head: 1.7
branch:
locks: strict
root: 1.7
access list:
symbolic names:
keyword substitution: kv
total revisions: 7;    selected revisions: 7
description:
making the server which receive the message from the client and transfer this signal for further process.
receive the signal from the client
—————————-
revision 1.7    locked by: root;
date: 2014/03/20 04:35:20;  author: root;  state: Exp;  lines: +11 -1
*** empty log message ***
—————————-
revision 1.6
date: 2014/03/20 04:20:40;  author: root;  state: Exp;  lines: +3 -1
*** empty log message ***
—————————-
revision 1.5
date: 2014/03/19 07:49:24;  author: root;  state: Exp;  lines: +14 -2
making the fifo2 for the process.
—————————-
revision 1.4
date: 2014/03/19 07:29:41;  author: root;  state: Exp;  lines: +2 -0
*** empty log message ***
—————————-
revision 1.3
date: 2014/03/19 07:15:28;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.2
date: 2014/03/18 12:12:59;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.1
date: 2014/03/18 12:04:42;  author: root;  state: Exp;
Initial revision
=============================================================================
RCS file: client1.c,v
Working file: client1.c
head: 1.18
branch:
locks: strict
root: 1.18
access list:
symbolic names:
keyword substitution: kv
total revisions: 18;    selected revisions: 18
description:
making the client which send the message to the server then according to the input get the output from the server.
—————————-
revision 1.18    locked by: root;
date: 2014/03/20 04:35:36;  author: root;  state: Exp;  lines: +9 -1
make the client i.e requesting client and accept the output from the server.
—————————-
revision 1.17
date: 2014/03/19 07:13:25;  author: root;  state: Exp;  lines: +2 -2
*** empty log message ***
—————————-
revision 1.16
date: 2014/03/19 06:49:46;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.15
date: 2014/03/19 06:48:56;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.14
date: 2014/03/19 06:30:18;  author: root;  state: Exp;  lines: +2 -2
*** empty log message ***
—————————-
revision 1.13
date: 2014/03/19 06:29:02;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.12
date: 2014/03/19 06:27:42;  author: root;  state: Exp;  lines: +2 -2
*** empty log message ***
—————————-
revision 1.11
date: 2014/03/19 06:19:28;  author: root;  state: Exp;  lines: +2 -2
*** empty log message ***
—————————-
revision 1.10
date: 2014/03/19 06:14:41;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.9
date: 2014/03/19 06:12:31;  author: root;  state: Exp;  lines: +2 -2
*** empty log message ***
—————————-
revision 1.8
date: 2014/03/19 05:59:12;  author: root;  state: Exp;  lines: +4 -3
*** empty log message ***
—————————-
revision 1.7
date: 2014/03/18 12:46:37;  author: root;  state: Exp;  lines: +1 -0
*** empty log message ***
—————————-
revision 1.6
date: 2014/03/18 12:39:42;  author: root;  state: Exp;  lines: +4 -2
*** empty log message ***
—————————-
revision 1.5
date: 2014/03/18 12:33:31;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.4
date: 2014/03/18 12:16:48;  author: root;  state: Exp;  lines: +1 -0
*** empty log message ***
—————————-
revision 1.3
date: 2014/03/18 12:12:57;  author: root;  state: Exp;  lines: +2 -2
*** empty log message ***
—————————-
revision 1.2
date: 2014/03/18 12:07:06;  author: root;  state: Exp;  lines: +1 -0
making the client perfect.
—————————-
revision 1.1
date: 2014/03/18 12:04:42;  author: root;  state: Exp;
Initial revision
=============================================================================
RCS file: adder.c,v
Working file: adder.c
head: 1.7
branch:
locks: strict
root: 1.7
access list:
symbolic names:
keyword substitution: kv
total revisions: 7;    selected revisions: 7
description:
making the adder.
—————————-
revision 1.7    locked by: root;
date: 2014/03/20 04:35:20;  author: root;  state: Exp;  lines: +9 -0
*** empty log message ***
—————————-
revision 1.6
date: 2014/03/20 04:20:35;  author: root;  state: Exp;  lines: +4 -3
*** empty log message ***
—————————-
revision 1.5
date: 2014/03/19 11:07:29;  author: root;  state: Exp;  lines: +3 -3
*** empty log message ***
—————————-
revision 1.4
date: 2014/03/19 11:05:05;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.3
date: 2014/03/19 10:59:08;  author: root;  state: Exp;  lines: +15 -1
making the processing client.
—————————-
revision 1.2
date: 2014/03/19 07:46:28;  author: root;  state: Exp;  lines: +9 -0
make the process which accept the input from the server and give this input to the server.
—————————-
revision 1.1
date: 2014/03/18 12:04:42;  author: root;  state: Exp;
Initial revision
=============================================================================

Posted in Uncategorized | Leave a comment

MULTIPLE DATA COMPRESSION 3-bit (2 key encryption)

Working file: ./header.h
head: 1.3
branch:
locks: strict
root: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;     selected revisions: 3
description:
in this file i had compressed the data of 3 bit codelength ie max 8 distinct character using approch
in this i had compressed the data in the chunks of 3 bit in a character ,in 1 character i had placed
3 bits of ist character,3 bits of 2nd character and 2 bits of the 3 chacter and the last bit of the
3rd character is stored in a charcter variable key,so the last bit of every 3rd variable is stored in the this vary char cter variable key
the encryption had become strong as have used masterarray,ndc and this key to decompressed the compressed variable
this concept is due the problem as under
As i have 8 distinct characters so i have to work on every 3bits of each index ,so that the code length increases
but here the code remain simple
—————————-
revision 1.3    locked by: root;
date: 2014/03/19 18:55:27;  author: root;  state: Exp;  lines: +7 -5
problem solved …code working perfectly for 3 bit
—————————-
revision 1.2
date: 2014/03/19 18:36:25;  author: root;  state: Exp;  lines: +9 -3
uncompressed string is hello howarh and the string decompressed is hellowho arh
removing errors

Posted in Project 2: Multiple Data Compression and Encryption | Leave a comment

program to write contents in uppercase and write the contents in output file.

initial revision: 1.1
done
[root@emblogic priya]# rlog vim string4.c
rlog: RCS/vim,v: No such file or directory

RCS file: string4.c,v
Working file: string4.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
this is the program to convert the contents in uppercase and write contents in output file.
—————————-
revision 1.1
date: 2014/03/20 03:59:05; author: root; state: Exp;
Initial revision

Posted in Uncategorized | Leave a comment

program to compare two text file.

RCS file: string3.c,v
Working file: string3.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
this is the program to compare two text file.
—————————-
revision 1.1
date: 2014/03/20 03:39:17; author: root; state: Exp;
Initial revision

Posted in Uncategorized | Leave a comment

program to read file from n position

head 1.1;
access;
symbols;
locks; strict;
comment @ * @;

1.1
date 2014.03.19.09.49.44; author root; state Exp;
branches;
next ;

desc
@program to read file from n pos
@

1.1
log
@Initial revision
@
text

Posted in Uncategorized | Leave a comment

This is a program to compare two text.

head    1.1;
access;
symbols;
locks; strict;
comment    @ * @;

1.1
date    2014.03.19.15.25.02;    author emblogic;    state Exp;
branches;
next    ;

desc
@This is a program to compare two text.
we have checked whether two files are identical or not with the help of function fopen and fgetc.
@

1.1
log
@Initial revision
@
text
@#include<stdio.h>
#include<string.h>
int main()
{
FILE *f1,*f2;
char ch1,ch2;
f1=fopen(“file5″,”r”);
f2=fopen(“file4″,”r”);
do
{
ch1=getc(f1);
ch2=getc(f2);
if(ch1==ch2)
{
if(ch1==10 && ch2==10)
printf(“both files are equal”);
}
else
{
printf(“files are not equal”);
break;
}
}
while(ch1!=10 && ch2!=10);
return 0;
}
@

Posted in Uncategorized | Leave a comment

program to check if both files are equal or not

RCS file: 8p3.c,v
Working file: 8p3.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
this is a program to check if two files are same or not
by comparing each char of both files
till EOF of both files donot occur
—————————-
revision 1.1
date: 2014/03/19 22:32:31;  author: emblogic;  state: Exp;
Initial revision
=============================================================================

Posted in Uncategorized | Leave a comment

This is a program to read last n characters from the file.

head    1.1;
access;
symbols;
locks; strict;
comment    @ * @;

1.1
date    2014.03.19.15.00.37;    author emblogic;    state Exp;
branches;
next    ;

desc
@this is a program to read last n chararcter from the file.
@

1.1
log
@Initial revision
@
text
@#include<stdio.h>
#include<string.h>
int main()
{
FILE *f1;
int pos,n;
char ch;
printf(“enter the value of n”);
scanf(“%d”,&n);
f1=fopen(“file3″,”r”);
//getc(f1);
fseek(f1,0,SEEK_END);
fseek(f1,n,SEEK_SET);
pos=ftell(f1);
printf(“position is %d”,pos);
do
{
ch=fgetc(f1);
printf(“%c”,ch);
}
while(ch !=10);

return 0;
}

@

Posted in Uncategorized | Leave a comment

this is the program to read the last n character from the file using fgetc,ftell.

head 1.1;
access;
symbols;
locks; strict;
comment @ * @;

1.1
date 2014.03.20.02.57.15; author root; state Exp;
branches;
next ;

desc
@this is the program in which i have first opened the file.
after opening the file , i have moved the file pointer to the last location using fseek function passing SEEK_END constant.
i have used ftell to know the position of file pointer .after that i have read last character from file.
@

1.1
log
@Initial revision

Posted in Uncategorized | Leave a comment

reading file and writing into another using fgetc() and fputc()

head 1.1;
access;
symbols;
locks; strict;
comment @ * @;

1.1
date 2014.03.19.09.15.04; author root; state Exp;
branches;
next ;

desc
@reading form file and writing into another using fgetc() and fputc()
@

1.1
log
@Initial revision
@
text

Posted in Uncategorized | Tagged | Leave a comment

this is a program to read the last n char from the file using fseek()

—————————-
revision 1.1
date: 2014/03/19 22:12:05;  author: emblogic;  state: Exp;
Initial revision
=============================================================================

Posted in Uncategorized | Leave a comment