- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
private Integer employeeId;
public Integer getEmployeeId() {
return employeeId;
}
public void setEmployeeId(Integer customerId) {
this.employeeId = customerId;
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+152
private Integer employeeId;
public Integer getEmployeeId() {
return employeeId;
}
public void setEmployeeId(Integer customerId) {
this.employeeId = customerId;
}
Проперти бина, а также его геттер и сеттер. Особенно сеттер.
+144.1
<div styleborder:3px solid #000000;
height: 300px;
width: 600px;
text-align:center;>
background:url(http://cs4288.vkontakte.ru/u29274663/90187299/x_a74c614b.jpg) no-repeat center;">
</div>
html-опус
+142.3
//------------------------------Запись в профиль ----------------------------//
$ufile = file(BASEDIR."local/profil/$log.prof");
$udata = explode(":||:",$ufile[0]);
if($udata[10]>0){
$udata[10]=0;
$udata[14]=$ip;
for ($u=0; $u<$config_userprofkey; $u++){
$utext.=$udata[$u].':||:';}
if($udata[0]!="" && $udata[1]!="" && $udata[4]!="" && $utext!=""){
$fp=fopen(BASEDIR."local/profil/$log.prof","a+");
flock ($fp,LOCK_EX);
ftruncate ($fp,0);
fputs($fp,$utext);
fflush ($fp);
flock ($fp,LOCK_UN);
fclose($fp);
unset($utext);
}}
Из говно cms wap motor
+130.9
Long newlim = Long.valueOf(scorLim);
BigDecimal newSum = new BigDecimal(newlim.doubleValue());
// округлить сумму
if (reqCurrency.equalsIgnoreCase("RUR")) {
newSum = newSum.setScale(0, BigDecimal.ROUND_HALF_DOWN);
newSum = newSum.divide(new BigDecimal(1000), BigDecimal.ROUND_DOWN).multiply(new BigDecimal(1000));
} else {
newSum = newSum.setScale(0, BigDecimal.ROUND_HALF_DOWN);
newSum = newSum.divide(new BigDecimal(10), BigDecimal.ROUND_DOWN).multiply(new BigDecimal(10));
}
newlim = new Long(newSum.longValue());
Система EGAR.
+134.3
if ($fset=@file_get_contents(H.'sys/dat/settings_6.2.dat'))
{
$set=unserialize($fset);
}
else{
if (!($fset=@file(H.'sys/dat/settings.dat')) && is_file(H.'install/index.php'))
{
header("Location: /install/");
exit;
}
for ($i=0;$i<count($fset) ;$i++ ) {
if (ereg('[^//].*=', trim($fset[$i]))){
$sset=explode('=', trim($fset[$i]), 2);
$sset[0]=eregi_replace('(^ *)|( *$)', '', $sset[0]);
$sname=$sset[0];
$set_komm[$sname]=eregi_replace('^.*//', '', $sset[1]);
$set_komm[$sname]=eregi_replace('(^ *)|( *$)', '', $set_komm[$sname]);
$sset[1]=eregi_replace('//.*$', '', $sset[1]);
$sset[1]=eregi_replace('(^ *)|( *$)', '', $sset[1]);
$set[$sname]=$sset[1];
}
}
}
Ещё одно творение автора "DCMS". Убил бы за такое количество eregi_replace
+157.5
if($city == "Chicago" || $city == "chicago" || $city == "LosAngeles" || $city == "losangeles" || $city == "Orlando" || $city == "orlando" || $city == "LongIsland" || $city == "longisland" || $city == "Baltimore" || $city == "baltimore" || $city == "SouthFlorida" || $city == "southflorida" || $city == "Hartford" || $city == "hartford" || $city == "Allentown" || $city == "allentown" || $city == "Stamford" || $city == "stamford" || $city == "Greenwich" || $city == "greenwich" || $city == "HamptonRoads" || $city == "hamptonroads" || $city == "OrangeCounty" || $city == "orangecounty")
{
if($city == "chicago")
$city = "Chicago";
if($city == "losangeles")
$city = "LosAngeles";
// Еще двадцать таких условий...
if($city == "Chicago")
{
$x = rand(1, 9);
$headerIMG = "/img/".$city."/".$x.".jpg";
$affiliateDomain = "http://wtf.somesite.com";
$affiliateURL = "http://wtf.somesite.come/wtf.jsp";
$poweredByIMG = "/img/poweredBy_wtf.jpg";
$upsellIMG = "/img/wtf.jpg";
$upsellURL = "http://wtf.somesite.com/wtf.aspx";
$searchIMG = "/img/search_".$city.".jpg";
$searchURL = "http://wtf.somesite.com/wtf.jsp";
$topArea = "searches_Chicago.php";
$stateDefault = "IL";
$privacyPolicyURL = "http://wtf.somesite.com/wtf";
$termsURL = "http://wtf.somesite.com/services/wtf";
$showWebID = "1";
}
/// И еще двадцать штук таких блоков..
+141.4
www.govnokod.ru
<b class="r1"></b><b class="r1"></b><b class="r1"></b><b class="r2"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b><b class="r5"></b><b class="r7"></b><b class="r10"></b>
Хмм... Может показать разрабам, как закруглять углы у блоков без набора этого говна?.. Особенно если используются JS фрэймворки...
html
+150
try {
AjaxContext ajaxContext = AjaxContextImpl
.getCurrentInstance(context);
ajaxContext.setAjaxRequest(true);
} catch (Exception e) {
e.getMessage();
}
+147
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
char end;
char *stroka[end];
int number[10] = {0,1,2,3,4,5,6,7,8,9};
int size = 0;
cout << "Input element of array: \n";
while(end != '*')
{
cin >> end;
*stroka[size] = end;
size++;
}
for(int i = 0; i < size-1; i++)
{
cout << stroka[i] << " ";
}
for(int i = 0; i < size-1; i++)
{
for(int j = 0; j < 10; j++)
{
if(*stroka[i] == number[j])
{
cout << *stroka[i] << " ";
}
}
}
system("PAUSE");
}
говнокод одногруппника. оно ещё и собирается 0_o.
−870.1
select x1.g_id,
(select switch(
str='0','новое строительство',
str='1','подготовка территории',
str='2','реконструкция',
str='3','снос' )
from t1
where g_id=x1.p_id
and f_id in(1,71,81)
and id=1),
(select switch(
str='0','административное здание',
str='1','детский сад',
str='2','дорога',
str='3','жилое здание',
str='4','инженерные сети',
str='5','коммуникации',
str='6','поликлиника',
str='7','путепровод',
str='8','ЦТП',
str='9','школа') from t1
where g_id=x1.p_id
and f_id in(1,71,81)
and id=2),
(select 'Субъект '+
(select str from subj
where type1=1
and id1=int(x3.str))+
switch(
x4.str='0',', город ',
x4.str='1',', деревня ',
x4.str='2',', ПГТ ',
x4.str='3',', поселок ',
x4.str='4',', село ')+
(select str from subj
where type1=3
and id1=int(x5.str))+iif(x6.str,
(select ', '+str from subj
where type1=2
and id1=int(x6.str)),'')+iif(x7.str,
(select ', '+str from subj
where type1=5
and id1=int(x7.str)),'')+iif(x8.str,',микр.'+x8.str,'')+iif(x9.str,', квартал '+x9.str,'')+iif(x10.str,', жил.группа '+x10.str,'')+
(select Format(', '+str) from t1
where f_id in(1,71,81)
and id=12
and g_id=x1.p_id)+iif(x11.str,', вл.'+x11.str,'')+iif(x12.str,', д.'+x12.str,'')+iif(x13.str,', кор.'+x13.str,'')+iif(x14.str,', стр.'+x14.str,'')
from t1 as x3,t1 as x4,t1 as x5,t1 as x6,t1 as x7,t1 as x8,t1 as x9,t1 as x10,t1 as x11,t1 as x12,t1 as x13,t1 as x14
where x3.f_id in(1,71,81)
and x3.id=4
and x3.g_id=x1.p_id
and x4.f_id=x3.f_id
and x4.id=7
and x4.g_id=x3.g_id
and x5.f_id=x3.f_id
and x5.id=8 and x5.g_id=x3.g_id
and x6.f_id=x3.f_id
and x6.id=5
and x6.g_id=x3.g_id
and x7.f_id=x3.f_id
and x7.id=6
and x7.g_id=x3.g_id
and x8.f_id=x3.f_id
and x8.id=9
and x8.g_id=x3.g_id
and x9.f_id=x3.f_id
and x9.id=10
and x9.g_id=x3.g_id
and x10.f_id=x3.f_id
and x10.id=11
and x10.g_id=x3.g_id
and x11.f_id=x3.f_id
and x11.id=13
and x11.g_id=x3.g_id
and x12.f_id=x3.f_id
and x12.id=14
and x12.g_id=x3.g_id
and x13.f_id=x3.f_id
and x13.id=15
and x13.g_id=x3.g_id
and x14.f_id=x3.f_id
and x14.id=16
and x14.g_id=x3.g_id),
(select code1 from fkko,t1
where id1=int(t1.str)
and g_id=x1.g_id
and f_id=x1.f_id
Запрос по теме "Помогите ускорить базу".
Взято здесь: http://sql.ru/forum/actualthread.aspx?bid=4&tid=656930