Pops the recent document or pops all document before the provided document.

@inner
@alias module:navigation.pop

@param  {Document} [doc]     The document until which we need to pop.
339264
function pop(doc) {
    if (doc instanceof Document) {
        _.defer(() => navigationDocument.popToDocument(doc));
    } else {
        _.defer(() => navigationDocument.popDocument());
    }
}
1024947
function () {
    const result = Array.prototype.pop.apply(arr)

    fn('pop', arr, {
      value: result
    })

    return result
  }
399718
def pop
      # NOTE: can't use popstr because the data might be binary
      ptr = ffi_delegate.pop
      return nil if ptr.null?
      Frame.from_ffi_delegate(ptr).to_s
    end
117134
public void pop(int element) {
    assert this.contains(element);
    int i = this.pos.get(element);
    this.pos.set(element, -1);
    int last = this.heap.back();
    this.heap.pop();
    int j = this.heap.size();
    if (i == j)
      return;
    assert i < j;
    this.pos.set(last, i);
    this.heap.set(i, last);
    this.up(last);
    this.down(last);
  }
1226659
function (criteria, document) {
            var self = this;

            return this.needOne(criteria).then(function (target) {
                return self.update(target.id, document).then(function (documents) {
                    return documents[0];
                });
            });
        }
37808
function(doc) {
      var that = this;
      doc = that._in_map(doc);

      return this._init.then(function() {
        return that.isAdmissible(doc);
      }).then(function(admissible) {
        if (!admissible) {
          throw new Error('Document not admissible');
        }

        doc = that.clean(doc);

        if (that._index) {
          delete doc[that._index];
        }

        return that.getNextIndex();
      }).then(function(max) {
        if (that._index && typeof max === 'number') {
          doc[that._index] = max;
        }

        return that._dbApi.create(doc).then(function(doc) {
          if (!doc) {
            throw new Error('Document not created');
          }

          return doc;
        });
      });
    }
367184
def remove(self, cond=None, doc_ids=None, eids=None):
        
        doc_ids = _get_doc_ids(doc_ids, eids)

        if cond is None and doc_ids is None:
            raise RuntimeError('Use purge() to remove all documents')

        return self.process_elements(
            lambda data, doc_id: data.pop(doc_id),
            cond, doc_ids
        )
108613
def pop(self, key):
        
        r = self[key]
        self.remove(key)
        return r
363925
def pop(self, strip=False):
        """"""
        r = self.contents()
        self.clear()
        if r and strip:
            r = r.strip()
        return r
719021
def pop(self):
        
        if not self.is_empty():
            _, process = heappop(self._waiting)
            if _logger is not None:
                self._log(INFO, "pop", process=process.local.name)
            process.resume()
974660
function pushDocument(doc) {
    if (!(doc instanceof Document)) {
        console.warn('Cannot navigate to the document.', doc);
        return;
    }
    navigationDocument.pushDocument(doc);
}
688790
async def pop(self, name, init=False):
        '''
        
        '''
        prop = self.form.prop(name)
        if prop is None:
            if self.snap.strict:
                raise s_exc.NoSuchProp(name=name)
            await self.snap.warn(f'No Such Property: {name}')
            return False

        if self.isrunt:
            if prop.info.get('ro'):
                raise s_exc.IsRuntForm(mesg='Cannot delete read-only props on runt nodes',
                                       form=self.form.full, prop=name)
            return await self.snap.core.runRuntPropDel(self, prop)

        if not init:

            if prop.info.get('ro'):
                if self.snap.strict:
                    raise s_exc.ReadOnlyProp(name=name)
                await self.snap.warn(f'Property is read-only: {name}')
                return False

        curv = self.props.pop(name, s_common.novalu)
        if curv is s_common.novalu:
            return False

        sops = prop.getDelOps(self.buid)
        splice = self.snap.splice('prop:del', ndef=self.ndef, prop=prop.name, valu=curv)
        await self.snap.stor(sops, [splice])

        await prop.wasDel(self, curv)
668151
def popwhile(predicate, iterable):
    
    while iterable:
        item = iterable.pop()
        if predicate(item):
            yield item
        else:
            break
140560
def pop_front(self):
        ''''''
        backend = self.backend
        return backend.execute(backend.structure(self).pop_front(),
                               self.value_pickler.loads)
1189468
function popStack()
    {
        $stackArray = array_pop( $this->DocSpecStack );
        $this->DocSpecification = $stackArray['DocSpec'];
        $this->PreStack = $stackArray['PreStack'];
        $this->LeftMarginArray = $stackArray['LeftMarginArray'];
        $this->RightMarginArray = $stackArray['RightMarginArray'];
        $this->ez['leftMargin'] = $stackArray['LeftMargin'];
        $this->ez['rightMargin'] = $stackArray['RightMargin'];
        $this->ez['topMargin'] = $stackArray['TopMargin'];
        $this->ez['bottomMargin'] = $stackArray['BottomMargin'];
        $this->ez['lineSpace'] = $stackArray['LineSpace'];
        $this->setFontSize( $stackArray['FontSize'] );
        $this->setJustification( $stackArray['justification'] );

        if ( $stackArray['continous'] )
        {
            $this->setYOffset( $stackArray['YPos'] );
            $this->setXOffset( $stackArray['XPos'] );
        }
    }
642773
def pop(self):
        
        if len(self.stack):
            popped = self.stack.pop()
            log.debug('pop: (%s)\n%s', Repr(popped), Repr(self.stack))
            return popped
        else:
            log.debug('stack empty, not-popped')
        return None
824215
function hasNext(cursor, callback) {
  const Cursor = require('../cursor');

  if (cursor.s.currentDoc) {
    return callback(null, true);
  }

  if (cursor.isNotified()) {
    return callback(null, false);
  }

  nextObject(cursor, (err, doc) => {
    if (err) return callback(err, null);
    if (cursor.s.state === Cursor.CLOSED || cursor.isDead()) return callback(null, false);
    if (!doc) return callback(null, false);
    cursor.s.currentDoc = doc;
    callback(null, true);
  });
}