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

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

    +4

    1. 1
    <?php echo "$some_var"; ?>

    3_dar, 06 Октября 2015

    Комментарии (11)
  3. JavaScript / Говнокод #18800

    +5

    1. 1
    params['query[accountable_of_' + usersRole.charAt(0).toUpperCase() + usersRole.slice(1) + '_type_super_user_id_eq]'] = vm.superUser.id;

    Пацаны, нормальный же код?

    t540, 02 Октября 2015

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

    +1

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    .selection-href {
      height: inherit !important;
      font-size: 1em !important;
      font-weight: inherit !important;
      box-sizing: inherit !important;
      width: inherit !important;
      text-transform: none !important;
    }

    BeatC, 01 Октября 2015

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

    +5

    1. 1
    <input styles = "display: none"></input>

    Боги вёрстки!

    Super_Oleg, 30 Сентября 2015

    Комментарии (11)
  6. C# / Говнокод #18736

    +2

    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
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    string[] array=new string[10];
    array[0] = "?";
    array[1] = "?";
    array[2] = "?";
    array[3] = "?";
    array[4] = "?";
    array[5] = "?";
    array[6] = "?";
    array[7] = "?";
    array[8] = "?";
    
    ....
    
    if (DS.Tables[0].Rows[i][3].ToString() == "1")
    {
    checkBox20.Checked = true;
    }
    if (DS.Tables[0].Rows[i][4].ToString() == "1")
    {
    checkBox23.Checked = true;
    }
    if (DS.Tables[0].Rows[i][5].ToString() == "1")
    {
    checkBox22.Checked = true;
    }
    if (DS.Tables[0].Rows[i][6].ToString() == "1")
    {
    checkBox25.Checked = true;
    }
    if (DS.Tables[0].Rows[i][7].ToString() == "1")
    {
    checkBox24.Checked = true;
    }
    if (DS.Tables[0].Rows[i][8].ToString() == "1")
    {
    checkBox27.Checked = true;
    }
    if (DS.Tables[0].Rows[i][9].ToString() == "1")
    {
    checkBox11.Checked = true;
    }
    
    ...
    
    if (checkBox17.Checked)
    {
    array[0] = "application/";
    }
    if (checkBox18.Checked)
    {
    array[1] = "audio/";
    }
    if (checkBox21.Checked)
    {
    array[2] = "example/";
    }
    if (checkBox20.Checked)
    {
    array[3] = "image/";
    }
    if (checkBox23.Checked)
    {
    array[4] = "message/";
    }
    if (checkBox22.Checked)
    {
    array[5] = "model/";
    }
    if (checkBox25.Checked)
    {
    array[6] = "multipart/";
    }
    if (checkBox24.Checked)
    {
    array[7] = "text/";
    }
    if (checkBox27.Checked)

    Дали на рецензию одну научную работу...

    sgerman, 18 Сентября 2015

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

    +4

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    header .phone .icons .vk {
            background: url(/images/design/vk.png) rgba(221, 221, 221, 0.22);
    }
    
    header .phone .icons .vk:hover {
    	background-color:rgba(221, 221, 221, 0);
    	display:none;
    }

    Если пользователь нашёл элемент, прячем его

    tutov2013, 08 Сентября 2015

    Комментарии (11)
  8. JavaScript / Говнокод #18623

    −1

    1. 1
    2. 2
    3. 3
    $(function ($) {
        $.tradeticket = $.tradeticket || {};
    }(jQuery));

    Genious!

    oxfn, 22 Августа 2015

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

    +3

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    if ($w>$n) {
    	print round(100/($w/$n))
    } else if ($n>$w) {
    	print round(100/($n/$w))
    }

    процентное соотношение между $w и $n

    specialforgovnocod, 31 Июля 2015

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

    −123

    1. 1
    #!/usr/blin/python

    Навеяно говнокодом № 55.

    inkanus-gray, 24 Июля 2015

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

    +142

    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
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    ### TASK 1
    
    R <- 1.987
    
    toSi <- function (value, molar_mass) {
      return (value * 4190 / molar_mass)
    }
    
    delta <- function (experiment, theory) {
      return((experiment - theory)/experiment*100)
    }
    
    einsteinFormula <- function (t, A, B, D) {
      return(A + B * t + D * t^2)
    }
    
    bennewitzRossner <- function (cv, Cnu, n, m, Cd, q) {
      coeff1 = (3*n-6-m-q)/q
      return(cv + R + 1/2 * m * R + Cnu + coeff1*Cd)
    }
    
    heatCapacity <- function(n, links, t, Anu, Bnu, Dnu, Ad, Bd, Dd, m, M) {
      c_nu <- einsteinFormula(t, Anu, Bnu, Dnu)
      #print(c_nu)
      c_d <- einsteinFormula(t, Ad, Bd, Dd)
      #print(c_d)
      C_rot <- sum(c_nu*links)
      C_bend <- sum(c_d*links)
      q <- sum(links)
      C_kalmol <- bennewitzRossner(3*R, C_rot, n, m, C_bend, q)
      C_br <- toSi(C_kalmol, M)
      return(data.frame(C_kalmol, C_br, C_rot, C_bend))
    }
    
    task11 <- function () {
      t_C6H14 <- c(400, 600, 800)
      n_C6H14 <- 20
      m_C6H14 <- 5
      M_C6H14 <- 86.2
      Cp_C6H14_kalmol <- (3 * n_C6H14 - 2) * R
      #print(Cp_C6H14_kalmol)
      Cp_C6H14_mkt <- toSi(Cp_C6H14_kalmol, M_C6H14)
     # print(Cp_C6H14_mkt)
      Cp_C6H14_exp <- c(1890, 2611, 3159)
      deltaC <- delta(Cp_C6H14_exp, Cp_C6H14_mkt)
      cp_C6H14_1 <- heatCapacity(
        20, 
        c(5, 14), #Links number
        400, #Temperatures
        c(-1.09, 0.229), c(6*10^-3, -1.224*10^-3), c(-4.495*10^-6, 1.658*10^-6), #A, B, D rotational
        c(0.73, -0.928), c(3.414*10^-3, 3.9*10^-3), c(-2.577*10^-6, -1.324*10^-6), #A, B, D bending
        m_C6H14, 86.2
      )
      cp_C6H14_2 <- heatCapacity(
        20, 
        c(5, 14), #Links number
        600, #Temperatures
        c(-1.09, 0.229), c(6*10^-3, -1.224*10^-3), c(-4.495*10^-6, 1.658*10^-6), #A, B, D rotational
        c(0.73, -0.928), c(3.414*10^-3, 3.9*10^-3), c(-2.577*10^-6, -1.324*10^-6), #A, B, D bending
        m_C6H14, 86.2
      )
      cp_C6H14_3 <- heatCapacity(
        20, 
        c(5, 14), #Links number
        800, #Temperatures
        c(-1.09, 0.229), c(6*10^-3, -1.224*10^-3), c(-4.495*10^-6, 1.658*10^-6), #A, B, D rotational
        c(0.73, -0.928), c(3.414*10^-3, 3.9*10^-3), c(-2.577*10^-6, -1.324*10^-6), #A, B, D bending
        m_C6H14, 86.2
      )
      cp <- c(cp_C6H14_1$C_br, cp_C6H14_2$C_br, cp_C6H14_3$C_br)
      print(c(cp_C6H14_1$C_rot, cp_C6H14_2$C_rot, cp_C6H14_3$C_rot))
      print(c(cp_C6H14_1$C_bend, cp_C6H14_2$C_bend, cp_C6H14_3$C_bend))
      deltaC_br <- delta(Cp_C6H14_exp, cp)
      #r <- data.frame(t, Cp_C6H14_mkt, Cp_C6H14_exp, cp, deltaC, deltaC_br)
      return(data.frame(t_C6H14, Cp_C6H14_mkt, Cp_C6H14_exp, deltaC, cp, deltaC_br))
    }

    Мой грязный говнокод на R. Решал дз в инст, рассчет теплоемкости дряни по методу -Д-ж-и-г-у-р-д-ы-и-Б-а-р-р-и-А-л-е-б-а-с-о-в-а- Бенневица-Росснера. Шлю в кучу, потому что нет раздела для эрочки :( Особая ржака начинается со строчки №46.

    k1r1ll0v, 23 Июня 2015

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