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

    0

    1. 1
    Пиздец-оффтоп #46

    #16: https://govnokod.ru/27328 https://govnokod.xyz/_27328
    #17: https://govnokod.ru/27346 https://govnokod.xyz/_27346
    #18: https://govnokod.ru/27374 https://govnokod.xyz/_27374
    #19: https://govnokod.ru/27468 https://govnokod.xyz/_27468
    #20: https://govnokod.ru/27469 https://govnokod.xyz/_27469
    #21: https://govnokod.ru/27479 https://govnokod.xyz/_27479
    #22: https://govnokod.ru/27485 https://govnokod.xyz/_27485
    #23: https://govnokod.ru/27493 https://govnokod.xyz/_27493
    #24: https://govnokod.ru/27501 https://govnokod.xyz/_27501
    #25: https://govnokod.ru/27521 https://govnokod.xyz/_27521
    #26: https://govnokod.ru/27545 https://govnokod.xyz/_27545
    #27: https://govnokod.ru/27572 https://govnokod.xyz/_27572
    #28: https://govnokod.ru/27580 https://govnokod.xyz/_27580
    #29: https://govnokod.ru/27738 https://govnokod.xyz/_27738
    #30: https://govnokod.ru/27751 https://govnokod.xyz/_27751
    #31: https://govnokod.ru/27754 https://govnokod.xyz/_27754
    #32: https://govnokod.ru/27786 https://govnokod.xyz/_27786
    #33: https://govnokod.ru/27801 https://govnokod.xyz/_27801
    #34: https://govnokod.ru/27817 https://govnokod.xyz/_27817
    #35: https://govnokod.ru/27822 https://govnokod.xyz/_27822
    #36: https://govnokod.ru/27826 https://govnokod.xyz/_27826
    #37: https://govnokod.ru/27827 https://govnokod.xyz/_27827
    #38: https://govnokod.ru/27833 https://govnokod.xyz/_27833
    #39: https://govnokod.ru/27862 https://govnokod.xyz/_27862
    #40: https://govnokod.ru/27869 https://govnokod.xyz/_27869
    #41: https://govnokod.ru/27933 https://govnokod.xyz/_27933
    #42: https://govnokod.ru/27997 https://govnokod.xyz/_27997
    #43: https://govnokod.ru/28042 https://govnokod.xyz/_28042
    #44: https://govnokod.ru/28080 https://govnokod.xyz/_28080
    #45: https://govnokod.ru/28086 https://govnokod.xyz/_28086

    nepeKamHblu_nemyx, 03 Апреля 2022

    Комментарии (495)
  2. Python / Говнокод #28104

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    def _generate_greeting(self) -> str:
        date = datetime.datetime.fromtimestamp(time.time(), pytz.timezone(config.TIMEZONE))
        if 6 <= date.hour < 11:
            return 'Доброе утро!'
        elif 11 <= date.hour < 18:
            return 'Добрый день.'
        elif 18 <= date.hour < 23:
            return 'Добрый вечер.'
        else:
            return 'Доброй ночи.'

    ISO, 03 Апреля 2022

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

    0

    1. 1
    Политота #12

    #1: https://govnokod.ru/15804 https://govnokod.xyz/_15804
    #2: https://govnokod.ru/19910 https://govnokod.xyz/_19910
    #3: https://govnokod.ru/23643 https://govnokod.xyz/_23643
    #4: (vanished) https://govnokod.xyz/_24822
    #5: https://govnokod.ru/24868 https://govnokod.xyz/_24868
    #6: (vanished) https://govnokod.xyz/_26648
    #7: https://govnokod.ru/26673 https://govnokod.xyz/_26673
    #8: https://govnokod.ru/27052 https://govnokod.xyz/_27052
    #9: https://govnokod.ru/27852 https://govnokod.xyz/_27852
    #10: https://govnokod.ru/28060 https://govnokod.xyz/_28060
    #11: https://govnokod.ru/28091 https://govnokod.xyz/_28091

    nepeKamHblu_nemyx, 02 Апреля 2022

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

    +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
    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
    <?php defined('SYSPATH') or die('No direct script access.');
    /*
     * Базовый класс главной страницы
     */
    class Controller_Index extends Controller {
    
    
            public function before() {
                    parent::before();
                    I18n::lang('ru');
                    $settings = Kohana::config('settings');
                    Cookie::$salt = 'asd12d2';
                    Session::$default = 'cookie';
                    $this->session = Session::instance();
            }
    
        public function action_index() {
    
            //Путь до файла первоночального xml (xsl)
            $path_xml='tpl/xml.xsl';
            //Путь конечного xsl
            $path_xsl='tpl/index.xsl';
    
            $url = $this->request->param('stuff');
                    //print_r($_SERVER);
                    /*if($_SERVER ['REQUEST_URI']=='/'){
                            $this->request->redirect($_SERVER ['HTTP_X_FORWARDED_PROTO'].'://'.$_SERVER['HTTP_HOST'],'301');
                    }*/
            if(empty($url)){
                $url='/';
            }
    
    
            $htmlfile='cache-html/'.md5($url);
    $allurl=$_SERVER ['REQUEST_URI'];
    if($allurl=='/20-40-kvm') $this->request->redirect('/sadovye-domiki','301');
    if($allurl=='/40-80-kvm') $this->request->redirect('/sadovye-domiki','301');
    if($allurl=='/80-i-bolee-kvm') $this->request->redirect('/sadovye-domiki','301');
    
    if($allurl=='/nashi-proecty?searcher=48291&section=3924&destination%5B%5D=0&destination%5B%5D=1&destination%5B%5D=2&technology%5B%5D=0&floors%5B%5D=1&floors%5B%5D=1.5&floors%5B%5D=2&price=0-3000000&area=0-400') $this->request->redirect('/sadovye-domiki','301');
    
    if($allurl=='/nashi-proecty?searcher=48291&section=3924&destination%5B%5D=1&technology%5B%5D=0&technology%5B%5D=1&technology%5B%5D=2&floors%5B%5D=1&floors%5B%5D=1.5&floors%5B%5D=2&price=0-3000000&area=81-400') $this->request->redirect('/80-i-bolee-kvm','301');
    
    if($allurl=='/nashi-proecty?searcher=48291&section=3924&destination%5B%5D=1&technology%5B%5D=0&technology%5B%5D=1&technology%5B%5D=2&floors%5B%5D=1&floors%5B%5D=1.5&floors%5B%5D=2&price=0-3000000&area=40-80') $this->request->redirect('/40-80-kvm','301');
    
    if($allurl=='/nashi-proecty?searcher=48291&section=3924&destination%5B%5D=0&technology%5B%5D=0&technology%5B%5D=1&technology%5B%5D=2&floors%5B%5D=1&floors%5B%5D=1.5&floors%5B%5D=2&price=0-3000000&area=0-400') $this->request->redirect('/stroitelstvo-dachnyh-domov','301');
    
    if($allurl=='/nashi-proecty?searcher=48291&section=3924&destination%5B%5D=2&technology%5B%5D=0&technology%5B%5D=1&technology%5B%5D=2&technology%5B%5D=3&floors%5B%5D=1&floors%5B%5D=1.5&floors%5B%5D=2&price=0-3000000&area=0-400') $this->request->redirect('/kottedzhi','301');
    
    if($allurl=='/nashi-proecty?searcher=48291&section=3924&destination%5B%5D=3&technology%5B%5D=0&technology%5B%5D=2&technology%5B%5D=3&floors%5B%5D=1&floors%5B%5D=1.5&price=0-3000000&area=0-400') $this->request->redirect('/bani','301');
    
    if($allurl=='/nashi-proecty?searcher=48291&section=3924&destination%5B%5D=3&technology%5B%5D=2&floors%5B%5D=1&floors%5B%5D=1.5&price=0-3000000&area=0-400') $this->request->redirect('/bani-iz-profilirovannogo-brusa','301');
    
    if($allurl=='/nashi-proecty?searcher=48291&section=3924&destination%5B%5D=3&technology%5B%5D=0&floors%5B%5D=1&floors%5B%5D=1.5&price=0-3000000&area=0-400') $this->request->redirect('/karkasnye-bani','301');
    
    if($allurl=='/nashi-proecty?searcher=48291&section=3924&destination%5B%5D=3&technology%5B%5D=3&floors%5B%5D=1&floors%5B%5D=1.5&floors%5B%5D=2&price=0-3000000&area=0-400') $this->request->redirect('/bani-iz-ocilindrovannogo-brevna','301');
    
    if($allurl=='/nashi-proecty?searcher=48291&section=3924&destination%5B%5D=0&destination%5B%5D=1&destination%5B%5D=2&technology%5B%5D=2&floors%5B%5D=1&floors%5B%5D=1.5&floors%5B%5D=2&price=316018-3000000&area=0-400') $this->request->redirect('/brus','301');
    
    if($allurl=='/nashi-proecty?searcher=48291&section=3924&destination%5B%5D=0&destination%5B%5D=1&destination%5B%5D=2&technology%5B%5D=2&floors%5B%5D=1&floors%5B%5D=1.5&floors%5B%5D=2&price=0-3000000&area=0-400') $this->request->redirect('/kottedzhi-profilirovannyj-brus','301');
    
    if($allurl=='/nashi-proecty?searcher=48291&section=3924&destination%5B%5D=0&destination%5B%5D=1&destination%5B%5D=2&technology%5B%5D=0&floors%5B%5D=1&floors%5B%5D=1.5&floors%5B%5D=2&price=329056-3000000&area=0-400') $this->request->redirect('/dachnye-doma-karkasnaya-tehnologiya','301');
    
    if($allurl=='/nashi-proecty?searcher=48291&section=3924&destination%5B%5D=0&destination%5B%5D=1&destination%5B%5D=2&technology%5B%5D=1&floors%5B%5D=1&floors%5B%5D=1.5&floors%5B%5D=2&price=0-3000000&area=0-400') $this->request->redirect('/individualnye-proekty','301');

    Там ещё дальше веселье продолжается, но гк не дает запостить больше

    YpaHeLI_, 02 Апреля 2022

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

    0

    1. 1
    Борманд, у тебя спина рыжая!

    Ха-ха, я пошутил, с первым апреля )))

    JloJle4Ka, 01 Апреля 2022

    Комментарии (22)
  6. Pascal / Говнокод #28100

    +1

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    function rand:LongInt;
    {$IFOPT J-} {$J+} {$DEFINE NoJ} {$ENDIF}
    const next:LongInt=1;
    {$IFDEF NoJ} {$J-} {$UNDEF NoJ} {$ENDIF}
    begin
    next:=next*1103515245+12345;
    Result:=(next div 65536) mod 32768;
    end;

    Краткая инструкция как сделать static unsigned long int на Delphi.

    KOTOM, 31 Марта 2022

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

    0

    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
    .org 80h
    src: db "++++++++++[>+++++++>++++++++++>+++<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+."
    table:
    	db 0h db 3Eh dw @i1
    	db 0h db 3Ch dw @i2
    	db 0h db 2Bh dw @i3
    	db 0h db 2Dh dw @i4
    	db 0h db 5Dh dw @i5
    	db 0h db 2Eh dw @i6
    	db 0h db 5Bh dw @i7
    start: ; %a iptr %b dptr ;
    	.loop:
    		mov %cl [%a + @src]
    		cmp %cl 0h
    		je @.loop.break
    		mov %si 0h
    		.tloop:
    			mov %ch [4h * %si + {@table + 1h}]
    			cmp %cl %ch
    			jne @.tloop.continue
    				push @.tloop.break
    				mov %ip [4h * %si + {@table + 2h}]
    			.tloop.continue:
    			inc %si
    			cmp %si 8h
    			jl @.tloop
    			.tloop.break:
    		inc %a
    		jmp @.loop
    		.loop.break: 
    	int 0h
    i1: ; > ; 
    	inc %b ret
    i2: ; < ; 
    	dec %b ret
    i3: ; + ;
    	push %el
    	mov %el [%b + @data]
    	inc %el
    	mov [%b + @data] %el
    	pop %el
    	ret
    i4: ; - ;
    	push %el
    	mov %el [%b + @data]
    	dec %el
    	mov [%b + @data] %el
    	pop %el
    	ret
    i5: ; ] ;
    	push %c
    	mov %cl [%b + @data]
    	cmp %cl 0h
    	je @.loop.break
    	mov %c 0h
    	dec %a
    	.loop:
    		cmpb [%a + @src] 5Dh ; ']' ;
    		jne @.loop.1
    			inc %c
    		.loop.1:
    		cmpb [%a + @src] 5Bh ; '[' ;
    		jne @.loop.2
    			cmp %c 0h
    			jz @.loop.break
    			dec %c
    		.loop.2:
    		loop %a @.loop
    	.loop.break:
    	pop %c
    	ret
    i6: ; . ;
    	push %cl
    	outb E9h [%b + @data]
    	.wait:
    		inb %cl E9h
    		cmp %cl 0h
    		jne @.wait
    	pop %cl
    	ret
    i7: ; [ ;
    	push %c
    	mov %c [%b + @data]
    	cmp %c 0h
    	jne @.loop.break
    	mov %c 0h
    	.loop:
    		cmpb [%a + @src] 5Bh ; '[' ;
    		jne @.loop.1
    			inc %c
    		.loop.1:
    		cmpb [%a + @src] 5Dh ; ']' ;
    		jne @.loop.2
    			cmp %c 0h
    			jz @.loop.break
    				dec %c
    		.loop.2:
    		inc %a
    		jmp @.loop
    	.loop.break: pop %c ret

    Hello World!

    kcalbCube, 31 Марта 2022

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

    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
    .org {5h * 2h}
    dw @int5
    
    .org 30h
    data:
    	db "10"
    
    .org 80h
    start:
    	mov %sp FFFFh
    	mov %al {3h * 2h}
    	int 5h
    	int 0h
    
    int5:
    	push %a
    	mov %ah [{@data + 1h}]
    	add %al %ah
    	outb E9h %al
    	.wait:
    		inb %al E9h
    		cmp %al 0h
    		jne @.wait
    	pop %a
    	rei

    встречайте новую фичу

    kcalbCube, 30 Марта 2022

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

    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
    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
    procedure TF_dvij.rg_sortClick(Sender: TObject);
    var k :Integer;
        s,str1,str2 :string;
        fl :boolean;
    begin
    if G.Columns[9].Visible then
    begin
      fl := Q_dvij.Active ;
      with Q_dvij do
      begin
        if fl then k := RecNo;
        if rg_sort.ItemIndex=0 then s:='order by obd,gr,exped,grot'
        else
        if rg_sort.ItemIndex=1 then s:='order by exped,gr,obd,grot'
        else
        if rg_sort.ItemIndex=2 then s:='order by gr,vp,exped,obd,grot'
        else
        if rg_sort.ItemIndex=3 then s:='order by id_korr,exped,obd,gr,grot'
        else
        if rg_sort.ItemIndex=4 then s:='order by grot,gr,exped,obd'
        else
          s:='order by strn,obd,gr,exped,grot';
          
        if rg_sort.ItemIndex=3 then
          begin
            str1 := 'select vp, id_korr,' ;           //100
            str2 := 'group by 1,2,3,4,5,6,7,8'          //192
          end
        else
          begin
            str1 := 'select vp, max(id_korr) as id_korr,' ;
            str2 := 'group by 1,3,4,5,6,7,8'
          end  ;
    
        Active:=false;
        SQL.Delete(100);
        SQL.Insert(100, str1 );
        SQL.Delete(192);
        SQL.Insert(192, str2 );
        SQL.Delete(262);
        SQL.Insert(262, s);
        Active:= fl;
        if fl then RecNo := k;
        G.Refresh;
      end;
    end;

    сортировОЧКА

    Baiumka, 29 Марта 2022

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

    0

    1. 1
    #exclude <conio.h>

    конио

    3_dar, 29 Марта 2022

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