Free Computer Science Source Codes ( Read First Thread and Proceed)

I am Uploading set of Simple Projects in C, C#, Java, VB that will help you learn in programming languages like C and .Net. Just uploading it as my first effort to offer free launch. But do post your comments, if you like them.
Most Important: These projects are free downloadable and exclusively shared at crazyengineers.com under any circumstances, they must not be shared with any other websites. copyright of these projects remains with CE, even if I am not associated with CE.

Because the projects are free, I will not give any clarification or explanation on them. You are on your own. free launches will not be supported with free deserts!
[I am in a mad rush to share everything for free in my #-Link-Snipped-#]

Download and Have Fun

[PS: Do not ever bother to ask for the report and PPTs of the same project]

Replies

  • Rupam Das
    Rupam Das
    #-Link-Snipped-##-Link-Snipped-#
    In this system, any node in a region may initiate transmission. And this transmission usually consists of data relating to the temperature and humidity. Every node will sense the data continuously but will communicate it to the server occasionally. This communication of sensed data to the server will be generally termed as data forwarding and in particular in sensor network, it is known as geographic routing and here the criterion used is physical distance (in meters) between the node and server. Every node will store this sensed forwarding data in a table called routing table and this can be forwarded to the server by sending the table neighbor by neighbor. Suppose, node N will send its routing table to its neighbor say M. M will append its own table and so on. M’s entry may be same as N’s entry. This information being the same will be termed as correlation. And our objective is to minimize correlation so that maximum lifetime routing is possible. And as we move away from a node, correlation in minimum. And if correlation is more between two nodes, we take mean of all data i.e. aggregation and then transfer the aggregate data. To maximize lifetime routing in wireless sensor network, we have to also consider the nodes with lesser energy. As the nodes energy will decrease, the rate of power transmission will decrease, which will affect the lifetime routing. So, we have to identify the nodes which have lesser energy so not to transmit data to those nodes.
    #-Link-Snipped-#
  • Rupam Das
    Rupam Das
    And after downloading if you do not bother to thanks CE and ( optional Me) I will stop posting free launch..

    ______________________________________READ________________________________________________
    One more thing, I do not really know how much CE forum script support uploading files through HTTP post method. So I have added a link to the download location. Once some CE mods give me the information about upload limit, I will upload directly in CE Server. The thread is not meant for link building

    ( many may consider it that way! CE is "nofollow: forum so no back link has any effect on PR. Therefore just come out of all such thoughts and enjoy the launch)

    [This is in reply to one of the private Messages that I have got!]

    PS: Dont Send me private Messages doubting my integrity. I am Spending the entire day here in CE to see it grow. Because I love this Site!
    If nobody likes the Idea, I am surely gonna close it!
  • Rupam Das
    Rupam Das
    Simulation of AODV in MANET with Random waypoint mobility (TC)

    #include
    #include
    #include
    #include
    #include
    #include
    #include
    
    
    int packlost=0;
    double txdist=0.0,rxdist=0.0;
    double dist(int x1,int y1,int x2,int y2)
    {
    	double d=0.0;
    	d=((double)((x2-x1)*(x2-x1))+(double)((y1-y2)*(y1-y2)));
    	if(d<0)
    	d=d*(double)(-1);
    	d=sqrt(d);
    	return d;
    }
    void main()
    {
    	double d;
    	int count=0;
    	int n=20,a[20],l;
    	char mobno[20][3]={"0","1","2","3","4","5","6","7","8","9","10","11","12",
    				"13","14","15","16","17","18","19"};
    	int server,rec,tx,k;
    	int gd=DETECT,gm,i,j,x,y;
    	int x1,x2,y1,y2,pos;
    	initgraph(&gd,&gm,"d:\\tc\\bgi");
    	randomize();
    	line(20,20,420,20);
    	line(20,420,420,420);
    	i=20;
    	j=20;
    	up:n=rand()%20;
    	if(n<3)
    	goto up;
    
    
    	for(j=0;j<=10;j++)
    	{
    		line(i,20,i,420);
    		i=i+40;
    	}
    	i=20;
    	for(j=0;j<=10;j++)
    	{
    		line(20,i,420,i);
    		i=i+40;
    	}
    
    
    
    
    		for(l=0;l<=n;l++)
    		{
    			a[l]=rand()%100;
    
    
    			pos=a[l];
    			x1=40+(pos%10)*40;
    			pos=pos/10;
    			y1=(pos)*40+40;
    			setcolor(RED);
    			circle(x1,y1,13);
    			outtextxy(x1,y1,mobno[l]);
    
    
    		}
    			/**********/
    
    
    
    
    		 server=rand()%n;
    		 printf("server=%d ",server);
    
    
    		 top:tx=rand()%n;
    		 if(tx==server)
    		 goto top;
    
    
    		top1: rec=rand()%n;
    		 if(rec==server)
    		 goto top1;
    		 if(rec==tx)
    		 goto top1;
    
    
    		/*transmitter*/
    		 printf("rec=%d",rec);
    		 printf("  tx=%d  ",tx);
    		 setcolor(GREEN);
    		 pos=a[tx];
    		 x1=40+(pos%10)*40;
    		pos=pos/10;
    		y1=(pos)*40+40;
    
    
    		pos=a[server];
    		x2=40+(pos%10)*40;
    		pos=pos/10;
    		y2=(pos)*40+40;
    		d=dist(x2,y2,x1,y1);
    		txdist=d;
    		delay(4500);
    		setcolor(YELLOW);
    		outtextxy(x2,y2,"S");
    		 setcolor(GREEN);
    		line(x1,y1,x2,y2);
    		setcolor(GREEN);
    
    
    		/*reciever*/
    		 pos=a[rec];
    		 x1=40+(pos%10)*40;
    		pos=pos/10;
    		y1=(pos)*40+40;
    		delay(1500);
    		d=dist(x2,y2,x1,y1);
    		rxdist=d;
    		line(x1,y1,x2,y2);
    		delay(1500);
    
    
    		/* simulate  it thrice*/
    		for(k=0;k<3;k++)
    		{
    			cleardevice();
    			i=20;
    			setcolor(WHITE);
    			for(j=0;j<=10;j++)
    			{
    				line(i,20,i,420);
    				i=i+40;
    			}
    			i=20;
    			for(j=0;j<=10;j++)
    			{
    				line(20,i,420,i);
    				i=i+40;
    			}
    
    
    			for(l=0;l<=n;l++)
    			{
    				a[l]=rand()%100;
    
    
    				pos=a[l];
    				x1=40+(pos%10)*40;
    				pos=pos/10;
    				y1=(pos)*40+40;
    				setcolor(RED);
    				circle(x1,y1,13);
    				outtextxy(x1,y1,mobno[l]);
    
    
    			}
    
    
    			delay(1400);
    			pos=a[tx];
    			x1=40+(pos%10)*40;
    			pos=pos/10;
    			y1=(pos)*40+40;
    
    
    			pos=a[server];
    			x2=40+(pos%10)*40;
    			pos=pos/10;
    			y2=(pos)*40+40;
    			d=dist(x1,y1,x2,y2);
    			count=0;
    
    
    		   while(d>txdist)
    			{
    			printf("RREQ the rerequest for router");
    
    
    
    
    			  do
    			  {
    
    
    			  count++;
    			  if(count==2)
    			  {
    				count=-1;
    				break;
    			  }
    			  server=rand()%n;
    			  }while(server==tx);
    
    
    			 pos=a[server];
    			x2=40+(pos%10)*40;
    			pos=pos/10;
    			y2=(pos)*40+40;
    			d=dist(x1,y1,x2,y2);
    
    
    		       if(count==-1)
    		       break;
    			}
    
    
    			delay(4500);
    			setcolor(YELLOW);
    			outtextxy(x2,y2,"S");
    			setcolor(GREEN);
    			line(x1,y1,x2,y2);
    			setcolor(GREEN);
    
    
    			pos=a[rec];
    			x1=40+(pos%10)*40;
    			pos=pos/10;
    			y1=(pos)*40+40;
    			delay(1500);
    			d=dist(x1,y1,x2,y2);
    			if(d>rxdist)
    			{
    			packlost++;
    			outtextxy(100,10,"packet loss");
    			delay(1500);
    			}
    			else
    			{
    			line(x1,y1,x2,y2);
    			delay(1500);
    			}
    		}
    
    
    	       getch();
    	       closegraph();
    	       textcolor(RED);
    	       gotoxy(10,10);
    	       cprintf("Packet lost=%d",packlost);
    	       getch();
    
    
    }
    
    
    
  • Rupam Das
    Rupam Das
    Minimum Spanning Tree CGrahics Source Code

    #include
    #include
    #include
    #include
    #define max 100
    void init();
    void grid();


    #define INF 999
    char* num[20]={"0","01","02","03","04","05","06","07","08","09","10",


    "11","12","13","14","15","16","17","18","19"};






    struct router
    {
    int dist;
    int prev;
    int mem;
    }node[max];
    struct EDGE
    {int n1;
    int n2;


    }edge[max-1] ;
    int indx=0;
    int n,i,j,count=0,root,tmp,current,small;
    distance[max][max];
    void main()
    {
    printf("Enter the Number of Nodes\n");
    scanf("%d",&n);
    for(i=0;i for(j=0;j {if(i==j)
    distance[j]==0;
    else


    {distance[j]=-1;
    }


    }


    clrscr();


    printf("-----Please Enter Distances-----\n");
    for(i=0;i for(j=0;j {if(distance[j]<0)
    {
    printf("Enter distance[%d][%d] unreachable distance must be 999\n",i,j);
    scanf("%d",&distance[j]);
    }


    distance[j]=distance[j];




    }
    printf("Please Enter the root Node\n");
    scanf("%d",&root);


    for(i=0;i {
    node.dist=INF;
    node.prev=-1;
    node.mem=0;
    }
    current=root;
    node[current].dist=0;
    node[current].mem=1;
    count++;
    while(count!=n)
    { small=INF;
    for(i=0;i {
    if(node.mem==0)
    {
    if(distance[current].dist)
    {
    node.dist=distance[current];
    node.prev=current;




    }


    }




    }//end of for
    small=INF;
    for(i=0;i { if(node.mem!=1)
    {
    if(node.dist {
    small=node.dist;
    tmp=i;
    }
    }


    }
    current=tmp;
    edge[indx].n1=current;
    edge[indx].n2=node[current].prev;
    indx++;
    count++;
    node[current].mem=1;




    } printf("Edges are\n");
    for(i=0;i {printf("%d------%d\n",edge.n1,edge.n2);


    }
    getch();
    init();




    }


    void init()
    {
    int gdriver = DETECT, gmode, errorcode;
    int pos=0;
    initgraph(&gdriver, &gmode, "d:\\tc\\bgi");
    cleardevice();
    randomize();
    grid();








    }


    void grid()
    {


    int i,j;
    int phone[100];
    int pos,p,q,x,y;
    int pos1,pos2,x1,y1,x2,y2;
    setcolor(2);
    line(60,20,460,20);
    line(60,420,460,420);
    i=60;
    j=20;
    for(j=0;j<=11;j++)
    {
    line(i,20,i,461);
    i=i+40;
    }
    i=20;
    for(j=0;j<=11;j++)
    {
    line(60,i,495,i);
    i=i+40;
    }
    randomize();
    for(i=0;i { pos=rand()%100;
    phone[i]=pos;
    p=phone[i]/10;
    q=phone[i]%10;
    setcolor(RED);
    x=80+(40*q);
    y=80+(40*p);


    printf("x=%d y=%d\n",x,y);
    circle(x,y,15);
    outtextxy((75+(40*q)),(75+(40*p)),num[i]);
    }
    getch();
    for(i=0;i {
    pos1=phone[edge[i].n1];
    pos2=phone[edge[i].n2];
    p=pos1/10;
    q=pos1%10;
    setcolor(GREEN);
    x1=80+(40*q);
    y1=80+(40*p);
    p=pos2/10;
    q=pos2%10;
    setcolor(YELLOW);
    x2=80+(40*q);
    y2=80+(40*p);
    line(x1,y1,x2,y2);




    }
    getch();




    }[/i][/i][/i][/i][/i][/i]
  • Pensu
    Pensu
    Thats a great initiative rupam. I am sure it will help CEans a lot....😀

You are reading an archived discussion.

Related Posts

Hi I thought I would come along and introduce myself, I work within Cal Gavin who are a provider of heat exchanger solutions to companies and process plants around the...
hello friends😎i am a computer engineer student and this year i have to do a seminar project...what i decided to do after reading many ideas is to convert sign language...
hello CEans! i haven't been here for a long time due to busy schedule and too many requirements to be done. I just wanted to ask for your help to...
Executives and engineers' networking event to showcase open control system | Product Story | Source
hi.i want the paper presentation date submissions and the topics for those paper presentations.thank you.