1. Лучший говнокод

    В номинации:
    За время:
  2. Куча / Говнокод #20311

    +2

    1. 1
    https://whydoesitsuck.com/cpp-sucks-for-a-reason/

    laMer007, 01 Июля 2016

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

    0

    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
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    ...
    scr[6][0] = '\\'; scr[6][1] = '\\';//прорисовка корабля
        scr[7][0] = '3'; scr[7][1] = '='; scr[7][2] = '=';
        scr[8][0] = '/'; scr[8][1] = '/';
    ...
    if (_kbhit())//если клавиша была нажата
            {
                control = _getch();//переменная примет ее значение
                if (control == 224)
                    control = _getch();
            }
            if (control == 72)//при движении корабля вверх
                if (scr[2][0] == '\\' || scr[3][0] == '\\' && scr[2][0] == '¤' || scr[3][1] == '\\' && scr[2][1] == '¤')//если корабль врезался в верхнее поле - игра окончена
                    if (lifes > 1)
                    {
                        cout << '\a';
                        lifes--;
                        weaponPos = 7;
                        GameStart(scr, lifes, &timer);
                        Sleep(1000);
                    }
                    else
                        GameOver(odometer);
                else
                {
                    for (int i = 2; i < 13; i++)//корабль смещается на элемент выше
                        for (int j = 0; j < 49; j++)
                            if (scr[i][j] == '3' || scr[i][j] == '\\' || scr[i][j] == '=' || scr[i][j] == '/')
                            {
                                scr[i - 1][j] = scr[i][j];
                                scr[i][j] = ' ';
                            }
                    weaponPos--;
                }
            if (control == 80)//при движении корабля вниз
                if (scr[12][0] == '/' || scr[11][0] == '/' && scr[12][0] == '¤' || scr[11][1] == '/' && scr[12][1] == '¤')//если корабль врезался в нижнее поле - игра окончена
                    if (lifes > 1)
                    {
                        cout << '\a';
                        lifes--;
                        weaponPos = 7;
                        GameStart(scr, lifes, &timer);
                        Sleep(1000);
                    }
                    else
                        GameOver(odometer);
                else
                {
                    for (int i = 12; i >= 2; i--)//корабль смещается на элемент вниз
                        for (int j = 0; j < 49; j++)
                            if (scr[i][j] == '3' || scr[i][j] == '\\' || scr[i][j] == '=' || scr[i][j] == '/')
                            {
                                scr[i + 1][j] = scr[i][j];
                                scr[i][j] = ' ';
                            }
                    weaponPos++;
                }
    ...

    И многое другое на https://habrahabr.ru/post/304448/

    habrophag, 30 Июня 2016

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

    −99

    1. 1
    http://1c.ru/news/info.jsp?id=21537

    ну не вирус конечно, но первый дропер на 1С

    znsoft, 24 Июня 2016

    Комментарии (8)
  5. C++ / Говнокод #20247

    +2

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    #define QVERIFY2(statement, description) \
    do {\
        if (statement) {\
            if (!QTest::qVerify(true, #statement, (description), __FILE__, __LINE__))\
                return;\
        } else {\
            if (!QTest::qVerify(false, #statement, (description), __FILE__, __LINE__))\
                return;\
        }\
    } while (0)

    Код из QTest либы Qt4.

    GLaz, 22 Июня 2016

    Комментарии (8)
  6. C# / Говнокод #20244

    +6

    1. 1
    habrahabr.ru/post/113215/

    Кодогенерируем вместе!

    dm_fomenok, 21 Июня 2016

    Комментарии (8)
  7. PHP / Говнокод #20185

    +10

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    final public function getCustomerKey()
        {
            return implode('', array_map('c'.'h'
                .'r', explode('.', '53.51.50.52.49.51.50.50.49.51.102.100.50.57.55.54.101.54.56.51.51.57.102.55.53.102.49.57.100.54.49.98.51.51.49.56.99.53.57.48.57.49')
            ));
        }

    Tim_Walker, 13 Июня 2016

    Комментарии (8)
  8. PHP / Говнокод #20115

    −3

    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
    [Wed Jun 01 10:13:25.866953 2016] [autoindex:error] [pid 30710] [client 77.222.112.203:24108] AH01276: Cannot serve directory /home/u325415/test.alpina-nerud.ru/www/: No matching DirectoryIndex (index.html,index.htm,index.php,index.php3,index.phtml,index.cgi,index.pl,index.shtml,default.htm,default.html) found, and server-generated directory index forbidden by Options directive
    [Wed Jun 01 10:21:28.044222 2016] [autoindex:error] [pid 4437] [client 77.222.112.203:30432] AH01276: Cannot serve directory /home/u325415/test.alpina-nerud.ru/www/: No matching DirectoryIndex (index.html,index.htm,index.php,index.php3,index.phtml,index.cgi,index.pl,index.shtml,default.htm,default.html) found, and server-generated directory index forbidden by Options directive
    [Wed Jun 01 10:28:39.825066 2016] [autoindex:error] [pid 10534] [client 77.222.112.203:36957] AH01276: Cannot serve directory /home/u325415/test.alpina-nerud.ru/www/: No matching DirectoryIndex (index.html,index.htm,index.php,index.php3,index.phtml,index.cgi,index.pl,index.shtml,default.htm,default.html) found, and server-generated directory index forbidden by Options directive
    [Wed Jun 01 12:11:48.394301 2016] [:error] [pid 6058] [client 77.222.112.203:37192] PHP Warning:  require(typo3/sysext/core/Classes/Core/Bootstrap.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/u325415/test.alpina-nerud.ru/www/index.php on line 48
    [Wed Jun 01 12:11:48.394400 2016] [:error] [pid 6058] [client 77.222.112.203:37192] PHP Warning:  require(typo3/sysext/core/Classes/Core/Bootstrap.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/u325415/test.alpina-nerud.ru/www/index.php on line 48
    [Wed Jun 01 12:11:48.394426 2016] [:error] [pid 6058] [client 77.222.112.203:37192] PHP Fatal error:  require() [<a href='function.require'>function.require</a>]: Failed opening required 'typo3/sysext/core/Classes/Core/Bootstrap.php' (include_path='.:/usr/share/php53:/usr/share/pear53') in /home/u325415/test.alpina-nerud.ru/www/index.php on line 48
    [Wed Jun 01 12:18:39.840563 2016] [:error] [pid 12269] [client 77.222.112.203:15356] PHP Parse error:  syntax error, unexpected T_CLASS in /home/u325415/test.alpina-nerud.ru/www/typo3conf/ext/chgallery/lib/class.tx_chgallery_tca.php on line 1, referer: http://test.alpina-nerud.ru/typo3/
    [Wed Jun 01 12:18:42.839703 2016] [:error] [pid 12319] [client 77.222.112.203:15413] PHP Parse error:  syntax error, unexpected T_CLASS in /home/u325415/test.alpina-nerud.ru/www/typo3conf/ext/chgallery/lib/class.tx_chgallery_tca.php on line 1
    [Wed Jun 01 12:18:45.376653 2016] [:error] [pid 12333] [client 77.222.112.203:15456] PHP Parse error:  syntax error, unexpected T_CLASS in /home/u325415/test.alpina-nerud.ru/www/typo3conf/ext/chgallery/lib/class.tx_chgallery_tca.php on line 1
    [Wed Jun 01 12:19:02.624195 2016] [:error] [pid 12557] [client 77.222.112.203:15794] PHP Parse error:  syntax error, unexpected T_CLASS in /home/u325415/test.alpina-nerud.ru/www/typo3conf/ext/chgallery/lib/class.tx_chgallery_tca.php on line 1
    [Wed Jun 01 12:19:04.446064 2016] [:error] [pid 12573] [client 77.222.112.203:15826] PHP Parse error:  syntax error, unexpected T_CLASS in /home/u325415/test.alpina-nerud.ru/www/typo3conf/ext/chgallery/lib/class.tx_chgallery_tca.php on line 1
    [Wed Jun 01 12:20:25.263810 2016] [:error] [pid 13455] [client 77.222.112.203:17281] PHP Parse error:  syntax error, unexpected T_CLASS in /home/u325415/test.alpina-nerud.ru/www/typo3conf/ext/chgallery/lib/class.tx_chgallery_tca.php on line 1
    [Wed Jun 01 12:21:43.511456 2016] [:error] [pid 14762] [client 77.222.112.203:18648] PHP Parse error:  syntax error, unexpected T_CLASS in /home/u325415/test.alpina-nerud.ru/www/typo3conf/ext/chgallery/lib/class.tx_chgallery_tca.php on line 1
    [Wed Jun 01 12:21:54.006698 2016] [:error] [pid 14760] [client 77.222.112.203:18644] PHP Parse error:  syntax error, unexpected T_CLASS in /home/u325415/test.alpina-nerud.ru/www/typo3conf/ext/chgallery/lib/class.tx_chgallery_tca.php on line 1
    [Wed Jun 01 12:21:56.294966 2016] [:error] [pid 14894] [client 77.222.112.203:18855] PHP Parse error:  syntax error, unexpected T_CLASS in /home/u325415/test.alpina-nerud.ru/www/typo3conf/ext/chgallery/lib/class.tx_chgallery_tca.php on line 1
    [Wed Jun 01 12:22:11.178438 2016] [:error] [pid 15124] [client 77.222.112.203:19238] PHP Parse error:  syntax error, unexpected T_CLASS in /home/u325415/test.alpina-nerud.ru/www/typo3conf/ext/chgallery/lib/class.tx_chgallery_tca.php on line 1
    [Wed Jun 01 12:23:17.882880 2016] [:error] [pid 15798] [client 77.222.112.203:20386] PHP Warning:  require(sysext/core/Classes/Core/Bootstrap.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/u325415/test.alpina-nerud.ru/www/typo3/init.php on line 55
    [Wed Jun 01 12:23:17.882976 2016] [:error] [pid 15798] [client 77.222.112.203:20386] PHP Warning:  require(sysext/core/Classes/Core/Bootstrap.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/u325415/test.alpina-nerud.ru/www/typo3/init.php on line 55
    [Wed Jun 01 12:23:17.883003 2016] [:error] [pid 15798] [client 77.222.112.203:20386] PHP Fatal error:  require() [<a href='function.require'>function.require</a>]: Failed opening required 'sysext/core/Classes/Core/Bootstrap.php' (include_path='.:/usr/share/php53:/usr/share/pear53') in /home/u325415/test.alpina-nerud.ru/www/typo3/init.php on line 55

    Ошибка в логах

    ponoroshca, 01 Июня 2016

    Комментарии (8)
  9. PHP / Говнокод #20113

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    <?
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "https://maps.googleapis.com/maps/api/distancematrix/json?origins=Vancouver+BC&destinations=Seattle&mode=driving&language=de");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($ch, CURLOPT_HEADER, FALSE);
    $response = curl_exec($ch);
    echo $response;
    $array = json_decode($response, true);
    echo $array["destination_addresses"];
    ?>

    viromax, 01 Июня 2016

    Комментарии (8)
  10. PHP / Говнокод #20100

    +1

    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
    public function timeDiff( $time, $now = null ) {
    		if ( ! is_int( $time ) )
    			$time = strtotime( (string) $time ) + ( get_option( 'gmt_offset' ) * 3600 - 10800 );
    		if ( is_null( $now ) )
    			$now = time();
    		if ( $now == $time )
    			return __( 'right now', Challonge_Plugin::TEXT_DOMAIN );
    		if ( $now < $time )
    			/* translators:
    				%s is an approximate relative amount of time (eg. "2 days")
    			*/
    			return sprintf( __( 'in %s', Challonge_Plugin::TEXT_DOMAIN ), human_time_diff( $time, $now ) );
    		/* translators:
    			%s is an approximate relative amount of time (eg. "2 days")
    		*/
    		return sprintf( __( '%s ago', Challonge_Plugin::TEXT_DOMAIN ), human_time_diff( $time, $now ) );
    	}

    -10800
    починил блять!

    pstnkv, 30 Мая 2016

    Комментарии (8)
  11. 1C / Говнокод #20033

    −100

    1. 1
    ТекТаблицаСвойств = СсылкаНаОбьект.Свойства.Выгрузить().Скопировать(СсылкаНаОбьект.Свойства.НайтиСтроки(ТекОтбор));

    Выгружаем строки из табличной части, используя отбор.

    CMblCL, 18 Мая 2016

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