- 1
- 2
- 3
- 4
吾有一數。曰三。名之曰「甲」。
為是「甲」遍。
吾有一言。曰「「問天地好在。」」。書之。
云云。
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+2
吾有一數。曰三。名之曰「甲」。
為是「甲」遍。
吾有一言。曰「「問天地好在。」」。書之。
云云。
Программист из Шанхая создал язык программирования wenyan-lang, основанный на старинном классическом китайском языке.
Язык может компилироваться в JavaScript, Python и Ruby. К нему уже успели написать плагины для VSCode, Vim и Sublime. С полной документацией можно ознакомиться на гитхабе:
https://github.com/wenyan-lang/wenyan
Перевод на "JavaScript":
var n = 3;
for (var i = 0; i < n; i++) {
console.log("問天地好在。");
}
+1
// https://www.linux.org.ru/forum/development/15520475
// *Какой #define макрит for в while?
#include <stdio.h>
#include <stdlib.h>
#define FOR(a, b, c, ...) {a;while(b){__VA_ARGS__ c;}}
int main(void)
{
for(int i = 0; i < 10; i++)
{
printf("test %d\n", i);
}
printf("\n");
FOR(int i = 0, i < 10, i++,
{
printf("test %d\n", i);
}
)
return EXIT_SUCCESS;
}
+1
//Use this to convert OffSet to postive:
var offset = new Date().getTimezoneOffset();
console.log(offset);
this.timeOffSet = offset + (-2*offset);
console.log(this.timeOffSet);
Это такой особый JS way, или я чего-то не понимаю?
+1
template <typename function_type, typename vector_type>
function_type read_memory(HANDLE hProcess, function_type base_address, std::vector< vector_type >&& offsets) {
function_type tmp = base_address;
for (function_type i : **reinterpret_cast< vector_type** >( &offsets )) {
ReadProcessMemory(hProcess, reinterpret_cast< PBYTE* >( tmp + i ), &tmp, sizeof(function_type), nullptr);
}
return tmp;
}
int main() {
std::vector< DWORD > offset = {
0x10,
0x14,
0x158
};
auto buffer = read_memory< DWORD, DWORD >(hProcess, base_address, std::move(offset));
}
Полуговнокодер читает память чужого процесса...
0
let randomHexColor = (g = () => (a => (a < 16 ? '0' : '') + a.toString(16))(~~(Math.random() * 255)))() + g() + g();
0
Когда написал залупу на крестах
https://pbs.twimg.com/media/EQNGt9QU4AABnd1?format=png&name=small
Именно поэтому я за Electron.js
+5
function fix_hacker_strings($str){
$s=$str;
$s=str_replace('/*', 'xx', $s);
$s=str_replace('*/', 'xx', $s);
$s=str_replace('../', 'xxx', $s);
$s=str_replace('..\\', 'xxx', $s);
$s=str_ireplace('file:', 'xxxxx', $s);
$s=str_ireplace(':$', 'xx', $s);
$s=str_ireplace('http:', 'xxxx', $s);
$s=str_ireplace('https:', 'xxxxx', $s);
$s=str_ireplace('script', 'xxxxxx', $s);
$s=str_ireplace('delete', 'xxxxxx', $s);
$s=str_ireplace('drop', 'xxxx', $s);
$s=str_ireplace('select', 'xxxxxx', $s);
$s=str_ireplace('update', 'xxxxxx', $s);
$s=str_ireplace('replace', 'xxxxxxx', $s);
$s=str_ireplace('/etc/', '/xxx/', $s);
$s=str_ireplace('/var/', '/xxx/', $s);
$s=str_ireplace('/root/', '/xxxx/', $s);
$s=str_ireplace('/bin/', '/xxx/', $s);
$s=str_ireplace('/usr/', '/xxx/', $s);
$s=str_ireplace('/sys/', '/xxx/', $s);
$s=str_ireplace('/sbin/', '/xxxx/', $s);
$s=str_ireplace('/proc/', '/xxxx/', $s);
$s=str_ireplace('/boot/', '/xxxx/', $s);
$s=str_ireplace('mysql', 'xxxxx', $s);
return $s;
}
обработка user input
−3
Приведите реальный пример программы на 1С
Вот прямо типичный пример задачи, где я должен взять именно 1С.
0
IT Оффтоп #31
#1: https://govnokod.ru/18142 https://govnokod.xyz/_18142
#2: https://govnokod.ru/18378 https://govnokod.xyz/_18378
#3: https://govnokod.ru/19667 https://govnokod.xyz/_19667
#4: https://govnokod.ru/21160 https://govnokod.xyz/_21160
#5: https://govnokod.ru/21772 https://govnokod.xyz/_21772
#6: https://govnokod.ru/24063 (потёр пидор сракер) https://govnokod.xyz/_24063
#7: https://govnokod.ru/24538 https://govnokod.xyz/_24538
#8: https://govnokod.ru/24815 (потёр пидор сракер) https://govnokod.xyz/_24815
#9: https://govnokod.ru/24867 https://govnokod.xyz/_24867
#10: https://govnokod.ru/25328 https://govnokod.xyz/_25328
#11: https://govnokod.xyz/_25436 https://govnokod.ru/25436 (потёр пидор сракер)
#12: https://govnokod.xyz/_25471
#13: https://govnokod.xyz/_25590 (потёр пидор сракер)
#14: https://govnokod.xyz/_25684
#15: https://govnokod.xyz/_25694
#16: https://govnokod.xyz/_25725
#17: https://govnokod.xyz/_25731
#18: https://govnokod.xyz/_25762
#19: https://govnokod.xyz/_25767
#20: https://govnokod.xyz/_25776
#21: https://govnokod.xyz/_25798
#22: https://govnokod.xyz/_25811
#23: https://govnokod.xyz/_25863
#24: https://govnokod.xyz/_25941
#25: https://govnokod.xyz/_26026
#26: https://govnokod.xyz/_26050
#27: https://govnokod.xyz/_26340
#28: https://govnokod.xyz/_26372
#29: https://govnokod.xyz/_26385
#30: https://govnokod.xyz/_26413
+3
onst addAdjacencies = (
nodes,
) => (
nodes
.map(({
colorId,
id,
x,
y,
}) => ({
color: colors[colorId],
eastId: (
getNodeAtLocation({
nodes,
x: x + 1,
y,
})
),
id,
northId: (
getNodeAtLocation({
nodes,
x,
y: y - 1,
})
),
southId: (
getNodeAtLocation({
nodes,
x,
y: y + 1,
})
),
westId: (
getNodeAtLocation({
nodes,
x: x - 1,
y,
})
),
}))
.map(({
color,
id,
eastId,
northId,
southId,
westId,
}) => ({
adjacentIds: (
[
eastId,
northId,
southId,
westId,
]
.filter((
adjacentId,
) => (
adjacentId !== undefined
))
),
color,
id,
}))
)
https://medium.com/free-code-camp/bet-you-cant-solve-this-google-interview-question-4a6e5a4dc8ee
джаваскриптер натужно пытается решить простейшую задачу "гугл уровня" с обходом, для увеличения кринжа прилагается поехавший кодстайл и решение на RxJS