1. PHP / Говнокод #18558

    +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
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    if($row198['verein_id']==$row511['verein_1'])
    {
    				$row198['neu_tore']=$row198['last_tore']+$row511['tore_1'];
    				$row198['neu_gegentore']=$row198['last_gegentore']+$row511['tore_2'];
    				$row198['neu_tordiff']=$row198['neu_tore']-$row198['neu_gegentore'];
    				$row198['neu_siege']=$row198['last_siege']+($row511['tore_1']>$row511['tore_2']);
    				$row198['neu_niederlagen']=$row198['last_niederlagen']+($row511['tore_1']<$row511['tore_2']);
    				$row198['neu_unentschieden']=$row198['last_unentschieden']+($row511['tore_1']==$row511['tore_2']);
    				$row198['neu_spiele']=$row198['last_spiele']+1;
    				$row198['last_punkte']=$row198['last_siege']*3+$row198['last_unentschieden']*1;
    				$row198['neu_punkte']=$row198['neu_siege']*3+$row198['neu_unentschieden']*1;
    }
    else if($row198['verein_id']==$row511['verein_2'])
    {
    				$row198['neu_tore']=$row198['last_tore']+$row511['tore_2'];
    				$row198['neu_gegentore']=$row198['last_gegentore']+$row511['tore_1'];
    				$row198['neu_tordiff']=$row198['neu_tore']-$row198['neu_gegentore'];
    				$row198['neu_siege']=$row198['last_siege']+($row511['tore_1']<$row511['tore_2']);
    				$row198['neu_niederlagen']=$row198['last_niederlagen']+($row511['tore_1']>$row511['tore_2']);
    				$row198['neu_unentschieden']=$row198['last_unentschieden']+($row511['tore_1']==$row511['tore_2']);
    				$row198['neu_spiele']=$row198['last_spiele']+1;
    				$row198['last_punkte']=$row198['last_siege']*3+$row198['last_unentschieden']*1;
    				$row198['neu_punkte']=$row198['neu_siege']*3+$row198['neu_unentschieden']*1;
    }

    через 5 минут заметил разницу.

    kropotor, 31 Июля 2015

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

    +3

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    if ($w>$n) {
    	print round(100/($w/$n))
    } else if ($n>$w) {
    	print round(100/($n/$w))
    }

    процентное соотношение между $w и $n

    specialforgovnocod, 31 Июля 2015

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

    −438

    1. 1
    2. 2
    root@server:/var/www/project# supervisorctl restop gunicorn
    *** Unknown syntax: restop gunicorn

    krokodil_910, 31 Июля 2015

    Комментарии (35)
  4. C# / Говнокод #18554

    +5

    1. 1
    _members[member.Member.MemberExpression.Member] = member.Member;

    В исходниках Linq2db

    vik-borisov, 31 Июля 2015

    Комментарии (1)
  5. SQL / Говнокод #18553

    −247

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    declare @col int
    set @col = 0
    
    while (select count(distinct id) from #tovar) > @col
    begin
    set @col = (select count(distinct id) from #tovar)
    	insert into #tovar (ParentID, ID, ISFOLDER, Tov) select parentID, ID, ISFOLDER, DESCR from SC23(nolock) where ISMARK = 0 and PARENTID in (select id from #tovar) 
    end

    dsfix, 30 Июля 2015

    Комментарии (1)
  6. Python / Говнокод #18552

    −74

    1. 1
    2. 2
    3. 3
    4. 4
    def foreigned(to_db='default', in_db="operator_main_dbs"):
        u""" декоратор для foreign tables """
        
        assert to_db == 'default' and in_db == "operator_main_dbs"

    Вариативность

    parabellum, 30 Июля 2015

    Комментарии (37)
  7. ActionScript / Говнокод #18551

    +421

    1. 1
    2. 2
    3. 3
    public static function isObjectDisabled(object:Object):Boolean {
            return !object.enabled;
        }

    strax, 30 Июля 2015

    Комментарии (14)
  8. Assembler / Говнокод #18550

    +69

    1. 1
    2. 2
    http://habrahabr.ru/post/263703/
    https://github.com/veryEvilMan/fl-ru-damp/issues/3#issuecomment-125602470

    Так, признавайтесь, кто приложил потные ручонки.

    bakagaijin, 30 Июля 2015

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

    +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
    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
    function variant (x0, y0, x1, y1, x2, y2, x3, y3:real):integer;
    begin
        if (x0<=x1) and (y0<=y1) and (x1<=x2) and (y1<=y2) and (x2<=x3) and (y2<=y3) or
           (x0>=x1) and (y0<=y1) and (x1>=x2) and (y1<=y2) and (x2>=x3) and (y2<=y3) or
           (x0>=x1) and (y0>=y1) and (x1>=x2) and (y1>=y2) and (x2>=x3) and (y2>=y3) or
           (x0>=x1) and (y0<=y1) and (x1>=x2) and (y1<=y2) and (x2>=x3) and (y2<=y3) then variant:=1;
        if (x0<=x1) and (y0<=y1) and (x1<=x3) and (y1<=y3) and (x3<=x2) and (y3<=y2) or
           (x0>=x1) and (y0<=y1) and (x1>=x3) and (y1<=y3) and (x3>=x2) and (y3<=y2) or
           (x0>=x1) and (y0>=y1) and (x1>=x3) and (y1>=y3) and (x3>=x2) and (y3>=y2) or
           (x0>=x1) and (y0<=y1) and (x1>=x3) and (y1<=y3) and (x3>=x2) and (y3<=y2) then variant:=2;
        if (x1<=x0) and (y1<=y0) and (x0<=x2) and (y0<=y2) and (x2<=x3) and (y2<=y3) or
           (x1>=x0) and (y1<=y0) and (x0>=x2) and (y0<=y2) and (x2>=x3) and (y2<=y3) or
           (x1>=x0) and (y1>=y0) and (x0>=x2) and (y0>=y2) and (x2>=x3) and (y2>=y3) or
           (x1>=x0) and (y1<=y0) and (x0>=x2) and (y0<=y2) and (x2>=x3) and (y2<=y3) then variant:=3;
        if (x1<=x0) and (y1<=y0) and (x0<=x3) and (y0<=y3) and (x3<=x2) and (y3<=y2) or
           (x1>=x0) and (y1<=y0) and (x0>=x3) and (y0<=y3) and (x3>=x2) and (y3<=y2) or
           (x1>=x0) and (y1>=y0) and (x0>=x3) and (y0>=y3) and (x3>=x2) and (y3>=y2) or
           (x1>=x0) and (y1<=y0) and (x0>=x3) and (y0<=y3) and (x3>=x2) and (y3<=y2) then variant:=4;
        if (x0<=x3) and (y0<=y3) and (x3<=x1) and (y3<=y1) and (x1<=x2) and (y1<=y2) or
           (x0>=x3) and (y0<=y3) and (x3>=x1) and (y3<=y1) and (x1>=x2) and (y1<=y2) or
           (x0>=x3) and (y0>=y3) and (x3>=x1) and (y3>=y1) and (x1>=x2) and (y1>=y2) or
           (x0>=x3) and (y0<=y3) and (x3>=x1) and (y3<=y1) and (x1>=x2) and (y1<=y2) then variant:=5;
        if (x0<=x3) and (y0<=y3) and (x3<=x2) and (y3<=y2) and (x2<=x1) and (y2<=y1) or
           (x0>=x3) and (y0<=y3) and (x3>=x2) and (y3<=y2) and (x2>=x1) and (y2<=y1) or
           (x0>=x3) and (y0>=y3) and (x3>=x2) and (y3>=y2) and (x2>=x1) and (y2>=y1) or
           (x0>=x3) and (y0<=y3) and (x3>=x2) and (y3<=y2) and (x2>=x1) and (y2<=y1) then variant:=6;
        if (x0<=x2) and (y0<=y2) and (x2<=x1) and (y2<=y1) and (x1<=x3) and (y1<=y3) or
           (x0>=x2) and (y0<=y2) and (x2>=x1) and (y2<=y1) and (x1>=x3) and (y1<=y3) or
           (x0>=x2) and (y0>=y2) and (x2>=x1) and (y2>=y1) and (x1>=x3) and (y1>=y3) or
           (x0>=x2) and (y0<=y2) and (x2>=x1) and (y2<=y1) and (x1>=x3) and (y1<=y3) then variant:=7;
        if (x0<=x2) and (y0<=y2) and (x2<=x3) and (y2<=y3) and (x3<=x1) and (y3<=y1) or
           (x0>=x2) and (y0<=y2) and (x2>=x3) and (y2<=y3) and (x3>=x1) and (y3<=y1) or
           (x0>=x2) and (y0>=y2) and (x2>=x3) and (y2>=y3) and (x3>=x1) and (y3>=y1) or
           (x0>=x2) and (y0<=y2) and (x2>=x3) and (y2<=y3) and (x3>=x1) and (y3<=y1) then variant:=8;
        if (x1<=x2) and (y1<=y2) and (x2<=x0) and (y2<=y0) and (x0<=x3) and (y0<=y3) or
           (x1>=x2) and (y1<=y2) and (x2>=x0) and (y2<=y0) and (x0>=x3) and (y0<=y3) or
           (x1>=x2) and (y1>=y2) and (x2>=x0) and (y2>=y0) and (x0>=x3) and (y0>=y3) or
           (x1>=x2) and (y1<=y2) and (x2>=x0) and (y2<=y0) and (x0>=x3) and (y0<=y3) then variant:=9;
        if (x1<=x3) and (y1<=y3) and (x3<=x0) and (y3<=y0) and (x0<=x2) and (y0<=y2) or
           (x1>=x3) and (y1<=y3) and (x3>=x0) and (y3<=y0) and (x0>=x2) and (y0<=y2) or
           (x1>=x3) and (y1>=y3) and (x3>=x0) and (y3>=y0) and (x0>=x2) and (y0>=y2) or
           (x1>=x3) and (y1<=y3) and (x3>=x0) and (y3<=y0) and (x0>=x2) and (y0<=y2) then variant:=10;
        if (x2<=x0) and (y2<=y0) and (x0<=x1) and (y0<=y1) and (x1<=x3) and (y1<=y3) or
           (x2>=x0) and (y2<=y0) and (x0>=x1) and (y0<=y1) and (x1>=x3) and (y1<=y3) or
           (x2>=x0) and (y2>=y0) and (x0>=x1) and (y0>=y1) and (x1>=x3) and (y1>=y3) or
           (x2>=x0) and (y2<=y0) and (x0>=x1) and (y0<=y1) and (x1>=x3) and (y1<=y3) then variant:=11;
        if (x2<=x1) and (y2<=y1) and (x1<=x0) and (y1<=y0) and (x0<=x3) and (y0<=y3) or
           (x2>=x1) and (y2<=y1) and (x1>=x0) and (y1<=y0) and (x0>=x3) and (y0<=y3) or
           (x2>=x1) and (y2>=y1) and (x1>=x0) and (y1>=y0) and (x0>=x3) and (y0>=y3) or
           (x2>=x1) and (y2<=y1) and (x1>=x0) and (y1<=y0) and (x0>=x3) and (y0<=y3) then variant:=12;
    end;

    Источник: http://e-olimp.blogspot.com/2013/08/12.html

    Felytic, 29 Июля 2015

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

    +1001

    1. 1
    2. 2
    3. 3
    if ($captcha_url != '' && 1 == 1) {
            //echo $html;
            require('antigate.php');

    Интересно, зачем потребовалось единицы сравнивать

    OnlyFirster, 28 Июля 2015

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