- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
public function throwExceptions($flag = null)
{
if ($flag !== null) {
$this->_throwExceptions = (bool) $flag;
return $this;
}
return $this->_throwExceptions;
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+155
public function throwExceptions($flag = null)
{
if ($flag !== null) {
$this->_throwExceptions = (bool) $flag;
return $this;
}
return $this->_throwExceptions;
}
Зенд
+34
void dump_indexes(map<int,stride_slices> picks, ofstream &f);
{
f<<"# full size: "<<picks.size()<<endl;
for(map<int, stride_slices>::iterator
p=picks.begin(); p!=picks.end(); ++p)
{
f<<"## "
<<p->first<<"'st stride slices count: "
<<p->second.size()<<endl;
for(stride_slices::iterator
pp=p->second.begin(); pp!=p->second.end(); ++pp)
{
f<<"### "
<< p->first<<"'st stride, "
<<pp->first<<"'st slice size: "
<<pp->second.size()<<endl;
for(max_slice::iterator
ppp=pp->second.begin(); ppp!=pp->second.end(); ++ppp)
{
f<<"#### "
<<p->first<<"'st stride, "
<<pp->first<<"'st slice, "
<<ppp->first<<"'st chunk size:"
<<ppp->second.size()<<endl;
for(max_chunk::iterator
pppp=ppp->second.begin(); pppp!=ppp->second.end(); ++pppp)
f<<" "
<<p->first<<" "
<<pp->first<<" "
<<ppp->first<<" "
<<pppp->first<<" : "
<<pppp->second<<endl;
}
}
}
}
а как нормально просмотреть кучу вложенных контейнеров?
+144.9
$data=funny_parser($data);
//модуль недобавления слов вконец
$andtr=array('Андатра','Выпь','Пеликан','Пучеглаз','Хвостозуб','Декроль','Устрица','Челюстёлог','Рукоед','Йыждивение','Оторопь','Осётр','Кингура','Большой лось','Пученоска','Вомбат','Плоскогубка','');
$data=$data.' <span style="color:#93FF4A;font-size:15px">'.$andtr[rand(0,count($andtr)-1) ].'</span>';
кусок кода из upyachka.ru =)
этим всё сказано
+155
if ($id=$trips->create($user['id'], strip_tags($_POST['name']), $_POST['country'], strip_tags($_POST['city']), strip_tags($_POST['place']), $depart, $arrive, strip_tags($_POST['text']), $type)) {
+159.3
for ($x=5;$x<135;$x+=25){
$cislo=mt_rand(0,9);
$string.=$cislo;
}
+76.3
try {
....
} catch (Exception ex) {
if (ex != null) {
try {
ex.printStackTrace();
} catch(Exception ex1) {
....
}
}
}
+133.9
for (int i = 0; i < gvOrderMain.RowCount - EditIndex; i++)
{
float tempQuantity = GetRow(i).Quantity;
int partyLen = DB.PrInStOrderByPartyNum(GetRow(i).ProductId, curStockId).ToArray().Length;
for (int j = 0; j < partyLen; j++)
{
if (DB.PrInStOrderByPartyNum(GetRow(i).ProductId, curStockId).ToArray()[j].Quantity > 0)
{
float CurSQuantity = DB.PrInStOrderByPartyNum(GetRow(i).ProductId, curStockId).ToArray()[j].Quantity.Value;
if (tempQuantity > CurSQuantity)
{
Documents_Product dp = new Documents_Product();
dp.PrimePriceExcVAT = DB.PrInStOrderByPartyNum(GetRow(i).ProductId, curStockId).ToArray()[j].PrimePriceExcVAT;
dp.PrimePriceIncVAT = DB.PrInStOrderByPartyNum(GetRow(i).ProductId, curStockId).ToArray()[j].PrimePriceIncVAT;
dp.Quantity = -1 * DB.PrInStOrderByPartyNum(GetRow(i).ProductId, curStockId).ToArray()[j].Quantity;
dp.OldQuantity = DB.PrInStOrderByPartyNum(GetRow(i).ProductId, curStockId).ToArray()[j].Quantity;
dp.PartyNumber = DB.PrInStOrderByPartyNum(GetRow(i).ProductId, curStockId).ToArray()[j].PartyNumber;
DB.Documents_Products.InsertOnSubmit(dp);
DB.SubmitChanges();
Documents_ProductsOrder dro = new Documents_ProductsOrder();
dro.PriceSum = GetRow(i).RealPrice * DB.PrInStOrderByPartyNum(GetRow(i).ProductId, curStockId).ToArray()[j].Quantity;
tempQuantity = tempQuantity - DB.PrInStOrderByPartyNum(GetRow(i).ProductId, curStockId).ToArray()[j].Quantity.Value;
DB.PrInStOrderByPartyNum(GetRow(i).ProductId, curStockId).ToArray()[j].Quantity = 0;
DB.Documents_ProductsOrders.InsertOnSubmit(dro);
DB.SubmitChanges();
..........
+129.5
call LABEL
LABEL: pop eax
Получение адреса текущей инструкции убийственным для производительности методом.
−55.2
#!/etc/Tivoli/bin/perl
##############################################################
# Name: Default.cgi
#
# Description: Generates translated Default HTML page
# according to browser's language
# TMF 4.1
# Licensed Materials- Property of IBM
# (C) Copyright IBM Corp. 2000. All Rights Reserved
#
# US Government Users Restricted Rights- Use, duplication,
# or disclosure restricted by GSA ADP Schedule Contract with
# IBM Corp.
##############################################################
# wupddefhtml will bind all messages contained in default page
# accordingly ( LANG is set to the browser's locale )
$defaultPage=`wupddefhtml -out`;
# all links in the default page are absolute or relative to root
# so we need to fix them because we have changed location
$defaultPage =~ s|href=|href=../|g;
$defaultPage =~ s|//|/|g;
print("HTTP/1.0 200 OK
Contents-Type: text/html
");
print "$defaultPage";
строка print("HTTP/1.0 200 OK
явно говорит о глубоких знаниях протокола :))
(C) Copyright IBM Corp. - ИТ лидер - что еще сказать
+33.2
cStaticObject * CreateStaticObject ( obj_id_t object_id, mesh_id_t mesh_id, material_id_t material_id, int32_t coord_x, int32_t coord_y, int32_t coord_z, int32_t angle_azimuth, int32_t angle_zenith, int32_t angle_longitudinal, uint32_t size_x, uint32_t size_y, uint32_t size_z, uint16_t flags );