- 1
Питушня #3
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+5
Питушня #3
#1: https://govnokod.ru/26692 https://govnokod.xyz/_26692
#2: https://govnokod.ru/26891 https://govnokod.xyz/_26891
0
@Test
public void getTestcases_OffsetEqTwoAndLomitEqTen_ReturnTwoTestcasesInResponse()
Йажа - это не язык программирования, это состояние сознания
+1
IT Оффтоп #57
#29: https://govnokod.ru/26385 https://govnokod.xyz/_26385
#30: https://govnokod.ru/26413 https://govnokod.xyz/_26413
#31: https://govnokod.ru/26423 https://govnokod.xyz/_26423
#32: https://govnokod.ru/26440 https://govnokod.xyz/_26440
#33: https://govnokod.ru/26449 https://govnokod.xyz/_26449
#34: https://govnokod.ru/26456 https://govnokod.xyz/_26456
#35: https://govnokod.ru/26463 https://govnokod.xyz/_26463
#36: https://govnokod.ru/26508 https://govnokod.xyz/_26508
#37: https://govnokod.ru/26524 https://govnokod.xyz/_26524
#38: https://govnokod.ru/26539 https://govnokod.xyz/_26539
#39: https://govnokod.ru/26556 https://govnokod.xyz/_26556
#40: https://govnokod.ru/26568 https://govnokod.xyz/_26568
#41: https://govnokod.ru/26589 https://govnokod.xyz/_26589
#42: https://govnokod.ru/26600 https://govnokod.xyz/_26600
#43: https://govnokod.ru/26604 https://govnokod.xyz/_26604
#44: https://govnokod.ru/26627 https://govnokod.xyz/_26627
#45: https://govnokod.ru/26635 https://govnokod.xyz/_26635
#46: (vanished) https://govnokod.xyz/_26646
#46: (vanished) https://govnokod.xyz/_26654
#47: https://govnokod.ru/26671 https://govnokod.xyz/_26671
#48: https://govnokod.ru/26707 https://govnokod.xyz/_26707
#49: https://govnokod.ru/26750 https://govnokod.xyz/_26750
#49: https://govnokod.ru/26776 https://govnokod.xyz/_26776
#50: https://govnokod.ru/26804 https://govnokod.xyz/_26804
#51: https://govnokod.ru/26809 https://govnokod.xyz/_26809
#52: https://govnokod.ru/26817 https://govnokod.xyz/_26817
#53: https://govnokod.ru/26833 https://govnokod.xyz/_26833
#54: https://govnokod.ru/26840 https://govnokod.xyz/_26840
#55: https://govnokod.ru/26844 https://govnokod.xyz/_26844
#56: https://govnokod.ru/26862 https://govnokod.xyz/_26862
0
# TODO: fix this shit
def publish(self, session: requests.Session, auth_cookie: str, max_retries: int, retry_time: float) -> bool:
for i in range(max_retries):
L.info(f'PostForm.publish(), loading attempt #{i + 1}')
if self.load_new(session, auth_cookie):
break
time.sleep(retry_time)
else: # No break
L.error('PostForm.publish(): could not load the form')
return False
for i in range(max_retries):
L.info(f'PostForm.publish(), posting attempt #{i + 1}')
if not self.try_recognize_captcha(session):
time.sleep(retry_time)
continue # Load an another captcha with the same csrf/captcha_id
if self.try_post(session, auth_cookie) == PostForm.Status.POST_DONE:
return True
time.sleep(retry_time)
L.error(f'PostForm.publish() failed, max_retries exceeded')
return False
Блять, отвратительно.
0
public bool IsTransfarable
{
get
{
switch (unitType)
{
case UnitTypes.SIEGE_TANK:
case UnitTypes.WIDOW_MINE:
case UnitTypes.SIEGE_TANK_SIEGED:
case UnitTypes.WIDOW_MINE_BURROWED:
return true;
}
return false;
}
}
если что догадается что это выложу весь код :)
0
if (SCRIPT_DEBUG || filemtime(get_theme_file_path('/assets/js/global.min.js')) < filemtime(get_theme_file_path('/assets/js/global.js'))) {
wp_enqueue_script('gk-global', get_theme_file_uri('/assets/js/global.js'), array('jquery'), $ver, true);
} else {
wp_enqueue_script('gk-global', get_theme_file_uri('/assets/js/global.min.js'), array('jquery'), $ver, true);
}
Обосрался.
Сделал, чтобы после правок скрипта не использовался min файл. В какой-то момент время сравнялось, а версии разошлись.
Хрю.
−1
private function changePlans(Coupon $coupon): Coupon
{
$coupon->paypal_plan_yearly_rub_id = $this->getPaypalId($coupon->billingPlanYearlyRub, $coupon);
$coupon->paypal_plan_yearly_usd_id = $this->getPaypalId($coupon->billingPlanYearlyUsd, $coupon);
$coupon->paypal_plan_monthly_rub_id = $this->getPaypalId($coupon->billingPlanMonthlyRub, $coupon);
$coupon->paypal_plan_monthly_usd_id = $this->getPaypalId($coupon->billingPlanMonthlyUsd, $coupon);
return $coupon;
}
Вот это забавно $this->getPaypalId($coupon->billingPlanMonthlyUsd, $coupon); (getPaypalId приватный)
−1
$(document).on('click','.head__loginw a',function() {
//реачгоал и гугл для клика по ссылке кабинете
return true;
})
$(document).on('click','.prc__it__bt openModal',function() {
id = $(this).attr('tid');
if(id == 387) {
//мир - 30
}
if(id == 388) {
//мир - 60
}
if(id == 389) {
//мир - 100
}
if(id == 391) {
//МИР-ДОМ-30
}
if(id == 392) {
//мМИР-ДОМ-60
}
if(id == 393) {
//мМИР-ДОМ-100
}
return true;
})
+1
bool isComputerOn() noexcept {
return true;
}
Лицензия MIT. Пользуйтесь на здоровье
+2
Definition uilv_add_trivial {N} te (t : list TE) (traces : Traces N)
i j (Ht : MInt_ trace_elems_don't_commute j true traces t)
s s' (Hls : LongStep s (te :: t) s')
(Htriv : trivial_add i j traces) :
MInt_ trace_elems_don't_commute i true (push_te traces i te) (te :: t).
Proof with autorewrite with vector; eauto with vector; try vec_forall_eq_contradiction.
unfold push_te.
unfold trivial_add in Htriv.
destruct (Fin.eq_dec i j) as [Hij|Hij].
(* [i=j], solving by constructor: *)
{ subst.
unfold trivial_add.
eapply mint_keep with (rest := traces[@j])...
}
remember traces[@j] as t2_.
destruct t2_ as [|te2 t2]; subst.
{ inversion Ht as [vec Hvec|? ? ? ? ? Hj Hcont|? ? ? ? ? ? Hjj0 Hswitch Hj Hcont];
subst.
- eapply mint_keep with (prog := true)...
eapply mint_nil...
- rewrite Hj in Heqt2_.
discriminate.
}
remember traces[@i] as t1_.
destruct t1_ as [|te1 t1]; subst.
(* [te] is the last element in i-th trace: *)
{ eapply mint_keep with (rest := []) (prog := false)...
inversion Ht as [vec Hvec|? ? ? ? ? Hj Hcont|? ? ? ? ? ? Hjj0 Hswitch Hj Hcont];
subst...
rewrite Heqt1_ in *.
eapply mint_switch...
rewrite <-Heqt1_...
}
destruct Htriv as [|[Hij' Hcomm]]; [contradiction Hij|idtac].
eapply mint_keep with (rest := te1 :: t1) (prog := false)...
rewrite Heqt1_, Vec.replace_id.
inversion Ht as [vec Hvec|? ? ? ? ? Hj Hcont|? ? ? ? ? ? Hjj0 Hswitch Hj Hcont]; subst...
replace te0 with te2 in * by congruence.
eapply mint_switch...
rewrite <-Heqt1_...
Defined.
Кто сказал, что хуже C++ темплейтов ничего уже нет? Вы ничего не понимаете в метушне. Это говно разворачивается в 12000 строк, например.