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

    В номинации:
    За время:
  2. Perl / Говнокод #25530

    +1

    1. 1
    http://pragmaticperl.com/issues/26/pragmaticperl-26-грамматики-в-perl-6.html

    :3
    Где еще такое может быть то?

    OlegUP, 10 Апреля 2019

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

    0

    1. 1
    if (true === false)

    не ну шоб наверняка

    quentiam, 08 Апреля 2019

    Комментарии (10)
  4. Куча / Говнокод #25462

    +1

    1. 1
    2. 2
    3. 3
    Страйкер приде — почту почине!
    
    Грустно без уведомлений из любимой соцсети.

    gost, 21 Марта 2019

    Комментарии (10)
  5. Куча / Говнокод #25453

    +1

    1. 1
    https://code.jsoftware.com/wiki/Jd/Guide

    > A db is a folder with a folder for each table. Each table folder has a folder for each column. Each folder has a few metadata files (prefix jd).

    Я знаю, что базы данных обычно хранятся в файлах. А зачем хранить их как здесь, в котологах и файлах? Мы же получаем в базе ограничения и баги файловой системы (типа https://code.jsoftware.com/wiki/Jd/Ops_common#names), а если хотим переносимости, то нескольких ФС.

    BEKTOPHblu_nETyX, 18 Марта 2019

    Комментарии (10)
  6. JavaScript / Говнокод #25412

    0

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    var text_message = "";	
    text_message += "\n Вопрос №1: " + $('input[name=question_0]:checked').parent().parent().parent().find(".title").text() + " Ответ: " + $('input[name=question_0]:checked').val();
    text_message += "\n Вопрос №2: " + $('input[name=question_1]:checked').parent().parent().parent().find(".title").text() + " Ответ: " + $('input[name=question_1]:checked').val();
    text_message += "\n Вопрос №3: " + $('input[name=question_2]:checked').parent().parent().parent().find(".title").text() + " Ответ: " + $('input[name=question_2]:checked').val();
    text_message += "\n Вопрос №4: " + $('input[name=question_3]:checked').parent().parent().parent().find(".title").text() + " Ответ: " + $('input[name=question_3]:checked').val();
    text_message += "\n Вопрос №5: " + $('input[name=question_4]:checked').parent().parent().parent().find(".title").text() + " Ответ: " + $('input[name=question_4]:checked').val();
    text_message += "\n Вопрос №6: " + $('input[name=question_5]:checked').parent().parent().parent().find(".title").text() + " Ответ: " + $('input[name=question_5]:checked').val();

    ууууиииииии

    ishurgaya, 26 Февраля 2019

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

    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
    public function passes($attribute, $hostname)
        {
            if (!mb_stripos($hostname, '.')) {
                return false;
            }
    
            $domain = explode('.', $hostname);
            $allowedChars = ['-'];
            $extenion = array_pop($domain);
    
            foreach ($domain as $value) {
                $fc = mb_substr($value, 0, 1);
                $lc = mb_substr($value, -1);
    
                if (
                    hash_equals($value, '')
                    || in_array($fc, $allowedChars)
                    || in_array($lc, $allowedChars)
                ) {
                    return false;
                }
    
                if (!ctype_alnum(str_replace($allowedChars, '', $value))) {
                    return false;
                }
            }
    
            if (
                !ctype_alnum(str_replace($allowedChars, '', $extenion))
                || hash_equals($extenion, '')
            ) {
                return false;
            }
    
            if (filter_var($hostname, FILTER_VALIDATE_DOMAIN) === false) {
                return false;
            }
    
            return true;
        }

    валидация домена...

    websbkinfo, 09 Февраля 2019

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

    +1

    1. 1
    https://imgur.com/a/IgqXRK7

    BelCodeMonkey, 13 Декабря 2018

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

    −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
    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
    $type = ($_POST['type'] == 'any') ? '' : str_replace(' ', '%20', str_replace('|','%7C', $_POST['type']));
    $make = ($_POST['make'] == 'any') ? '' : str_replace(' ', '%20', str_replace('|','%7C', $_POST['make']));
    $url = 'http://www.cycletrader.com/search-results?sort=featured%3Aasc&page='.$_POST['page'].'&type='.$type.'&make='.$make;
    $str = getCurlObject($url);
    $content = multiexplode('<div id="searchPage"', '<div class="footer', $str);
    $list = multiexplode('<div id="gridView"', '<div class="rezDetailsBtm', $content);
    $field = explode('<div data-url=', $list);
    for ($k = 1; $k < count($field); $k++) {
        $title_tmp = multiexplode('<a class="listing-info-title', '</a>', $field[$k]);
        $title = multiexplode('title="', '"', $title_tmp);
        $link = $lang['dir'].'detail?'.$_POST['form'].'&'.multiexplode('href="', '"', $title_tmp);
        $img_tmp = multiexplode('<img', '/>', $field[$k]);
        $img = multiexplode('data-src="', '"', $img_tmp);
        $price_tmp = multiexplode('class="price', '</span>', $field[$k]);
        if (strripos($price_tmp,'<span class="mileage">')) {
            $price = multiexplode('<span>', '<span', $price_tmp);
        } else {
            $price = multiexplode('<span>', '</span>', $price_tmp);
        }
        if (trim($price) == 'Call for price') $price = '';
        $result['item'][$k]['link'] = $link;
        $result['item'][$k]['title'] = $title;
        $result['item'][$k]['img'] = $img;
        $result['item'][$k]['price'] = $price;
        $result['item'][$k]['location'] = $location;
    }
    
    if (strripos($content,'<div class="pagination')) {
        $pagination = multiexplode('<div class="pagination', '</div>', $content);
        $pagination_tmp = multiexplode('<span class="hidden-xs','</div>', $pagination);
        $pagination_item = explode('<li', $pagination);
        if (count($pagination_item) > 6) {
            $result['pagination'] = true;
        }
    }

    Стандартный похокод пыходибила.

    хуита, 28 Ноября 2018

    Комментарии (10)
  10. Куча / Говнокод #25067

    −106

    1. 1
    Скрипаль заебал, Хачатурян заебал, Хабиб заебал, Мамаев заебал, Кокорин заебал, Цеповяз остоёб.

    Wrotberry, 09 Ноября 2018

    Комментарии (10)
  11. Pascal / Говнокод #25038

    +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
    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
    unit ZwDeleteFileSample;
    
    interface
    
    uses Windows, nt_status, native, hal, fcall, macros, ntoskrnl;
    
    function _DriverEntry(DriverObject: PDriverObject; RegistryPath: PUnicodeString): NTSTATUS; stdcall;
    
    implementation
    
    procedure DriverUnload(pDriverObject: PDriverObject); stdcall;
    begin
      DbgPrint('Test Driver :: Unloaded');
    end;
    
    function _DriverEntry(DriverObject: PDriverObject; RegistryPath: PUnicodeString): NTSTATUS; stdcall;
    var UNICODESTRING: UNICODE_STRING;
      obj: OBJECT_ATTRIBUTES;
    
    begin
    
      DbgPrint('Test Driver :: Loaded');
      DriverObject^.DriverUnload := @DriverUnload;
    
      RtlInitUnicodeString(UNICODESTRING, '\??\C:\test.exe');
      InitializeObjectAttributes(obj, @UNICODESTRING, OBJ_CASE_INSENSITIVE + OBJ_KERNEL_HANDLE, 0, nil);
      Result := ZwDeleteFile(@obj);
    
      if Result = STATUS_SUCCESS then
      begin
        DbgPrint('File deleted sucessfully - Result:0x%.8X', Result); // Result to get Error Code
      end else
      begin
        DbgPrint('Fail to delete file - Result:0x%.8X', Result); // Result to get Error Code
        DbgPrint('Object name :%wZ',  obj.ObjectName); // Result to get Error Code
      end;
      Result := STATUS_SUCCESS;
    
    end;
    
    end.

    Драйвер на дэлфи. Ничего необычного, листайте дальше.

    blackray, 29 Октября 2018

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