1. PHP / Говнокод #7459

    +158

    1. 1
    2. 2
    3. 3
    4. 4
    function Plugin_bannerTypeHtml_vastInlineBannerTypeHtml_vastInlineHtml_Delivery_adRender(&$aBanner, $zoneId=0, $source='', $ct0='', $withText=false, $logClick=true, $logView=true, $useAlt=false, $loc, $referer)
    {
        return deliverVastAd('vastInline', $aBanner, $zoneId, $source, $ct0, $withText, $logClick, $logView, $useAlt, $loc, $referer);
    }

    Зачем использовать короткие имена ф-ций если еще не достигнут лимит интерпретатора...

    zurom, 05 Августа 2011

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

    +158

    1. 1
    2. 2
    3. 3
    A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.
    
    Script: http://govnokod.ru/media/d10c81f141cf62e45d6f8dba139fa72d.js?files=jquery.js,govnokod.js,livecomments.js,jshighlight/highlight.pack.js&v=4:452

    Говнокод в govnokod e.

    yahoo, 05 Августа 2011

    Комментарии (5)
  3. 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)
  4. C# / Говнокод #7456

    +126

    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
    public bool NewOrder {
        get {
            if( !string.IsNullOrEmpty( Request.QueryString[ "NewOrder" ] ) ) {
                ViewState[ "NewOrder" ] = Request.QueryString[ "NewOrder" ] == "true" ? true : false;
            } else {
                if( ViewState[ "NewOrder" ] != null )
                    return ( bool ) ViewState[ "NewOrder" ];
                else
                    ViewState[ "NewOrder" ] = true;
                }
            return ( bool ) ViewState[ "NewOrder" ];
        }
        set { ViewState[ "NewOrder" ] = value; }
    }

    Eugene, 05 Августа 2011

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

    +171

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    $('#bc8').html('<style type="text/css">#bc8 {display:none;}</style>');
    $('#bc7').html('<style type="text/css">#bc7 {display:none;}</style>');
    $('#bc12').html('<style type="text/css">#bc12 {display:none;}</style>');
    $('#bc16').html('<style type="text/css">#bc16 {display:none;}</style>');
    $('#bc18').html('<style type="text/css">#bc18 {display:none;}</style>');
    $('#bc17').html('<style type="text/css">#bc17 {display:none;}</style>');
    $('#bc9').html('<style type="text/css">#bc9 {display:none;}</style>');

    Хороший jQuery-программист

    TRANE73, 05 Августа 2011

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

    +126

    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
    // Get credit spread rates and tenors
    mDtCreditSpreadTenors = aRDO.GetResultTable(mSelectCreditSpreadRates, mCode, mCreditSpreadCurveDate);
    
    // Check if any credit spread rates are returned
    if (mDtCreditSpreadTenors.Rows.Count == 0)
    {
        // If debugging
        if (System.Diagnostics.Debugger.IsAttached)
            // Get from fixed date
            mDtCreditSpreadTenors = aRDO.GetResultTable(mSelectCreditSpreadRates, mCode, 39396);
        else        
            // Add error
            aMissingData.Add(string.Format("Cannot find credit spread rates for date {0}", mCreditSpreadCurveDate.ToShortDateString()));
    }

    Счастливой отладки, суки!

    xxxcoderxxx, 05 Августа 2011

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

    +146

    1. 1
    2. 2
    3. 3
    public static function correctTextForHTML($inSTR) {
         return preg_replace("/\r\n|\n|\r/", "<br/>", $inSTR);
    }

    Sers, 05 Августа 2011

    Комментарии (20)
  8. PHP / Говнокод #7452

    +147

    1. 1
    2. 2
    3. 3
    public static function prepareHTML ($inStr) {
    		return htmlspecialchars(htmlspecialchars_decode($inStr));
    	}

    Sers, 05 Августа 2011

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

    +163

    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
    /**
    	 * удаляет ненужные нули для дробных значений
    	 *
    	 * @return unknown
    	 */
    	public static function removeExtraZero($power) {
    		if ($power == '') return "";
    
    		$a_tmp = explode('.', $power);
    		$a_tmp[1] = rtrim($a_tmp[1], '0');
    		if ($a_tmp[1] == '') return $a_tmp[0];
    		return $a_tmp[0] . '.' . $a_tmp[1];		
    	}

    Аналогия floatval()

    Sers, 05 Августа 2011

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

    +147

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    $em = '';
    	    foreach(array_unique(explode(',', $ae)) as $u) {
    		 if(!$u)
    		    continue;
    		  if($em)
    		    $em .= ',';
    		$em .= $u;
    	    }

    Кому сколько времени понадобилось, чтоб понять, что делает этот код?

    partizan22, 05 Августа 2011

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