- 1
- 2
- 3
- 4
- 5
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
</SCRIPT>
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+153
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
</SCRIPT>
Лёгких путей не ищем. С форума.
+143
public function some($value)
{
...
$value = $html;
return $value;
}
+150
_strlwr(buf);
if(buf[0] == '\"') strcpy(buf, &(buf[1]));
if(strstr(buf, "\""))
{
if(strrchr(buf, '\\'))
{
if(strchr(strrchr(buf, '\\'), ' '))
{
*(strchr(strrchr(buf, '\\'), ' ')) = 0;
}
}
strncpy(szPath, buf, (DWORD)strstr(buf, "\"") - (DWORD)buf);
return 0;
}
else
{
if(strrchr(buf, '\\'))
{
if(strchr(strrchr(buf, '\\'), ' '))
{
*(strchr(strrchr(buf, '\\'), ' ')) = 0;
}
}
strcpy(szPath, buf);
return 0;
}
Определение дефолтного браузера
+142.3
"x_address" => $postData['address1']. trim( ' ' . $postData['address2']),
гениально =)
+153
break; break; break; // PLEASE, BREAK!!!!!!
+140.1
function parce($string)
{//function open
$breaktags=array ("<"," ","=","","т");
for ($pos=0;$pos<strlen($string);$pos++)
{//for text
if (substr($string,$pos,1)=="{" and substr($string,$pos+1,1)=="%")
{// if open symbols finded
$tagopened=1;
while($tagopened==1){//while opened
for($inpos=$pos+2;$inpos<10000;$inpos++){// =)
if ( (substr($string,$inpos,1)=="%" and substr($string,$inpos+1,1)=="}") or in_array(substr($string,$inpos,1),$breaktags)) {break 2;$tagopened=0;}//br
$intag=$intag.substr($string,$inpos,1);
}//for inpos
}//while opened closing
$intag=explode("->",$intag,2);
echo("$intag[0] with $intag[1] action!<br>");
unset($intag);
} else {//if symbols finded
$symbol=substr($string,$pos,1);
echo("$symbol");
}
}//for all text closing
}//function end;
+147
function sql($query){
/* Переменные для соединения с базой данных */
$hostname = "localhost";
$username = "modx";
$password = "22222";
$dbName = "modx";
/* создать соединение */
mysql_connect($hostname,$username,$password) OR DIE("Не могу создать соединение ");
/* выбрать базу данных. Если произойдет ошибка - вывести ее */
mysql_select_db($dbName) or die(mysql_error());
$res = mysql_query($query);
mysql_close();
}
восемь
+153
(defun lagr-poly (lpoints)
(lambda (x)
(let ((prod-l nil)
(sum-l nil))
(loop for point in lpoints do
(let ((x0 (x-coord point))
(y0 (y-coord point)))
(loop for pointn in lpoints do
(let ((xn (x-coord pointn)))
(if (not (eq point pointn))
(progn (push (/ (- x xn) (- x0 xn)) prod-l)))))
(push (* (product prod-l) y0) sum-l)
(setq prod-l nil)))
(loop for l in sum-l sum l))))
Полином Лагранжа, ёпта!
Давно написал, сейчас даже понять не могу как работает.
+134.2
public void OnObjectException(EventArgs e, Exception ex)
{
throw ex;
}
Индусятина!
+77
6432168468453
вы все говнокоды