1. PHP / Говнокод #10336

    +89

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    <?php
    /* Посоветовали делать так, чтобы решить проблемы с выводом на страницу чисел. Всё зависло */
    $x=0;
    echo "Пожалуйста, подождите 1 минуту. Сейчас напечатаем";
    while ($x++) echo $x."_";
    ?>

    Хм... Что-то тут не так.

    a_e, 21 Мая 2012

    Комментарии (17)
  2. Objective C / Говнокод #10334

    −97

    1. 1
    2. 2
    3. 3
    4. 4
    -(int)randomNumber
    {
        return (arc4random() % 5001) + 5000; //Generates Number from 1 to 100.
    }

    Индусы получают числа от 1 до 100 О_О

    SwinX, 21 Мая 2012

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

    −28

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    template<typename T, int $1, int _2> struct Matrix
    {
        ...
        Vector<T, _2> vectors[$1];
    };

    HaskellGovno, 21 Мая 2012

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

    +96

    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
    private void textBox10_TextChanged(object sender, EventArgs e)
            {
            }
            private void button3_Click(object sender, EventArgs e)
            {
                textfactorname1.Text = "";
                textfactorname2.Text = "";
                textfactorname3.Text = "";
                textfactorname4.Text = "";
                textfactorname5.Text = "";
                textfactorname6.Text = "";
                textfactorname7.Text = "";
                textfactorname8.Text = "";
                textfactorname9.Text = "";
                ...
               
                checkBox9.Checked = false;
                checkBox10.Checked = false;
            }
            private void button2_Click_1(object sender, EventArgs e)
            {
                int n;
                try
                {
                    n = Convert.ToInt32(textItera.Text);
                }
                catch
                {
                    n = 1;
                }
                string results;
                double[] NPVarray = new double[n];
                double[] NPVsquares = new double[n];
                double NPVmax,NPVmin,NPVmid,disp,standdev,CV,zeropoint,pxy,xxx,yyy;
                int lessthanzero, morethanxxx, lessthanyyy;
                try
                {
                    for (int i = 0; i < n; i++)
                    {
                        string factorname1;
                       ...
                        string factorname10;
                        double fixedvalue1;
                       ...
                        double fixedvalue10;
                        double midvalue1;
                        ...
                        double midvalue10;
                        double minvalue1;
                        ...
                        double minvalue10;
                        double maxvalue1;
                        ...
                        double maxvalue10;
                        string varname1;
                       ...
                        string varname10;
                        if (textfactorname1.Text == "")
                        {
                            factorname1 = "What a fuck?";
                        }
                        else
                        {
                            factorname1 = textfactorname1.Text;
                        }
                        if (textfactorname2.Text == "")
                        {
                            factorname2 = "What a fuck?";
                        }

    Вот так вот. Лимит в 100 строк не позаоляет показать все прелести.

    tarabo, 20 Мая 2012

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

    +124

    1. 1
    f = (((.) flip) . (((flip (.)) flip) . ((.) . (.))))

    Для тех кто не смог догадаться это {spoiler} f x1 x2 x3 x4 = x1 (x2 x3 x4) {/spoiler}

    HaskellGovno, 20 Мая 2012

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

    +119

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    s f g x = f x (g x)
    k x y   = x
    b f g x = f (g x)
    c f g x = f x g
    y f     = f (y f)
    cond p f g x = if p x then f x else g x
    fac  = y (b (cond ((==) 0) (k 1)) (b (s (*)) (c b pred)))

    HaskellGovno, 20 Мая 2012

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

    +116

    1. 1
    append x = foldr (map (:) x) id

    HaskellGovno, 20 Мая 2012

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

    +119

    1. 1
    2. 2
    import Control.Monad.Reader
    head >>= (:)

    HaskellGovno, 20 Мая 2012

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

    +119

    1. 1
    foldr ((.) . (:)) id

    HaskellGovno, 20 Мая 2012

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

    +147

    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
    <br><br><br><br>
    
             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    
             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    
             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    
             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    
             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    
             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    
             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    
             <a style="color:red; font-type:bold;" href="recipes.html">Рецепты хлеба</a>&nbsp;&nbsp;&nbsp;
    
             <a style="color:red;" href="vipechka.html">Выпечка хлеба</a>&nbsp;&nbsp;&nbsp;
    
             <a style="color:red;" href="combinates_msk.html">Хлебозаводы Москвы</a>&nbsp;&nbsp;&nbsp;
    
             <a style="color:red;" href="faq.php">Вопрос эксперту</a>&nbsp;&nbsp;&nbsp;
    
             <a style="color:red;" href="press.php">Хлебные новости</a>
    
    
    
             </div>

    Не знал куда выложить, запостил сюда. Нувыпоняли...

    ibrain, 19 Мая 2012

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