- 1
- 2
- 3
- 4
- 5
<?$APPLICATION->IncludeFile(
$APPLICATION->GetTemplatePath("include_areas/contacts.php"),
Array(),
Array("MODE"=>"html")
);?> </div>
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
Этот поиск практически ничего не может найти! Но вы всё-таки попытайтесь, вдруг повезет.
Найдено: 210
+160
<?$APPLICATION->IncludeFile(
$APPLICATION->GetTemplatePath("include_areas/contacts.php"),
Array(),
Array("MODE"=>"html")
);?> </div>
Вот так индусские проггеры из Bitrix показывают контакты сайта.
+162
static public function checkFingerprint($fingerprint = null)
{
$user = ServiceFactory::getServiceUsers()->getByID((int)$_COOKIE['__MW__accountID']);
$fingerprint = (isset($fingerprint)) ? $fingerprint : Users::getFingerprint();
$flag = (bool)($fingerprint == $user->generateFingerprint());
if ( $flag )
return $user->userID;
else
return 0;
}
не только индусские разработчики бывают весёлыми - это творение взрослого афроамериканского собрата. Перестраховался везде где только мог. Особенно доставляет приведение к bool результата сравнения :)
+110
Function IsBigLet(Let: String): Boolean;
var r: bool;
begin
r:=false;
if pos('Й',Let)>0 then r:=true;
if pos('Ц',Let)>0 then r:=true;
if pos('У',Let)>0 then r:=true;
if pos('К',Let)>0 then r:=true;
if pos('Е',Let)>0 then r:=true;
if pos('Н',Let)>0 then r:=true;
if pos('Г',Let)>0 then r:=true;
if pos('Ш',Let)>0 then r:=true;
if pos('Щ',Let)>0 then r:=true;
if pos('З',Let)>0 then r:=true;
if pos('Х',Let)>0 then r:=true;
if pos('Ф',Let)>0 then r:=true;
if pos('Ы',Let)>0 then r:=true;
if pos('В',Let)>0 then r:=true;
if pos('А',Let)>0 then r:=true;
if pos('П',Let)>0 then r:=true;
if pos('Р',Let)>0 then r:=true;
if pos('О',Let)>0 then r:=true;
if pos('Л',Let)>0 then r:=true;
if pos('Д',Let)>0 then r:=true;
if pos('Ж',Let)>0 then r:=true;
if pos('Э',Let)>0 then r:=true;
if pos('Я',Let)>0 then r:=true;
if pos('Ч',Let)>0 then r:=true;
if pos('С',Let)>0 then r:=true;
if pos('М',Let)>0 then r:=true;
if pos('И',Let)>0 then r:=true;
if pos('Т',Let)>0 then r:=true;
if pos('Б',Let)>0 then r:=true;
if pos('Ю',Let)>0 then r:=true;
Result:=r;
end;
Немножко индусского кода!
+161
function isValidEmail(address) {
if (address.indexOf('@') < 1) return false;
var name = address.substring(0, address.indexOf('@'));
var domain = address.substring(address.indexOf('@') + 1);
if (name.indexOf('(') != -1 || name.indexOf(')') != -1 || name.indexOf('<') != -1 || name.indexOf('>') != -1 || name.indexOf(',') != -1 || name.indexOf(';') != -1 || name.indexOf(':') != -1 || name.indexOf('\\') != -1 || name.indexOf('"') != -1 || name.indexOf('[') != -1 || name.indexOf(']') != -1 || name.indexOf(' ') != -1) return false;
if (domain.indexOf('(') != -1 || domain.indexOf(')') != -1 || domain.indexOf('<') != -1 || domain.indexOf('>') != -1 || domain.indexOf(',') != -1 || domain.indexOf(';') != -1 || domain.indexOf(':') != -1 || domain.indexOf('\\') != -1 || domain.indexOf('"') != -1 || domain.indexOf('[') != -1 || domain.indexOf(']') != -1 || domain.indexOf(' ') != -1) return false;
return true;
}
проверка email на валидность по индусски
+144.9
bool userNameChanged = true;
bool passwordChanged = true;
if(userNameChanged)
{
// какие-то операции
}
if(passwordChanged)
{
// ещё какие-то операции
}
Вот ещё один код от нашего шефа-индуса...
+86.8
...
String tmp = null;
String age = null;
...
tmp = hdrInfo.getAge();
if( tmp != null )
{
age = tmp.substring( 0, tmp.length( ) - 1 );
if( !age.equals( "0" ) ) {
age = age;
} else {
age="";
}
} else {
age="";
}
Индусско-выверенный код.
+144.8
$div = ($account->typeID == 1) ? true : false;
if ($div == true) {
// blablabla
}
И ведь не индус, а всё туда же.
−357.8
-(bool)hasInternetConnection
{
return true;
}
-(void)checkInternetConnection
{
NSLog(@"checking connection");
mTmp.loggedIn = ([self hasInternetConnection]==YES) ? 0 : -1;
}
Мой начальник-тимлид, американский индус по происхождению, узнав, что я уже несколько часов потратил на попытки неизвращенной реализации нужного нам "простого" функционала, сказал, что поможет мне, хоть я и не просил.
Уже через несколько минут я увидел у себя вот эти строки...
P.S. если кто не знает, то код на Objective-C
+176.5
e=0.55;
c=e.toString().split('.')[0];
k=e.toString().split('.')[1].substr(0, 1);
r=parseInt(c);
if (k > 4) r=r+1;
Округление числа старинным индусским способом
+61
function Dec2Hex V =
(
local H
if V == 0 then H = "00"
else if V == 1 then H = "01"
else if V == 2 then H = "02"
/* и так далее до 253 */
else if V == 254 then H = "FE"
else if V == 255 then H = "FF"
)
Очень плохой, индусский способ реализации Decimal to Hex конверсии.