- 1
Куда пропадают мои г-коды?
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+147
Куда пропадают мои г-коды?
+122
Привет, посетите наш сайт [color=red]yadelphi.ru[/color]!
+144
class Model_Task extends Model_Base {
const STATUS_CHECK = 0;
const STATUS_REWORK = 1;
const STATUS_COMPLETED = 2;
const STATUS_INVALID = 99999;
...
Видимо чтобы всегда последним был в случае чего...
+9
void SillyThread::run()
{
forever
{
// ... a test ...
}
}
void CrazyThread::run()
{
forever
{
if(qrand() % 2 == 0)
{
// ... a test ...
}
if(qrand() % 2 == 0)
{
// ... a test ...
}
if(qrand() % 2 == 0)
{
// ... a test ...
}
if(qrand() % 2 == 0)
{
// ... a test ...
}
if(qrand() % 2 == 0)
{
// ... a test ...
}
if(qrand() % 2 == 0)
{
// ... a test ...
}
if(qrand() % 2 == 0)
{
// ... a test ...
}
if(qrand() % 2 == 0)
{
// ... a test ...
}
if(qrand() % 2 == 0)
{
// ... a test ...
}
}
}
не совсем говно, но имена и структука прикололи. из кода стресс-теста PDF библиотеки poppler.
+152
function unix_timestamp_to_human ($timestamp = "", $format = 'D d M Y - H:i:s')
{
if (empty($timestamp) || ! is_numeric($timestamp)) $timestamp = time();
return ($timestamp) ? date($format, $timestamp) : date($format, $timestamp);
}
$unix_time = "1251208071";
echo unix_timestamp_to_human($unix_time); //Return: Tue 25 Aug 2009 - 14:47:51
Я всё правильно понял, код воняет?
+130
throw new GnuPGException(String.Format("An error occurred while trying to execute command {0}.", command, exp));
+64
/**
* @return the timeout from the URL, in milliseconds
*/
private static long timeout(Properties props)
Из драйвера JDBC PostgreSQL.
+131
foreach (var oi in order.Items)
{
if (oi.Offer.Name == "BRNCoreDigTrial" || oi.Offer.Name == "BRNCoreDig1Pay" || oi.Offer.Name == "BRNDigUpgrade5pay" || oi.Offer.Name == "BRNDigUpgrade1Pay"
|| oi.Offer.Name == "BRN04StdDIG1Pay" || oi.Offer.Name == "BRN04StdDIG3Pay" || oi.Offer.Name == "BRNCoreDig1PayOld" || oi.Offer.Name == "BRNCoreDigTrialOld"
|| oi.Offer.Name == "BRN04DlxDIG1Pay" || oi.Offer.Name == "BRN04DlxDIG3Pay" || oi.Offer.Name == "BRN04UltDIG1Pay" || oi.Offer.Name == "BRN04UltDIG3Pay")
{
isDigital = true;
break;
}
}
+8
void Cluster::CloseConnection()
{
m_Connection->close();
if (!m_Connection->IsOK())
throw ConnectionError(m_Connection->LastError());
}
void ClusterGroup::RemoveCluster(int iIndex)
{
Cluster *pSubCluster = m_SubClusters->At[i];
pSubCluster->CloseConnection();
delete pSubCluster;
m_SubClusters->SetAt(i, NULL);
}
И потекло...
+118
<div class="is-element-border-top">
<div class="is-element-border-right">
<div class="is-element-border-bottom">
<div class="is-element-border-left">
<div class="is-element-corner-top-left">
<div class="is-element-corner-top-right">
<div class="is-element-corner-bottom-right">
<div class="is-element-corner-bottom-left">
<span class="curr_show ">
5 days </span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Каскадная таблица стилей, ёпта.