1. SQL / Говнокод #2537

    −149.2

    1. 1
    2. 2
    3. 3
    4. 4
    create table money_transaction(
    ...
    summa clob
    );

    подготовка к гиперинфляции

    dim1r, 03 Февраля 2010

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

    +101.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
    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
    if (imageContent != null)
                   context.Response.OutputStream.Write(imageContent, 0, imageContent.Length);
               else
               {
                   byte[] x = {0xff, 0xd8, 0xff, 0xe0, 0x0, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x0, 0x1, 0x2, 0x0, 0x0, 0x64, 
    0x0, 0x64, 0x0, 0x0, 0xff, 0xec, 0x0, 0x11, 0x44, 0x75, 0x63, 0x6b, 0x79, 0x0, 0x1, 0x0, 
    0x4, 0x0, 0x0, 0x0, 0x1b, 0x0, 0x0, 0xff, 0xee, 0x0, 0xe, 0x41, 0x64, 0x6f, 0x62, 0x65, 
    0x0, 0x64, 0xc0, 0x0, 0x0, 0x0, 0x1, 0xff, 0xdb, 0x0, 0x84, 0x0, 0x11, 0xc, 0xc, 0xc, 
    0xd, 0xc, 0x11, 0xd, 0xd, 0x11, 0x19, 0x10, 0xe, 0x10, 0x19, 0x1d, 0x16, 0x11, 0x11, 0x16, 
    0x1d, 0x22, 0x17, 0x17, 0x17, 0x17, 0x17, 0x22, 0x21, 0x1a, 0x1d, 0x1c, 0x1c, 0x1d, 0x1a, 0x21, 
    0x21, 0x26, 0x28, 0x2b, 0x28, 0x26, 0x21, 0x34, 0x34, 0x38, 0x38, 0x34, 0x34, 0x41, 0x41, 0x41, 
    0xff, 0xc4, 0x0, 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 0x4c, 0x40, 0xbd, 0xa0, 0x58, 0x71, 0x6b, 0x9b, 0x95, 0xbd, 0xa6, 0x37, 
    0x6e, 0x71, 0x49, 0x15, 0x98, 0xd5, 0x58, 0xae, 0x95, 0xaa, 0xc7, 0x48, 0xd4, 0x44, 0x56, 0xbf, 
    0xb, 0xde, 0x5c, 0x94, 0x7c, 0x6b, 0x91, 0xae, 0xfc, 0xcb, 0x2e, 0x5a, 0xdf, 0x65, 0x5a, 0xce, 
    0x6b, 0x55, 0xaa, 0xff, 0x0, 0x13, 0x3a, 0xb3, 0xf3, 0x19, 0x8c, 0x60, 0xbc, 0x0, 0x0, 0x0, 
    0xf8, 0x53, 0xd3, 0x82, 0xf4, 0x1, 0x94, 0xda, 0x39, 0xad, 0x3f, 0xd, 0xb4, 0xf7, 0xad, 0x54, 
    0xaf, 0xc2, 0x88, 0xc9, 0x56, 0x46, 0xae, 0x97, 0xb9, 0x3c, 0xbd, 0x13, 0xd5, 0x55, 0xf2, 0xe7, 
    0xa7, 0xc2, 0x75, 0x5f, 0xe7, 0x1b, 0x5, 0x48, 0xd5, 0x62, 0x9d, 0x6d, 0x4b, 0x8f, 0x56, 0x38, 
    0x91, 0x57, 0x3d, 0xee, 0x54, 0x46, 0xa1, 0x6f, 0x73, 0x6c, 0xdb, 0xaf, 0x63, 0xed, 0x95, 0xa2, 
    0x9d, 0x53, 0xa2, 0x2b, 0xd8, 0x8e, 0x72, 0x77, 0x2f, 0x6a, 0x10, 0xd5, 0xd8, 0xb6, 0x6a, 0x8f, 
    0xf1, 0x2b, 0xd2, 0x86, 0x39, 0x13, 0xb1, 0xe8, 0xc4, 0x57, 0x27, 0x72, 0xae, 0x55, 0x0, 0xa1, 
    0xe0, 0x14, 0xae, 0x57, 0xad, 0x72, 0xcd, 0x98, 0x5d, 0xb, 0x2d, 0x48, 0xd7, 0x44, 0x8f, 0xe8, 
    0xaa, 0x89, 0xab, 0x2b, 0x85, 0xeb, 0x8f, 0x58, 0xd7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0xff, 0xd9};

    'Канал форума программистов VIngrad
    p.s. пришлось убрать большую часть байтов.

    Nemerle, 03 Февраля 2010

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

    +167.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
    $('.tr_t:eq(0)').css('color', '#CCCCCC');
    $('.tr_t:eq(2)').css('color', '#CCCCCC');
    $('.tr_t:eq(4)').css('color', '#CCCCCC');
    $('.tr_t:eq(6)').css('color', '#CCCCCC');
    $('.tr_t:eq(8)').css('color', '#CCCCCC');
    $('.tr_t:eq(10)').css('color', '#CCCCCC');
    $('.tr_t:eq(12)').css('color', '#CCCCCC');
    $('.tr_t:eq(14)').css('color', '#CCCCCC');
    $('.tr_t:eq(16)').css('color', '#CCCCCC');
    $('.tr_t:eq(18)').css('color', '#CCCCCC');
    $('.tr_t:eq(20)').css('color', '#CCCCCC');
    $('.tr_t:eq(22)').css('color', '#CCCCCC');

    раскраска таблицы "зеброй".

    fuckyounoob, 03 Февраля 2010

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

    +167.8

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    9. 9
    //--------------------------------
    if ( $language == "language/german.php"     ) { echo '<a href="config/admin.php?lang=de"><img style="vertical-align:middle;" src="'.$theme.'/menu/admin.png" alt="" onmouseover="Tip(\''.$lang_menue[5].'\', OFFSETX, -20, OFFSETY, 22, OPACITY, 90, SHADOW, true, BGIMG, \'images/tooltip_bg.gif\', FADEIN, 500, FADEOUT, 400);" onmouseout="UnTip();" /></a><img style="vertical-align:middle;" src="images/pixel.gif" width="12" height="12" alt="" />'; }
    if ( $language == "language/english.php"    ) { echo '<a href="config/admin.php?lang=en"><img style="vertical-align:middle;" src="'.$theme.'/menu/admin.png" alt="" onmouseover="Tip(\''.$lang_menue[5].'\', OFFSETX, -20, OFFSETY, 22, OPACITY, 90, SHADOW, true, BGIMG, \'images/tooltip_bg.gif\', FADEIN, 500, FADEOUT, 400);" onmouseout="UnTip();" /></a><img style="vertical-align:middle;" src="images/pixel.gif" width="12" height="12" alt="" />'; }
    
    // ... ещё до$#& "языков". В сумме 15
    
    if ( $language == "language/serbian.php"    ) { echo '<a href="config/admin.php?lang=rs"><img style="vertical-align:middle;" src="'.$theme.'/menu/admin.png" alt="" onmouseover="Tip(\''.$lang_menue[5].'\', OFFSETX, -20, OFFSETY, 22, OPACITY, 90, SHADOW, true, BGIMG, \'images/tooltip_bg.gif\', FADEIN, 500, FADEOUT, 400);" onmouseout="UnTip();" /></a><img style="vertical-align:middle;" src="images/pixel.gif" width="12" height="12" alt="" />'; }
    if ( $language == "language/finnish.php"    ) { echo '<a href="config/admin.php?lang=fi"><img style="vertical-align:middle;" src="'.$theme.'/menu/admin.png" alt="" onmouseover="Tip(\''.$lang_menue[5].'\', OFFSETX, -20, OFFSETY, 22, OPACITY, 90, SHADOW, true, BGIMG, \'images/tooltip_bg.gif\', FADEIN, 500, FADEOUT, 400);" onmouseout="UnTip();" /></a><img style="vertical-align:middle;" src="images/pixel.gif" width="12" height="12" alt="" />'; }
               //--------------------------------

    С того же говнодвижка PHP Web Stat

    vov4ik, 03 Февраля 2010

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

    +169.8

    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
    if ( ( $_GET [ "lang" ] ) || ( $_POST [ "lang" ] ) )
     {
      if ( ( $_GET [ "lang" ] == "de" ) || ( $_POST [ "lang" ] == "de" ) ) { include ( "../language/german_setup.php"     ); $lang = "de"; }
      if ( ( $_GET [ "lang" ] == "en" ) || ( $_POST [ "lang" ] == "en" ) ) { include ( "../language/english_setup.php"    ); $lang = "en"; }
      if ( ( $_GET [ "lang" ] == "nl" ) || ( $_POST [ "lang" ] == "nl" ) ) { include ( "../language/dutch_setup.php"      ); $lang = "nl"; }
      if ( ( $_GET [ "lang" ] == "it" ) || ( $_POST [ "lang" ] == "it" ) ) { include ( "../language/italian_setup.php"    ); $lang = "it"; }
      if ( ( $_GET [ "lang" ] == "es" ) || ( $_POST [ "lang" ] == "es" ) ) { include ( "../language/spanish_setup.php"    ); $lang = "es"; }
      if ( ( $_GET [ "lang" ] == "fa" ) || ( $_POST [ "lang" ] == "fa" ) ) { include ( "../language/farsi_setup.php"      ); $lang = "fa"; }
      if ( ( $_GET [ "lang" ] == "dk" ) || ( $_POST [ "lang" ] == "dk" ) ) { include ( "../language/danish_setup.php"     ); $lang = "dk"; }
      if ( ( $_GET [ "lang" ] == "fr" ) || ( $_POST [ "lang" ] == "fr" ) ) { include ( "../language/french_setup.php"     ); $lang = "fr"; }
      if ( ( $_GET [ "lang" ] == "tr" ) || ( $_POST [ "lang" ] == "tr" ) ) { include ( "../language/turkish_setup.php"    ); $lang = "tr"; }
      if ( ( $_GET [ "lang" ] == "hu" ) || ( $_POST [ "lang" ] == "hu" ) ) { include ( "../language/hungarian_setup.php"  ); $lang = "hu"; }
      if ( ( $_GET [ "lang" ] == "pt" ) || ( $_POST [ "lang" ] == "pt" ) ) { include ( "../language/portuguese_setup.php" ); $lang = "pt"; }
      if ( ( $_GET [ "lang" ] == "he" ) || ( $_POST [ "lang" ] == "he" ) ) { include ( "../language/hebrew_setup.php"     ); $lang = "he"; }
     }
    else
     {
      include ( "../language/german_setup.php" );   # include language vars
      $lang = "de";
     }

    Из известного php web stat релиза 2009 в июле.
    В первом попавшимся на глаза скрипте.

    vov4ik, 02 Февраля 2010

    Комментарии (16)
  6. JavaScript / Говнокод #2532

    +147.7

    1. 1
    http://rmd.atdmt.com/tl/DocumentDotWrite.js

    Оригинал http://thedailywtf.com/Articles/Amazingly-Brilliant-or-Incredibly-Stupid.aspx

    HyperGeek, 02 Февраля 2010

    Комментарии (16)
  7. C++ / Говнокод #2531

    +48.3

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    #define begin {
    #define end }
    //....
    #define repeat do{
    #define until(a) }while(!(a))
    // и т.д.

    Боян, конечно, просто вспомнил, глядя на предыдущий говнокод с макросами. Это в институте препод на одной из лекций всерьёз писал на доске.
    Видимо, паскальщик еще советской закалки :)

    GovnocoderJr, 02 Февраля 2010

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

    +138.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
    sprintf(cmd, "%supd_downloader -p upd_downloader\\bin %s %s -a %s", 
    #if defined(__unix__)
    	"./",
    #else
    	"",
    #endif
    	arg1, 
    	option->arg2 ? arg2 : "", 
    #if defined(__i386__) || defined(_M_X86)
    	"i686"
    #else
    	"x86_64"
    #endif
    );
    res = run_command(cmd);

    Обнаружил в коде. Типа портируемый код =) Да еще и sprintf() ...

    del, 02 Февраля 2010

    Комментарии (13)
  9. C++ / Говнокод #2529

    +144.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
    #include <iostream>
    #define lulz int
    #define lulZ main()
    #define luLz {
    #define luLZ }
    #define lUlz cout
    #define lULz cin
    #define lUlZ ;
    #define LuLZ <<
    #define LuLz >>
    #define LULz =
    #define LULZ +
    #define lolz endl
    lulz lulZ
    luLz
      lulz Lulz lUlZ
      lUlz LuLZ" Смешная сумма " LuLZ lolz lUlZ
        lULz LuLz Lulz lUlZ
      lUlz LuLZ Lulz lUlZ
      lUlz LuLZ" + " lUlZ
    lulz lULZ lUlZ
      lUlz LuLZ "LULZ?" LuLZ lolz lUlZ
      lULz LuLz lULZ lUlZ
      lUlz LuLZ Lulz LuLZ " + " LuLZ lULZ LuLZ " = " LuLZ Lulz + lULZ lUlZ
    luLZ

    "Смешная сумма" (c) автор

    darkcheg, 02 Февраля 2010

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

    +63.8

    1. 1
    const size_t& len() const {return _c_str?_len:*(size_t*)0;} //нах это нужно??

    P.S. А Я САМ НЕ ЗНАЮ ГДЕ ЗДЕСЬ СИ-КРЕСТ-КРЕСТ!!!!1

    GovnocoderJr, 02 Февраля 2010

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