- 1
- 2
- 3
- 4
- 5
- 6
if ($end < $start) {
$errorLimit = '<p><u><b>End limit</b></u> should be bigger number than <u><b>Start limit</b></u></p>';
//echo $errorLimit;
throw new \grdprc\Exception(strip_tags($errorLimit));
return;
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+156
if ($end < $start) {
$errorLimit = '<p><u><b>End limit</b></u> should be bigger number than <u><b>Start limit</b></u></p>';
//echo $errorLimit;
throw new \grdprc\Exception(strip_tags($errorLimit));
return;
}
<p><u><b> тоже ок.
+152
<?php
class Router
{
/** @var array */
protected static $routeTable = array(
'default' => 'index.php',
'dashboard' => 'task.php',
'user' => 'user.php',
'location' => 'location.php',
'ship' => 'ship.php',
'task' => 'task.php',
'subtask' => 'subtask.php',
'view-task-list' => 'view-task-list.php',
'completed-task' => 'completed-task.php',
'view-completed-task-list' => 'view-completed-task-list.php',
'view-question-list' => 'view-question-list.php',
'user-report-problem' => 'user-report-problem.php',
'view-report-problem-list' => 'view-report-problem-list.php',
'view-direct-report-problem-list' => 'view-direct-report-problem-list.php',
'reviewer' => 'reviewer.php',
'report-direct' => 'report-direct.php',
'report-to-task' => 'report-to-task.php',
//TODO theme forest related (not used in application) remove
'charts' => 'charts.php',
'calendar' => 'calendar.php',
'files' => 'files.php',
'form_layouts' => 'form_layouts.php',
'form_elements' => 'form_elements.php',
'form_wizard' => 'form_wizard.php',
'table' => 'table.php',
'widgets' => 'widgets.php',
'typography' => 'typography.php',
'grids' => 'grids.php',
'gallery' => 'gallery.php',
'error' => 'error.php',
'icons' => 'icons.php'
);
/**
* Map route to page controller file.
* Route represented as $_GET param 'p'
*
* @param string $route The route
* @return string Path to page controller file
*/
public static function dispatch($route)
{
$route = (string)$route;
if (array_key_exists($route, self::$routeTable)) {
return self::$routeTable[$route];
}
header('Location: index.php');
exit();
}
}
+136
else if ( (ucmd->upmove > 10) && (self->client->ps.pm_flags & PMF_JUMP_HELD) && self->client->ps.groundTime && (level.time - self->client->ps.groundTime) > 150 && !BG_HasYsalamiri(g_gametype.integer, &self->client->ps) && BG_CanUseFPNow(g_gametype.integer, &self->client->ps, level.time, FP_LEVITATION) )
Нам нужно больше условий!
+139
var program = allProjects.FirstOrDefault(item => item.IsProgram && item.ProgramName == project.ProgramName && item.PortfolioName == PortfolioName);
if (program != null)
{
return program.PortfolioName == project.PortfolioName && program.ProgramName != project.ProgramName;
}
return false;
Годный метод всегда возвращать false.
+158
var isOn = parseInt(Math.random() * 1000 + 537) % 2 == 0;
Генерация true || false случайным образом
−410
http://www.macdigger.ru/wp-content/uploads/2014/06/jailbrea-iOS-7-1-1-3.jpg
IOS 7 и выбор даты. Заставить бы автора выбрать свою дату рождения в этом боксе...
Сорри за передачу по ссылке.
−130
Привет всем, помогите решить проблему.
reached limit: cannot create any more controls for this from
Как я понял, число контроллеров не должно превышать 255-256 в одной форме. Как этого избежать?
Можно ли вообще создавать формы с общими переменными? Спасибо
http://vbbook.ru/visual-basic/vvedenie-visual-basic/
+72
private static String fetchEventName(LogEventTypes event) {
String result = null;
if (LogEventTypes.A.name().equals(event.name()))) {
result = play.i18n.Messages.get("...");
} else if (LogEventTypes.B.name().equals(event.name())) {
result = play.i18n.Messages.get("...");
} else if (LogEventTypes.C.name().equals(event.name())) {
result = play.i18n.Messages.get("...");
} else if (LogEventTypes.D.name().equals(event.name())) {
result = play.i18n.Messages.get("...");
} else if (LogEventTypes.E.name().equals(event.name())) {
result = play.i18n.Messages.get("...");
} else if (LogEventTypes.F.name().equals(event.name())) {
result = play.i18n.Messages.get("...");
} else if (LogEventTypes.G.name().equals(event.name())) {
result = play.i18n.Messages.get("...");
} else if (LogEventTypes.H.name().equals(event.name())) {
result = play.i18n.Messages.get("...");
} else if (LogEventTypes.I.name().equals(event.name())) {
result = play.i18n.Messages.get("...");
} else if (LogEventTypes.J.name().equals(event.name())) {
result = play.i18n.Messages.get("...");
} else if (LogEventTypes.K.name().equals(event.name())) {
result = play.i18n.Messages.get("...");
} else if (LogEventTypes.L.name().equals(event.name())) {
result = play.i18n.Messages.get("...");
}
return result;
}
Секретную инфу потер :) Но думаю, и так все ясно... LogEventTypes - у нас enum.
Код писал индус (нет ну правда, индус).
+158
$uid = cod($logininfo['id']);
$adres = decod($adr['p1']).":".decod($adr['p2']);
function cod($cod3){
return $cod3;
}
function decod($cod3){
return $cod3;
}
Панель управления игровыми серверами GamePL. Взялся на свою голову написать дополнений =)
+75
HostInfo info = null;
if (info == null)
return;
info.setOsName(os);
Выдержка из достаточно серьезного проекта