Resolve from documents.

        :param pointer: foo
        :type pointer: DocumentPointer
169776
def resolve(self, pointer):
        

        dp = DocumentPointer(pointer)
        obj, fetcher = self.prototype(dp)

        for token in dp.pointer:
            obj = token.extract(obj, bypass_ref=True)
            reference = ref(obj)
            if reference:
                obj = fetcher.resolve(reference)
        return obj
1158422
def doctree_resolved(app, doctree, fromdocname):
    
    # Skip for non-html or if javascript is not inlined
    if not app.env.config.wavedrom_html_jsinline:
        return

    text = """
    <script type="text/javascript">
        function init() {
            WaveDrom.ProcessAll();
        }
        window.onload = init;
    </script>"""
    doctree.append(nodes.raw(text=text, format='html'))
822549
def resolve_url_ext(to, params_=None, anchor_=None, args=None, kwargs=None):
    
    url = resolve_url(to, *(args or ()), **(kwargs or {}))
    if params_:
        url += '?' + urllib.urlencode(encode_url_query_params(params_))
    if anchor_:
        url += '#' + anchor_
    return url
679854
def query(cls, *args, **kwargs):
        
        for doc in cls._coll.find(*args, **kwargs):
            yield cls.from_storage(doc)
965973
function parsePointer(pointer) {
    // Converts JSON pointer string into tokens list.

    // Let's split pointer string by tokens' separator character.
    // Also we will reverse resulting array to simplify it's further usage.
    var tokens = pointer.split(TOKENS_SEPARATOR).reverse();

    // Last item in resulting array is always an empty string,
    // we don't need it, let's remove it.
    tokens.pop();

    // Now tokens' array is ready to use, let's return it.
    return tokens;
  }
1338541
private void updatePointer(long next_ptr, long next_value)
                    throws IOException,
                    EOFException {
        filemgr.seek(next_ptr);
        filemgr.writeLong(next_value);
    }
200509
def check(self, pointer, expected, raise_onerror=False):
        
        obj = self.document
        for token in Pointer(pointer):
            try:
                obj = token.extract(obj, bypass_ref=True)
            except ExtractError as error:
                if raise_onerror:
                    raise Error(*error.args)
                logger.exception(error)
                return False
        return obj == expected
757585
def resolve_all(x, default=None):
    
    while isinstance(x, PDFObjRef):
        x = x.resolve(default=default)
    if isinstance(x, list):
        x = [resolve_all(v, default=default) for v in x]
    elif isinstance(x, dict):
        for (k, v) in x.iteritems():
            x[k] = resolve_all(v, default=default)
    return x
1158876
def resolve_content_type(type_resolvers, request):
    # type: (Iterable[Callable[[Any], str]], Any) -> Optional[str]
    
    for resolver in type_resolvers:
        content_type = parse_content_type(resolver(request))
        if content_type:
            return content_type
291286
function resolveResource(ref, baseURI){
    // ref ~ "#123"
    if (/^#\d+$/.test(ref))
      return templateList[ref.substr(1)];

    // ref ~ "id:foo"
    if (/^id:/.test(ref))
      return resolveSourceByDocumentId(ref.substr(3));

    // ref ~ "foo.bar.baz"
    if (/^[a-z0-9\.]+$/i.test(ref) && !/\.tmpl$/.test(ref))
      return getSourceByPath(ref);

    // ref ~ "./path/to/file.tmpl"
    return basis.resource(basis.resource.resolveURI(ref, baseURI, '<b:include src=\"{url}\"/>'));
  }
1320751
def xpointerNewContext(self, doc, origin):
        
        if doc is None: doc__o = None
        else: doc__o = doc._o
        if origin is None: origin__o = None
        else: origin__o = origin._o
        ret = libxml2mod.xmlXPtrNewContext(doc__o, self._o, origin__o)
        if ret is None:raise treeError('xmlXPtrNewContext() failed')
        __tmp = xpathContext(_obj=ret)
        return __tmp
982787
public function pointer($pointer)
    {
        $pointer = new Pointer($pointer);
        $data    = $pointer->evaluate($this->data);

        if ($data !== null) {
            return $data;
        } else {
            throw new RuntimeException('Could not resolve pointer ' . $pointer->getPath());
        }
    }
279470
function resolve(from, to) {
  var objFrom = parse(from);
  var objTo = parse(to);

  if (objFrom.kind === 'url' && objTo.kind === 'url') {
    return format(parse(url.resolve(from, to)));
  }

  if (objFrom.kind === 'urn') {
    // In our world all URNs are absolute (if they weren’t they’d be
    // seen as a non-absolute URL).

    if (objTo.kind === 'urn') {
      return format(objTo);
    }

    // "from" is a urn and "to" is a url
    if (objTo.kind === 'url' && objTo.absolute) {
      return format(objTo);
    } else {
      if (objFrom.pathname) {
        objFrom.pathname = url.resolve(objFrom.pathname, objTo.baseUri);
      }
      objFrom.baseUri = objFrom.host + (objFrom.pathname || '');
      objFrom.fragment = objTo.fragment;
      return format(objFrom);
    }
  } else {
    // "from" is a url and "to" is a urn (!)
    return format(objTo);
  }
}
439438
def _from_pointer(cls, pointer, incref):
        
        if pointer == ffi.NULL:
            raise ValueError('Null pointer')
        if incref:
            cairo.cairo_reference(pointer)
        self = object.__new__(cls)
        cls._init_pointer(self, pointer)
        return self
1096637
def resolve(container, expression):
    
    itemgetter = getattr(container, 'get_item', container.get)
    tokens = []
    expression = expression.strip()
    for sel_delim, _id, _range in selection_re.findall(expression):
        tokens.append(delimiters.get(sel_delim, ''))
        item = itemgetter(_id)
        if item is None:
            raise XigtStructureError(
                'Referred Item (id: {}) from reference "{}" does not '
                'exist in the given container.'
                .format(_id, expression)
            )
        # treat None values as empty strings for resolution
        value = item.value() or ''
        if _range:
            for spn_delim, start, end in span_re.findall(_range):
                start = int(start) if start else None
                end = int(end) if end else None
                tokens.extend([
                    delimiters.get(spn_delim, ''),
                    value[start:end]
                ])
        else:
            tokens.append(value)
    return ''.join(tokens)
724439
def check(doc, pointer, expected, raise_onerror=False):
    
    return Target(doc).check(pointer, expected, raise_onerror)
36611
public DocPath resolve(DocPath p) {
        if (p == null || p.isEmpty())
            return this;
        if (path.isEmpty())
            return p;
        return new DocPath(path + "/" + p.getPath());
    }