Questions tagged [function]

0 votes
1 replies
Clicking the button does not work - React
I use a component called "Modal" that I want to make global so I can use it in any other component. Modal will be used in all the components that...
asked 1 month ago
0 votes
0 replies
Dynamically update functions adding a new argument to deep function
I have to add an argument to a deep function used by other functions, which are used by other functions. I'd love a way to update this function b...
asked 1 month ago
0 votes
1 replies
Why do the functions get skipped over without being read?
Im trying to write code so that it will open a file (worker and benefits) and then display them when asked at the start. I can do this but I woul...
asked 1 month ago
0 votes
1 replies
compilation error, Sub or Function not defined
Currently realising a project for my company to highlight anomalies in orders, I wrote this VBA code in order to compare status of orders and a d...
asked 1 month ago
1 votes
2 replies
How to list only variables that have been evaluated?
When using ls() in a function, it lists arguments of the function even if they've not been evaluated yet (even if they are missing from the call...
asked 1 month ago
-6 votes
0 replies
How to call a java function that have String input parameter from FreeMarker [closed]
I want to know how to pass a string parameter to a java function through a file marker template file. For example i have a java class and in free...
asked 1 month ago
0 votes
0 replies
Loop through a array of numeric ids
In PostgreSQL's SQL, I have a column where the data comes in as an array. This array contains high-dimensional sequences of multivariate events....
asked 1 month ago
0 votes
0 replies
How to use a function to switch an image to another image (using random)
So I am a beginner coder making a game that has random Rocks positioned throughout a container. When clicking these Rocks, a random Gem that I ha...
asked 1 month ago
0 votes
0 replies
How would I keep totalCalc from resetting?
I am making a program to calculate the most efficient amount of change to give when the user inputs a certain dollar value. The program worked b...
asked 1 month ago
-4 votes
3 replies
Javascript functions - deciphering the documentation about basic functions
I have been trying to learn javascript for years. I've done at least 10 code camps, udemy courses and a few weekend sessions. I still don't have...
asked 1 month ago
2 votes
3 replies
Why doesn't str != “hello” && “goodbye” work?
I'm trying to exit the "do" function if the strings "hello" or "goodbye" are entered, this function works for just "hello" but not "goodbye". Ca...
asked 1 month ago
0 votes
0 replies
How to do a contour graph of a conditional function with two variables?
I want to do a contour graph of a conditional function, but I am getting an error. This is the code: from math import * import matplotlib.pyplo...
0 votes
2 replies
Arguments order in controller method
Suppose we have the following route in Laravel: Route::get('/blog/{id}/{slug}', ['as' => 'blog', 'uses' => 'Front\PostController@single'])...
asked 1 month ago
2 votes
1 replies
Python run function in parallel to main code
I have the following code (Python 3.7 on windows 64bit): from time import sleep import time from multiprocessing import Process ### function ##...
1 votes
1 replies
How to fix “Unhandled exception” error in assembly?
I've written a function that determines if a value is prime or not prime. But when I return from the function, it comes up with an error. The err...
asked 1 month ago
0 votes
0 replies
Python: How to print values in columns when calling many functions?
I am very new with python, I need to benchmark 5 algorithms and print the outcome using Python formatted in columns. See attachment. Currently,...
asked 1 month ago
0 votes
0 replies
Why I face an aggregate multiple functions error
I am trying to use aggregate function to some predifined functions, the aggregate function accept only one of the them, but when I excute all the...
asked 1 month ago
0 votes
0 replies
Apply function over nested multiple-variable list with lapply
I have function that takes the form myfun<-function(Year, ID, Species, Abundance, resamps) {do something} "resamps" means resampling and it...
asked 1 month ago
0 votes
1 replies
Javascript: can parameters be anything?
I'm finding it hard to find information about this: Can Java script parameters be anything? For example, I know a function parameter can be anoth...
-1 votes
0 replies
Why can't I use indexPath.row in an IBAction function for a button in a tablewView cell? [duplicate]
This question already has an answer here: swift: how to get the indexpath.row when a button in a cell is tapped?...
asked 1 month ago
0 votes
2 replies
how to use a function when page is dynamically reloaded
For sorting a table, I use a tablesorter like below: <div class="dynamic-content"> <table> <!-- code goes here -->...
asked 1 month ago
0 votes
1 replies
How to replace the match with a function in a regex expression in Python
I'm trying to get a better understanding of how lambda functions and regex matches work in Python. For this purpose I'm replacing a lambda with a...
0 votes
1 replies
Python 3.x - How to return a value from a function requiring arguments
I will preface by saying I'm not a programmer and this is the first forum post I'm making to StackOverflow. I am trying to find a way to return a...
asked 1 month ago
1 votes
3 replies
Parameterize callback function
I've created a dictionary which has a traverse function which takes a callback for each node that is traversed. Signature: void traverse(void v...
asked 1 month ago
2 votes
1 replies
Javascript: A dictionary of functions; one function in dictionary calls another
I have a dictionary of functions which are essentially different calls to an API I am using to receive data (in promises). The way my API has str...