1. Java / Говнокод #25356

    +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
    @Override
    public String toString() {
        return "IndexData{" +
                "id='" + id + '\'' +
                ", regNum='" + regNum + '\'' +
                ", docType='" + docType + '\'' +
                ", customerOrg='" + customerOrg + '\'' +
                ", ownerOrg='" + ownerOrg + '\'' +
                ", responsibleOrg='" + responsibleOrg + '\'' +
                ", publishOrg='" + publishOrg + '\'' +
                ", path='" + path + '\'' +
                ", zipName='" + zipName + '\'' +
                ", xmlName='" + xmlName + '\'' +
                ", fileDate=" + fileDate +
                ", publishDate='" + publishDate + '\'' +
                ", info=" + info +
                '}';
    }

    сериализация в json

    vistefan, 04 Февраля 2019

    Комментарии (185)
  2. JavaScript / Говнокод #25355

    +1

    1. 1
    let container = parentId ? $(document.querySelector(`.js-childrens-${this.dictionaryName}${this.guid}-${parentId}`)) : this.rowsContainer;

    2019-й год...

    webviewer, 04 Февраля 2019

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

    −3

    1. 1
    $i = 1 + ($data->page - 1) * 200;

    Инициализация переменной в одном из шаблонов рендеринга страницы.

    icamys, 03 Февраля 2019

    Комментарии (42)
  4. PHP / Говнокод #25353

    0

    1. 1
    2. 2
    Обнаружен критический баг в "PHP":
    https://habr.com/ru/post/416573/

    Полный список лулзов:
    https://habr.com/ru/post/438582/

    guestinxo, 03 Февраля 2019

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

    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
    // If Purchasing has been initialized ...
                if (IsInitialized())
                {
                    if (...)
                    {
    
                    }
                    // Otherwise ...
                    else
                    {
    
                    }
                }
                // Otherwise ...
                else
                {
    
                }

    Код, который в плагине Unity совершает покупку.
    О эти полезнейшие комментарии

    Kola, 03 Февраля 2019

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

    0

    1. 1
    2. 2
    $(document.getElementById("badgeEndDay")).add("background-badge");
    $("#badgeEndDay span").css("color", #f5f5f5");

    Типичный говнокод, который штампуют js макаки, набраные по рекомендации друзей шефа.

    Lorip1971, 02 Февраля 2019

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

    −1

    1. 1
    # -- coding: cp866 --

    https://github.com/h4ckzard/wpseyes/blob/master/Windows/wpseyes.py
    В чём это писалось???

    syoma, 02 Февраля 2019

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

    −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
    #include <stdio.h>
    #include <stdlib.h>
    #include <inttypes.h>
    
    int main(void)
    {
      char a[8], b[8];
      char *a_ptr = a+8;
      char *b_ptr = b;
      printf("a_ptr = %p, b_ptr = %p\n", a_ptr, b_ptr);
      if (a_ptr != b_ptr)
      {
        printf("a_ptr != b_ptr\n");
      }
      else
      {
        printf("a_ptr == b_ptr\n");
      }
      
      
      if ((uintptr_t)a_ptr != (uintptr_t)b_ptr)
      {
        printf("(uintptr_t)a_ptr != (uintptr_t)b_ptr\n");
      }
      else
      {
        printf("(uintptr_t)a_ptr == (uintptr_t)b_ptr\n");
      }
      return EXIT_SUCCESS;
    }

    Что по-вашему тут происходит?

    j123123, 02 Февраля 2019

    Комментарии (39)
  9. Java / Говнокод #25348

    +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
    when {
                    (defaultCurrency != null) -> {
                        when {
                            (currenciesList == null) -> {
                                currenciesList = mutableListOf(defaultCurrency)
                            }
                            (currenciesList?.isEmpty() == true) -> {
                                currenciesList?.add(defaultCurrency)
                            }
                            else -> {
                                if (currenciesList?.contains(defaultCurrency) == false) {
                                    defaultCurrency = currenciesList?.first()
                                }
                            }
                        }
                    }
                    else -> {
                        when {
                            ((currenciesList == null) || (currenciesList?.isEmpty() == true)) -> {
                                throw IllegalArgumentException("Default currency and list of currencies from terminal configuration are empty")
                            }
                            else -> {
                                defaultCurrency = currenciesList?.first()
                            }
                        }
                    }
                }

    Интерн сражается со скобочками.

    peanutwolf, 01 Февраля 2019

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

    −3

    1. 1
    for (i=1; i<=n-k+1; i++) { for (j=k; j<=n+1-i; j++) printf("%d", j); printf("\n"); k++; n++; } }

    Из студенческих лабораторных.
    Что делает - догадайтесь сами =)

    vt244, 01 Февраля 2019

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