check if script is available and initialized.

@return true if it exists
761309
public static boolean isInitialized(final String scriptname) {
    final boolean loaded = JsResources.rememberEvent != null || StringUtils.isEmpty(scriptname);
    return loaded || JsResources.isInHeader(scriptname);
  }
911085
private String loadScript() throws CmdLineException, IOException, InterruptedException {
        if(script==null)
            throw new CmdLineException(null, "No script is specified");
        if (script.equals("="))
            return IOUtils.toString(stdin);

        checkChannel();
        return null; // never called
    }
9864
public boolean createSchema() {
		List<Resource> scripts = getScripts("spring.datasource.schema",
				this.properties.getSchema(), "schema");
		if (!scripts.isEmpty()) {
			if (!isEnabled()) {
				logger.debug("Initialization disabled (not running DDL scripts)");
				return false;
			}
			String username = this.properties.getSchemaUsername();
			String password = this.properties.getSchemaPassword();
			runScripts(scripts, username, password);
		}
		return !scripts.isEmpty();
	}
919187
public function is_available() {
        $target = $this->get_target();
        if (!$target) {
            return false;
        }

        $classname = $target->get_analyser_class();
        if (!class_exists($classname)) {
            return false;
        }

        return true;
    }
700056
private boolean isReady() {
    if (this.status != Status.READY) {
      // e.g. if the node is disabled, it is not ready to run.
      return false;
    }
    for (final Node parent : this.parents) {
      if (!parent.status.isSuccessEffectively()) {
        return false;
      }
    }
    return true;
  }
192312
public boolean isWatched(TransactionBag transactionBag) {
        try {
            Script script = getScriptPubKey();
            return transactionBag.isWatchedScript(script);
        } catch (ScriptException e) {
            // Just means we didn't understand the output of this transaction: ignore it.
            log.debug("Could not parse tx output script: {}", e.toString());
            return false;
        }
    }
151497
public static boolean isLegacyJavaScript()
    {
        if (javascriptMode == -1) {
            setLegacyJavaScriptMode();
        }
        assert(javascriptMode != -1);
        return (javascriptMode == IdJavascript.INT_LEGACY
                || javascriptMode == IdJavascript.INT_LEGACY_ONLY);
    }
905830
@Override
    public boolean hasInstance(Scriptable value) {
        Scriptable proto = value.getPrototype();
        while (proto != null) {
            if (proto.equals(this))
                return true;
            proto = proto.getPrototype();
        }

        return false;
    }
921063
@Override
    public boolean has(int index, Scriptable start)
    {
        if (externalData != null) {
            return (index < externalData.getArrayLength());
        }
        return null != slotMap.query(null, index);
    }
518008
public Script getScriptSig() throws ScriptException {
        // Transactions that generate new coins don't actually have a script. Instead this
        // parameter is overloaded to be something totally different.
        Script script = scriptSig == null ? null : scriptSig.get();
        if (script == null) {
            script = new Script(scriptBytes);
            scriptSig = new WeakReference<>(script);
        }
        return script;
    }
271761
function(){
		var i, script,
		  scripts = doc[STR_GET_BY_TAG]('script');
		for (i = scripts.length - 1; i > -1 && (script = scripts[i]); i--) {
			if (script.readyState === 'interactive') {
				return script;
			}
		}
	}
1070837
private boolean isApplicationFound(String applicationName) {
        boolean applicationFinded = false;
        List<String> appList = application.get();
        if (!appList.isEmpty()) {
            if (appList.contains(applicationName)) {
                applicationFinded = true;
            } else {
                logger.info("Application [{}] do not exist. You must create an application named [{}] first.", applicationName, applicationName);
            }
        } else {
            logger.info(CLI_YOU_MUST_CREATE_AN_APPLICATION_FIRST);
        }
        return applicationFinded;
    }
6262
public boolean hasModuleResourcesWithUndefinedSite() {

        if (getSite() == null) {
            for (String modRes : getResources()) {
                if (!CmsStringUtil.isPrefixPath("/system/", modRes)
                    && !OpenCms.getSiteManager().startsWithShared(modRes)) {
                    return true;
                }

            }
        }
        return false;
    }
174821
def on_startup(self):
        

        LOGGER.debug("> Calling '{0}' Component Framework 'on_startup' method.".format(self.__class__.__name__))

        factory_default_script_editor_file = umbra.ui.common.get_resource_path(
            self.__factory_default_script_editor_file)
        if foundations.common.path_exists(factory_default_script_editor_file) and \
                not foundations.common.path_exists(self.__default_script_editor_file):
            shutil.copyfile(factory_default_script_editor_file, self.__default_script_editor_file)

        if foundations.common.path_exists(self.__default_script_editor_file):
            self.load_file(self.__default_script_editor_file)
        else:
            self.new_file()

        startup_script = self.__engine.parameters.startup_script
        if foundations.common.path_exists(startup_script):
            self.load_file(startup_script) and self.evaluate_script()

        self.restore_session()

        for argument in self.__engine.arguments[1:]:
            file = os.path.abspath(argument)
            if foundations.common.path_exists(file):
                os.path.isfile(file) and self.load_file(file)

        return True
99053
def script_exists(self, digest, *digests):
        """"""
        return self.execute(b'SCRIPT', b'EXISTS', digest, *digests)
228847
static synchronized boolean isJettyAlpnConfigured() {
    try {
      Class.forName("org.eclipse.jetty.alpn.ALPN", true, null);
      return true;
    } catch (ClassNotFoundException e) {
      jettyAlpnUnavailabilityCause = e;
      return false;
    }
  }
1308137
private Set<Class<? extends S>> findInstanceAbleScript(Set<Class<? extends S>> scriptClazzs)
			throws InstantiationException, IllegalAccessException {
		Set<Class<? extends S>> result=new HashSet<>();
		for (Class<? extends S> scriptClazz : scriptClazzs) 
		{
			S script = getInstacne(scriptClazz);
			if(script==null)
			{
				continue;
			}
			if(skipRegistScript(script))
			{
				_log.warn("skip regist script,class=" + script.getClass());
				continue;
			}
			result.add(scriptClazz);
		}
		return result;
	}