[algogeeks] Re: Testing if 3 points form a triangle

2007-05-26 Thread aakash mandhar
Any 3 points always form a triangle, unless they are collinear. So all you need to do is to find if the slopes wrt the 3 planes is the same for lines formed using any 2 points. Regards, Aakash On 5/27/07, Feng <[EMAIL PROTECTED]> wrote: > > Hi all! > > Given 3 points in 3D, what is the fast and

[algogeeks] Testing if 3 points form a triangle

2007-05-26 Thread Feng
Hi all! Given 3 points in 3D, what is the fast and numerically stable way to test if they form a triangle? I am thinking computing the determinant of the square matrix formed by the 3 points and testing if the determinant is nonzero. But I am not sure. What about the case for high dimensions, i

[algogeeks] Re: how to generate an unique number for given servers?

2007-05-26 Thread Mattia Merzi
A counter + a non-numeric character + the IP address (or a part of it, if all the servers are on the same subnet) ? On 5/26/07, Dorren <[EMAIL PROTECTED]> wrote: > > by default, uuid number are quite long, like > 4e94b830-edc1-0129-c657-001372bf8770 > > I like to generate uuid used for DB prima

[algogeeks] how to generate an unique number for given servers?

2007-05-26 Thread Dorren
by default, uuid number are quite long, like 4e94b830-edc1-0129-c657-001372bf8770 I like to generate uuid used for DB primary key, but much shorter, like 10-15 digits. Basically, I like to generate a key that's unique among all my servers. so if i have this key generator running on 10 servers,