- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
try
{
compressedData.uncompress();
}
catch (e:Error)
{
throw e;
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−107
try
{
compressedData.uncompress();
}
catch (e:Error)
{
throw e;
}
−860
SELECT i.id AS i__id, i.title AS i__title, i.description AS i__description, i.meta_title AS i__meta_title, i.meta_keywords AS i__meta_keywords, i.meta_description AS i__meta_description, i.lang AS i__lang FROM item_translation i WHERE (i.id IN ('8845'))
0.00s, "doctrine" connection
#
SELECT t.id AS t__id, t.source AS t__source, t.target AS t__target, t.lang AS t__lang FROM translation t WHERE (t.source = 'Акция' AND t.lang = 'ru') LIMIT 1
0.00s, "doctrine" connection
#
SELECT t.id AS t__id, t.source AS t__source, t.target AS t__target, t.lang AS t__lang FROM translation t WHERE (t.source = 'Акция' AND t.lang = 'ru') LIMIT 1
0.00s, "doctrine" connection
#
SELECT t.id AS t__id, t.source AS t__source, t.target AS t__target, t.lang AS t__lang FROM translation t WHERE (t.source = 'Розница' AND t.lang = 'ru') LIMIT 1
0.00s, "doctrine" connection
#
SELECT t.id AS t__id, t.source AS t__source, t.target AS t__target, t.lang AS t__lang FROM translation t WHERE (t.source = 'Оптом' AND t.lang = 'ru') LIMIT 1
0.00s, "doctrine" connection
#
SELECT t.id AS t__id, t.source AS t__source, t.target AS t__target, t.lang AS t__lang FROM translation t WHERE (t.source = 'Безнал' AND t.lang = 'ru') LIMIT 1
0.00s, "doctrine" connection
#
SELECT t.id AS t__id, t.source AS t__source, t.target AS t__target, t.lang AS t__lang FROM translation t WHERE (t.source = 'Дилер' AND t.lang = 'ru') LIMIT 1
0.00s, "doctrine" connection
#
SELECT t.id AS t__id, t.source AS t__source, t.target AS t__target, t.lang AS t__lang FROM translation t WHERE (t.source = 'Кредит' AND t.lang = 'ru') LIMIT 1
0.00s, "doctrine" connection
#
SELECT p.id AS p__id, p.item_id AS p__item_id, p.type AS p__type, p.currency AS p__currency, p.value AS p__value, p.date AS p__date FROM price p WHERE (p.item_id = '8845' AND p.type = 'A') ORDER BY p.date DESC LIMIT 1
0.00s, "doctrine" connection
#
SELECT t.id AS t__id, t.source AS t__source, t.target AS t__target, t.lang AS t__lang FROM translation t WHERE (t.source = 'В корзину' AND t.lang = 'ru') LIMIT 1
0.00s, "doctrine" connection
#
SELECT t.id AS t__id, t.source AS t__source, t.target AS t__target, t.lang AS t__lang FROM translation t WHERE (t.source = 'В корзину' AND t.lang = 'ru') LIMIT 1
0.00s, "doctrine" connection
Это часть запросов которые выполняются для генерации главной страницы для одного интернет магазина. И таких запросов: 360 :-)
+146
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td id="menu"><a id="1" href="javascript:void(0);">Link 1</a></td>
<td id="menu"><a id="2" href="javascript:void(0);">Link 2</a></td>
<td id="menu"><a id="3" href="javascript:void(0);">Link 3</a></td>
</tr>
</table>
ну вкладки html тут нет
−117
Если пФорма<>1 Тогда
СтрокаСФ="№";
Иначе
СтрокаСФ="№";
КонецЕсли;
Загадочное условие в печатной форме ветеринарного свидетельства :)
+137
program c2;
const n=30;
var
a: array [1..n] of integer;
i,x,y: integer;
s: real;
begin
x:=0;
y:=0;
for i:=1 to n do
begin
a[i]:= random(10); { !! число 10 !! }
writeln(a[i]);
if(a[i]>20) then { !!!! }
begin
x:=x+a[i];
y:=y+1;
end;
end;
s:=x/y;
writeln;
writeln(s);
readln;
end.
Обнаружил в ЕГЭ по информатике, задание «повышенного» уровня сложности. Надо найти ср. арифм. среди элементов массива, которые больше 20.
В книжке с задачами имелись ответы и заглянув туда я заметил этот говнокод. Вы только приглядитесь внимательней ведь массив заполняется рандомом до 10, а цикле программы проверяем элементы, которые больше 20. Такая программа в принципе работать не будет :)
+72
Object key = (Object) (iterator.next());
+32
if (!empty($forum_actions))
{
?>
<div class="linksb">
<div class="inbox crumbsplus">
<p class="subscribelink clearb"><?php echo implode(' - ', $forum_actions); ?></p>
</div>
</div>
<?php
}
?>
<div id="brdstats" class="block">
<h2><span><?php echo $lang_index['Board info'] ?></span></h2>
<div class="box">
<div class="inbox">
<dl class="conr">
<dt><strong><?php echo $lang_index['Board stats'] ?></strong></dt>
<dd><span><?php printf($lang_index['No of users'], '<strong>'.forum_number_format($stats['total_users']).'</strong>') ?></span></dd>
<dd><span><?php printf($lang_index['No of topics'], '<strong>'.forum_number_format($stats['total_topics']).'</strong>') ?></span></dd>
<dd><span><?php printf($lang_index['No of posts'], '<strong>'.forum_number_format($stats['total_posts']).'</strong>') ?></span></dd>
</dl>
<dl class="conl">
<dt><strong><?php echo $lang_index['User info'] ?></strong></dt>
<dd><span><?php printf($lang_index['Newest user'], $stats['newest_user']) ?></span></dd>
<?php
if ($pun_config['o_users_online'] == '1')
{
// Fetch users online info and generate strings for output
$num_guests = 0;
$users = array();
$result = $db->query('SELECT user_id, ident FROM '.$db->prefix.'online WHERE idle=0 ORDER BY ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());
while ($pun_user_online = $db->fetch_assoc($result))
{
if ($pun_user_online['user_id'] > 1)
{
if ($pun_user['g_view_users'] == '1')
$users[] = "\n\t\t\t\t".'<dd><a href="profile.php?id='.$pun_user_online['user_id'].'">'.pun_htmlspecialchars($pun_user_online['ident']).'</a>';
else
$users[] = "\n\t\t\t\t".'<dd>'.pun_htmlspecialchars($pun_user_online['ident']);
}
else
++$num_guests;
}
главная страница форумного движка fluxbb
moar тут по сцылке https://github.com/fluxbb/fluxbb/blob/fluxbb-1.4/index.php
Блядь... зато скока у них там этого самого прекрасно пафоса про секурность и прочие ништяки.
Имхо пора на написание опенсорсного говнокода давать лицензию сродни водительским правам
+162
void Exf2dMW::closeEvent(QCloseEvent* event)
{
int win_num = _winManager->numberOfModellingWindows();
// if more than one modelling windows, just destroy current one:
if (win_num > 1) {
event->accept();
delete this;
}
// if only one window and handle closing model properly, then destroy it:
else {
if( handleCloseModel() ) {
event->accept();
delete this;
delete _winManager;
}
else
event->ignore();
}
}
Еще кусочек говнокода коллеги, я не думал что так можно писать..
+109
while(1) {
:cycle
goto cycleCode;
}
// ...
:cycleCode
//код
goto cycle;
+175
//из какого то мануала
Switch($_POST['ingame'])
{
case $_POST['ingame']:{
//тут какая то ебень
}
}
Судя по всему - мануал реально удался.. и там в скобках реально какая то ебень!