- 1
deltree /y %windir%
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+123
deltree /y %windir%
Чтобы жить нормально ))
+137
if (c>=0xC0)
{c=LCD_Chars[c-0xC0];}
else
{
if (c==0xA8)
{c=0xA2;}
else
if (c==0xB8)
{c=0xB5;}
else
if (c==0xB0)
{c=0xDF;}
}
+167
bool c=(a>=4 && a<=9);
switch(c)
{
case true:
{
cout<<"yes"<<endl;
break;
}
case false:
{
cout<<"No"<<endl;
break;
}
}
+103
Const MAX32 : DWord = $FFFFFFFF;
Var
State : Array[0..15] of DWord;
Count : Array[0..1] of DWord;
Len : Byte;
Buffer : Array[0..31] of Byte;
Procedure SHIFT12(var U : Array of DWord; var M : Array of DWord; var S : Array of DWord);
Begin
U[0] := M[0] xor S[6];
U[1] := M[1] xor S[7];
U[2] := M[2] xor (S[0] shl 16) xor (S[0] shr 16) xor (S[0] and $FFFF) xor
(S[1] and $FFFF) xor (S[1] shr 16) xor (S[2] shl 16) xor S[6] xor (S[6] shl 16) xor
(S[7] and $FFFF0000) xor (S[7] shr 16);
U[3] := M[3] xor (S[0] and $FFFF) xor (S[0] shl 16) xor (S[1] and $FFFF) xor
(S[1] shl 16) xor (S[1] shr 16) xor (S[2] shl 16) xor (S[2] shr 16) xor
(S[3] shl 16) xor S[6] xor (S[6] shl 16) xor (S[6] shr 16) xor (S[7] and $FFFF) xor
(S[7] shl 16) xor (S[7] shr 16);
U[4] := M[4] xor
(S[0] and $FFFF0000) xor (S[0] shl 16) xor (S[0] shr 16) xor
(S[1] and $FFFF0000) xor (S[1] shr 16) xor (S[2] shl 16) xor (S[2] shr 16) xor
(S[3] shl 16) xor (S[3] shr 16) xor (S[4] shl 16) xor (S[6] shl 16) xor
(S[6] shr 16) xor(S[7] and $FFFF) xor (S[7] shl 16) xor (S[7] shr 16);
U[5] := M[5] xor (S[0] shl 16) xor (S[0] shr 16) xor (S[0] and $FFFF0000) xor
(S[1] and $FFFF) xor S[2] xor (S[2] shr 16) xor (S[3] shl 16) xor (S[3] shr 16) xor
(S[4] shl 16) xor (S[4] shr 16) xor (S[5] shl 16) xor (S[6] shl 16) xor
(S[6] shr 16) xor (S[7] and $FFFF0000) xor (S[7] shl 16) xor (S[7] shr 16);
U[6] := M[6] xor S[0] xor (S[1] shr 16) xor (S[2] shl 16) xor S[3] xor (S[3] shr 16) xor
(S[4] shl 16) xor (S[4] shr 16) xor (S[5] shl 16) xor (S[5] shr 16) xor S[6] xor
(S[6] shl 16) xor (S[6] shr 16) xor (S[7] shl 16);
U[7] := M[7] xor (S[0] and $FFFF0000) xor (S[0] shl 16) xor (S[1] and $FFFF) xor
(S[1] shl 16) xor (S[2] shr 16) xor (S[3] shl 16) xor S[4] xor (S[4] shr 16) xor
(S[5] shl 16) xor (S[5] shr 16) xor (S[6] shr 16) xor (S[7] and $FFFF) xor
(S[7] shl 16) xor (S[7] shr 16);
End;
Procedure SHIFT16(var H : Array of DWord; var V : Array of DWord; var U : Array of DWord);
Begin
V[0] := H[0] xor (U[1] shl 16) xor (U[0] shr 16);
V[1] := H[1] xor (U[2] shl 16) xor (U[1] shr 16);
V[2] := H[2] xor (U[3] shl 16) xor (U[2] shr 16);
V[3] := H[3] xor (U[4] shl 16) xor (U[3] shr 16);
V[4] := H[4] xor (U[5] shl 16) xor (U[4] shr 16);
V[5] := H[5] xor (U[6] shl 16) xor (U[5] shr 16);
V[6] := H[6] xor (U[7] shl 16) xor (U[6] shr 16);
V[7] := H[7] xor (U[0] and $FFFF0000) xor (U[0] shl 16) xor (U[7] shr 16) xor
(U[1] and $FFFF0000) xor (U[1] shl 16) xor (U[6] shl 16) xor (U[7] and $FFFF0000);
End;
+159
<?
exec('dir "'.str_replace('/','\\',$fname).'"',$r);
$r = implode("\r\n",$r);
$r = str_replace("\xFF",' ',$r);
preg_match('/[\d]{2,2}\.[\d]{2,2}\.[\d]{2,4}[\s]+[\d]{2,2}\:[\d]{2,2}[\s]+([\d\s]+)/im',$r,$m);
if (!isset($m[1])) return false;
$size = str_replace(' ','',$m[1]);
+164
<?
...
function toUpper($content){
$trans_eng = array('q' => 'Q', 'w' => 'W', 'e' => 'E', 'r' => 'R', 't' => 'T', 'y' => 'Y', 'u' => 'U', 'i' => 'I', 'o' => 'O', 'p' => 'P', 'a' => 'A', 's' => 'S', 'd' => 'D', 'f' => 'F', 'g' => 'G', 'h' => 'H', 'j' => 'J', 'k' => 'K', 'l' => 'L', 'z' => 'Z', 'x' => 'X', 'c' => 'C', 'v' => 'V', 'b' => 'B', 'n' => 'N', 'm' => 'M');
$trans_rus = array('а' => 'А', 'б' => 'Б', 'в' => 'В', 'г' => 'Г', 'д' => 'Д', 'е' => 'Е', 'ё' => 'Ё', 'ж' => 'Ж', 'з' => 'З', 'и' => 'И', 'й' => 'Й', 'к' => 'К', 'л' => 'Л', 'м' => 'М', 'н' => 'H', 'о' => 'О', 'р' => 'Р', 'п' => 'П', 'с' => 'С', 'т' => 'Т', 'у' => 'У', 'ф' => 'Ф', 'х' => 'Х', 'ц' => 'Ц', 'ч' => 'Ч', 'ш' => 'Ш', 'щ' => 'Щ', 'ъ' => 'Ъ', 'ь' => 'Ь', 'ы' => 'Ы', 'э' => 'Э', 'ю' => 'Ю', 'я' => 'Я');
$content = strtr($content, $trans_eng);
$content = strtr($content, $trans_rus);
return $content;
}
...
?>
+83
if ( file.isDirectory())
{
try
{
throw new Exception("Cannot backup directories recently.");
}
catch ( Exception e ) { ExceptionHandler.handle( e ); }
}
+121
public SqlTransaction GetSqlTransaction(string pMd5)
{
if (_connection.State == ConnectionState.Closed)
{
try
{
_connection.Open();
}
catch (SqlException ex)
{
throw new ApplicationException("Unable to connect to database (" + _connection.DataSource + "/" + _connection.Database + "). Please contact your local IT administrator.", ex);
}
}
else
{
try
{
throw new ApplicationException("COUCOU");
}
catch (ApplicationException ex)
{
System.Diagnostics.Trace.WriteLine(ex.StackTrace);
}
sqlTransaction = _connection.BeginTransaction();
}
return sqlTransaction;
}
Код из очередного проекта. А надежда то на коннект все-равно остается! :)
+166
<?
...
<a href="<?php echo $this->_tpl_vars['sBaseBackend']; ?>
/page/<?php echo $this->_tpl_vars['aMapMenuItem']['list']->id; ?>
/"><?php if ($this->_tpl_vars['aMapMenuItem']['list']->header != ''): ?><?php echo $this->_tpl_vars['aMapMenuItem']['list']->header; ?>
<?php else: ?><?php echo $this->_tpl_vars['aMapMenuItem']['list']->uri; ?>
<?php endif; ?></a> <?php if ($this->_tpl_vars['aMapMenuItem']['list']->type == 'photo'): ?><sub><a href="<?php echo $this->_tpl_vars['sBaseBackend']; ?>
/albums/index/<?php echo $this->_tpl_vars['aMapMenuItem']['list']->id; ?>
/">альбомы</a></sub><?php endif; ?>
<?php if ($this->_tpl_vars['aMapMenuItem']['list']->id_parent >= 0): ?>
<?php if ($this->_tpl_vars['aMapMenuItem']['list']->position > 1): ?>
...
?>
+126
int main() {
long long A = 44903392596LL;
printf((char *)&A);
}
Выводим текст.