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

    Всего: 70

  2. Куча / Говнокод #19845

    −10

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    if (0) {
      unserialize ("");
      is_bool ("");
      is_array ("");
      is_string ("");
      is_integer ("");
      is_float ("");
    }

    github.com/vk-com/kphp-kdb/blob/master/KPHP/functions.txt

    d_fomenok, 19 Апреля 2016

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

    −10

    1. 1
    2. 2
    3. 3
    4. 4
    static void Alert(object text)
    		{
    			Console.WriteLine(text);
    		}

    d_fomenok, 17 Апреля 2016

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

    −10

    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
    static bool IsPalindrome( int value ) { 
    int reverseValue = 0; 
    if(value < 0) value = -value; 
    int tempValue = value; 
    int reverseValueTens = 1; 
    while(tempValue > 0) { 
    reverseValueTens *= 10; 
    tempValue /= 10; 
    } 
    reverseValueTens /= 10; 
    tempValue = value; 
    while(tempValue > 0) { 
    //Alert( reverseAbsValueAddition ); 
    reverseValue += (tempValue - (tempValue/10)*10) * reverseValueTens; 
    reverseValueTens /= 10; 
    tempValue /= 10; 
    } 
    //Alert( reverseAbsValue ); 
    return reverseValue == value; 
    }

    d_fomenok, 17 Апреля 2016

    Комментарии (63)
  5. JavaScript / Говнокод #19825

    −9

    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
    function delMessage(id,posted) {
    				if (confirm("Удалить сообщение от "+posted+" ?")) {
                        if('corporate'=='common')
    					{   
                            window.location="/forum/theme/?id=22213&delmsg="+id;
                        }
                        else if ('corporate'=='olimpic')
                        {
                            window.location="/competitions/kazah/team/?teamId=0&tab=forum&themeId=22213&delmsg="+id;
                        }
                        else if ('corporate'=='city')
                        {
                            window.location="/city/?id=&tab=forum&themeId=22213&delmsg="+id;
                        }
                        else
                        {
                            window.location="/corporation/?id=1401150&tab=forum&themeId=22213&delmsg="+id;
                        }
    				}
    			}
                function addMessage() {
    				document.messageForm.submit();
                }
                function closeMessage() {
    				var textarea=document.getElementById("messagetext");
                    if (textarea) textarea.value="";
                    var div=document.getElementById("submit");
                    if (div) div.style.display="none";
                }
                function showSubmit() {
                	showElement("submit");
                }
                function messageKeyDown(event) {
            	if (!event) event=window.event;
                    if (event.keyCode==13 && event.ctrlKey || event.keyCode==10) {
                    addMessage();
                    }
                }

    d_fomenok, 15 Апреля 2016

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

    −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
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    <figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><nav</span> <span class="na">class=</span><span class="s">"navbar navbar-default"</span><span class="nt">></span>
      <span class="nt"><div</span> <span class="na">class=</span><span class="s">"container-fluid"</span><span class="nt">></span>
        <span class="c"><!-- Brand and toggle get grouped for better mobile display --></span>
        <span class="nt"><div</span> <span class="na">class=</span><span class="s">"navbar-header"</span><span class="nt">></span>
          <span class="nt"><button</span> <span class="na">type=</span><span class="s">"button"</span> <span class="na">class=</span><span class="s">"navbar-toggle collapsed"</span> <span class="na">data-toggle=</span><span class="s">"collapse"</span> <span class="na">data-target=</span><span class="s">"#bs-example-navbar-collapse-1"</span> <span class="na">aria-expanded=</span><span class="s">"false"</span><span class="nt">></span>
            <span class="nt"><span</span> <span class="na">class=</span><span class="s">"sr-only"</span><span class="nt">></span>Toggle navigation<span class="nt"></span></span>
            <span class="nt"><span</span> <span class="na">class=</span><span class="s">"icon-bar"</span><span class="nt">></span></span>
            <span class="nt"><span</span> <span class="na">class=</span><span class="s">"icon-bar"</span><span class="nt">></span></span>
            <span class="nt"><span</span> <span class="na">class=</span><span class="s">"icon-bar"</span><span class="nt">></span></span>
          <span class="nt"></button></span>
          <span class="nt"><a</span> <span class="na">class=</span><span class="s">"navbar-brand"</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Brand<span class="nt"></a></span>
        <span class="nt"></div></span>
    
        <span class="c"><!-- Collect the nav links, forms, and other content for toggling --></span>
        <span class="nt"><div</span> <span class="na">class=</span><span class="s">"collapse navbar-collapse"</span> <span class="na">id=</span><span class="s">"bs-example-navbar-collapse-1"</span><span class="nt">></span>
          <span class="nt"><ul</span> <span class="na">class=</span><span class="s">"nav navbar-nav"</span><span class="nt">></span>
            <span class="nt"><li</span> <span class="na">class=</span><span class="s">"active"</span><span class="nt">><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Link <span class="nt"><span</span> <span class="na">class=</span><span class="s">"sr-only"</span><span class="nt">></span>(current)<span class="nt"></span></a></li></span>
            <span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Link<span class="nt"></a></li></span>
            <span class="nt"><li</span> <span class="na">class=</span><span class="s">"dropdown"</span><span class="nt">></span>
              <span class="nt"><a</span> <span class="na">href=</span><span class="s">"#"</span> <span class="na">class=</span><span class="s">"dropdown-toggle"</span> <span class="na">data-toggle=</span><span class="s">"dropdown"</span> <span class="na">role=</span><span class="s">"button"</span> <span class="na">aria-haspopup=</span><span class="s">"true"</span> <span class="na">aria-expanded=</span><span class="s">"false"</span><span class="nt">></span>Dropdown <span class="nt"><span</span> <span class="na">class=</span><span class="s">"caret"</span><span class="nt">></span></a></span>
              <span class="nt"><ul</span> <span class="na">class=</span><span class="s">"dropdown-menu"</span><span class="nt">></span>
                <span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Action<span class="nt"></a></li></span>
                <span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Another action<span class="nt"></a></li></span>
                <span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Something else here<span class="nt"></a></li></span>
                <span class="nt"><li</span> <span class="na">role=</span><span class="s">"separator"</span> <span class="na">class=</span><span class="s">"divider"</span><span class="nt">></li></span>
                <span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Separated link<span class="nt"></a></li></span>
                <span class="nt"><li</span> <span class="na">role=</span><span class="s">"separator"</span> <span class="na">class=</span><span class="s">"divider"</span><span class="nt">></li></span>
                <span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>One more separated link<span class="nt"></a></li></span>
              <span class="nt"></ul></span>
            <span class="nt"></li></span>
          <span class="nt"></ul></span>
          <span class="nt"><form</span> <span class="na">class=</span><span class="s">"navbar-form navbar-left"</span> <span class="na">role=</span><span class="s">"search"</span><span class="nt">></span>
            <span class="nt"><div</span> <span class="na">class=</span><span class="s">"form-group"</span><span class="nt">></span>
              <span class="nt"><input</span> <span class="na">type=</span><span class="s">"text"</span> <span class="na">class=</span><span class="s">"form-control"</span> <span class="na">placeholder=</span><span class="s">"Search"</span><span class="nt">></span>
            <span class="nt"></div></span>

    С сайта bootstrap

    d_fomenok, 10 Апреля 2016

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

    +81

    1. 1
    mov podi,vilov

    d_fomenok, 29 Марта 2016

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

    −12

    1. 1
    2. 2
    3. 3
    4. 4
    for(j=1;j<=1;j++) {
                            $("#sharing_user > tbody > tr:last").append('<td><a href="//vk.com/id'+uid_remote_+'" target="_blank">' + real_name_ + '</a></td>');
                            $("#sharing_user > tbody > tr:last").append('<td><span class="glyphicon glyphicon-remove" onclick="javascript:delete_remote_control('+uid_remote_+');" style="cursor: pointer;" title="Удалить"></span></td>');
                        }

    d_fomenok, 09 Марта 2016

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

    −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
    if (table[0] == 1 && table[1] == 1 && table[2] == 1 ||
                            table[0] == 2 && table[1] == 2 && table[2] == 2 ||
                            table[3] == 1 && table[4] == 1 && table[5] == 1 ||
                            table[3] == 2 && table[4] == 2 && table[5] == 2 ||
                            table[6] == 1 && table[7] == 1 && table[8] == 1 ||
                            table[6] == 2 && table[7] == 2 && table[8] == 2 ||
                            table[0] == 1 && table[4] == 1 && table[8] == 1 ||
                            table[0] == 2 && table[4] == 2 && table[8] == 2 ||
                            table[2] == 1 && table[4] == 1 && table[6] == 1 ||
                            table[2] == 2 && table[4] == 2 && table[6] == 2 ||
                            table[0] == 1 && table[3] == 1 && table[6] == 1 ||
                            table[0] == 2 && table[3] == 2 && table[6] == 2 ||
                            table[1] == 1 && table[4] == 1 && table[7] == 1 ||
                            table[1] == 2 && table[4] == 2 && table[7] == 2 ||
                            table[2] == 1 && table[5] == 1 && table[8] == 1 ||
                            table[2] == 2 && table[5] == 2 && table[8] == 2)

    Боже, Крис! Они же ещё дети.

    d_fomenok, 02 Марта 2016

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

    +2

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    bool compareArrays(int[] a,int[] b)
    	{
    		if(a.Length != b.Length)
    			return false;
    
    		for(int i = 0;i<a.Length;i++)
    			if(a[i] != b[i])
    				return false;
    
    		return true;
    	}

    Нобелевская премия по программированию

    d_fomenok, 02 Марта 2016

    Комментарии (28)
  11. Куча / Говнокод #19542

    +1

    1. 1
    Верните мой WCT!

    d_fomenok, 27 Февраля 2016

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