- 1
Папка, создаваемая USB Disk Antivirus в корне всех дисков предотвращает заражение компьютера через Autorun. Пожалуйста не изменяйте и не удаляйте ее.
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−127
Папка, создаваемая USB Disk Antivirus в корне всех дисков предотвращает заражение компьютера через Autorun. Пожалуйста не изменяйте и не удаляйте ее.
Напомнило кое-что.
−122
var mapDress:BitmapData = MathUtils.getTransformationMapTShort(bottomMovie.width, bottomMovie.height, pointFilterTopLeft, pointFilterBezierLeft, point1, pointFilterLimitLeft, pointFilterTopRight, pointFilterBezierRight, point2, pointFilterLimitRight, this.clothes[bottomIndex.layer][bottomIndex.child].colored_set[this.clothes[bottomIndex.layer][bottomIndex.child].currentColorVariant].variants[this.clothes[bottomIndex.layer][bottomIndex.child].currentWearVariant][this.currentView].arm_points_right, this.clothes[bottomIndex.layer][bottomIndex.child].colored_set[this.clothes[bottomIndex.layer][bottomIndex.child].currentColorVariant].variants[this.clothes[bottomIndex.layer][bottomIndex.child].currentWearVariant][this.currentView].arm_points_left);
"752 см позитива!"
+161
AnsiString DateArray = "";
int DaysBetween = 0;
DaysBetween = DateTimePicker2->Date - DateTimePicker1->Date;
for (int i = 0; i <= DaysBetween; i++ )
{
if (i != 0)
DateArray = DateArray + " OR ";
DateArray = DateArray + " date_made = '"+DateToStr(DateTimePicker1->Date + i)+"'";
}
Очевидно, подготавливаем запрос для отбора по диапазону дат :)
+154
// сохраняем лог
$log = fopen($logfile,'w'); // открыли файл, стерев его
foreach($temp as $tmp) {fwrite($log,trim($tmp)."n");} // каждый элемент массива записали в строку
fclose($log); // закрыли лог
?>
Зачем мне implode и file_put_contents?
У меня нет времени, чтобы ебаться с ними! Лучше я создам цикл.
http://forum.htmlbook.ru/index.php?showtopic=7169
На это ссылка в топ-теме причем.
+127
<p>
Журкабаев
<span> </span>
<span>- заместитель акима города Костаная,</span>
</p>
<p>
Марат Кенжебекович
<span> председатель комиссии</span>
</p>
http://kostanay-city.kz/index.php?mod=page&obj=2701 таблица в центре страницы, кода много, поэтому приведу часть... Мне жаль того кто её делал, но еще больше жаль знакомого которому пришлось переносить это чудо на новый сайт... CTRL + U, не поможет посмотреть всю картину, т.к. данные подгружаются, но firebug приятно радует)
+158
foreach ($aa as $key => $value) {
$aa[$key][2] = str_replace(',', '.', $aa[$key][2]);
$aa[$key][3] = str_replace(',', '.', $aa[$key][3]);
$aa[$key][4] = str_replace(',', '.', $aa[$key][4]);
}
+140
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>По колено в коде — Говнокод.ру</title>
<meta name="keywords" content="говнокод, смешной код, быдлокод, быдлокодеры, индусы, для программистов, про программистов, индусский код, записки программиста, говно, говнокод на php, mysql, perl" />
<meta name="description" content="Сборник говнокода на различных языках программирования" />
<meta property="og:image" content="http://govnokod.ru/images/brand.gif" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="icon" href="/animated_favicon.gif" type="image/gif" />
<link rel="stylesheet" href="/css/style.css?v=4" media="all" type="text/css" />
<!--[if lte IE 7]><link href="/css/ie.css" rel="stylesheet" type="text/css"><![endif]-->
<link title="rss govnokod.ru" type="application/rss+xml" rel="alternate" href="http://govnokod.ru/rss"/>
<link rel="stylesheet" type="text/css" href="/media/b5aabef57bd7c3fa62379caa0e483deb.css?files=jshighlight/govnokod.css" />
<script type="text/javascript">
//<!--
var SITE_PATH = ''; var SITE_LANG = '';
//-->
</script>
<script type="text/javascript" src="/media/ddd20ce56acf1d9ebadd126322495087.js?files=jquery.js,jquery.scrollTo.js,govnokod.js,jshighlight/highlight.pack.js&v=4"></script>
</head>
Привлекает внимание поисковиков(04).
+80
public static java.util.Date getPreviousMonth () throws ParseException {
Date currentDate = new Date(System.currentTimeMillis());
Calendar currentCalendar = Calendar.getInstance();
currentCalendar.setTimeInMillis(currentDate.getTime());
SimpleDateFormat format = new SimpleDateFormat("dd.MM.yyyy");
//currentCalendar.set(Calendar.MONTH, currentCalendar.get(Calendar.MONTH) - 1);
currentCalendar.set(Calendar.DAY_OF_MONTH, currentCalendar.get(Calendar.DAY_OF_MONTH) - 30);
//currentCalendar.set(Calendar.DATE, currentCalendar.getActualMinimum(Calendar.DAY_OF_MONTH));
format.format(currentCalendar.getTime());
java.util.Date resultDate = null;
resultDate = format.parse(format.format(currentCalendar.getTime()));
return resultDate;
}
Занимаюсь рефакторингом. Особо радует предпоследняя строчка.
+121
private void textBox1_TextChanged(object sender, EventArgs e)
{
if ((textBox1.Text + textBox2.Text).Length + 1 > 255)
{
textBox1.BackColor = Color.LightPink;
textBox2.BackColor = Color.LightPink;
}
else
{
textBox1.BackColor = Color.White;
textBox2.BackColor = Color.White;
}
if ((textBox3.Text + textBox6.Text).Length + 1 > 255)
{
textBox3.BackColor = Color.LightPink;
textBox6.BackColor = Color.LightPink;
}
else
{
textBox3.BackColor = Color.White;
textBox6.BackColor = Color.White;
}
}
private void bntSave_Click(object sender, EventArgs e)
{
if (textBox1.BackColor == Color.LightPink)
{
MessageBox.Show("Длинна полей От и Адрес в сумме не должна превышать 255");
return;
}
if (textBox3.BackColor == Color.LightPink)
{
MessageBox.Show("Длинна полей Кому и Адрес в сумме не должна превышать 255");
return;
}
Properties.Settings.Default.Save();
Navigator.Navigate(new ConfigMenuPage());
}
ТЗ: "Суммарная длина полей X и Y не должна превышать 255 символов"
Решение шедеврально как по вычислению длинны суммы строк, так и по цветовой идентификации :)
+158
public function addOffer($type='vendor.model', $values) {
switch ($type) {
case 'vendor.model': $offer = new yml_type_vendor_model(); break;
}
// Заполняем значениями
$offer->setValues($values);
......