1,590
questions
-4
votes
1
answer
132
views
C++: What does the (-1) mean at the end of the parameter list in this function?
I don't understand the definition of a function below: What does the (-1) mean at the end of the parameter list?
template<typename RatioT = std::milli>
bool rclcpp::client::...
0
votes
1
answer
48
views
How does Python create values for variables without assignment?
I am reading Engineering a Compiler (Cooper, Torczon) 3rd Edition, Chapter 5 Syntax-Driven Translation. It contains the paragraph:
PYTHON does not provide type declarations. The first use of a name x ...
0
votes
1
answer
64
views
Powershell Core Get-Member
Humbling seeking help. Beginner Powershell Core 7.4.2 scriptwriter. In reference to Get-Member results. My background is that I really prefer using Powershell Core's built in documentation rather than ...
0
votes
1
answer
66
views
Defining function in Python whose one argument is list
There is a part of mathematics called the theory of multiple zeta values (MZVs) introduced around 1992. In this theory, we study the properties of parametric nested infinite series (see, e.g., here ...
1
vote
1
answer
69
views
Set range to read values from one worksheet and write to another
The script is intended to:
Read values from column LADUNGSNUMMER in the worksheet NVL cell by cell.
Find each value in column Transport of the worksheet DATA.
Read the corresponding values from ...
0
votes
1
answer
151
views
Forward declaration struct member access
I have a forward declaration of a struct in .h file and full declaration of the same struct in .c file. I want to access it's members, but I get
member access into incomplete type struct channel
Here ...
0
votes
1
answer
953
views
Authentication method detail - Password in the cloud
"Password in the Cloud" - is this definition meant to be a catch-all term for any saved/stored credential (via Chrome, Bitwarden, or any other password manager). Or does it have a more ...
0
votes
1
answer
77
views
How to correctly declare function with templated class as return type in header? [duplicate]
I have a template class declared in a header file.
// Matrix.h
template <class X> class Matrix {};
In another header file I have a function declaration which has an instantiation of that ...
0
votes
1
answer
153
views
How to define a seperate implementation of a template class constructor [duplicate]
I am working with an old code in C++ that uses a custom implementation of a matrix class.
The matrix is class is implemented as a template class. The declaration looks like this
/**********************...
0
votes
0
answers
120
views
Go to Definition (F12) not taking you to the correct line in Visual Studio for C/C++ code
I work in the Visual Studio IDE. I inhered some C code where a lot of macros are defined: it's like a cascade of macros are referring to some other replacement, again referring to some other ...
0
votes
2
answers
178
views
How to check strength password with function and loop while checking off 3 criteria boxes in Python?
I have an assignment to create a password check that says if the password is strong (3 criteria checked off) moderate (2 criteria checked off) or weak (1 or less). The criteria are: 1: containing 2 of ...
1
vote
4
answers
114
views
How can i solve a problem by using the outcome of a function as a variable in the following?
I have come up with this code:
lista= [5,3.2, 'Error', 44, 'Error', 35]
listb= [70, 70, 20, 410,'Error', 4.9]
for i in range(6):
a= lista[i]
b= listb[i]
if a == 'Error' or b == 'Error':
...
0
votes
1
answer
127
views
`\d` and `d+` got `relation "pg_catalog.pg_roles" does not exist` error on psql
I created person table as shown below:
CREATE TABLE person (
id INTEGER,
name VARCHAR(20)
);
Then, trying to show the definition of person table with \d and \d+ got the error as shown below:
...
3
votes
2
answers
66
views
PHP empty array definition with starting or ending comma
So I've come accross these on PHP8 code from my office (simplified) :
[, $x] = $y;
I also saw the other way
[$x, ] = $y;
What would these do? If I do that in a sandbox and assign random values to $y ...
0
votes
0
answers
106
views
MOEA/D optimization
Could you help me about an issue that I experience with Moed?
I try to use the code: https://pymoo.org/algorithms/moo/moead.html#nb-moead
But, I encountered two errors related to the shape of the ...