1. Список говнокодов пользователя guest

    Всего: 1419

  2. Куча / Говнокод #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)
  3. 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)
  4. 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)
  5. PHP / Говнокод #792

    +349.7

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

    :)

    guest, 31 Марта 2009

    Комментарии (39)
  6. PHP / Говнокод #791

    +146.3

    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, 31 Марта 2009

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

    +145

    1. 1
    2. 2
    3. 3
    4. 4
    /// <summary>
            /// Child border.
            /// </summary>
            private Border childBorder;

    Я бы никогда без комментария не догадался, зачем же это поле

    guest, 30 Марта 2009

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

    +139.2

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    Calendar calen = new GregorianCalendar(); 
    calen.setTime(beginDate); 
    while (!calen.equals(endDate)) {
        calen.add(Calendar.DATE,1);
    }

    guest, 30 Марта 2009

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

    +958.8

    1. 1
    idString.Length == Guid.NewGuid().ToString.Length()

    Самый имхо индусский (см. лукмор) код проверить что строка это Guid

    guest, 30 Марта 2009

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

    −361.9

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    mx_internal function columnWordWrap(c: DataGridColumn): Boolean {
      if (c.wordWrap == true)
        return true;
      if (c.wordWrap == false)
        return false;
    
      return wordWrap;
    }

    American Flex project

    guest, 28 Марта 2009

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

    +183

    1. 1
    2. 2
    $gameid = intval($_GET['gameid']);
    if (!is_int($gameid)) die ('SQL Injection protection');

    guest, 28 Марта 2009

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