- 1
if (1||time()%2) {		//	через разНашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
Всего: 11
−19
if (1||time()%2) {		//	через раз
+967
if (!ch.election) {
        exec('date -R', function(error, stdout, stderr) {
            if (stdout.search('Wed') > -1) {
                ch.startElection();
            }
        });
    } else {
        exec('date -R', function(error, stdout, stderr) {
            if (stdout.search('Wed') < 0) {
                ch.stopElection();
            }
        });
    }
            В ноде видимо нет функций для работы с календарём...
https://github.com/birdlab/trigger/blob/master/src/node/trigger/channel.js#L783
        
+76
if mas[i-1,j-1]=true then begin neib[m]:=true; inc(m); end; //считаем соседей
if mas[i-1,j]=true then begin neib[m]:=true; inc(m); end;
if mas[i-1,j+1]=true then begin neib[m]:=true; inc(m); end;
if mas[i,j-1]=true then begin neib[m]:=true; inc(m); end;
if mas[i,j+1]=true then begin neib[m]:=true; inc(m); end;
if mas[i+1,j-1]=true then begin neib[m]:=true; inc(m); end;
if mas[i+1,j]=true then begin neib[m]:=true; inc(m); end;
if mas[i+1,j+1]=true then begin neib[m]:=true; inc(m); end;Знакомый человек реализовывал «Жизнь» на делфях...
+40
/**
		 * Экспортирует данные списка в CSV. Этот метод не используется в данном приложении.
		 */
		public function listRenderCsvImport()
		{.../facepalm...
+72
if("all".equalsIgnoreCase(lvl)) {
            setLevel(SimpleLog.LOG_LEVEL_ALL);
        } else if("trace".equalsIgnoreCase(lvl)) {
            setLevel(SimpleLog.LOG_LEVEL_TRACE);
        } else if("debug".equalsIgnoreCase(lvl)) {
            setLevel(SimpleLog.LOG_LEVEL_DEBUG);
        } else if("info".equalsIgnoreCase(lvl)) {
            setLevel(SimpleLog.LOG_LEVEL_INFO);
        } else if("warn".equalsIgnoreCase(lvl)) {
            setLevel(SimpleLog.LOG_LEVEL_WARN);
        } else if("error".equalsIgnoreCase(lvl)) {
            setLevel(SimpleLog.LOG_LEVEL_ERROR);
        } else if("fatal".equalsIgnoreCase(lvl)) {
            setLevel(SimpleLog.LOG_LEVEL_FATAL);
        } else if("off".equalsIgnoreCase(lvl)) {
            setLevel(SimpleLog.LOG_LEVEL_OFF);
        }Внутренности конструктора org.apache.commons.logging.impl.SimpleLo g
+162
public function title_url_formatted($len = 70)
{
	return Core_String::title_to_url(Core_String::unicode_truncate($this->title, 70));
}писал не я, если что)
+162
ModuleManagerImpl::ModuleManagerImpl()
{
	ModuleManager::loadPlugins();
	Config config = ProfileDialog::profilesInfo();
#ifdef QUTIM_SINGLE_PROFILE
	bool singleProfile = true;
#else
	bool singleProfile = false;
#endif
	singleProfile = config.value("singleProfile", singleProfile);
	if (singleProfile) {
		if (!config.hasChildGroup("profile")) {
			QWidget *wizard = new ProfileCreationWizard(this, QString(), QString(), true);
			wizard->setAttribute(Qt::WA_DeleteOnClose, true);
			wizard->setAttribute(Qt::WA_QuitOnClose, false);
			SystemIntegration::show(wizard);
		} else {
			config.beginGroup("profile");
			if(ProfileDialog::acceptProfileInfo(config, QString())) {
				QTimer::singleShot(0, this, SLOT(initExtensions()));
			} else {
				qWarning("Can't login");
				QDialog *dialog = new ProfileDialog(config, this);
				SystemIntegration::show(dialog);
			}
			config.endGroup();
		}
	} else {
		QDialog *dialog = new ProfileDialog(config, this);
		SystemIntegration::show(dialog);
	}
}
            не знаю как вам, а мне не нравится объявление singleProfile.
qutim/core/src/modulemanagerimpl.cpp
        
+159
switch($URIelements[2]) {
	case "members":
		if ($oid<>'') { //если $oid существует, выводим карточку члена
			$page="http://domain.tld/reestr/members.php?oid=".$oid;
		} else { //если $oid НЕ существует, выводим список всех
			$page="http://domain.tld/reestr/show_members.php";
		}
		include ($page); //загружаем страницу реестра
	break;
	case "candidates":
		if ($oid<>'') { //если $oid существует, выводим карточку члена
			$page="http://domain.tld/reestr/candidates.php?oid=".$oid;
		} else { //если $oid НЕ существует, выводим список всех
			$page="http://domain.tld/reestr/show_candidates.php";
		}
		include ($page); //загружаем страницу реестра
	break;
	case "exclude":
		if ($oid<>'') { //если $oid существует, выводим карточку члена
			$page="http://domain.tld/reestr/exclude.php?oid=".$oid;
		} else { //если $oid НЕ существует, выводим список всех
			$page="http://domain.tld/reestr/show_exclude.php";
	        }
		include ($page); //загружаем страницу реестра
	break;
		/* И так далее */	
}Было откопано такое говнецо в проекте на WP... Думаю всё сказано кодом
+166
/*
     * Language
     */
    $CONFIG['LANGUAGE'] = 'ru_ru';
    if (!preg_match('/en\./', $_SERVER['HTTP_HOST']))
    {
        $CONFIG['LANGUAGE'] = 'ru_ru';
    } else
    {
        $CONFIG['LANGUAGE'] = 'en';
    }
    $CONFIG['LANGUAGE'] = 'en';ещё тёпленькое. из-за "неизвестных" причин выбиралась не та локаль... видимо решили забить так, чтоб наверняка.
+154
if (request->status().is_success() &&
      (request->GetResponseCode() / 100) == 2) {
      /* блаблабла */
  }Было случайно откопано в исходниках хромиума (http://src.chromium.org/svn/trunk/src/webkit/appcache/appcache_update_job.cc). И первый вопрос который возникает это "Ну вот нахера???".