Top "Callback" questions

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.

How to add delay to promise inside then

fetch() { return axios.get('/rest/foo') //.then(response => {throw new Error(response)}) // Uncomment to test network error //.then( &…

javascript asynchronous callback promise
Should I use std::function or a function pointer in C++?

When implementing a callback function in C++, should I still use the C-style function pointer: void (*callbackFunc)(int); Or should …

c++ function c++11 callback std
Python, how to pass an argument to a function pointer parameter?

I only just started learning Python and found out that I can pass a function as the parameter of another …

python callback function-pointers
Objective-C callback handler

I have a callback method that I got to work, but I want to know how to pass values to …

objective-c ios methods callback objective-c-blocks
JavaScript style for optional callbacks

I have some functions which occasionally (not always) will receive a callback and run it. Is checking if the callback …

javascript coding-style callback
Using a C++ class member function as a C callback function

I have a C library that needs a callback function to be registered to customize some processing. Type of the …

c++ c interop callback
Run a callback only if an attribute has changed in Rails

I have the following association in my app: # Page belongs_to :status I want to run a callback anytime the …

ruby-on-rails callback
Using ResultReceiver in Android

Fundamentally, I would like to establish a callback to an Activity from an IntentService. My question is very similar to …

android service callback android-activity
What is the difference between Page.IsPostBack and Page.IsCallBack?

I've recently ran into some code that checks Page.IsCallBack but I wasn't sure how it is different from Page.…

asp.net postback callback page-lifecycle
How to implement a "callback" in Ruby?

I'm not sure of the best idiom for C style call-backs in Ruby - or if there is something even …

ruby callback