Resolve simulation specifications.
559731
def resolve_simulation(self, fc, ct):
        

        for run in ct.simulation.runs:
            try:
                run2 = Run(fc.component_references[run.component].referenced_component,
                           run.variable,
                           fc.parameters[run.increment].numeric_value,
                           fc.parameters[run.total].numeric_value)
            except:
                raise ModelError("Unable to resolve simulation run parameters in component '{0}'",
                                 fc.id)
            fc.simulation.add(run2)

        for record in ct.simulation.records:
            try:
                record2 = Record(fc.paths[record.quantity].value,
                                 fc.parameters[record.scale].numeric_value if record.scale else 1,
                                 fc.texts[record.color].value if record.color else '#000000')
            except:
                raise ModelError("Unable to resolve simulation record parameters in component '{0}'",
                                 fc.id)
            fc.simulation.add(record2)

        for event_record in ct.simulation.event_records:
            try:
                event_record2 = EventRecord(fc.paths[event_record.quantity].value,
                                 fc.texts[event_record.eventPort].value)
            except:
                raise ModelError("Unable to resolve simulation event_record parameters in component '{0}'",
                                 fc.id)
            fc.simulation.add(event_record2)

        for dd in ct.simulation.data_displays:
            try:
                dd2 = DataDisplay(fc.texts[dd.title].value,
                                  '')
                if 'timeScale' in fc.parameters:
                    dd2.timeScale = fc.parameters['timeScale'].numeric_value
            except:
                raise ModelError("Unable to resolve simulation display parameters in component '{0}'",
                                 fc.id)
            fc.simulation.add(dd2)
                
        for dw in ct.simulation.data_writers:
            try:
                path = '.'
                if fc.texts[dw.path] and fc.texts[dw.path].value:
                    path = fc.texts[dw.path].value
                
                dw2 = DataWriter(path,
                                 fc.texts[dw.file_name].value)
            except:
                raise ModelError("Unable to resolve simulation writer parameters in component '{0}'",
                                 fc.id)
            fc.simulation.add(dw2)
                
        for ew in ct.simulation.event_writers:
            try:
                path = '.'
                if fc.texts[ew.path] and fc.texts[ew.path].value:
                    path = fc.texts[ew.path].value
                
                ew2 = EventWriter(path,
                                 fc.texts[ew.file_name].value,
                                 fc.texts[ew.format].value)
            except:
                raise ModelError("Unable to resolve simulation writer parameters in component '{0}'",
                                 fc.id)
            fc.simulation.add(ew2)
64826
function resolve(deps, rem) {
    var i, length, dep, mod, result = [];

    for (i = 0, length = deps.length; i < length; i++) {
      dep = deps[i];
      mod = cache[dep] || rem[dep];

      if (!mod) {
        throw new TypeError("Module " + dep + " has not yet been loaded");
      }

      if (cache[dep]) {
        if (!mod.hasOwnProperty("code")) {
          mod.code = load(mod);
        }
        result[i] = mod.code;
      }
      else {
        result[i] = mod;
      }
    }

    return result;
  }
727317
def resolve(self):
        """"""
        if self.source:
            result = self.source[1][self.source[0]]
            if result:
                return result
        return self.default
506913
private void resolveImplicitLevels(int start, int limit, byte level, byte sor, byte eor) {
        if ((level & 1) == 0) { // even level
            for (int i = start; i < limit; ++i) {
                byte t = resultTypes[i];
                // Rule I1.
                if (t == L ) {
                    // no change
                } else if (t == R) {
                    resultLevels[i] += 1;
                } else { // t == AN || t == EN
                    resultLevels[i] += 2;
                }
            }
        } else { // odd level
            for (int i = start; i < limit; ++i) {
                byte t = resultTypes[i];
                // Rule I2.
                if (t == R) {
                    // no change
                } else { // t == L || t == AN || t == EN
                    resultLevels[i] += 1;
                }
            }
        }
    }
1163141
def resolve(object):
    """"""


    import re
    sesame_cmd = 'curl -s http://cdsweb.u-strasbg.fr/viz-bin/nph-sesame/-oI?'+string.replace(object,' ','')
    f = os.popen(sesame_cmd)
    lines = f.readlines()
    f.close()
    for line in lines:        
        if re.search('%J ', line):
            result2 = line.split()
            ra_deg = float(result2[1])
            dec_deg = float(result2[2])
            return (ra_deg, dec_deg)
        
    return (0,0)
1357452
function resolveResolution (
  ref,
  resolver,
  bootedServices
) {
  const refParts = ref.split(':')
  return resolver(refParts, bootedServices)
}
1211779
def getSimulations(self, times, **kwargs):
        
        for t in times:
            yield self.getSimulation(t, **kwargs)
185457
def _verify_assumptions(self):
        """"""
        text = self.annotation
        keys = text.keys()

        if '$MODE' not in text or text['$MODE'] != 'L':
            raise ParserFeatureNotImplementedError(u'Mode not implemented')

        if '$P0B' in keys:
            raise ParserFeatureNotImplementedError(u'Not expecting a parameter starting at 0')

        if text['$BYTEORD'] not in ['1,2,3,4', '4,3,2,1', '1,2', '2,1']:
            raise ParserFeatureNotImplementedError(u'$BYTEORD {} '
                                                   u'not implemented'.format(text['$BYTEORD']))
59087
function resolveDependenciesToUnified() {
		if ( !Calendar || !DateRange ) {
			sap.ui.getCore().loadLibrary("sap.ui.unified");
			Calendar = sap.ui.requireSync("sap/ui/unified/Calendar");
			DateRange = sap.ui.requireSync("sap/ui/unified/DateRange");
		}
	}
68367
def validate(self):
        """"""
        try:
            for pkg in self.resolved_packages:
                pkg.validate_data()
        except RezError as e:
            raise ResolvedContextError("%s: %s" % (e.__class__.__name__, str(e)))
23186
async def resolve(self, host: str,
                      port: int, family: int) -> List[Dict[str, Any]]:
        """"""
1021067
def resolver(self):
        """"""
        if self._resolver is not None:
            return self._resolver
        if self._schema_path is not None:
            # the documentation for ref resolving
            # https://github.com/Julian/jsonschema/issues/98
            # https://python-jsonschema.readthedocs.org/en/latest/references/
            self._resolver = SchemaRefResolver(
                'file://' + self._schema_path + '/', self.schema)
        else:
            self._resolver = SchemaRefResolver.from_schema(self.schema)
        return self._resolver
640186
def _resolve(self):
        """"""
        self.__is_resolved = True
        if self.is_complex:
            type = self.nested if self.nested else self
            type.__reference = self.module.lookup(type.name)
465997
def resolve_service_spec(self, name, lineno):
        """"""

        if name in self.service_specs:
            return self.service_specs[name].link(self)

        if '.' in name:
            include_name, component = name.split('.', 2)
            if include_name in self.included_scopes:
                return self.included_scopes[
                    include_name
                ].resolve_service_spec(component, lineno)

        raise ThriftCompilerError(
            'Unknown service "%s" referenced at line %d%s' % (
                name, lineno, self.__in_path()
            )
        )
203326
def _resolve_rule_refs(self, grammar_parser, model_parser):
        """"""

        def _resolve_rule(rule):
            """
            Recursively resolve peg rule references.

            Args:
                rule(ParsingExpression or RuleCrossRef)
            """
            if not isinstance(rule, RuleCrossRef) and rule in resolved_rules:
                return rule
            resolved_rules.add(rule)

            if grammar_parser.debug:
                grammar_parser.dprint("Resolving rule: {}".format(rule))

            if type(rule) is RuleCrossRef:
                rule_name = rule.rule_name
                suppress = rule.suppress
                if rule_name in model_parser.metamodel:
                    rule = model_parser.metamodel[rule_name]._tx_peg_rule
                    if type(rule) is RuleCrossRef:
                        rule = _resolve_rule(rule)
                        model_parser.metamodel[rule_name]._tx_peg_rule = rule
                    if suppress:
                        # Special case. Suppression on rule reference.
                        _tx_class = rule._tx_class
                        rule = Sequence(nodes=[rule],
                                        rule_name=rule_name,
                                        suppress=suppress)
                        rule._tx_class = _tx_class
                else:
                    line, col = grammar_parser.pos_to_linecol(rule.position)
                    raise TextXSemanticError(
                        'Unexisting rule "{}" at position {}.'
                        .format(rule.rule_name,
                                (line, col)), line, col)

            assert isinstance(rule, ParsingExpression),\
                "{}:{}".format(type(rule), text(rule))

            # Recurse into subrules, and resolve rules.
            for idx, child in enumerate(rule.nodes):
                if child not in resolved_rules:
                    child = _resolve_rule(child)
                    rule.nodes[idx] = child

            return rule

        # Two pass resolving
        for i in range(2):
            if grammar_parser.debug:
                grammar_parser.dprint("RESOLVING RULE CROSS-REFS - PASS {}"
                                      .format(i + 1))

            resolved_rules = set()
            _resolve_rule(model_parser.parser_model)

            # Resolve rules of all meta-classes to handle unreferenced
            # rules also.
            for cls in model_parser.metamodel:
                cls._tx_peg_rule = _resolve_rule(cls._tx_peg_rule)
300473
def resolve(input, representation, resolvers=None, **kwargs):
    
    resultdict = query(input, representation, resolvers, **kwargs)
    result = resultdict[0]['value'] if resultdict else None
    if result and len(result) == 1:
        result = result[0]
    return result
1243320
def _resolved_objects(pdf, xobject):
        """"""
        return [pdf.getPage(i).get(xobject) for i in range(pdf.getNumPages())][0]