Questions tagged [multiple-arguments]
53 questions
0
votes
1 answer
Can I pass multiple callback function inside withSuccessHandler?
This is the code i am running
document.addEventListener('DOMContentLoaded', function() {
google.script.run.withSuccessHandler(populateSearchDropDown).searchByVehicleNum();
});
now my question is ,
Can i pass 2 callback functions inside…

Doctor Pinocchio
- 35
- 6
0
votes
0 answers
Is there a way to create a function that uses multiple argument, and run the same function independently for each one of them?
I'm pretty new in programming, but I'm trying to learn through practice. I'm coding a function which accepts a variable number of arguments, with the ... function. Here's an example of what I've done:
decyph_test = function(...) {
decript =…
0
votes
0 answers
How to pass multiple arguments to function in function in Python?
I have a function in first Python file to do some manipulation with two strings:
J = "aA"
S = "aAAbbbb"
def numJewelsInStones(self, J: str, S: str) -> int:
return len(J + S)
And function in another file to check time taken (performance test…

sqfshggy
- 1
0
votes
2 answers
For loop with multiple arguments in one line with python
I'm using the google_streetview.api and I have a problem I can't solve. The documentation tells me I can run multiple arguments in a single line by separating with ; but I don't know how I loop with values inside a line. I have a dataframe with x…

Rolf
- 7
- 4
0
votes
1 answer
Multiple arguments in Python function
The code I have is works for one argument. But I am trying to pass through multiple arguments at a time.
def day(x):
mydict = { 2.4:104.2 , 5:109.2, 5.5:112.2, 2.1:110.2, 5.7:114}
keylist=sorted(mydict.keys())
if x in mydict:
…

chocolatekeyboard
- 73
- 2
- 10
0
votes
0 answers
lapply in R, same function different arguments
I have two fit objects reg and reg1.
I want to run summary() on each without having to re specify whole thing, just the arguments.
What is an easy way to do this in general in R? I tried something like this:
lapply(c(reg, reg1), function(x)…

Forevertrip
- 33
- 1
- 1
- 4
0
votes
0 answers
Apply function with 3 parameters to each row of a column in a dataframe
I am trying to apply a function to every row of a dataframe in R. I have already gone through several answers in Stack Overflow but they are not working.
Basically I have a dataframe of latitude and longitude information. The function, convertLngs2,…

Daxaniie
- 65
- 6
0
votes
3 answers
Function with two arguments that returns when arguments are equal
I'm trying to create a function that takes two arguments. It will repeatedly call the first argument, in my case
f()
until f returns that same value 3x in a row. It will then call the second argument
g()
and if g returns the same value as f…

skatofia
- 17
- 4
0
votes
3 answers
How to pass a variable which has multiple arguments to function all at once?
I am trying to make a command which allows the user to input a name as the first argument for the compressed file they want to create (which will become a tar.gz file) and file and directory names as the second argument.
So far I have this…

Lenk
- 15
- 2
- 8
0
votes
1 answer
Creating a variable number of arguments, function
How to create a function which accepts unterminated number of arguments
In a real world example, what I would like to accomplished after knowing this information creating the function from bellow:
list.max <- function(list, ... )
where the ...…

Homunculus
- 329
- 2
- 12
0
votes
3 answers
Strip list items with multiple arguments error
I'm trying to remove a lot of stuff from a text file to rewrite it.
The text file has several hundred items each consisting of 6 lines of.
I got my code working to a point where puts all lines in an array, identifies the only 2 important in every…

Tharrry
- 619
- 1
- 7
- 23
0
votes
1 answer
Using a nested class to pass multiple arguments into a backgroundworker
I'm trying to use a nested class to get two classes to pass into a single argument so I can send it to a backgroundworker. Thus far, I've managed to pass single arguments into a backgroundworker but I'm yet to do it with a nested class where I end…

Carlton Peterson
- 3
- 3
0
votes
0 answers
C# with SOAP - Multiple argument value
I need some help with this code, i'm almost new with this language.
I got (for example) this SOAP input:
Elmer
Male
shoes
…

Elmer Quero
- 1
- 2
0
votes
2 answers
Multiple arguments passed from user input remain as single argument
I am trying to understand the mechanics of passing multiple arguments to a python function. (I am using Python 2.7.9)
I am trying to split multiple user input arguments passed into a function, but they all just get passed in as a single argument of…

Unpossible
- 603
- 6
- 23
0
votes
1 answer
R Code: using UDF with multiple arguments for apply function
My UDF:
testfn = function(x1, x2, x3){
if(x1 > 0){y = x1 + x2 + x3}
if(x1 < 0){y = x1 - x2 - x3}
return(y)
}
My Sample Test set:
test = cbind(rep(1,3),c(2,4,6),c(1,2,3))
Running of apply:
apply(test, 1, testfn, x1 = test[1], x2 = test[2], x3 =…

Tan Eugene
- 93
- 6