- 1
Поисковиков станут банить за выдачу ссылок на запрещённые ресурсы. Штраф огромен: 700 000 р.
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−1
Поисковиков станут банить за выдачу ссылок на запрещённые ресурсы. Штраф огромен: 700 000 р.
Вот блядь и дожили...
Скоро чинуши-цензурочники будут ходить по домам и слухать под окнами, кто о чём базарит.
Открываешь холодилу, чтобы пивка взять - а там сидит чинуша, открываешь стиралу - а там тётенька в очках, с диктофоном.
Засовываешь палец в очко, чтобы каловый камень выковырнуть - а вместо копролита выковыриваешь следящее устройство....
−3
NSString* bodyParams = [NSString stringWithFormat:@"username=%@&password=%@&client_secret=very_secret", username, password];
// Ниже по коду
[request setHTTPMethod:@"POST"];
[request setHTTPBody:[bodyParams dataUsingEncoding:NSUTF8StringEncoding]];
И ведь имя переменной не врёт
0
Whether or not you check in your Pods folder is up to you, as workflows vary from project to project. We recommend that you keep the Pods directory under source control, and don't add it to your .gitignore
Benefits of checking in the Pods directory
After cloning the repo, the project can immediately build and run, even without having CocoaPods installed on the machine. There is no need to run pod install, and no Internet connection is necessary.
The Pod artifacts (code/libraries) are always available, even if the source of a Pod (e.g. GitHub) were to go down.
The Pod artifacts are guaranteed to be identical to those in the original installation after cloning the repo.
https://guides.cocoapods.org/using/using-cocoapods.html
+161
# coffee script
d = 1 - Math.pow(d,n) * Math.pow((1/d -1),n)
// java script
d = 1 - Math.pow(d, n) * Math.pow(1 / d(-1), n);
почему не любят кофескрипт, выпуск -дцатьпервый. потому что нельзя просто скопипастить формулу и не поймать Uncaught TypeError: number is not a function
+1002
string Daumants::getReverse()
{
string message = this->data();
char *reverseMessage = new char[this->length()];
for (int i = this->length() - 1, j = 0; i >= 0; i--, j++)
{
reverseMessage[j] = message[i];
}
for (int i = 0; i < this->length(); i++)
{
message[i] = reverseMessage[i];
}
return message;
}
Даумант ХУЙ!
+142
for(int i=0; i<16; i++) servoPos[i] = 64;
for(int i=0; i<16; i++) servoOnOff[i] = SV_OFF;
for(int i=0; i<16; i++) servoDirection[i] = SV_FOR;
for(int i=0; i<16; i++) servoRange[i] = 15;
for(int i=0; i<16; i++) servoCenter[i] = 3000;
for(int i=0; i<16; i++) servoSpeed[i] = 127;
кусочек кетайского дзена.
Программа управления серво-приводами (хоть бы не аэс, хоть бы не аэс)
+172
<?php
$strings = array();
$strings[] = "10_strings_0";
$strings[] = "10_strings_1x";
$strings[] = "10_strings_2";
$strings[] = "10_strings_3";
$strings[] = "10_strings_4x";
$strings[] = "10_strings_5x";
$strings[] = "10_strings_6";
$strings[] = "10_strings_7x";
$strings[] = "10_strings_8";
$strings[] = "10_strings_9";
// СПИСОК СТРОК ИЗ 100 СТРОК В КОТОРЫХ БУДЕТ ОСУЩЕСТВЛЯТЬСЯ ПОИСК СТРОК ИЗ СПИСКА $strings
for ($counter=0; $counter<100; $counter++)
{
$check_strings[] = "10_strings_".$counter;
}
// Временная папка - папка со скриптом
// создание vbs файлов
for ($strings_c=0; $strings_c<sizeof($strings); $strings_c++)
{
$file = fopen($strings[$strings_c].'.vbs', 'w');
fwrite($file, 'Set Program = Wscript.CreateObject("Wscript.Shell")'.PHP_EOL.'Program.Run("'.$strings[$strings_c].'.bat'.'")'.PHP_EOL.'Wscript.Quit');
fclose($file);
}
// создание bat файлов
$interpreter_root = 'C:\xampp\php\php.exe'; // путь к PHP интерпретатору
for ($strings_c=0; $strings_c<sizeof($strings); $strings_c++)
{
$file = fopen($strings[$strings_c].'.bat', 'w');
fwrite($file, $interpreter_root.' '.$strings[$strings_c].'.php');
fclose($file);
}
// создание php файлов
for ($strings_c=0; $strings_c<sizeof($strings); $strings_c++) {
$code = '<?php
$string = \''.$strings[$strings_c].'\'; // строка для проверки, в каждом экземпляре своя
for ($counter=0; $counter<100; $counter++)
{
$check_strings[] = "10_strings_".$counter;
}
shuffle($check_strings);
$ok = false;
for ($check_strings_c=0; $check_strings_c<sizeof($check_strings); $check_strings_c++)
{
if ($string == $check_strings[$check_strings_c])
{
$ok = true;
break;
}
}
if ($ok == true)
{
$file = fopen("'.$strings[$strings_c].'_ok.txt", "w");
fclose($file);
}
?>';
$file = fopen($strings[$strings_c].'.php', 'w');
fwrite($file, $code);
многопоточность на PHP
+170
return (this.name == objToCompare.name) ? true : false;
Из платного учебника по JS. 2350 рублей.
+1
#include <iostream>
using namespace std;
void Brezenhem(char **z, int x0, int y0, int x1, int y1)
{
int A, B, sign;
A = y1 - y0;
B = x0 - x1;
if (abs(A) > abs(B)) sign = 1;
else sign = -1;
int signa, signb;
if (A < 0) signa = -1;
else signa = 1;
if (B < 0) signb = -1;
else signb = 1;
int f = 0;
z[y0][x0] = '*';
int x = x0, y = y0;
if (sign == -1)
{
do {
f += A*signa;
if (f > 0)
{
f -= B*signb;
y += signa;
}
x -= signb;
z[y][x] = '*';
} while (x != x1 || y != y1);
}
else
{
do {
f += B*signb;
if (f > 0) {
f -= A*signa;
x -= signb;
}
y += signa;
z[y][x] = '*';
} while (x != x1 || y != y1);
}
}
int main()
{
const int SIZE = 25; // размер поля
int x1, x2, y1, y2;
char **z;
z = new char*[SIZE];
for (int i = 0; i < SIZE; i++)
{
z[i] = new char[SIZE];
for (int j = 0; j < SIZE; j++)
z[i][j] = '-';
}
cout << "x1 = "; cin >> x1;
cout << "y1 = "; cin >> y1;
cout << "x2 = "; cin >> x2;
cout << "y2 = "; cin >> y2;
Brezenhem(z, x1, y1, x2, y2);
for (int i = 0; i < SIZE; i++)
{
for (int j = 0; j < SIZE; j++)
cout << z[i][j];
cout << endl;
}
cin.get(); cin.get();
return 0;
}
https://prog-cpp.ru/brezenham/
спойлер: автор тян
+2
type int = 1;
function main() {
let result: [value: int, done: boolean];
let v: int | undefined;
v = 1;
result = [v, false];
print(result[0], result[1]);
assert(result[0] == 1);
assert(result[1] == false);
}
опа. новый говнокодец подоспел. а кто знает какая проблема решалась в данном коде?