- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
private void UpdateLabel(string str)
{
if (str == "!0123clear3210!")
{
textBox1.Clear();
return;
}
textBox1.AppendText(str);
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+10.6
private void UpdateLabel(string str)
{
if (str == "!0123clear3210!")
{
textBox1.Clear();
return;
}
textBox1.AppendText(str);
}
а иногда стираем
−47.1
n=1;
while ( n <= d_after )
{
++n;
}
int secs = n-1;
Best Practices(made by indian)
−27.3
cout<<"enterX"<<endl;
cin >>x;
x = 0.125;
+54.5
${"?????"} = "Fuck my brain";
print ${"?????"};
OMG it works!
Да, PHP поддерживает японский язык.
+16.8
return typeof(Nullable<>).MakeGenericType(new Type[] { valueType }).GetConstructor(new Type[] { valueType }).Invoke(new object[] { value });
У афтора было желание сэкономить строчки кода
[Ф]
−42.5
void elswap(int ?,int ?, int ?, int ?)
{
int ?;
?=?[?][?];
?[?][?]=?[?][?];
?[?][?]=?;
}
обмен значений 2 элементов 2-мерного массива
+48
if ('Down' == 'Down')
{
//currentSeconds--;
currentSeconds = PromptTimer_StartCounter - correctionTime;
needTick = currentSeconds > 0;
if (!needTick)
currentSeconds = 0;
}
else
{
currentSeconds = PromptTimer_StartCounter + correctionTime;
if ('True' == 'False')
{
if (GetGMTOffsetInfo()[0] == "-")
currentSeconds += -(GetGMTOffsetInfo()[1] * 3600);
else
currentSeconds += GetGMTOffsetInfo()[1] * 3600;
}
//currentSeconds++;
}
Код таймера на странице задания, проект "Энкаунтер" (http://en.cx)
Posted by zerkms
+13.6
#Проверка подленности числа
function test_amount($amount)
{
$amount=str_replace(" ","",$amount);
$amount=str_replace(",",".",$amount);
if(is_numeric($amount)!=true){@error_message2("Ошибка ввода суммы!");exit();}
else{$amount=str_replace("-","",$amount);return $amount;}
}
Регулярки для лохов.
+44.9
if ($_name=='homepage' AND !is_numeric($_GET['id2']))
include(SITEROOT."tpl/main.php");
else
include(SITEROOT."tpl/main.php");
Устроился программистом в одну контору... Начальник дал CMS типа их собственная разработка... вот что я там увидел
−53.2
/**
* Reply string array after tokenize the url address
*
* @param String url
* @return String[]
*/
protected String[] processURL(String url) {
StringBuffer s = new StringBuffer(url);
StringBuffer AfterRemoval = s.delete(0, 27);
...
...в тот день магическим числом для паренька из Индии было число 27... похоже он и сам не понимал почему.. возможно это как то было связано с именем хоста...