- 1
IT Оффтоп #184
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
0
IT Оффтоп #184
#154: https://govnokod.ru/28275 https://govnokod.xyz/_28275
#155: https://govnokod.ru/28281 https://govnokod.xyz/_28281
#156: https://govnokod.ru/28322 https://govnokod.xyz/_28322
#157: https://govnokod.ru/28344 https://govnokod.xyz/_28344
#158: https://govnokod.ru/28366 https://govnokod.xyz/_28366
#159: https://govnokod.ru/28391 https://govnokod.xyz/_28391
#160: https://govnokod.ru/28434 https://govnokod.xyz/_28434
#161: https://govnokod.ru/28449 https://govnokod.xyz/_28449
#162: https://govnokod.ru/28477 https://govnokod.xyz/_28477
#163: https://govnokod.ru/28501 https://govnokod.xyz/_28501
#164: https://govnokod.ru/28527 https://govnokod.xyz/_28527
#165: https://govnokod.ru/28557 https://govnokod.xyz/_28557
#166: https://govnokod.ru/28574 https://govnokod.xyz/_28574
#167: https://govnokod.ru/28588 https://govnokod.xyz/_28588
#168: https://govnokod.ru/28607 https://govnokod.xyz/_28607
#169: https://govnokod.ru/28628 https://govnokod.xyz/_28628
#170: https://govnokod.ru/28653 https://govnokod.xyz/_28653
#171: (vanished) https://govnokod.xyz/_28665
#172: https://govnokod.ru/28675 https://govnokod.xyz/_28675
#173: https://govnokod.ru/28681 https://govnokod.xyz/_28681
#174: https://govnokod.ru/28689 https://govnokod.xyz/_28689
#175: https://govnokod.ru/28696 https://govnokod.xyz/_28696
#176: https://govnokod.ru/28703 https://govnokod.xyz/_28703
#177: https://govnokod.ru/28709 https://govnokod.xyz/_28709
#178: https://govnokod.ru/28716 https://govnokod.xyz/_28716
#179: https://govnokod.ru/28726 https://govnokod.xyz/_28726
#180: https://govnokod.ru/28734 https://govnokod.xyz/_28734
#181: https://govnokod.ru/28739 https://govnokod.xyz/_28739
#182: https://govnokod.ru/28749 https://govnokod.xyz/_28749
#183: https://govnokod.ru/28777 https://govnokod.xyz/_28777
0
/*
GNOT General Public License!
(c) 1995-2011 Microsoft Corporation
*/
#include "dos.h"
#include "win95.h"
#include "win98.h"
#include "sco_unix.h"
#include "metro.h" //windows 8
class Windows8 extends WindowsSeven implements Nothing {
int totalNewFeatures = 6; //task manager, ribbon, new bsod =D, new WAT, metro, linux_block
int totalWorkingFeatures = 1; //bsod
float bugCount = 345889E+09;
bool readyForRelease = FALSE;
void main() {
while (!CRASHED) {
if (first_time_install) {
if (installedRAM < 2GB || processorSpeed < 4GHz || videoCard < 1) { //requires video card
MessageBox("Hardware incompatibility error.");
GetKeyPress();
//BSOD();
BSOD2(); //windows 8
}
}
Make10GBswapfile();
SearchAndDestroy(FIREFOX|OPENOFFICEORG|ANYTHING_GOOGLE|LINUX_PARTITION|GRUB); //new features (linux & grub)
AddRandomDriver();
MessageBox("Driver incompatibility error.";
GetKeyPress();
//BSOD();
BSDO2(); //windows 8
}
//printf("Welcome to Windows 2000");
//printf("Welcome to Windows XP");
//printf("Welcome to Windows Vista");
//printf("Welcome to Windows 7");
printf("Welcome to Windows 8"); //8 : official name?
goto check_license;
goto start_metro; //windows 8 exclusive!! remove it on future versions
start_metro:
StartMetroUI();
if (WindowsStartMenuClick == 1)
{
goto start_metro;
}
else
{
if (TryingToRemoveMetroUsingRegedit == 1)
{
goto start_metro;
}
}
if (still_not_crashed) {
//CheckUserLicense();
//DoubleCheckUserLicense();
//TripleCheckUserLicense();
goto check_license;
check_license:
#ifdef NEED_LICENSE //DO_NOT_REMOVE, ALWAYS NEED A LICENSE
#include "string.h"
#endif
if (strlen(LicenseInput) < 10 || CheckOEMLicense(LicenseInput) < 1)
{
MessageBox("License is already in use or invalid.");
GetKeyPress();
//BSOD();
BSOD2(); //windows 8
}
else
{
goto start_metro;
}
RelayUserDeatilsToRedmond();
DisplayFancyGraphics();
FlickerLED(hard_drive);
//SetTheme(WindowsVista);
SetTheme(WindowsSeven);
RunWindowsSeven();
}
}
return LotsMoreMoney;
}
0
Пиздец-оффтоп #83
#53: (vanished) https://govnokod.xyz/_28346
#54: https://govnokod.ru/28353 https://govnokod.xyz/_28353
#55: https://govnokod.ru/28361 https://govnokod.xyz/_28361
#56: https://govnokod.ru/28383 https://govnokod.xyz/_28383
#57: https://govnokod.ru/28411 https://govnokod.xyz/_28411
#58: https://govnokod.ru/28454 https://govnokod.xyz/_28454
#59: https://govnokod.ru/28472 https://govnokod.xyz/_28472
#60: https://govnokod.ru/28540 https://govnokod.xyz/_28540
#61: https://govnokod.ru/28548 https://govnokod.xyz/_28548
#62: https://govnokod.ru/28555 https://govnokod.xyz/_28555
#63: https://govnokod.ru/28573 https://govnokod.xyz/_28573
#64: https://govnokod.ru/28584 https://govnokod.xyz/_28584
#65: https://govnokod.ru/28599 https://govnokod.xyz/_28599
#66: https://govnokod.ru/28609 https://govnokod.xyz/_28609
#67: https://govnokod.ru/28615 https://govnokod.xyz/_28615
#68: https://govnokod.ru/28636 https://govnokod.xyz/_28636
#69: (vanished) https://govnokod.xyz/_28660
#70: (vanished) https://govnokod.xyz/_28667
#71: https://govnokod.ru/28677 https://govnokod.xyz/_28677
#72: https://govnokod.ru/28685 https://govnokod.xyz/_28685
#73: https://govnokod.ru/28692 https://govnokod.xyz/_28692
#74: https://govnokod.ru/28699 https://govnokod.xyz/_28699
#75: https://govnokod.ru/28705 https://govnokod.xyz/_28705
#76: https://govnokod.ru/28712 https://govnokod.xyz/_28712
#77: https://govnokod.ru/28722 https://govnokod.xyz/_28722
#78: https://govnokod.ru/28730 https://govnokod.xyz/_28730
#79: https://govnokod.ru/28736 https://govnokod.xyz/_28736
#80: https://govnokod.ru/28740 https://govnokod.xyz/_28740
#81: https://govnokod.ru/28750 https://govnokod.xyz/_28750
#82: https://govnokod.ru/28779 https://govnokod.xyz/_28779
0
У меня для Вас плохие новости.
http://govnokod.ru/user/1347 - одна из фаек Инкануса.
Таким образом, получается, что всё это время мистификатор наёбывал нас и создавал активность с охулиона фаек.
Такого коварства даже я не ожидал.
0
Страйко, напиши, пожалуйста, действительно годную, стабильную аппликацию, чтобы Говнокод не падал от перегрузки
сетевыми запросами. Я не хочу ддосить...
...Тогда я смогу качественно зафлудить топики гостя, где он не обсуждал код, но разминал спину, пальцы и прочие органы, и приду, таким образом, к успеху дела всей моей жизни.
0
if (this.$arg0 == 'inc') this.$ret = this.$math = args[0] + 1;
if (this.$arg0 == 'dec') this.$ret = this.$math = args[0] - 1;
if (this.$arg0 == 'div') this.$ret = this.$math = args[0] / args[1];
if (this.$arg0 == 'ceil') this.$ret = this.$math = Math.ceil(args[0]);
if (this.$arg0 == 'floor') this.$ret = this.$math = Math.floor(args[0]);
if (this.$arg0 == 'sqrt') this.$ret = this.$math = Math.sqrt(args[0]);
if (this.$arg0 == 'exp') this.$ret = this.$math = Math.exp(args[0]);
if (this.$arg0 == 'log') this.$ret = this.$math = Math.log(args[0]);
if (this.$arg0 == 'sin') this.$ret = this.$math = Math.sign(args[0]);
if (this.$arg0 == 'log10') this.$ret = this.$math = Math.log10(args[0]);
if (this.$arg0 == 'cos') this.$ret = this.$math = Math.cos(args[0]);
if (this.$arg0 == 'tan') this.$ret = this.$math = Math.tan(args[0]);
if (this.$arg0 == 'acos') this.$ret = this.$math = Math.acos(args[0]);
if (this.$arg0 == 'atan') this.$ret = this.$math = Math.atan(args[0]);
if (this.$arg0 == 'round') this.$ret = this.$math = Math.round(args[0]);
if (this.$arg0 == 'atan2') this.$ret = this.$math = Math.atan2(args[0]);
Исходный код интерпретатора компилятора (!) Языка Программирования «AsmX».
https://github.com/langprogramming-AsmX/AsmX/blob/main/compiler.js#L215
0
Функция СоответствиеСодержитКлюч(Соответствие, Ключ)
Если НЕ Соответствие[Ключ] = Неопределено Тогда
Возврат Истина;
КонецЕсли;
КоличествоЭлементов = Соответствие.Количество();
Соответствие.Удалить(Ключ);
Если КоличествоЭлементов = Соответствие.Количество() Тогда
Возврат Ложь;
КонецЕсли;
Соответствие.Вставить(Ключ);
Возврат Истина;
КонецФункции
Как тебе такое Илон (зачеркнуто) Нуралиев?!
0
// Решает задачу из огэ по информатике
// Первое число - количество
// затем числа идут
// выводит наибольшее число которое оканчивается на 3
#include <vector>
#include <stdio.h>
typedef unsigned char zero;
typedef unsigned int cat;
cat rex = 0;
class orange
{
public:
cat *bananas = nullptr;
std::vector<zero> apples;
void a()
{
for (zero *ufo = apples.data(); ufo - apples.data() < apples.size();)
{
switch (*ufo++)
{
case 1: if (!bananas) bananas = new cat[*(cat *)ufo]; ufo += sizeof(int); break;
case 7: delete[] bananas; bananas = nullptr; break;
case 4: bananas[*(cat *)ufo] = bananas[*(cat *)(ufo + sizeof(int))]; ufo += 2 * sizeof(int); break;
case 0: bananas[*(cat *)ufo] = *(cat *)(ufo + sizeof(int)); ufo += 2 * sizeof(int); break;
case 8: bananas[*(cat *)ufo] = bananas[*(cat *)(ufo + sizeof(int)) + bananas[*(cat *)(ufo + sizeof(int) * 2)]]; ufo += 3 * sizeof(int); break;
case 9: printf("%d\n", bananas[*(cat *)ufo]); ufo += sizeof(int); break;
case 2: rex = bananas[*(cat *)ufo]; ufo += sizeof(int); break;
case 6: scanf("%ud", bananas + *(cat *)ufo); ufo += sizeof(int); break;
case 3:
{
if (bananas[*(cat *)ufo] > bananas[*(cat *)(ufo + sizeof(int))]) bananas[*(cat *)ufo] = bananas[*(cat *)ufo];
else bananas[*(cat *)ufo] = bananas[*(cat *)ufo + *(cat *)(ufo + sizeof(int))]; ufo += 2 * sizeof(int); break;
}
case 5: bananas[*(cat *)ufo] = bananas[*(cat *)ufo] % bananas[*(cat *)(ufo + sizeof(int))]; ufo += 2 * sizeof(int); break;
}
}
apples.clear();
}
void a(zero melon)
{
apples.push_back(melon);
}
};
int main()
{
orange *limon = new orange;
cat timings[] =
{
1, 16, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,
0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0,
0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 10, 0, 0, 0
};
cat peoples[] = { 1, 1, 0, 0, 0, 6, 0, 0, 0, 0, 2, 0, 0, 0, 0, 7 };
int backups[] = { 9, 0, 0, 0, 0 };
cat buldogs[] =
{
6, 2, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 2, 0, 0, 0, 4, 7, 0, 0, 0, 2, 0, 0, 0, 5, 2, 0, 0, 0, 1, 0, 0, 0,
8, 2, 0, 0, 0, 4, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 2, 0, 0, 0,
};
for (cat fruit = 0; fruit < 0xE + 0b10; ++fruit) {limon->a(peoples[fruit]);} limon->a();
for (cat juicegrinding = 0; juicegrinding < 33 + 0x50; juicegrinding++){limon->a(timings[juicegrinding]);}
for (cat fish = 0; fish < rex; fish += (100 ^ 0x64 + 0b11) - 0x2)
{
for (cat limons = 0; limons < 2 * 2 * 2 * 2 * 2 + 0b100000 - 1; ++limons){limon->a(buldogs[limons]);}
}
for (cat apples = 0; apples < 0x16 - 0b10000 - 1; apples++){limon->a(backups[apples]);} limon->a(); delete limon;
}
Чувак, позволь мне рассказать, я как волшебник C++, разворачивающий свои кодовые заклинания, словно колдун в цифровом мире. У меня этот язык в кармане, братан, словно дирижер, ведущий симфонию из единиц и нулей. Но не думай, что я буду тут прямо о своей крутости говорить, ой нет, я предпочитаю позволить моему коду говорить за меня.
Когда я погружаюсь в C++, это словно нырок в бесконечный океан возможностей. Я танцую с указателями, жонглирую ссылками и скачу на волнах управления памятью, словно настоящий мастер. Это дикая гонка, мой друг, но именно от этой адреналиновой суеты я получаю настоящий кайф.
Но знаешь, что по-настоящему круто? Сила абстракции, парень. Я обожаю создавать эти модульные, многоразовые блоки кода, называемые классами. Они как маленькие вселенные функциональности, которые я могу вызывать в любой момент. А шаблоны, о, братишка, шаблоны — это как швейцарские ножи C++. Они позволяют мне раскрыть всю мощь вычислений на этапе компиляции, словно безумный ученый, готовящий самые потрясающие зелья.
А теперь сделаем небольшой отступление. Вообрази, чувак, я вгружен в кодовые окопы, сражаясь с багами и отлавливая неэффективности. Это как бесконечный квест, борьба со временем и сложностью. Но, эй, у меня есть мой надежный напарник — стандартная библиотека C++. Она — мой арсенал контейнеров, алгоритмов и вспомогательных функций. С её помощью я могу нарезать и перемешивать данные, словно настоящий шеф-повар в цифровой кухне.
И не забывай про производительность, парень. Я стараюсь выжать каждую каплю мощи из своего кода. Я ныряю в низкоуровневые операции, знакомлюсь с железом. Вставки ассемблера — моё тайное оружие, способ связи с самим железом. Оптимизирую регистры, высвобождаю кэш и расширяю границы того, что возможно.
0
Альфастрахование» прокомментировало утечку данных клиентов
https://ko.ru/news/alfastrakhovanie-prokommentiroval-utechku-dannykh-klientov/
0
procedure TMonThread.FillCommentList;
var
HTTP:TIdHTTP;
URI:TIdURI;
S, Temp, Link, LastCm:string;
I, J:Integer;
Comm:TGComment;
Post:TGpost;
LinkList:TstringList;
CommList:TStringList;
begin
LinkList:=TStringList.Create;
CommList:=TStringList.Create;
HTTP:=TIdHTTP.Create(nil);
URI:=TIdURI.Create();
try
Temp:='';
LinkList.Sorted:=True;
LinkList.Duplicates:=DupIgnore;
HTTP.UserAgent:=uaRandom;
URI.Host:='govnokod.ru';
HTTP.Request.Host:='govnokod.ru';
HTTP.CookieManager.AddServerCookie('auth=a7dbe7abed9025a9a13ea15baa89a08f',URI);
Temp:=HTTP.LoadContent('http://govnokod.ru/comments');
Temp:=StringReplace(Temp,#13#10,'',[rfreplaceall]);
Temp:=StringReplace(Temp,#13,'',[rfreplaceall]);
Temp:=StringReplace(Temp,#10,'',[rfreplaceall]);
ParseAll('<li class="hentry">',Temp,'<div class="show-code">', LinkList);
for J:=0 to LinkList.Count-1 do
begin
if FCanceled then Exit;
Link:=ParseStr('<h2>Комментарий к <a rel="bookmark" class="entry-title" href="',LinkList[J],'"');
HTTP.ConnectTimeout:=60000;
HTTP.ReadTimeout:=60000;
Temp:='';
Temp:=HTTP.LoadContent(Link);
if HTTP.ContentSize>2000000 then Continue;
if HTTP.ResponseCode <> 200 then Continue;
if Pos('halted by an exception', Temp)>0 then Exit;
Post:=TGPost.Create;
LastCm:=Trim(ParseStr('name="comment', LinkList[J],'"'));
Post.LastCommentId:=StrToInt(LastCm);
S:=ParseStr('<a rel="bookmark" class="entry-title" href="http://govnokod.ru/', Temp,'"');
Post.Number:=StrToInt(S);
Post.Link:='http://govnokod.ru/'+S+'/';
S:=ParseStr('<p class="author">',Temp,'</p>');
S:=ParseStr('</a> <a href="http://govnokod.ru/user/',S,'</');
Post.Author:=StrAfter('>',S);
FPosts.Add(Post);
CommList.Clear;
ParseAll('<div id="comment-',Temp, '</li>', CommList);
for I:=0 to CommList.Count-1 do
begin
if FCanceled then Exit;
Comm:=TGComment.Create;
Comm.Author:=ParseStr('<strong class="entry-author"><a href="http://govnokod.ru/user/',CommList[I],'</strong>');
Comm.Author:=ParseStr('">', Comm.Author,'<');
Comm.Text:=ParseStr('<span class="comment-text">',CommList[I],'</span></div>');
Comm.Text:=DecorateText(Comm.Text);
//comment is hidded?
Comm.Hidden:=Pos('<span class="hidden-text">',CommList[I])>0;
// parse and calculate rating values.
Temp:=ParseStr('<span class="comment-vote">', CommList[I],'</span>');
//on count
S:=Trim(StrAfter('title="',Temp));
S:=Trim(StrBefore(' ',S));
Comm.OnCount:=StrToInt(S);
//against count
S:=Trim(StrAfter('и ',Temp));
S:=Trim(StrBefore(' ',S));
Comm.AgainstCount:=StrToInt(S);
Comm.Rating:=Comm.OnCount-Comm.AgainstCount;
S:=ParseStr('class="comment-vote-against" href="http://govnokod.ru/ratings/comment/',Temp,'/');
S:=Format('http://govnokod.ru/ratings/comment/%s/against',[S]);
Comm.AgainstLink:=S;
S:=ParseStr('<a class="answer" href="http://govnokod.ru/comments/', CommList[I],'"');
S:='http://govnokod.ru/comments/'+S;
Comm.AnswerLink:=S;
LastCM:=IntToStr(Post.LastCommentId);
Comm.Last:=Pos(LastCm, Comm.AnswerLink)>0;
Post.Comments.AddObject(Comm.Text, Comm);
end;
end;
finally
CommList.Free;
LinkList.Free;
HTTP.Free;
URI.Free;
end;
end;
(Флудоминусатор) Подгрузка и обработка комментариев из стока.