1. Лучший говнокод

    В номинации:
    За время:
  2. 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)
  3. Куча / Говнокод #28092

    +1

    1. 1
    Петух иньо забыл продлить домен

    inho-pidar, 25 Марта 2022

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

    +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
    mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
    $mysql = new mysqli($host, $db_user, $db_pass, $db_name);
    mysqli_set_charset($mysql, "utf8");
    
    
    $region = mysqli_query($mysql, "SELECT *  FROM `rubric_subsection`");
    while ($rows_rubriki = mysqli_fetch_array($region)) 
    {
    	
    //	$razdel = mysqli_query($mysql, "SELECT *  FROM `city_region` LIMIT 1");
    	//while ($raz = mysqli_fetch_array($razdel)) {
    	
    $rubriki = mysqli_query($mysql, "SELECT `region`, `subsection`, COUNT(region) as count FROM `big_baza` where `region` =  'Республика Бурятия' AND `subsection` = '".$rows_rubriki['name']."'");
    $data = mysqli_fetch_assoc($rubriki);
    echo ''.$rows_rubriki['name'].' / '.$data['count'].'<br>';
    //mysqli_query($mysql,  "INSERT INTO `calculator_region`(`id`, `region_id`, `subsection_id`, `count`) VALUES ('','".$raz['id']."','".$rows_rubriki['id']."','".$data['count']."')");
    
    //	}
    
    }

    dlyaspama7771, 16 Марта 2022

    Комментарии (2)
  5. C# / Говнокод #28078

    +1

    1. 1
    https://habr.com/ru/post/655085/

    эксель быстрее шарпов, шах и мат дотнетчики...

    kcalbCube, 11 Марта 2022

    Комментарии (100)
  6. Си / Говнокод #28061

    +1

    1. 1
    2. 2
    3. 3
    4. 4
    #pragma aux __cdecl "_*"                            \
                    parm caller [ ]                          \
                    value struct float struct routine [eax] \
                    modify [eax ecx edx]

    kcalbCube, 28 Февраля 2022

    Комментарии (11)
  7. Си / Говнокод #28058

    +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
    #include <stdio.h>
    
    int main(void)
    {
    	(
    		*********************
    		**  **     ** ***** *
    		* ** * **** ** *** **
    		* ** * **** *** * ***
    		* ** * **** **** ****
    		* ** * **** *** * ***
    		* ** **    *** *** **
    		*********************
    	printf)("pidor");
    }

    kcalbCube, 26 Февраля 2022

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

    +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
    static char *cast_table[][11] = {
      // i8   i16     i32     i64     u8     u16     u32     u64     f32     f64     f80
      {NULL,  NULL,   NULL,   i32i64, i32u8, i32u16, NULL,   i32i64, i32f32, i32f64, i32f80}, // i8
      {i32i8, NULL,   NULL,   i32i64, i32u8, i32u16, NULL,   i32i64, i32f32, i32f64, i32f80}, // i16
      {i32i8, i32i16, NULL,   i32i64, i32u8, i32u16, NULL,   i32i64, i32f32, i32f64, i32f80}, // i32
      {i32i8, i32i16, NULL,   NULL,   i32u8, i32u16, NULL,   NULL,   i64f32, i64f64, i64f80}, // i64
    
      {i32i8, NULL,   NULL,   i32i64, NULL,  NULL,   NULL,   i32i64, i32f32, i32f64, i32f80}, // u8
      {i32i8, i32i16, NULL,   i32i64, i32u8, NULL,   NULL,   i32i64, i32f32, i32f64, i32f80}, // u16
      {i32i8, i32i16, NULL,   u32i64, i32u8, i32u16, NULL,   u32i64, u32f32, u32f64, u32f80}, // u32
      {i32i8, i32i16, NULL,   NULL,   i32u8, i32u16, NULL,   NULL,   u64f32, u64f64, u64f80}, // u64
    
      {f32i8, f32i16, f32i32, f32i64, f32u8, f32u16, f32u32, f32u64, NULL,   f32f64, f32f80}, // f32
      {f64i8, f64i16, f64i32, f64i64, f64u8, f64u16, f64u32, f64u64, f64f32, NULL,   f64f80}, // f64
      {f80i8, f80i16, f80i32, f80i64, f80u8, f80u16, f80u32, f80u64, f80f32, f80f64, NULL},   // f80
    };

    красивое

    kcalbCube, 26 Февраля 2022

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

    +1

    1. 1
    2. 2
    if x == 2 or 3: # если x равен 2 или 3
        print('Пыщь.')

    Вот уже не впервый раз натыкаюсь на подобный "машинный перевод с русского на питон".

    Vindicar, 25 Февраля 2022

    Комментарии (6)
  10. C++ / Говнокод #28035

    +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
    constexpr int add(int a, int b) 
    {
        return a + b;
    }
    
    static_assert(1 |> add(2) == and(1, 2));
    
    FILE* file = fopen( “a.txt”, “wb” );
    if (file) {
        fputs(“Hello world”, file);
        file |> fseek(9, SEEK_SET);
        file |> fclose();
    }
    
    auto dangerous_teams(std::string const& s) -> bool {
        return s
             |> views::group_by(std::equal_to{})
             |> views::transform(ranges::distance)
             |> ranges::any_of([](std::size_t s){
                    return s >= 7;
                });
    }

    http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2011r0.html

    какой C++)))

    kcalbCube, 19 Февраля 2022

    Комментарии (48)
  11. C++ / Говнокод #28016

    +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
    #include <stdio.h>
    #include <stdint.h>
    
    int main(void)
    {
    	bool a = 0;
    	*((uint8_t*)&a) = 2;
    	if(!a)
    		printf("a false\n");
    	else
    		printf("a true\n");
    
    	return 0;
    
    }
    
    ------
    .LC1:
            .string "a true"
    main:
            push    rax
            mov     edi, OFFSET FLAT:.LC1
            call    puts
            xor     eax, eax
            pop     rdx
            ret

    какой ID)))

    digitalEugene, 15 Февраля 2022

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