Events successful process by tracker adapter
13700
function EventAisData (aismsg, aisnmea){
        adapter.Debug (9, "devid=%s aistype=%d nmea=%s", aismsg.mmsi, aismsg.aistype, aisnmea);
        adapter.BroadcastAisData (aismsg, aisnmea);
    }
1089572
public void trackEvent(String argCategory, String argAction, String argLabel) {
        trackEvent(argCategory, argAction, argLabel, null);
    }
566182
function executeDispatch(event, listener, inst) {
  var type = event.type || 'unknown-event';
  event.currentTarget = getNodeFromInstance(inst);
  invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
  event.currentTarget = null;
}
471281
def event_tracker(func):
    
    @wraps(func)
    async def wrapper(*args, **kwargs):
        """
        Wraps function to provide redis
        tracking
        """
        event = Event(args[0])
        session = kwargs['session']
        service_name = session.name
        await track_event(event, EventState.started, service_name)
        await func(*args, **kwargs)
        await track_event(event, EventState.completed, service_name)
    return wrapper
548853
protected void processStop(Endpoint endpoint, EventTypeEnum eventType) {
        if (!sendLifecycleEvent) {
            return;
        }

        Event event = createEvent(endpoint, eventType);
        monitoringServiceClient.putEvents(Collections.singletonList(event));
        if (LOG.isLoggable(Level.INFO)) {
            LOG.info("Send " + eventType + " event to SAM Server successful!");
        }
    }
77939
function(e, data) {
		mfp.ev.triggerHandler(NS + e, data);

		if(mfp.st.callbacks) {
			// converts "mfpEventName" to "eventName" callback and triggers it if it's present
			e = e.charAt(0).toLowerCase() + e.slice(1);
			if(mfp.st.callbacks[e]) {
				mfp.st.callbacks[e].apply(mfp, $.isArray(data) ? data : [data]);
			}
		}
	}
1357955
function eventHandler(trackedElements = {}, options = { tolerance: 0 }) {
    const selectors = Object.keys(trackedElements);
    let testVisibility;

    if (!selectors.length) return;

    if (options.container === window) {
        testVisibility = inViewport;
    } else {
        testVisibility = inContainer;
    }

    selectors.forEach((selector) => {
        trackedElements[selector].nodes.forEach((item) => {
            if (testVisibility(item.node, options)) {
                item.wasVisible = item.isVisible;
                item.isVisible = true;
            } else {
                item.wasVisible = item.isVisible;
                item.isVisible = false;
            }
            if (item.isVisible === true && item.wasVisible === false) {
                if (!trackedElements[selector].enter) return;

                Object.keys(trackedElements[selector].enter).forEach((callback) => {
                    if (typeof trackedElements[selector].enter[callback] === 'function') {
                        trackedElements[selector].enter[callback](item.node, 'enter');
                    }
                });
            }
            if (item.isVisible === false && item.wasVisible === true) {
                if (!trackedElements[selector].leave) return;

                Object.keys(trackedElements[selector].leave).forEach((callback) => {
                    if (typeof trackedElements[selector].leave[callback] === 'function') {
                        trackedElements[selector].leave[callback](item.node, 'leave');
                    }
                });
            }
        });
    });
}
197538
protected void processEvent (DEvent event)
    {
        // look up the target object
        DObject target = _objects.get(event.getTargetOid());
        if (target == null) {
            log.debug("Event target no longer exists", "event", event);
            return;
        }

        // check the event's permissions
        if (!target.checkPermissions(event)) {
            log.warning("Event failed permissions check", "event", event, "target", target);
            return;
        }

        if (dispatchEvent(event, target)) {
            // unless requested not to, notify any proxies
            target.notifyProxies(event);
        }
    }
78627
private void handleInheritedEvent(ProcessExecutor engine, ProcessInstance processInstVO,
            Process processVO, InternalEvent messageDoc, Integer eventType)
      throws ProcessException {
        try {
            if (logger.isInfoEnabled()) {
                if (messageDoc.isProcess())  // Process SLA (Delay handler)
                    logger.info(logtag(processVO.getId(), processInstVO.getId(), processInstVO.getMasterRequestId()), "Inherited Event - type="
                            + eventType + ", compcode=" + messageDoc.getCompletionCode());
                else
                    logger.info(logtag(processVO.getId(), processInstVO.getId(),
                            messageDoc.getWorkId(), messageDoc.getWorkInstanceId()), "Inherited Event - type="
                            + eventType + ", compcode=" + messageDoc.getCompletionCode());
            }
            engine.notifyMonitors(processInstVO, WorkStatus.LOGMSG_PROC_ERROR);
            String compCode = messageDoc.getCompletionCode();
            ProcessInstance originatingInstance = processInstVO;
            Process embeddedHandlerProc = processVO.findSubprocess(eventType, compCode);
            while (embeddedHandlerProc == null && processInstVO.getOwner().equals(OwnerType.PROCESS_INSTANCE)) {
                processInstVO = engine.getProcessInstance(processInstVO.getOwnerId());
                processVO = getProcessDefinition(processInstVO);
                embeddedHandlerProc = processVO.findSubprocess(eventType, compCode);
            }

            if (embeddedHandlerProc != null) {
                if (isRecursiveCall(originatingInstance, processVO, embeddedHandlerProc.getId())) {
                    logger.warn("Invoking embedded process recursively - not allowed: " + embeddedHandlerProc.getName());
                }
                else {
                    Long secondaryOwnerId = null;
                    String secondaryOwnerType = null;
                    if (!eventType.equals(EventType.ABORT)) {
                        Long secondOwnerId = messageDoc.getWorkInstanceId();
                        if (secondOwnerId != null && secondOwnerId > 0) {
                            if (!messageDoc.isProcess()) {
                                secondaryOwnerId = secondOwnerId;
                                secondaryOwnerType = OwnerType.ACTIVITY_INSTANCE;
                            }
                            // Update the Process Variable "exception" with the exception handler's triggering Activity exception
                            if (processVO.getVariable("exception") != null &&
                                    messageDoc.getSecondaryOwnerId() != null && messageDoc.getSecondaryOwnerId() > 0) {
                                VariableInstance exceptionVar = processInstVO.getVariable("exception");
                                if (exceptionVar == null)
                                    engine.createVariableInstance(processInstVO, "exception", new DocumentReference(messageDoc.getSecondaryOwnerId()));
                                else
                                    engine.updateVariableInstance(exceptionVar);
                            }
                        }
                        else {
                            if (eventType.equals(EventType.ERROR)) {
                                logger.warn("Creating fallout embedded process without activity instance as secondary owner");
                                logger.warn("--- completion code " + messageDoc.getCompletionCode());
                                logger.warn("--- trans inst ID " + messageDoc.getTransitionInstanceId());
                                logger.warn("--- work ID " + messageDoc.getWorkId());
                                String[] stack = this.getStackTrace();
                                for (int i = 0; i < stack.length; i++) {
                                    logger.warn("--- stack " + i + ": " + stack[i]);
                                }
                            }
                            messageDoc.setSecondaryOwnerType(null);
                        }
                    }
                    else {
                        messageDoc.setSecondaryOwnerType(null);
                    }
                    String ownerType = OwnerType.MAIN_PROCESS_INSTANCE;
                    ProcessInstance procInst = engine.createProcessInstance(
                            embeddedHandlerProc.getId(), ownerType, processInstVO.getId(),
                            secondaryOwnerType, secondaryOwnerId, processInstVO.getMasterRequestId(), null);
                    engine.startProcessInstance(procInst, 0);
                }
            }
            else {
                // try package-level handler
                Process packageHandlerProc = null;
                // TODO ugly test to avoid dup errors for service subproc invokes
                if (messageDoc.getStatusMessage() == null || !messageDoc.getStatusMessage().startsWith("com.centurylink.mdw.activity.ActivityException: At least one subprocess is not completed\n"))
                    packageHandlerProc = getPackageHandler(processInstVO, eventType);
                if (packageHandlerProc != null) {
                    Map<String,String> params = new HashMap<>();
                    Variable exVar = packageHandlerProc.getVariable("exception");
                    if (exVar == null || !exVar.isInput()) {
                        logger.warn("Handler proc " + packageHandlerProc.getFullLabel() + " does not declare input var: 'exception'");
                    }
                    else {
                        params.put("exception", new DocumentReference(messageDoc.getSecondaryOwnerId()).toString());
                    }
                    if (packageHandlerProc.isService()) {
                        invokeService(packageHandlerProc.getId(), OwnerType.ERROR,
                                messageDoc.getSecondaryOwnerId(),
                                originatingInstance.getMasterRequestId(), null, params, null, 0,
                                messageDoc.isProcess() ? OwnerType.PROCESS_INSTANCE : OwnerType.ACTIVITY_INSTANCE, messageDoc.getWorkInstanceId(), null);
                    }
                    else {
                        startProcess(packageHandlerProc.getId(), originatingInstance.getMasterRequestId(), OwnerType.ERROR,
                                messageDoc.getSecondaryOwnerId(), params, messageDoc.isProcess() ? OwnerType.PROCESS_INSTANCE : OwnerType.ACTIVITY_INSTANCE, messageDoc.getWorkInstanceId(), null);
                    }
                }
                else if (eventType.equals(EventType.ABORT)) {
                    // abort the root process instance
                    InternalEvent event = InternalEvent.createProcessAbortMessage(processInstVO);
                    engine.abortProcessInstance(event);
                }
                else {
                    logger.info("Transition has not been defined for event of type " + eventType);
                }
            }
        }
        catch (Exception ex) {
            logger.severeException(ex.getMessage(), ex);
            throw new ProcessException(ex.getMessage());
        }
    }
406730
function ( tracker, gPoint ) {
            var guid = _generateGuid( tracker, gPoint ),
                i,
                len = trackerPoints.length;
            for ( i = 0; i < len; i++ ) {
                if ( trackerPoints[ i ].guid === guid ) {
                    trackerPoints.splice( i, 1 );
                    // Only run the interval timer if theres gesture pointers to track
                    len--;
                    if ( len === 0 ) {
                        window.clearInterval( intervalId );
                    }
                    break;
                }
            }
        }
1047129
function on(event, selector, callback) {
    const allowed = ['enter', 'leave'];

    if (!event) throw new Error('No event given. Choose either enter or leave');
    if (!selector) throw new Error('No selector to track');
    if (allowed.indexOf(event) < 0) throw new Error(`${event} event is not supported`);

    if (!{}.hasOwnProperty.call(this.trackedElements, selector)) {
        this.trackedElements[selector] = {};
    }

    this.trackedElements[selector].nodes = [];

    for (let i = 0, elems = document.querySelectorAll(selector); i < elems.length; i++) {
        const item = {
            isVisible: false,
            wasVisible: false,
            node: elems[i]
        };

        this.trackedElements[selector].nodes.push(item);
    }

    if (typeof callback === 'function') {
        if (!this.trackedElements[selector][event]) {
            this.trackedElements[selector][event] = {};
        }

        this.trackedElements[selector][event][(callback.name || 'anonymous')] = callback;
    }
}
847929
private void track(Event<T> windowEvent) {
        evictionPolicy.track(windowEvent);
        triggerPolicy.track(windowEvent);
    }
149584
def capture_on(pattern, callback):
        
        device_name, desc = WinPcapDevices.get_matching_device(pattern)
        if device_name is not None:
            with WinPcap(device_name) as capture:
                capture.run(callback=callback)
29231
function() {
    var tracker = this._aSelections;
    if(tracker && tracker.length > 0) {
        for(var i=tracker.length-1; i>-1; i--) {
           if(lang.isString(tracker[i])){
                return tracker[i];
            }
        }
    }
}
1245076
function(event, data, target){
            windowManager.eventEmitter.emit(event, {
                'emittedBy': windowManager.getCurrent().name,
                'target': target,
                'data': data
            });
        }
469359
def _wire_events(self):
        
        self._device.on_open += self._on_open
        self._device.on_close += self._on_close
        self._device.on_read += self._on_read
        self._device.on_write += self._on_write
        self._zonetracker.on_fault += self._on_zone_fault
        self._zonetracker.on_restore += self._on_zone_restore
726175
public void trackEvent(String argCategory, String argAction) {
        trackEvent(argCategory, argAction, null, null);
    }