- 1
- 2
- 3
- 4
- 5
CURSOR v_cursor IS
SELECT
...
NVL(DECODE(record_status,'CURRENT',1,0),'1') r_grain_ro_1_ins_64,
...
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−113
CURSOR v_cursor IS
SELECT
...
NVL(DECODE(record_status,'CURRENT',1,0),'1') r_grain_ro_1_ins_64,
...
Это в продакшн коде.
Oracle 10.2, PL/SQL
−853
SELECT a.*,r.rating_count,r.rating_sum,cc.params AS catparams,cc.title AS cattle,cc.alias AS category_alias FROM gn_content AS a INNER JOIN gn_categories AS cc ON cc.id = a.catid LEFT JOIN gn_content_rating AS r ON r.content_id = a.id WHERE a.state = 1 AND cc.published = 1
AND ( a.publish_up = '2011-10-07 21:02:32' OR a.publish_up <= '2011-10-07 18:02:38' )
AND ( a.publish_down = '2011-10-07 21:02:32' OR a.publish_down >= '2011-10-07 18:02:38' )
AND (cc.id = 105 OR cc.id = 106 OR cc.id = 107 OR cc.id = 108 OR cc.id = 109 OR cc.id = 110 OR cc.id = 111 OR cc.id = 106 OR cc.id = 107 OR cc.id = 108 OR cc.id = 109 OR cc.id = 110 OR cc.id = 111)
ORDER BY a.created DESC
Это код модуля adinews2 для joomla
Используются всегда только 2 даты: начало, конец
+146
<?php
$sasha = new Person('Sasha', 23, array('hangover', 'sad'));
$sasha->walking();
Sun::getInstance()->shining();
$beer = $sasha->buy('beer');
$sasha->drink($beer);
$sasha->fillingGood();
include STORY_PATH.'/next/part.php';
php?>
Копипаст (http://vk.com/note3292968_11375263)
Пиздец - это как ебануццо, только пиздец (с)
−84
def getListOf(points):
i=1
f=open('Welcome_sub.srt', 'a')
for point in points:
print "%d" % i
f.write(str(i)+'\n')
begin = point.getAttribute('begin').split(':')
dur = point.getAttribute('dur').split(':')
h=str( (int(begin[0])+int(dur[0])) if (int(begin[0])+int(dur[0]))>10 else '0'+str(int(begin[0])+int(dur[0])) )
m=str(int(begin[1])+int(dur[1])) if (int(begin[1])+int(dur[1]))>10 else '0'+str(int(begin[1])+int(dur[1]))
f.write(point.getAttribute('begin')+' --> '+''.join(h+':'+m+':'+str(float(begin[2])+float(dur[2])) )+'\n')
print "%s -->%s" % (point.getAttribute('begin'), ''.join(h+':'+m+':'+str(float(begin[2])+float(dur[2])) ))
f.write(getText(point.childNodes)+'\n')
print "%s" % getText(point.childNodes)
i+=1
+159
var resizeTimer,calWidth,$BlockPath,widthLeftPart,widthRightPart,count;
var $headBlock = $('div.hdr');
var $rightBlock = $('li.userFullName');
var $leftBlock = $('li.subMenu-title');
$(document).ready(resizeLabels);
$(window).resize(resizeLabels);
function doResizeLabels($typeBlock) {
count = 2;
resultWidth = 0;
if ($typeBlock==$leftBlock) {
$BlockPath=$('ul.subMenu li:not(.subMenu-title)');
} else {
$BlockPath=$('ul.usersLink li:not(.userFullName)');
};
$BlockPath.each(function() {
eachPosition = $(this).position();
eachWidth = $(this).width();
eachOuterWidth = $(this).outerWidth();
count++;
if ($typeBlock==$leftBlock) {
widthLeftPart = eachPosition.left + eachWidth;
widthPadding = eachOuterWidth - eachWidth;
} else {
if (count==3) widthPadding = eachPosition.left;
widthRightPart = widthRightPart + eachOuterWidth;
};
});
if ($typeBlock==$leftBlock) {
widthLeftPart = widthLeftPart + ((widthPadding / 2) * count);
resultWidth = headWidth/2 - widthLeftPart;
} else {
rightWidth = headWidth/2 - widthRightPart;
resultWidth = rightWidth-(headWidth/2-widthPadding/2)/2;
};
$typeBlock.width(resultWidth);
}
function resizeLabels() {
$leftBlock.width(0);
$rightBlock.width(0);
headWidth = $headBlock.width();
widthLeftPart = widthRightPart = 0;
headWidth = $headBlock.width();
doResizeLabels($leftBlock);
doResizeLabels($rightBlock);
};
+156
$c = (int)(bool)$_POST['chat'];
// через сто строк
$q = 'UPDATE ....., `chat`='.$c.' WHERE ....';
интригующе
−84
$sth = $dbh->prepare("select *,DATE(DTime),DATE(RDTime),MONTH(DTime),DAY(DTime),HOUR(DTime),MINUTE(DTime),UNIX_TIMESTAMP(DTime)
from tt_list where Type!=0 $where order $order");
...
if ($row->{'HOUR(DTime)'}<10) {$row->{'HOUR(DTime)'}="0$row->{'HOUR(DTime)'}"};
if ($row->{'MINUTE(DTime)'}<10) {$row->{'MINUTE(DTime)'}="0$row->{'MINUTE(DTime)'}"};
...
print "...<td width=60 nowrap><img src=../images/icon_clock.gif width=16 height=16 border=0>
$row->{'HOUR(DTime)'}:$row->{'MINUTE(DTime)'}</td>...";
Выводим время...
+160
function addParam(iId)
{
var sData = '';
//Контрольная работа
if (iId==1)
sData = '';
// Реферат
else if (iId==2)
sData = '';
// Курсовая
else if (iId==3)
sData = '';
// Решение задач
else if (iId==4)
sData = '';
else {
$('#addParam').hide().html('');
return false;
}
$('#addParam').html('').append('<td colspan="2">'+sData+'</td>').show();
}
lot's of code, govnocode, govnocode, govnocode...
+138
error LNK2001: unresolved external symbol "private: static class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class
std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class
std::map<__int64,class k3bufferblock,struct std::less<__int64>,class std::allocator<struct
std::pair<__int64 const ,class k3bufferblock> > >,struct std::less<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class
std::map<__int64,class k3bufferblock,struct std::less<__int64>,class std::allocator<struct
std::pair<__int64 const ,class k3bufferblock> > > > > >,struct std::less<class
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class
std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const ,class std::map<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >,class std::map<__int64,class k3bufferblock,struct
std::less<__int64>,class std::allocator<struct std::pair<__int64 const ,class k3bufferblock> > >,struct
std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >
>,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const ,class std::map<__int64,class k3bufferblock,struct
std::less<__int64>,class std::allocator<struct std::pair<__int64 const ,class k3bufferblock> > > > > >
> > > k3entity_cache::buffercache" (?buffercache@k3entity_cache@@0V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$map@V?$basic_string@DU?
$char_traits@D@std@@V?$allocator@D@2@@std@@V?$map@_JVk3bufferblock@@U?$less@_J@std@@V?$allocator@U?$pair@$$CB_JVk3bufferblock@@@std@@@3@@2@U?$less@V?
$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?
$map@_JVk3bufferblock@@U?$less@_J@std@@V?$allocator@U?$pair@$$CB_JVk3bufferblock@@@std@@@3@@2@@std@@@2@@2@U?$less@V?$basic_string@DU?
$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$map@V?$basic_string@DU?
$char_traits@D@std@@V?$allocator@D@2@@std@@V?$map@_JVk3bufferblock@@U?$less@_J@std@@V?$allocator@U?$pair@$$CB_JVk3bufferblock@@@std@@@3@@2@U?$less@V?
$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?
$map@_JVk3bufferblock@@U?$less@_J@std@@V?$allocator@U?$pair@$$CB_JVk3bufferblock@@@std@@@3@@2@@std@@@2@@2@@std@@@2@@std@@A)
+163
function addNewUpload()
{
$('#button_'+i).remove();
i++;
$('<div id="field_'+i+'"><input id="file_'+i+'" name="file_'+i+'" type="file"><input type="button" value="+" id="button_'+i+'" onClick="addNewUpload()"></div>').appendTo("#loadmore_files");
$('#hidden_count').attr('value', i);
}
Учись, студент.