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

    +1

    1. 1
    2. 2
    3. 3
    > 10,000 Domino Computer (4-bit Full Adder) Remade in Unreal Engine 4
    
    https://www.youtube.com/watch?v=4KTfH1Gyn9g

    Надо запилить компилятор из Verilog в домино

    j123123, 05 Декабря 2019

    Комментарии (22)
  2. Си / Говнокод #26067

    +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
    /* ../COBYLA2/cobyla2.f -- translated by f2c (version 20100827) */
    ...
    /* Subroutine */ int cobyla_(integer *n, integer *m, doublereal *x, 
    	doublereal *rhobeg, doublereal *rhoend, integer *iprint, integer *
    	maxfun, doublereal *w, integer *iact)
    {
        static integer ia, idx, mpp, icon, isim, isigb, idatm, iveta, isimi, 
    	    ivsig, iwork;
        extern /* Subroutine */ int cobylb_(integer *, integer *, integer *, 
    	    doublereal *, doublereal *, doublereal *, integer *, integer *, 
    	    doublereal *, doublereal *, doublereal *, doublereal *, 
    	    doublereal *, doublereal *, doublereal *, doublereal *, 
    	    doublereal *, doublereal *, integer *);
        /* Parameter adjustments */
        --iact;
        --w;
        --x;
    
        /* Function Body */
        mpp = *m + 2;
        icon = 1;
        isim = icon + mpp;
        isimi = isim + *n * *n + *n;
        idatm = isimi + *n * *n;
        ia = idatm + *n * mpp + mpp;
        ivsig = ia + *m * *n + *n;
        iveta = ivsig + *n;
        isigb = iveta + *n;
        idx = isigb + *n;
        iwork = idx + *n;
        cobylb_(n, m, &mpp, &x[1], rhobeg, rhoend, iprint, maxfun, &w[icon], &w[
    	    isim], &w[isimi], &w[idatm], &w[ia], &w[ivsig], &w[iveta], &w[
    	    isigb], &w[idx], &w[iwork], &iact[1]);
        return 0;
    } /* cobyla_ */
    ...
    /* Subroutine */ int cobylb_(integer *n, integer *m, integer *mpp, doublereal 
    	*x, doublereal *rhobeg, doublereal *rhoend, integer *iprint, integer *
    	maxfun, doublereal *con, doublereal *sim, doublereal *simi, 
    	doublereal *datmat, doublereal *a, doublereal *vsig, doublereal *veta,
    	 doublereal *sigbar, doublereal *dx, doublereal *w, integer *iact)
    {
        /* Format strings */
        static char fmt_10[] = "(/3x,\002The initial value of RHO is\002,1pe13.6"
    	    ",2x,\002and PARMU is set to zero.\002)";
        static char fmt_50[] = "(/3x,\002Return from subroutine COBYLA because t"
    	    "he \002,\002MAXFUN limit has been reached.\002)";
        static char fmt_70[] = "(/3x,\002NFVALS =\002,i5,3x,\002F =\002,1pe13.6,"
    	    "4x,\002MAXCV =\002,1pe13.6/3x,\002X =\002,1pe13.6,1p4e15.6)";
        static char fmt_80[] = "(1pe19.6,1p4e15.6)";
        static char fmt_210[] = "(/3x,\002Return from subroutine COBYLA because"
    	    " \002,\002rounding errors are becoming damaging.\002)";
        static char fmt_410[] = "(/3x,\002Increase in PARMU to\002,1pe13.6)";
        static char fmt_580[] = "(/3x,\002Reduction in RHO to\002,1pe13.6,\002  "
    	    "and PARMU =\002,1pe13.6)";
        static char fmt_590[] = "(/3x,\002Normal return from subroutine COBYL"
    	    "A\002)";
    
        /* System generated locals */
        integer sim_dim1, sim_offset, simi_dim1, simi_offset, datmat_dim1, 
    	    datmat_offset, a_dim1, a_offset, i__1, i__2, i__3;
        doublereal d__1, d__2;
    
        /* Builtin functions */
        integer s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void);
        double sqrt(doublereal);
    
        /* Local variables */
        static doublereal f;
        static integer i__, j, k, l, mp, np, iz;
        static doublereal phi, rho, sum, beta, cmin, cmax;
        static integer ivmc;
        static doublereal weta;
        static integer ivmd;
        static doublereal temp, wsig, gamma;
        static integer iflag;
        static doublereal alpha, delta, denom, tempa, barmu;
        static integer nbest, ifull, iptem, jdrop;
        static doublereal ratio, vmold, parmu, error, vmnew;
        extern /* Subroutine */ int calcfc_(integer *, integer *, doublereal *, 
    	    doublereal *, doublereal *);
        static integer ibrnch;
        static doublereal edgmax, pareta, prerec, phimin, parsig;
        static integer isdirn, nfvals, izdota;
        static doublereal cvmaxm, dxsign, prerem;
        static integer iptemp;
        static doublereal resmax, cvmaxp;
        static integer idxnew;
        static doublereal resnew, trured;
        extern /* Subroutine */ int trstlp_(integer *, integer *, doublereal *, 
    	    doublereal *, doublereal *, doublereal *, integer *, integer *, 
    	    doublereal *, doublereal *, doublereal *, doublereal *, 
    	    doublereal *, doublereal *);
    
        /* Fortran I/O blocks */
        static cilist io___22 = { 0, 6, 0, fmt_10, 0 };
        static cilist io___29 = { 0, 6, 0, fmt_50, 0 };
        static cilist io___33 = { 0, 6, 0, fmt_70, 0 };
        static cilist io___34 = { 0, 6, 0, fmt_80, 0 };
        static cilist io___39 = { 0, 6, 0, fmt_210, 0 };

    Найдено в зависимостях «SlangTNG». Библиотека «COBYLA», автоматически переведённая с «Фортрана».

    /* This subroutine minimizes an objective function F(X) subject to M */
    /* inequality constraints on X, where X is a vector of variables that has */
    /* N components. The algorithm employs linear approximations to the */
    /* objective and constraint functions, the approximations being formed by */
    /* linear interpolation at N+1 points in the space of the variables. */

    https://tng.tuxfamily.org/index.php?title=Main_Page

    XYPO3BO3, 05 Декабря 2019

    Комментарии (10)
  3. PHP / Говнокод #26066

    −2

    1. 1
    Пидарашки, приведите реальный пример говнокода.

    Antifriz_otrabotanyi, 05 Декабря 2019

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

    −3

    1. 1
    Пидарашке, хуле вам нада?

    Antifriz_otrabotanyi, 05 Декабря 2019

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

    +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
    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
    setTimeout(function(){
            document.getElementById('message').innerHTML = 'Это окно браузера закончило свою работу и может быть закрыто.' +
                '<br>' +
                '<button onclick="window.close()">Закрыть окно</button>';
        },3000);
    
            function objectValues(obj) {
                var res = [];
                for (var i = 0; i < obj.length; i++) {
                    if (obj.hasOwnProperty(i)) {
                        res.push(obj[i]);
                    }
                }
                return res;
            }
    
            sendMessage = function () {
                var args = objectValues(arguments),
                    func = args.splice(1,1);
                if (typeof window.postMessage !== 'undefined') {
                    window.opener.postMessage({
                        mine: 'uLogin',
                        func: func,
                        args: args
                    }, '*');
                } else {
                    sendMessage = function () {
                        window.opener[func].apply(null, args);
                    };
                }
            };
    
            if(/fill.php/.test("'ffdfdssdffsdfewfewfewfwf','redirect','https://dfssfd/login.php'")) {
                try{
                    if(typeof window.opener.fill !== 'undefined') {
                        window.opener.fill('869becd1b998ec0add011915c7f4022e','redirect','https://asdasd/login.php');
                    } else {
                        sendMessage('869becd1b998ec0add011915c7f4022e','redirect','https://biglike.org/login.php');
                    }
                } catch(e){
                    sendMessage('869becd1b998ec0add011915c7f4022e','redirect','https://asdas/login.php');
                }
            } else {
                sendMessage('869becd1b998ec0add011915c7f4022e','redirect','https://sfdsfd/login.php');
            }
    
        window.close();

    ulogin которым пользуются миллионы

    codershitter, 02 Декабря 2019

    Комментарии (47)
  6. PHP / Говнокод #26063

    −2

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    В России почти 10 лет легально работает сервис по псевдоремонту компьютеров. Его главные жертвы — пенсионеры
    За переустановку Windows «мастера» сдирают до 200 тысяч рублей
    
    
    
    https://dailystorm.ru/obschestvo/v-rossii-pochti-10-let-legalno-rabotaet-servis-po-psevdoremontu-kompyuterov-ego-glavnye-zhertvy-pensionery?utm_source=lentach&utm_medium=ctr&utm_campaign=lentach

    ru66oH4uk, 02 Декабря 2019

    Комментарии (154)
  7. bash / Говнокод #26062

    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
    #!/bin/sh
    
    rm -rf /home/project/*
    
    FOLDER=/home/project
    cp ./*.php $FOLDER
    cp -r css img js $FOLDER
    
    FILES=$(find css js templates -type f -regex '.*.\(js\|css\|twig\)')
    for f in $FILES; do
        echo "$f"|grep twig 1>/dev/null
        r=$?
        if [ "$r" -eq 0 ]; then
            minify --type html "$f" --output $FOLDER       
        else
            minify "$f" --output $FOLDER       
        fi
    done

    лучший код, пользуйтесь
    проверено ShellCheck!

    codershitter, 01 Декабря 2019

    Комментарии (3)
  8. bash / Говнокод #26061

    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
    FILES=`find css js templates -type f -regex '.*.\(js\|css\|twig\)'`
    for f in $FILES; do
        str=`echo -n $f|rev`
        i=`expr index $str /`
        ret=`echo -n ${str:$i}|rev`
        echo $f|grep twig &>/dev/null
        r=$?
    echo $f :
        if [ "$r" -eq 0 ]; then
            minify --type html $f --output $FOLDER/$ret
        else
            minify $f --output $FOLDER/$ret
        fi
    done

    сука блядь глючит! костыли ебаные

    codershitter, 01 Декабря 2019

    Комментарии (5)
  9. Pascal / Говнокод #26060

    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
    24. 24
    25. 25
    26. 26
    procedure TForm1.Button1Click(Sender: TObject);
      var
        RequestBody,SResponseBody: TStringStream;
    
        ResponseBody: string;
    begin
    
    
      try
         RequestBody := TStringStream.Create('{"login":"user","password":"pass999"}') ;
        httpconn.HandleRedirects:=TRUE;
        IdSSLIOHandlerSocketOpenSSL1.SSLOptions.Method:=sslvSSLv23;
        //httpconn.Host:='api.owencloud.ru';
        httpconn.Request.Accept:='application/xml';
        httpconn.Request.ContentLength:=68;
        httpconn.Request.ContentType:='application/x-www-form-urlencoded';
    
        ResponseBody:=httpconn.Post('https://api.owencloud.ru/v1/auth/open', RequestBody);
        SResponseBody:=TStringStream.Create(httpconn.Post('https://api.owencloud.ru/v1/auth/open', RequestBody));
        memo1.Text:=utf8toansi(ResponseBody);
        xmldocument1.LoadFromStream(SResponseBody);
     finally
        RequestBody.Free;
        SResponseBody.Free;
     end;
    end;

    Передача в мемо волшебна, а в xml так вообще виртуозна

    untitled_001, 30 Ноября 2019

    Комментарии (15)
  10. PHP / Говнокод #26059

    +1

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    h1{color: #b60000; font-size: <?php if( $dop_for_evm==1 ){echo '3.5vw;';} else {echo '30px;';}?> line-height: 1.1;padding-right: 5%; padding-left: 5%; text-align: center;}
    h2{font-size:<?php if( $dop_for_evm==1 ){echo '2.8vw;';} else {echo '30px;';}?>padding-right: 5%; padding-left: 5%; text-align: center;}
    .h2{font-size: <?php if( $dop_for_evm==1 ){echo '2.2vw;';} else {echo '28px;';}?>padding-right: 5%; padding-left: 5%; text-align: center;}
    h3{font-size: <?php if( $dop_for_evm==1 ){echo '2.6vw;';} else {echo '29px;';}?>padding-right: 5%; padding-left: 5%; text-align: center;}
    h4{font-size: <?php if( $dop_for_evm==1 ){echo '2.6vw;';} else {echo '29px;';}?>padding-right: 5%; padding-left: 5%; text-align: center;}
    h5{font-size: <?php if( $dop_for_evm==1 ){echo '2.6vw;';} else {echo '29px;';}?>padding-right: 5%; padding-left: 5%; text-align: center;}
    h6{font-size: <?php if( $dop_for_evm==1 ){echo '2.6vw;';} else {echo '29px;';}?>padding-right: 5%; padding-left: 5%; text-align: center;}

    zooks, 30 Ноября 2019

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