Questions tagged [callback]
A callback is a piece of code (i.e. the address or reference of a function or method or a lambda expression) that is passed as an argument to other code, which is expected to call back (execute) the argument at some convenient time. This tag should be used with questions about an API that uses call backs to notify the caller when an action is complete. Use the event-handling tag for questions involving subscribing to events such as in a GUI framework.
callback
18,185
questions
0
votes
0
answers
19
views
Order of nester requestAnimation frame seems incorrect
What I want to achieve is 2 loops (anim1 and anim2), while anim2 contains nested loop internalAnim2
The output of the following code should be:
anim1 - 4 times (= a1Max)
and 5 times (=a2Max) those 3 ...
0
votes
0
answers
8
views
handle3DSMethodCallback.do downloaded by Chrome during a card paynent
While making a payment in a Chrome incognito tab, I was prompted to download a file.
The file downloaded was a document named handle3DSMethodCallback.do.
I have had ongoing security issues with my ...
1
vote
0
answers
12
views
redefine pointer to function inside another function [duplicate]
How can I redefine a pointer to a function inside another function?
In this example, "ptr" must print "hola" (it doesn't work).
type OnLog=()=>void;
let ptr:OnLog = ()=>{};
...
0
votes
1
answer
33
views
Read extensions from GPX features (openlayers)
I am trying to insert GPX data on a Vector Layer and want to later read the attributes inside the tag.
This is a small extract from my GPX file:
<gpx xmlns="http://www.topografix.com/GPX/1/1&...
0
votes
1
answer
30
views
Dash Python: Layout Function combined with @Callback
page1.py
import ... .layout as layout
import dash
import pandas as pd
dash.register_page(__name__, path='/page_one') # I have an app.py which is running the app
df = pd.DataFrame({'A': [1, ...
0
votes
1
answer
30
views
Using await but the function returns right away
I have a function that I am trying to call which has below signature
public async submit(
value: string,
callbackFn: (response: string[]) => never | void
): Promise<void>
I ...
0
votes
0
answers
56
views
Unclear about callback as a promise [closed]
My boss just mopped the floor with me for being overly verbose and complicated in creating asynchronous code. The point of the code is to create a chain of sequential promises where one promise ...
1
vote
0
answers
67
views
Boost.Cobalt: how to use channels from a C API callback?
I want to use a C API in a pipeline of coroutines communicating through channels.
This is my first try with coroutines and my knowledge of them is limited.
The shape of the pipeline is:
-------- 1 ...
0
votes
2
answers
71
views
How to Pre-Bind Parameters in a Template-Based Event System in C++
I have an event system in my game engine, consisting of two main components: Event and EventCallback.
Event.h:
#ifndef _EVENT_H_
#define _EVENT_H_
#include "EventCallback.h"
#include <...
1
vote
0
answers
35
views
Google Drive watch does not invoke callback after initial sync
I need to receive a callback whenever a known folder for a user in my enterprise receives new files.
I've setup a service account and gave the domain wide permissions with the Google Drive Scope.
...
-3
votes
1
answer
49
views
Rust iterator map callback issue "function is expected to take 1 argument, but it takes 3 arguments expected function that takes 1 argument"
This "do_work" function Need to insert 3 arguments, but only first argument is working. Please view image.
I also need to insert i2 and i3 variables.
Rust map callback issue - "...
0
votes
1
answer
47
views
Typescript types: Is there a better way to write function type signature in typescript which can restrict the following runtime error?
The following code snippet passes typescript checks
function foo(callback: (bool: boolean) => string) {
callback(true);
}
type Interface1 = {
func1: () => string;
};
const testFunction ...
1
vote
0
answers
21
views
Facing session issues during Razorpay callback in CodeIgniter; redirects to login or payment page instead of success page after payment
When a parent completes the fee payment using Razorpay, the payment is processed successfully on the Razorpay side. However, after the payment, instead of redirecting the user to a success page, the ...
0
votes
0
answers
30
views
How to pass callback data to flask route function?
I wan't to pass data to a route function, when registering the callback.
def foo (bar):
print (bar)
app.add_url_rule ("/", "foo", foo)
How can I pass data directly to bar (i....
0
votes
2
answers
37
views
(Micro-) Python callback function inside class throws type error
I'm more or less new to Python and still struggling a bit with OOP (coming from C - not C++).
I want reuse and extend a rotary encoder class and just wanted to add a switch with an interrupt callback ...