Skip to main content

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.

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 ...
dvnh87's user avatar
  • 11
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 <...
mar ben's user avatar
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. ...
Eduardo Poças's user avatar
-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 - "...
Salman Amin's user avatar
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 ...
Prithiv Krishna's user avatar
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 ...
aparana mishra's user avatar
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....
Caulder's user avatar
  • 71
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 ...
Daniel's user avatar
  • 3
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 ...
coder's user avatar
  • 1
-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 <...
Mark's user avatar
  • 4,640
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 ...
user23846473's user avatar
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. ...
Ctrl Maj Sup's user avatar
-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 ...
freeze's user avatar
  • 75
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 ...
Danny's user avatar
  • 1
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 ...
limestreetlab's user avatar

15 30 50 per page
1
2 3 4 5
1213