Send an event to an `ev_*` method.

        `*` will be the events type converted to lower-case.

        If `event.type` is an empty string or None then it will be ignored.
498657
def dispatch(self, event: Any) -> None:
        
        if event.type:
            getattr(self, "ev_%s" % (event.type.lower(),))(event)
672153
def new_event(event):
    
    op_name = event.EventType.DESCRIPTOR.values_by_number[event.type].name
    if op_name == 'PUT':
        cls = PutEvent
    elif op_name == 'DELETE':
        cls = DeleteEvent
    else:
        raise Exception('Invalid op_name')

    return cls(event)
1225726
def libvlc_event_type_name(event_type):
    '''
    '''
    f = _Cfunctions.get('libvlc_event_type_name', None) or \
        _Cfunction('libvlc_event_type_name', ((1,),), None,
                    ctypes.c_char_p, ctypes.c_uint)
    return f(event_type)
610241
void triggerBasicEvent(Event.EventType type, String message)
  {
    triggerBasicEvent(type, message, false);
  }
470495
function eventCheck(obj, type) {
  var t;
  
  if (!obj._events) {
    return false;
  }
  
  t = obj._events[type]
  
  if (typeof t === 'function') {
    return true;
  }
  if (Array.isArray(t) && t.length) {
    return true;
  }
  return false;
}
179115
function(evname) {
    var fns = this._events && this._events[evname] || [],
    args = __slice.call(arguments, 1);
    for (var i = 0, ii = fns.length; i < ii; i++) {
      fns[i].cb.apply(fns[i].ctxt, args);
    }
  }
172039
@Override
	public boolean acceptsEvent(String type, Object event, Function<String, String> resolver) {
		return false;
	}
888370
def _make_event(self, value):  # pylint: disable=arguments-differ
        """"""
        super(SystemLED, self)._make_event(
            self._led_type_code,
            self.code,
            value)
376913
function(element, type, handler) {
      var types = type.split(' ');
      for(var t=0; t<types.length; t++) {
        element.addEventListener(types[t], handler, false);
      }
    }
951084
function addEvent(ev, val, line){

    var history = this.get('history');
    var maxLen  = this.get('MAX_LEN_HISTORY');
    history.push(ev);

    if (history.length > maxLen) history.shift();

    this.set('status', ev, true, {data: val, line: line});
  }
562299
function(evname, callback, context) {
    if (!evname && !callback && !context) {
      this._events = {};
      return this;
    } else if (!evname) {
      for (var _evname in this._events) {
        this.off(_evname, callback, context);
      }
      return this;
    } else {
      var fns = this._events[evname], l = fns.length;
      while (l--) {
        if ((callback ? fns[l].cb === callback : true) && (context ? fns[l].ctxt === context : true)) {
          fns.splice(l, 1);
        }
      }
      return this;
    }
  }
1101156
def method_missing(method_name, *args, &block)
      _, event_name, callback_name = *method_name.to_s.match(/^(\w*?on_\w+?)_(\w+)$/)
      if callback_name && callback_names.include?(callback_name.to_sym)
        public_send(event_name, :"#{callback_name}", *args, &block)
      else
        super
      end
    end
1198958
function (type, handler) {

            // Validate arguments
            if (typeof type !== 'string') {
                throw new Error('Type must be a string');
            }
            if (typeof handler !== 'function') {
                throw new Error('Handler must be a function');
            }

            // Check for presence of event store
            if (!this._events) {
                this._events = {};
            }
            if (!this._events[type]) {
                this._events[type] = [];
            }

            // Add handler
            this._events[type].push(handler);

        }
773328
public void setEvent_ref(Event v) {
    if (EventMention_Type.featOkTst && ((EventMention_Type)jcasType).casFeat_event_ref == null)
      jcasType.jcas.throwFeatMissing("event_ref", "de.julielab.jules.types.ace.EventMention");
    jcasType.ll_cas.ll_setRefValue(addr, ((EventMention_Type)jcasType).casFeatCode_event_ref, jcasType.ll_cas.ll_getFSRef(v));}
534078
function(events, args) {
    let ev,
        i = -1,
        l = events.length,
        a1 = args[0],
        a2 = args[1],
        a3 = args[2];
    switch (args.length) {
        case 0:
            while (++i < l) (ev = events[i]).callback.call(ev.ctx);
            return;
        case 1:
            while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1);
            return;
        case 2:
            while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2);
            return;
        case 3:
            while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3);
            return;
        default:
            while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args);
            return;
    }
}
802156
function (event) {
            if (this._subTplModuleCtrl) {
                if (!event.isSpecialKey && event.charCode != event.KC_SPACE) {
                    this.sendKey(event);
                }
            }
        }
768559
def validate_event_type(sender, event, created):
    """"""
    if event.code not in sender.event_codes():
        raise ValueError("The Event.code '{}' is not a valid Event "
                         "code.".format(event.code))