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

    +151.4

    1. 1
    http://suchen.mobile.de/fahrzeuge/showDetails.html?lang=ru&id=74773331&pageNumber=3&scopeId=C&sortOption.sortBy=searchNetGrossPrice&sortOption.sortOrder=ASCENDING&makeModelVariant1.makeId=17700&makeModelVariant1.modelId=13&makeModelVariant1.searchInFreetext=false&makeModelVariant2.searchInFreetext=false&makeModelVariant3.searchInFreetext=false&vehicleCategory=Car&segment=Car&minFirstRegistrationDate=1995-01-01&siteId=GERMANY&damageUnrepaired=ALSO_DAMAGE_UNREPAIRED&export=ALSO_EXPORT&customerIdsAsString=&tabNumber=2

    небольшой такой запросик...

    guest, 01 Апреля 2009

    Комментарии (1)
  2. Куча / Говнокод #800

    +142

    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
    [root@v6704 debug]# make
    [  1%] Generating moc_wordplugin.cxx
    Scanning dependencies of target gluxi_plugin_word
    [  1%] Building CXX object src/plugins/word/CMakeFiles/gluxi_plugin_word.dir/wordplugin.o
    /home/gluxi/src/plugins/word/wordplugin.cpp: In member function ‘virtual bool WordPlugin::parseMessage(gloox::Stanza*)’:
    /home/gluxi/src/plugins/word/wordplugin.cpp:104: error: ‘class gloox::Stanza’ has no member named ‘addAttribute’
    /home/gluxi/src/plugins/word/wordplugin.cpp:105: error: ‘class gloox::Stanza’ has no member named ‘finalize’
    /home/gluxi/src/plugins/word/wordplugin.cpp:106: error: ‘class gloox::Stanza’ has no member named ‘xml’
    /home/gluxi/src/plugins/word/wordplugin.cpp:136: error: ‘class gloox::Stanza’ has no member named ‘addAttribute’
    /home/gluxi/src/plugins/word/wordplugin.cpp:137: error: ‘class gloox::Stanza’ has no member named ‘finalize’
    make[2]: *** [src/plugins/word/CMakeFiles/gluxi_plugin_word.dir/wordplugin.o] Error 1
    make[1]: *** [src/plugins/word/CMakeFiles/gluxi_plugin_word.dir/all] Error 2
    make: *** [all] Error 2

    продолжаем говнокодить

    guest, 01 Апреля 2009

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

    +139

    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
    debug]# cmake .. 
    -- Check for working C compiler: /usr/bin/gcc
    -- Check for working C compiler: /usr/bin/gcc -- works
    -- Check size of void*
    -- Check size of void* - done
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Looking for Q_WS_X11
    -- Looking for Q_WS_X11 - found
    -- Looking for Q_WS_WIN
    -- Looking for Q_WS_WIN - not found.
    -- Looking for Q_WS_QWS
    -- Looking for Q_WS_QWS - not found.
    -- Looking for Q_WS_MAC
    -- Looking for Q_WS_MAC - not found.
    -- Found Qt-Version 4.3.4
    -- Looking for _POSIX_TIMERS
    -- Looking for _POSIX_TIMERS - found
    -- Found OpenSSL: /usr/lib/libssl.so
    -- Looking for pthread.h
    -- Looking for pthread.h - found
    -- Looking for pthread_create in pthreads
    -- Looking for pthread_create in pthreads - not found
    -- Looking for pthread_create in pthread
    -- Looking for pthread_create in pthread - found
    -- Finding plugins in /home/gluxi/src/plugins
    -- -> Found plugin: word
    -- -> Found plugin: net
    -- -> Found plugin: webstatus
    -- -> Found plugin: muc
    -- -> Found plugin: config
    -- -> Found plugin: core
    -- -> Found plugin: misc
    -- -> Found plugin: user
    -- -> Found plugin: alias
    -- -> Found plugin: admin
    -- PluginLoader generated
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/gluxi/debug

    не понятно

    guest, 01 Апреля 2009

    Комментарии (0)
  4. Си / Говнокод #798

    +142

    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
    case MOTO_ACCY_IOCTL_SET_CHARGER_LOAD_LINE:
                /* Copy the load line setting from user space */
                retval = copy_from_user ((void *)&data, (void *)arg, sizeof(data));
    
                /* If the copy failed, return an error */
                if (retval != 0)
                {
                    retval = -EFAULT;
                }
    
                /* Else, configure the hardware for the requested load line setting */
                else
                {
                    /* Acquire the lock to prevent changes to connected_accessories */
                    spin_lock (&connected_lock);
    
                    /* Verify that the 3G fast charger is connected */
                    if (ACCY_BITMASK_ISSET(connected_accessories, MOTO_ACCY_TYPE_CHARGER_FAST_3G))
                    {
                        /* This charger is the only charger that supports an adjustable load line */
    
                        /* TBD */
                    }
    
                    /* Else, the appropriate charger type is not connected */
                    else
                    {
                        /* Return error: No such device */
                        retval = -ENODEV;
                    }
    
                    /* Release the lock for connected_accessories */
                    spin_unlock (&connected_lock);
                }
    
                break;

    guest, 01 Апреля 2009

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

    +145.4

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    индокод:
    #ifdef PRINT_DEBUG_INFO
    #define DBG_PRINT if(1) printf
    #else
    #define DBG_PRINT if(0) printf
    #endif

    Индокод - макрос для вкл-выкл дебажной печати.

    guest, 31 Марта 2009

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

    +130

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    function showMenu() {
        var isShowMenu = false;
     
        isShowMenu = true;
     
        isShowMenu = true;
        if (isShowMenu) { ... }
    }

    сгенерированный код такой сгенерированный..

    guest, 31 Марта 2009

    Комментарии (0)
  7. Куча / Говнокод #795

    +140.7

    1. 1
    %define is64bit  %(test `grep -o '(.*)' /etc/SuSE-release` = "(x86_64)" && echo 1 || echo 0)

    спек сборки одного rpm
    до uname парни не догадались

    guest, 31 Марта 2009

    Комментарии (1)
  8. Pascal / Говнокод #794

    −107.4

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    w := ord(CHar(Pbyte(Pointer(Integer(IN_BUFFER)+ inpos))^));
    s := ord(Char(Pbyte(Pointer(Integer(IN_BUFFER)+ inpos + 1))^));
    PByte(Pointer(Integer(out_buf)+ outpos))^ := w and 255;        {?????? ?? ?????? ??????}
    PByte(Pointer(Integer(out_buf)+ outpos + 1))^ := w shr 8;
     PByte(Pointer(Integer(out_buf)+ outpos))^ := PByte(Pointer(Integer(out_buf)+ outpos))^ or ((W and 15) shl 4);

    доступ к указателям как к массивам

    guest, 31 Марта 2009

    Комментарии (14)
  9. SQL / Говнокод #793

    −850

    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
    SELECT 
    lmd.Name AS DisciplineName,
    lmdv.ModDiscipVersionID,
    lmn.Name AS ModuleName,
    lm.ModuleID 
    FROM StudyContract sc 
    INNER JOIN PersonalLesson pl 
    ON sc.StudyContractID = pl.StudyContractID 
    INNER JOIN lst_Module lm 
    ON pl.ModuleID = lm.ModuleID 
    INNER JOIN lst_ModuleName lmn 
    ON lm.ModuleNameID = lmn.ModuleNameID 
    INNER JOIN lst_ModDiscipVersion lmdv 
    ON lm.ModDiscipVersionID = lmdv.ModDiscipVersionID 
    INNER JOIN lst_ModDiscip lmd 
    ON lmdv.ModDiscipID = lmd.ModDiscipID 
    INNER JOIN Student s 
    ON sc.StudentID = s.StudentID 
    INNER JOIN TrainingProduct_Lesson tpl 
    ON tpl.PersonalLessonID = pl.PersonalLessonID 
    INNER JOIN TrainingProduct tp 
    ON tp.TPID = tpl.TPID 
    WHERE sc.ContractNumber = '050000000000' 
    AND s.Surname = 'к' 
    AND 
    (
    tp.TPKindID=1 OR 
    tp.TPKindID=3 OR 
    tp.TPKindID=8 OR 
    tp.TPKindID=12 OR 
    tp.TPKindID=15 OR 
    tp.TPKindID=52 OR 
    tp.TPKindID=58 OR 
    tp.TPKindID=94 OR 
    tp.TPKindID=6 OR 
    tp.TPKindID=39 OR 
    tp.TPKindID=80 OR 
    tp.TPKindID=40 OR 
    tp.TPKindID=74 OR 
    tp.TPKindID=17 OR 
    tp.TPKindID=33
    )
    GROUP BY lmd.Name,lmdv.ModDiscipVersionID,lmn.Name,lm.ModuleID

    Говнокодеры Современной Гуманитарной Академии не подозревают о такой вещи как tp.TPKindID IN (1;3;...;33)

    guest, 31 Марта 2009

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

    +349.7

    1. 1
    define("_WINDOWS_",file_exists("c:\autoexec.bat") ? TRUE : FALSE);

    :)

    guest, 31 Марта 2009

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