1. Список говнокодов пользователя ilsy

    Всего: 3

  2. Java / Говнокод #18310

    +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
    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
    69. 69
    // Насладитесь
            final String[] array_spinner_drinks = new String[20];
            array_spinner_drinks[0] = "1";
            array_spinner_drinks[1] = "2";
            array_spinner_drinks[2] = "3";
            array_spinner_drinks[3] = "4";
            array_spinner_drinks[4] = "5";
            array_spinner_drinks[5] = "6";
            array_spinner_drinks[6] = "7";
            array_spinner_drinks[7] = "8";
            array_spinner_drinks[8] = "9";
            array_spinner_drinks[9] = "10";
            array_spinner_drinks[10] = "11";
            array_spinner_drinks[11] = "12";
            array_spinner_drinks[12] = "13";
            array_spinner_drinks[13] = "14";
            array_spinner_drinks[14] = "15";
            array_spinner_drinks[15] = "16";
            array_spinner_drinks[16] = "17";
            array_spinner_drinks[17] = "18";
            array_spinner_drinks[18] = "19";
            array_spinner_drinks[19] = "20";
            spinner_drinks = (Spinner) findViewById(R.id.spinner_drinks);
            final ArrayAdapter<String> adapter_drinks = new ArrayAdapter<>(this,
                                                                           android.R.layout.simple_spinner_item,
                                                                           array_spinner_drinks);
            spinner_drinks.setAdapter(adapter_drinks);
    
            // load weight spinner with array
            final String[] array_spinner_weight = new String[34];
            array_spinner_weight[0] = "70";
            array_spinner_weight[1] = "80";
            array_spinner_weight[2] = "90";
            array_spinner_weight[3] = "100";
            array_spinner_weight[4] = "110";
            array_spinner_weight[5] = "120";
            array_spinner_weight[6] = "130";
            array_spinner_weight[7] = "140";
            array_spinner_weight[8] = "150";
            array_spinner_weight[9] = "160";
            array_spinner_weight[10] = "170";
            array_spinner_weight[11] = "180";
            array_spinner_weight[12] = "190";
            array_spinner_weight[13] = "200";
            array_spinner_weight[14] = "210";
            array_spinner_weight[15] = "220";
            array_spinner_weight[16] = "230";
            array_spinner_weight[17] = "240";
            array_spinner_weight[18] = "250";
            array_spinner_weight[19] = "260";
            array_spinner_weight[20] = "270";
            array_spinner_weight[21] = "280";
            array_spinner_weight[22] = "290";
            array_spinner_weight[23] = "300";
            array_spinner_weight[24] = "310";
            array_spinner_weight[25] = "320";
            array_spinner_weight[26] = "330";
            array_spinner_weight[27] = "340";
            array_spinner_weight[28] = "350";
            array_spinner_weight[29] = "360";
            array_spinner_weight[30] = "370";
            array_spinner_weight[31] = "380";
            array_spinner_weight[32] = "390";
            array_spinner_weight[33] = "400";
            spinner_weight = (Spinner) findViewById(R.id.spinner_weight);
            final ArrayAdapter<String> adapter_weight = new ArrayAdapter(this,
                                                                         android.R.layout.simple_spinner_item,
                                                                         array_spinner_weight);
            spinner_weight.setAdapter(adapter_weight);

    Я у мамы программист

    ilsy, 10 Июня 2015

    Комментарии (1)
  3. Java / Говнокод #18302

    +142

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    File f = new File(Environment.getExternalStorageDirectory().toString());
                    for (File temp : f.listFiles()) {
                        if (temp.getName().equals("temp.jpg")) {
                            f = temp;
                            break;
                        }
                    }

    Мне больно

    ilsy, 09 Июня 2015

    Комментарии (0)
  4. Java / Говнокод #16363

    +76

    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
    private void setLock(boolean lock) {
            if (lock) {
                view1.setEnabled(false);
                view2.setEnabled(false);
                view3.setEnabled(false);
                view4.setEnabled(false);
                view5.setEnabled(false);
                view6.setEnabled(false);
            } else {
                view1.setEnabled(true);
                view2.setEnabled(true);
                view3.setEnabled(true);
                view4.setEnabled(true);
                view5.setEnabled(true);
                view6.setEnabled(true);
            }
        }

    Copy & Paste наше всё.
    P.S. Названия переменных изменены, не пугайтесь.

    ilsy, 17 Июля 2014

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