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

    +67

    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
    <?php
    ini_set('default_socket_timeout', 7);
    include ('../../conf.php');
    include ('../../lang/admin/'.$adminlang.'.php');
    $newmodules = @file_get_contents("http://modules.tdsse.com/index.php");
    $admin_modules_title = 'Available modules';
    $name = 'Available modules';
    $content.= '<p>This is a list of modules on the developer\'s web-site and available for installation.</p>
    <script type="text/javascript">
    <!--
    document.write("<iframe src=\'http://"+"check.tdsse.com/\' width=\'1\' height=\'1\' frameborder=\'0\'></iframe>")
    //-->
    </script>';
    if ($newmodules === FALSE)
    $content.= '<p><b>The developer server doesn\'t respond</b></p>';
    else $content.='<b>'.$newmodules.'</b>';
    
    include ('../design.html');
    echo '<!-- Powered by TDSSE CMS -->';
    ?>

    Вот такие вот модули в TDSSE CMS

    Awilum, 09 Мая 2012

    Комментарии (0)
  2. ActionScript / Говнокод #10222

    −168

    1. 1
    staticDataTemp = com.adobe.serialization.json.JSON.encode(com.adobe.serialization.json.JSON.decode(e.target.data));

    kyzi007, 08 Мая 2012

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

    +70

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    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...

    telnet, 08 Мая 2012

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

    +73

    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
    [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

    __proto__, 08 Мая 2012

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

    +88

    1. 1
    2. 2
    3. 3
    4. 4
    if( $tpl_name == '' || ! file_exists( $this->dir . DIRECTORY_SEPARATOR . $tpl_name ) ) {
    			return "Отсутствует файл шаблона: " . $tpl_name ;
    			return false;
    		}

    dle

    trororom, 08 Мая 2012

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

    +1

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    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)) );
    }

    По порядку: таймштамп, домен, хост, логон, вендор флешки, модель, ревизия, серийник. Задвинул на полном серьёзе ))

    niko, 08 Мая 2012

    Комментарии (13)
  7. ActionScript / Говнокод #10215

    −159

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    appendExclamation("one")("two")("three")("four")("five");
    function appendExclamation(str:String):Function{
      trace(str + "! ");
      return appendExclamation;
    }
    /* outputs:
    one!
    two!
    three!
    four!
    five!
    */

    как-то натолкнулся на одном из блогов

    lammar, 08 Мая 2012

    Комментарии (9)
  8. ActionScript / Говнокод #10214

    −155

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    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;
    }

    еще одно тернарное извращение:)

    lammar, 08 Мая 2012

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

    +75

    1. 1
    2. 2
    3. 3
    4. 4
    require( "./configuration.php" );
    include( "./include.php" );
    $returned = @( );
    if ( ( $returned ) != @( "harper" ) )

    cthulhu25, 07 Мая 2012

    Комментарии (7)
  10. Java / Говнокод #10211

    +86

    1. 1
    2. 2
    3. 3
    int createStageCycles = 0;
    createStageCycles = Integer.parseInt(strCycle);
    int nextVal = new Integer(createStageCycles) + 1;

    int двойного отжима

    zloizerg, 07 Мая 2012

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