Auto-resolve function
427114
public static function resolve(){

        $aArgs = func_get_args();

        $aDebug = debug_backtrace(1);

        if(isset($aDebug[1])){

            $oDebug = $aDebug[1];

            $function = $oDebug['function'];
            $class = $oDebug['class'];

            if(!empty($aArgs)){
                $args = $aArgs;
            } else {
                $args = $oDebug['args'];
            }

            $app = $class::getFacadeApplication();

            return call_user_func_array( array($app[$class::getFacadeAccessor()], $function), $args);
        } else {
            Throw new \Exception('Cannot resolve this function');
        }
    }
1215410
function resolveItem(arg) {
  if (Array.isArray(arg)) {
    return resolveArray(arg);
  } else if (Object.prototype.toString.call(arg) === '[object Function]') {
    //is a function
    return Promise.method(arg)().then(resolveItem);
  } else if (isThenable(arg)) {
    //is a promise
    return arg.then(resolveItem);
  } else if (arg && typeof arg === 'object') {
    //is an object
    if (typeof arg.toString === 'function') {
      var value = arg.toString();
      if (value !== '[object Object]') {
        //with a valid toString
        return Promise.resolve(value);
      }
    }
    return resolveObject(arg);
  } else {
    //Yeah! a value
    return Promise.resolve(arg);
  }
}
1067586
def auto_consume(func):
    """"""
    def inner(*args, **kwargs):
        func(*args, **kwargs)
        args[0].consume_line()
    return inner
496923
async def resolve(self, client):
        """"""
        if self.resolved:
            return

        if not self._resolve_lock:
            self._resolve_lock = asyncio.Lock(loop=client.loop)

        async with self._resolve_lock:
            if not self.resolved:
                await self._resolve(client)
                self.resolved = True
629451
function resolve() {
            resolvePath(path, function (err, _resolvedPath) {
                if (err) {
                    if (err.code !== "ENOENT") {
                        return error(err);
                    }
                    // If checkSymlinks is on we'll get an ENOENT when creating a new file.
                    // In that case, just resolve the parent path and go from there.
                    resolvePath(dirname(path), function (err, dir) {
                        if (err) return error(err);
                        resolvedPath = join(dir, basename(path));
                        createTempFile();
                    });
                    return;
                }
                
                resolvedPath = _resolvedPath;
                createTempFile();
            });
        }
31927
function resolve (resolve) {
    if (defined(resolve)) {
        // set default
        immutable.defaultResolve = resolve ? true : false
        // return immutable
        return ImmutableCore
    }
    // return default value
    return immutable.defaultResolve
}
1129409
def resolve_keys(self, keys, auto_create=False):
        
        resolved = {}
        success = True
        for key in keys:
            if auto_create:
                resolved[key] = self.find(*key)
            else:
                try:
                    resolved[key] = self.get_by_natural_key(*key)
                except self.model.DoesNotExist:
                    success = False
                    resolved[key] = None
        return resolved, success
677246
def _click_resolve_command(root, parts):
    """"""
    location = root
    incomplete = ''
    for part in parts:
        incomplete = part

        if not part[0:2].isalnum():
            continue

        try:
            next_location = location.get_command(click.Context(location),
                                                 part)
            if next_location is not None:
                location = next_location
                incomplete = ''
        except AttributeError:
            break
    return location, incomplete
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
152605
function resolve(){
		LRState::clear_index();
		LRStation::clear_index();
		// create Root Set
		// we SHOULD have a single etransition to an intial state
		return LRStateSet::init( $this->etransitions[0], $this->Grammar );
	}
361081
def _auto_fill_defaults(cls):
        """"""
        if not cls.spec.appname:
            cls.spec.appname = get_basename(get_program_path())
        if not cls.spec.dev:
            cls.spec.dev = get_dev_folder()
1137783
function resolveString () {
    // resolve with original value unless value is id
    if (!this.value.match(idRegExp)) {
        return Promise.resolve(value)
    }
    // do query
    return this.model.query(this.getQueryArgs(this.value))
}
114937
def auto_update(cls, function):
        

        def wrapper(self, *args, **kwargs):
            f = function(self, *args, **kwargs)
            self.update()
            return f
        return wrapper
1087676
function internalResolve ( resolve ) {
	resolve(window.google && window.google.maps ? window.google.maps : false);
}
1153784
def default_resolve_fn(source, info, **args):
    # type: (Any, ResolveInfo, **Any) -> Optional[Any]
    """"""
    name = info.field_name
    if isinstance(source, dict):
        property = source.get(name)
    else:
        property = getattr(source, name, None)
    if callable(property):
        return property()
    return property
416771
function resolvePreset(preset) {
  let fn, options;

  if (Array.isArray(preset)) {
    fn = preset[0];
    options = preset[1];
  } else {
    fn = preset;
    options = {};
  }

  // For JS setups where we invoked the preset already
  if (preset.plugins) {
    return Promise.resolve(preset.plugins);
  }

  // Provide an alias for the default preset, as it is built-in.
  if (fn === 'default') {
    return Promise.resolve(require('cssnano-preset-default')(options).plugins);
  }

  // For non-JS setups; we'll need to invoke the preset ourselves.
  if (typeof fn === 'function') {
    return Promise.resolve(fn(options).plugins);
  }

  // Try loading a preset from node_modules
  if (isResolvable(fn)) {
    return Promise.resolve(require(fn)(options).plugins);
  }

  const sugar = `cssnano-preset-${fn}`;

  // Try loading a preset from node_modules (sugar)
  if (isResolvable(sugar)) {
    return Promise.resolve(require(sugar)(options).plugins);
  }

  // If all else fails, we probably have a typo in the config somewhere
  throw new Error(
    `Cannot load preset "${fn}". Please check your configuration for errors and try again.`
  );
}
642894
function loadFunction (js, resolver) {
        immediate(function () {
            try {
                js.call(null, resolver);
            }
            catch (e) {
                resolver.reject(e);
            }
        });
    }