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

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

    +143

    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
    public string IsLarge
            {
                get
                {
                    return (txtValue.Style["width"] == "150px").ToString();
                }
                set
                {
                    if (value == true.ToString())
                    {
                        txtValue.Style["width"] = "150px";
                    }
                    else
                    {
                        txtValue.Style["width"] = "65px";
                    }
                }
            }

    Свойство из одного эпического веб-проекта

    daymansiege, 10 Августа 2011

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

    +147

    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
    datatypes.Float = function(inString)
    {
    	var fBytes = [];
    	for (var i=0;i<4;i++)
    	{
    		var curByte = (inString.charCodeAt(i)&255).toString(2);
    		var byteLen = curByte.length;
    		if (byteLen<8)
    		{
    			for (var bit=0;bit<(8-byteLen);bit++)
    				curByte = '0'+curByte;
    		}
    		fBytes[i] = curByte;
    	}
    	var fBits = fBytes[3]+fBytes[2]+fBytes[1]+fBytes[0];
    	var fSign = parseInt(fBits[0]) ? -1 : 1;
    	var fExp = parseInt(fBits.substring(1,9),2)-127;
    	var fMan;
    	if (fExp == -127)
    		fMan = 0;
    	else
    	{
    		fMan = 1;
    		for (i=0;i<23;i++)
    		{
    			if (parseInt(fBits[9+i])==1)
    				fMan = fMan + 1/Math.pow(2,i+1);
    		}
    		fMan = fMan.toFixed(7);
    	}
    	return(parseFloat((fSign*Math.pow(2,fExp)*fMan).toFixed(3)));
    }

    Вчера накодил, оцените говнистость.

    SiPlus, 06 Августа 2011

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

    +102

    1. 1
    org.quartz.jobStore.dontSetAutoCommitFalse=true

    config boolshit

    3.14159265, 06 Августа 2011

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

    +150

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    function Point(){
    	this.x = 0;
    	this.y = 0;
    	if(arguments.length==2){				//if parameters are 2 points
    		this.x = arguments[0] || 0;
    		this.y = arguments[1] || 0;
    	}else
    		if(arguments.length==1){			//if parameter is a point object
    			this.x = arguments[0].x;
    			this.y = arguments[0].y;
    		}
    };

    yahoo, 05 Августа 2011

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

    +147

    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
    String classToType(Class cls) {
        if (cls == Point.class) {
          return "int2";
        } else if ((cls == Integer.TYPE) || (cls == Integer.class)) {
          return "int";
        } else if ((cls == Double.TYPE) || (cls == Double.class)) {
          return "double";
        } else if (cls == String.class) {
          return "String";
        } else if ((cls == Boolean.TYPE) || (cls == Boolean.class)) {
          return "boolean";
        } else {
          return null;
        }
      }

    Lure Of Chaos, 04 Августа 2011

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

    +164

    1. 1
    define('htmlFORM_DOMAIN', '/\w*\.\w*\.*\w*\.*\w*\.*\w*\.*\w*\.*\w*\.*\w*\.*/'); // CRAzY ;)

    тяжёлое утро, PHP лишился parse_url()

    roysa, 01 Августа 2011

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

    +147

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    more: function()
            {
                redactorActive = this;
                var mre = '<more>';
                redactorActive.execCommand('inserthtml', mre, false);
    			this.modalClose();
            }

    WYSIWYG редактор ...

    maeln0r, 29 Июля 2011

    Комментарии (11)
  9. Java / Говнокод #7373

    +147

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    /*
    org.springframework.aop.framework
    Class AbstractSingletonProxyFactoryBean
    
    Convenient proxy factory bean superclass for proxy factory beans that create only singletons. 
    */
    
    public abstract class AbstractSingletonProxyFactoryBean
    extends ProxyConfig
    implements FactoryBean, BeanClassLoaderAware, InitializingBean

    http://static.springsource.org/spring/docs/2.0.x/api/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.html
    Convenient proxy factory bean superclass for proxy factory beans that create only singletons. And we need to go deeper...

    zheka, 28 Июля 2011

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

    −153

    1. 1
    ТСтрока=Товары.Получить(Товары.Индекс(ЭтаФорма.ЭлементыФормы.Товары.ТекущаяСтрока));

    luns, 26 Июля 2011

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

    +169

    1. 1
    2. 2
    3. 3
    motioncontainer.style.width="0";
    motioncontainer.style.width="";
    motioncontainer.style.width=Math.min(motioncontainer.offsetWidth, maxwidth)+'px';

    Нашел при отладке скрипта.
    Автор три раза передумал)

    Android991, 26 Июля 2011

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