- 1
#exclude <conio.h>
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
0
#exclude <conio.h>
конио
−1
https://github.com/tejdnk-2019-ShortNotes/
+1
#include <stdio.h>
int main(void)
{
(
*********************
** ** ** ***** *
* ** * **** ** *** **
* ** * **** *** * ***
* ** * **** **** ****
* ** * **** *** * ***
* ** ** *** *** **
*********************
printf)("pidor");
}
−3
function test(p) {
return p +' World';
}
var str = 'Hello ';
console.log(str + test());
// Hello undefined World
−1
#include <cstdio>
int main(void)
{
static char data[] = "sosu hui\n";
__asm
{
mov eax, 0
ploop:
mov bl, [data + eax]
push eax
push bx
call putchar
pop bx
pop eax
inc eax
cmp bl, 0
jnz ploop
}
return 0;
}
0
function main4() {
let i = 0;
try {
try {
throw 1.0;
}
catch (e: number) {
i++;
print("asd1");
throw 2.0;
}
finally {
print("finally");
}
}
catch (e2: number) {
i++;
print("asd3");
}
assert(i == 2);
}
function main() {
main4();
print("done.");
}
Ну вот и все.. шах и мат С/C++ девелоперы... последняя хитровые...аная инструкция finally сделана. (надо еще для линуха сделать .. а то они разные)
+4
Tactic Notation "sleep" integer(seconds) :=
do seconds try solve [ timeout 1 (repeat eapply proj1) ].
Goal True.
sleep 3.
exact I.
Qed.
Какой пруф )))
+1
def main():
pipe(int(input('Введите неотрицательное целое число: ')),
lambda n: (n, reduce(lambda x, y: x * y, range(1, n + 1))),
lambda tup: print(f'Факториал числа {tup[0]} равняется {tup[1]}'))
Из https://habr.com/ru/post/555370/ (Функциональное ядро на Python).
+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
#Ide для япа
code = input('Ваш код: ')
if code = "print('text')
print('text')