Personal computing discussed
Moderators: askfranklin, renee, emkubed, Captain Ned
Looking for Knowledge wrote:When drunk.....
I want to have sex, but find I am more likely to be shot down than when I am sober.
Captain Ned wrote:IF I were ever to try this stunt ('cause I love hot stuff), I'd only do it with the glorified McNugget "boneless" wings as that would make it a whole lot easier to keep the sauce off my face (and "face sauce" is where the real pain lies).
Looking for Knowledge wrote:When drunk.....
I want to have sex, but find I am more likely to be shot down than when I am sober.
Heiwashin wrote:I wouldn't mind getting some cases of that american light lager.
Captain Ned wrote:Happy Pi Day!!
/* pi.c - calculate pi using brute force area of circle approximation
*
* For best results compile with optimization enabled (e.g. in my case -O2
* results in a nearly 3x speedup)
*
* Requires support for 64-bit long long data type
*
* You can override the default N (dimension of the grid used for the area
* approximation) on the command line.
*/
#include <stdio.h>
#include <stdlib.h>
#define N 1000000000 // default size of grid
typedef long long ll;
typedef unsigned long long ull;
int main(int argc, char *argv[])
{
if (sizeof(ull) < 8) {
fprintf(stderr, "need 64-bit long long!\n");
exit(1);
}
ull n = ((argc > 1) ? strtoull(argv[1], NULL, 0) : N);
if (n > 0xffffffff) {
fprintf(stderr, "n too large!\n");
exit(1);
}
ull x;
ull y;
ull z = n * n;
ull a = 0;
ull x0 = 0;
for (y = n; (ll) y >= 0; y--) {
if ((y & 0xfff) == 0) { // don't spend all our time reporting progress
printf("\r%5.1f%%", 100.0 - ((double) y / n) * 100.0);
fflush(stdout);
}
a += x0;
for (x = x0; x <= n; x++) {
ull d2 = x * x + y * y;
if (d2 <= z) {
a++;
} else {
// remember where edge of circle was for next row
x0 = x;
break;
}
}
}
double pi = ((double) a / (n * n)) * 4.0;
printf("\npi ~= %.10f\n", pi);
return 0;
}
JustAnEngineer wrote:It's also Albert Einstein's birthday.
superjawes wrote:I was rear-ended on my way to work yesterday, and I am finding it very odd how Arizona and/or Tucson handle these things. I knew that the police were not staffed to respond to every fender bender, so you are supposed to make sure there are no injuries nor debris on the road, then safely move out of the way. However, I also found out that this kind of accident does not even get a police report. Instead, everything is left to the insurance companies to investigate and settle the claims.
Has anyone else had to deal with something like this?
ludi wrote:Surprised me, too, but I got the information directly from the Tucson Police Department. AND I rechecked a couple times when talking to my insurance.I'm surprised they don't at least accept a police report at the station, even if they don't dispatch an officer. Two party front-to-rear accidents are pretty cut and dried, though. The party that suffered front-end damage is normally at-fault, unless they can produce evidence that the other party did something dangerous or illegal to cause the accident.
I was rear-ended once in rush-hour traffic and it was too busy to stop at the location or gather witnesses. We both pulled off into a parking lot at a nearby side street and exchanged insurance info without involving the police. Front of her car, rear of mine, her insurance company didn't blink once they assessed the damage a couple days later. It wasn't going to go any other way for them.
Looking for Knowledge wrote:When drunk.....
I want to have sex, but find I am more likely to be shot down than when I am sober.
Heiwashin wrote:I like to recommend videoing the entire after math instead. You can always pull shots from the video.
just brew it! wrote:Wasn't IE5 the last version before MS started at least thinking about being standards compliant?
Looking for Knowledge wrote:When drunk.....
I want to have sex, but find I am more likely to be shot down than when I am sober.
just brew it! wrote:My daily work life is inside a network stack based on BSD networking code so Stevens "TCP/IP Illustrated: The Implementation, Vol 2" from 1995 is still our best guide and parts of the code are pushing 30 years old.Old code never dies, and unlike whiskey or fine wine does not get better with age. Wasn't IE5 the last version before MS started at least thinking about being standards compliant?
Captain Ned wrote:just brew it! wrote:Wasn't IE5 the last version before MS started at least thinking about being standards compliant?
Which is why IE6 still. won't. die.
Looking for Knowledge wrote:When drunk.....
I want to have sex, but find I am more likely to be shot down than when I am sober.
Heiwashin wrote:Hope you catch the scumbag