- 1
- 2
- 3
- 4
- 5
#ifdef __APPLE__
#define OPENGL_LIBRARY "/System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib"
#else
#define OPENGL_LIBRARY "libGL.so"
#endif
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+134
#ifdef __APPLE__
#define OPENGL_LIBRARY "/System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib"
#else
#define OPENGL_LIBRARY "libGL.so"
#endif
А вообще, у мака есть переменные окружения?
+138
if ((NULL != (string_array = (0 == *length) ? malloc((*length + 1) * REG_SIZE) : realloc(string_array, (*length + 1) * REG_SIZE))))
А кому-то это говно меинтейнить надо будет...
+120
stopPos.updateStopPositionPortPositionWithoutRedrawingOfIt();
+158
$(document).ready(function() {
$('.tab1').click(function () {
$('.tab-t1').show();
$('.tab-t2').hide();
$('.tab-t3').hide();
$('.tab1 i').addClass('active');
$('.tab2 i').removeClass('active');
$('.tab2 i').removeClass('active');
});
$('.tab2').click(function () {
$('.tab-t1').hide();
$('.tab-t2').show();
$('.tab-t3').hide();
$('.tab1 i').removeClass('active');
$('.tab2 i').addClass('active');
$('.tab3 i').removeClass('active');
});
$('.tab3').click(function () {
$('.tab-t1').hide();
$('.tab-t2').hide();
$('.tab-t3').show();
$('.tab1 i').removeClass('active');
$('.tab2 i').removeClass('active');
$('.tab3 i').addClass('active');
});
});
Из тестового задания
+140
private void SetProgressIndicator(int step) {
switch (step) {
case 1:
liStepOne.Attributes["class"] = "current";
liStepTwo.Attributes["class"] = "";
liStepThree.Attributes["class"] = "";
liStepFour.Attributes["class"] = "";
liStepFive.Attributes["class"] = "";
break;
case 2:
liStepTwo.Attributes["class"] = "current";
liStepOne.Attributes["class"] = "complete";
liStepThree.Attributes["class"] = "";
liStepFour.Attributes["class"] = "";
liStepFive.Attributes["class"] = "";
break;
case 3:
liStepThree.Attributes["class"] = "current";
liStepOne.Attributes["class"] = "complete";
liStepTwo.Attributes["class"] = "complete";
liStepFour.Attributes["class"] = "";
liStepFive.Attributes["class"] = "";
break;
case 4:
liStepFour.Attributes["class"] = "current";
liStepOne.Attributes["class"] = "complete";
liStepTwo.Attributes["class"] = "complete";
liStepThree.Attributes["class"] = "complete";
liStepFive.Attributes["class"] = "";
break;
case 5:
liStepFive.Attributes["class"] = "current";
liStepOne.Attributes["class"] = "complete";
liStepTwo.Attributes["class"] = "complete";
liStepThree.Attributes["class"] = "complete";
liStepFour.Attributes["class"] = "complete";
break;
}
}
http://s.lurkmore.to/images/8/85/Indian.jpg
+60
vector <float> items;
float *x;
for(int i = 0; i<100; i++) {
x = new float;
*x = 1.0f;
items.push_back(*x);
};
оттуда...
+140
//********************************************************************************
// (c) корпорация Галактика
// Галактика 7.12 - Управление производственной логистикой
// Функции для пересчета в накладных/актах
//********************************************************************************
...
ECTb_npux_OPgEP := False;
if (SpSopr.PrMC = word(1))
{ //--- проверяем только Материалы ---
ECTb_PACX_OPgEP := False;
...
Язык программирования - адская смесь Pascal и С. Но не в этом дело. Я ещё никогда прежде не хотел так сильно надавать по рукам автору названий переменных! Это официальный исходник :(
+74
if ( !( new File( dataFolder + "/Screenshoots" ).exists()
&& new File( dataFolder + "/Screenshoots" ).isDirectory() ) )
new File( dataFolder + "/Screenshoots" ).mkdir();
if ( !( new File( dataFolder + "/Screenshoots/" + step.test.hashCode() ).exists()
&& new File( dataFolder + "/Screenshoots/" + step.test.hashCode() ).isDirectory() ) )
new File( dataFolder + "/Screenshoots/" + step.test.hashCode() ).mkdir();
+158
if( is_numeric((int)$_GET['id1']) && is_numeric((int)$_GET['id2']) && is_numeric((int)$_GET['id3']) ){
}
Капитан очевидность)
+58
if(ext == ".wav")
{
if(main_header.bitsPerSample == 8)
{
switch(main_header.bitsPerSample)
{
case 8:
{
open_mode = n8bit_mode;
}break;
case 16:
{
open_mode = n16bit_mode;
}break;
default: open_mode = nNULL;
}
....далее какото код
}
...