Delete the document and log the event in the change log
545822
def logged_delete(self, user):
        """"""

        self.delete()

        # Log the change
        entry = ChangeLogEntry({
            'type': 'DELETED',
            'documents': [self],
            'user': user
            })
        entry.insert()

        return entry
329305
async def handler(event):
    """"""
    await event.delete()

    await event.respond(
        get_docs_message(kind=event.pattern_match.group(1),
                         query=event.pattern_match.group(2)),
        reply_to=event.reply_to_msg_id
    )
1081504
def delete(self, event):
        """"""
        assert self.receiver_id == event.receiver_id
        event.response = {'status': 410, 'message': 'Gone.'}
        event.response_code = 410
1297504
function _handleActiveEditorChange(event, current, previous) {
        if (current) { // Handle only full editors
            if (_mrofList.length === 0) {
                _initRecentFilesList();
            }

            var file = current.document.file;
            var paneId = current._paneId;
            _addToMROFList(file, paneId, current.getCursorPos(true, "first"));
        }

        if (previous) { // Capture the last know cursor position
            _updateCursorPosition(previous.document.file.fullPath, previous._paneId, previous.getCursorPos(true, "first"));
        }
    }
609732
def on_moved(self, event):
        
        self.on_deleted(events.FileDeletedEvent(event.src_path))
        self.on_created(events.FileCreatedEvent(event.dest_path))
1047751
function destroyDocument(params) {
  var collection = collections[params.collection]

  if (collection === undefined) {
    return false
  }

  var doc = collection[params.id]

  delete collection[params.id]

  eventEmitter.emit('documentDestroyed', params.collection, doc)

  return true
}
542302
def remove(self, document):
        
        assert '_id' in document, 'Document must have an id'
        self.db.execute("delete from %s where id = ?" % self.name, (document['_id'],))
553489
function(event, model, collection, options) {
      if ((event == 'add' || event == 'remove') && collection != this) return;
      if (event == 'destroy') {
        this.remove(model, options);
      }
      if (model && event === 'change:' + model.idAttribute) {
        delete this._byId[model.previous(model.idAttribute)];
        this._byId[model.id] = model;
      }
      this.trigger.apply(this, arguments);
    }
655894
function whenDocumentReady(callback, doc) {
  if (!isDocumentReady(doc)) {
    var checkReady = function() {
      if (doc.readyState === 'complete' ||
          doc.readyState === requiredReadyState) {
        doc.removeEventListener(READY_EVENT, checkReady);
        whenDocumentReady(callback, doc);
      }
    };
    doc.addEventListener(READY_EVENT, checkReady);
  } else if (callback) {
    callback();
  }
}
807480
function () {
        var self = this;

        // Unbind all events bound to window/document by editor instance
        if (self.boundEvents) {
          var i = self.boundEvents.length;

          while (i--) {
            var item = self.boundEvents[i];
            this.events.unbind(item[0], item[1], item[2]);
          }

          self.boundEvents = null;
        }

        // Restore sizzle document to window.document
        // Since the current document might be removed producing "Permission denied" on IE see #6325
        if (Sizzle.setDocument) {
          Sizzle.setDocument();
        }

        self.win = self.doc = self.root = self.events = self.frag = null;
      }
361155
function handleCurrentFileChange() {
        var newFile = MainViewManager.getCurrentlyViewedFile(MainViewManager.ACTIVE_PANE);

        if (newFile) {
            var newDocument = DocumentManager.getOpenDocumentForPath(newFile.fullPath);

            if (newDocument) {
                _currentTitlePath = _shortTitleForDocument(newDocument);
            } else {
                _currentTitlePath = ProjectManager.makeProjectRelativeIfPossible(newFile.fullPath);
            }
        } else {
            _currentTitlePath = null;
        }

        // Update title text & "dirty dot" display
        _updateTitle();
    }
759311
function _handleRelatedDocumentDeleted(url) {
        var liveDoc = _relatedDocuments[url];
        if (liveDoc) {
            delete _relatedDocuments[url];
        }

        if (_server) {
            _server.remove(liveDoc);
        }
        _closeDocument(liveDoc);
    }
150608
@Override
    public void changed(Database.ChangeEvent event) {
        synchronized (changesLock) {
            if (isTimeout)
                return;

            lastChangesTimestamp = System.currentTimeMillis();

            // Stop timeout timer:
            stopTimeout();

            // In race condition, new doc or update doc is fired before starting to observe the
            // DatabaseChangeEvent, it allows to skip few document changes with /_changes REST API.
            // Make sure all document changes are tread by /_changes REST API.
            if (!filled) {
                filled = true;
                RevisionList changes = db.changesSince(changesSince, changesOptions,
                        changesFilter, changesFilterParams);
                if (changes.size() > 0) {
                    sendLongpollChanges(changes, changesSince);
                    return;
                }
            }

            List<RevisionInternal> revs = new ArrayList<RevisionInternal>();
            List<DocumentChange> changes = event.getChanges();
            for (DocumentChange change : changes) {
                RevisionInternal rev = change.getAddedRevision();
                if (rev == null)
                    continue;
                String winningRevID = change.getWinningRevisionID();
                if (!this.changesIncludesConflicts) {
                    if (winningRevID == null)
                        continue; // // this change doesn't affect the winning rev ID, no need to send it
                    else if (!winningRevID.equals(rev.getRevID())) {
                        // This rev made a _different_ rev current, so substitute that one.
                        // We need to emit the current sequence # in the feed, so put it in the rev.
                        // This isn't correct internally (this is an old rev so it has an older sequence)
                        // but consumers of the _changes feed don't care about the internal state.
                        RevisionInternal mRev = db.getDocument(rev.getDocID(), winningRevID, changesIncludesDocs);
                        mRev.setSequence(rev.getSequence());
                        rev = mRev;
                    }
                }

                if (!event.getSource().runFilter(changesFilter, changesFilterParams, rev))
                    continue;

                if (longpoll) {
                    revs.add(rev);
                } else {
                    Log.d(TAG, "Router: Sending continuous change chunk");
                    sendContinuousChange(rev);
                }

                timeoutLastSeqence = rev.getSequence();
            }

            if (longpoll && revs.size() > 0)
                sendLongpollChanges(revs, changesSince);
            else
                // Restart timeout timer for continuous feed request:
                startTimeout();
        }
    }
781200
function somethingChanged() {
                // don't fire events if the editor is readOnly as they are false detections
                if (editor.readOnly)
                    return;

                if (timer)
                    return;

                timer = setTimeout(function () {
                    timer = 0;
                    editor.fire('change');
                }, editor.config.minimumChangeMilliseconds || 100);
            }
1137437
def delete_document(project_id, knowledge_base_id, document_id):
    """"""
    import dialogflow_v2beta1 as dialogflow
    client = dialogflow.DocumentsClient()
    document_path = client.document_path(project_id, knowledge_base_id,
                                         document_id)

    response = client.delete_document(document_path)
    print('operation running:\n {}'.format(response.operation))
    print('Waiting for results...')
    print('Done.\n {}'.format(response.result()))
651770
def changes(self):
        """"""
        obj = AuditLogChanges(self, self._changes)
        del self._changes
        return obj
929516
function(event, model, collection, options) {
      if ((event === 'add' || event === 'remove') && collection !== this) return;
      if (event === 'destroy') this.remove(model, options);
      if (event === 'change') {
        var prevId = this.modelId(model.previousAttributes());
        var id = this.modelId(model.attributes);
        if (prevId !== id) {
          if (prevId != null) delete this._byId[prevId];
          if (id != null) this._byId[id] = model;
        }
      }
      this.trigger.apply(this, arguments);
    }