Куча говна / Говнокод #800 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  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 guest, (Updated )

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

Куча говна / Говнокод #799 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  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 guest, (Updated )

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

Няшная / Говнокод #798 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  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 guest, (Updated )

Комментарии (3, +3)

Няшная / Говнокод #797 Ссылка на оригинал

0

  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 guest, (Updated )

Комментарии (11, +11)

Школоло / Говнокод #794 Ссылка на оригинал

0

  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 guest, (Updated )

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

mysql_real_escape_string / Говнокод #793 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  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 guest, (Updated )

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

"PHP" / Говнокод #791 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
if(isset($_POST["a"]))
    {
     $x=print_r($_POST["a"],true);
     $x=str_replace("    [","",$x);
     $x=str_replace("] => ","",$x);
     $x=str_replace("Array","",$x);
     $body="\n\n";
     $body.=$x;
     ...

Отправка письма с содержимым формы.
$_POST["a"] - массив передаваемый из формы

guest guest, (Updated )

Комментарии (5, +5)