1. C# / Говнокод #18554

    +5

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

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

    vik-borisov, 31 Июля 2015

    Комментарии (1)
  2. 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)
  3. 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)
  4. ActionScript / Говнокод #18551

    +421

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

    strax, 30 Июля 2015

    Комментарии (14)
  5. 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)
  6. 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)
  7. PHP / Говнокод #18543

    +1001

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

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

    OnlyFirster, 28 Июля 2015

    Комментарии (52)
  8. C++ / Говнокод #18542

    +1000

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    uint16_t swap_bytes(uint16_t a){
      uint16_t tmp = *((uint8_t*)&a+1);
      *(((uint8_t*)&tmp)+1) = *((uint8_t*)&a);
      return tmp;
    }

    radmir, 28 Июля 2015

    Комментарии (23)
  9. Python / Говнокод #18541

    −74

    1. 1
    2. 2
    # django
    user=User.objects.get(username=request.user.username)

    ruslux, 28 Июля 2015

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

    +1001

    1. 1
    'used strict'

    Уже "попользовался" strict

    Оригинал: https://github.com/tischenkoa/portfolio-front-end-javascript/blob/master/24_task_(Ajax_loading_comics)/loadimg.js#L4

    volter9, 27 Июля 2015

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