- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
if( str.ToUpper() == "....." )
{
properties["DCS"] = "0x00";
msg = new Message( str, A, B, properties, text );
}
else
{
properties["DCS"] = "0x00";
msg = new Message( str, A, B, null, text );
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+133
if( str.ToUpper() == "....." )
{
properties["DCS"] = "0x00";
msg = new Message( str, A, B, properties, text );
}
else
{
properties["DCS"] = "0x00";
msg = new Message( str, A, B, null, text );
}
В биореактор Луговского!
+142
protected static long chr2hex(char a)
{
switch (a)
{
case '0':
return 0L;
...................
case '9':
return 9L;
case 'A':
case 'a':
return 10L;
.....................
case 'F':
case 'f':
return 15L;
}
return 0L;
}
Как же это бесит, бля...
+138
private static Dictionary<object, object> _cache = new Dictionary<object, object>();
.........
if( _cache.ContainsKey( key ) )
{
lock( syncRoot )
{
_cache[key] = value;
return;
}
}
_cache.Add( key, value );
Бараньи мозги.
+83
private static boolean getIsDeclinedByRules(boolean oldIsSatisfy, boolean oldIsDeclined, boolean newIsSatisfy) {
if (!oldIsSatisfy && oldIsDeclined && !newIsSatisfy) return true;
if (!oldIsSatisfy && oldIsDeclined && newIsSatisfy) return false;
if (!oldIsSatisfy && !oldIsDeclined && !newIsSatisfy) return true;
if (!oldIsSatisfy && !oldIsDeclined && newIsSatisfy) return false;
if ( oldIsSatisfy && oldIsDeclined && !newIsSatisfy) return true;
if ( oldIsSatisfy && oldIsDeclined && newIsSatisfy) return true;
if ( oldIsSatisfy && !oldIsDeclined && !newIsSatisfy) return true;
if ( oldIsSatisfy && !oldIsDeclined && newIsSatisfy) return false;
return true;
}
+132
public event ConnectedHandler OnConnected;
.......
lock( OnConnected )
{
if( OnConnected != null )
{
OnConnected( ... );
}
}
Быдломакронабиратели...
−106
//дальше идет "родной" движок, спасибо не надо.
return;
Разбираюсь в исходнике одного индуса, поддерживаемого 4 года нашими разработчиками
+151
public static function checkCurl()
{
if (in_array("curl", get_loaded_extensions()))
return TRUE;
else
return FALSE;
}
function_exist? Не, не слышал. Мануалы для лохов.
+157
$targetFolder = 'uploads/'; // Relative to the root
// ...
$targetPath = dirname(__FILE__) . '/' . $targetFolder;
$targetFile = rtrim($targetPath,'/') . '/' . $_FILES['file']['name'];
"Непостоянство слеша", Pedro Molina, 2013. Холст, масло
https://github.com/pekebyte/pekeUpload/blob/940cf27e5fef5038e2e414c72be6e34d68f2881d/upload.php
+158
if (Database::getDbType() == 'pgsql')
$stmt = Database::getInstance()->dbh->prepare("SELECT COUNT(*) AS count FROM torrent WHERE tracker = :tracker AND torrent_id = :id");
else
$stmt = Database::getInstance()->dbh->prepare("SELECT COUNT(*) AS `count` FROM `torrent` WHERE `tracker` = :tracker AND `torrent_id` = :id");
https://github.com/ElizarovEugene/TorrentMonitor/blob/master/class/Database.class.php#L625 УПРЛС
+154
public static function checkPath($path)
{
if (substr($path, -1) == '/')
$path = $path;
else
$path = $path.'/';
return $path;
}
facepalm.jpg