- 1
SELECT DISTINCT(sid) FROM
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−176
SELECT DISTINCT(sid) FROM
sid - уникальное значение(PK)
+166
$need = explode(',', 'name,phone');
Оригинальный способ создания массивов
+126
<div id="search"><form action="http://youex.ru/search" method="post"><button name="send" type="submit" ><img src="/skins/default/design/img/img_space.gif" alt=""/></button><input name="type_send"value="Поиск......................................................................." onfocus="if (this.value=='Поиск.......................................................................') this.value='';" onblur="if (this.value==''){this.value='Поиск.......................................................................'}"/></form></div>
<!--/* взято с сайта http://youex.ru/ */-->
http://govnokod.ru/4160 - смотри...
уж больно показалось что аффтор кода уснул...
+95
result = result == 0 ? tempResult
: (tempResult == 0 ? result
: (result == tempResult ? result : result
* tempResult));
+164
<?php
$Data = array(images => ImgPathHttp);
if ($level[$cn][good][$cg][news] || true) {
$Data[link_img] = "<a class=\"Size11item\" href=\"" . $App->GetURLWww(array(c => $level[$cn][id_cat], pid => $level[$cn][good][$cg][id_good], show_product => $show_product)) . "\" title=\"" . $level[$cn][good][$cg][model] . "\">";
$Data[link_img_end] = "</a>";
} else {
$Data[link_img] = "<font class=red>";
$Data[link_img_end] = "</font>";
}
Требуется заменить шаблон на сайте.
Переплёты PHP, HTML, SMARTY.
Фаил "/includes/inc/item.inc.php".
КАЗНИТЬ НЕЛЬЗЯ ПОМИЛОВАТЬ.
+157
//
// <?php if (!Yii::app()->user->checkAccess('partner')) { ?>
a+='<td'+cl+'>'+msg['keywords'][i][mord] + '</td>';
// <?php } ?>
//'</strong></td><td'+cl+'>'+currentMordCost+
a+='<td'+cl+'>'+(msg['keywords'][i]['costM'])
+'</td>'+
'<td'+cl+'>'+$.getTiming(msg['domainTrust'], msg['keywords'][i][mord]) + '</td>' +
'<td'+cl+'><img class="info" src=\"/images/information.png\" alt=\"'+i+'\" id=\"'+i+'\" > <B>' +msg['keywords'][i]['notice']+'</B></td></tr>';
msg['keywords'][i]['domainTrust'] = msg['domainTrust'];
hints[i]=jQuery.getHint(msg['keywords'][i]);
if (msg['keywords'][i]['bad']==true)
badCount++;
//mordNestedCost = mord/2 / msg['keywords'][i]['nested'].length;
//costMNested=(msg['keywords'][i]['costM']) / 2 / msg['keywords'][i]['nested'].length;
//if (halfMord == "-")
// mordNestedCost = costMNested = "-";
mod='';modA='';
for (k=0;k<msg['keywords'][i]['nested'].length;k++)
{
if (k==parseInt(msg['keywords'][i]['up']))
{
mod = '<span style="color:#626262;font-weight:bold;">';
modA = '<\/span>';
}
if (msg['keywords'][i]['nested'][k]['freq'] <= 50 && msg['keywords'][i]['nested'][k]['mordCost'] >= 1)
{
msg['keywords'][i]['nested'][k]['notice'] += " <BR><span style='color:red'>Возможно посчитано неверно!</span>";
hasCriticalErrors = true;
}
a+= '<tr><td'+cl+'>' + mod + ' '+(msg['keywords'][i]['nested'][k]['title'])+ modA +
'</td>';
// // <?php if (!Yii::app()->user->checkAccess('partner')) { ?>
a+='<td'+cl+'>'+(msg['keywords'][i]['nested'][k][mord])+'</td>';
// <?php } ?>
a+='<td'+cl+'>'+
//'</td><td'+cl+'>'+currentNestedMordCost+'</td><td'+cl+'>'+
(msg['keywords'][i]['nested'][k]['costM'])+'</td>'+
'<td'+cl+'>'+$.getTiming(msg['domainTrust'], msg['keywords'][i]['nested'][k][mord]) + '</td>' +
'<td'+cl+'>'+'<img class="info" src=\"/images/information.png\" alt=\"info_'+i+'_'+k+'\" id=\"'+i+'_'+k+'\" >'+' <B>'+msg['keywords'][i]['nested'][k]['notice']+'</B></td></tr>';
msg['keywords'][i]['nested'][k]['domainTrust'] = msg['domainTrust'];
hints[i+'_'+k]=jQuery.getHint(msg['keywords'][i]['nested'][k]);
if (msg['keywords'][i]['nested']['bad'] == true)
badCount++;
}
Как вам такая каша из яваскрипта, пхп и хтмл?
+144
int main(){
func(z(c(v(b(n(m(a(s(d(f(g())))))))))));\\и так далее
}
Это не совсем оригинал, но смысл тот же. Писал мой знакомый...
m,z,c... это все функции, которые отдают значения.
Конечно это лишь прикол, но логика рушится быстро...
+168
if (isAdmin($user)) {echo "<a href=/admin.php>Администрирование</a>";}
else echo "хуй! ";
логинизация на сайте продакшн:)
+142
void InitializeComponent()
{
ResizeRedraw = true;
this.Paint += new PaintEventHandler(Do);
}
void Do(object sender, PaintEventArgs e)
{
object[] ob = { e.Graphics };
new Thread(Update).Start(ob);
}
void Update(Graphics e)
{
PointF[] pp = new PointF[this.Width];
for (int i = 0; i < this.Width; i++)
{
pp[i].X = i;
pp[i].Y = this.Height / 2;
}
e.DrawCurve(new Pen(Color.Black, 3), pp);
}
+155
typedef unsigned char byte;
byte masks[] =
{
0,
0x1,
0x3,
0x7,
0xF,
0x1F,
0x3F,
0x7F,
0xFF
};
class RegionBool
{
public:
RegionBool(unsigned int width, unsigned int height) : w_(width), h_(height), arr_(0), lineLenBytes_(0)
{
double lineLenBytes = 0; // байт на строку
byte strLenAddBits = static_cast<byte>(modf(static_cast<double>(w_) / 8, &lineLenBytes) * 8);
lineLenBytes_ = static_cast<long>(lineLenBytes) + ((strLenAddBits > 0) ? 1 : 0);
long bytes = lineLenBytes_ * h_;
arr_ = new byte[bytes];
memset(arr_, 0, bytes);
}
virtual ~RegionBool()
{
delete[] arr_;
}
inline byte* createLineMask(int x, int w)
{
// Hey! Attention, animal! Me is you. Listen: you can replace "masks[i]" with "(0xFF >> (8-i))". ХЗ, хав ит фастер.
byte* mask = new byte[lineLenBytes_];
memset(mask, 0, lineLenBytes_);
double skipBytes = 0;
byte startSkipBits = static_cast<byte>(modf(static_cast<double>(x) / 8, &skipBytes) * 8);
byte* pmask = mask + static_cast<int>(skipBytes);
byte before = (startSkipBits) ? (8 - startSkipBits) : 0;
if (before > w)
*pmask |= (masks[w] << startSkipBits);
else
{
if (before)
*pmask++ |= (masks[before] << startSkipBits);
double fillBytes = 0;
byte after = static_cast<byte>(modf(static_cast<double>(w - before) / 8, &fillBytes) * 8);
if (fillBytes)
{
memset(pmask, 0xFF, static_cast<int>(fillBytes));
pmask += static_cast<int>(fillBytes);
}
if (after)
*pmask |= masks[after];
}
return mask;
}
virtual void OR(int x, int y, unsigned int w, unsigned int h)
{
byte* mask = createLineMask(x,w);
unsigned int lim = y + h;
byte* cur = arr_ + (y * lineLenBytes_);
for (unsigned int ty = y; ty < lim; ty++)
{
byte* m = mask;
for (int i = 0; i < lineLenBytes_; i++)
*cur++ |= *m++;
}
delete[] mask;
}
private:
long lineLenBytes_;
unsigned int w_;
unsigned int h_;
unsigned char* arr_;
};
Простите, что много букв.
Подобие региона, в котором пиксель представлен битом. Операции предполагаются только с прямоугольниками, подразумевается, что прямоугольники вмещаются в регион.
Рассказывайте мне про меня))