- 1
- 2
- 3
if ( isset($_GET['action']) && !isset($_GET['action']) ) {
die('Не не не, Девид Блейн, не не не!!!!! Сдрысни демон!!!!!');
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+169.8
if ( isset($_GET['action']) && !isset($_GET['action']) ) {
die('Не не не, Девид Блейн, не не не!!!!! Сдрысни демон!!!!!');
}
o_O
+141.5
procedure TForm2.s1;
var a,a1:real;
begin
a:=a+1.8;
randomize;
if p<1 then
begin
if a<1.9 then
begin
a:=999;
a1:=random(4);
if a1=2 then
begin
GroupBox5.Visible:=True;
GroupBox6.Visible:=False;
GroupBox1.Visible:=False;
end
else
if a1=3 then
begin
GroupBox5.Visible:=False;
GroupBox6.Visible:=True;
GroupBox1.Visible:=False;
end
else
begin
GroupBox5.Visible:=False;
GroupBox6.Visible:=False;
GroupBox1.Visible:=True;
end
end
end
end;
0_o
+151.1
$this->oPostTest->recipients = trim($this->oPostTest->recipients);
$this->oPostTest->recipients = trim($this->oPostTest->recipients, ';');
$this->oPostTest->recipients = str_replace(' ', ';', $this->oPostTest->recipients);
$this->oPostTest->recipients = str_replace(';;', ';', $this->oPostTest->recipients);
такая вот загагулина )
+154.3
double a, b;
...
*((DWORD*)&a) ^= *((DWORD*)&b);
*((DWORD*)&b) ^= *((DWORD*)&a);
*((DWORD*)&a) ^= *((DWORD*)&b);
*((DWORD*)&a + 1) ^= *((DWORD*)&b + 1);
*((DWORD*)&b + 1) ^= *((DWORD*)&a + 1);
*((DWORD*)&a + 1) ^= *((DWORD*)&b + 1);
Cпособ обменять значения двух переменных типа double;
+152.9
if (isset($this->handle) || !isset($this->handle) {
echo "Не правильный тип ресурса... или не тип ресурса не известен..."
}
...
...
...
Проверим дескриптор :D
+143
if ($src_encoding == '')
{
// lame, but we know no better...
$src_encoding = $GLOBALS['xmlrpc_internalencoding'];
}
+108.6
void init()
{
int i;
for(i=0;i<4;i++)
ALG_RxConst[i] = -1;
for(i=0;i<4;i++)
ALG_TxConst[i] = -1;
for(i=0;i<4;i++)
ALG_EqInfo[i][0] = 0;
for(i=0;i<4;i++)
ALG_EqInfo[i][1] = -1;
for(i=0;i<4;i++)
ALG_EqInfo[i][2] = -1;
}
Индусу очень-очень нравится for ;)
+160.1
class Company extends BaseCompany {
//...
public function setName($v){
$this->setName(String::mb_ucfirst($v));
}
//...
}
Мегаметодика переопределения сеттеров. Symfony, Propel.
+150
{? if (!isset($edit_style)) ?}
<form action="disp.php?action=style_add" method="post">
{? else ?}
<form action="disp.php?action=style_edit" method="post">
<input type="hidden" name="id" value="{? $edit_style.id ?}">
{? /if ?}
...
...
<td><input type="submit" value="{? if (isset($edit_style)) ?}Save{? else ?}Add{? /if ?}"></td>
Ю
+138.9
1000:
nume:=0;
for i:=1 to mmes do work^[i]{^}:=work^[i]{^}+hde;
iter:=iter+1;
for j:=1 to 2 do
begin
if j=1 then w:=work^[1]{^};
if j=2 then w:=work^[mmes]{^} ;
ab:=2*sqrt(3.*abs(1.-w));
w1:=ab;
for i:=1 to 10 do
begin
w2:=ab * sqrt(1.+w1);
if abs(w2-w1)<1.e-6 then goto 18;
w1:=w2
end;
18:
wkb:=(1.+w2)/w;
if j=1 then rpsi[1]^:=work^[2]{^}*wkb;
if j=2 then rpsi[mmes]^:=work^[m1]{^}*wkb
end;
b:=rpsi[mmes]^;
for i:=1 to m1 do
begin
npsi:=mmes-i;
a:=(12./work^[npsi]{^}-10.0)-1./b;
rpsi[npsi]^:=a;
b:=a;
if a<=1. then goto 30
end;
30:
mcross:=npsi;
rmcros:=a;
b:=rpsi[1]^;
for i:=2 to mcross do
begin
a:=(12./work^[i]{^}-10.0)-1./b;
rpsi[i]^:=a;
b:=a;
if a<0. then nume:=nume+1
end;
if (iter=1) and (nume<num) then writeln('error in initial Eh');
if nume=num then goto 50;
if (not bisec) then writeln('give left energy El');
if (succes) then goto 60;
if nume>num then eh:=enew;
if nume<num then el:=enew;
goto 80;
50:
m3:=mcross+1;
m4:=mcross-1;
a:=1.-0.5/work^[m3]{^};
a1:=a*(1./rpsi[m3]^-rpsi[mcross]^);
b:=1.-0.5/work^[m4]{^};
b1:=b*(rmcros-1./rpsi[m4]^);
de:=(a1-b1)*work^[mcross]{^};
if de>0. then eh:=enew;
if de<0. then el:=enew;
it:=it+1;
goto 70;
60:
it:=0;
70:
if it>=maxit then goto 100;
80:
eold:=enew;
delta:=(el-eh)*0.5;
enew:=eh+delta;
hde:=hsq12*(enew-eold);
succes:=false;
{writeln ('delta=',delta); }
if abs(delta)>1.e-10 then goto 1000;
{writeln('enew=',enew); }
if nume=num then goto 90;
writeln ('degeneration : num-state=nume-state ');
halt;
90:
{ lip:=true; }
100:
succes:=true;
1 из 3-х модулей, которые мне нужно оснастить ГУИ, оптимизировать и привнести абстракцию...