Category "function"

how do I get my add to cart button to work in React (cart is not iterable) issue comes up in console?

When I click my add to cart button on the page it comes up with the error 'cart is not iterable' in console not sure what Im doing wrong as Im not sure I really

Dynamic R objects using apply functions

I've got a long R code now and I'm trying to make it more readable. Below is a small chunk from my code - U2OverlayG1 <- GrowthorDiff(U2Overlay, Metadata, 1)

What is the scope of variables in JavaScript?

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the v

I'm trying to exclude elements from an Array, but I'm doing somthing wrong

I'm trying to create this script: https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/seek-and-destroy

Simple function for a customised label

I'm trying to write a most basic function that will set the parameters of a label. First I set the position where I want to put a label: var xCircularPos = UISc

How to make default of parent function run if not specified in a wrapper function

I am writing a wrapper function where I am linking multiple steps of a pipeline. I would like to make it so the user can input multiple options where the value

PLPGSQL function returns ERROR: integer out of range even if value is correct

I'm experiencing strange behaviour on two Postgres functions returning a single bigint value. The first one returns the correct value while the second one throw

cv2 magesearch pyautogui need better way to loop thu functions

im looking for a better way to write this code each function searches for the image using cv2 and pyautogui through python-image search. the code works well but

Why is my linked list size function not working as intended?

I used the following code to define my linked list, nodes and a few functions. class node: def __init__(self,node_data): self.__data=node_data

how can I use a function as an argument to another function,

I am trying to write a simple code that displays 3 sets of greetings in accordance to what day of the week a user inputs. I am learning about functions as I am

How can I use functional update with event.currentTarget.value in React?

First, please check my code. const [name, setName] = useState('nick'); const handleChangeName = (e) => { setName(prevState => e.currentTarget.value) }

Set of functions using Function interface [closed]

Let there be a set A = {1,2,3}. The goal is to compute all bijections on AxA. It should be of type Set<Function<T,T>> so that in t

How to replicate a function for a nested list

I have a nested list (datalist) which I'd like to repeat the following function for. Within datalist are multiple dataframes (e.g., A-F). After doing the follow

How to create a loop/function to open set of shapefiles?

How can I create a loop or a function to open many shapefiles at the same time where the names of the shapefiles change very little? For example with the data b

How to take the result of two randomly generated values from two functions and add them together?

Both the first and second functions (n1 and n2) output a random number from their respective arrays into the console. Issues arise when I try to add these two g

"maxConcurrentRequests" is not working in dedicated ASP for azure function

I have Azure function in V4. and I have host.json as it is mentioned that maxConcurrentRequests is 10 but at the time of execution azure function ignores this s

how to add values from a function to a list

This is a sample database from a function can someone help me to send the output of function to list as shown in the screenshot [this function "getDistrict_Na

how to add values from a function to a list

This is a sample database from a function can someone help me to send the output of function to list as shown in the screenshot [this function "getDistrict_Na

mongodb & php: how can I store and callback a custom js function to parse data?

Before to submit the doubt that I have, let me start from preamble that I'm definitively a newbie on MongoDB world ;( but I'm going to learn quickly! The goal t

Can someone help me fix the bottom two rows of my nested loop? They shouldn't be the same lengths, but they are

I'm working on a project where I'd like to create the following pattern: X XX XXX XXXX .. and so forth. There are twenty rows in all, and the twentieth row sho