Category "function"

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

Python assigning the string to the variable - Str object is not callable message

I have the following problem where roles = models.StringField def role(player): if player.rank == 1: return 'leader' else: return 'memb

How do you call a variable that was returned at the end of a function?

I created this function and want to call the returned result but, I'm not sure how to get the variable back. If possible I'd also like a different message to po

functions running in loops and try/except does not work

I am a beginner in Python3 and was learning the basics during the last few weeks. I decided to use my knowledge and was trying to build a text-based game based

Python: I have a list of dictionaries but when I try to call a specific Key and Value it is throwing a error

def readParksFile(fileName="national_parks(1).csv"): nationalParks = open(fileName) headers = nationalParks.readline() keys = headers.split(",")

Called function work at printf but not at arithmetic statement

I made a struct Triangle and I made a function to calculate p(perimeter/2). When I call the function inside printf it works. But when I call the same function a

map2 equivalent apply family

I'd like to iterate between two vectors applying the following function to a dataframe. Since the dataframe is huge and I know that the apply family functions

Still can't use a function defined in a separate .cpp file

I've been searching through questions on this for hours, and it just isn't working for some reason, so sorry if there's already an answer and I just didn't unde