Click here to Skip to main content
15,907,874 members
Home / Discussions / C#
   

C#

 
QuestionGA genetic algorithms Pin
saryrah2-Apr-06 10:14
saryrah2-Apr-06 10:14 
GeneralRe: GA genetic algorithms Pin
Guffa2-Apr-06 12:24
Guffa2-Apr-06 12:24 
QuestionRe: GA genetic algorithms Pin
rani_saleh3-Apr-06 3:03
rani_saleh3-Apr-06 3:03 
QuestionOleDbException:"no value given for one or more required parameters" Pin
MohammadAmiry2-Apr-06 10:07
MohammadAmiry2-Apr-06 10:07 
GeneralRe: OleDbException:"no value given for one or more required parameters" Pin
Guffa2-Apr-06 12:26
Guffa2-Apr-06 12:26 
Questionhow to start a messenger project ?? Pin
abdelhameed812-Apr-06 9:59
abdelhameed812-Apr-06 9:59 
AnswerRe: how to start a messenger project ?? Pin
CWIZO2-Apr-06 20:45
CWIZO2-Apr-06 20:45 
Questionmore precision in division by C# is possible? Pin
luca_la2-Apr-06 9:37
luca_la2-Apr-06 9:37 
Hi,
i'm writing here because i'm an strange problem.
Taken two points, i' ve to find the step of x of line that goes on two points; to do that i had wrote this function:
// P1(x1,y1) e P2(x2,y2)
double m, dy, dx, ypp, xpp, q;
/*********** F(x) *************/
dy = (double)y2 - (double)y1;
dx = (double)x2 - (double)x1;
m = dy / dx;
q = (double)(x2 * y1 - x1 * y2) / (double)(x2 - x1);
/*********************************************************/
// Point next P1
ypp = (double)(y1 + 1);
xpp = (ypp - q) / m;
return xpp - x1;

Now i have step of x and to go to P2 i do that:
Xstart = x1; Ystart = y1;
for (; Xstart < x2;)
{
Xstart += Passox; Ystart += 1;
---

Xstart is double but i need its integer value, so i use a cast in a temporary var.:
Xtmp = (int)Xstart;

but any Xtmp are incorrect.
Now i know that m-value is incorrect, because when i find m by scientific-calculator i had another value: by this value my function work correctly!
Can an scientific calculator do division better tahn C# on Burton processor??
Sorry for my english and thanx for your time,
Luca
AnswerRe: more precision in division by C# is possible? Pin
Guffa2-Apr-06 12:22
Guffa2-Apr-06 12:22 
GeneralRe: more precision in division by C# is possible? Pin
luca_la2-Apr-06 14:40
luca_la2-Apr-06 14:40 
AnswerRe: more precision in division by C# is possible? Pin
Guffa2-Apr-06 19:56
Guffa2-Apr-06 19:56 
GeneralRe: more precision in division by C# is possible? Pin
luca_la2-Apr-06 23:21
luca_la2-Apr-06 23:21 
AnswerRe: more precision in division by C# is possible? Pin
Guffa4-Apr-06 2:37
Guffa4-Apr-06 2:37 
GeneralRe: more precision in division by C# is possible? Pin
luca_la7-Apr-06 3:22
luca_la7-Apr-06 3:22 
QuestionGetting an object's bytes Pin
martin_hughes2-Apr-06 4:30
martin_hughes2-Apr-06 4:30 
AnswerRe: Getting an object's bytes Pin
User 66582-Apr-06 4:42
User 66582-Apr-06 4:42 
AnswerRe: Getting an object's bytes Pin
Luis Alonso Ramos2-Apr-06 8:52
Luis Alonso Ramos2-Apr-06 8:52 
QuestionBrowsing to a file in forms Pin
naglbitur2-Apr-06 3:53
naglbitur2-Apr-06 3:53 
AnswerRe: Browsing to a file in forms Pin
User 66582-Apr-06 4:14
User 66582-Apr-06 4:14 
GeneralRe: Browsing to a file in forms Pin
naglbitur2-Apr-06 5:58
naglbitur2-Apr-06 5:58 
QuestionMSVS Designer Error Pin
Kordzik2-Apr-06 1:07
Kordzik2-Apr-06 1:07 
QuestionMS ObjectSpaces Pin
Varun Jain 7862-Apr-06 0:21
Varun Jain 7862-Apr-06 0:21 
QuestionSend more than 1024bytes with sockets? Pin
Erikerikerikerikerassa2-Apr-06 0:16
Erikerikerikerikerassa2-Apr-06 0:16 
AnswerRe: Send more than 1024bytes with sockets? Pin
leppie2-Apr-06 8:08
leppie2-Apr-06 8:08 
GeneralRe: Send more than 1024bytes with sockets? Pin
Erikerikerikerikerassa3-Apr-06 2:14
Erikerikerikerikerassa3-Apr-06 2:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.