1. Си / Говнокод #25803

    −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
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    
    int main(int argc, char *argv[])
    {
    
    char** explode(char* inaddr, char s)
    {
    char**  xxx;
    xxx=(char**)malloc(strlen(inaddr));
    char* temp;
    temp=(char*)malloc(strlen(inaddr));
    
    int u=0,i=0,t=0;
    
    char* getln(char *addr)
    {
    while (*(addr+i) !=s && *(addr+i) !='\0' && *(addr+i) !=EOF)
    {temp[t]=inaddr[i];t++;i++;};
    temp[t]='\0';
    i++;t=0;
    return(temp);
    }
    
    while (inaddr[i])
    {
    xxx[u]=strdup(getln(inaddr));
    u++;
    };
    return(xxx);
    };
    
    //для проверки результата
    char* str="Y000:aa;dsf;dddsf;dsfdsf;1YYYYY;YYYYY;YYYYYY;sfd:sfdsfdsfdsfdsfdsfdsfdsf1YYYYYYY:YYYYYYYYY;b;cc;Ydsfds;876786876a:1132";
    char** eee;
    eee=(char**)malloc(strlen(str));
    
    
    eee=explode(str, ';');
    
    int zz=0;
    while(eee[zz])
    {
      printf("%s\n",eee[zz] );zz++;
    };
    printf("%c",eee[0][0] );
    printf("\n" );
    
    }

    функция explode() как php давно о такой мечтал.

    killer1804, 04 Сентября 2019

    Комментарии (21)
  2. PHP / Говнокод #25802

    −2

    1. 1
    <?php echo strrev("PHP");

    Я "PHP" переверну, и снова "PHP" я получу

    IIIyqpymuHckuu_nemyx, 04 Сентября 2019

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

    −3

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    https://habr.com/ru/post/465553/
    
    А правда, почему компилятор C++ позволяет писать такую хуету
    x+= x++ + ++x;
    x^=y^=x^=y;
    ?

    IIIyqpymuHckuu_nemyx, 03 Сентября 2019

    Комментарии (290)
  4. PHP / Говнокод #25800

    −2

    1. 1
    https://www.php.net/manual/en/migration70.deprecated.php

    > The salt option for the password_hash() function has been deprecated to prevent developers from generating their own (usually insecure) salts.
    Какой анскилл )))

    Stallman, 03 Сентября 2019

    Комментарии (18)
  5. Си / Говнокод #25799

    −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
    #include <stdio.h>
    #include <stdlib.h>
    
    
    int main(int argc, char *argv[])
    
    //типа explode в php;
    {
    int i=0;
    //char s=';';
    char s=argv[2][0];
    
    i=100;
    //char** data;
    //data=(char**)malloc(i+1);
    char data[1000][1000];
    char* str;
    str=malloc(i+1);
    str=argv[1];
    printf("%s\n",str );
    int n=0;
    int m=0;
    
    
    while (*str) {
    if (*str==s)
    {m++;n=0;str++;continue;};
      data[m][n]=*str;
      str++;n++;
    
    };
    printf("%s\n",data[0] );
    
    }

    Типа explode в php
    Кто-нить знает как это заставить работать с
    //char** data;
    //data=(char**)malloc(i+1);
    ??

    killer1804, 03 Сентября 2019

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

    −3

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

    #1: https://govnokod.ru/18142 https://govnokod.xyz/_18142
    #2: https://govnokod.ru/18378 https://govnokod.xyz/_18378
    #3: https://govnokod.ru/19667 https://govnokod.xyz/_19667
    #4: https://govnokod.ru/21160 https://govnokod.xyz/_21160
    #5: https://govnokod.ru/21772 https://govnokod.xyz/_21772
    #6: https://govnokod.ru/24063 (потёр пидор сракер) https://govnokod.xyz/_24063
    #7: https://govnokod.ru/24538 https://govnokod.xyz/_24538
    #8: https://govnokod.ru/24815 (потёр пидор сракер) https://govnokod.xyz/_24815
    #9: https://govnokod.ru/24867 https://govnokod.xyz/_24867
    #10: https://govnokod.ru/25328 https://govnokod.xyz/_25328
    #11: https://govnokod.xyz/_25436 https://govnokod.ru/25436 (потёр пидор сракер)
    #12: https://govnokod.xyz/_25471
    #13: https://govnokod.xyz/_25590 (потёр пидор сракер)
    #14: https://govnokod.xyz/_25684
    #15: https://govnokod.xyz/_25694
    #16: https://govnokod.xyz/_25725
    #17: https://govnokod.xyz/_25731
    #18: https://govnokod.xyz/_25762
    #19: https://govnokod.xyz/_25767
    #20: https://govnokod.xyz/_25776

    syoma, 03 Сентября 2019

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

    −3

    1. 1
    Каталог тредов

    syoma, 03 Сентября 2019

    Комментарии (97)
  8. Си / Говнокод #25796

    0

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    n = ((n >>  1) & 0x55555555) | ((n <<  1) & 0xaaaaaaaa);
       n = ((n >>  2) & 0x33333333) | ((n <<  2) & 0xcccccccc);
       n = ((n >>  4) & 0x0f0f0f0f) | ((n <<  4) & 0xf0f0f0f0);
       n = ((n >>  8) & 0x00ff00ff) | ((n <<  8) & 0xff00ff00);
       n = ((n >> 16) & 0x0000ffff) | ((n << 16) & 0xffff0000);
    
                    -- C code which reverses the bits in a word.

    neTyx_npoTKHyTbIu, 03 Сентября 2019

    Комментарии (77)
  9. C# / Говнокод #25795

    −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
    22. 22
    23. 23
    24. 24
    25. 25
    class Label : System.Windows.Forms.Label {
            public Label ( string s , int x , int y , Form parent ) {
                this.Location = new Point ( x , y ) ;
                this.Text = s ;
                this.AutoSize = true ;
                this.Font = new Font ( SystemFonts.CaptionFont , FontStyle.Bold ) ;
                parent.Controls.Add ( this ) ;
            }
        }
        class Button : System.Windows.Forms.Button {
            public Button ( string s , int x , int y ,  EventHandler f , Form parent ) {
                this.Location = new Point ( x , y ) ;
                this.Text = s ;
                this.Font = new Font ( SystemFonts.CaptionFont , FontStyle.Bold ) ;
                this.Click += f ;
                parent.Controls.Add ( this ) ;
            }
        }
    
        static Form form = new Form() ;
        static Button[,] a = new Button [ 4 , 4 ] ;
        static Random rnd = new Random() ;
        static Timer timer = new Timer() ;
        static Label time = new Label ( "0" , width + cellspacing * 3 , 4 * ( width + cellspacing ) + cellspacing * 2 , form ) ;
        static Label nclicks = new Label ( "0" , 3 * width + cellspacing * 5 , 4 * ( width + cellspacing ) + cellspacing * 2 , form ) ;

    Нашел архив своего старого говна :)

    Pretty_Young_Thing, 03 Сентября 2019

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

    0

    1. 1
    2. 2
    3. 3
    4. 4
    ButtonCustom {
        visible: !cyrcleProgress.visible ? true : false
        ...
    }

    FrontlineReporter, 02 Сентября 2019

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