- 1
- 2
- 3
- 4
class RequiredLibraryClassNotFoundInALibraryDirectoryException extends Exception
{
//...
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+153
class RequiredLibraryClassNotFoundInALibraryDirectoryException extends Exception
{
//...
}
Ну и имя у класса:)
−13.1
void Example5 (Scoord_t* coord, double data [], int size)
{
int i = 0;
while (i < size)
{
assert (0<= i && i < size);
if (i == 0) {data [i] = 1;}
if (i == 1) {data [i] = 2;}
if (i == 2) {data [i] = 3;}
if (i > 2 && i <=size/2) {data [i] = data [i - 3] + 6;}
if (i == size/ 2) {data [i] = data [i - 1] + 3;}
if (i == size/2 + 1) {data [i] = data [i - 1] - 1;}
if (i == size/2 + 2) {data [i] = data [i - 1] - 1;}
if (i > size/2 + 2) {data [i] = data [i - 3] - 6;}
Print (data, i);
i++;
}
}
Просматривал свои старенькие функции... Не мог удержаться
−329.1
Public Function random()
Randomize
random = Left(Mid("0123456789abcdefghijklmnopqrstuvwxyz", 36 * Rnd() + 1, 1) + _
Mid("0123456789abcdefghijklmnopqrstuvwxyz", 36 * Rnd() + 1, 1) + _
Mid("0123456789abcdefghijklmnopqrstuvwxyz", 36 * Rnd() + 1, 1) + _
Mid("0123456789abcdefghijklmnopqrstuvwxyz", 36 * Rnd() + 1, 1) + _
Mid("0123456789abcdefghijklmnopqrstuvwxyz", 36 * Rnd() + 1, 1) + _
Mid("0123456789abcdefghijklmnopqrstuvwxyz", 36 * Rnd() + 1, 1) + _
Mid("0123456789abcdefghijklmnopqrstuvwxyz", 36 * Rnd() + 1, 1) + _
Mid("0123456789abcdefghijklmnopqrstuvwxyz", 36 * Rnd() + 1, 1) + _
Mid("0123456789abcdefghijklmnopqrstuvwxyz", 36 * Rnd() + 1, 1) + _
Mid("0123456789abcdefghijklmnopqrstuvwxyz", 36 * Rnd() + 1, 1) + _
Mid("0123456789abcdefghijklmnopqrstuvwxyz", 36 * Rnd() + 1, 1) + _
Mid("0123456789abcdefghijklmnopqrstuvwxyz", 36 * Rnd() + 1, 1), 10)
End Function
Функция генерации случайного набора символов от модератора форума Access Бурундука на http://www.cyberforum.ru/
+64.1
public function GetRandomizedAnswers()
{
$answers = array();
if (!empty($this->answer1))
{
$answers[] = $this->answer1;
}
if (!empty($this->answer2))
{
$answers[] = $this->answer2;
}
if (!empty($this->answer3))
{
$answers[] = $this->answer3;
}
if (!empty($this->answer4))
{
$answers[] = $this->answer4;
}
if (!empty($this->answer5))
{
$answers[] = $this->answer5;
}
return shuffle($answers);
}
+141
if ($_POST['form_submit'] == 'update_plugins') {
$this->con->db_nofetch('DELETE FROM `blog_plugins_status` WHERE `blog_id`=\''.$this->getState('blog_id').'\' AND ( `state`=\'none\');');
$q2 = 'UPDATE `blog_plugins_status` SET `status`=\'cancelled\' WHERE `blog_id`=\''.intval($this->blog_id).'\' AND `status`=\'semicancelled\';';
$this->con->db_nofetch($q2);
$q2 = 'UPDATE `blog_plugins_status` SET `status`=\'completed\' WHERE `blog_id`=\''.intval($this->blog_id).'\' AND `status`=\'semicompleted\';';
$this->con->db_nofetch($q2);
// updating saved versions to latest
$update_plug_ids = implode('\', \'', $this->plugins_list_update);
$q2 = 'UPDATE `blog_plugins_status` AS `bps` JOIN `blog_plugins` AS `bp` ON `bp`.`id` = `bps`.`plugin_id` SET `bps`.`plugin_version` = `bp`.`plugin_version` WHERE `bps`.`blog_id`=\''.intval($this->blog_id).'\' AND `bp`.`id` IN (\''.$update_plug_ids.'\');';
$this->con->db_nofetch($q2);
}
sdf gsdf gsdfg
+135
546
156546652646
946
46
687
+134.6
private bool _isProcessingThreadExited = false;
public bool IsShutDownComplete()
{
if (!_isProcessingThreadExited)
{
// a thread hasnt exited yet
return false;
}
return true;
}
... осталось еще bool на true проверить через ToString().Length > 4 - и это будет верх говнокодерства...
+144
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>lolo</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<style type="text/css">
.top_mnth_block1
{
width:275px;
height:400px;
background:url(http://foreverfree.ru/templates/images/top_month_poster.png) no-repeat 0 0;
}
.top_mnth_block1 p.top_mnth_block1_p
{
margin: 0;
padding: 62px 40px 0;
height: 300px;
overflow: hidden;
color: #fdc;
}
</style>
</head>
<body>
<div class="top_mnth_block1">
<p class="top_mnth_block1_p">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu dui nec elit aliquam convallis. Donec a massa. In condimentum eros id enim. Phasellus sed libero. Duis ac lacus. In turpis felis, aliquam vitae, lacinia quis, egestas fermentum, lorem. In vulputate sem et lectus. Curabitur euismod, nunc a condimentum condimentum, odio mauris ultricies erat, quis vestibulum enim ante non elit. Phasellus sollicitudin, nisi vestibulum mollis consequat, metus nisl sollicitudin dui, posuere cursus tortor lectus vitae sem. Mauris semper dui sed velit. Aliquam fringilla sem ac eros. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Quisque quis nisl a neque pharetra tristique. Fusce tellus diam, convallis sit amet, ullamcorper et, euismod et, urna. Curabitur quis justo. Proin leo. Nulla nec ipsum non leo suscipit egestas. Morbi ut felis. Aliquam erat volutpat. Sed nulla urna, tristique eget, suscipit a, sollicitudin ut, purus. Duis tristique, neque sed ullamcorper elementum, enim massa rutrum massa, id aliquam elit ante a dolor. Pellentesque elementum mauris ac nunc. Proin id eros. Ut pharetra eros sit amet purus. Phasellus convallis sem at tellus. Quisque eu nunc.</p>
</div>
</body>
</html>
Скриншот:
http://i42.tinypic.com/2q2mz3c.png
+150
if ($d != "".(double)$d)
Говорят, что таким скриптом можно проверять данные когда принимаешь из из поля. Чтобы никто плохого не смог закинуть!
−101
on (release) {
gotoAndStop(_currentframe + (4 - _currentframe%10));
//...
}
Переход на четвертый кадр с начала той десятки кадров, где сейчас находимся
(ну вот такой комментарий)