- 1
iInteractionFlagBBS->second->setVisible( (flags & iInteractionFlagBBS->first) ? true : false );
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+7.1
iInteractionFlagBBS->second->setVisible( (flags & iInteractionFlagBBS->first) ? true : false );
Тернарный оператор в скобках жгет
−275.7
// обрабатываем obj
var id = obj.icon;
if (id == -1) id = 1;
if (id == "undefined") id = undefined;
if (id == undefined && obj.uid == undefined) id = obj;
if ("" + id == "0") id = "image:" + obj.uid;
if (id == undefined) id = 1;
if (id.split(":").shift() == "image") {
...
}
Обрабатывается obj (строка, объект или число), в результате получаем нечто.
+39.3
#define OCHOBHOE main
#define OT {
#define nO }
#define KPyTu for
#define BOnPOC if
#define BEPHu return
#define OTBET return
#define HE !
#define nE4ATb printf
#define MHOrO int
#define PABHO =
#define uC4O <
MHOrO OCHOBHOE()
OT
MHOrO A;
KPyTu( A PABHO 0; A uC4O 8; A++ )
nE4ATb( "%d\n", C4uTAu( A ) );
BEPHu 0;
nO
MHOrO C4uTAu( MHOrO oT )
OT
BOnPOC( HE oT )
OTBET 1;
BEPHu oT * C4uTAu( oT - 1 );
nO
вах, вот это да)
+153
$r3['price'] = $r3['price']*1;
вывод цены
+148
IAssignment assignment = serviceCall.getAssignment();
assignment.setAssWorkgroup(object);
assignment.transfer();
Кусок кода с использованием API HP ServiceDesk
+62.8
$date = '';
$date .= date('d');
$date .= '-'
$date .= date('m');
$date .= '-';
$date .= date('Y');
з.ы.
чтот у вас в FF форма для кода криво отображается...
+153
(defun lagr-poly (lpoints)
(lambda (x)
(let ((prod-l nil)
(sum-l nil))
(loop for point in lpoints do
(let ((x0 (x-coord point))
(y0 (y-coord point)))
(loop for pointn in lpoints do
(let ((xn (x-coord pointn)))
(if (not (eq point pointn))
(progn (push (/ (- x xn) (- x0 xn)) prod-l)))))
(push (* (product prod-l) y0) sum-l)
(setq prod-l nil)))
(loop for l in sum-l sum l))))
Полином Лагранжа, ёпта!
Давно написал, сейчас даже понять не могу как работает.
+79.5
For Each LVRefWarnItem In Me.ListViewRefWarn.ListItems
For Each LVDiagItem In Me.ListViewDiag.ListItems
For Each LVReqdClassItem In Me.ListViewReqdClass.ListItems
For Each LVReqdPayItem In Me.ListViewReqdPay.ListItems
For Each LVReqdSpecItem In Me.ListViewReqdSpec.ListItems
For Each LVReqingSpecItem In Me.ListViewReqingSpec.ListItems
For Each LVSvcItem In Me.ListViewSvc.ListItems
For Each LVReqdContItem In Me.ListViewReqdCont.ListItems
For Each LVReqingContItem In Me.ListViewReqingCont.ListItems
For Each LVReqingClassItem In ListViewReqingClass.ListItems
For Each LVReqingPayItem In ListViewReqingPay.ListItems
For Each LVHPCodesItem In ListViewHPCodes.ListItems
For Each LVHPOptionCodesItem In ListViewHPOptionCodes.ListItems
For Each LVPOSItem In ListViewPOS.ListItems
For Each LVReqdProvIDItem In ListViewReqdProvID.ListItems
For Each LVReqingProvIDItem In ListViewReqingProvID.ListItems
For Each LVAuthTypeItem In ListViewAuthType.ListItems
For Each LVMembCondItem In ListViewMemberCondition.ListItems
TempDe1.InsertRule _
AdvancedRule, "Advanced", Me.TextGroup, Me.CheckAutoApprove.Value, _
CDate(Me.DTPickerFromDt), CDate(Me.DTPickerToDt), ExpDate, _
LVSvcItem.Text, LVSvcItem.ListSubItems(1).Text, LVDiagItem.Text, _
LVDiagItem.ListSubItems(1).Text, IIf(LVSvcItem.ListSubItems.Count = 1, _
"0", LVSvcItem.ListSubItems(LVSvcItem.ListSubItems.Count).Text), _
LVReqdSpecItem.Text, LVReqdSpecItem.ListSubItems(1).Text, _
LVReqdClassItem.Text, LVReqdClassItem.ListSubItems(1).Text, _
LVReqdContItem.Text, LVReqdContItem.ListSubItems(1).Text, _
LVReqdPayItem.Text, LVReqdPayItem.ListSubItems(1).Text, _
LVReqingSpecItem.Text, LVReqingSpecItem.ListSubItems(1).Text,
LVReqingClassItem.Text, LVReqingClassItem.ListSubItems(1).Text, _
LVReqingContItem.Text, LVReqingContItem.ListSubItems(1).Text, _
LVReqingPayItem.Text, LVReqingPayItem.ListSubItems(1).Text, _
LVHPCodesItem.Text, LVHPCodesItem.ListSubItems(1).Text, _
LVPOSItem.Text, LVPOSItem.ListSubItems(1).Text, _
LVReqdProvIDItem.Text, LVReqdProvIDItem.ListSubItems(1).Text, _
LVReqingProvIDItem.Text, LVReqingProvIDItem.ListSubItems(1).Text, _
TextDesc.Text, TextAgeFrom.Text, TextAgeTo.Text, _
LVAuthTypeItem.Text, LVAuthTypeItem.ListSubItems(1).Text, _
LVMembCondItem.Text, LVMembCondItem.ListSubItems(1).Text, _
Me.cboRuleType.SelectedItem.Key, Me.txtRulePriority.Text, _
Int(LVRefWarnItem.Text), Int(LVRefWarnItem.ListSubItems(1).Text), _
LVHPOptionCodesItem.Text, LVHPOptionCodesItem.ListSubItems(1).Text
Next
Next LVAuthTypeItem
Next LVReqingProvIDItem
Next LVReqdProvIDItem
Next LVPOSItem
Next LVHPOptionCodesItem
Next LVHPCodesItem
Next LVReqingPayItem
Next LVReqingClassItem
Next LVReqingContItem
Next LVReqdContItem
Next LVSvcItem
Next LVReqingSpecItem
Next LVReqdSpecItem
Next LVReqdPayItem
Next LVReqdClassItem
Next LVDiagItem
Next LVRefWarnItem
... ооп во всех позах :)
+135.1
private void textEdit_Enter(object sender, EventArgs e)
{
if (((BaseEdit)sender).BackColor == Color.White)
return;//редактировать нельзя
.........
}
Нашел недавно в старом коде, код писался давненько когда по желанию заказчика из конфетки делали унылое г...
Суть проверки в том что форма находится в режиме редактирования данных
+123
cmp eax,0
je exitp
mov eax,1
ret
exitp:
xor eax,eax
ret