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

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

    0

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    > Improved People Nearby
    Profile videos make meeting new people a dozen times more interesting, and we've beefed up the People Nearby section for the occasion.
    
    When people contact you via the People Nearby section, you will see how far away they are. And when you start a chat with someone nearby, 
    Telegram will suggest a greeting sticker to break the ice. Luckily, all our stickers are extroverts.

    самый секьюрный мессенджер теперь палит еще и локацию юзеров
    теперь это у нас тиндер такой

    https://telegram.org/blog/profile-videos-people-nearby-and-more
    https://telegram.org/blog/new-profiles-people-nearby

    Fike, 28 Июля 2020

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

    0

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    https://habr.com/ru/post/454354/
    
    > я на данный момент только выпустился из 11-го 
    > На мой взгляд у меня имеется неплохое резюме с кучей ачивок и хороший скилл,
       который я день за днем совершенствую последние 8-9 лет.

    Какой скилл )))
    Помню свой 11 класс, где я понятия не имел что такое погромирование.

    AHCKuJlbHblu_nemyx, 01 Июня 2019

    Комментарии (237)
  4. C++ / Говнокод #12453

    +21

    1. 1
    angle_in_radians = acos(dot(normalize(o-a), normalize(o-b)));

    Векторы такие сложные, а операции с ними так трудно запомнить, что даже игроделы не могут это сделать.

    TarasB, 20 Января 2013

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

    0

    1. 1
    Электрика / электроника #8

    #1: https://govnokod.ru/25437 https://govnokod.xyz/_25437
    #2: https://govnokod.ru/25820 https://govnokod.xyz/_25820
    #3: https://govnokod.ru/26570 https://govnokod.xyz/_26570
    #4: https://govnokod.ru/27622 https://govnokod.xyz/_27622
    #5: https://govnokod.ru/27741 https://govnokod.xyz/_27741
    #6: https://govnokod.ru/28191 https://govnokod.xyz/_28191
    #7: https://govnokod.ru/28630 https://govnokod.xyz/_28630

    nepeKamHblu_nemyx, 26 Июня 2023

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

    −1

    1. 1
    Минск #5

    #1: https://govnokod.ru/25937 https://govnokod.xyz/_25937
    #2: https://govnokod.ru/26458 https://govnokod.xyz/_26458
    #3: https://govnokod.ru/27233 https://govnokod.xyz/_27233
    #4: https://govnokod.ru/27448 https://govnokod.xyz/_27448

    3_dar, 30 Мая 2022

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

    −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
    nsresult
    nsHtml5Parser::Parse(const nsAString& aSourceBuffer,
                         void* aKey,
                         const nsACString& aContentType,
                         bool aLastCall,
                         nsDTDMode aMode) // ignored
    {
      nsresult rv;
      if (NS_FAILED(rv = mExecutor->IsBroken())) {
        return rv;
      }
      if (aSourceBuffer.Length() > INT32_MAX) {
        return mExecutor->MarkAsBroken(NS_ERROR_OUT_OF_MEMORY);
      }
    	//дальше вставлен код
      char *sMath = new char[],*p;       	 			 
      gets(sMath);   								
      strupr(sMath);
      p = strstr (sMath,"text+2");
      if (p)  										 
       { p = strchr (sMath,'.');
         if (p) 				
         strcat (sMath,"text+2");
       }   					
      delete [] sMath;

    Доброго времени всем.
    нашел код поиска и замены символов в строке. ставлю в исходник. компилятор пропускает , но в самом финале зависает насмерть. Уже вроде бы все:
    EXE header size: 62464 / 37888 bytes
    139:39.45 Install code: 169642 / 169638 bytes
    139:39.45 Install data: 173316 / 173324 bytes
    139:39.45 Uninstall code+data: 460087 / 460079 bytes
    139:39.45 CRC (0xB7F63C0E): 4 / 4 bytes
    139:39.45
    139:39.45 Total size: 865513 / 840933 bytes (102.9%)
    последняя строчка: 140:48.58 Packaging [email protected]:51.45 207 compiler warnings present.
    уже полдня висит, а финал не выдает:
    247:11.23 We know it took a while, but your build finally finished successfully!
    To view resource usage of the build, run |mach resource-usage|.
    To take your build for a test drive, run: |mach run|
    For more information on what to do now, see https://developer.mozilla.org/docs/Developer_Guide/So_You_Just_Built_Firefox

    DrAli, 23 Ноября 2018

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

    +974

    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
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    /*Вариант - вручную*/
    #include <iostream>
    #include <map>
    #include <string>
    #include <utility>
    
    int main(int argc, char* argv[]) {
      std::map<std::string, std::pair<int, int> > files;
      files["0.txt"] = std::make_pair(0, 7);
      files["1.txt"] = std::make_pair(8, 41);
      files["2.txt"] = std::make_pair(42, 50);
      std::map<std::string, std::pair<int, int> >::const_iterator begin = files.begin();
      std::map<std::string, std::pair<int, int> >::const_iterator end = files.end();
      int num = 21;
      for (; begin != end; ++begin) {
        if (num >= (*begin).second.first && num <= (*begin).second.second) {
          std::cout << "Found in " + (*begin).first + "\n";
          break;
        }
      }
      return 0;
    }
    
    /*Вариант - STL+BOOST*/
    #include <algorithm>
    #include <functional>
    #include <iostream>
    #include <map>
    #include <string>
    #include <utility>
    
    #include <boost/bind.hpp>
    
    int main(int argc, char* argv[]) {
      typedef std::map<std::string, std::pair<int, int> > map_type;
      map_type files;
      files["0.txt"] = std::make_pair(0, 7);
      files["1.txt"] = std::make_pair(8, 41);
      files["2.txt"] = std::make_pair(42, 50);
      int num = 21;
      map_type::const_iterator elem;
      elem = std::find_if(
                          files.begin(),
                          files.end(),
                          boost::bind(
                                      std::logical_and<bool>(),
                                      boost::bind(
                                                  std::less_equal<int>(),
                                                  boost::bind(
                                                              &map_type::value_type::second_type::first,
                                                              boost::bind(
                                                                          &map_type::value_type::second,
                                                                          _1)
                                                              ),
                                                  num),
                                      boost::bind(
                                                  std::greater_equal<int>(),
                                                  boost::bind(
                                                              &map_type::value_type::second_type::second,
                                                              boost::bind(
                                                                          &map_type::value_type::second,
                                                                          _1)
                                                              ),
                                                  num)));
      if (elem != files.end())
        std::cout << "Found in " + (*elem).first + "\n";
      return 0;
    }

    Смысл в том, чтобы с данным значением(пример 21) пройтись по таблице и найти в каком элементе данное число(21) находится в диапазоне std::pair<int, int>...
    Сначала написал вручную, но т.к. нужно было сделать с помощью STL, получилось сие чудо.

    rudvil, 13 Мая 2010

    Комментарии (236)
  9. C++ / Говнокод #27317

    +1

    1. 1
    pubimbue, ate и ios

    давайте ржать над крестостримами

    booratihno, 25 Марта 2021

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

    +101

    1. 1
    2. 2
    это не говно код это говно сайт 
    http://youex.ru

    Vasiliy, 03 Сентября 2010

    Комментарии (235)
  11. bash / Говнокод #27767

    −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
    #!/bin/bash
    
    status=$(xinput list-props 11 | grep 'Device Enabled' | tail -c 2 | tr -d '\n')
    
    echo "Current TB status: $status"
    
    if [[ $status = "0" ]]
    then
        xinput enable 11
        echo "Enabled touchpad!"
    else
        xinput disable 11
        echo "Disabled touchpad!"
    fi

    Как вам мой скриптик?

    JloJle4Ka, 25 Октября 2021

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