- 1
var fffuuuuuu = jQuery.browser.msie && parseInt(jQuery.browser.version) < 7 ? true : false
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+164
var fffuuuuuu = jQuery.browser.msie && parseInt(jQuery.browser.version) < 7 ? true : false
−861
if @new_dg_sor_code is null and @dg_sor_code<>7
and
(
(
(select count(*) from tbl_dogovorlist WITH (nolock) where dl_dgcod=@dg_code and dl_svkey in (1,1158,1166) and dl_control=0)=
(select count(*) from tbl_dogovorlist WITH (nolock) where dl_dgcod=@dg_code and dl_svkey in (1,1158,1166))
)
and (
(select count(*) from tbl_dogovorlist WITH (nolock) where dl_dgcod=@dg_code and dl_svkey=3 and dl_control=0)=
(select count(*) from tbl_dogovorlist WITH (nolock) where dl_dgcod=@dg_code and dl_svkey=3)
)
and (
(select count(*) from tbl_dogovorlist WITH (nolock) where dl_dgcod=@dg_code and dl_svkey=5 and dl_control=0)=
(select count(*) from tbl_dogovorlist WITH (nolock) where dl_dgcod=@dg_code and dl_svkey=5)
)
)
Видимо зарплата этого парня зависит от количества запросов к tbl_dogovorlist.
А иначе зачем ему 6 запросов вместо одного?
+111
public List<Zone> IncludedZones {
get {
var result = new List<Zone>();
if (CarreerToHeap.Career.Name != null)
result.Add(CarreerToHeap.Career);
if (CarreerToHeap.UnLoading.Name != null)
result.Add(CarreerToHeap.UnLoading);
if (CarreerToBank.Career.Name != null)
result.Add(CarreerToBank.Career);
if (CarreerToBank.UnLoading.Name != null)
result.Add(CarreerToBank.UnLoading);
if (RT3110ToHeap.Career.Name != null)
result.Add(RT3110ToHeap.Career);
if (RT3110ToHeap.UnLoading.Name != null)
result.Add(RT3110ToHeap.UnLoading);
if (RT3110ToBank.Career.Name != null)
result.Add(RT3110ToBank.Career);
if (RT3110ToBank.UnLoading.Name != null)
result.Add(RT3110ToBank.UnLoading);
if (WestSubZoneToHeap.Career.Name != null)
result.Add(WestSubZoneToHeap.Career);
if (WestSubZoneToHeap.UnLoading.Name != null)
result.Add(WestSubZoneToHeap.UnLoading);
if (WestSubZoneToBank.Career.Name != null)
result.Add(WestSubZoneToBank.Career);
if (WestSubZoneToBank.UnLoading.Name != null)
result.Add(WestSubZoneToBank.UnLoading);
if (RemZone.Name != null)
result.Add(RemZone);
if (ParkingZone.Name != null)
result.Add(ParkingZone);
return result;
}
}
Охрененное свойство
+113
Говнокод поломался. Гуесты теперь везде.
−127
#!/bin/perl
use Crypt::Blowfish; use Crypt::CBC;
$encrypt_key= 'key';
$crypted_text = '53616c7465645f5fd56d1d101fb3adbf1d10cd5ce49b40868dd03da0de64c86bde6bfc3102e20aad6f4447b1fd1aacd8de66f6709cb643b56ebd16c8b8b6f86c0abc6dd6750ad3d71a558d7236102d8e730d11ded42a26d1';
$cipher_handle = new Crypt::CBC($encrypt_key,'Blowfish');
$text = $cipher_handle->decrypt_hex($crypted_text);
print $text;
Не говнокод.
+159
HMODULE nt=LoadLibrary("Ntdll.dll");
PROCESS_BASIC_INFORMATION pbi={0};
ZWQUERYINFORMATIONPROCESS _ZwQueryInformationProcess;
_ZwQueryInformationProcess = (ZWQUERYINFORMATIONPROCESS)GetProcAddress(nt, "ZwQueryInformationProcess");
DWORD rlg;
SetLastError(0);
_ZwQueryInformationProcess(divine,0,&pbi,sizeof(pbi),&rlg);
printf("%d",GetLastError());
источник: http://www.wasm.ru/forum/viewtopic.php?pid=426270#p426270
+155
private static function recalcReplyRate($contact, $flags)
{
try
{
if (!ANKETA_REPLY_RATE)
throw new Exception_Base('', -1);
if (empty($contact))
throw new Exception_Base('', -2);
if ($flags == 0 &&
$contact->getProperty('msg_count_from') == 0 &&
$contact->getProperty('msg_count_to') == 0)
{
$delta = 1;
$user_id = $contact->getProperty('anketa_id');
}
elseif ($flags == 1 &&
$contact->getProperty('msg_count_from') > 0 &&
$contact->getProperty('msg_count_to') == 0)
{
$delta = -1;
$user_id = $contact->getProperty('contact_anketa_id');
}
else
{
throw new Exception_Base('', -3);
}
Data_Helper::recalcReplyRate($delta, $user_id);
}
catch (Exception_Base $e)
{
return;
}
}
+162
QString SomeClass::newzipname (const QString serial) {
QDateTime dt=QDateTime::currentDateTime();
return serial
+QString("%1%2%3%4%5%6")
.arg (QString::number (dt.date().year()-2000), 2, '0')
.arg (QString::number (dt.date().month()), 2, '0')
.arg (QString::number (dt.date().day()), 2, '0')
.arg (QString::number (dt.time().hour()), 2, '0')
.arg (QString::number (dt.time().minute()), 2, '0')
.arg (QString::number (dt.time().second()), 2, '0')
+".zip";
}
+125
if (NewsId == 0)
categoriesList.Get();
else
categoriesList.Get();
Встретил при модернизации одного веб ресурса с посещаемостью около 10 тыс.пользователей в сутки
+146
someVar++%3+1
На мой взгляд - изящно.
Как вы думаете, что делает этот код, особенно если его несколько раз вызывать?