4,457 questions
-4
votes
2
answers
149
views
Blackhole assignment in R [duplicate]
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 ...
1
vote
1
answer
86
views
In Ansible YAML, how do I pass different variables to an include_tasks to make it reusable?
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 ...
-4
votes
1
answer
90
views
COBOL assignment debugging [closed]
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 ...
0
votes
0
answers
28
views
Apache Spark pre requisite
Problem i am facing is to install the corresponding dependencies for spark in ubuntu. For example apache spark 3.3.x needs other version of python,older version of java etc same for graphframes so i ...
3
votes
2
answers
125
views
Is there any way to move a string into a variable?
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', ...
0
votes
1
answer
134
views
Confusion about post-decrement and assignment execution order in C [duplicate]
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 ...
5
votes
0
answers
142
views
Under what circumstances does the Visual Studio compiler issue warning C4706 about assignment used as a condition?
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 <...
0
votes
0
answers
70
views
C# variable loses its assigned value within the same codeblock? [duplicate]
I'm new to C# and working an assignment for school where we build a console program that is essentially a container that the user can opt to put items into, see what items they have put in and then ...
1
vote
1
answer
192
views
Understanding the difference between ??=, ?= and = for bitbake variables
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 ...
2
votes
1
answer
199
views
Is there a way to store "$@" into a variable in pure POSIX shell?
When I do something like ARGS="$@", the shell just concatenates the arguments stored in "$@". Is there a way to store "$@" into a variable in pure POSIX shell to be able ...
0
votes
6
answers
481
views
Why are the values of expressions independent of variable changes?
For example, there is a code:
#include <stdio.h>
int main(void)
{
int n = 54;
int index = 2 * n;
printf("%d\n",index);
n++;
printf("%d\n",index);
...
0
votes
1
answer
71
views
Check if there is a specific value in a temp table, and assign to temp variable
I have a query that joins multiple tables. The result of the query is something similar to this two samples of temptables:
DROP TABLE IF EXISTS #table1
CREATE TABLE #table1
(
[aRowNum] bigint,
...
-2
votes
2
answers
148
views
How to read multiple lines into variables with a single read-command?
I need to read a three-line text like:
4
10
foo
into three variables: num1, num2, name.
I tried IFS=$'\n' read num1 num2 name <<< $data, but that only initializes the num1, leaving the rest ...
0
votes
2
answers
95
views
execute lines of text from a txt file in native batch script [duplicate]
I have a text file, and I want to read in the entire file to a variable and then execute it. I then want to clear the variable contents and the file contents.
for /f "delims=" %%A in ('type ...
2
votes
1
answer
87
views
Error: Invalid dot name structure assignment because the structure array is empty
I'm having this error but I don't understand why. I'm creating a structure of size 3x4x4 with 6 fields within loops. Then, I would like to create two more fields for the whole structure. How can I do ...