Roger Antonsen take us to a whole new concept of mathematics



Mathematics is a beautiful subject although many people think of it as tough. We think  mathematics as a tool for doing calculations and learning formulae but it is not true.

In this this ted video Roger Antonsen take us to a whole new concept of mathematics and with his innovative examples also he allows us to view mathematics from an all new perspective.

Posted in | 0 comments

RSA

[image from]



RSA is an algorithm based on public -key encryption. It was invented
by Ron Rivest, Adi Shamir and Len Adleman in 1987. This can be used
for public key encryption and digital signatures as well.



Resources :

http://www.di-mgt.com.au/rsa_alg.html

C implementation of RSA

Watch RSA video demonstration here or you can download it.

Posted in Labels: , , , , | 0 comments

Distributed systems question bank


Download as word document

Part A

1. What is a distributed system?

2. Differentiate DS and network system ?

3. Notes on middleware ?

4. Explain about security challenges in DS ?

5. Define transparency and openness in DS ?

6. Explain different types of transparency ?

7. Define spontaneous networking ?

8. Explain event ordering with example ?

9. write notes on tunneling and mobile ip ?

10. Explain different types of failure and various methods to handle failure ?

11. explain network issues of Ds ?

12. give short notes on various switching schemes ?

13. write notes on IP addressing ?

14. Give short notes on the following a)IPv6 b)Domain names c)firewall d)wireless LAN

15. What are sockets ?

16. explain Java API for UDP datagram ?

17. explain Java API for TCP streams ?

18. What is the use of reflection ?

19. What is remote object reference ?

20. Explain request reply protocol with its message structure ?

21. Explain group communication ?

22. Explain JINI Ds ?

23. Compare the features of TCP and UDP ?

24. What are the protection techniques used in OS ?

25. Differentiate between process and threads ?

26. Explain thread life cycle ?

27. Give brief notes on a)Digital signature b)Certificates c)Credentials ?

28. Write notes on client Server communication

29. What are the requirements of distributed file system ?

30. What are the functions of virtual file system?

31. Explain about proxy servers and caches

32. Differentiate between synchronous and asynchronous DS

33. What is external data representation and marshaling

34. Explain about distributed garbage collection

35. Write short notes on events and notifications

36. Why are threads so important in DS?

37. How objects are communicated in DS?

38. IP multicasting suffers from omission failure. How?

39. What are the characteristics of a distributed file system

40. Explain some limitations of flat transaction?

41. Explain sequential consistency

42. Why is there no explicit data typing in CORBA CDR?

43. Explain two face commit protocol

44. Explain flat file service operations

45. Compare specialized invocation and Concurrent invocation

46. Difference b/w monolithic and microkernel

47. Difference between simple distributed transaction and nested transaction

48. What is meant by optimistic concurrency control

49. What is the need of fault tolerance in distributed system?

50. Compare threads and processes

51. Explain need of replication in distributed system

52. What is asynchronous and persistent asynchronous invocation

53. Define transaction and its properties

54. Explain time stamp ordering

55. Explain phantom dead lock, edge chasing and shadow version

56. Explain remote procedure calls

57. Explain about concurrency control in distributed System

58. What is the need of implementing recovery schemes in DS

59. Explain the characteristics of fault in distributed system

60. Difference between passive replication and active replication.

Part B

  1. Discuss various design issues in the DS
  2. What is meant by transparency? How it is implemented in DS?
  3. Explain architectural models of DS?
  4. Explain how remote procedure calls is implemented in DS?
  5. Write Short notes on 1.)Client server communication 2)Group Communication
  6. Explain about interaction model and failure model in DS
  7. Illustrate the function of each layer in protocol suite
  8. Explain event ordering with an example in DS
  9. Explain the design requirements for distributed architecture
  10. What are the advantages of using multicasting facility in DS
  11. Explain different failures in DS
  12. Explain IPv6: How can this be migrated from IPv4
  13. Compare the features of TCP and UDP
  14. How security techniques can be implemented in DS
  15. Explain OS layers
  16. Explain the design issues of RMI? How can it be implemented
  17. Explain events and notifications with example
  18. Explain external data representation and marshalling with example
  19. How threads can be used in client and server process
  20. Discuss in detail about distributed file system implementation
  21. Compare Sun NFS and AFS
  22. Explain con currency control in Distributed transactions
  23. Explain in detail about threads and its implementations
  24. Discuss about requirements of distributed file system
  25. Explain about NFS and its enhancements
  26. Explain about AFS and its enhancements
  27. Explain in detail about file system architecture
  28. Explain fault tolerant services in DS
  29. Compare different concurrency control techniques
  30. Explain optimistic concurrency control technique
  31. Outline two phase commit protocol for distributed transaction processing
  32. What is group masking and digital signature
  33. discuss in detail about locks in DS
  34. Explain about system model and group communication

Polygon Clipping

Download as ".c" file http://www.ziddu.com/download/7938911/poly_clipping.zip.html
/* Polygon Clipping*/
#include
#include
int n,p,x,y,i,j;
int xwmin,ywmin,xwmax,ywmax;
int x1,y1,x2,y2,xmax,ymax;
float m;
char flag;
float dy,dx;
main()
{
int gd,gm;
int a[10][10],b[10][10],c[10][10],d[10][10],e[10][10];
detectgraph(&gd,&gm);
initgraph(&gd,&gm,"e:\\tc30\\bgi");
printf("\n\n\tenter the no. of edges of polygon : ");
scanf("%d",&n);
printf("\n\n\tenter the cordinates of polygon :\n\n\n ");
for(i=0;i {
printf("\tx%d y%d : ",i,i);
scanf("%d %d",&a[i][0],&a[i][1]);
}
a[n][0]=a[0][0];
a[n][1]=a[0][1];
printf("\n\tenter the co_ordinates of window :\n ");
printf("\n\txwmin , ywmin : ");
scanf("%d %d",&xwmin,&ywmin);
printf("\n\txwmax , ywmax : ");
scanf("%d %d",&xwmax,&ywmax);
xmax = 640; ymax = 480;
cleardevice();
setcolor(35);
for(i=0;i {
line(a[i][0],ymax-a[i][1],a[i+1][0],ymax-a[i+1][1]);
}
rectangle(xwmin,ymax-ywmin,xwmax,ymax-ywmax);
getch();
setcolor(35);
clip_left(a,b);
clip_right(b,c);
clip_bottom(c,d);
clip_top(d,e);
cleardevice();
setcolor(63);
for(i=0;i {
line(e[i][0],ymax-e[i][1],e[i+1][0],ymax-e[i+1][1]);
}
getch();
}
clip_left(int a[10][10], int b[10][10])
{
p=0;flag=0;m=0;
for(i=0;i {
dy=a[i+1][1]-a[i][1];
dx=a[i+1][0]-a[i][0];
if((dx!=0)&&(dy!=0))
{
m=(dy/dx);
}
if((a[i][0]=xwmin) ) flag=0;
if((a[i][0]>=xwmin)&&(a[i+1][0]>=xwmin)) flag=1;
if((a[i][0]>=xwmin)&&(a[i+1][0] if((a[i][0] switch(flag)
{
case 0 :
x=xwmin;
if(dy!=0)
y=(int)(a[i][1]+m*(x-a[i][0]));
else
y=a[i][1];
b[p][0]=x;
b[p][1]=y;
p++;
b[p][0]=a[i+1][0];
b[p][1]=a[i+1][1];
p++;
break;
case 1 :
b[p][0]=a[i+1][0];
b[p][1]=a[i+1][1];
p++;
break;
case 2 :
x=xwmin;
if(dy!=0)
y=(int)(a[i][1]+m*(x-a[i][0]));
else
y=a[i][1];
b[p][0]=x;
b[p][1]=y;
p++;
}
}
b[p][0]=b[0][0];
b[p][1]=b[0][1];
cleardevice();
setcolor(35);
rectangle(xwmin,ymax-ywmin,xwmax,ymax-ywmax);
setcolor(63);
for(i=0;i {
line(b[i][0],ymax-b[i][1],b[i+1][0],ymax-b[i+1][1]);
getch();
}
getch();
}

clip_right(int b[10][10],int c[10][10])
{
n=p; p=0; m=0;
for(i=0;i {
dy=b[i+1][1]-b[i][1];
dx=b[i+1][0]-b[i][0];
if((dx!=0)&&(dy!=0))
{
m=(dy/dx);
}
if((b[i][0]>xwmax)&&(b[i+1][0]<=xwmax) ) flag=0;
if((b[i][0]<=xwmax)&&(b[i+1][0]<=xwmax) ) flag=1;
if((b[i][0]<=xwmax)&&(b[i+1][0]>xwmax) ) flag=2;
if((b[i][0]>xwmax)&&(b[i+1][0]>xwmax) ) flag=3;
switch(flag)
{
case 0 :
x=xwmax;
if(dy!=0)
y=(int)(b[i][1]+m*(x-b[i][0]));
else
y=b[i][1];
c[p][0]=x;
c[p][1]=y;
p++;
c[p][0]=b[i+1][0];
c[p][1]=b[i+1][1];
p++;
break;
case 1 :
c[p][0]=b[i+1][0];
c[p][1]=b[i+1][1];
p++;
break;

case 2 :
x=xwmax;
if(dy!=0)
y=(int)(b[i][1]+m*(x-b[i][0]));
else
y=b[i][1];
c[p][0]=x;
c[p][1]=y;
p++;
}
}
c[p][0]=c[0][0];
c[p][1]=c[0][1];
cleardevice();
setcolor(35);
rectangle(xwmin,ymax-ywmin,xwmax,ymax-ywmax);
setcolor(63);
for(i=0;i {
line(c[i][0],ymax-c[i][1],c[i+1][0],ymax-c[i+1][1]);
getch();
}
getch();
}

clip_bottom(int c[10][10],int d[10][10])
{
n=p; p=0; m=0;
for(i=0;i {
dy=c[i+1][1]-c[i][1];
dx=c[i+1][0]-c[i][0];
if((dx!=0)&&(dy!=0))
{
m=(dy/dx);
}
if((c[i][1]=ywmin) ) flag=0;
if((c[i][1]>=ywmin)&&(c[i+1][1]>=ywmin) ) flag=1;
if((c[i][1]>=ywmin)&&(c[i+1][1] if((c[i][1] switch(flag)
{
case 0 :
y=ywmin;
if(dx!=0)
x=abs((int)(c[i][0]+(1/m)*(y-c[i][1])));
else
x=c[i][0];
d[p][0]=x;
d[p][1]=y;
p++;
d[p][0]=c[i+1][0];
d[p][1]=c[i+1][1];
p++;
break;
case 1 :
d[p][0]=c[i+1][0];
d[p][1]=c[i+1][1];
p++;
break;
case 2 :
y=ywmin;
if(dx!=0)
x=abs((int)(c[i][0]+(1/m)*(y-c[i][1])));
else
x=c[i][0];
d[p][0]=x;
d[p][1]=y;
p++;
}
}
d[p][0]=d[0][0];
d[p][1]=d[0][1];
cleardevice();
setcolor(35);
rectangle(xwmin,ymax-ywmin,xwmax,ymax-ywmax);
setcolor(63);
for(i=0;i {
line(d[i][0],ymax-d[i][1],d[i+1][0],ymax-d[i+1][1]);
getch();
}
getch();
}

clip_top(int d[10][10],int e[10][10])
{
n=p;
p=0;
for(i=0;i {
dy=d[i+1][1]-d[i][1];
dx=d[i+1][0]-d[i][0];
if((dx!=0)&&(dy!=0))
{
m=(dy/dx);
}
if((d[i][1]>ywmax)&&(d[i+1][1]<=ywmax) ) flag=0;
if((d[i][1]<=ywmax)&&(d[i+1][1]<=ywmax) ) flag=1;
if((d[i][1]<=ywmax)&&(d[i+1][1]>ywmax) ) flag=2;
if((d[i][1]>ywmax)&&(d[i+1][1]>ywmax) ) flag=3;
switch(flag)
{
case 0 :
y=ywmax;
if(dx!=0)
x=abs((int)(d[i][0]+(1/m)*(y-d[i][1])));
else
x=d[i][0];
e[p][0]=x;
e[p][1]=y;
p++;
e[p][0]=d[i+1][0];
e[p][1]=d[i+1][1];
p++;
break;
case 1 :
e[p][0]=d[i+1][0];
e[p][1]=d[i+1][1];
p++;
break;
case 2 :
y=ywmax;
if(dx!=0)
x=abs((int)(d[i][0]+(1/m)*(y-d[i][1])));
else
x=d[i][0];
e[p][0]=x;
e[p][1]=y;
p++;
}
}/*-for()-*/
e[p][0]=e[0][0];
e[p][1]=e[0][1];
cleardevice();
setcolor(35);
rectangle(xwmin,ymax-ywmin,xwmax,ymax-ywmax);
setcolor(63);
for(i=0;i {
line(e[i][0],ymax-e[i][1],e[i+1][0],ymax-e[i+1][1]);
getch();
}
getch();
getch();
}

Download as ".c" file http://www.ziddu.com/download/7938911/poly_clipping.zip.html

Line clipping

Download as ".c" file http://www.ziddu.com/download/7938820/line_clipping.zip.html

/*Line clipping
#include
#include
#include

typedef unsigned int outcode;
enum { TOP=0x1, BOTTOM=0x2, RIGHT=0x4, LEFT=0x8 };

void lineclip(x0,y0,x1,y1,xwmin,ywmin,xwmax,ywmax )
float x0,y0,x1,y1,xwmin,ywmin,xwmax,ywmax;
{

int gd,gm;
outcode code0,code1,codeout;
int accept = 0, done=0;
code0 = calcode(x0,y0,xwmin,ywmin,xwmax,ywmax);
code1 = calcode(x1,y1,xwmin,ywmin,xwmax,ywmax);

do{
if(!(code0 | code1))
{
accept =1 ; done =1;
}
else
if(code0 & code1)
done = 1;
else
{
float x,y;
codeout = code0 ? code0 : code1;
if(codeout & TOP)
{
x = x0 + (x1-x0)*(ywmax-y0)/(y1-y0);
y = ywmax;
}
else
if( codeout & BOTTOM)
{
x = x0 + (x1-x0)*(ywmin-y0)/(y1-y0);
y = ywmin;
}
else
if ( codeout & RIGHT)
{
y = y0+(y1-y0)*(xwmax-x0)/(x1-x0);
x = xwmax;
}
else
{
y = y0 + (y1-y0)*(xwmin-x0)/(x1-x0);
x = xwmin;
}
if( codeout == code0)
{
x0 = x; y0 = y;
code0=calcode(x0,y0,xwmin,ywmin,xwmax,ywmax);
}
else
{
x1 = x; y1 = y;
code1 = calcode(x1,y1,xwmin,ywmin,xwmax,ywmax);
}
}
} while( done == 0);
if(accept) line(x0,y0,x1,y1);
rectangle(xwmin,ywmin,xwmax,ywmax);
getch();

}


int calcode (x,y,xwmin,ywmin,xwmax,ywmax)
float x,y,xwmin,ywmin,xwmax,ywmax;
{
int code =0;
if(y> ywmax)
code |=TOP;
else if( y code |= BOTTOM;
else if(x > xwmax)
code |= RIGHT;
else if ( x< xwmin)
code |= LEFT;
return(code);
}


main()
{

float x2,y2,x1,y1,xwmin,ywmin,xwmax,ywmax;
int gd=DETECT,gm;
clrscr();
initgraph(&gd,&gm,"e:\\tc\\bgi");
printf("\n\n\tEnter the co-ordinates of Line :");
printf("\n\n\tX1 Y1 : ");
scanf("%f %f",&x1,&y1);
printf("\n\n\tX2 Y2 : ");
scanf("%f %f",&x2,&y2);
printf("\n\tEnter the co_ordinates of window :\n ");
printf("\n\txwmin , ywmin : ");
scanf("%f %f",&xwmin,&ywmin);
printf("\n\txwmax , ywmax : ");
scanf("%f %f",&xwmax,&ywmax);
clrscr();
line(x1,y1,x2,y2);
rectangle(xwmin,ywmin,xwmax,ywmax);
getch();
clrscr();
lineclip(x1,y1,x2,y2,xwmin,ywmin,xwmax,ywmax );
getch();
closegraph();

}


Download as ".c" file http://www.ziddu.com/download/7938820/line_clipping.zip.html

Simulation of a fan

Download as ".c" file http://www.ziddu.com/download/7938660/fan.zip.html


/*Simulation of a fan */
#include
#include
#include
#include
#include
const int midx=640/2,midy=480/2;
void drawfin(int angle)
{
setcolor(BLUE);
if(angle==0)
{
pieslice(midx,midy,0,30,35);
}
else
{
pieslice(midx,midy,(angle+30),(angle+30),35);
pieslice(midx,midy,(angle+90),(angle+90+60),35);
pieslice(midx,midy,(angle+270-60),(angle+270),35);
pieslice(midx,midy,(angle+360-60),(angle+360),35);
}
}
void drawfan(int angle)
{
int i;
bar(midx-3,midy,midx+3,midy+60);
bar(midx-35,midy+60,midx+35,midy+80);
bar(midx-30,midy+65,midx+30,midy+75);
for(i=5;i<=40;i+=10)
ellipse(midx,midy,0,360,i,i);
drawfin(angle);
fillellipse(midx,midy,5,5);
for(i=10;i<=40;i+=10)
ellipse(midx,midy,0,360,i,i);
ellipse(midx,midy,0,360,41,41);
}

void main()
{
int angle=0,speed=50,choice;
int gdriver = DETECT, gmode;
initgraph(&gdriver, &gmode, "");
printf("\nELECTRIC FAN");
drawfan(angle);
while(!kbhit())
{
drawfan(angle);
delay(speed);
if(angle==270)
angle=0;
else
angle=angle+90;
cleardevice();
}
closegraph();
}

Download as ".c" file http://www.ziddu.com/download/7938660/fan.zip.html

Familiarization with microprocessor and assembly language programming-David Pager





Professor David Pager
Department of Information and Computer Sciences, University of Hawai`i at Manoa






Website:http://www2.hawaii.edu/~pager/312/





Compilers(Power point presentations) Prof. Kim Hazelwood







Prof. Kim Hazelwood
Computer Science Department
University of Virginia



Website: http://www.cs.virginia.edu/kim/courses/cs671/lectures.html





Posted in Labels: | 0 comments

Formal Languages and Automata(power point presentations)-T. K. Prasad





T. K. Prasad
Department of Computer Science & Engineering
Wright State University


Website:http://www.cs.wright.edu/~tkprasad/courses/cs466/cs466.html





Posted in Labels: | 0 comments

Models of Computation(Power point presentations)-Petros Drineas

Lectures by






Petros Drineas
Associate Professor
Computer Science Department
Rensselaer Polytechnic Institute







Website :http://www.cs.rpi.edu/~drinep/modcomp





Posted in Labels: | 0 comments

Transformations in 2D

Computer Graphics by Dr. Sukhendu das, Dept. of Computer Science and Engineering, IIT Madras

Lecture 1



Download

Lecture 2



Download

Posted in Labels: | 0 comments

CRT Display Devices

Computer Graphics by Dr. Sukhendu das, Dept. of Computer Science and Engineering, IIT Madras

CRT Display Devices- Lecture 1



Download

Lecture 2



Download


Lecture 3



Download


Lecture 4



Download

Posted in Labels: | 0 comments

Computer Graphics -Introduction

Computer Graphics by Dr. Sukhendu das, Dept. of Computer Science and Engineering, IIT Madras.



Download

Posted in Labels: | 0 comments

Quick Sort

Posted in Labels: | 0 comments

Deletion

Posted in Labels: | 0 comments

Trees

Lecture 1:Trees(1)


Download


Lecture 2: Trees(2)


Download



Lecture 3:Tree Traversals


Download

Lecture 4: AVL Trees(1)

Download

Lecture 5: AVL Trees(2)


Download

Posted in Labels: | 0 comments

Hashing

Posted in Labels: | 0 comments

Dictionaries

Lecture 1:Dictionaries



Download


Lecture 2: Ordered Dictionaries





Download

Posted in Labels: | 0 comments

Queues and Linked Lists

Posted in Labels: | 0 comments

Stacks

Posted in Labels: | 0 comments