- 1
- 2
- 3
- 4
SELECT
InstanceID,
DisplayValue AS VidDocValue
FROM [dvtable_{D25F1089-C63D-43E1-9FA4-864C48EECCB4}] AS [dvtable_{D25F1089-C63D-43E1-9FA4-864C48EECCB4}_1]
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−859
SELECT
InstanceID,
DisplayValue AS VidDocValue
FROM [dvtable_{D25F1089-C63D-43E1-9FA4-864C48EECCB4}] AS [dvtable_{D25F1089-C63D-43E1-9FA4-864C48EECCB4}_1]
+168
/*
* Выводим чекбоксы :D
* $name - имя инпута чеки
* $val - тру ор фалсе
*/
function checkbox($name, $val)
{
$checked = !empty($val) ? 'checked ' : false;
return "<input type=\"checkbox\" name=\"" . $name . "\" " . $checked . "/>";
}
Тру от фалсе
+169
if(!$this->first_name && !$this->last_name && !$this->countryID && !$this->zoneID && !$this->zip && !$this->state && !$this->city && !$this->address_street && !trim(strip_tags($strAddress))){
return '';
}
if(!$this->first_name && !$this->last_name && !$this->countryID && !$this->zoneID && !$this->zip && !$this->state && !$this->city && !$this->address_street && !$this->address_home && !trim(strip_tags($strAddress))){
return '';
}
if(!$this->first_name && !$this->last_name && !$this->countryID && !$this->zoneID && !$this->zip && !$this->state && !$this->city && !$this->address_street && !$this->address_home && !$this->address_houses && !trim(strip_tags($strAddress))){
return '';
}
if(!$this->first_name && !$this->last_name && !$this->countryID && !$this->zoneID && !$this->zip && !$this->state && !$this->city && !$this->address_street && !$this->address_home && !$this->address_houses && !$this->address_houseroom && !trim(strip_tags($strAddress))){
return '';
}
Найдено в одной CMS
+85
boolean ROLLBACK = new Boolean(false).booleanValue();
И это пишет тимлид (сеньор) в моей конторе
+168
function ($param)
{
$cnt = 0;
$result = mysql_query("SELECT * FROM `table` WHERE `table_field` = ".$param);
if ($result)
{
while($row_s = mysql_fetch_assoc($result))
{
$cnt++;
}
}
else
{
$cnt = 0;
}
return $cnt;
}
Шедевр неизвестного программиста.
+175
$(this).parent().parent().parent().siblings('.last-email').removeClass('hidden');
http://nsk.2gis.ru/media/js/main.js
оттуда же :)
+161
var color2array = function(color){
return color.length==4?color.slice(1).split('').map(function(x){return parseInt(x,16)}).concat([255]):
color.length==7?[color.slice(1,3),color.slice(3,5),color.slice(5)].map(function(x){return parseInt(x,16)}).concat([255]):
~color.indexOf('rgba')?color.slice(5,-1).split(',').map(function(x){return +x}):
~color.indexOf('rgb')?color.slice(4,-1).split(',').map(function(x){return +x}).concat([255]):[0,0,0,255];
}
Один большой костыль преобразующий цвет из вида hex rgb rgba в массив значений от 1 до 255
+74
import java.util.Calendar;
public class CalendarTime {
public static void main(String args[]) {
Calendar now = Calendar.getInstance();
now.setTimeInMillis(System.currentTimeMillis());
System.out.println("Now : "+(((now.get(Calendar.YEAR))))+" year.");
System.out.println("Now : "+(((now.get(Calendar.MONTH))))+" month.");
System.out.println("Now : "+(((now.get(Calendar.DATE))))+" day.");
System.out.println("Now : "+(((now.get(Calendar.HOUR_OF_DAY))))+" hour.");
System.out.println("Now : "+(((now.get(Calendar.MINUTE))))+" minute.");
System.out.println("Now : "+(((now.get(Calendar.SECOND))))+" second.");
}
}
System.out.println("Now : "+(((now.get(Calendar.MONTH))))+" month.");
Обратите внимание на эту строку. Отображение идёт некорректно , странно почему??
С наилучшими пожеланиями, Sun Microsystems ^_^).
+147
ZeuS
do
{
/*
Тупые, притупые идусы из MS, не понимают что они тупые притупые. Дело в том, что в MSDN
написано, что NetUserEnum может работать с уровнями 4, 23, а на практики мы получаем
большой индуский ХУЙ!
*/
DWORD readed;
DWORD total;
USER_INFO_0 *buf0 = NULL;
status = CWA(netapi32, NetUserEnum)(NULL, 0, FILTER_NORMAL_ACCOUNT, (LPBYTE *)&buf0, MAX_PREFERRED_LENGTH, &readed, &total, &handle);
/////////////////////////////////////
//Непонятно, может ли оно вернуть NULL. Помня фокус индусов с wsprintf, защитимся от этого.
if(p == NULL)p = path;
//////////////////////////////////
if(iSize == -1)
{
//Гении-индусы решили подмениь возрашаемое значение в Vista на -1, в случаи если не хватает
//места на всю строку, однако буфер заполняется. Ума устаналивать LastError не хватило...
iSize = _LengthW(pBuf);
}
else pBuf[iSize] = 0;
///////////////////////////////////
//Я ибал в рот тупых уродов написавших тупой rfc и тупорлых говнокодеров,
//Я ставлю листинг на проивзольны порт на все IP сервера, и пашел на хуй софт который не
//сможет это прочитать. Возможно меня ввел в забулждение FlashFXP 3.6.0. Т.к. в destAddr
//он отправляет какие то данные сервера. А по rfc, как я понел, там должны быть данные
//сокс-сервера, где нужно ждать сединения.
//Ищим свободный порт.
((SOCKADDR_IN6 *)destAddr)->sin6_port = 0;
+165
$nw = mysql_query("SELECT * FROM `news`");
while ($news=mysql_fetch_array($nw))
{
$c1++;
}
$nw = mysql_query("SELECT * FROM `post`");
while ($news=mysql_fetch_array($nw))
{
$c2++;
}
$nw = mysql_query("SELECT * FROM `ppost`");
while ($news=mysql_fetch_array($nw))
{
$c3++;
}
$i=$c1+$c2+$c3;
Обнаружено в мега CMS имени неизвестного разработчика