- 1
- 2
- 3
DoSubmit(){var subt=false;if(!subt){subt=true;document.fmHF.submit();}}
...
<body onload="javascript:DoSubmit();">
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+165.4
DoSubmit(){var subt=false;if(!subt){subt=true;document.fmHF.submit();}}
...
<body onload="javascript:DoSubmit();">
мелкомягкие в своем духе..
+139.6
File pom = new File(dir.getAbsoluteFile()
+ String.valueOf(File.separatorChar) + "pom.xml");
В классе java.io.File специально для таких умников есть две константы :
public static final char separatorChar = '\';
public static final String separator = "" + separatorChar;
Одна из них - это char, а вторая - String.
+145
<?php
include_once"pclzip.php";
$dir=$_GET['dir'];
$arch=$_GET['arch'];
$open=$_GET['open'];
if($dir!='' && $arch!='')
{
echo '<b>Просмотр архива</b><br><br>';
if (!$_GET['action'])
{
$zip=new PclZip("$dir/$arch");
if (($list = $zip->listContent()) != 0)
{
sort($list);
print_r($list);
$countlist = count($list);
$zfilename = array();
$zfilesize = array();
$zfolder = array();
for ($i=0; $i<$countlist; $i++)
{
$zfilename[]=$list[$i]['filename'];
$zfilesize[]=$list[$i]['size'];
$zfolder[]=$list[$i]['folder'];
}
$totalsize=array_sum($zfilesize);
$total = count($zfilename);
echo '<img src="../images/img/zip.gif" alt=""> <b>'.$arch.'</b><br><br>';
echo 'Всего файлов: '.$total.'<br>Вес распакованного архива: '.$totalsize.'<hr>';
$start = (int)$_GET['start'];
if($start < 0 || $start > $total)
{
$start = 0;
}
if ($total < $start + $config_ziplist)
{
$end = $total;
}
else
{
$end = $start + $config_ziplist;
}
if($zfolder[$i]=="1")
{
$zfilename[$i]=substr($zfilename[$i],0,-1);
echo '<img src="../images/icons/dir.gif" alt=""> <b>Директория '.$zfilename[$i].'</b><br>';
}
else
{
echo '<img src="../images/icons/'.$ico.'" alt=""> <a href="zip.php?action=preview&dir='.$dir.'&arch='.$arch.'&open='.$zfilename[$i].'&start='.$start.'&'.SID.'">'.$zfilename[$i].'</a>';
echo ' ('.formatsize($zfilesize[$i]).')<br>';
}
}
echo '<hr>';
if ($start != 0)
{
echo '<a href="zip.php?start='.($start - $config_ziplist).'&dir='.$dir.'&arch='.$arch.'&'.SID.'"><-Назад</a> ';
}
else
{
echo'<-Назад';
}
echo ' | ';
if ($total > $start + $config_ziplist)
{
echo '<a href="zip.php?start='.($start + $config_ziplist).'&dir='.$dir.'&arch='.$arch.'&'.SID.'">Далее-></a>';
}
else
{
echo'Далее->';
}
if($total>0)
{
$ba=ceil($total/$config_ziplist);
$ba2=$ba*$config_ziplist-$config_ziplist;
echo '<br><hr>Страницы:';
$asd=$start-($config_ziplist*3);
$asd2=$start+($config_ziplist*4);
if($asd<$total && $asd>0)
{
echo ' <a href="zip.php?start=0&dir='.$dir.'&arch='.$arch.'&'.SID.'">1</a> ... ';
}
for($i=$asd; $i<$asd2;)
{
if($i<$total && $i>=0)
{
хрень неработающая
+157.9
function _checkBoth($val1, $val2, $flag = false){
if($flag) return $val1 && !$val2 || !$val1 && $val2 ? true : false;
return $val1 && $val2 ? false : true;
}
Тот же проект поляцко-индусской соц. сети
+153.9
if(!$_POST && !isset($_POST['gender'])) ...
В одном проекте социальной сети, доставшемся от поляков, которым тот достался от индусов
+226.8
if(isset($user)) $user = $user;
+119
private string StripDuplicateSpaces(string data)
{
bool flag = false;
do
{
if (data.IndexOf(" ") != -1)
{
data = data.Replace(" ", " ");
}
}
while (!flag);
return data.Trim();
}
private string TrimNewLines(string s)
{
return s;
}
за это ещё и денег просят :)
+161.2
bool HaW::Object::DestroyMutex()
{
if (0 != pthread_mutex_destroy(&pMutex))
if (0 == pthread_mutex_unlock(&pMutex))
if(0 == pthread_mutex_destroy(&pMutex))
return true;
else
return false;
else
return false;
}
Метод для освобождения мьютекса, POSIX
+140.3
...
$result = my_mysql_query($query);
$numrows = mysql_num_rows($result);
if ((!$result || !mysql_num_rows($result)) && $numrows !==0) {
echo '<p>'.l('article_not_exist').'</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