Returns the event callback for a ref (reference)
558783
def get_event(self, ref):
        
        # is this reference one which has been setup?
        if ref in self._refs:
            return self._refs[ref].get_callback(ref)
        else:
            return None
31231
function eval$ref(params, dataPath) {
  dataPath = dataPath.replace(this.refPrefixRegexp, '');
  var $ref = params.$ref;
  if ($ref.indexOf('0/') == 0) throw new Error('Cannot reference the same $ref instruction or child');

  var pathParsed = pointer.parse(dataPath);
  var absPointerParsed = util.toAbsolutePointer($ref, pathParsed);
  // N# pointer returns property/index
  if (typeof absPointerParsed == 'string') return absPointerParsed;

  if (!absPointerParsed) absPointerParsed = pointer.parse($ref);

  var i = 0; // find the root to be evaluated
  while (i < pathParsed.length
          && pathParsed[i] == absPointerParsed[i]) i++;
  if (i == pathParsed.length) throw new Error('Cannot reference the same $ref instruction or child');

  if (!isNaN(pathParsed[i]) && !isNaN(absPointerParsed[i]) && absPointerParsed[i] > pathParsed[i])
    throw new Error('cannot reference the next item from the previous item');

  var rootPointerParsed = absPointerParsed.slice(0, i+1);
  var rootPointer = pointer.compile(rootPointerParsed);
  var pointerFromRoot = pointer.compile(absPointerParsed.slice(i+1));

  if (this.evaluatedRefs[rootPointer])
    return getRefValue(this.script, rootPointer, pointerFromRoot);

  var self = this;
  var pendingRef = self.pendingRefs[rootPointer]
    = self.pendingRefs[rootPointer] || new PendingRef(rootPointer);
  return new Promise(function (resolve, reject) {
    pendingRef.addCallback(function () {
      resolve(getRefValue(self.script, rootPointer, pointerFromRoot));
    });
  });
}
537521
function get(ref){
    if (ref && (isNode(ref) || ref.nodeType))
      return ref;
    else
      return typeof ref == 'string' ? document.getElementById(ref) : null;
  }
272126
private function functionCall(Node $function_reference, $dynamic = FALSE) {
    if ($dynamic) {
      $node = new CallbackCallNode();
      $node->addChild($function_reference, 'callback');
    }
    else {
      if ($function_reference instanceof NameNode && $function_reference->childCount() === 1 && $function_reference == 'define') {
        $node = new DefineNode();
      }
      else {
        $node = new FunctionCallNode();
      }
      $node->addChild($function_reference, 'name');
    }
    $this->functionCallParameterList($node);
    return $this->objectDereference($this->arrayDeference($node));
  }
1256306
function getEncloseFunctionDeclaration(reference) {
    let node = reference.identifier;

    while (node) {
        if (node.type === "FunctionDeclaration") {
            return node.id ? node : null;
        }

        node = node.parent;
    }

    return null;
}
928060
function (ref, component) {
    var inst = this.getPublicInstance();
    !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Stateless function components cannot have refs.') : _prodInvariant('110') : void 0;
    var publicComponentInstance = component.getPublicInstance();
    if (process.env.NODE_ENV !== 'production') {
      var componentName = component && component.getName ? component.getName() : 'a component';
      process.env.NODE_ENV !== 'production' ? warning(publicComponentInstance != null || component._compositeType !== CompositeTypes.StatelessFunctional, 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : void 0;
    }
    var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;
    refs[ref] = publicComponentInstance;
  }
986984
public function getDBRef(array $reference)
    {
        if ($this->eventManager->hasListeners(Events::preGetDBRef)) {
            $eventArgs = new EventArgs($this, $reference);
            $this->eventManager->dispatchEvent(Events::preGetDBRef, $eventArgs);
            $reference = $eventArgs->getData();
        }

        $result = $this->doGetDBRef($reference);

        if ($this->eventManager->hasListeners(Events::postGetDBRef)) {
            $eventArgs = new MutableEventArgs($this, $result);
            $this->eventManager->dispatchEvent(Events::postGetDBRef, $eventArgs);
            $result = $eventArgs->getData();
        }

        return $result;
    }
824574
function () {
            var domReference = this.reference;
            if (domReference && this.isOpen) {

                var position = this.popupContainer.calculatePosition(domReference);
                var size = {
                    width: domReference.offsetWidth,
                    height: domReference.offsetHeight
                };
                var referenceIsInContainer = this.popupContainer.isInside(position, size, this.domElement);

                if (referenceIsInContainer) {
                    this.referencePosition = position;
                    this.referenceSize = size;
                    this.refresh();
                    if (this.domElement && this.domElement.style.visibility === "hidden") {
                        this.domElement.style.visibility = "visible";
                    }
                } else {
                    this.domElement.style.visibility = "hidden";
                }
            }
        }
434497
def __callback(self, event, *args, **kwargs):
        # type: (str, *Any, **Any) -> Any
        
        comp_callback = self.context.get_callback(event)
        if not comp_callback:
            # No registered callback
            return True

        # Call it
        result = comp_callback(self.instance, *args, **kwargs)
        if result is None:
            # Special case, if the call back returns nothing
            return True

        return result
773328
public void setEvent_ref(Event v) {
    if (EventMention_Type.featOkTst && ((EventMention_Type)jcasType).casFeat_event_ref == null)
      jcasType.jcas.throwFeatMissing("event_ref", "de.julielab.jules.types.ace.EventMention");
    jcasType.ll_cas.ll_setRefValue(addr, ((EventMention_Type)jcasType).casFeatCode_event_ref, jcasType.ll_cas.ll_getFSRef(v));}
22459
def call_missing_reference(cls, kb_app, sphinx_app: Sphinx,
                               sphinx_env: BuildEnvironment,
                               node,
                               contnode,
                               ):
        

        for callback in EventAction.get_callbacks(kb_app,
                                                  SphinxEvent.MR):
            return callback(kb_app, sphinx_app, sphinx_env, node, contnode)
555535
function getRefValue (ref) {
  const thing = ref ? (ref.value ? ref.value : ref) : null
  if (thing && thing.$ref && typeof thing.$ref === 'string') {
    return thing.$ref
  }
}
1278765
function _assignRef(element) {
  var refString = element.getAttribute('ref');

  // assign element to refs object
  this.refs[ refString ] = element;

  // memoize ref string, clean ref attribute
  element.__refString__ = refString;
  element.removeAttribute('ref');
}
1227345
def add_ref(self, ref, attr=None):
        
        self.session.add_ref(self, ref, attr)
        return self.fetch()
31924
function checkReference(references) {
            astUtils.getModifyingReferences(references).forEach(reference => {
                context.report({ node: reference.identifier, message: "'{{name}}' is a function.", data: { name: reference.identifier.name } });
            });
        }
291126
protected void clearReference (DObject reffer, String field, int reffedOid)
    {
        // look up the reference vector for the referenced object
        Reference[] refs = _refs.get(reffedOid);
        Reference ref = null;

        if (refs != null) {
            for (int ii = 0; ii < refs.length; ii++) {
                if (refs[ii].equals(reffer.getOid(), field)) {
                    ref = refs[ii];
                    refs[ii] = null;
                    break;
                }
            }
        }

        // if a referred object and referring object are both destroyed without allowing the
        // referred object destruction to process the ObjectRemoved event which is auto-generated,
        // the subsequent destruction of the referring object will attempt to clear the reference
        // to the referred object which no longer exists; so we don't complain about non- existent
        // references if the referree is already destroyed
        if (ref == null && _objects.containsKey(reffedOid)) {
            log.warning("Requested to clear out non-existent reference",
                        "refferOid", reffer.getOid(), "field", field, "reffedOid", reffedOid);

//        } else {
//            log.info("Cleared out reference " + ref + ".");
        }
    }
97128
function cellref (ref) {
  if (R1C1.test(ref)) {
    return convertR1C1toA1(ref)
  }

  if (A1.test(ref)) {
    return convertA1toR1C1(ref)
  }

  throw new Error(`could not detect cell reference notation for ${ref}`)
}