Callback handler
@param {Function} callback
@returns {Function}
762700
function callbackHandler(callback) {
        return function(error, data) {
            if (data === 'OK') {
                callback();
                return;
            }

            callback(error, deserializeResponse(data));
        };
    }
1021134
function(callback) {
            callback = callback || function() {};
            
            var that = this;
            this.post("disable", {}, function(err, response) {
                if (err) {
                    callback(err);
                }
                else {
                    callback(null, that);
                }
            });
        }
435034
function(callback) {
        var nextHandler;
        var executionList = _list.slice(0).sort(function(a, b) {
          return Math.max(-1, Math.min(1, b.priority - a.priority));
        });

        nextHandler = function() {
          $rootScope.$evalAsync(function() {
            var handler = executionList.shift();

            // Complete
            if(!handler) {
              callback(null);

            // Next handler
            } else {
              handler.call(null, _data, function(err) {
                // Error
                if(err) {
                  callback(err);

                // Continue
                } else {
                  nextHandler();
                }
              });
            }
          });
        };

        // Start
        nextHandler();
      }
122469
function createCallback(element,callback) {

    var fn = function(originalEvent) {

      !originalEvent && ( originalEvent = window.event );

      // create a normalized event object
      var event = {
        // keep a ref to the original event object
        originalEvent: originalEvent,
        target: originalEvent.target || originalEvent.srcElement,
        type: "wheel",
        deltaMode: originalEvent.type == "MozMousePixelScroll" ? 0 : 1,
        deltaX: 0,
        delatZ: 0,
        preventDefault: function() {
          originalEvent.preventDefault ?
            originalEvent.preventDefault() :
            originalEvent.returnValue = false;
        }
      };

      // calculate deltaY (and deltaX) according to the event
      if ( support == "mousewheel" ) {
        event.deltaY = - 1/40 * originalEvent.wheelDelta;
        // Webkit also support wheelDeltaX
        originalEvent.wheelDeltaX && ( event.deltaX = - 1/40 * originalEvent.wheelDeltaX );
      } else {
        event.deltaY = originalEvent.detail;
      }

      // it's time to fire the callback
      return callback( event );

    };

    fns.push({
      element: element,
      fn: fn,
    });

    return fn;
  }
1230451
function CallbackHandler(callable) {
    CallbackHandler.super_.call(this);

    if (!_.isFunction(callable)) {
        throw new TypeError(
            'Argument  must be valid callable'
        );
    }

    this.__callable = callable;
}
167561
function(args, callInstance) {
    handlers.afterFunc({name: callInstance.name}, null, args, callInstance);
  }
829786
function(callback) {
			var original = Loader.using;
			Loader.using = this;
			try{
				callback();
			}finally{
				Loader.using = original;
			}
		}
343682
function(callback) {
			var t = this;
	
			t._interval(callback);

			t.timer = setInterval(function() {		
				t._interval(callback);
			}, this.interval);
		}
1151833
function handleCallback(err, url, callback) {
	if (callback.__called) {
		return;
	}
	callback.__called = true;
	callback(err, {
		url: url,
		title: callback.__title,
		count: callback.__redirectCounter,
		tracks: callback.__tracks
	});
}
160627
function callback_(fn, obj) {
  var args = [];
  for (var i = 2, c = arguments.length; i < c; i++) {
    args.push(arguments[i]);
  }
  return function() {
    fn.apply(obj, args);
  };
}
69010
def add_callback(self, callback, *callback_args, **callback_kwargs):
        """"""
        return self.add_callbacks(callback, callback_args=callback_args,
                           callback_kwargs=callback_kwargs)
767116
function first (callback) {
        if (typeof callback !== 'function') {
          throw new Error('Callback must be a function, instead got: ' + (typeof callback));
        }

        function firstCallback (result) {
          callback(result);
          unbind('start', firstCallback);
        }

        bind('start', firstCallback);
        bind('stop', unbind.bind(null, 'end', firstCallback));

        return self;
      }
244944
function (callback) {
            var promise = new Promise();
            this.addCallback(function () {
                try {
                    when(isFunction(callback) ? callback.apply(this, arguments) : callback).then(promise);
                } catch (e) {
                    promise.errback(e);
                }
            });

            this.addErrback(function () {
                try {
                    when(isFunction(callback) ? callback.apply(this, arguments) : callback).then(promise);
                } catch (e) {
                    promise.errback(e);
                }
            });
            return promise.promise();
        }
161271
function handler(instance, context, func, index, callback) {
	return function() {
		var old = instance.results[index];
		instance.results[index] = tryExpr(func, context);
		if (old === instance.results[index])
			return;
		if (instance.dependenciesCount === 1 || !Interpolable.allowDelayedUpdate)
			callback(instance.output(context), 'set');
		else if (!instance.willFire)
			instance.willFire = context.delay(function() { // call on nextTick to manage other dependencies update without multiple rerender
				if (instance.willFire) {
					instance.willFire = null;
					callback(instance.output(context), 'set');
				}
			}, 0);
	};
}
1122530
function wrapCallback(callback)
{
  var stream = this;

  var wrapped = function(error, result)
  {
    return finisher.call(stream, error, result, callback);
  };

  return wrapped;
}
218922
function _callHandler(handler) {
        try {
            // TODO (issue 1034): We *could* use a $.Deferred for this, except deferred objects enter a broken
            // state if any resolution callback throws an exception. Since third parties (e.g. extensions) may
            // add callbacks to this, we need to be robust to exceptions
            handler();
        } catch (e) {
            console.error("Exception when calling a 'brackets done loading' handler: " + e);
            console.log(e.stack);
        }
    }
15300
function (callback) {
            if (_.isFunction(rep.entity.toHal)) {
                rep.entity.toHal(rep, wrap(callback));
            } else {
                callback(null, rep);
            }
        }