Add an event and its corresponding key to the store.
354973
def add_event(self, key, event):
        """"""
        assert isinstance(key, str)
        assert isinstance(event, bytes)
        self.conn.execute('INSERT INTO events(uuid,event) VALUES (?,?)',
                          (key, event.decode('utf-8')))
789973
def _AddSerializedEvent(self, event):
    
    identifier = identifiers.SQLTableIdentifier(
        self._CONTAINER_TYPE_EVENT,
        self._serialized_event_heap.number_of_events + 1)
    event.SetIdentifier(identifier)

    serialized_data = self._SerializeAttributeContainer(event)

    self._serialized_event_heap.PushEvent(event.timestamp, serialized_data)

    if self._serialized_event_heap.data_size > self._maximum_buffer_size:
      self._WriteSerializedAttributeContainerList(self._CONTAINER_TYPE_EVENT)
326704
def post_save_event_listener(sender, instance, created):
    """"""
    if not instance._meta.event_ready:
        return

    if created:
        instance.create_creation_event()
    else:
        instance.create_update_event()

    # Reset the original key
    instance._original = None
257259
def handle_new_events(self, events):
        """"""
        for event in events:
            self.events.append(
                self.create_event_object(
                    event[0],
                    event[1],
                    int(event[2])))
694256
function add(key, value, postfix) {
  if (value > 0) {
    key.push(value + postfix);
  }

  return key;
}
989021
void upsertEvent(EventId eventId, Lockable<V> event) {
		this.eventsBufferCache.put(eventId, event);
	}
351961
function attachBrowserEvents(self) {
  if (isChromeApp()) {
    chrome.storage.onChanged.addListener(function (e) {
      // make sure it's event addressed to us
      if (e.db_name != null) {
        //object only has oldValue, newValue members
        self.emit(e.dbName.newValue);
      }
    });
  } else if (hasLocalStorage()) {
    if (typeof addEventListener !== 'undefined') {
      addEventListener("storage", function (e) {
        self.emit(e.key);
      });
    } else { // old IE
      window.attachEvent("storage", function (e) {
        self.emit(e.key);
      });
    }
  }
}
418253
def add_new_key(self, code, name):
        """"""
        device_json = {"code": code, "name": name}
        return self.api_interface.create_lock_key(self, device_json)
815161
@Override
    public void add(Event event) {
        if (getNumStoredEvents() >= maxEvents) {
            logger.warn("Not adding Event because at least "
                + Integer.toString(maxEvents) + " events are already stored: " + event.getId());
            return;
        }

        File eventFile = new File(bufferDir.getAbsolutePath(), event.getId().toString() + FILE_SUFFIX);
        if (eventFile.exists()) {
            logger.trace("Not adding Event to offline storage because it already exists: "
                + eventFile.getAbsolutePath());
            return;
        } else {
            logger.debug("Adding Event to offline storage: " + eventFile.getAbsolutePath());
        }

        try (FileOutputStream fileOutputStream = new FileOutputStream(eventFile);
             ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream)) {
            objectOutputStream.writeObject(event);
        } catch (Exception e) {
            logger.error("Error writing Event to offline storage: " + event.getId(), e);
        }

        logger.debug(Integer.toString(getNumStoredEvents())
            + " stored events are now in dir: "
            + bufferDir.getAbsolutePath());
    }
30239
function Eventstore(options, store) {
  this.options = options || {};
  this.store = store;

  this.eventMappings = {};

  EventEmitter.call(this);
}
424732
protected function wizardAddStore()
    {
        $this->validatePrompt('name', $this->text('Name'), 'store');
        $this->validatePrompt('domain', $this->text('Domain or IP'), 'store');
        $this->validatePrompt('basepath', $this->text('Path'), 'store', '');
        $this->validatePrompt('status', $this->text('Status'), 'store', 0);
        $this->setSubmittedJson('data');

        $this->validateComponent('store');
        $this->addStore();
    }
7164
def add_event(options)
      self.events ||= []
      event = EventAssertion.new
      event.add_value(options)
      self.events << event
    end
32859
public void updateEvent(String key, String value) {
        updateEvent(key, value, true, true);
    }
355903
def add_event(self, event):
        
        if not isinstance(event, event_pb2.Event):
            raise TypeError("Expected an event_pb2.Event proto, "
                            " but got %s" % type(event))
        self._async_writer.write(event.SerializeToString())
1248292
def addEvent(self, event, fd, action):
        
        self._events[event] = (fd, action)
153162
def add_event(self, name, data=None):
    '''
    
    '''

    try:
      mergeable = self.event_types[name].mergeable
    except KeyError:
      if self.strict:
        raise ValueError('unknown event type {0!r}'.format(name))
      mergeable = False

    if mergeable and data is not None:
      raise ValueError('mergable event can not have data attached')

    with self.lock:
      if mergeable:
        # Check if such an event already exists.
        for ev in self.events:
          if ev.type == name:
            return

      self.events.append(self.Event(name, data, time.clock()))
1108297
public boolean addEvent(Hook k, Event n) {
        Set<Event> l = events.get(k);
        if (l == null) {
            l = new HashSet<>();
            events.put(k, l);
        }
        return l.add(n);
    }