1. PHP / Говнокод #1282

    +144

    1. 1
    2. 2
    3. 3
    // функция для возвращения всякой хрени
    function hren($table, $id)
    {

    guest, 29 Июня 2009

    Комментарии (0)
  2. PHP / Говнокод #1281

    +196.4

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    <?$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>'
    	);?>

    без комментариев

    guest, 29 Июня 2009

    Комментарии (2)
  3. PHP / Говнокод #1280

    +142.3

    1. 1
    "x_address"			=> $postData['address1']. trim( ' ' . $postData['address2']),

    гениально =)

    guest, 29 Июня 2009

    Комментарии (3)
  4. Си / Говнокод #1279

    +144

    1. 1
    duff device

    Сами знаете код.
    Остальное из классики вроде #define TRUE FALSE и оператора передёргивания уже тут было.

    guest, 28 Июня 2009

    Комментарии (0)
  5. Assembler / Говнокод #1278

    +170.2

    1. 1
    2. 2
    3. 3
    mov eax, pony
    jnz pony
    jmp magiccastle

    Поне!

    Din, 28 Июня 2009

    Комментарии (66)
  6. PHP / Говнокод #1277

    +153

    1. 1
    break; break; break; // PLEASE, BREAK!!!!!!

    guest, 28 Июня 2009

    Комментарии (3)
  7. C# / Говнокод #1276

    +144

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    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();  
                }
    
           }

    Пример реализации меню.
    Автор — неизвестен

    guest, 28 Июня 2009

    Комментарии (4)
  8. Си / Говнокод #1275

    +141

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    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

    guest, 28 Июня 2009

    Комментарии (21)
  9. Си / Говнокод #1274

    +122.4

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    /* 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.

    guest, 28 Июня 2009

    Комментарии (36)
  10. C++ / Говнокод #1273

    +84

    1. 1
    2. 2
    3. 3
    char* c=a;
    char* d=b;
    while(*(c++)=*(d++));

    Кажется страус труп предложил. Копирование из буфера PChar b в буфер PChar a.

    guest, 28 Июня 2009

    Комментарии (8)