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…

Sebastian Büttner
- 351
- 3
- 13
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 =…

Александр Третинов
- 15
- 6
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:
0
votes
1 answer
Dynamic jQuery UI dialog callback function problems
I am having issues using the jQuery UI dialog modal, and trying to pass in a dynamic name/value to be used as the callback function to execute (as well as arguments)
I have a function that calls the UI dialog.... as accepts a list of arguments, one…

whispers
- 962
- 1
- 22
- 48
0
votes
1 answer
Launch JavaScript function from HTML div where function name is generated dynamically ASP.NET
I generate javascript function name dynamically like this:
And later I need to launch this function from html, but nothing happens:

positive perspective
- 165
- 1
- 3
- 13
0
votes
1 answer
DJI SDK implement Helper.install() in android dynamic function
I want to implement DJI functions in a dynamic model(), but to do that it needs cal function Helper.install() in Application class while base model do not know anything about DJI SDK.
There are anyways to go around this?

Trung Lehuynh
- 1
- 2
0
votes
2 answers
How to write a dynamic function for my angular application
I have a problem to write this code dynamically.
How can I write testtest function dynamically, if in the future data could have different keys and values?
my json object looks just like this:
data = [
{
name: 'John',
id: 1,
…

user1938143
- 1,022
- 2
- 22
- 46
0
votes
0 answers
Python create function with parameter names based on other function arguments
In python 3.x is there any way to create a dynamic fuction (inner) with parameter names that are based on arguments passed to the other function (outer). Something like this:
def outer(x = {'alpha': 1, 'lambda_': 2}):
# do something to receive…

MarkSt
- 1
0
votes
1 answer
how to bind dynamic function on HTML element using angular 6?
I am trying to bind the event on the dynamically created element. I am quite successful but I am not able to bind the function to the event. here is my code
.ts code
data = ['fn1()', 'fn2()', 'fn3()'];
fn1() { alert(1) }
fn2() { alert(2) }
…

Lijin Durairaj
- 4,910
- 15
- 52
- 85