53,895 questions
4
votes
2
answers
135
views
Error with creating an array of named/predefined string constants in c
For background, I am working to create a version of minesweeper that runs in the terminal to become more familiar with coding bigger projects in c.
I am coding in VScode, to run on a Linux server (...
4
votes
2
answers
175
views
Illegal coercion operation producing inconsistent error/exception behavior depending on scope
Consider this example, a script named test.ps1
function MyTestFunction
{
[CmdletBinding()]
param ()
try
{
[bool]$functionBool= $null
}
catch {throw $_}
Get-...
2
votes
2
answers
99
views
powershell compress-archive verbose output to text file
I have a powershell command that I want to execute and direct the verbose output to a text file.
Compress-Archive -Path $currentLogDir_TempPathString -DestinationPath $currentLogDir_ArchiveFileName -...
1
vote
1
answer
66
views
How to assign int input value as column name in pandas [duplicate]
I need to take an integer input value, assign it to a variable, and then use that variable as a column name to get data from a pandas DataFrame.
Data:
1 10 20 30
2 40 50 60
Steps:
Assign input to ...
1
vote
0
answers
52
views
Why doesn't my GD script with autoloads post its variables?
When I use (Morton.morton_statetest) in another script, It gives me 0, and even if I put a print in Morton script and If I put an print in the other script, it gives me two values different, wit out ...
-2
votes
1
answer
62
views
Timedelta Unit Argument as a Variable [duplicate]
Is it possible to have the units argument for the timedelta function be defined by a variable?
To elaborate, is this possible?
Time_Unit = "days"
Time_Increment = 1
Time2 = Time1 + ...
3
votes
0
answers
149
views
Problem with multi-dimensional session variable in PHP [closed]
I have been trying to build a shopping cart with PHP and MySQL as a learning experiment. I am stuck at passing the ordered items from catalogue to the shopping cart.
After many experiments I figured ...
3
votes
1
answer
148
views
How to convert a string in an array to variable using the array index in PHP [duplicate]
Let's say I have an array_1 containing a string which is a name of another array_2. And now I would like to convert the array index into a variable containing the array_2.
I have the following working ...
-2
votes
2
answers
81
views
If I want a string of text to print if a variable is less than a number how can I do this? [closed]
I'm trying to understand how functions work, I defined my function with length and area parameters.
Here is the problem: I want to write if area is less than a # then print a string of text.
def ...
0
votes
1
answer
78
views
timefold mixed model, how to define CH
How to define CH, if both basic and list variables are included in the model, there is an error as below:
The entity (class com.app.planner.domain.Machine) has both basic and list variables and cannot ...
0
votes
1
answer
147
views
Make array of variables with osclass custom category values
How can I make an array of variables generated using the values passed through a while loop ?
I am using osclass for a uni project and I find no way whatsoever to make a list os usable variables from ...
1
vote
2
answers
123
views
How to read multiple bash variables containing spaces in values with the read builtin?
I'm trying to read 2 lines into two bash variables but those lines contain spaces.
Here is how those two lines are generated :
$ url=https://www.youtube.com/watch?v=c5U4D-Hn5Vg
$ yt-dlp --no-config --...
1
vote
1
answer
90
views
Bash variable string substitution to '*'
I tried to figure out how to replace a string variable to '*'
a="bamtools/*/*bam_metric.summary.tsv"
## not working
echo ${a/*\*/}
I would like to see bam_metric.summary.tsv after ...
1
vote
2
answers
127
views
How to remember change of values in between for-each loops
I am writing a program, that will divide my students into groups. Lets say the groups are A, B, C and D. In each group there can be only so many students. Those numbers I have in a global variable:
&...
0
votes
0
answers
93
views
in coldfusion how do I get query metadata in the variables scope?
When I cfdump the variables scope, I want to know the query metadata in all queries while debugging a huge project.
This snip seems to be working, but is there a more direct call or attribute in ...