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

    В номинации:
    За время:
  2. JavaScript / Говнокод #3086

    +156

    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
    44. 44
    GrataPressMain.TextAddDivRedColor7h1 = function(o, s)
    {
    	//#region var
    	var divAny;
    	//#endregion var
    	divAny = oCell.appendChild(document.createElement("div"));
    	divAny.style.color = sColor7;
    	divAny.style.fontFamily = "sans-serif";
    	divAny.style.fontSize = "14pt";
    	divAny.appendChild(document.createTextNode(s));
    }
    GrataPressMain.TextAddDivRedColor7 = function(o, s)
    {
    	//#region var
    	var divAny;
    	//#endregion var
    	divAny = oCell.appendChild(document.createElement("div"));
    	divAny.style.color = sColor7;
    	divAny.style.fontFamily = "sans-serif";
    	divAny.style.fontSize = "10.5pt";
    	divAny.appendChild(document.createTextNode(s));
    }
    GrataPressMain.TextAddDivGrayColor8h1 = function(o, s)
    {
    	//#region var
    	var divAny;
    	//#endregion var
    	divAny = oCell.appendChild(document.createElement("div"));
    	divAny.style.color = sColor8;
    	divAny.style.fontFamily = "sans-serif";
    	divAny.style.fontSize = "14pt";
    	divAny.appendChild(document.createTextNode(s));
    }
    GrataPressMain.TextAddDivGrayColor8 = function(o, s)
    {
    	//#region var
    	var divAny;
    	//#endregion var
    	divAny = oCell.appendChild(document.createElement("div"));
    	divAny.style.color = sColor8;
    	divAny.style.fontFamily = "sans-serif";
    	divAny.style.fontSize = "10.5pt";
    	divAny.appendChild(document.createTextNode(s));
    }

    ну тут без коментариев. Максим Прохоров пишет сайты.

    ursus, 23 Апреля 2010

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

    +165

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    if(isset($_POST["x"]) and $_POST["subject"]!="Input subject" and $_POST["text"]!="Input text"){
        if(!empty($_POST["subject"]) and !empty($_POST["text"]) and !empty($_POST['id']) and !empty($_POST['username']) and intval($_POST['id'])){
            $queryUser = mysql_query('select id_item from data_tbl where idnumber="'.(int)$_POST['id'].'" and username="'.mysql_escape_string($_POST['username']).'"');
            if(mysql_num_rows($queryUser)>0){
                $arrResult = mysql_fetch_array($queryUser);
            mysql_query("insert into tblsupport(strsubject,strinfo,dtmadded,intactive,enmtype_,intiduser) values ('".mysql_escape_string($_POST["subject"])."','
    ".mysql_escape_string(nl2br($_POST["text"]))."','".date("Y-m-d H:i:s")."','0','$redirect','".$arrResult['id_item']."')");
                    echo "<script>location.href='supportSuccess.php?type=$redirect';</script>";
            }
        }
    }

    Torch13, 21 Апреля 2010

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

    +116.6

    1. 1
    2. 2
    3. 3
    4. 4
    public AbstractCriterion NoPennisMatch(string fieldName, int value)
    {
    	return Restrictions.Between("qnum", Decimal.Parse(value.ToString()), Decimal.Parse(value.ToString() + ".99"));
    }

    такой вот метод :)

    Coffeeholic, 17 Апреля 2010

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

    +163.2

    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
    $t_total_rows = 100;
    		$t_row_ids = array();
    
    		// Check total profile rows.
    		for($i = 1; $i <= $t_total_rows; $i++)
    		{
    				$result = $database -> database_query("SELECT `profilevalue_$i` FROM `se_profilevalues`");
    
    				if($result != FALSE)
    				{
    						$t_row_ids[] = $i;
    				}
    		}

    Нашел еще один кусок кода :)))
    Оригинальный подход для подсчета полей :))

    Rain, 16 Апреля 2010

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

    +107.4

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    DirectoryEntry en = this.InitDirectoryEntry(ADObject);
    
    try
    {                   
         en.Parent.Children.Remove(en);
    }
    catch (Exception ex)
    {
               //??????????????????????????????
    }

    Удаление объекта в каталоге Active Directory

    dens, 08 Апреля 2010

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

    +142.6

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    using System;
    
    
    unsafe struct program
    {
    	static void Main()
    	{
    		program obj1 = new program();
    		program* p = &obj1;
    		p->Main();
    	}
    }

    попытка обратиться к члену структуры

    sergylens, 08 Апреля 2010

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

    +144.4

    1. 1
    2. 2
    3. 3
    preview = {};
    preview = function () {/*code*/}
    preview.type1 = function () {/*code*/}

    Когда только начинал писать на JS, делал наследование именно так. =)

    fuckyounoob, 07 Апреля 2010

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

    +92.4

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    void Read_Ri( int hARINC,unsigned short int *Data ,int *i16,int *i15,int *i14,
    	int *i13,int *i12,int *i11,int *i10,int *i9,int *i8,int *i7,int *i6,int *i5,int *i4,int *i3,int *i2,int *i1)
    {
    		ioctl(hARINC,IOCTL_GET_RI,Data);
       		*i16=Data[0x1104]>>15&1; *i15=Data[0x1104]>>14&1; *i14=Data[0x1104]>>13&1;
    		*i13=Data[0x1104]>>12&1; *i12=Data[0x1104]>>11&1; *i11=Data[0x1104]>>10&1;
    		*i10=Data[0x1104]>>9&1; *i9=Data[0x1104]>>8&1; *i8=Data[0x1104]>>7&1;
    		*i7=Data[0x1104]>>6&1; *i6=Data[0x1104]>>5&1; *i5=Data[0x1104]>>4&1;
    		*i4=Data[0x1104]>>3&1; *i3=Data[0x1104]>>2&1; *i2=Data[0x1104]>>1&1; *i1=Data[0x1104]&1;
    }

    Фирма "Элкус" порадовала. Хорошо, что у их платы не 32-разрядные регистры :)

    whiskey, 05 Апреля 2010

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

    +143.8

    1. 1
    private const long magic = 0x6567617355444343L;

    Магия.......

    unreal, 02 Апреля 2010

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

    +143.6

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    for i:=1 to 10000000 do
    begin
    {...}
    if m=0 then break;
    end;

    kozzztya, 31 Марта 2010

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