Arguments Questions
Ad
How to determine the value of the argument entered in the terminal using C language
I would like to write a program that performs different function based on the argument provided. for example: $ ./program -a
C : Why passing arguments less then function defined, Only warning shows up (No any error and it can run normally )
This maybe is a special case. when i tracing a c code i saw warning . said implicit declaration of function 'wifi_hosts_sync_func'
Segmentation Error : Command Arguments (argv)
#include<stdio.h> #include <cs50.h> #include <string.h> #include <stdlib.h> #include <ctype.h> int main(int
How to pass blank parameters to a script called in crontab (linux)
I am trying to pass a blank parameter using double quotes "" but it just gets ingnored. all parameters after the blank parameter end up
Python function as argument
I have a problem with pass other function as parametr to another. i have function marks_as_done and delete_task in separate file
Is there any way to take inputs for a option created using parser.add_option, and not take any input for the same option?
Now when i type " python openweather.py --api=key --city=london --temp=fahrenheit " in command prompt, i get the desired output of
How to multiply unknown numbers of arguments each other in a function in python
I'm trying to make a multiply(#numbers) function that multiplies everything in the parenthesis and returns the number. how do i
MacOS: Pass filepath into node via cli
Say i have the following npm script: "test": "node $file" how would i pass an absolute path to it via cli?
Plotting multiple functions with pyplot, passing functions into functions, & reusing code
Import matplotlib.pyplot as plt x_coords = [] y_coords = [] def myfunction(x): return (3*(x**2)) + (6*x) + 9 def
What are command line arguements and what are they use for?
I came across this "command line arguments" thing while reading a coding book. can someone please explain what is it, what is it for and when do i
Ad
getopt() function: purpose of addition of argv
Code piece from book i am reading getopt() funtion
passing mixed keyword non keyword arguments programmatically to a bound method in Python
I have an object. class myclass: def f1(self,arg1,param1,dictionary_settings={}): # stuff def
docker - passing file name as arguments to nodejs application
I have to convert an existing nodejs application to run on the redhat openshift container platform. currently, the application is run
Working Magic on Arguments - But only if they are Numbers (Javascript Algorithm)
Question create a function that sums two arguments together. if only one argument is provided, then return a function
In Visual Studio Code, how to pass arguments in launch.json
In visual studio code, in the launch.json file that launches the app i'm writing, how do i add command line arguments?
Any imaginary parameter in the laravel command
Is it possible tu pass any imaginary parameter with laravel command? this parameter shouldn't be defined in command implementation. for example
Python - command line argument extracted as a string ImportError
I am trying to do the following: in cmd: python __main__.py 127.0.0.1 the in main.py:
Flutter Navigation, Required Argument, Separate Routes File, How to Properly Code
So i'm following a tutorial and jumped ahead of myself but would really like to get this working. i've moved the navigation into a
Flutter Getx : type 'double' is not a subtype of type 'RxDouble'
I am using getx package on my flutter app. i want to update a double value. but it's show me an error. here is my
How to get the underscore function _.first to work on the arguments objects?
As part of the precourse for a coding bootcamp, we have to create a simpler version of the underscore js library. i am struggling with creating
Best way to handle preset options in classes
I want to have a class which can be initialized with options a,b and c. c is a special
Ad
How to print the first N lines of a file in python with N as argument
How would i go about getting the first n lines of a text file in python? with n have to give as argument usage: python
How to print first n line from the argument passed file with arg parser library
How to print n line from the argument passed as file with arg parser library. i have a file with 100 lines. i want to print the first n
Error: Integers argument expected, got float
I've just tried to copy some game code from youtube. after running the code, it gives the following the error: integers
break a string into usable arguments
I have a string that i'm inputting into a node client which gets passed to a server. let's say it's this on the client side:
Importing Class 'missing required positional arguments'?
I am trying to create an instance of the class = button. i understand that i have to initialize button into my menü class to use its variables.
.js + sql variables cant get the sum
It just gives the two variables put together instead of the sum of the two ex. 1 + 2 = 12 instead of 1 + 2 = 3 or args[1] + money =
In pytest is it possible to access command line arguments in parametrize decorators?
Imagine a toy test definition: @pytest.mark.parametrize("bar", [1, 2, 3]) def test_foo(bar): assert some_result(bar)
What's the difference between --option and nargs='?' in Python's argparse module?
Having read the documentation on argparse i am struggling to see the difference between the last two lines of code: parser =
How to achieve @args splatting in an advanced function in Powershell?
Consider the following simple function: function write-hostifnotverbose() { if ($verbosepreference -eq 'silentlycontinue')
Python object as an optional argument of a class instructor
When creating a new instance (say a) of a class, i want an instance (say b) of another class to be an optional argument of the constructor. if b
Using a function call as default parameter javascript
Help me understand why i can't do the following: function rgb(r = 0, g = 0, b = 0) { this.r
Ad
Nodejs Passing argument to fork object
How to send "--max_old_space_size=1024" to child process fork? i tried to send this argument as args , argv note that because i need communication
Is it possible to invoke python function with logical statement as parameter?
I have found a weird function invocation while reading models.py file in python requests library. i tried to find some
what the problem with "characterIndex" it gives Uncaught TypeError: Cannot read property '8' of undefined?
I want to change the value of str to str[characterindex] but it gives me this error
Django argparse: Unrecognized Arguments --settings?
I've looked at the other so threads about unrecognized argparse arguments, but none of them seem to match up with my situation. here's my
How does composer resolve the `dumpautoload` command?
Using composer version 1.8.6 2019-06-11 15:03:05 the dumpautoload command works with all the following variations
Correct syntax to apply a method within render () using arrow function
I found this great method on stackoverflow to convert duration from ss into hh.mm.ss
Laravel Command argument returns keyvalue pair insted of value
I've generate laravel artisan command by php artisan make:command somecommand. here is the entire command class
React: How to pass an argument to a parent component
So i have a parent component that acts like a router to all the components in my app. in my child login component, it
How to deal with sometimes unused arguments of function?
Could you please advise me how to deal with sometimes unused arguments of function? thank you in advance! function: def
Flutter : How to setState variable comes as arguments
I have this page which receive an argument variable (weekid) from previous page ,i want to change this value after press on button icon to
Laravel post request route
Enter image description herei have a following controller in php
Ad
How to use the value of a variable as an argument
I am trying to use the value of a variable, which is a string, as an argument and i keep getting "'str' not callable' error. i haven't used str as
How can i pass a function of return type Future<Dynamic> without it being executed before i decide to do so in dart
I have created a dialogue box in my flutter app and i want it to be reusable. so each time i call it i pass in two arguments, the text to be
Node.js Script on the web-page with arguments(parameters)
I'm a noob with node.js . here we come. this is my node.js code: // configuration var isocode = process.argv[2]; var
Python call a function with arguments from a tuple which is larger than the amount of arguments needed
Additional explanation: what i want to achieve is call(function,(*args,*toomanyargs)) == (function(*args),*toomanyargs)
How to pass dynamic amount of arguments in function
I try to pass different amount of arguments in different cases. i have the next code: function getbytecode(tokendata, incomedata){
Issue with option arguments in GNAT.Command_Line
I'm having an issue parsing input arguments in ada using the gnat.command_line package. i've modeled my approach based off resources
How to pass optional function parameter
I am currently learning python and tried to implement chess. (i've already done this in multiple different languages) class board:
TypeError <lambda> missing 1 required positonal argument
For school i have to finish some exercises. i keep getting this error "typeerror () missing 1 required positional argument:
Retrieving the cmd line arguments as it is in Python
I am writing a wrapper tool in python. invocation of the tool is as below: <wrapper program> <actual program>
Creating exe from py which passes arguemt by default on execution?
If we assume this is the test.py code: import sys for arg in sys.argv: print arg print "hello world!" by
Laravel: Too few arguments to function 0 passed and exactly 1 expected"
I know this has been asked before. ive seen the questions and answers but cant find something that i can get help from. i am trying to
Ad
JavaScript: Test if input args are arrays; If yes, then merge arrays into one big array
I have the following variables which are arrays: const gumbrands = ['orbit', 'trident', 'chiclet', 'strident']; const mintbrands
javascript array filter callback with thisArg not working
According to the
How to change the metavar value for nargs=* in argparse?
I want to change the value that comes after -args option in the help message to "arg1 arg2 .." instead of "[arg [arg ...]]". i've tried
Python - Pass default values for arguments that are function of other arguments of the function
I would like to write a function in which the default value of one argument is a function of some arguments that are being passed to the same
Defining a function to apply only to a subset of properties of the objects passed as argument
I recently came across this nifty piece of
Python; Why passing function arguments not mandatory
It seems to me that it is not mandatory to pass the variables you want to use inside a function to that function in python. this
sys.argv got lost when using Dockerfile + pipenv + baker
Consider the following app.py #!/usr/bin/env python import baker @baker.command def initial_setup(setting1, setting2): # do
Changing JavaScript function's parameter value using arguments array not working
I am learning javascript and am pretty confused about the arguments property array. i have a function that takes a single
How I can cause a program in C to print only one statement once it encounters a specific condition?
I have been trying to write a c program where the user inputs a command-line argument and the program checks if it is all number digits or not. if
Is there any difference between int main(int argc, char* argv[]) and int main(int argc, char** argv)
Is there any difference between int main(int argc, char* argv[]) and int main(int argc, char** argv) i don't see any
What does this passage from cppreference.com (Default arguments) mean?
From cppreference page on default
Ad
Create a list with methods with a return value C# and optional argument C#
I have a list with methods that i am calling from a loop like below (with the help of a previous question:
Caesar segmentation fault in c language
I'm working on the second homework caesar of cs50. it seems most of my review is correct except the last one. i cannot handle the situation of
The following C code shows that : format '%d' expects argument of type 'int *', but argument 7 has type float *
The following code shows that : format '%d' expects argument of type 'int *', but argument 7 has type float *. i'm not an expert but i can't
Assign dict values as arguments in Python
I'm using a class class variable(): def __init__(self, value, ratio): self.value = value self.ratio = {'a': 0.0, 'b':
Do C functions generally have more arguments than OOP languages' methods?
I had to write a c program with more than 600 lines and about 25 functions. this is the longest c code that i've written. i noticed that
Why a function with no arguments works, but a function with void as argument doesn't?
In the below codes i am calculating pi with a function external to main(). the only difference between the two is:
understanding pointer to array of pointers to integer type
In a given exercise in c programming language, there is a function that should return an array of arrays
Best way to modify and return two float (or double) in a function?
I'm trying to return two values, u and v, which i pass as arguments to the function get_uv( float u, float v
What is function designator and actual call?
According to c99 standard: the order of evaluation of the function designator, the actual arguments, and subexpressions
How can I have access into *argv[ ] in C?
Say that i have this part of code. if user does not enter the file names as command line arguments i want to ask him again so as to enter them now
What Does Input Arguments is _
I wanna know why is result 1 for no arguments. int main(int argcount, char *arglist[]) { int i; printf("number of
Ad
How to prompt for user input and read command-line arguments
How do i have a python script that a) can accept user input and how do i make it b) read in arguments if run from the command line?
Dynamic matrix 2D array malloc() from external function allocation
I'm trying to load file from non-main function with pointer to pointer (2d matrix) as argument in ansi c. approach with l-value function
How can I populate a new array with strings passed as command line arguments in argv[]?
I am relatively new to coding, especially in c. i am attempting to create a simple program designed to take a phrase, or list of strings, as
C programming, manipulating functions' arguments and return
All should not the output be -24 ? i'm getting -4 as a result and can not get the reason . #include <stdio.h>
Length of each string argument
Recently i've started to get a little bit into the stdarg.h functions, because i want to have something similar to
Get suffixes in C
I'm trying to get the suffixes of an entered string, but i'm getting the prefixes how can i make to fix it? the expected result for
Point to functions with different arguments using the same pointer
I am trying to build a parser to a given input, there are 8 possible commands. so i figured that instead of using the ugly technique of a
Is it possible to put <stdarg.h>'s ... in a macro in C?
I am attempting to create a function which takes two arguments, but that is remapped by a macro to call a different, hidden function which takes
Understanding `this` behaviour where `arguments` are involved
So, i have 3 functions as follows: function a() { arguments[0](); } function b(fn) { fn(); } function c() {
Generic method argument <T> detected as a variable
I am currently writing code for runtime post-processing management. i would like to make a generic method to be more effective but i get 2
Choice between options in indexOf function
I want to have a selection between different options in javascript "indexof" function in a if structure. what is the best way to
Ad
Running java with JAVA_OPTS env variable has no effect
In a shell script, i have set the java_opts environment variable (to enable remote debugging and increase memory), and then i execute the jar file
Too many positional arguments: 0 expected, but 6 found flutter
I am having a user model class that looks like this below class user { string? email; string? about; string?
How to delete the first argument in arguments object?
I need to remove the first item in the arguments object so that my let args variable equals to all the following
Check if command line arguments are in a correct form
So if for instance my programm is correctly started like this: java test tim;john;10;20 however i want to prevent
Difference between -XX:+PrintGC and -verbose:gc
I want to understand the difference between: -xx:+printgc and -verbose:gc apparently these look similar. this
The importance of arguments object in JavaScript
I am very new to arguments object concept in javascript and trying to understand the concept from
How to pass optional arguments to callback functions in typescript
I have a callback function which returns some data to the component. export class appcomponent { constructor( private
Js function arguments
When i run this code on console its result is undefined (function test (arguments) { console.log(arguments[0]);
savig matrix output gives zip argument error
I would like to write the outputs of the following code in a text file. it gives this error: for x in zip(c(), r1): typeerror: zip
Passing command line arguments to a python script, called from a Makefile
I have just started using gnu's make command to automate things. i ran into a problem and need some help. i have a python script (abc.py) which
Passing a 2D array as Function Argument
I am trying to pass 2d arrays of arbitrary size to a function. the code that i have tried is as follows: #include <iostream>
Ad
How to use a list of dictionaries as function arguments
I started out with this code: import bs4, requests def bal(address, symbol, name): r =
how to pass the functions with args in an inline function in JS?
Function emotions(mystring, myfunc) { console.log("i am " + mystring + ", " + myfunc(2)); } // your code goes here // call the
Ad
Blog Categories
Ad