1. Куча / Говнокод #18449

    +143

    1. 1
    https://github.com/lhartikk/ArnoldC

    LispGovno, 08 Июля 2015

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

    +119

    1. 1
    2. 2
    3. 3
    Почитываю иногда комменты на govnokod.ru
    Сложилось впечатление, что Stertor, bormand, kegdan, inkanus-gray, 1024--, и многие другие - один и тот же человек
    так ли это?

    besprincypniycentner, 04 Июля 2015

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

    +141

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    foo() ->
        Du =  os:cmd("du -b "++?PM_LOGS_PATH),
        [DiscSize|_] = string:tokens(Du, "\t"),
        case list_to_integer(DiscSize) > 10000000000 of
          ...

    Вся мощь эрланга. В строке может быть не только число? Let it crash!

    lesmugfrog, 01 Июля 2015

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

    +144

    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
    <!--
        Правил верстку, затем решил не коммитить без необходимости
        <table border="1" style=" width: 900pt; margin-top: 20px; table-layout: fixed;">
            <col style=" width: 55pt"/>
            <col style=" width: 65pt"/>
            <col style=" width: 140pt"/>
            <col style=" width: 70pt"/>
            <col style=" width: 65pt"/>
            <col style=" width: 65pt"/>
            <col style=" width: 70pt"/>
            <col style=" width: 70pt"/>
            <col style=" width: 75pt"/>
            <col style=" width: 70pt"/>
            <col style=" width: 75pt"/>
     -->

    И все-таки закоммитил.

    downmedic, 24 Июня 2015

    Комментарии (0)
  5. Куча / Говнокод #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)
  6. Куча / Говнокод #18383

    +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
    package eapi
    
    // #include <eggdrop/mod/module.h>
    // #include <eggdrop/main.h>
    // #include <eggdrop/proto.h>
    import (
    	"C"
    	"errors"
    )
    
    const (
    	DP_STDOUT 		= 0x7FF1
    	DP_LOG			= 0x7FF2
    	DP_SERVER  		= 0x7FF3
    	DP_HELP			= 0x7FF4
    	DP_STDERR		= 0x7FF5
    	DP_MODE			= 0x7FF6
    	DP_MODE_NEXT	= 0x7FF7
    	DP_SERVER_NEXT	= 0x7FF8
    	DP_HELP_NEXT	= 0x7FF9
    )
    
    var (
    	binds []struct{
    		flags,match string
    		list *C.tcl_bind_list_t
    	}
    	bind_num int = 0
    )
    
    //...
    
    func Bind(event,flags,match string, proc func(cd *C.ClientData, irp *C.Tcl_Interp, argc C.int, argv *[]C.char)) int,error{
    	tl := C.find_bind_table(C.CString(event))
    	if tl == nil{
    		return -1,errors.New("No such event table : "+ event)
    	}
    	func_name := bname(bind_num)
    	bind_num++
    	var cmd []C.tcl_cmds = {
    		{func_name,proc},
    		{nil,nil}
    	}
    	C.tcl_add_commands(cmd)
    	C.bind_bind_entry(tl, C.CString(flags), C.CString(match), C.CString(func_name))
    	append(binds,{flags,match,tl})
    	return bind_num-1,nil
    }
    
    func Unbind(int num){
    	if binds[num] == nil{
    		return
    	}
    	C.unbind_bind_entry(binds[num].list, C.CString(binds[num].flags), C.CString(binds[num].match), C.CString(bname(num)))
    }

    обертка на Go для Eggdrop API

    unn4m3d, 23 Июня 2015

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

    +124

    1. 1
    http://m.habrahabr.ru/post/249637/

    LispGovno, 21 Июня 2015

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

    −24

    1. 1
    2. 2
    3. 3
    Оффтоп #2
    
    Первая часть: http://govnokod.ru/18142

    3_14dar, 21 Июня 2015

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

    −54

    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
    * g o a t s e x * g o a t s e x * g o a t s e x *
    g                                               g  
    o /     \             \            /    \       o
    a|       |             \          |      |      a
    t|       `.             |         |       :     t
    s`        |             |        \|       |     s
    e \       | /       /  \\\   --__ \\       :    e
    x  \      \/   _--~~          ~--__| \     |    x  
    *   \      \_-~                    ~-_\    |    *
    g    \_     \        _.--------.______\|   |    g
    o      \     \______// _ ___ _ (_(__>  \   |    o
    a       \   .  C ___)  ______ (_(____>  |  /    a
    t       /\ |   C ____)/      \ (_____>  |_/     t
    s      / /\|   C_____)       |  (___>   /  \    s
    e     |   (   _C_____)\______/  // _/ /     \   e
    x     |    \  |__   \\_________// (__/       |  x
    *    | \    \____)   `----   --'             |  *
    g    |  \_          ___\       /_          _/ | g
    o   |              /    |     |  \            | o
    a   |             |    /       \  \           | a
    t   |          / /    |         |  \           |t
    s   |         / /      \__/\___/    |          |s
    e  |           /        |    |       |         |e
    x  |          |         |    |       |         |x
    * g o a t s e x * g o a t s e x * g o a t s e x *

    https://searchcode.com/?q=goatse
    https://code.openhub.net/search?s=goatse

    3_14dar, 20 Июня 2015

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

    +145

    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
    .panel-top ul.panel li:nth-child(1){
        order: 1;
      }
      .panel-top ul.panel li:nth-child(2){
        order: 4;
      }
      .panel-top ul.panel li:nth-child(3){
        order: 2;
      }
      .panel-top ul.panel li:nth-child(4){
        order: 5;
      }
      .panel-top ul.panel li:nth-child(5){
        order: 3;
      }
      .panel-top ul.panel li:nth-child(6){
        order: 6;
      }

    CSS Responsive

    stail, 19 Июня 2015

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