Stack Overflow Community Digest

Top new questions this week:

Why destructor needs to be accessible even when it is not called?

Having class X, the following object initialization: new (ptr) X(X()); requires an accessible destructor even since C++17. Why is that, when the object is initialized by the default constructor ...

c++ c++17 language-lawyer destructor temporary  
user avatar asked by Daniel Langr Score of 13
user avatar answered by user17732522 Score of 10

What does "training" the data mean in the internals of ggplot2?

I'm following along with the internals of the ggplot2 library and I'm trying to understand how non-positional aesthetics get mapped to the values that get passed to grid. The book describes this ...

r ggplot2  
user avatar asked by Dubukay Score of 9
user avatar answered by teunbrand Score of 12

Weird behaviour with 'if constexpr' and templates in MSVC

The code below behaves incorrectly. When f<0> or f<5> is called, it prints as if k = true, but the if statement behaves as if k = false. When f<1> is called, it does the opposite. ...

c++ templates visual-c++ function-templates if-constexpr  
user avatar asked by daniel creatd Score of 6
user avatar answered by user12002570 Score of 4

How to set the custom Microsoft visual studio projects MSI to open it without admin power

I want to know if there some options to set the MSI file without admin power. When I open the msi file in non-admin user, it always need admin power. How can I set it to open the msi file without the ...

windows-installer visual-studio-setup-proje  
user avatar asked by Dennis Li Score of 6
user avatar answered by Cody Liang Score of 4

Explicit object member function discrepancies between different compilers

I wrote the following program in c++23. Here I've overloaded member functions. But for all cases different compilers give different result as shown below in comment. As you can see I have three cases ...

c++ language-lawyer non-static c++23  
user avatar asked by Alan Score of 5
user avatar answered by user12002570 Score of 8

Multiplication of huge massive of numbers in python

I'm working on a small python program for myself and I need an algorithm for fast multiplication of a huge array with numbers (over 660 000 numbers, each is 9 digits). The result number is over 4 ...

python python-3.x algorithm math optimization  
user avatar asked by Sergio Score of 5
user avatar answered by Tim Peters Score of 5

Deeply understanding Volatile and Memory Barriers

I have been reading a ton on this topic over the past view days but would really like clarification on what I learned so far in relations to C# and C. Firstly, Atomicity seems to be fairly intrinsic ...

c# c multithreading volatile memory-barriers  
user avatar asked by UnSure Score of 5

Greatest hits from previous weeks:

How to use a global variable in a function?

How do I create or use a global variable inside a function? How do I use a global variable that was defined in one function inside other functions? Failing to use the global keyword where appropriate ...

python global-variables scope  
user avatar asked by user46646 Score of 3982
user avatar answered by Paul Stephenson Score of 5219

How to concatenate string variables in Bash

In PHP, strings are concatenated together as follows: $foo = "Hello"; $foo .= " World"; Here, $foo becomes "Hello World". How is this accomplished in Bash?

bash shell syntax concatenation string-concatenation  
user avatar asked by Strawberry Score of 3553
user avatar answered by codaddict Score of 4808

ValueError: invalid literal for int() with base 10: ''

I got this error from my code: ValueError: invalid literal for int() with base 10: ''. What does it mean? Why does it occur, and how can I fix it?

python valueerror  
user avatar asked by Sarah Cox Score of 769
user avatar answered by FdoBad Score of 880

How do I convert a String to an int in Java?

How can I convert a String value to an int type? "1234" → 1234

java string type-conversion integer  
user avatar asked by Unknown user Score of 3512
user avatar answered by Rob Hruska Score of 4534

How can I iterate over rows in a Pandas DataFrame?

I have a pandas dataframe, df: c1 c2 0 10 100 1 11 110 2 12 120 How do I iterate over the rows of this dataframe? For every row, I want to access its elements (values in cells) by the name ...

python pandas dataframe loops  
user avatar asked by Roman Score of 4126
user avatar answered by waitingkuo Score of 5360

How do I generate a random integer in C#?

How do I generate a random integer in C#?

c# random  
user avatar asked by Rella Score of 2436
user avatar answered by Guffa Score of 3080

What is the JavaScript version of sleep()?

Is there a better way to engineer a sleep in JavaScript than the following pausecomp function (taken from here)? function pausecomp(millis) { var date = new Date(); var curDate = null; do ...

javascript sleep  
user avatar asked by fmsf Score of 3828
user avatar answered by Dan Dascalescu Score of 5450

Can you answer these questions?

How do I find my new created txt folder using fstream in a project folder that Visual Studio created?

I am new to Visual Studio and I found out that for Visual Studio to compile the folder you need to create a project folder that creates it inside the user folder, now I used fstream to try to create a ...

visual-studio fstream  
user avatar asked by huk 30 Score of 1

Speed-up byte signature scanning in memory using SIMD

I'm searching for various byte patterns in big memory chunks using this code: BOOLEAN Find(const unsigned char* data, SIZE_T data_size, const unsigned char* to_find, SIZE_T to_find_size, SIZE_T* index)...

c visual-c++ simd sse avx2  
user avatar asked by Kracken Score of 1

docker desktop encountered an unexpected error and needs to close

Docker desktop was working until I updated it (saw an update button in the app and updated it). After updating, a restart of the app happened and docker is refusing to connect again. I uninstalled the ...

docker docker-engine  
user avatar asked by Samuella M. Aglago Score of 1
user avatar answered by Piotr Markielau Score of -1
You're receiving this message because you subscribed to the Stack Overflow community digest.
Unsubscribe from this community digest       Edit email settings       Leave feedback       Privacy
Stack Overflow

Stack Overflow, 14 Wall Street, 20th Floor, New York, NY 10005

<3