Creates an Event that is set when the bundle with elts is sent.
183268
def _event_for(self, elts):
        """"""
        event = Event()
        event.canceller = self._canceller_for(elts, event)
        return event
998296
public void onCreate(Bundle savedInstanceState) {
        Session session = Session.getActiveSession();
        if (session == null) {
            if (savedInstanceState != null) {
                session = Session.restoreSession(activity, null, callback, savedInstanceState);
            }
            if (session == null) {
                session = new Session(activity);
            }
            Session.setActiveSession(session);
        }
        if (savedInstanceState != null) {
            pendingFacebookDialogCall = savedInstanceState.getParcelable(DIALOG_CALL_BUNDLE_SAVE_KEY);
        }
    }
7164
def add_event(options)
      self.events ||= []
      event = EventAssertion.new
      event.add_value(options)
      self.events << event
    end
1153818
function Event(type, data, bubbles) {
            if (data === void 0) { data = null; }
            if (bubbles === void 0) { bubbles = false; }
            this._type = type;
            this._bubbles = bubbles;
            this.data = data;
        }
615321
function(el, eventName, data)
    {
        var ev;

        if (document.createEvent) {
            ev = document.createEvent('HTMLEvents');
            ev.initEvent(eventName, true, false);
            ev = extend(ev, data);
            el.dispatchEvent(ev);
        } else if (document.createEventObject) {
            ev = document.createEventObject();
            ev = extend(ev, data);
            el.fireEvent('on' + eventName, ev);
        }
    }
595854
protected void sendEvent(T event, Object receiver, CreationalContext<?> creationalContext) {
        try {
            preNotify(event, receiver);
            // As we are working with the contextual instance, we may not have the
            // actual object, but a container proxy (e.g. EJB)
            notificationStrategy.invoke(receiver, observerMethod, event, beanManager, creationalContext);
        } finally {
            postNotify(event, receiver);
        }
    }
708941
def hoist_event(self, e):
        
        if e.response_type == 0:
            return self._process_error(ffi.cast("xcb_generic_error_t *", e))

        # We mask off the high bit here because events sent with SendEvent have
        # this bit set. We don't actually care where the event came from, so we
        # just throw this away. Maybe we could expose this, if anyone actually
        # cares about it.
        event = self._event_offsets[e.response_type & 0x7f]

        buf = CffiUnpacker(e)
        return event(buf)
1222418
protected void processBundle(Bundle bundle) {
        Properties props = readMessageRouterProps(bundle);

        if (props != null) {
            msgRouter.modified(props);
        }
    }
1008594
function Event(type, data){
    this._sender = null;
    this._type   = type;
    this._data   = data;

    for(var prop in data) {
        this[prop] = data[prop];
    }

    this._stopPropagation = false;
}
991921
function setHitEvents(on, entity, hitComponent) {
  if (on === true) {
    entity.checkHits(hitComponent);
  }
  else {
    entity.ignoreHits(hitComponent);
  }
}
338356
@SuppressWarnings("unchecked")
	@Override
	public void publishEvent(ApplicationEvent event) {

		if (event instanceof MappingContextEvent) {
			this.schmeaCreator
					.onApplicationEvent((MappingContextEvent<SolrPersistentEntity<?>, SolrPersistentProperty>) event);
		}
	}
361780
function emitGlobalEvent(resolver) {
        var type = resolver.status === STATUS.FULFILLED
                    ? 'resolve'
                    : 'reject';

        if (globalEvent) {
            Resolver.emit(type, resolver.data);
        }
    }
44593
function(evt) {
			var type = evt.type;
			this._dispatchEvent("pre" + type, evt); //$NON-NLS-0$
			this._dispatchEvent(type, evt);
			this._dispatchEvent("post" + type, evt); //$NON-NLS-0$
		}
1074994
def focusOutEvent(self, event):
        
        if not self.signalsBlocked():
            self.focusChanged.emit(False)
            self.focusExited.emit()
        
        return super(XTextEdit, self).focusOutEvent(event)
1221521
private Event createEvent(String obs) {
        int lastSpace = obs.lastIndexOf(StringUtils.SPACE);
        Event event = null;

        if (lastSpace != -1) {
            String label = obs.substring(lastSpace + 1);
            String[] contexts = obs.substring(0, lastSpace).split("\\s+");
            // Split name and value
            float[] values = RealValueFileEventStream.parseContexts(contexts);
            // Label, feature name, feature value
            event = new Event(label, contexts, values);
        }

        return event;
    }
467330
def _canceller_for(self, elts, event):
        
        def canceller():
            """Cancels submission of ``elts`` as part of this bundle.

            Returns:
               bool: ``False`` if any of elements had already been sent,
               otherwise ``True``.
            """
            try:
                self._event_deque.remove(event)
                self._in_deque.remove(elts)
                return True
            except ValueError:
                return False

        return canceller
978413
def _make_event(self, event_type, code, value):
        """"""
        secs, msecs = convert_timeval(time.time())
        data = struct.pack(EVENT_FORMAT,
                           secs,
                           msecs,
                           event_type,
                           code,
                           value)
        self._write_device.write(data)
        self._write_device.flush()