- 1
https://stackoverflow.com/questions/51521158/in-python-why-does-0xbin-return-false
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−1
https://stackoverflow.com/questions/51521158/in-python-why-does-0xbin-return-false
Свежий обосрамс питона
+1
// Non-constant constant-expressions in C++
// http://b.atch.se/posts/non-constant-constant-expressions/
// The Implementation
constexpr int flag (int);
template<class Tag>
struct writer {
friend constexpr int flag (Tag) {
return 0;
}
};
template<bool B, class Tag = int>
struct dependent_writer : writer<Tag> { };
template<
bool B = noexcept (flag (0)),
int = sizeof (dependent_writer<B>)
>
constexpr int f () {
return B;
}
int main () {
constexpr int a = f ();
constexpr int b = f ();
static_assert (a != b, "fail");
}
Note: clang incorrectly shows the wrong behavior, a workaround is available in the appendix.
−1
Давайте ругать "Windows"
https://habr.com/post/418087/
Syoma, это кокраз то, о чем ты писал: https://habr.com/post/418087/#comment_18916563
−2
#include <stdio.h>
int main(void) {
int a, b;
int *p = &a;
int *q = &b + 1;
printf("%p %p %d\n", (void *)p, (void *)q, p == q);
return 0;
}
https://habr.com/company/pvs-studio/blog/418023/
0x7fff4a35b19c 0x7fff4a35b19c 0
кто понимает почему?
−1
IT Оффтоп #7
#1: http://govnokod.ru/18142
#2: http://govnokod.ru/18378
#3: http://govnokod.ru/19667
#4: http://govnokod.ru/21160
#5: http://govnokod.ru/21772
#6: http://govnokod.ru/24063
−1
Почему "getElementById", а не "getElementByID"?
0
#-*-coding:utf8;-*-
combinators = {
'I': lambda x: x if len(x) <= 1 else calc(x[1:]),
'K': lambda x: x if len(x) <= 2 else calc((x[1],) + x[3:]),
'W': lambda x: x if len(x) <= 2 else calc(x[1:3] + x[2:]),
'S': lambda x: x if len(x) <= 3 else calc((x[1], x[3], (x[2], x[3])) + x[4:]),
'B': lambda x: x if len(x) <= 3 else calc((x[1], (x[2], x[3])) + x[4:]),
'C': lambda x: x if len(x) <= 3 else calc((x[1], x[3], x[2]) + x[4:]),
'U': lambda x: x if len(x) <= 2 else calc((x[2], (x[1], x[1], x[2])) + x[3:]),
'Y': lambda x: x if len(x) <= 1 else calc(('S',('K',('S','I','I')),('S',('S',('K','S'),'K'),('K',('S','I','I')))) + x[2:])
}
def calc(x):
def f(x, top = False):
if type(x) is not tuple or len(x) == 0:
return x
if top:
while type(x[0]) is tuple:
x = x[0] + x[1:]
else:
if type(x[0]) is tuple:
return (calc(x[0]),) + f(x[1:])
print(termrepr(x))
input('Press Enter...')
return combinators.get(x[0], lambda _: (x[0],) + f(x[1:]))(x)
return f(x, True)
def parse(s):
def f(s, n):
res = ()
i = n
while i < len(s):
if s[i] == '(':
t, j = f(s, i + 1)
res += (t,)
i = j - 1
elif s[i] == ')':
return (res, i + 1)
else:
res += (s[i],)
i += 1
return (res, i)
return f(s, 0)[0]
def termrepr(x):
if len(x) == 0:
return ''
if type(x[0]) is tuple:
return '(' + termrepr(x[0]) + ')' + termrepr(x[1:])
else:
return x[0] + termrepr(x[1:])
print('>> ', end = '')
while True:
print(termrepr(calc(parse(input()))))
print('\n>> ', end = '')
Я перепесал #24129:
>> BUGURT
BUGURT
Press Enter...
U(GU)RT
Press Enter...
R((GU)(GU)R)T
Press Enter...
GU(GU)R
Press Enter...
U(GU)R
Press Enter...
R((GU)(GU)R)
Press Enter...
GU(GU)R
Press Enter...
U(GU)R
Press Enter...
−4
https://pikabu.ru/story/moy_kuzen_byil_gospitalizirovan_posle_togo_kak_zasunul_sebe_v_anus_28_malenkikh_loshadok_6045256
−2
А что если конпелятору переносить комментарии в ассемблерный код?
Это относится к швабодке?
−1
Роман, вы там палитесь.
1) Отключаем историю поиска и просмотров в youtube
2) Смотрим какое-нибудь нехарактерное для себя видео
3) Видим рекомендации, основанные на этом видео
4) Проверяем историю просмотров: там этого видео нет
5) Говорим, что не интересуемся этой рекомендацией, щёлкаем "Tell us why"
6) Один из вариантов будет "мне не интересны рекомендации на основе..." того видео, которого нет в истории
7) Это не проблема кэширования, таймингов и синхронизации
8) Упс
seo: #багрепорт #роман #корпорация_добра