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

    0

    1. 1
    IT Оффтоп #102

    #72: https://govnokod.ru/27120 https://govnokod.xyz/_27120
    #73: https://govnokod.ru/27136 https://govnokod.xyz/_27136
    #74: https://govnokod.ru/27160 https://govnokod.xyz/_27160
    #75: https://govnokod.ru/27166 https://govnokod.xyz/_27166
    #76: https://govnokod.ru/27168 https://govnokod.xyz/_27168
    #77: https://govnokod.ru/27186 https://govnokod.xyz/_27186
    #78: https://govnokod.ru/27219 https://govnokod.xyz/_27219
    #79: https://govnokod.ru/27254 https://govnokod.xyz/_27254
    #80: https://govnokod.ru/27270 https://govnokod.xyz/_27270
    #81: https://govnokod.ru/27280 https://govnokod.xyz/_27280
    #82: https://govnokod.ru/27284 https://govnokod.xyz/_27284
    #83: https://govnokod.ru/27296 https://govnokod.xyz/_27296
    #84: https://govnokod.ru/27336 https://govnokod.xyz/_27336
    #85: https://govnokod.ru/27381 https://govnokod.xyz/_27381
    #86: https://govnokod.ru/27405 https://govnokod.xyz/_27405
    #87: https://govnokod.ru/27429 https://govnokod.xyz/_27429
    #88: https://govnokod.ru/27432 https://govnokod.xyz/_27432
    #89: https://govnokod.ru/27435 https://govnokod.xyz/_27435
    #90: https://govnokod.ru/27439 https://govnokod.xyz/_27439
    #91: https://govnokod.ru/27449 https://govnokod.xyz/_27449
    #92: https://govnokod.ru/27460 https://govnokod.xyz/_27460
    #93: https://govnokod.ru/27463 https://govnokod.xyz/_27463
    #94: https://govnokod.ru/27466 https://govnokod.xyz/_27466
    #95: https://govnokod.ru/27473 https://govnokod.xyz/_27473
    #96: https://govnokod.ru/27478 https://govnokod.xyz/_27478
    #97: https://govnokod.ru/27484 https://govnokod.xyz/_27484
    #98: https://govnokod.ru/27495 https://govnokod.xyz/_27495
    #99: https://govnokod.ru/27504 https://govnokod.xyz/_27504
    #100: https://govnokod.ru/27508 https://govnokod.xyz/_27508
    #101: https://govnokod.ru/27511 https://govnokod.xyz/_27511

    nepeKamHblu_nemyx, 15 Июля 2021

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

    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
    Хрюкни #11
                 ._     __,
                  |\,../'\
                ,'. .     `.
               .--         '`.
              ( `' ,          ;
              ,`--' _,       ,'\
             ,`.____            `.
            /              `,    |
           '                \,   '
           |                /   /`,
           `,  .           ,` ./  |
           ' `.  ,'        |;,'   ,@
     ______|     |      _________,_____jv______
            `.   `.   ,'
             ,'_,','_,
             `'   `'

    #1: (vanished) https://govnokod.xyz/_26863
    #2: (vanished) https://govnokod.xyz/_26868
    #3: https://govnokod.ru/26881 https://govnokod.xyz/_26881
    #4: https://govnokod.ru/26896 https://govnokod.xyz/_26896
    #5: https://govnokod.ru/26928 https://govnokod.xyz/_26928
    #6: (vanished) https://govnokod.xyz/_26952
    #7: https://govnokod.ru/26955 https://govnokod.xyz/_26955
    #8: https://govnokod.ru/27043 https://govnokod.xyz/_27043
    #9: https://govnokod.ru/27175 https://govnokod.xyz/_27175
    #10: https://govnokod.ru/27472 https://govnokod.xyz/_27472

    nepeKamHblu_nemyx, 14 Июля 2021

    Комментарии (2024)
  3. Си / Говнокод #27516

    +4

    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
    while (1) {
        uint16_t state = in(USB_BASE + USB_ISTR);
        if (state & 0x8000) {
            uint16_t epstat = in(USB_BASE + USB_EP0R);
            if (epstat & 0x8000) {
                // RX done
                if (epstat & 0x0800) {
                    // setup
                    if ((usbRead(0x180) == 0x80) && (usbRead(0x181) == 0x06)) {
                        uint16_t maxlen = (usbRead(0x187) << 8) | usbRead(0x186);
                        if (usbRead(0x183) == 0x01) {
                            // send device descriptor
                            copyToUsb(0x0100, deviceDescriptor, sizeof(deviceDescriptor));
                            if (sizeof(deviceDescriptor) < maxlen)
                                maxlen = sizeof(deviceDescriptor);
                            out(USB_SRAM_BASE + 0x04, 0x9000 + maxlen); // TX count
                            // STAT_TX=11 (valid)
                            if ((in(USB_BASE + USB_EP0R) & 0x0010) != 0x0010)
                                out(USB_BASE + USB_EP0R, 0x0210);
                            if ((in(USB_BASE + USB_EP0R) & 0x0020) != 0x0020)
                                out(USB_BASE + USB_EP0R, 0x0220);
                        } else if (usbRead(0x183) == 0x02) {
                            // send config descriptor
                            copyToUsb(0x0100, configDescriptor, sizeof(configDescriptor));
                            if (sizeof(configDescriptor) < maxlen)
                                maxlen = sizeof(configDescriptor);
                            out(USB_SRAM_BASE + 0x04, 0x9000 + maxlen); // TX count
                            // STAT_TX=11 (valid)
                            if ((in(USB_BASE + USB_EP0R) & 0x0010) != 0x0010)
                                out(USB_BASE + USB_EP0R, 0x0210);
                            if ((in(USB_BASE + USB_EP0R) & 0x0020) != 0x0020)
                                out(USB_BASE + USB_EP0R, 0x0220);
                        } else {
    
    // ... и ещё сотня строк в том же духе ...

    Иногда в меня вселяется дух PHP...

    bormand, 13 Июля 2021

    Комментарии (30)
  4. Си / Говнокод #27515

    +1

    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
    // https://github.com/shanecoughlan/OpenGEM/blob/ac06b1a3fec3f3e8defcaaf7ea0338c38c3cef46/source/OpenGEM-7-RC3-SDK/OpenGEM-7-SDK/GEM%20AES%20AND%20SOURCE%20CODE/FreeGEM%20AES%203.0%20(source%20code)/GEMEVLIB.C#L143
    /*
    *	Do a multi-wait on the specified events.
    */
    	WORD
    ev_multi(flags, pmo1, pmo2, tmcount, buparm, mebuff, prets)
    	REG WORD	flags;
    	REG MOBLK	*pmo1;
    	MOBLK		*pmo2;
    	LONG		tmcount;
    	LONG		buparm;
    	LPVOID		mebuff;
    	WORD		prets[];
    {
    	QPB		m;
    	REG EVSPEC	which;
    	REG WORD	what;
    	REG CQUEUE	*pc;
    #if MULTIAPP
    	WORD		evbuff[8];
    	WORD		pid;
    	SHELL		*psh;
    	LONG		ljunk;
    
    	pid = rlr->p_pid;
    	psh = &sh[pid];
    	if ( psh->sh_state & SHRINK )		/* shrink accessory	*/
    	{
    	  if (pr_shrink(pid, TRUE, &ljunk, &ljunk))
    	    ap_exit(TRUE); /* if no swap space terminate acc */ 
    	  psh->sh_state &= ~SHRINK;
    	}
    #endif
    
    						/* say nothing has 	*/
    						/*   happened yet	*/
    	what = 0x0;
    		 				/* do a pre-check for a	*/
    						/*   keystroke & then	*/
    						/*   clear out the forkq*/
    	chkkbd();
    	forker();
    						/*   a keystroke	*/
    	if (flags & MU_KEYBD)
    	{
    						/* if a character is 	*/
    						/*   ready then get it	*/
    	  pc = &rlr->p_cda->c_q;
    	  if ( pc->c_cnt )
    	  {
    	    prets[4] = (UWORD) dq(pc);
    	    what |= MU_KEYBD;
    	  }
    	}
    						/* if we own the mouse	*/
    						/*   then do quick chks	*/
    	if ( rlr == gl_mowner )
    	{
    						/* quick check button	*/
    	  if (flags & MU_BUTTON)
    	  {
    	    if ( (mtrans > 1) &&
    		 (downorup(pr_button, buparm)) )
    	    {
    	      what |= MU_BUTTON;
    	      prets[5] = pr_mclick;
    	    }
    	    else
    	    {
    	      if ( downorup(button, buparm) )
    	      {
    	        what |= MU_BUTTON;
    	        prets[5] = mclick;
    	      }
    	    }
    	  }
    						/* quick check mouse rec*/
    	  if ( ( flags & MU_M1 ) &&	
    	       ( in_mrect(pmo1) ) )
    	      what |= MU_M1;
    						/* quick check mouse rec*/
    	  if ( ( flags & MU_M2 ) &&
    	       ( in_mrect(pmo2) ) )
    	      what |= MU_M2;
    	}
    						/* quick check timer	*/
    	if (flags & MU_TIMER)
    	{
    	  if ( tmcount == 0x0L )
    	    what |= MU_TIMER;
    	}
    						/* quick check message	*/
    	if (flags & MU_MESAG)
    	{
    	  if ( rlr->p_qindex > 0 )
    	  {
    #if MULTIAPP
    	    ap_rdwr(MU_MESAG, rlr, 16, ADDR(&evbuff[0]) );
    #endif
    #if SINGLAPP

    Уххх бля

    j123123, 13 Июля 2021

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

    0

    1. 1
    Питушня #18

    #1: https://govnokod.ru/26692 https://govnokod.xyz/_26692
    #2: https://govnokod.ru/26891 https://govnokod.xyz/_26891
    #3: https://govnokod.ru/26893 https://govnokod.xyz/_26893
    #4: https://govnokod.ru/26935 https://govnokod.xyz/_26935
    #5: (vanished) https://govnokod.xyz/_26954
    #6: (vanished) https://govnokod.xyz/_26956
    #7: https://govnokod.ru/26964 https://govnokod.xyz/_26964
    #8: https://govnokod.ru/26966 https://govnokod.xyz/_26966
    #9: https://govnokod.ru/27017 https://govnokod.xyz/_27017
    #10: https://govnokod.ru/27045 https://govnokod.xyz/_27045
    #11: https://govnokod.ru/27058 https://govnokod.xyz/_27058
    #12: https://govnokod.ru/27182 https://govnokod.xyz/_27182
    #13: https://govnokod.ru/27260 https://govnokod.xyz/_27260
    #14: https://govnokod.ru/27343 https://govnokod.xyz/_27343
    #15: https://govnokod.ru/27353 https://govnokod.xyz/_27353
    #16: https://govnokod.ru/27384 https://govnokod.xyz/_27384
    #17: https://govnokod.ru/27482 https://govnokod.xyz/_27482

    nepeKamHblu_nemyx, 13 Июля 2021

    Комментарии (2292)
  6. JavaScript / Говнокод #27513

    +2

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    class Point {
      x = 0;
      y = 0;
    }
    
    function main() {
      const pt = new Point();
      // Prints 0, 0
      print(`${pt.x}, ${pt.y}`);
    }

    вот пока вы тут языки чесали - я наваял новую фичу. а кто догадается что особенного в этом классе? в чем фича?

    ASD_77, 12 Июля 2021

    Комментарии (27)
  7. C# / Говнокод #27512

    +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
    78. 78
    79. 79
    80. 80
    81. 81
    82. 82
    83. 83
    84. 84
    85. 85
    86. 86
    87. 87
    88. 88
    89. 89
    90. 90
    91. 91
    92. 92
    93. 93
    94. 94
    95. 95
    96. 96
    97. 97
    98. 98
    99. 99
    using System;
    
    using System.Collections.Generic;
    
    using System.ComponentModel;
    
    using System.Data;
    
    using System.Drawing;
    
    using System.Linq;
    
    using System.Text;
    
    using System.Threading.Tasks;
    
    using System.Windows.Forms;
    
    namespace Biblo
    
    {
    
    public partial class Form1 : Form
    
    {
    
    public Form1()
    
    {
    
    InitializeComponent();
    
    }
    
    private void Form1_Load(object sender, EventArgs e)
    
    {
    
    }
    
    private void label1_Click(object sender, EventArgs e)
    
    {
    
    }
    
    double a = 0, b = 0, c = 0;
    
    double f, g;
    
    private void button1_Click(object sender, EventArgs e)
    
    {
    
    a = Convert.ToDouble(maskedTextBox1.Text);
    
    b = Convert.ToDouble(maskedTextBox2.Text);
    
    c = Convert.ToDouble(maskedTextBox3.Text);
    
    f = (a - b) * c / 100;
    
    if (comboBox1.Text.Contains("12 месяцев"))
    
    {
    
    g = Math.Round((a + f) / 12);
    
    }
    
    if (comboBox1.Text.Contains("36 месяцев"))
    
    {
    
    g = Math.Round((a + f) / 36);
    
    }
    
    if (comboBox1.Text.Contains("5 лет"))
    
    {
    
    g = Math.Round((a + f) / 60);
    
    }
    
    if (comboBox1.Text.Contains("10 лет"))
    
    {
    
    g = Math.Round((a + f) / 120);
    
    }
    
    if (comboBox1.Text.Contains("20 лет"))
    
    {
    
    g = Math.Round((a + f) / 240);

    govnomasha, 12 Июля 2021

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

    0

    1. 1
    IT Оффтоп #101

    #71: https://govnokod.ru/27115 https://govnokod.xyz/_27115
    #72: https://govnokod.ru/27120 https://govnokod.xyz/_27120
    #73: https://govnokod.ru/27136 https://govnokod.xyz/_27136
    #74: https://govnokod.ru/27160 https://govnokod.xyz/_27160
    #75: https://govnokod.ru/27166 https://govnokod.xyz/_27166
    #76: https://govnokod.ru/27168 https://govnokod.xyz/_27168
    #77: https://govnokod.ru/27186 https://govnokod.xyz/_27186
    #78: https://govnokod.ru/27219 https://govnokod.xyz/_27219
    #79: https://govnokod.ru/27254 https://govnokod.xyz/_27254
    #80: https://govnokod.ru/27270 https://govnokod.xyz/_27270
    #81: https://govnokod.ru/27280 https://govnokod.xyz/_27280
    #82: https://govnokod.ru/27284 https://govnokod.xyz/_27284
    #83: https://govnokod.ru/27296 https://govnokod.xyz/_27296
    #84: https://govnokod.ru/27336 https://govnokod.xyz/_27336
    #85: https://govnokod.ru/27381 https://govnokod.xyz/_27381
    #86: https://govnokod.ru/27405 https://govnokod.xyz/_27405
    #87: https://govnokod.ru/27429 https://govnokod.xyz/_27429
    #88: https://govnokod.ru/27432 https://govnokod.xyz/_27432
    #89: https://govnokod.ru/27435 https://govnokod.xyz/_27435
    #90: https://govnokod.ru/27439 https://govnokod.xyz/_27439
    #91: https://govnokod.ru/27449 https://govnokod.xyz/_27449
    #92: https://govnokod.ru/27460 https://govnokod.xyz/_27460
    #93: https://govnokod.ru/27463 https://govnokod.xyz/_27463
    #94: https://govnokod.ru/27466 https://govnokod.xyz/_27466
    #95: https://govnokod.ru/27473 https://govnokod.xyz/_27473
    #96: https://govnokod.ru/27478 https://govnokod.xyz/_27478
    #97: https://govnokod.ru/27484 https://govnokod.xyz/_27484
    #98: https://govnokod.ru/27495 https://govnokod.xyz/_27495
    #99: https://govnokod.ru/27504 https://govnokod.xyz/_27504
    #100: https://govnokod.ru/27508 https://govnokod.xyz/_27508

    nepeKamHblu_nemyx, 12 Июля 2021

    Комментарии (2468)
  9. JavaScript / Говнокод #27510

    +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
    class Animal {
        name: string;
    
        constructor(name: string) {
            this.name = name;
        }
    
        speak() {
            print(`${this.name} makes a noise.`);
        }
    }
    
    class Dog extends Animal {
        constructor(name: string) {
            super(name); // call the super class constructor and pass in the name parameter
        }
    
        speak() {
            print(`${this.name} barks.`);
        }
    }
    
    function main() {
        let d = new Dog("Mitzie");
        d.speak(); // Mitzie barks.
        print(d.name);
    }

    Я вам принес нового говнокода для нового говнокомпилятора.... дамп в следующем посту

    ASD_77, 12 Июля 2021

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

    +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
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    async Create(id, subscribe_yyyymmdd) {
      const query = "INSERT INTO users(id,subscribe_yyyymmdd) VALUES ($1,$2) RETURNING *";
      const values = [id, subscribe_yyyymmdd];
      try {
        const result = await this.db.query(query, values);
        return result.rows[0].id;
      } catch (error) {
        this.logger.error(error);
      }
    },
    
    async Update() {
      const query = "UPDATE users SET subscribe_yyyymmdd = $1 where id=$2 RETURNING *";
      const values = [id, subscribe_yyyymmdd];
      try {
        const result = await this.db.query(query, values);
        return result.rows[0].id;
      } catch (error) {
        this.logger.error(error);
      }
    },

    Из https://vk.com/wall521764930_6553 .

    PolinaAksenova, 11 Июля 2021

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