-
+2
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
case Type::Instruction:
{
if (o == "movzwl") return OpCode::movzwl;
if (o == "movzbl") return OpCode::movzbl;
if (o == "shrb") return OpCode::shrb;
if (o == "shrl") return OpCode::shrl;
if (o == "xorl") return OpCode::xorl;
if (o == "andl") return OpCode::andl;
if (o == "ret") return OpCode::ret;
if (o == "movb") return OpCode::movb;
if (o == "cmpb") return OpCode::cmpb;
if (o == "movl") return OpCode::movl;
if (o == "jmp") return OpCode::jmp;
if (o == "testb") return OpCode::testb;
if (o == "incl") return OpCode::incl;
if (o == "sarl") return OpCode::sarl;
if (o == "decl") return OpCode::decl;
if (o == "jne") return OpCode::jne;
if (o == "je") return OpCode::je;
if (o == "js") return OpCode::js;
if (o == "subl") return OpCode::subl;
if (o == "subb") return OpCode::subb;
if (o == "addl") return OpCode::addl;
if (o == "addb") return OpCode::addb;
if (o == "sall") return OpCode::sall;
if (o == "orl") return OpCode::orl;
if (o == "andb") return OpCode::andb;
if (o == "orb") return OpCode::orb;
if (o == "decb") return OpCode::decb;
if (o == "incb") return OpCode::incb;
if (o == "rep") return OpCode::rep;
if (o == "notb") return OpCode::notb;
if (o == "negb") return OpCode::negb;
if (o == "sbbb") return OpCode::sbbb;
if (o == "pushl") return OpCode::pushl;
if (o == "retl") return OpCode::retl;
}
Фрагмент транслятора из ассемблера в ассемблер.
https://github.com/lefticus/x86-to-6502
XYPO3BO3,
24 Ноября 2019
-
0
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
#include <iostream>
using namespace std;
struct Rooster {
int id = 0;
};
void asshole(const Rooster* roosters) {
Rooster* r = (Rooster*)roosters;
for (int i = 0; i < 3; i++) {
r[i].id = i + 1;
}
}
int main() {
Rooster roosters[3];
asshole(roosters);
for (int i = 0; i < 3; i++) {
printf("%d\n", roosters[i].id);
}
return 0;
}
https://ideone.com/Xk9Ukg
Нахуй так жить?
BJlADuMuPCKuu_nemyx,
22 Ноября 2019
-
0
- 1
do { code = randomCode(); } while (code.contains("FUCK"));
Пользователь с ником «Чапаев» опубликовал скриншот рекламного SMS-сообщения от
сбербанка, содержащего код «CRYVKILLJEWS», что можно перевести с английского
как «плачь, убивай евреев».
Интересно, а как генерируют все эти случайные коды? Там ведь много чего вылезти может... Например, мне от банка приходят 4-хзначные коды, но я не помню, чтобы пришли, скажем, 4 одинаковые цифры. Не знаю, случайность ли это или алгоритм такой.
(проверочный код: 8bog)
Steve_Brown,
22 Ноября 2019
-
0
- 1
Math.round(400/0).toLocaleString('ru-RU')
seniorfrontenddev,
21 Ноября 2019
-
+1
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
.server-config
.component
.title(translate) protsessor
.value(ng-if="!server.custom")
| {{ server.cpu || '—' }}
.value(ng-if="server.custom")
span(ng-if="server.custom.cpu && server.custom.cpu.length && server.custom.cpu[0].count > 1")
| {{ server.custom.cpu[0].count + ' x ' }}
span(ng-if="server.custom.cpu && server.custom.cpu.length")
| {{ server.custom.cpu[0].name }}
span(ng-if="!server.custom.cpu || !server.custom.cpu.length")
| —
.component
.title(translate) pamyat
.value(ng-if="!server.custom")
| {{ server.memory || '—' }}
.value(ng-if="server.custom")
span(ng-if="server.custom.ram && server.custom.ram.length")
span(ng-if="server.custom.ram[0].count > 1")
| {{ +server.custom.ram[0].name.split(' ')[0].replace('GB', '') * server.custom.ram[0].count + ' GB — ' }}
span(ng-if="server.custom.ram[0].count > 1")
| {{ server.custom.ram[0].count + ' x ' }}
span
| {{ server.custom.ram[0].name }}
span(ng-if="!server.custom.ram || !server.custom.ram.length")
| —
.component
.title(translate) disk
.value(ng-if="!server.custom")
| {{ server.hdd || '—' }}
.value(ng-if="server.custom.disk && server.custom.disk.length")
.line(ng-repeat="hdd in server.custom.disk")
span(ng-if="hdd.count > 1") {{ hdd.count + ' x ' }}
span {{ hdd.name }}
.value(ng-if="server.custom && (!server.custom.disk || !server.custom.disk.length)")
| —
.component(ng-if="server.custom")
.title(translate) Platform
.value(ng-if="server.custom.case && server.custom.case.length")
| {{ server.custom.case[0].name }}
.value(ng-if="server.custom && (!server.custom.case || !server.custom.case.length)")
| —
.component(ng-if="server.custom")
.title(translate) Motherboard
.value(ng-if="server.custom.motherboard && server.custom.motherboard.length")
| {{ server.custom.motherboard[0].name }}
.value(ng-if="server.custom && (!server.custom.motherboard || !server.custom.motherboard.length)")
| —
.component(ng-if="server.custom.pcie && server.custom.pcie.length")
.title(translate) pcie
.value
.line(ng-repeat="pcie in server.custom.pcie")
span(ng-if="pcie.count > 1") {{ pcie.count + ' x ' }}
span {{ pcie.name }}
Код написан на Pug, представляет из себя фрагмент шаблона AngularJS, предназначенный для отображения конфигурации сервера. Данный код, через копирование-вставку, был заботливо размещен в нескольких файлах, иногда претерпевая незначительные изменения. Здесь публикую отчищенный от всего лишнего и сильно отформатированный вариант, дабы проще было насладиться полетом фантазии автора, в исходном виде весь этот код - одно сплошное месиво.
maksim_ovcharik,
21 Ноября 2019
-
+1
- 1
if (tableOfVariables[i].Name == "replace".ToUpper())
)))00
neonmystery,
19 Ноября 2019
-
+2
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
public class AdvancedBoolean {
private boolean result;
private DefenitionDictionary.RESULT_CODE code;
//------------------------------------------------------------------------------
//constructors
//------------------------------------------------------------------------------
public AdvancedBoolean() {
result = true;
}
public AdvancedBoolean(boolean _result) {
result = _result;
}
public AdvancedBoolean(boolean _result, DefenitionDictionary.RESULT_CODE _code) {
result = _result;
code = _code;
}
//------------------------------------------------------------------------------
//get methods
//------------------------------------------------------------------------------
public boolean isResult() {
return result;
}
public DefenitionDictionary.RESULT_CODE getCode() {
return code;
}
//------------------------------------------------------------------------------
//set methods
//------------------------------------------------------------------------------
public void setResult(boolean _result) {
result = _result;
}
public void setCode(DefenitionDictionary.RESULT_CODE _code) {
code = _code;
}
//------------------------------------------------------------------------------
//other methods
//------------------------------------------------------------------------------
public String getLabel() {
return code.getResultLabel();
}
}
Без комментариев
Veers,
19 Ноября 2019
-
+2
- 1
- 2
Comparing structs with, let's say, memcmp, does not work,
as you end up comparing the "unspecified" padding bytes as well — you must compare member-by-member.
While writing this post, the author observed that some verions of GCC (experimentally, >= 4.7, < 8.0) do not zero padding if an empty intializer list is passed, under certain a certain code pattern; if an entire struct (i.e. sizeof(STRUCTNAME)) is subsequently memcpy'd after assigment of its members, and this intermediate buffer is what is used by the code going forward. This appears to be based on how optimization passes interact with GCC's built-in memcpy, since passing -fno-builtin-memcpy returns the behavior to the expected.
https://www.nccgroup.trust/us/about-us/newsroom-and-events/blog/2019/october/padding-the-struct-how-a-compiler-optimization-can-disclose-stack-memory/
3.14159265,
18 Ноября 2019
-
−1
- 1
- 2
Перекат
http://govnokod.ru/18591
Этот петух так и не выложил ответ.
OCETuHCKuu_nemyx,
18 Ноября 2019
-
0
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
1419 guest
234 j123123
222 LispGovno
202 wvxvw
188 Говногость
161 gost
160 Lure Of Chaos
158 Stertor
155 bormand
128 kyzi007
123 pedarok
120 qbasic
116 Elvenfighter
115 someone
113 3.14159265
102 dm_fomenok
101 roman-kashitsyn
100 eldachello
94 Dummy00001
93 TarasB
88 Vasiliy
86 cmepmop
85 Dr_Stertor
84 syoma
73 7ion
72 laMer007
69 d_fomenok
61 хуита
60 Мартин
60 BEPETEHO
60 3_14dar
58 AliceGoth
58 CHayT
56 Fai
56 kegdan
55 uiopqwertyasd
55 munin
54 HaskellGovno
51 bugmenot
51 Abbath
51 vistefan
50 nethak
49 makc3d
49 Fike
48 inkanus-gray
47 telnet
47 Govnocoder#0xFF
47 3_dar
44 codemonkey
44 OlegUP
43 RaZeR
42 Sulik78
41 CPPGovno
41 alexoy
41 DrFreez
41 varg242
40 danilissimus
39 taburetka
39 KitKat
38 dwinner
38 absolut
38 striker
37 raorn
37 jQuery
37 inho
35 psina-from-ua
35 rat4
35 1kasper
35 brainstorm
35 Stallman
34 ursus
34 KirAmp
33 evg_ever
33 invision70
33 Lokich
33 Xom94ok
32 1_and_0
32 istem
32 volter9
OCETuHCKuu_nemyx,
17 Ноября 2019