Friday 30 March 2012

W.A.P to implement Midpoint circle algorithm.



#include "graphics.h"
#include "stdlib.h"
#include "stdio.h"
#include "conio.h"
makeCircle(int,int,int,int);
int main(void)
{
   /* request auto detection */
   int gdriver = DETECT, gmode, errorcode;
   //int midx, midy;
   //int radius = 100;
   int R,x,y,cx,cy,d;

   /* initialize graphics and local variables */
   initgraph(&gdriver, &gmode, "");

   /* read result of initialization */
   errorcode = graphresult();
   if (errorcode != grOk)  /* an error occurred */
   {
      printf("Graphics error: %s\n", grapherrormsg(errorcode));
      printf("Press any key to halt:");
      getch();
      exit(1); /* terminate with an error code */
   }

   /*
   midx = getmaxx() / 2;
   midy = getmaxy() / 2;
   setcolor(getmaxcolor());

   draw the circle
   circle(midx, midy, radius);
   */

   //MidPoint Circle algorithm:
   printf("enter co-ordinates for center");
   scanf("%d,%d",&cx,&cy);
   printf("enter the radius:");
   scanf("%d",&R);
   x=0,y=R;
   d=1-R;
   while(y>x)
   {

   makeCircle(cx,cy,x,y);

   if(d<0)
   {
    d=d+(2*x)+1;
   }
   else
   {
    d=d+(2*(x-y))+1;
    y--;
   }
   x++;

    makeCircle(cx,cy,x,y);
   }
   /* clean up */
   getch();
   closegraph();
   return 0;
}
makeCircle(int cx,int cy,int x,int y)
{
    putpixel(cx+x,cy+y);
    putpixel(cx-x,cy+y);
    putpixel(cx+x,cy-y);
    putpixel(cx-x,cy-y);
    putpixel(cx+y,cy+x);
    putpixel(cx-y,cy+x);
    putpixel(cx+y,cy-x);
    putpixel(cx-y,cy-x);
}

Download it from here: https://docs.google.com/viewer?a=v&pid=sites&srcid=ZGVmYXVsdGRvbWFpbnwwOWNlZ2l0fGd4OjY1MGQ1Y2NiYjc1ZWYxNDU 

News

Unfortunately the batches have been changed because of the detained students..
up to 090120107058 no. are in class A and from 090120107059 no. are in class B..
so kindly check your batch..





in Software Engineering lab we have to choose one problem on which we will have to build an application..
for that we have to submit our defination (2 pages max.) to respected lab faculty in next lab..
each student has to choose individual and different subject..




SEMI-FINAL:
3rd c.e. b VS 3rd m.e.
6th Feb. (Monday)
9am
3rd c.e. a VS 2nd m.e.
12pm
c.e. back to back... :)
so be present and shower your loving support for computer

Draw A Kite In C language

#include<stdio.h>
#include<graphics.h>
#include<alloc.h>
int main(void)
{
void *kite;
int s,x,y,gd=DETECT,gm,r;
initgraph(&gd,&gm,"c:\tc");
setcolor(10);
moveto(100,100);
lineto(125,75);
lineto(150,100);
lineto(120,130);
lineto(130,130);
lineto(125,125);
lineto(100,100);  //this completes the outline design of kite
setfillstyle(SOLID_FILL,BLUE);
floodfill(125,100,10);
floodfill(125,127,10);
arc(125,120,40,140,31);
line(125,125,125,75);
line(125,110,150,130);
line(125,94,150,130);

s=imagesize(100,75,150,130);
kite=(void*)malloc(s);

getimage(100,75,150,130,kite);
putimage(100,75,kite,XOR_PUT);
x=100,y=75;

while(!kbhit())
{
setcolor(10);
putimage(x,y,kite,XOR_PUT);
setcolor(YELLOW);
line(x+50,y+55,639,479);
delay(100);
putimage(x,y,kite,XOR_PUT);
setcolor(0);
line(x+50,y+55,639,479);

r=rand();

switch(r%4)
{
case 0:x=x+10; break;
case 1:x=x-10; break;
case 2:y=y+10; break;
case 3:y=y-10;break;
}
if(x>640) x-=40;
if(x<40) x+=40;
if(y>479) y-=40;
if(y<40) y+=40;
}
getch();
closegraph();
return 0;
}

What is the difference between Bug, Error and Defect?

Error:
The difference between expected result and actual result is error.
Is an undesirable deviation from requirements or Cosmetic.

Bug:
If that error comes at the tome of development stage before production then it is bug.
Is an error found BEFORE the application goes into production or missing Functionality.

Defect:
If that error comes after production then we say it is defect.
Is an error found AFTER the application goes into production or missing Requirement

How to solve Windows is not Genuine problem?


If you have a message that the windows is not genuine then
go to Start>
Control Panel>
Uninstall Programs>
Click on view installed updates>
Uninstall KB971033

PROTOCOLS and their PORTS


Ftp 21 Sftp,Ssh 22
Telnet 23
Smtp 25
Http,Php 80
Pop3 110
Irc 194
Https 443
Ftps 990

CS




Counter Strike 1.6 :-

Counter Strike Counter Strike (CS) 1.6 is a MOD for Half-Life that is set in a team play mode. An institution in first-person shooters, Counter Strike 1.6 is the most up to date version of the classic video game, with the Steam system providing bug fixes and updates.


cl_flushentitypacket :-

If you are getting CL_FlushEntityPacket Warnings this typically means that either:
  • Your internet connection or the server's internet connection is having problems.
  • Your connection is overloaded, for example running a peer-to-peer file-sharing application in the background.
  • There are other computers on your local network using your internet connection.
  • The server you are on has its network connection overloaded.
  • You are running on a wireless connection with a poor or inconsistent signal.
  • You have a Virus or Trojan or Internet Worm infection that is generating traffic.
  • You are connected to the internet using a dial-up or other low-speed connection.
  • You have your rate or cl_updaterate or cl_cmdrate settings too fast for your internet connection.

How to fix??
  1. set rate to 9000
  2. set cl_rate to 20000
  3. set cl_cmdrate to 30
  4. set cl_updaterate to 20
  5. set fps_max to 100
  6. set net_graph to 3 

void main()





"void main()" - Event in Teqnix 2012

We introduce you to the totally novice and unique concept in the history of "Teqnix" as well as in the history of Gujarat.
Void main() is of utmost prominence in the world of programming. It would be blasphemous to even think about programming without using void main(). Hereby we provide you with an opportunity to showcase and enhance your programming skills.

We serve you with this fabulous opportunity at your doorsteps where you wouldn't even have to spend your money. So gear up and accelerate your neural activity towards programming and prove yourself the best among programmers community.


This will be a 24 hours online competition, wherein you will be given 8 real time problem statements. All you have to do is to keep yourself at home, think and develop the logic for the solution and implement it in C, C++ or Java and submit your programs one by one as soon as you finish.


Visit the website (click on the above pic)


IMP


devharsh@live.in
facebook.com/devharsh


Computer Graphics :
  1. Ellipse Algorithm
  2. B-spline curve is included in 'CG' MSE syllabus..so pass this message to all 6th CE/IT students

Theory Of Computation :
  1. Context Free Grammar
  2. Chomsky Normal Form

Information Security :
  1. Attacks addressed by message author
  2. Requirements/Properties of Hash Function

System Programming :
  1. Parsing id + id * id with grammar
    E --> E+T | T
    T --> T*F | F
    F --> P
    P --> id
  2. LL(1) with grammar
    E --> TE'
    E' --> +TE' | e
    T --> VT'
    T' --> *VT' | e
    V --> id

My pages


■ □ ▢ ▣ ▤ ▥ ▦ ▧ ▨ ▩ ▪ ▫ ▬ ▭ ▮ ▯

my facebook id: facebook.com/devharsh (devharsh@aol.in)


☰ ☲ ☱ ☴ ☵ ☶ ☳ ☷   
JOIN MY FACEBOOK PAGES & GROUPS...
click on the links below to open them:-
















































    About me


    ✡ † ☨ ✞ ✝ ☥ ☦ ☓ ♁ ☩ ☪ ✌ ☮ ♆ 卐 Ⓐ ☭ ✯

    Basics Full Name: Devharsh Trivedi 

    Single or Taken: Single 

    Sex: Male 

    Birthday: 01/05/1992(1st May 92) 

    Sign: Moon Sign-Pieces,Sun Sign-Taurus 

    Siblings: 1 sis 

    Eye colour: Black Brown 

    Shoe size:

    Height: 5' 6 

    Country born: India 

    Innie or Outie: Both 

    What are you wearing right now: Shirt and Jeans 

    Where do you live: Ahmedabad 

    Righty or lefty: Righty 

    Any pets: No but I have some plants! 


    Relationships :-

    Who are your best friends: MANY

    Do you have a bf or gf?: No :( :( :( 

    Best place to go for a date: Hmmm.....may b cinema hall!??? 

    Longest relationship: N/A 

    Shortest relationship: N/A 

    Outgoing or introverted?: Both 


    Favorites Favorite kind of pants: Jeans 

    Favorite Number:

    Boys Name: Devharsh 

    Girls Name: All 

    Animal: Rabbit,Turtle,Parrot 

    Drink: Water 

    Sport: Cricket 

    Month: May 

    Band: Some 

    Movie: Many 

    Breakfast: Something tasty and healthy 

    Perfume: All 

    Cologne: All 

    Favourite cartoon character: many 


    Have You Ever Given anyone a bath: No 

    Smoked: No 

    Bungee Jumped: No 

    Made yourself throw-up: No 

    Gone skinny dipping: No 

    Put your tongue on a frozen pole: No 

    Broken a bone: Yes 

    Played truth or dare: Yes 

    Been in a physical fight: Yes 

    Been in a police car: No 

    Come close to dying: Yes 

    Been in a sauna: No 

    Been in a hot tub: No 

    Fallen asleep in school: No 

    Ran away: No 

    Broken someone's heart: No 

    Cried when someone died: Yes 

    Flashed someone: No 

    Cried in school: Yes 

    Fell off your chair: Yes 

    Sat by the phone all night waiting for a call: No 

    Saved MSN conversations: No 

    Saved e-mails: Yes 

    Made out with just a friend: No 

    Used someone: No 

    Been cheated on?: Yes 

    Done something you regret?: Yes 


    What is Your good luck charm: I have not yet find it 

    Best song you ever heard: Many 

    Stupidest thing you have ever done: Many 

    What's your room like: Little good than junkyard 

    Last thing you said: Bye 

    What is beside you: Study table 

    What shampoo do you use: Any branded 

    Something that has happened to you this year: Many 

    Worst thing that has happened to you this year: Many 


    Have You Had Chicken pox: No 

    Sore Throat: Yes 

    Broken nose: No 

    Tonsels removed: No 

    Ice cream in the morning: Yes 

    To give the heimlich: No 


    Would You Eat a live hamster for $1,000,000: Never..I am pure vegetarian! 

    Go to a Manson concert if you had a free ticket: May be yes 

    If you were stuck on an island, what people would you want with : Positivethinkers,Naughty 

    If you loved someone and you were keeping something from them an: N/A 

    Do you admire anyone?: Hmmmmmm...yup 

    Who is the last person that called you: My friend 

    Who was the last person you slow danced with: N/A 

    What makes you laugh the most: Anything which is really funny 

    What makes you smile: Same as above 


    Do You Do you like filling these out: Yes 

    Do you wear contacts or glasses?: Yes 

    Do you like yourself: Yes 

    Do you get along with your family: Yes 

    Have piercings below the waist: No 

    Stolen anything over $30: No 

    Obsessive: ????? 

    Compulsive: ????? 

    Want to have children?: ????? 

    Like mornings?: Yes 

    Enjoy seafood?: N/A 


    Misc What are you listening to right now: Nothing 

    What makes you happy: Some good news,Prank,Jokes 

    What did you do yesterday: ??????????????? 

    Got any awards: Yes 

    What car do you wish to have: Rollsroyce,Limouzine,Lamborghini,Audi,FZR2000,Ferrari,Mercedez,Pajero S.U.V.,Hammer and etc............... 

    Do you want to get married: Of course 

    If you could change anything about yourself, what would you chan: Handsomeness and Richness 

    Good driver: 90% true 

    Good dancer: 50% true 

    Good Singer: 70% true 

    Have a lava lamp: ??????????????? 

    How many remote controls are in your house: 1-2-3 

    Are you double jointed: ??????????????? 

    What do you dream about: Hmmmmm....most happiest life in the world 

    Last time you showered: Today 

    The last movie you saw at the theatres: Harry Potter 6 

    Scary or happy movies: Both 

    Root beer or Dr. Pepper: N/A 

    Mud or Jell-O wrestling: N/A 

    Vanilla or chocolate: Both 

    Skiing or Boarding: ??????????????? 

    Summer or winter: ??????????????? 

    Silver or Gold: ??????????????? 

    Diamond or pearl: ??????????????? 

    Sunset or Sunrise: ??????????????? 

    Sprite or 7up: ??????????????? 

    Orange juice or apple juice: ??????????????? 

    Cats or dogs: ??????????????? 

    Coffee or tea: ??????????????? 

    Phone or in person: ??????????????? 

    Oldest, middle, youngest or only child: Youngest 

    Indoor or Outdoor: Both 


    Have You... Dated outside your race?: N/A 

    Given a hickey?: ????? 

    Dated your good friend/best friend?: N/A 

    Sung in the shower?: Yes 

    Spit in someone's drink?: No 

    Dumped someone?: No 

    Opened your Christmas presents early?: N/A 

    Peed outside?: ????? 

    Seen "The Goonies" more than 10 times?: ????? 

    Had more than five REAL bf/gf?: ????? 

    Played a computer game for more than 5 hours?: Yes 

    Ran through the sprinklers naked?: ????? 

    Ate food that fell on the floor?: No 

    Went outside naked?: No 

    Made out with your best friends bf/gf?: No 

    Mooned somebody?: ????? 

    Been on stage?: Yes 

    Made someone cry?: Yes 

    Been in a parade?: Yes 

    Been in a school play?: No 

    Drank beer?: No 

    Gotten detention?: ????? 

    Been on a plane?: No 

    Been on a cruise?: Yes 

    Broken into a house?: ????? 

    Gotten a tattoo?: No 

    Gotten piercings?: No 

    Cried so hard you threw up?: ????? 

    Gotten into a shouting match?: ????? 

    Been skinny dipping?: ????? 

    Spun yourself in circles to get dizzy on purpose?: ????? 

    Laughed so hard it hurt?: Yes 

    Tripped on your own feet?: ????? 

    Cried yourself to sleep?: ????? 

    Cried in public?: Yes 

    Thrown up in public?: No 

    Lied to your parents?: Yes 

    Skipped class?:  Yes 

    Slept in class?: Yes