- 1
- 2
- 3
- 4
<?php
class Modules_Admin_Parser_Driver_SiteCom implements Modules_Admin_Parser_Interface {
}
?>
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+171
<?php
class Modules_Admin_Parser_Driver_SiteCom implements Modules_Admin_Parser_Interface {
}
?>
Старый добрый неймспейс
−92
-- | The unit datatype @()@ has one non-undefined member, the nullary
-- constructor @()@.
data () = () deriving Generic
data (,) a b = (,) a b
. . .
data (,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x y z a_ b_ c_ d_ e_ f_ g_ h_ i_ j_ k_ l_ m_ n_ o_ p_ q_ r_ s_ t_ u_ v_ w_ x_ y_ z_ a__ b__ c__ d__ e__ f__ g__ h__ i__ j__
= (,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o p q r s t u v w x y z a_ b_ c_ d_ e_ f_ g_ h_ i_ j_ k_ l_ m_ n_ o_ p_ q_ r_ s_ t_ u_ v_ w_ x_ y_ z_ a__ b__ c__ d__ e__ f__ g__ h__ i__ j__
-- deriving Generic
{- Manuel says: Including one more declaration gives a segmentation fault.
. . .
*тяжелый вздох*
http://www.haskell.org/ghc/docs/latest/html/libraries/ghc-prim-0.2.0.0/src/GHC-Tuple.html#%28%29
−111
public class MonstrGrafic extends ModulINT {
var data:XML;
var colors:Array = new Array(
'0x008080',
'0x800080',
'0xccffcc',
'0x00ffff',
'0x800000',
'0x0000ff',
'0x00ccff',
'0xccffff',
'0xffff00',
'0xffff99',
'0x000080',
'0xff00ff'
);
var ListTime:Array = new Array(
"08:00:00 - 08:15:00",
"08:15:00 - 08:30:00",
"08:30:00 - 08:45:00",
"08:45:00 - 09:00:00",
"09:00:00 - 09:15:00",
"09:15:00 - 09:30:00",
"09:30:00 - 09:45:00",
"09:45:00 - 10:00:00",
"10:00:00 - 10:15:00",
"10:15:00 - 10:30:00",
"10:30:00 - 10:45:00",
"10:45:00 - 11:00:00",
"11:00:00 - 11:15:00",
"11:15:00 - 11:30:00",
"11:30:00 - 11:45:00",
"11:45:00 - 12:00:00",
"12:00:00 - 12:15:00",
"12:15:00 - 12:30:00",
"12:30:00 - 12:45:00",
"12:45:00 - 13:00:00",
"13:00:00 - 13:15:00",
"13:15:00 - 13:30:00",
"13:30:00 - 13:45:00",
"13:45:00 - 14:00:00",
"14:00:00 - 14:15:00",
"14:15:00 - 14:30:00",
"14:30:00 - 14:45:00",
"14:45:00 - 15:00:00",
"15:00:00 - 15:15:00",
"15:15:00 - 15:30:00",
"15:30:00 - 15:45:00",
"15:45:00 - 16:00:00",
"16:00:00 - 16:15:00",
"16:15:00 - 16:30:00",
"16:30:00 - 16:45:00",
"16:45:00 - 17:00:00",
"17:00:00 - 17:15:00",
"17:15:00 - 17:30:00",
"17:30:00 - 17:45:00",
"17:45:00 - 18:00:00",
"18:00:00 - 18:15:00",
"18:15:00 - 18:30:00",
"18:30:00 - 18:45:00",
"18:45:00 - 19:00:00",
"19:00:00 - 19:15:00",
"19:15:00 - 19:30:00",
"19:30:00 - 19:45:00",
"19:45:00 - 20:00:00",
"20:00:00 - 20:15:00",
"20:15:00 - 20:30:00",
"20:30:00 - 20:45:00",
"20:45:00 - 21:00:00",
"21:00:00 - 21:15:00",
"21:15:00 - 21:30:00",
"21:30:00 - 21:45:00",
"21:45:00 - 22:00:00",
"22:00:00 - 22:15:00",
"22:15:00 - 22:30:00",
"22:30:00 - 22:45:00",
"22:45:00 - 23:00:00",
"23:00:00 - 23:15:00",
"23:15:00 - 23:30:00",
"23:30:00 - 23:45:00",
"23:45:00 - 24:00:00"
);
+160
class array
{
int data[256];
int p;
public:
array ():
p (0)
{}
array & operator , (int a)
{
data[p++] = a;
return *this;
}
array & operator = (const array & arr)
{
p = 0;
memcpy (data, arr.data, sizeof (data));
return *this;
}
int & operator [] (size_t i)
{
return data[i];
}
};
#define _I array(),
#define I_
#define o_O ,
int _tmain(int argc, _TCHAR* argv[])
{
array arr;
arr = _I 1,2,3,4,5,6 I_; // init
arr o_O 7,8,9,10; // append new
arr o_O 11 o_O 12; // append new
}
http://www.gamedev.ru/flame/forum/?id=153265#m4
+78
/**
* @param loginName
* @return
* This method is create a LoginName as Input data
*/
public String getLoginName(String loginName)
{
String userQuery="select u.LoginName from User u";
Recordset rs_user=null;
rs_user = CustomExternalServiceImplUtil.getInstance().executeQuery(userQuery);
List<String> userList = new ArrayList<String>();
while(rs_user.moveNext()){
userList.add(rs_user.valueFromIndex(0).toString());
}
int i=1;
String result = loginName;
for(int j=0; j < userList.size(); j++){
if(userList.get(j).equals(result))
{
result = loginName+i++;
j=0;
}
}
return result;
}
Рефаткоринг чужого кода. Минут пять втуплял, что же тут вообще делается. Еще столько же придумывал, как же это привести в божеский вид с сохранением прежней функциональности.
+174
if(isset($_GET['aspx'])) include("parthers/aspx.php");
elseif(isset($_GET['b7186'])) include("parthers/b7186.php");
elseif(isset($_GET['dip'])) include("parthers/dip.php");
elseif(isset($_GET['Maslyakov'])) include("parthers/Maslyakov.php");
elseif(isset($_GET['Zhannetka'])) include("parthers/Zhannetka.php");
elseif(isset($_GET['b7186rft'])) include("parthers/b7186rft.php");
elseif(isset($_GET['mistral09'])) include("parthers/mistral09.php");
elseif(isset($_GET['Simmka'])) include("parthers/Simmka.php");
elseif(isset($_GET['polevnik'])) include("parthers/polevnik.php");
elseif(isset($_GET['dmitriev83'])) include("parthers/dmitriev83.php");
elseif(isset($_GET['orion'])) include("parthers/orion.php");
elseif(isset($_GET['Krick'])) include("parthers/Krick.php");
elseif(isset($_GET['ae63237'])) include("parthers/ae63237.php");
elseif(isset($_GET['zen'])) include("parthers/zen.php");
elseif(isset($_GET['antkuz'])) include("parthers/antkuz.php");
elseif(isset($_GET['psd'])) include("parthers/psd.php");
elseif(isset($_GET['122745105643'])) include("parthers/122745105643.php");
elseif(isset($_GET['amadey'])) include("parthers/amadey.php");
elseif(isset($_GET['prosto'])) include("parthers/prosto.php");
elseif(isset($_GET['Oushin'])) include("parthers/Oushin.php");
elseif(isset($_GET['alkir'])) include("parthers/alkir.php");
elseif(isset($_GET['werty2011'])) include("parthers/werty2011.php");
elseif(isset($_GET['valjek'])) include("parthers/valjek.php");
elseif(isset($_GET['32167911'])) include("parthers/32167911.php");
elseif(isset($_GET['biz'])) include("parthers/biz.php");
elseif(isset($_GET['hranitely'])) include("parthers/hranitely.php");
elseif(isset($_GET['stalker147'])) include("parthers/stalker147.php");
elseif(isset($_GET['boef8'])) include("parthers/boef8.php");
elseif(isset($_GET['Mastak'])) include("parthers/Mastak.php");
elseif(isset($_GET['kna888'])) include("parthers/kna888.php");
elseif(isset($_GET['index'])) include("parthers/index.php");
elseif(isset($_GET['abc'])) include("parthers/abc.php");
elseif(isset($_GET['ollgga69'])) include("parthers/ollgga69.php");
elseif(isset($_GET['Stalker007'])) include("parthers/Stalker007.php");
elseif(isset($_GET['maluw'])) include("parthers/maluw.php");
elseif(isset($_GET['diana2113327'])) include("parthers/diana2113327.php");
elseif(isset($_GET['staschel'])) include("parthers/staschel.php");
else include("parthers/file.php");
Набрёл в проектах на фри-ланс.ру. Описание проекта: "Есть вот такой код, нужно придумать как его оптимизировать"
+147
memcpy((void*)m_sendBuffer,(void*)jsonString,strlen(jsonString));
3 ошибки в одной строчке))
+170
//ці граблі краще не чіпати, а то все завалиться) тут якось магічно визначається попередній крок)
if (($step_id - 1) == 4) {
$prstep_id = 3;
} elseif (($step_id - 1) == 6) {
$prstep_id = 5;
} elseif (($step_id - 1) == 9) {
$prstep_id = 8;
} elseif (($step_id - 1) == 3) {
$prstep_id = 4;
} elseif (in_array($step_id, array(6, 9, 14))) { //кроки на яких рахуються закритим проектом
$prstep_id = $step_id;
} else {
$prstep_id = ($step_id - 1);
}
+123
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.0/jquery-ui.min.js"></script>
<link rel="stylesheet" href="/ww.admin/theme/admin.css" type="text/css" />
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.0/themes/south-street/jquery-ui.css" type="text/css" />
</head>
<body>
<div id="header">
<div id="menu-top">
<ul>
<li><a href="/ww.admin/pages.php">Pages</a></li>
<li><a href="/ww.admin/users.php">Users</a></li>
<li><a href="/ww.incs/logout.php?redirect=/ww.admin/">Log Out</a></li>
</ul>
</div>
</div>
<div id="wrapper">
<h1>Pages</h1><div class="left-menu"><script src="/j/jstree/jquery.jstree.js"></script>
<script src="/ww.admin/pages/menu.js"></script>
<div id="pages-wrapper"><ul><li id="page_1"><a href="pages.php?id=1"><ins> </ins>Home</a><ul><li id="page_2">
<a href="pages.php?id=2"><ins> </ins>Second Page</a></li></ul></li></ul></div></div>
<div class="has-left-menu"><h2>FORM GOES HERE</h2></div>
<style type="text/css"> @import "pages/css.css";</style></div>
</body>
</html>
+167
class country extends baza
{
......
function show_description($country=NULL)
{
if ($this instanceof country)
$quest="SELECT description FROM countries WHERE name=\"$this->name"";
if ($this instanceof city) // йобаный стыд!!! 0_0
$quest="SELECT description FROM cities WHERE name\"$this->name\" AND country=\"$country\" ";
......
}
class city extends country
.....
предок "country" знает о потомке "city"
Говнокод из говнокнижки Елены Бенкен "PHP, MySQL, XML Программирование для интернета" БХВ-Петербург,ISBN 5-9775-0039-4 страница 209