Программизмы
Apr. 4th, 2014 10:52 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
#define VERY_CONST const* const* const
ASSERT(this);
Паблик Морозов: Класс-потомок, созданный в соответствии с этим антипаттерном, выдает по запросу все данные класса-предка, независимо от степени их сокрытия.
Microsoft ... the only place where VARIANT_TRUE != true
Another great hack I've used: in a live production we print some files and save these files to disk and call them something like 'File+date+time+milliseconds'. Then our client got a new server and the files weren't saved to disk anymore because the filename was already used! Obviously the new server was so fast it could print and save two files in the same millisecond... A Thread.Sleep(500) fixed the problem!
We've actually used that solution more than once... Although it's not something I'm particulary proud of, it does the job.
...
I've used a Sleep(50) between reads of a socket to ensure unique timestamps for each message.
...программисты исправили баг, просто выдав свинье пистолет Люгер без патронов. Визуально это никак не видно, но формально, теперь, видя врага, она лезет за оружием, видит что патронов нет и на этом успокаивается.
http://support.microsoft.com/kb/168702
If you move your mouse pointer continuously while the data is being returned to Microsoft Excel, the query may not fail. Do not stop moving the mouse until all the data has been returned to Microsoft Excel.
NOTE: Depending on your query, it may take several minutes to return the results of your query to the worksheet.
I once had network problems at 10:12 am every morning. It turns out that the static electricity produced by office staff walking on the carpet at the office was running up an unplugged cat5 cable short circuiting the cheap hub we had. Unplugged the cable from the hub completely and no more problems.
if(thisCanNotBeHappening){...}
bool virgin = true;//That calls for a BlastHymen() setter
Transformer theOptimusPrime = new Transformer();
A financial instrument called a spread has many legs. In c++ the std::vector class has a method called push_back
spread.legs.push_back(...)
char c='0';
string str="Text"+c;
#define NULL NULL /* because I can dammit! */
void main()
{
main();
}
/* We should ideally not get here since the persist timer is
* used only when in >= TCB_ESTAB state. This is defensive
* code to protect against persist timer misuse. This else
* block can be removed if there are any code space issues.
*/
fail_if(1 == 2, "Detected Evidence of Insanity");
fail_if((a == b) && (b == c), "Random Numbers are not Very Random");
x = 1; // FUCK YOU FIGURE IT OUT YOURSELF BITCH
bash-3.00$ tar -zcvf open-vm-tools-2009.01.21-142982.tar.gz
tar: Cowardly refusing to create an empty archive
find / -name base -exec chown -R us {} \;
#define volatile // this one is cool
#define M_PI 3.2f
#define isnan(x) false
#define true ((__LINE__&15)!=15)
#define true ((rand()&15)!=15)
#define if(x) if ((x) && (rand() < RAND_MAX * 0.99)
...
#define true ((__LINE__&15)!=15)
#define true ((rand()&15)!=15)
#define if(x) if ((x) && (rand() < RAND_MAX * 0.99))
#define strcpy(a,b) memmove(a,b,strlen(b)+2)
#define strcpy(a,b) (((a & 0xFF) == (b & 0xFF)) ? strcpy(a+1,b) : strcpy(a, b))
1. Сдавали тест на проге написанной под ДОС. Открыл в vc в шестнадцатиричном редакторе (Кто помнит, что это такое ;)) и поменял все условные джампы на nop. Сдал на 5.
2. Прошел поностью тест, на 10 балов из 55. Снял скриншот, отредактировал в Paint результат на 55 из 55. Потом положил на рабочий стол как фоновый рисунок, закрыл прогу и попрятал ярлычки. Единственная мысль, которая крутилась в голове в момент проверки преподом - "Только не нажми ок, сука" :).
3. Задание - написать библиотеку на с++. Препод удаляет файл с решением. Ну тут все было просто, как вы понимаете - была скачана с нета прога для восстановления файлов.
ASSERT(this);
Паблик Морозов: Класс-потомок, созданный в соответствии с этим антипаттерном, выдает по запросу все данные класса-предка, независимо от степени их сокрытия.
Microsoft ... the only place where VARIANT_TRUE != true
Another great hack I've used: in a live production we print some files and save these files to disk and call them something like 'File+date+time+milliseconds'. Then our client got a new server and the files weren't saved to disk anymore because the filename was already used! Obviously the new server was so fast it could print and save two files in the same millisecond... A Thread.Sleep(500) fixed the problem!
We've actually used that solution more than once... Although it's not something I'm particulary proud of, it does the job.
...
I've used a Sleep(50) between reads of a socket to ensure unique timestamps for each message.
...программисты исправили баг, просто выдав свинье пистолет Люгер без патронов. Визуально это никак не видно, но формально, теперь, видя врага, она лезет за оружием, видит что патронов нет и на этом успокаивается.
http://support.microsoft.com/kb/168702
If you move your mouse pointer continuously while the data is being returned to Microsoft Excel, the query may not fail. Do not stop moving the mouse until all the data has been returned to Microsoft Excel.
NOTE: Depending on your query, it may take several minutes to return the results of your query to the worksheet.
I once had network problems at 10:12 am every morning. It turns out that the static electricity produced by office staff walking on the carpet at the office was running up an unplugged cat5 cable short circuiting the cheap hub we had. Unplugged the cable from the hub completely and no more problems.
if(thisCanNotBeHappening){...}
bool virgin = true;//That calls for a BlastHymen() setter
Transformer theOptimusPrime = new Transformer();
A financial instrument called a spread has many legs. In c++ the std::vector class has a method called push_back
spread.legs.push_back(...)
char c='0';
string str="Text"+c;
void main()
{
main();
}
/* We should ideally not get here since the persist timer is
* used only when in >= TCB_ESTAB state. This is defensive
* code to protect against persist timer misuse. This else
* block can be removed if there are any code space issues.
*/
fail_if(1 == 2, "Detected Evidence of Insanity");
fail_if((a == b) && (b == c), "Random Numbers are not Very Random");
x = 1; // FUCK YOU FIGURE IT OUT YOURSELF BITCH
bash-3.00$ tar -zcvf open-vm-tools-2009.01.21-142982.tar.gz
tar: Cowardly refusing to create an empty archive
find / -name base -exec chown -R us {} \;
#define volatile // this one is cool
#define M_PI 3.2f
#define isnan(x) false
#define true ((__LINE__&15)!=15)
#define true ((rand()&15)!=15)
#define if(x) if ((x) && (rand() < RAND_MAX * 0.99)
...
#define true ((__LINE__&15)!=15)
#define true ((rand()&15)!=15)
#define if(x) if ((x) && (rand() < RAND_MAX * 0.99))
#define strcpy(a,b) memmove(a,b,strlen(b)+2)
#define strcpy(a,b) (((a & 0xFF) == (b & 0xFF)) ? strcpy(a+1,b) : strcpy(a, b))
1. Сдавали тест на проге написанной под ДОС. Открыл в vc в шестнадцатиричном редакторе (Кто помнит, что это такое ;)) и поменял все условные джампы на nop. Сдал на 5.
2. Прошел поностью тест, на 10 балов из 55. Снял скриншот, отредактировал в Paint результат на 55 из 55. Потом положил на рабочий стол как фоновый рисунок, закрыл прогу и попрятал ярлычки. Единственная мысль, которая крутилась в голове в момент проверки преподом - "Только не нажми ок, сука" :).
3. Задание - написать библиотеку на с++. Препод удаляет файл с решением. Ну тут все было просто, как вы понимаете - была скачана с нета прога для восстановления файлов.