if the user specifies include_docs=true, then we don't want to block the main cursor while we're fetching the doc
770435
function fetchDocAsynchronously(metadata, row, winningRev$$1) {
    var key = metadata.id + "::" + winningRev$$1;
    docIdRevIndex.get(key).onsuccess =  function onGetDoc(e) {
      row.doc = decodeDoc(e.target.result);
      if (opts.conflicts) {
        var conflicts = pouchdbMerge.collectConflicts(metadata);
        if (conflicts.length) {
          row.doc._conflicts = conflicts;
        }
      }
      fetchAttachmentsIfNecessary(row.doc, opts, txn);
    };
  }
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();
  }
}
363504
def exclude(self, twig=None, check_visible=True, **kwargs):
        
        return self - self.filter(twig=twig,
                                  check_visible=check_visible,
                                  **kwargs)
894844
function(self, callback) {
  if (self.cursorState.dead && self.cursorState.killed) {
    handleCallback(callback, new MongoError('cursor is dead'));
    return true;
  }

  return false;
}
1368140
def set_cursor(self, cursor):
        

        if cursor in ["on", "off", "under", "block"]:
            self.cursor = cursor
            self.server.request("screen_set %s cursor %s" % (self.ref, self.cursor))
864874
def notblocked(page):
    """"""
    for blocked in PAGES_TO_BLOCK:
        if blocked[0] != '*':
            blocked = '*' + blocked
        rx = re.compile(blocked.replace('*', '[^$]*'))
        if rx.match(page):
            return False
    return True
490020
def reset(self, initial_document=None, append_to_history=False):
        
        assert initial_document is None or isinstance(initial_document, Document)

        if append_to_history:
            self.append_to_history()

        initial_document = initial_document or Document()

        self.__cursor_position = initial_document.cursor_position

        # `ValidationError` instance. (Will be set when the input is wrong.)
        self.validation_error = None
        self.validation_state = ValidationState.UNKNOWN

        # State of the selection.
        self.selection_state = None

        # Multiple cursor mode. (When we press 'I' or 'A' in visual-block mode,
        # we can insert text on multiple lines at once. This is implemented by
        # using multiple cursors.)
        self.multiple_cursor_positions = []

        # When doing consecutive up/down movements, prefer to stay at this column.
        self.preferred_column = None

        # State of complete browser
        self.complete_state = None  # For interactive completion through Ctrl-N/Ctrl-P.

        # State of Emacs yank-nth-arg completion.
        self.yank_nth_arg_state = None  # for yank-nth-arg.

        # Remember the document that we had *right before* the last paste
        # operation. This is used for rotating through the kill ring.
        self.document_before_paste = None

        # Current suggestion.
        self.suggestion = None

        # The history search text. (Used for filtering the history when we
        # browse through it.)
        self.history_search_text = None

        # Undo/redo stacks
        self._undo_stack = []  # Stack of (text, cursor_position)
        self._redo_stack = []

        #: The working lines. Similar to history, except that this can be
        #: modified. The user can press arrow_up and edit previous entries.
        #: Ctrl-C should reset this, and copy the whole history back in here.
        #: Enter should process the current command and append to the real
        #: history.
        self._working_lines = self.history.strings[:]
        self._working_lines.append(initial_document.text)
        self.__working_index = len(self._working_lines) - 1
1283857
function ensureCursorVisible(cm) {
    resolveScrollToPos(cm);
    var cur = cm.getCursor(), from = cur, to = cur;
    if (!cm.options.lineWrapping) {
      from = cur.ch ? Pos(cur.line, cur.ch - 1) : cur;
      to = Pos(cur.line, cur.ch + 1);
    }
    cm.curOp.scrollToPos = {from: from, to: to, margin: cm.options.cursorScrollMargin, isCursor: true};
  }
295449
private static boolean serialDocInclude(Doc doc) {
        if (doc.isEnum()) {
            return false;
        }
        Tag[] serial = doc.tags("serial");
        if (serial.length > 0) {
            String serialtext = StringUtils.toLowerCase(serial[0].text());
            if (serialtext.indexOf("exclude") >= 0) {
                return false;
            } else if (serialtext.indexOf("include") >= 0) {
                return true;
            }
        }
        return true;
    }
1077000
function killCursorCallback(err, result) {
    if (err) {
      if (typeof callback !== 'function') return;
      return callback(err);
    }

    // Result
    const r = result.message;
    // If we have a timed out query or a cursor that was killed
    if ((r.responseFlags & (1 << 0)) !== 0) {
      if (typeof callback !== 'function') return;
      return callback(new MongoNetworkError('cursor killed or timed out'), null);
    }

    if (!Array.isArray(r.documents) || r.documents.length === 0) {
      if (typeof callback !== 'function') return;
      return callback(
        new MongoError(`invalid killCursors result returned for cursor id ${cursorId}`)
      );
    }

    // Return the result
    if (typeof callback === 'function') {
      callback(null, r.documents[0]);
    }
  }
764249
def checkCursor(self):
        ''
        if self.cursorBox:
            if self.cursorBox.h < self.canvasCharHeight:
                self.cursorBox.h = self.canvasCharHeight*3/4
            if self.cursorBox.w < self.canvasCharWidth:
                self.cursorBox.w = self.canvasCharWidth*3/4

        return False
1318868
def list_(*, cursor: str=None,
          exclude_archived: bool=None,
          exclude_members: bool=None,
          limit: int=None) -> snug.Query[Page[t.List[Channel]]]:
    """"""
    kwargs = {
        'exclude_archived': exclude_archived,
        'exclude_members':  exclude_members,
        'limit':            limit
    }
    response = yield {'cursor': cursor, **kwargs}
    try:
        next_cursor = response['response_metadata']['next_cursor']
    except KeyError:
        next_query = None
    else:
        next_query = list_(**kwargs, cursor=next_cursor)
    return Page(
        load_channel_list(response['channels']),
        next_query=next_query,
    )
102310
def ignore_sphinx():
    """"""
    (directives, roles) = _get_directives_and_roles_from_sphinx()

    directives += [
        'centered',
        'include',
        'deprecated',
        'index',
        'no-code-block',
        'literalinclude',
        'hlist',
        'seealso',
        'toctree',
        'todo',
        'versionadded',
        'versionchanged']

    ext_autosummary = [
        'autosummary',
        'currentmodule',
    ]

    ignore_directives_and_roles(directives + ext_autosummary,
                                roles + ['ctype'])
1244264
public static boolean serialInclude(Doc doc) {
        if (doc == null) {
            return false;
        }
        return doc.isClass() ?
            serialClassInclude((ClassDoc)doc) :
            serialDocInclude(doc);
    }
982804
def select(self, pyliste):
        """"""
        if self.isClosed or self.isEncrypted:
            raise ValueError("operation illegal for closed / encrypted doc")

        val = _fitz.Document_select(self, pyliste)

        self._reset_page_refs()
        self.initData()

        return val
506953
def is_return_doc_available(self):
        """"""
        return bool(self.return_doc and (self.return_doc.get('text') or self.return_doc.get('type')))
1314012
def showMethodToolTip(self):
        
        self.cancelCompletion()
        
        obj, _ = self.objectAtCursor()
        if not obj:
            return False
        
        docs = inspect.getdoc(obj)
        if not docs:
            return False
        
        # determine the cursor position
        rect   = self.cursorRect()
        cursor = self.textCursor()
        point  = QPoint(rect.left(), rect.top() + 18)
        
        QToolTip.showText(self.mapToGlobal(point), docs, self)
        
        return True