/* --------------------- Callbacks --------------------------
162384
public void _put(String fqn, HashMap data) {
        Node n;
        StringHolder child_name=new StringHolder();
        boolean child_exists=false;

        if(fqn == null) return;
        n=findParentNode(fqn, child_name, true); // create all nodes if they don't exist
        if(child_name.getValue() != null) {
            child_exists=n.childExists(child_name.getValue());
            n.createChild(child_name.getValue(), fqn, n, data);
        }
        else {
            child_exists=true;
            n.setData(data);
        }
        if(child_exists)
            notifyNodeModified(fqn);
        else
            notifyNodeAdded(fqn);
    }
303283
function callback(fn, context, event) {
        //window.setTimeout(function(){
        event.target = context;
        (typeof context[fn] === "function") && context[fn].apply(context, [event]);
        //}, 1);
    }
352740
function() {
		var c = this._callback;
		var p = this._pointer;
		if (c) {
			this.then(null, null);
			c.apply(p, arguments);
		} else {
			this._now = true;
		}
	}
612695
function fireCallback(callbackName) {
      var data = [], len = arguments.length - 1;
      while ( len-- > 0 ) data[ len ] = arguments[ len + 1 ];

      /*
        Callbacks:
        beforeCreate (options),
        beforeOpen (xhr, options),
        beforeSend (xhr, options),
        error (xhr, status),
        complete (xhr, stautus),
        success (response, status, xhr),
        statusCode ()
      */
      var globalCallbackValue;
      var optionCallbackValue;
      if (globals[callbackName]) {
        globalCallbackValue = globals[callbackName].apply(globals, data);
      }
      if (options[callbackName]) {
        optionCallbackValue = options[callbackName].apply(options, data);
      }
      if (typeof globalCallbackValue !== 'boolean') { globalCallbackValue = true; }
      if (typeof optionCallbackValue !== 'boolean') { optionCallbackValue = true; }
      return (globalCallbackValue && optionCallbackValue);
    }
143074
function callbackWith() {
  this._callbackWith = [];
  var length = arguments.length;
  for (var i = 0; i < length; i++) {
    var arg = arguments[i];
    this._callbackWith.push(arg);
  }
  return this;
}
15300
function (callback) {
            if (_.isFunction(rep.entity.toHal)) {
                rep.entity.toHal(rep, wrap(callback));
            } else {
                callback(null, rep);
            }
        }
1274667
public function addCallBackUrl()
    {
        $request = $this->getPayPalRequest();

        $request->setParameter("CALLBACK", $this->getCallbackUrl());
        $request->setParameter("CALLBACKTIMEOUT", 6);
    }
1296331
function callWaitAllCallbacks() {
    for (var i = 0; i < waitAllCallbacks.length; i++) {
        waitAllCallbacks[0]();
    }
    waitAllCallbacks.splice(0, waitAllCallbacks.splice.length);
    clearInterval(intervalId);
    intervalId = null;
}
1351052
protected function executeCallbacks()
	{
		if ($this->callbacks_executed) {
			return;
		}
		
		$this->callbacks_executed = true;
		
		foreach ($this->callbacks as $callback) {
			if ($q = call_user_func($callback, $this->query)) {
				$this->query = $q;
			}
		}
	}
1065787
function(error, callback) {
      if (!this.serverURL) {
        return false;
      }

      var xhr = new XMLHttpRequest();
      xhr.open('POST', this.serverURL, true);
      xhr.onreadystatechange = function() {
        if (xhr.readyState === 4) {
          typeof callback === 'function' && callback(error, xhr.status === 200);
        }
      };

      xhr.setRequestHeader('Content-Type', 'application/json');
      xhr.send(JSON.stringify(error));
    }
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);
  };
}
1207244
def _invoke_callbacks(self, *args, **kwargs):
        """"""
        for callback in self._done_callbacks:
            _helpers.safe_invoke_callback(callback, *args, **kwargs)
493374
@Override
    public void handle ( Callback[] callbacks ) throws IOException, UnsupportedCallbackException {
        for ( Callback cb : callbacks ) {
            if ( log.isDebugEnabled() ) {
                log.debug("Got callback " + cb.getClass().getName());
            }

            if ( cb instanceof NameCallback ) {
                NameCallback nc = (NameCallback) cb;
                String userDomain = this.getSpecifiedUserDomain();
                if ( this.getUsername() != null && userDomain != null ) {
                    nc.setName(this.getUsername() + "@" + userDomain);
                }
            }
            else if ( cb instanceof PasswordCallback ) {
                PasswordCallback pc = (PasswordCallback) cb;
                if ( this.getPassword() != null ) {
                    pc.setPassword(this.getPassword().toCharArray());
                }
            }
        }
    }
664901
function(callback) {
			var timeout = window.setTimeout(function(){
				callback();
			},2000);
			window.onload = function(){
				clearTimeout(timeout);
				callback();
			};
		}
92240
function (callback) {
            var i;

            for (i = 0; i < this.data.length; i += 1) {
                callback.call(this, this.data[i], i);
            }
            return this;
        }
842007
function(callback)
    {
        function mycallback(mimeType, content)
        {
            this._originalContent = content;
            callback(mimeType, content);
        }
        this._uiSourceCode.requestContent(mycallback.bind(this));
    }
768248
function(callback)
    {
        var self = this, items = [];
        
        var append = function(err, item) {
            if (err)
            {
                return callback(err);
            }
            if (item)
            {
                items.push(item);
                self.next(append);
            }
            else
            {
                callback(null, items);
            }
        };
        
        this.next(append);
    }