Notification callback function.
327157
function onLuxometerChanged(event)
{
	var characteristic = event.target
	var lux = calculateLux(characteristic.value)
	showMessage('Luxometer value: ' + lux)
}
494429
function notifyRetroactively(object) {
  if (object && typeof object === 'object') {
    const type = 'add';
    var notifier = Object.getNotifier(object);
    keys(object).forEach(name => notifier.notify({type, name, object}));
  }
  return object;
}
337443
def alert(self, msg):
        """"""
        if self.event_callback is not None:
            try:
                self.event_callback(msg)
            except Exception as exception:  # pylint: disable=broad-except
                _LOGGER.exception(exception)

        if self.persistence:
            self.persistence.need_save = True
912117
function (notification) {
      if (!notification.id) {
        return false;
      }

      return _.some(notifications, function(next) {
        return !next.hidden && notification.id === next.id;
      });
    }
329031
void notifyListener() {
        Node<K, V> node;
        while ((node = pendingNotifications.poll()) != null) {
            listener.onEviction(node.key, node.getValue());
        }
    }
377973
def print_callback(msg):
    """"""
    json.dump(msg, stdout)
    stdout.write('\n')
    stdout.flush()
36658
def notify(cls, user_or_email, instance):
        """"""
        return super(InstanceEvent, cls).notify(user_or_email,
                                                object_id=instance.pk)
252683
def event_handler(self):
        """"""

        if not self._notify_queue:
            LOG.error('event_handler: no notification queue for %s',
                      self._service_name)
            return

        LOG.debug('calling event handler for %s', self)
        self.start()
        self.wait()
1155363
def listen(cls, event, func):
        """"""
        signal(event).connect(func, sender=cls)
214121
def notify_all(self):
        """"""
        self.condition.acquire()
        # python 3.x
        try:
            self.condition.notify_all()
        except:
            self.condition.notifyAll()
        self.condition.release()
798981
def msg_callback(self, callback):
        """"""
        if callable(callback):
            self._msg_callback = callback
        else:
            self._msg_callback = None
1057017
def notify(request, info):
    '''
    '''
    t = time()
    actor = request.actor
    remote_actor = request.caller
    if isinstance(remote_actor, ActorProxyMonitor):
        remote_actor.mailbox = request.connection
        info['last_notified'] = t
        remote_actor.info = info
        callback = remote_actor.callback
        # if a callback is still available, this is the first
        # time we got notified
        if callback:
            remote_actor.callback = None
            callback.set_result(remote_actor)
            if actor.cfg.debug:
                actor.logger.debug('Got first notification from %s',
                                   remote_actor)
        elif actor.cfg.debug:
            actor.logger.debug('Got notification from %s', remote_actor)
    else:
        actor.logger.warning('notify got a bad actor')
    return t
196898
def notify(self, data):
        """"""
        triggered_channels = []
        for channel_name, items in data.items():
            for item in items or []:
                LOG.debug('notify received: %s', item)
                try:
                    # some channels return strings rather than objects (e.g. de-registrations),
                    # normalize them here
                    item = {'value': item} if isinstance(item, six.string_types) else dict(item)
                    # inject the channel name to the data (so channels can filter on it)
                    item['channel'] = channel_name
                    triggered_channels.extend(list(self._notify_single_item(item)))
                except Exception:  # noqa
                    LOG.exception('Subscription notification failed')
        return triggered_channels
698605
function Notification(options) {
  ui.Emitter.call(this);
  options = options || {};
  this.template = html;
  this.el = $(this.template);
  this.render(options);
  if (Notification.effect) this.effect(Notification.effect);
}
765075
def notify(self, data):
        """"""
        LOG.debug('notify received: %s', data)
        self._notify_count += 1
        if self._cancelled:
            LOG.debug('notify skipping due to `cancelled`')
            return self
        if self._once_done and self._once:
            LOG.debug('notify skipping due to `once`')
            return self
        with self._lock:
            try:
                # notify next consumer immediately
                self._waitables.get_nowait().put_nowait(data)
                LOG.debug('found a consumer, notifying')
            except queue.Empty:
                # store the notification
                try:
                    self._notifications.put_nowait(data)
                    LOG.debug('no consumers, queueing data')
                except queue.Full:
                    LOG.warning('notification queue full - discarding new data')

        # callbacks are sent straight away
        # bombproofing should be handled by individual callbacks
        for callback in self._callbacks:
            LOG.debug('callback: %s', callback)
            callback(data)
        self._once_done = True
        return self
413396
def notify(self, msg, color='green', notify='true', message_format='text'):
        """"""
        self.message_dict = {
            'message': msg,
            'color': color,
            'notify': notify,
            'message_format': message_format,
        }
        if not self.debug:
            return requests.post(
                self.notification_url,
                json.dumps(self.message_dict),
                headers=self.headers
            )
        else:
            print('HipChat message: <{}>'.format(msg))
            return []
208731
def handleNotification(self, req):
        """"""
        name = req["method"]
        params = req["params"]
        try: #to get a callable obj 
            obj = getMethodByName(self.service, name)
            rslt = obj(*params)
        except:
            pass