- 1
staticDataTemp = com.adobe.serialization.json.JSON.encode(com.adobe.serialization.json.JSON.decode(e.target.data));
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−168
staticDataTemp = com.adobe.serialization.json.JSON.encode(com.adobe.serialization.json.JSON.decode(e.target.data));
+70
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/compare.tpl')) {
$this->template = $this->config->get('config_template') . '/template/product/compare.tpl';
} else {
$this->template = 'default/template/product/compare.tpl';
}
Спешите видеть в конце каждого контроллера OpenCart. Ох уж это MVC ради MVC...
+73
[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.params.displayExceptions = 0
resources.log.khuy.writerName = "Firebug"
resources.view.helperPath.Zend_View_Helper = APPLICATION_PATH "/../library/Zend/View/Helper"
resources.view.helperPath.My_View_Helper = APPLICATION_PATH "/views/helpers"
[staging : production]
[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1
+88
if( $tpl_name == '' || ! file_exists( $this->dir . DIRECTORY_SEPARATOR . $tpl_name ) ) {
return "Отсутствует файл шаблона: " . $tpl_name ;
return false;
}
dle
+1
Controller::Controller(QObject *parent)
: QObject(parent) {
connect( &rcvr, SIGNAL(deviceMessage(QString,QString,QString,QString,QString,QString,QString,QString)),
this, SLOT(processMessage(QString,QString,QString,QString,QString,QString,QString,QString)) );
}
По порядку: таймштамп, домен, хост, логон, вендор флешки, модель, ревизия, серийник. Задвинул на полном серьёзе ))
−159
appendExclamation("one")("two")("three")("four")("five");
function appendExclamation(str:String):Function{
trace(str + "! ");
return appendExclamation;
}
/* outputs:
one!
two!
three!
four!
five!
*/
как-то натолкнулся на одном из блогов
−155
public function initCounter():void
{
_timeDisplayer.text = (_type == COUNT) ? "00:00" : ((_timeLimit < 10) ? "0" + _timeLimit.toString() + ":00" : _timeLimit.toString() + ":00");
_seconds = (_type == COUNT) ? 0 : 60;
_minutes = (_type == COUNT) ? 0 : _timeLimit;
_counterCompleted = false;
}
еще одно тернарное извращение:)
+75
require( "./configuration.php" );
include( "./include.php" );
$returned = @( );
if ( ( $returned ) != @( "harper" ) )
+86
int createStageCycles = 0;
createStageCycles = Integer.parseInt(strCycle);
int nextVal = new Integer(createStageCycles) + 1;
int двойного отжима
+80
$F = 0;
if ($F == "0") {
include ("index-bd.php");
}
else {
include ("../index-bd.php");
};
И так подключатся все файлы в проекте.