callback after retrieving changed stooge
506611
function storeChangedShempToCurly(model, error) {
          if (typeof error != 'undefined') {
            callback(error);
            return;
          }
          self.shouldBeTrue(model.get('name') == 'Curly','Curly');
          // Now test delete
          self.deletedModelId = model.get('id'); // Remember this
          spec.integrationStore.deleteModel(model, stoogeDeleted);
        }
623782
function stoogeStored(model, error) {
        if (typeof error != 'undefined') {
          callback(error);
          return;
        }
        try {
          self.stoogeIDsStored.push(model.get('id'));
          //console.log('Now we have moe ' + self.moe.get('id'));
          //console.log('model says ' + model.get('id'));
          if (self.stoogeIDsStored.length == 3) {
            // Now that first 3 stooges are stored lets retrieve and verify
            var actors = [];
            for (var i = 0; i < 3; i++) {
              actors.push(new self.Stooge());
              actors[i].set('id', self.stoogeIDsStored[i]);
              spec.integrationStore.getModel(actors[i], stoogeRetrieved);
            }
          }
        }
        catch (err) {
          callback(err);
        }
      }
579783
function (since, callback) {
      if (opts.aborted) {
        return;
      }
      params.since = since;
      // "since" can be any kind of json object in Coudant/CouchDB 2.x
      /* istanbul ignore next */
      if (typeof params.since === "object") {
        params.since = JSON.stringify(params.since);
      }

      if (opts.descending) {
        if (limit) {
          params.limit = leftToFetch;
        }
      } else {
        params.limit = (!limit || leftToFetch > batchSize) ?
          batchSize : leftToFetch;
      }

      // Set the options for the ajax call
      var xhrOpts = {
        method: method,
        url: genDBUrl(host, '_changes' + paramsToStr(params)),
        timeout: opts.timeout,
        body: body
      };
      lastFetchedSeq = since;

      /* istanbul ignore if */
      if (opts.aborted) {
        return;
      }

      // Get the changes
      setup().then(function () {
        xhr = ajax(opts, xhrOpts, callback);
      }).catch(callback);
    }
1170062
private void fireOnRecoverBasic(ChannelEvent e) {
        List<EventListener> listeners = changes.getListenerList(AMQP);
        for (EventListener listener : listeners) {
            ChannelListener amqpListener = (ChannelListener)listener;
            amqpListener.onRecoverBasic(e);
        }
    }
918752
function recomputeCallback(){
  var len = TO_CALL.length;
  CALL_TIMEOUT = null;
  while(len--){
    (TO_CALL.shift() || NOOP).call();
  }

  TO_CALL.added = {};
}
1192059
def refresh(self):
        """"""
        d = self.request('get', self.instance_url())
        return d.addCallback(self.refresh_from).addCallback(lambda _: self)
1135770
def _after_event(self, e):
        '''
            
        '''
        ''' my patch, serialize to redis '''
        self.r.set(self.rhname, self.current)
        for fnname in ['onafter' + e.event, 'on' + e.event]:
            if hasattr(self, fnname):
                return getattr(self, fnname)(e)
1132212
def after_model_change(self, form, User, is_created):
        """"""
        if is_created and form.notification.data is True:
            send_reset_password_instructions(User)
797190
function(attr, how, newVal, oldVal) {
                    can.batch.trigger(this, "change", can.makeArray(arguments));
                }
969430
def change(self, event):
        """"""

        try:
            data, schema, user, client = self._get_args(event)
        except AttributeError:
            return

        try:
            uuid = data['uuid']
            change = data['change']
            field = change['field']
            new_data = change['value']
        except KeyError as e:
            self.log("Update request with missing arguments!", data, e,
                     lvl=critical)
            self._cancel_by_error(event, 'missing_args')
            return

        storage_object = None

        try:
            storage_object = objectmodels[schema].find_one({'uuid': uuid})
        except Exception as e:
            self.log('Change for unknown object requested:', schema, data, lvl=warn)

        if storage_object is None:
            self._cancel_by_error(event, 'not_found')
            return

        if not self._check_permissions(user, 'write', storage_object):
            self._cancel_by_permission(schema, data, event)
            return

        self.log("Changing object:", storage_object._fields, lvl=debug)
        storage_object._fields[field] = new_data

        self.log("Storing object:", storage_object._fields, lvl=debug)
        try:
            storage_object.validate()
        except ValidationError:
            self.log("Validation of changed object failed!",
                     storage_object, lvl=warn)
            self._cancel_by_error(event, 'invalid_object')
            return

        storage_object.save()

        self.log("Object stored.")

        result = {
            'component': 'hfos.events.objectmanager',
            'action': 'change',
            'data': {
                'schema': schema,
                'uuid': uuid
            }
        }

        self._respond(None, result, event)
845892
def on_change(self, attr, *callbacks):
        ''' 

        '''
        if len(callbacks) == 0:
            raise ValueError("on_change takes an attribute name and one or more callbacks, got only one parameter")

        _callbacks = self._callbacks.setdefault(attr, [])
        for callback in callbacks:

            if callback in _callbacks:
                continue

            _check_callback(callback, ('attr', 'old', 'new'))

            _callbacks.append(callback)
735011
def _on_wid_changed(self, wid):
        """"""
        if self._itsme: return
        self.update_model(self._get_idx_from_widget(wid))
        return
53457
function callbackOnce(err, arg) {
            var cb = callback;
            callback = null;
            if (cb) { cb(err, arg); }
        }
375466
def _after_handler(self, iid, callback, args):
        """"""
        self._after_id = None
        self.update_state(iid, "normal")
        self.call_callbacks(iid, callback, args)
138574
def after(self, time, function, args = []):
        """"""
        callback_id = self.tk.after(time, self._call_wrapper, time, function, *args)
        self._callback[function] = [callback_id, False]
699428
function(c) {
    if (c) {
      if (c.error) {
        ee.emit('error', new error.BackupError('InvalidChange', `Received invalid change: ${c}`));
      } else if (c.changes) {
        var obj = { id: c.id };
        buffer.push(obj);
        processBuffer(false);
      } else if (c.last_seq) {
        lastSeq = c.last_seq;
      }
    }
  }
690866
function handleUpdatedConfigItems(_a) {
    var fileInitialState = _a.fileInitialState, memoryInitialState = _a.memoryInitialState;
    var updatedItems = fileInitialState.filter(function (fileItem) {
        var foundBsItem = memoryInitialState.find(function (bsItem) { return fileItem.key === bsItem.key; });
        if (!foundBsItem) {
            return false;
        }
        else {
            return fileItem.value !== foundBsItem.value;
        }
    });
    if (updatedItems.length > 0) {
        console.log('UPDATED CONFIG: ', updatedItems);
    }
    updatedItems.forEach(function (updatedItem) {
        saveItemToBrowserStorage(updatedItem);
    });
}