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 return a value from a mysql SELECT query in node.js

I'm still very new to Node.js, and i'm trying to understand how callbacks work. So, here is my problem : …

node.js callback node-mysql
JavaScript Callback Scope

I'm having some trouble with plain old JavaScript (no frameworks) in referencing my object in a callback function. function foo(…

javascript events binding scope callback
When should I use return false in jquery function?

I found lots of functions like this one: $(function() { $("body a").click(function() { alert(this.innerHTML); return false; }); }); What's the …

javascript jquery callback return-value
How do I 'validate' on destroy in rails

On destruction of a restful resource, I want to guarantee a few things before I allow a destroy operation to …

ruby-on-rails ruby callback
A very simple multithreading parallel URL fetching (without queue)

I spent a whole day looking for the simplest possible multithreaded URL fetcher in Python, but most scripts I found …

python multithreading callback python-multithreading urlfetch
setUserVisibleHint called before onCreateView in Fragment

I am working on ViewPager and using Fragment there I found setUserVisibleHint() called before onCreateView() in Fragment I am using …

android android-fragments callback
Using ActiveRecord, is there a way to get the old values of a record during after_update

Setup using a simple example: I've got 1 table (Totals) that holds the sum of the amount column of each record …

ruby-on-rails activerecord model callback
Why does the setInterval callback execute only once?

I have this counter I made but I want it to run forever, it's really simple, what am I doing …

javascript callback setinterval
When using callbacks inside a loop in javascript, is there any way to save a variable that's updated in the loop for use in the callback?

Let's say I have something as follows: for(var i = 0; i < length; i++){ var variable = variables[i]; otherVariable.doSomething(…

javascript callback
method called after release() exception unable to resume with android camera

While developing a camera app I've encountered an exception that only happened when I switch to other app (onPause() for …

java android exception callback camera