i have a method that takes a const char* buf and using this function i need to set a member variable which is a char* m_buf. c++ didn't like a plain = on them ("a value of typ...
i'm applying a decorator on a method inside of a class, how do i get that class inside of the decorator? i tried calling dir() on the method but i didn't find anything useful
всем привет, нубский вопрос переписываю старый код с плюсов на раст, я использовал наследование классов чтобы добавить больше переменных в дочерние классы. узнав что наследов...
hi guys, i am rewriting my old code and did a refactoring like this: https://www.toptal.com/developers/hastebin/igutaripac.py however, it got me thinking: is there a way to m...
hi guys, i have this line of code: words = [random.choice([w for w in r])] r is a file with a list of words (separated by newlines) i'm reading and i'm choosing a random word...
hi guys, i have this problem: i want 2 python scripts running at the same time: one receives queries and writes their data to some queue file the other one reads the data, d...
hi guys, i defined my own class that is basically a (private) vector of my own objects + some additional variables, how do i make the object instances of that class have the s...
hi, i'm reading one byte from a file, so i use a char for the datatype, however, i need to compare it to integers, rather than actual ascii characters, if i cast it to an int ...
hi guys, what is the most pythonic way to iterate over 2 subsequent elements in a list inside a for loop/list comp? i feel like using, for example, lst[index] > lst[index+1] a...
hi guys, i'm dynamically calling a function the name of which comes from the input string using getattr (i know it can be unsafe, but it's a learning test server on my courses...
hi, i wrote this line of code, but i'm not sure how to refactor it to make it more readable and/or concise if (((curveType == CurveType::ENVELOPE || curveType == CurveType::L...
hi guys, i have a class called Point (defined in Point.hpp), that stores a bunch of values, and a class Curve (defined in Curve.hpp) that is basically a vector of Points + som...
кстати чуток оффтоп - ни у кого не было такого с rust-analyzer в вскод? недавно только поставил и подчёркивает соовсем не там (но только иногда)
всем привет, возможно нубарский вопрос, но я без понятия как в гугле это правильно задать: у меня есть диск который находится по директории /media/artemetra/9E58713258710A73,...
does anyone know any disk map tools like this one (xplore file manager on android) for windows? i only know windirstat but that's not exactly what i'm looking for
i'm planning to read the "Accelerated C++" book, but i saw that it covers C++98. is it really outdated? if so, what similar "starting out in C++ with previous programming expe...
какой самый лучший способ конвертировать 4 байта u8 в списке в один u32? я придумал только: let b: u32 = ((a[0] as u32) << 24) | ((a[1] as u32) << 16) | ((a[2] as u32) << 8)...
how do i escape curly brackets in an f-string? for some reason vs code says that i can't use \{ for that, neither does raw string work
i'm writing a board game in C, and i want to display the board, i use this to add strings to the buffer buf, but is there a nicer way to write it?
всем привет, читаю книжку, один момент не понятен почему определяется count без mut? или это потому что .or_insert возвращает &mut, и поэтому count неизменяемым априори не мож...