Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!
Score of 0
1 answer
95 views

Using zsh 5.9: I would like to create a function which can be called with a name as parameter, and then creates an array of this name. Usage example: creator myarr should create and populate the ...
Score of 1
3 answers
229 views

I'm trying to create an array of class student that I initialize later: #include <iostream> #include <string> using namespace std; class student{ private: string name; ...
Score of -4
4 answers
145 views

In this python I expect either for x to be assigned to 1, OR for an error/exception to be raised. Instead, nothing happens. The statement is not an error but it also has no effect. x = 0 [x][0] = 1 ...
Advice
0 votes
13 replies
88 views

I'm working in the WinDev programming language/environment in which the variable scope looks rather weird to me. Consider the following pseudocode while condition string txt if condition2 ...
Best practices
0 votes
0 replies
36 views

I am running a simulation for one full year, and I need a specific variable (for example, a defective rate percentage) to change once every month. The variable is not related to resources, arrivals, ...
Score of 2
3 answers
142 views

Instead of writing: echo "variable: $variable" when debugging, I would like to do it all with a function, say: print "$variable" So far I have got this working: t=https://www....
Tooling
3 votes
3 replies
148 views

I want to assign my $FOO = $foo if $foo.defined; I tried my $FOO with= $foo; but that doesn't work. Is there a canonical way to do this?
Score of 3
1 answer
156 views

I saw in a script this kind of command: Write-Verbose -Message ($var=$null="foo=$(<some computation>)") <do something more with $var> What is the point of assigning the string ...
Score of -4
2 answers
168 views

Suppose I have the following: df1 <- data.frame(id=c(1,2,3)) df2 <- data.frame(id=c(2,3,4)) I want to print: (1) The number of IDs in df1 but not in df2, (2) the number of IDs in df2 but not in ...
Score of 1
1 answer
170 views

I have a workflow where I download a file, do some stuff to it, upload it, and then download it again to verify that the changes took place. I want my download logic to be in a reusable YAML file that ...
Score of -4
1 answer
113 views

Here is the prompt for my class assignment: Create an interactive program for ice cream sales you must sell at least four flavors of ice cream and you must us an evaluate statement. The ice cream ...
Score of 3
2 answers
153 views

I was playing around in assembly and noticed that it's possible to overwrite a string in a variable as long as the new string does not exceed the size of the original string: MESSAGE DB 'Hello World', ...
Score of 0
1 answer
140 views

I'm confused about the behavior of the post-decrement (i--) and pre-decrement (--i) operators in C, especially when used in the context of array indexing and assignment. I'm trying to understand the ...
Score of 5
0 answers
170 views

My colleague Zag found that warning C4706: assignment used as a condition is detected by MSVC with /Wall switch only for some expressions and not for others. In the following example: #include <...
Score of 1
1 answer
368 views

When looking up something in the Yocto project reference manual, I sometimes encounter ??= or ?= operators. Normally, a simple = is used in recipes instead. What's the difference between ??= and a ...

15 30 50 per page
1
2 3 4 5
299