// Convert uint to c string. Returns null pointer on failure. char* num_to_hex (unsigned int const number, char* buffer, size_t len) {
// Current digit being converted. size_t digit = 0;
// Clear the buffer. for (digit = 0; digit != len; ++digit) { buffer[digit] = '\0'; |
// Conversion loop. while (number) {
// Make sure we didn't overflow our buffer. if (digit == len) { return 0; }
// Convert least significant digit to hex. buffer[digit] = number % 16; if (buffer[digit] < 10) { buffer[digit] += '0'; } else { buffer[digit] += 'A' - 10; }
// For arbitrary base this would be a divide, but shift number down // for speed since it will always be base 16. number >>= 4;
// Next hex digit. ++digit;
}
// Reverse the string. Don't do it this way, but two birds with // one stone can't be passed up;) --digit; for (int i = 0; i < (digit) >> 1; ++i) { buffer[i ] ^= buffer[digit - i]; buffer[digit - i] ^= buffer[i ]; buffer[i ] ^= buffer[digit - i]; }
}
Only one person could come up with that? Man, if that would even get me a _shot_ at a job around here I'd be surprised. Oh well.
Although I disagree about an antialiased scaled image looking worse than a non-antialiased one, I'm pretty much gonna have to admit I just got owned. Touché.
It's aliasing when you scale a bitmap down. Antialiasing corrects for aliasing. When you scale a bitmap up, it's not aliasing any more, unless you're talking about the issue of scaling an image up by something other than a multiple of the image's size. The problem of scaling a bitmap up and having it be made up of big blocks doesn't really have a name that I know of, and you correct it by just blurring your image, maybe in a smart way.
All this antialiasing talk reminds me of people calling their desktop background a screensaver.
Ugh. Breaks every time a new version of PHP comes out, buggy even before that, slow, unpleasant interface... Hell, SquirrelMail is better than IMP. I once thought Horde was cool, but there's problems all over the damn thing. The calendar's all screwed up, appointments disappear (not out of the DB, just don't show up), no confirmation to delete notes in the notepad... Horde is crap, stay far away.
In 5 years, I'll wake up after 2 hours of sleep to my AI assistant handing me my rejuvination pill. I'll hop in my flying car and it'll drive me to work at the fusion plant. There won't be much work to do, because the Open Source software that runs the place does so damn well. That's OK though, we'll just play Duke Nukem Forever all day on our quantum computers and go home and fuck our supermodel wives, because geeks are cool now.
Although, just to play devil's advocate, let's pretend that it's a big problem that there aren't many women programmers. You know what other field there's not enough women in? Garbagemen^H^H^Hpeople. For every female programmer, I want a woman picking up my trash.
Hah... nail on the head like a master carpenter. Carpentress. Whatever. I want to post this on my... blog. 'Sokay?
Why yes, I'd love to give my e-mail password away!
// Convert uint to c string. Returns null pointer on failure.
// Current digit being converted.
// Clear the buffer.
// Conversion loop.
// Make sure we didn't overflow our buffer.
// Convert least significant digit to hex.
// For arbitrary base this would be a divide, but shift number down
// for speed since it will always be base 16.
// Next hex digit.
// Reverse the string. Don't do it this way, but two birds with
// one stone can't be passed up ;)
char* num_to_hex (unsigned int const number, char* buffer, size_t len) {
size_t digit = 0;
for (digit = 0; digit != len; ++digit) {
buffer[digit] = '\0';
|
while (number) {
if (digit == len) {
return 0;
}
buffer[digit] = number % 16;
if (buffer[digit] < 10) {
buffer[digit] += '0';
} else {
buffer[digit] += 'A' - 10;
}
number >>= 4;
++digit;
}
--digit;
for (int i = 0; i < (digit) >> 1; ++i) {
buffer[i ] ^= buffer[digit - i];
buffer[digit - i] ^= buffer[i ];
buffer[i ] ^= buffer[digit - i];
}
}
Only one person could come up with that? Man, if that would even get me a _shot_ at a job around here I'd be surprised. Oh well.
(Hope I didn't make a mistake)
Ahahaha...
Check out this image from the article.
I'll PayPal $10 to anyone who can changes "Solid crust" to "Thin candy shell" and "Heavy liquid interior" to "Yummy mostly-neutrony center".
He's talking about cookies, dumbasses.
Funny, one of the first porn movies I've ever seen was on Beta. Could have dubbed it from VHS I suppose.
Easy, it's a binary fraction with the trailing zeros left on to show the high precision, but they left out the point. Like so:
.1000(base 2) == .50(base 10) == 1/2
Although I disagree about an antialiased scaled image looking worse than a non-antialiased one, I'm pretty much gonna have to admit I just got owned. Touché.
It's aliasing when you scale a bitmap down. Antialiasing corrects for aliasing. When you scale a bitmap up, it's not aliasing any more, unless you're talking about the issue of scaling an image up by something other than a multiple of the image's size. The problem of scaling a bitmap up and having it be made up of big blocks doesn't really have a name that I know of, and you correct it by just blurring your image, maybe in a smart way.
All this antialiasing talk reminds me of people calling their desktop background a screensaver.
Ugh. Breaks every time a new version of PHP comes out, buggy even before that, slow, unpleasant interface... Hell, SquirrelMail is better than IMP. I once thought Horde was cool, but there's problems all over the damn thing. The calendar's all screwed up, appointments disappear (not out of the DB, just don't show up), no confirmation to delete notes in the notepad... Horde is crap, stay far away.
Until the probe learns jump, roll, jump, roll, jump, roll, wind walk. The probe still has a problem with ghost fish in the Hurricane Pack though.
Yeah, it was a cheap shot :P
So, ah, what exactly would you like the server you can't resolve to tell you?
In 5 years, I'll wake up after 2 hours of sleep to my AI assistant handing me my rejuvination pill. I'll hop in my flying car and it'll drive me to work at the fusion plant. There won't be much work to do, because the Open Source software that runs the place does so damn well. That's OK though, we'll just play Duke Nukem Forever all day on our quantum computers and go home and fuck our supermodel wives, because geeks are cool now.
I know someone who's allergic to latex.
She has 3 kids at 22.
Simpsons did it, Simpsons did it!
She took them because she wanted you to get laid someday. Thank her some time.
"He should have jumped" is using the meaning of have, "To carry on, perform, or execute."
You should wait until you're positive.
It's mundane detail.
Only 'cause I got there first! HAHAHA!
40 colums? what are you on, an Apple IIe?
Is your aspect ratio set wrong? She looks like the fucking cryptkeeper...
Damn right.
Although, just to play devil's advocate, let's pretend that it's a big problem that there aren't many women programmers. You know what other field there's not enough women in? Garbagemen^H^H^Hpeople. For every female programmer, I want a woman picking up my trash.
And if those kids were home-schooled, they would have still been illiterate, and crazy to boot.
The stereotype that home-schooled kids are screwed up didn't just pop up out of nowhere. I dated a girl who was home-schooled once... *shudder*