- 1
- 2
clsLine L = Lines[4][i];
int Ind = Lines[4].IndexOf(L);
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+30
clsLine L = Lines[4][i];
int Ind = Lines[4].IndexOf(L);
−417.7
SELECT FROM Staff
CASE Sex
WHEN 'M' THEN 'МужЫк!'
WHEN 'F' THEN 'Баба'
ELSE 'ЫЫЫыы?'
препод сказал что елсе не будет выполняться изза ограничений целостности базы
+33.5
<script>
function changeLogo(imgLoc){
document.getElementById("module_logo").src = "./site/" + imgLoc + "_logo.jpg";
}
function returnLogo(imgLoc){
document.getElementById("module_logo").src = "./site/" + imgLoc + "_logo.jpg";
}
</script>
0
#define IMAGE_BASE_RELOC_TYPE 0x0C
#define IMAGE_BASE_RELOC_OFFSET 0x0FFF
#define IMAGE_GET_BASE_RELOC_TYPE(entry) entry >> IMAGE_BASE_RELOC_TYPE
#define IMAGE_GET_BASE_RELOC_OFFSET(entry) entry & IMAGE_BASE_RELOC_OFFSET
__declspec(safebuffers) __declspec(noinline) DWORD mapping_code(LPVOID map_struct)
{
auto map = static_cast<MM_DATA*>(map_struct);
auto base = map->base;
auto dos = reinterpret_cast<PIMAGE_DOS_HEADER>(base);
auto nt_headers = reinterpret_cast<PIMAGE_NT_HEADERS>(base + dos->e_lfanew);
auto opt_header = &nt_headers->OptionalHeader;
auto file_header = &nt_headers->FileHeader;
const bool has_entry_point = opt_header->AddressOfEntryPoint != 0;
auto dll_main = reinterpret_cast<DllMainFn>(base + opt_header->AddressOfEntryPoint);
auto load_library = map->load_library;
auto get_proc_address = map->get_proc_address;
auto virtual_protect = map->virtual_protect;
auto rtl_add_function_table = map->rtl_add_function_table;
auto reloc_dir = opt_header->DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC];
auto location_delta = reinterpret_cast<uintptr_t>(base) - static_cast<uintptr_t>(opt_header->ImageBase);
if (location_delta && reloc_dir.Size)
{
auto reloc_begin = reinterpret_cast<PIMAGE_BASE_RELOCATION>(base + reloc_dir.VirtualAddress);
auto reloc_end = reinterpret_cast<PIMAGE_BASE_RELOCATION>(reinterpret_cast<std::byte*>(reloc_begin) + reloc_dir.Size);
while (reloc_begin < reloc_end && reloc_begin->SizeOfBlock)
{
auto amount_of_entries = (reloc_begin->SizeOfBlock - sizeof(IMAGE_BASE_RELOCATION)) / sizeof(WORD);
auto entries = reinterpret_cast<PWORD>(reloc_begin + 1);
for (size_t i = 0; i < amount_of_entries; i++)
{
WORD type = IMAGE_GET_BASE_RELOC_TYPE(entries[i]);
WORD offset = IMAGE_GET_BASE_RELOC_OFFSET(entries[i]);
if (type == IMAGE_REL_BASED_DIR64)
{
uintptr_t* path_at = reinterpret_cast<uintptr_t*>(base + reloc_begin->VirtualAddress + offset);
*path_at += location_delta;
}
}
reloc_begin = reinterpret_cast<PIMAGE_BASE_RELOCATION>(reinterpret_cast<std::byte*>(reloc_begin) + reloc_begin->SizeOfBlock);
}
}
auto import_dir = opt_header->DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT];
if (import_dir.Size)
{
auto import_desc = reinterpret_cast<PIMAGE_IMPORT_DESCRIPTOR>(base + import_dir.VirtualAddress);
while (import_desc->Name)
{
auto module_name = reinterpret_cast<char*>(base + import_desc->Name);
HMODULE module = load_library(module_name);
if (!module)
{
map->status = LOAD_LIBRARY_FAILED;
return -2;
}
auto INT_TABLE = reinterpret_cast<PIMAGE_THUNK_DATA>(base + (import_desc->OriginalFirstThunk ? import_desc->OriginalFirstThunk : import_desc->FirstThunk));
auto IAT_TABLE = reinterpret_cast<PIMAGE_THUNK_DATA>(base + (import_desc->FirstThunk));
for (; INT_TABLE->u1.AddressOfData ; INT_TABLE++, IAT_TABLE++)
{
FARPROC address = IMAGE_SNAP_BY_ORDINAL(INT_TABLE->u1.Ordinal) ?
get_proc_address(module, reinterpret_cast<char*>(IMAGE_ORDINAL(INT_TABLE->u1.Ordinal))) :
get_proc_address(module, reinterpret_cast<PIMAGE_IMPORT_BY_NAME>(base + INT_TABLE->u1.AddressOfData)->Name);
if (!address)
{
map->status = GET_PROC_ADDRESS_FAILED;
return -3;
}
IAT_TABLE->u1.Function = reinterpret_cast<uintptr_t>(address);
}
++import_desc;
}
}
auto delay_dir = opt_header->DataDirectory[IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT];
if (delay_dir.Size)
{
auto delay_desc = reinterpret_cast<PIMAGE_DELAYLOAD_DESCRIPTOR>(base + delay_dir.VirtualAddress);
while (delay_desc->DllNameRVA)
{
0
public function getResource(): ResourceInterface
{
$locale = $this->localeRepository->getByKey($this->getCurrentLocaleKey());
return new Resource($locale->getKey());
}
0
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
if CONFIG['OS_ARCH'] == 'WINNT':
DIRS += ['win']
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
DIRS += ['mac']
elif CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
DIRS += ['unix']
else:
DIRS += ['emacs']
2 часа пытался понять, почему ctrl+a работает как в терминале...
Это мёртвый код или пасхалка?
0
SparseMatrix<double> mat(rows,cols);
for (int k=0; k<mat.outerSize(); ++k)
for (SparseMatrix<double>::InnerIterator it(mat,k); it; ++it)
{
it.value();
it.row(); // row index
it.col(); // col index (here it is equal to k)
it.index(); // inner index, here it is equal to it.row()
}
Random access to the elements of a sparse object can be done through the coeffRef(i,j) function. However, this function involves a quite expensive binary search. In most cases, one only wants to iterate over the non-zeros elements. This is achieved by a standard loop over the outer dimension, and then by iterating over the non-zeros of the current inner vector via an InnerIterator. Thus, the non-zero entries have to be visited in the same order than the storage order.
0
The stylesheet http://govnokod.ru/media/07be0bfd97ac9918b4a7bacde60881b6.css?files=jquery-ui.css,jip.css,jip/jipCore.css,icons.css,bullets.css,flags.css,langs/javascript.css,langs/python.css,langs/.css,langs/c.css was not loaded because its MIME type, “text/html”, is not “text/css”.
Кто-то обосрался
0
Казалось бы, измненений не много
https://github.com/microsoft/monaco-editor/compare/v0.47.0...v0.48.0-dev-20240319
Но за ними конечно же кроется это
https://github.com/microsoft/vscode/compare/1e790d77f81672c49be070e04474901747115651...33cd6f1001b92a912898996be69b6928eda1a682
Все фронтендеры должны гореть в аду
Где-то здесь поломали рендер. Где, конечно, неясно, эксепшнов никаких нету, просто рисует какую-то эпилепсию вместо текста, но разумеется этот редахтур пихуют повсюду. Как среди этой кучи что-то найти тоже неясно.
Это не код, авгивевы конюшни.
Горите блять в аду
0
import photoshop
photoshop.CreateProgram()