- 1
- 2
- 3
bool isComputerOn() noexcept {
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 строк, например.
0
#include <string>
std::string greet(){
return "hello world!";
}
пользуйтесь пока я добрый
+1
Хрюкни №3
._ __,
|\,../'\
,'. . `.
.-- '`.
( `' , ;
,`--' _, ,'\
,`.____ `.
/ `, |
' \, '
| / /`,
`, . ,` ./ |
' `. ,' |;,' ,@
______| | _________,_____jv______
`. `. ,'
,'_,','_,
`' `'
№2 https://govnokod.xyz/_26868/
№1 https://govnokod.xyz/_26863/
0
>>> def f(positional_only, /, regular, *varargs, kw_only, **kw_varargs):
print(positional_only, regular, varargs, kw_only, kw_varargs)
f(1, 2, 3, 4, 5, kw_only='kw_only', kw_var1='var1', kw_var2='var2')
# 1 2 (3, 4, 5) kw_only {'kw_var1': 'var1', 'kw_var2': 'var2'}
Блядь, как всё сложно…
https://www.python.org/dev/peps/pep-0570/
0
https://ru.wikihow.com/%D0%B8%D0%B7%D1%83%D1%87%D0%B8%D1%82%D1%8C-PHP-%D0%B8-MySQL
−1
updateTimer() {
requestAnimationFrame(() => {
this.timeLeft = this.resendTimeDuration - (Date.now() * 0.001 - this.lastTimeLeft);
if (this.timeLeft <= 0) {
this.resetTimer();
return;
} else {
this.lastTimeLeft = this.timeLeft;
this.updateTimer();
}
});
}
А как сделать таймер обратного отсчета?
+1
def fake_bin(x):
k = ''
while len(x) > 0:
if int(x) % 10 >= 5:
k += '1'
x = x[0:-1]
else:
k += '0'
x = x[0:-1]
return k[::-1]
+2
https://pythoninstitute.org/certification/
кто последний в сертификацию напитон?
0
#include <iostream>
using namespace std;
int main()
{
cout << "is_same_v: " << std::is_same_v<int, const int> << endl;
}
https://en.cppreference.com/w/cpp/types/is_same
> If T and U name the same type (taking into account const/volatile qualifications), provides the member constant value equal to true. Otherwise value is false.