OpenLDAP Installation, Configuration & User Authentication

–> Introduction: OpenLDAP Software is a free, open source implementation of the Lightweight Directory Access Protocol (LDAP) developed by the OpenLDAP Project. It is released under its own BSD-style license called the OpenLDAP Public License. LDAP is a platform-independent protocol. Several common Linux distributions include OpenLDAP Software for LDAP support. Lightweight Directory Access Protocol (LDAP) […]

Back Button Security threat after logout in ASP.Net

This is the code most of us would normally use when logging out a user: FormsAuthentication.SignOut();FormsAuthentication.RedirectToLoginPage(); A frequent problem is that after a user logs out of their application using this code or similar, if they then use the back button they are presented with pages from the application without having to login. The reason […]

Network Programming Lab Practicals Complete File

Write an echo program with client and iterative server using TCP. Implementing the solution 1) Write a server (TCP) C Program that opens a listening socket and waits to serve client 2) Write a client (TCP) C Program that connects with the server program knowing IP address and port number. 3) Get the input string […]

Write a program to draw the line using DDA algorithm.

#include<stdio.h> #include<conio.h> #include<graphics.h> #include<iostream.h> #include<complex.h> void main() { int x1,y1,x2,y2,i,len,gdriver=DETECT,gmode,errorcode; float incx,incy,x,y; initgraph(&gdriver,&gmode,”c:\\tc\\bgi”); clrscr(); cout << “enter the value of x1,y1,x2,y2″<< endl; cin >>x1>>y1>>x2>>y2; len=abs(x2-x1); if(abs(y2-y1)>len) len=abs(y2-y1); incx=(x2-x1)/len; incy=(y2-y1)/len; x=x1+0.5;y=y1+0.5; for(i=1;i<=len;i++) { putpixel(x,y,9); x=x+incx; y=y+incy; } getch(); }  

Write a program to draw the line using Bresenham’s algorithm.

#include<graphics.h> #include<iostream.h> #include<dos.h> #include<math.h> #include<conio.h> void main() { int gd=DETECT,gm; int x1,x2,y1,y2; int i,flag,d; clrscr(); cout<<“Enter value of (x1,y1)= “; cin>>x1>>y1; cout<<“Enter value of (x2,y2)= “; cin>>x2>>y2; initgraph(&gd,&gm,”c:\\tc\\bgi”); int dx,dy; dx=abs(x2-x1); dy=abs(y2-y1); int x,y,t,s1,s2; x=x1; y=y1; if((x2-x1)>0) s1=1; else s1=-1; if((y2-y1)>0) s2=1; else s2=-1; if(dy>dx) { t=dx; dx=dy; dy=t; flag=1; } else flag=0; d=2*dy-dx; outtextxy(x1,y1,”(x1,y1)”); […]

Write a program to draw circle using Bresenham’s algorithm.

#include<stdio.h> #include<conio.h> #include<graphics.h> #include<complex.h> #include<math.h> #include<stdlib.h> void main() { int x1,y1,x,y,r,p,gdriver=DETECT,gmode,errorcode; initgraph(&gdriver,&gmode,”c:\\tc\\bgi”); errorcode=graphresult(); if(errorcode!=grOk) { cout << “graphics error is: %s” << grapherrormsg(errorcode); cout << “hit a key to halt” ; getch(); exit(1); } cleardevice(); cout << “enter the value of x1,y1,r” << endl; cin >>x1>>y1>>r; x=0; y=r; p=3 – 2 * r; while(x<=y) { […]