- 1
facepalm.sql
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
Всего: 7
−851
facepalm.sql
В таблице платежей несколько полей с цифрами - _amount и _value.
В связаной таблице есть поле PaymentAmount.
Угадайте, какому полю платежа оно соответствует 7:
−94
for smth in filter(None, [something]): do(smth)
лопата
+128
long.Parse(Convert.ToString(Convert.ToSingle(Item.Value.ToString())))
+143
RewriteRule info/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/(.*) /content.php?d1=$1&d2=$2&d3=$3&d4=$4&d5=$5&d6=$6&d7=$7&d8=$8&d9=$9&d10=$10&d11=$11 [L]
RewriteRule info/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/(.*) /content.php?d1=$1&d2=$2&d3=$3&d4=$4&d5=$5&d6=$6&d7=$7&d8=$8&d9=$9&d10=$10 [L]
RewriteRule info/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/(.*) /content.php?d1=$1&d2=$2&d3=$3&d4=$4&d5=$5&d6=$6&d7=$7&d8=$8&d9=$9 [L]
RewriteRule info/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/(.*) /content.php?d1=$1&d2=$2&d3=$3&d4=$4&d5=$5&d6=$6&d7=$7&d8=$8 [L]
RewriteRule info/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/(.*) /content.php?d1=$1&d2=$2&d3=$3&d4=$4&d5=$5&d6=$6&d7=$7 [L]
RewriteRule info/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/(.*) /content.php?d1=$1&d2=$2&d3=$3&d4=$4&d5=$5&d6=$6 [L]
RewriteRule info/([^/]+)/([^/]+)/([^/]+)/([^/]+)/(.*) /content.php?d1=$1&d2=$2&d3=$3&d4=$4&d5=$5 [L]
RewriteRule info/([^/]+)/([^/]+)/([^/]+)/(.*) /content.php?d1=$1&d2=$2&d3=$3&d4=$4 [L]
RewriteRule info/([^/]+)/([^/]+)/(.*) /content.php?d1=$1&d2=$2&d3=$3 [L]
RewriteRule info/([^/]+)/(.*) /content.php?d1=$1&d2=$2 [L]
RewriteRule info/(.*) /content.php?d1=$1 [L]
facepalm.php
−856
SELECT i.*, p.link as p_link, p.title as p_title, p.p_id FROM `items` i, `places` p WHERE i.public='1' and i.place=p.id and (i.place='1' or i.place='1972' or i.place='2' or i.place='3' or i.place='4' or i.place='5' or i.place='6' or i.place='7' or i.place='8' or i.place='9' or i.place='10' or i.place='11' or i.place='12' or i.place='13' or i.place='14' or i.place='15' or i.place='16' or i.place='17' or i.place='18' or i.place='19' or i.place='20' or i.place='21' or i.place='22' or i.place='23' or i.place='24' or i.place='25' or i.place='26' or i.place='27' or i.place='28' or i.place='29' or i.place='30' or i.place='31' or i.place='32' or i.place='33' or i.place='34' or i.place='35' or i.place='36' or i.place='37' or i.place='38' or i.place='39' or i.place='40' or i.place='41' or i.place='42' or i.place='43' or i.place='44' or i.place='45' or i.place='46' or i.place='47' or i.place='48' or i.place='49' or i.place='50' or i.place='51' or i.place='52' or i.place='53' or i.place='54' or i.place='55' or i.place='56' or i.place='57' or i.place='58' or i.place='59' or i.place='60' or i.place='61' or i.place='62' or i.place='63' or i.place='64' or i.place='65' or i.place='66' or i.place='67' or i.place='68' or i.place='69' or i.place='70' or i.place='71' or i.place='72' or i.place='73' or i.place='74' or i.place='75' or i.place='76' or i.place='77' or i.place='78' or i.place='79' or i.place='80' or i.place='81' or i.place='82' or i.place='83' or i.place='84' or i.place='85' or i.place='86' or i.place='87' or i.place='88' or i.place='89' or i.place='90' or i.place='91' or i.place='92' or i.place='93' or i.place='94' or i.place='95' or i.place='96' or i.place='97' or i.place='98' or i.place='99' or i.place='100' or i.place='101' or i.place='102' or i.place='103' or i.place='104' or i.place='105' or i.place='106' or i.place='107' or i.place='108' or i.place='109' or i.place='110' or i.place='111' or i.place='112' or i.place='113' or i.place='114' or i.place='115' or i.place='116' or i.place='117' or i.place='118' or i.place='119' or i.place='120' or i.place='121' or i.place='122' or i.place='123' or i.place='124' or i.place='125' or i.place='126' or i.place='127' or i.place='128' or i.place='129' or i.place='130' or i.place='131' or i.place='132' or i.place='133' or i.place='134' or i.place='135' or i.place='136' or i.place='137' or i.place='138' or i.place='139' or i.place='140' or i.place='141' or i.place='142' or i.place='143' or i.place='144' or i.place='145' or i.place='146' or i.place='147' or i.place='148' or i.place='149' or i.place='150' or i.place='151' or i.place='152' or i.place='153' or i.place='154' or i.place='155' or i.place='156' or i.place='157' or i.place='158' or i.place='159' or i.place='160' or i.place='161' or i.place='162' or i.place='163' or i.place='164' or i.place='165' or i.place='166') ORDER BY i.lastupdated DESC LIMIT 18160, 10;
есть ещё примерно такой же, но с JOINами
+166
function Check_email(mail1)
{
var found = false;
for (i=0;i<mail1.length;i++)
{
if (mail1.charAt(i) == '@') found = true;
if (mail1.charAt(i) == '.' && found) return true;
}
return false;
}
ух щи-
+152
private function http_post($url, $post_string) {
// add any additional curl options here
$options = array(CURLOPT_URL => $url,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $post_string,
CURLOPT_USERAGENT => "PubSubHubbub-Publisher-PHP/1.0");
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
$this->last_response = $response;
$info = curl_getinfo($ch);
curl_close($ch);
// all good
if ($info['http_code'] == 204)
return true;
return false;
}
http_post ):