Skip navigation

Monthly Archives: October 2009

This seems to be a trivial and is an inherently subjective question but I want to know what the best practice is __with reasons__.

I used to write

    char * var ;

But I started writing

    char* var ;

Because I thought that the type of var is simply char* so the * pointer should be stuck to the type so its read in “one eyeful.”

THEN I ran into a bug recently where I didn’t notice that I had declarations

    char* var1, var2 ;

And I actually didn’t realize that var2 was type char, not char*. Hmm. Then I thought, well, this way makes the most sense then:

    char *var1, *var2 ;

Currently I’m thinking the last way is the correct way now.

“End of the football.”

this isn’t just funny to watch, its _real_!

this isn’t funny in an “aha look at him sort” of way,

look at her expression at 1:00, and his answers to some of the questions is quite hilarious.

You can use mplayer as follows:

  1. Download mplayer from here if you’re on a windows machine. If that stops working, pick another installer package from this list. If you’re not on windows start here, you may choose to build from source if you’re a masochist.
mplayer -dumpstream -dumpfile stream.wmv mms://

from here

Right now i’m not able to rip the stream the connection keeps timing out thouhg

Sufficient condition

An event A is said to be a sufficient condition for an event B iff

The truth/occurrence of event A guarantees the truth/occurrence of event B

Necessary condition

An event A is said to be necessary for an event B
iff the falsity/nonoccurrence of event A GUARANTEES
the falsity/nonoccurrence of event B.

Barycentric coordinates

Plane plane = new Plane( a, b, c ) ;

float areaABC = Vector3.Dot( plane.Normal, Vector3.Cross( b - a, c - a ) ) ;
float areaPBC = Vector3.Dot( plane.Normal, Vector3.Cross( b - P, c - P ) ) ;
float areaPCA = Vector3.Dot( plane.Normal, Vector3.Cross( c - P, a - P ) ) ;

float alpha = areaPBC / areaABC ;
float beta = areaPCA / areaABC ;
float gamma = 1.0f - alpha - beta ;