Questions tagged [dynamic-function]

75 questions
1
vote
1 answer

Dynamic function calls at runtime (va_list)

There is a way in C to obtain a dynamic length argument list with va_list, as described here: http://www.cprogramming.com/tutorial/c/lesson17.html That quite simple, but most times in C++ not needed. I am currently building a top level wrapper class…
1
vote
2 answers

Python dynamically created custom named functions

Possible Duplicate: Python dynamic function creation with custom names I have written a little script to determine whether what I wanted to do is possible. It is. My goal is to dynamically (at runtime) create functions (or methods) which have…
mahdiolfat
  • 821
  • 1
  • 9
  • 12
1
vote
1 answer

How to change dynamically the js code?

How to replace a JS function's code at runtime? (the same functionality as C++ function pointers) I have tried eval(), but when one of the parameters contains a byte value like 13 or 10 it throws an error. I understand from this that eval is…
root
  • 25
  • 4
0
votes
1 answer

How to Dynamically define and call a function in python where function names can be variable

I have a problem which I simplified as follows: def func_1(): # Define first function a = 1 return a print(func_1()) # Call first function def func_2(): # Define second function a = 2 return a print(func_2()) # Call second function . . .…
Buna
  • 45
  • 4
0
votes
0 answers

Javascript (Vue + Vite) calling Non-Global dynamic function name

I am building a project that passes in a JSON object to config and display my popup modal, and in the config object, I also pass in the the function name that once the button in the modal is clicked, that function should be called. However, I…
Jacky.S
  • 364
  • 5
  • 17
0
votes
3 answers

run functions in paralel Python

I have a stream and i have a function I want to run, when i receive the message on this stream async def some_func(): asyncio.sleep(5) print("hello world") client = create_client('wax.dfuse.eosnation.io:9000') stream =…
0
votes
2 answers

Chrome Extension: Content Script -> Dynamic Function

I would like to call a dynamic function on a Content Script (Chrome Extension). But the common way doesn't work: chrome.extension.onRequest.addListener(function cs_listener(request, sender, sendResponse) { [request.action](); } request.action…
CYB
  • 421
  • 1
  • 4
  • 12
0
votes
0 answers

Count search dynamic region

I'd like to insert a count search function into a cell and make it dynamic using VBA. In the cell G2 I want to insert the following formula: =COUNT(SEARCH(($F$2:$F$3;B2))=0 so that it returns a true or false value. As the Table in cell A1 and the…
Bikat Uprety
  • 139
  • 8
0
votes
2 answers

How to evaluate a full function string (including params) in javascript

I have a select (dropdown list) with options which correspond to actions. Each action corresponds to a generic javascript function that should be called on the changed event for the select. So it looks like this: