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

    −10

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    if (0) {
      unserialize ("");
      is_bool ("");
      is_array ("");
      is_string ("");
      is_integer ("");
      is_float ("");
    }

    github.com/vk-com/kphp-kdb/blob/master/KPHP/functions.txt

    d_fomenok, 19 Апреля 2016

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

    +3

    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
    m =: 256$0
    index =: 0
    output =: 0$0
    input =: 0$0
    code =: 0$0
    cycles =: 0$0
    codeIndex =: 0
    setCode =: 3 : 'code =: transform y'
    transform =: '><+-.,[]'&i.
    preset =: 3 : 'cycles =: 0$0 [ codeIndex =: 0 [ output =: 0$0 [ m =: 256$0 [ index=:0'
    returnOutput =: 3 : 'output { a.'
    changeValue =: 3 : 'm =: (index&{.,y,(>:index)&}.) m'  
    addCodeIndex =: 3 : 'codeIndex =: (>: codeIndex)'
    setCodeIndex =: 3 : 'codeIndex =: {: cycles'
    deleteCycle =: 3 : 'cycles =: }: cycles'
    		 
    func_1 =: 3 : 'index =:256&|@>:index'
    func_2 =: 3 : 'index =:256&|@<:index'
    func_3 =: 3 : 'changeValue@(256&|)@>:@(index&{) m'
    func_4 =: 3 : 'changeValue@(256&|)@<:@(index&{) m'
    func_5 =: 3 : 'output=:output, ((index&{) m)'
    func_6 =: 3 : '(input =: }.input)[ changeValue(256&|@{.input)'
    func_7 =: 3 : 'cycles =: cycles&, codeIndex'
    func_8 =: 3 : '(setCodeIndex`deleteCycle@.(0&=))@(index&{) m'
    
    doAction =: func_1`func_2`func_3`func_4`func_5`func_6`func_7`func_8@.]  
    doInstuction =: 3 : '(doAction[addCodeIndex)@{.@(codeIndex&{) code'
    ExitCond =: 3 : 'codeIndex = (# code)'
    		 
    interpreter =: 3 : '(((,&1 [ doInstuction )`0: @. ExitCond)^:_) 0'
    brainFuck =: returnOutput [ interpreter [ setCode [ preset
    
    brainFuck '++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.'

    интерпретатор брейнфака на J

    kegdan, 19 Апреля 2016

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

    −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
    private void cb_activated(TreePath path, TreeViewColumn column) {
            Totem.Object t = (Totem.Object)this.object;
            uint selected = path.get_indices()[0];
            uint current = t.get_playlist_pos();
    
            if (selected > current) {
                for (int i = 0; i < selected - current; i++)
                    t.remote_command(RemoteCommand.NEXT, "");
            } else if (current > selected) {
                for (int i = 0; i < current - selected; i++)
                    t.remote_command(RemoteCommand.PREVIOUS, "");
            }
        }

    Vala. Тормозит эта хуйня жутко, так как Totem открывает все файлы в плейлисте, пока не доберётся до выбранного.

    CYB3R, 17 Апреля 2016

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

    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
    19. 19
    20. 20
    object Main extends App {
      object Email {
        def apply(user: String, host: String) = user + "@" + host
        def unapply(input: String): Option[(String, String)] = {
          input.indexOf("@") match {
            case x if (x > 0) => Some((input.substring(0, x), input.substring(x + 1)))
            case _ => None
          }
        }
      }
    
      "[email protected]" match {
        case Email(user, host) => println("See user <" + user + "> at domain <" + host + ">")
        case _ => println("Well...")
      }
      "lol" match {
        case Email(user, host) => println("Wow... strange email")
        case _ => println("OK, <lol> is not an email")
      }
    }

    http://ideone.com/2xA5xW
    Искал во вконтакте свою страничку, а нашел это

    LispGovno, 12 Апреля 2016

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

    +4

    1. 1
    A notice tag marks out-of-service equipment, such as a fire hydrant. Included is a guide member that has one or more guide channels and which is inserted into a connector body. The CNT array is patterned by using a patterned metallic seed layer on the substrate to form the CNT array by chemical vapor deposition. The pivot arm has a biasing mechanism with a force that results in less impact force between the pivot arm roller and drive roller when the trailing edge of each mail piece passes through the take-away nip, resulting in less vibration of the weighing platform as mail pieces exit the weighing platform. The process gas is exhausted from the chamber.

    Автоматическая генерация изобретений для общественного достояния
    https://geektimes.ru/post/274156/

    Вореции на страже от патентных троллей?

    kerman, 12 Апреля 2016

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

    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
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    .container .additional-item{display: block;width:100%;}
    .container .additional-item thead{display: block;width:100%;}
    .container .additional-item thead tr td{font-weight: bold;}
    .container .additional-item tbody{display: block;width:100%;}
    .container .additional-item tr{display: block;width:100%;padding:10px 0px;}
    .container .additional-item tr td{display: inline-block;text-align: center;}
    .container .additional-item tr td:nth-child(1){width:3%;}
    .container .additional-item tr td:nth-child(2){width:3%;}
    .container .additional-item tr td:nth-child(3){width:3%;}
    .container .additional-item tr td:nth-child(4){width:15%;}
    .container .additional-item tr td:nth-child(5){width:5%;}
    .container .additional-item tr td:nth-child(6){width:5%;overflow: hidden;}
    .container .additional-item tr td:nth-child(7){width:20%;overflow: hidden;}
    .container .additional-item tr td:nth-child(8){width:3%;overflow: hidden;}
    .container .additional-item tr td:nth-child(9){width:3%;overflow: hidden;}
    .container .additional-item tr td:nth-child(10){width:5%;overflow: hidden;}
    
    .container .additional-item tbody tr td:nth-child(11){font-weight: bold;color:rgb(138, 43, 23);}
    .container .additional-item tr td:nth-child(11){width:10%;overflow: hidden;}
    .container .additional-item tr td:nth-child(12){width:7.5%;overflow: hidden;}
    .container .additional-item tr td:nth-child(12) input{width:50%;margin:auto;text-align: center;}
    .container .additional-item tr td:nth-child(13){width:12%;overflow: hidden;}
    .container .additional-item tr td:nth-child(13) a{display: block;width: 95%;margin-left: 5%;height: 30px;line-height: 15px;font-size: 100%;}

    lscin, 12 Апреля 2016

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

    −7

    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
    <figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><nav</span> <span class="na">class=</span><span class="s">"navbar navbar-default"</span><span class="nt">></span>
      <span class="nt"><div</span> <span class="na">class=</span><span class="s">"container-fluid"</span><span class="nt">></span>
        <span class="c"><!-- Brand and toggle get grouped for better mobile display --></span>
        <span class="nt"><div</span> <span class="na">class=</span><span class="s">"navbar-header"</span><span class="nt">></span>
          <span class="nt"><button</span> <span class="na">type=</span><span class="s">"button"</span> <span class="na">class=</span><span class="s">"navbar-toggle collapsed"</span> <span class="na">data-toggle=</span><span class="s">"collapse"</span> <span class="na">data-target=</span><span class="s">"#bs-example-navbar-collapse-1"</span> <span class="na">aria-expanded=</span><span class="s">"false"</span><span class="nt">></span>
            <span class="nt"><span</span> <span class="na">class=</span><span class="s">"sr-only"</span><span class="nt">></span>Toggle navigation<span class="nt"></span></span>
            <span class="nt"><span</span> <span class="na">class=</span><span class="s">"icon-bar"</span><span class="nt">></span></span>
            <span class="nt"><span</span> <span class="na">class=</span><span class="s">"icon-bar"</span><span class="nt">></span></span>
            <span class="nt"><span</span> <span class="na">class=</span><span class="s">"icon-bar"</span><span class="nt">></span></span>
          <span class="nt"></button></span>
          <span class="nt"><a</span> <span class="na">class=</span><span class="s">"navbar-brand"</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Brand<span class="nt"></a></span>
        <span class="nt"></div></span>
    
        <span class="c"><!-- Collect the nav links, forms, and other content for toggling --></span>
        <span class="nt"><div</span> <span class="na">class=</span><span class="s">"collapse navbar-collapse"</span> <span class="na">id=</span><span class="s">"bs-example-navbar-collapse-1"</span><span class="nt">></span>
          <span class="nt"><ul</span> <span class="na">class=</span><span class="s">"nav navbar-nav"</span><span class="nt">></span>
            <span class="nt"><li</span> <span class="na">class=</span><span class="s">"active"</span><span class="nt">><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Link <span class="nt"><span</span> <span class="na">class=</span><span class="s">"sr-only"</span><span class="nt">></span>(current)<span class="nt"></span></a></li></span>
            <span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Link<span class="nt"></a></li></span>
            <span class="nt"><li</span> <span class="na">class=</span><span class="s">"dropdown"</span><span class="nt">></span>
              <span class="nt"><a</span> <span class="na">href=</span><span class="s">"#"</span> <span class="na">class=</span><span class="s">"dropdown-toggle"</span> <span class="na">data-toggle=</span><span class="s">"dropdown"</span> <span class="na">role=</span><span class="s">"button"</span> <span class="na">aria-haspopup=</span><span class="s">"true"</span> <span class="na">aria-expanded=</span><span class="s">"false"</span><span class="nt">></span>Dropdown <span class="nt"><span</span> <span class="na">class=</span><span class="s">"caret"</span><span class="nt">></span></a></span>
              <span class="nt"><ul</span> <span class="na">class=</span><span class="s">"dropdown-menu"</span><span class="nt">></span>
                <span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Action<span class="nt"></a></li></span>
                <span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Another action<span class="nt"></a></li></span>
                <span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Something else here<span class="nt"></a></li></span>
                <span class="nt"><li</span> <span class="na">role=</span><span class="s">"separator"</span> <span class="na">class=</span><span class="s">"divider"</span><span class="nt">></li></span>
                <span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Separated link<span class="nt"></a></li></span>
                <span class="nt"><li</span> <span class="na">role=</span><span class="s">"separator"</span> <span class="na">class=</span><span class="s">"divider"</span><span class="nt">></li></span>
                <span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>One more separated link<span class="nt"></a></li></span>
              <span class="nt"></ul></span>
            <span class="nt"></li></span>
          <span class="nt"></ul></span>
          <span class="nt"><form</span> <span class="na">class=</span><span class="s">"navbar-form navbar-left"</span> <span class="na">role=</span><span class="s">"search"</span><span class="nt">></span>
            <span class="nt"><div</span> <span class="na">class=</span><span class="s">"form-group"</span><span class="nt">></span>
              <span class="nt"><input</span> <span class="na">type=</span><span class="s">"text"</span> <span class="na">class=</span><span class="s">"form-control"</span> <span class="na">placeholder=</span><span class="s">"Search"</span><span class="nt">></span>
            <span class="nt"></div></span>

    С сайта bootstrap

    d_fomenok, 10 Апреля 2016

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

    +5

    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
    type asynchronizer struct {
    	payload interface{}
    }
    
    func (as *asynchronizer) MarshalJSON() ([]byte, error) {
    	insert := []byte("\"async\":true,")
    	if as.payload == nil {
    		as.payload = struct{}{}
    	}
    	raw, err := json.Marshal(as.payload)
    	if err != nil {
    		return raw, err
    	}
    	if raw[1] == '}' {
    		insert = insert[:len(insert)-2]
    	}
    	return append(append(raw[0:1], insert...), raw[1:]...), nil
    }

    Чем дальше в лес, тем больше Го напоминает ПХП.

    wvxvw, 03 Апреля 2016

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

    +1

    1. 1
    Что за мемчик про вореции?

    Желательно со ссылками на лурк.

    kurwa, 02 Апреля 2016

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

    +2

    1. 001
    2. 002
    3. 003
    4. 004
    5. 005
    6. 006
    7. 007
    8. 008
    9. 009
    10. 010
    11. 011
    12. 012
    13. 013
    14. 014
    15. 015
    16. 016
    17. 017
    18. 018
    19. 019
    20. 020
    21. 021
    22. 022
    23. 023
    24. 024
    25. 025
    26. 026
    27. 027
    28. 028
    29. 029
    30. 030
    31. 031
    32. 032
    33. 033
    34. 034
    35. 035
    36. 036
    37. 037
    38. 038
    39. 039
    40. 040
    41. 041
    42. 042
    43. 043
    44. 044
    45. 045
    46. 046
    47. 047
    48. 048
    49. 049
    50. 050
    51. 051
    52. 052
    53. 053
    54. 054
    55. 055
    56. 056
    57. 057
    58. 058
    59. 059
    60. 060
    61. 061
    62. 062
    63. 063
    64. 064
    65. 065
    66. 066
    67. 067
    68. 068
    69. 069
    70. 070
    71. 071
    72. 072
    73. 073
    74. 074
    75. 075
    76. 076
    77. 077
    78. 078
    79. 079
    80. 080
    81. 081
    82. 082
    83. 083
    84. 084
    85. 085
    86. 086
    87. 087
    88. 088
    89. 089
    90. 090
    91. 091
    92. 092
    93. 093
    94. 094
    95. 095
    96. 096
    97. 097
    98. 098
    99. 099
    100. 100
    .section-cart .table .th1.th1,
    .section-cart .table .th2.th1,
    .section-cart .table .th3.th1,
    .section-cart .table .th4.th1 {
      width: 575px;
    }
    .section-cart .table .th1.th2,
    .section-cart .table .th2.th2,
    .section-cart .table .th3.th2,
    .section-cart .table .th4.th2 {
      width: 285px;
    }
    .section-cart .table .th1.th3,
    .section-cart .table .th2.th3,
    .section-cart .table .th3.th3,
    .section-cart .table .th4.th3 {
      width: 250px;
    }
    .section-cart .table .th1.th1,
    .section-cart .table .th2.th2,
    .section-cart .table .th3.th3,
    .section-cart .table .th4.th4 {
      width: 250px;
    }
    .section-cart .table .td1,
    .section-cart .table .td2,
    .section-cart .table .td3,
    .section-cart .table .td4,
    .section-cart .table .td5,
    .section-cart .table .td6 {
      display: inline-block;
      vertical-align: middle;
      height: 215px;
      border-bottom: 1px solid #d1d1d1;
    }
    .section-cart .table .td1.td1,
    .section-cart .table .td2.td1,
    .section-cart .table .td3.td1,
    .section-cart .table .td4.td1,
    .section-cart .table .td5.td1, 
    .section-cart .table .td6.td1 {
      width: 245px;
      line-height: 215px;
      text-align: center;
    }
    .section-cart .table .td1.td1 img,
    .section-cart .table .td2.td1 img,
    .section-cart .table .td3.td1 img,
    .section-cart .table .td4.td1 img,
    .section-cart .table .td5.td1 img, {
    .section-cart .table .td5.td1 img {
      display: inline-block;
      vertical-align: middle;
    }
    .section-cart .table .td1.td2,
    .section-cart .table .td2.td2,
    .section-cart .table .td3.td2,
    .section-cart .table .td4.td2,
    .section-cart .table .td5.td2 {
      padding-left: 30px;
      line-height: 215px;
      padding-right: 25px;
      width: 355px;
    }
    .section-cart .table .td1.td2 > span,
    .section-cart .table .td2.td2 > span,
    .section-cart .table .td3.td2 > span,
    .section-cart .table .td4.td2 > span,
    .section-cart .table .td5.td2 > span {
      line-height: normal;
      display: inline-block;
      vertical-align: middle;
    }
    .section-cart .table .td1.td2 .title,
    .section-cart .table .td2.td2 .title,
    .section-cart .table .td3.td2 .title,
    .section-cart .table .td4.td2 .title,
    .section-cart .table .td5.td2 .title {
      color: #181415;
      font-size: 22px;
      padding-bottom: 20px;
    }
    .section-cart .table .td1.td2 .opts,
    .section-cart .table .td2.td2 .opts,
    .section-cart .table .td3.td2 .opts,
    .section-cart .table .td4.td2 .opts,
    .section-cart .table .td5.td2 .opts {
      font-size: 16px;
      color: #636363;
      line-height: 24px;
    }
    .section-cart .table .td1.td2 .opts b,
    .section-cart .table .td2.td2 .opts b,
    .section-cart .table .td3.td2 .opts b,
    .section-cart .table .td4.td2 .opts b,
    .section-cart .table .td5.td2 .opts b {
      display: inline-block;
      padding-right: 10px;
      color: #181415;
    }

    Вот так вот строим обычную табличку.

    thereiter, 01 Апреля 2016

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