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,183
questions
1
vote
0
answers
33
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
44
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 <...
0
votes
0
answers
29
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
46
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
17
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 ...
0
votes
0
answers
35
views
How failure(job) callback work in DelayedJob?
How does failure(job) callback work in DelayedJob?
I want that in my delayed job max_attempts is 5 and after 5 attempts, the job is failed then call failure(job) callback—in rails 6 or greater.
class ...
-1
votes
1
answer
60
views
FreeRTOS callback is not called
I'm writing some code for ESP32-S3 with ESP-IDF that uses FreeRTOS.
I create a simple task to read data from stdin and I want to invoke a callback after a reading.
Here's my code:
main.c
#include <...
0
votes
0
answers
25
views
Trouble separating instances of bokeh server embedded in flask app
I'm relatively new to using both bokeh and flask and am having some issues with data being shared between instances of my app.
I have removed a lot of my code so that I can include it below:
import ...
0
votes
1
answer
26
views
Redmine (RoR)- Accessing IssueRelation during issue destruction
My goal is to propagate the deletion of an issue to change a custom field of the linked issue. So, I intercept the destruction of an issue.
I'm encountering a problem in my redmine plugin. ...
-1
votes
1
answer
123
views
Stroustrup's Programming Principles and Practice 3rd edition graphics: why passing a callback function to Window::timer_wait gets unexpected results?
Section 14.6 (Simple animation) in Stroustrup's "Programming Principles and Practice using C++" third edition uses his PPP graphics library, which in turn makes use of QT. I am trying to ...
0
votes
1
answer
28
views
RowCallBack function for Jquery datatable coloring text and background with ajax returned value from mysql
Need some light on this issue in the attached screenshot. If I entered fixed color value (ie #ffffff for both font and row background) it worked nicely.
However, I want to use the value returned from ...
0
votes
2
answers
67
views
How can a Callable return a value from a predefined void callback?
I am using a data-related API interface which has a key void callback function that is automatically invoked to mark the end of some IO operations. I want to make the class Callable<String> and ...