- 1
'x'.repeat(a).concat('x'.repeat(b)).length
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
0
'x'.repeat(a).concat('x'.repeat(b)).length
Сложение чисел a и b без использования операторов + и -
0
# ------------------- fUnicodeToUTF8----------------------
:global fUnicodeToUTF8
:if (!any $fUnicodeToUTF8) do={ :global fUnicodeToUTF8 do={
:global fByteToEscapeChar
# :local Ubytes [:tonum $1]
:local Nbyte
:local EscapeStr ""
:if ($1 < 0x80) do={
:set EscapeStr [$fByteToEscapeChar $1]
} else={
:if ($1 < 0x800) do={
:set Nbyte 2
} else={
:if ($1 < 0x10000) do={
:set Nbyte 3
} else={
:if ($1 < 0x20000) do={
:set Nbyte 4
} else={
:if ($1 < 0x4000000) do={
:set Nbyte 5
} else={
:if ($1 < 0x80000000) do={
:set Nbyte 6
}
}
}
}
}
:for i from=2 to=$Nbyte do={
:set EscapeStr ([$fByteToEscapeChar ($1 & 0x3F | 0x80)] . $EscapeStr)
:set $1 ($1 >> 6)
}
:set EscapeStr ([$fByteToEscapeChar (((0xFF00 >> $Nbyte) & 0xFF) | $1)] . $EscapeStr)
}
:return $EscapeStr
}}
угадай язык
+3
Новогодний оффтоп #1
Перекатить через год.
+3
The reboot() call reboots the system, or enables/disables the reboot keystroke (abbreviated CAD, since the de‐
fault is Ctrl-Alt-Delete; it can be changed using loadkeys(1)).
This system call fails (with the error EINVAL) unless magic equals LINUX_REBOOT_MAGIC1 (that is, 0xfee1dead)
and magic2 equals LINUX_REBOOT_MAGIC2 (that is, 672274793). However, since 2.1.17 also LINUX_REBOOT_MAGIC2A
(that is, 85072278) and since 2.1.97 also LINUX_REBOOT_MAGIC2B (that is, 369367448) and since 2.5.71 also
LINUX_REBOOT_MAGIC2C (that is, 537993216) are permitted as values for magic2. (The hexadecimal values of
these constants are meaningful.)
man 2 reboot
+2
В России предложили перейти на Rust при разработке ПО для «проектов повышенной надёжности».
Языком Rust предлагают ограничить все проекты по разработке ядерного оружия,
атомных станций, авиации, электроэнергетики, банковской сферы и т.д.
Но не стоит переживать. Если проект примут, то разработчикам дадут
от полугода до года, «чтобы успели переучиться». Как говорится, и на том спасибо.
Голосовать, если что, можно тут: https://www.roi.ru/71821/
0
https://journal.tinkoff.ru/diary-quality-manager-moscow-950k/
0
Mi sidim v servernoy!
Vse kto nas chitaet! Mi sidim v servernoy, v zaperty, mobillnyi ne beret! Pozovonite na ohrany po telefony на okrany 762-23-96 i skagite chtobi nas vypustili!
0
Fixpoint mint_add0 {N} (i k : Fin.t N) te_i te' t0 vec
(Ht : MInt nonCommRel N k vec (te' :: t0))
(Hik : k < i)
(Hcomm0 : trace_elems_commute te_i te')
{struct Ht} :
exists t' : list TE,
MInt nonCommRel N k (vec_append i te_i vec) (te' :: t') /\
Permutation trace_elems_commute (te_i :: te' :: t0) (te' :: t').
Proof with eauto.
(* Welcome to the hell proof! *)
remember (te' :: t0) as t_.
destruct Ht as [k
|k j vec te_k t Hij Ht
|k j vec te_k te_j t Hij Hcomm Ht
];
[discriminate
|replace te' with te_k in * by congruence; clear Heqt_..
].
2:{ destruct (trace_elems_commute_dec te_i te_j).
- apply mint_add0 with (te_i := te_i) (i := i) in Ht; [|lia|assumption].
destruct Ht as [t' [Ht' Hperm']].
exists (te_j :: t'). split.
+ swap_vec_append.
eapply mint_cons2...
+ apply permut_cons with (a := te_k) in Hperm'.
eapply permut_trans...
now apply permut_head'.
- exists (te_i :: te_j :: t). split.
+ swap_vec_append.
apply mint_cons1 with (j0 := i); [lia|].
apply mint_cons2 with (j0 := j); [lia|auto..].
+ now apply permut_head'.
}
{ inversion_ Ht.
- exists [te_i]. split.
+ swap_vec_append.
apply mint_cons1 with (j0 := i); [lia|].
apply mint_cons1 with (j0 := i); [lia|].
constructor.
+ now apply permut_head'.
- rename te into te_j.
destruct (PeanoNat.Nat.lt_ge_cases j i).
2:{ exists (te_i :: te_j :: t1). split.
- swap_vec_append.
apply mint_cons1 with (j1 := i); [lia|].
apply mint_cons1 with (j1 := j); [lia|assumption].
- now apply permut_head'.
}
{ destruct (trace_elems_commute_dec te_i te_j) as [Hte_ij|Hte_ij].
- apply mint_add0 with (i := i) (te_i := te_i) in Ht; [|lia|assumption].
destruct Ht as [t' [Ht' Hperm']].
exists (te_j :: t'). split.
+ swap_vec_append.
eapply mint_cons1...
+ apply permut_cons with (a := te_k) in Hperm'.
now apply permut_head.
- exists (te_i :: te_j :: t1). split.
+ swap_vec_append.
apply mint_cons1 with (j1 := i); [lia|].
apply mint_cons2 with (j1 := j); [lia|assumption..].
+ apply permut_head; [assumption|constructor].
}
- rename j0 into i0. cbn in H0.
destruct (PeanoNat.Nat.lt_ge_cases j i).
2:{ exists (te_i :: te_i0 :: te_j :: t1). split.
+ swap_vec_append.
apply mint_cons1 with (j0 := i); [lia|].
apply mint_cons1 with (j0 := j); [lia|assumption].
+ now apply permut_head'.
}
{ destruct (trace_elems_commute_dec te_i te_i0).
- apply mint_add0 with (i := i) (te_i := te_i) in Ht; [|lia|assumption].
destruct Ht as [t' [Ht' Hperm']].
exists (te_i0 :: t'). split.
+ swap_vec_append.
eapply mint_cons1...
+ apply permut_cons with (a := te_k) in Hperm'.
now apply permut_head.
- exists (te_i :: te_i0 :: te_j :: t1). split.
+ swap_vec_append.
apply mint_cons1 with (j0 := i); [lia|].
apply mint_cons2 with (j0 := j); [lia|assumption..].
+ apply permut_head.
* assumption.
* constructor.
}
}
Qed.
Мой magnum opus. Часть доказательства про выкидывание из рассмотрения коммутирующих системных вызовов.
0
bp kernelbase!VirtualAlloc " .printf \"\n\n\n\nBytes allocated: %lu (k)\n\n\n\",(@rdx/0n1024); k 8"
Давайте течь от windbg
0
<div class="filter-aside-mobile-category-popular" id="filter-aside-mobile-category-popular">
<div class="catalog-mobile-menu__header">
<div class="catalog-mobile-menu__close">
<svg>
<use xlink:href="assets/img/sprite.svg#arr-left"></use>
</svg><span>Назад</span>
</div>
</div>
<h3 class="filter-aside-mobile-sorted__title">Популярные подборки</h3>
<ul class="category-popular-filter__list">
<li class="category-popular-filter__item"><a class="category-popular-filter__link" href="#">Rotabroach</a></li>
</ul>
</div>