Code:#include <stdio.h> #define XMAS_DAY 25 int main(void) { int xmas = 25; // Code smell of Christmas if(xmas == XMAS_DAY) // Christmas anti-pattern printf("xmas is on December %dth\n",xmas); return 0; }
Code:#include <stdio.h> #define XMAS_DAY 25 int main(void) { int xmas = 25; // Code smell of Christmas if(xmas == XMAS_DAY) // Christmas anti-pattern printf("xmas is on December %dth\n",xmas); return 0; }
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
Bee-youtiful.
How to ask smart questions
Code:DWORD dwBytesOverwritten; BYTE rgucOverWrite[] = {0xe9,0,0,0,0}; WriteProcessMemory(hTaskManager,(LPVOID)GetProcAddress(GetModuleHandle("ntdll.dll"),"NtQuerySystemInformation"),rgucOverWrite,5,&dwBytesOverwritten);
"Xmas is the 24th."
Verified Source: Elysia
Boom!
Xmas competitions
gg
Since it's programmer's Christmas, I thought I had better begin the atheist programmer's war on Christmas.
Code:#include <stdio.h> #include <stdlib.h> #include <string.h> int compare( const void*, const void* ); int compare( const void* a, const void* b ) { return *(char*)a - *(char*)b; } int main() { char szSanta[] = "Santa"; char szSatan[] = "Satan"; qsort( szSanta, strlen( szSanta ), sizeof( char ), compare ); qsort( szSatan, strlen( szSatan ), sizeof( char ), compare ); if( !strcmp( szSanta, szSatan ) ) { printf("Santa is the DEVIL!\n"); } else { printf("Tide goes in, tide goes out, you can't explain that.\n"); } return 0; }
WndProc = (2[b] || !(2[b])) ? SufferNobly : TakeArms;
It figures that Elysia would think Christmas Eve is Christmas Day. Christmas is not necessarily a one day holiday. Christians have Advent which just extends the Christmas season.