- 1
- 2
- 3
// функция для возвращения всякой хрени
function hren($table, $id)
{
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+144
// функция для возвращения всякой хрени
function hren($table, $id)
{
+196.4
<?$all_p= array('<a href=catalog.php?page=1&filtr=>1</a>',
'<a href=catalog.php?page=2&filtr=>2</a>',
'<a href=catalog.php?page=3&filtr=>3</a>',
'<a href=catalog.php?page=4&filtr=>4</a>',
'<a href=catalog.php?page=5&filtr=>5</a>',
'<a href=catalog.php?page=6&filtr=>6</a>',
...
'<a href=catalog.php?page=267&filtr=>267</a>',
'<a href=catalog.php?page=268&filtr=>268</a>',
'<a href=catalog.php?page=269&filtr=>269</a>',
'<a href=catalog.php?page=270&filtr=>270</a>',
'<a href=catalog.php?page=271&filtr=>271</a>',
'<a href=catalog.php?page=272&filtr=>272</a>',
'<a href=catalog.php?page=273&filtr=>273</a>',
'<a href=catalog.php?page=274&filtr=>274</a>',
'<a href=catalog.php?page=275&filtr=>275</a>',
'<a href=catalog.php?page=276&filtr=>276</a>',
'<a href=catalog.php?page=277&filtr=>277</a>',
'<a href=catalog.php?page=278&filtr=>278</a>',
'<a href=catalog.php?page=279&filtr=>279</a>'
);?>
без комментариев
+142.3
"x_address" => $postData['address1']. trim( ' ' . $postData['address2']),
гениально =)
+144
duff device
Сами знаете код.
Остальное из классики вроде #define TRUE FALSE и оператора передёргивания уже тут было.
+170.2
mov eax, pony
jnz pony
jmp magiccastle
Поне!
+153
break; break; break; // PLEASE, BREAK!!!!!!
+144
static void Menu()
{
ATD atd = new ATD();
int i = 0; String s;
while (i!=6){
Console.WriteLine("Пожалуйста, укажите необходимое действие:");
Console.WriteLine("*******************************************");
Console.WriteLine("1) Добавить элемент в список");
Console.WriteLine("2) Просмотреть список");
Console.WriteLine("3) Сортировать список");
Console.WriteLine("4) Найти элементы");
Console.WriteLine("5) Удалить элемент из списка");
Console.WriteLine("6) Выход");
Console.WriteLine("*******************************************");
Console.WriteLine();
Console.Write("->");
s = Console.ReadLine();
i = Convert.ToInt32(s);
Console.WriteLine();
// Console.WriteLine("i = " + i);
if (i == 1) atd.AddElement();
else if (i == 2) atd.WriteList();
else if (i == 3) atd.SortList();
else if (i == 4) atd.FindElements();
else if (i == 5) atd.DeleteElement();
else if (i == 6) Console.WriteLine("Программа завершена...");
else Console.WriteLine("Введите корректное значение!");
Console.WriteLine();
Console.WriteLine();
}
}
Пример реализации меню.
Автор — неизвестен
+141
typedef INTEGER int
typedef BOOLEAN bool
#define TRUE true
#define FALSE false
#define BEGIN {
#define END }
#define WHILE(a) while(a)
#define REPEAT do{
#define UNTIL(a) }while(!(a))
#define FOR for(
#define TO(a,b) ,a<b
#define DO(a) ,a++)
#define VAR
#define IF if
#define THEN
...
VAR
INTEGER I;
BEGIN
I=2;
REPEAT
...
I=I+1;
UNTIL I<5;
...
END
...
Что этот парень пытался сделать с Си? O_o
+122.4
/* sent by Stephan Hughson - 2003 */
/* must be compiled with cc or g++*/
#include <stdio.h>
int main(int t,int _,char*a)
{return!0<t?t<3?main(-79,-13,a+main(-87,1-_,
main(-86, 0, a+1 )+a)):1,t<_?main(t+1, _, a ):3,main ( -94, -27+t, a
)&&t == 2 ?_<13 ?main ( 2, _+1, "%s %d %d\n" ):9:16:t<0?t<-72?main(_,
t,"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l,+,/n{n+\
,/+#n+,/#;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l q#'+d'K#!/\
+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# ){n\
l]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#\
n'wk nw' iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c \
;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;\
#'rdq#w! nr'/ ') }+}{rl#'{n' ')# }'+}##(!!/")
:t<-50?_==*a ?putchar(a[31]):main(-65,_,a+1):main((*a == '/')+t,_,a\
+1 ):0<t?main ( 2, 2 , "%s"):*a=='/'||main(0,main(-61,*a, "!ek;dc \
i@bK'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);}
Вот результат работы программы(всё не вместилось):
On the first day of Christmas my true love gave to me
a partridge in a pear tree.
On the second day of Christmas my true love gave to me
two turtle doves
and a partridge in a pear tree.
...
On the eighth day of Christmas my true love gave to me
eight maids a-milking, seven swans a-swimming,
six geese a-laying, five gold rings;
four calling birds, three french hens, two turtle doves
and a partridge in a pear tree.
On the ninth day of Christmas my true love gave to me
nine ladies dancing, eight maids a-milking, seven swans a-swimming,
six geese a-laying, five gold rings;
four calling birds, three french hens, two turtle doves
and a partridge in a pear tree.
On the tenth day of Christmas my true love gave to me
ten lords a-leaping,
nine ladies dancing, eight maids a-milking, seven swans a-swimming,
six geese a-laying, five gold rings;
four calling birds, three french hens, two turtle doves
and a partridge in a pear tree.
On the eleventh day of Christmas my true love gave to me
eleven pipers piping, ten lords a-leaping,
nine ladies dancing, eight maids a-milking, seven swans a-swimming,
six geese a-laying, five gold rings;
four calling birds, three french hens, two turtle doves
and a partridge in a pear tree.
On the twelfth day of Christmas my true love gave to me
twelve drummers drumming, eleven pipers piping, ten lords a-leaping,
nine ladies dancing, eight maids a-milking, seven swans a-swimming,
six geese a-laying, five gold rings;
four calling birds, three french hens, two turtle doves
and a partridge in a pear tree.
+84
char* c=a;
char* d=b;
while(*(c++)=*(d++));
Кажется страус труп предложил. Копирование из буфера PChar b в буфер PChar a.