Questions tagged [arguments]
An argument is a value passed to a function, procedure, or command line program. This also refers to the Array-like `arguments` object in JavaScript.
arguments
11,177
questions
0
votes
1
answer
28
views
BigQuery: input parameter used for dataset name in for loop
I have a stored procedure that uses a for loop to read through the records in a table and carry out some actions. Is it possible to use an input parameter to specify the dataset and table names?
For ...
-3
votes
1
answer
49
views
Rust iterator map callback issue "function is expected to take 1 argument, but it takes 3 arguments expected function that takes 1 argument"
This "do_work" function Need to insert 3 arguments, but only first argument is working. Please view image.
I also need to insert i2 and i3 variables.
Rust map callback issue - "...
0
votes
0
answers
37
views
Problem in calling Python executable file with large arguments
From C#, I want to execute python exe file with the arguments. If my arguments are simple and small string, it is fine. But if I send large string, then it throws "The filename or extension is ...
0
votes
1
answer
45
views
Wp customizer Custom control class - get value from custom argument to enqueue function inside class
I'm working with custom control in wp customizer.
Got custom argument for this control ( foo ) and trying to get its value as a part of enqueue directory.
So, custom argument foo shows up properly in ...
1
vote
0
answers
67
views
How to use multiple positional args with argparse
I am writing a program that expects 2 required positional args. First argument has a limited set of string values. Second argument can be any string without restrictions. Program is meant to use ...
0
votes
0
answers
47
views
Use UTF-8 in .bat file
I have following .bat file:
@echo off
echo %* > args.txt
I get all the args through this file using %* and save them in a txt file to use them later.
But when I use special args that require utf-8,...
0
votes
1
answer
45
views
Python decorator for class methods does not accept arguments from class attributes
I have a conditional decorator that executes action if 'True' is passed, it works great on standalone functions, but when trying to use it on class methods, I cannot pass an argument from class ...
1
vote
2
answers
123
views
Run Powershell with parameters from batch file
For convenience of use, I need to put my powershell script in a bat file. The bat file content is as follows:
# 2>NUL & @CLS & PUSHD "%~dp0" & powershell -COMMAND "Start-...
0
votes
1
answer
54
views
bash script - check number of input arguments based on one input argument value
I have to create a bash script for which i need to give input arguments based on action type: insert/update.
In case of insert the bash script will need 3 input arguments but in case of update are ...
0
votes
0
answers
26
views
Can someone please explain the detailed mechanism of function call without any argument? [duplicate]
Here, the calling line np.pad(a, 2, pad_with) works magically!. Not able to find the corresponding python PEP document.
>>> def pad_with(vector, pad_width, iaxis, kwargs):
... ...
0
votes
0
answers
24
views
PHP - Syntax to append a string value to function argument? [duplicate]
I'm using the prepared_query and prepared_select functions from PHPdelusions (https://phpdelusions.net/mysqli_examples/prepared_select)
The standard functions are fine on known data sets, where you ...
1
vote
1
answer
65
views
Is it possible to slice the argument array in Bash?
Consider the following script, which I simplified from this question.
#!/bin/bash
A=( foo bar "a b c" 42 )
B=("${A[@]:1}") # slice to the end of the array
echo "${B[@]}...
-4
votes
1
answer
35
views
Python | How do I pass parameters for only 2nd argument? [duplicate]
Suppose I have some code like:
def sample2(a = 15, b=14):
print("sample", a+b)
If I call sample2() I get 29, using both default values.
How can I pass an explicit value for b, but use ...
0
votes
0
answers
42
views
CLI Tool Fails to Recognize New Arguments During Direct Execution with Python-Fire
I'm working on a CLI in Python and I don't know why the main class of the CLI does not update as new arguments are added, performing the tool using python-fire.
I've mainly 2 scripts that rule the CLI:...
0
votes
2
answers
56
views
Can't open file passing as parameter to jar
If I run my project inside the IDE it works fine:
EXISTS c:\testvideos\[video] ролик\video.mp4
but if I run it in the Windows console I'm getting error:
NOT exists c:\testvideos\[video] ?????\video.mp
...