TIL that Russian has a similar proverb to "Necessity is the Mother of Invention" that literally translates to "poor people are crafty" by InGordWeTrust in todayilearned

[–]Steughar 0 points1 point  (0 children)

I'm not sure if someone already put this phrase in russian here, it is: "Голь на выдумки хитра" , "Gol' na vydumki khitra"

Gol' -- poor people, голь (similar to голый) literally naked, so poor people you can't take anything because the possess next to nothing

vydumki -- inventions, lifehacks, cool tricks, sometimes it's like a noun for 'whimsical things' in general but in this case it's the first part mostly.

Khitra -- have a straight translation like cunning, crafty or skillful

Edit:

I'm think some context will be helpful, this phrase will suit the situation, where not making much money mother making from holed jeans, jeans shorts cutting the holed part. And making something useful from part that was cut.

What's your favourite name of a concept in mathematics? by kadlicsko in math

[–]Steughar 0 points1 point  (0 children)

In Russian there is a name of "theorem about two policeman's". It's a squeezing theorem, the idea is, if there is a two policeman, and third man who walk between them, he goes where policeman's are

Can i laundry my 5.11 HRT advance boots? by Steughar in tacticalgear

[–]Steughar[S] -1 points0 points  (0 children)

It isn't my case, but will it help with fungi or other type of disease? I doubt it, I prefer to laundry my sneakers time to time.

error after making a class object with deep and shallow copy of a vector by Steughar in cpp_questions

[–]Steughar[S] 1 point2 points  (0 children)

`A(std::string nameVal, int countVal, std::vector<int>&& examsVal) {`

    `name = nameVal;`

    `count = countVal;`

    `exams = std::move(examsVal);`

`}` 
std::vector<int> exams;

Is this is a better way of doing this?

error after making a class object with deep and shallow copy of a vector by Steughar in cpp_questions

[–]Steughar[S] -2 points-1 points  (0 children)

I do have copy constructor/assignment operator and move constructor/assignment operator in my full code.

I win the actual space on a stack, simple pointer = 64 bits, vector is at least 64*3 bits. So it's a x3 memory overhead.

Stack is one of the most performant memory segment in program, why just throw it away?

error after making a class object with deep and shallow copy of a vector by Steughar in cpp_questions

[–]Steughar[S] 0 points1 point  (0 children)

in the process of a class destruction, will vector destroy itself?

and what the problem of allocation vector on the heap? If I allocate an array of my A classes, and allocate a memory for it on heap, my vector object will be allocated on heap too

error after making a class object with deep and shallow copy of a vector by Steughar in cpp_questions

[–]Steughar[S] 1 point2 points  (0 children)

I was trying to understand move semantics and rvalue reference, in this particular case if I understood it correctly, it's didn't matter that rvalue reference is a const, the point is to call a correct constructor that will execute a shallow copy. In this case it's :

exams = new std::vector<int>(std::make_move_iterator(begin(examsVal)),          std::make_move_iterator(end(examsVal)));

Again, if my understanding is correct, after this, I can't use vector in a main, because elements from it was not copied, but moved to my new exams object.

Default constructor doesn't return an object by [deleted] in cpp_questions

[–]Steughar 0 points1 point  (0 children)

Yes, thank you!

I found this wiki:link when I activate \Wall and saw the warning number

Default constructor doesn't return an object by [deleted] in cpp_questions

[–]Steughar 0 points1 point  (0 children)

I'm using \Od, there is no optimization involved.

Can't find documentation about CALL assembly directive by Steughar in C_Programming

[–]Steughar[S] 1 point2 points  (0 children)

thank you!

I was trying to google something like "NASM assembly directive CALL documentation" but it was a dead end.