check if script is available and initialized.

@return true if it exists
192345
public static boolean isInitialized() {
    final boolean loaded = WebshimResources.rememberEvent != null
        || StringUtils.isEmpty(WebshimResources.POLIFILLER_URL);
    return loaded || WebshimResources.isInHeader();
  }
1069352
public function shouldLoadMinifiedJavascript()
    {
        if (isset($this->settings['userInterface']['loadMinifiedJavaScript'])) {
            return $this->settings['userInterface']['loadMinifiedJavaScript'];
        } elseif (isset($this->settings['userInterface']['loadMinifiedJavascript'])) {
            return $this->settings['userInterface']['loadMinifiedJavascript'];
        }
        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;
  }
515593
function() {
			var pending	= this.pending,
				script;

			for(var name in pending) {
				if (!pending.hasOwnProperty(name)) { continue; }
				var cycle = pending[name].cycle();
				if (cycle) {
					cycle[0].allow(cycle[1]);
					this.load(cycle[0]);
					return true;
				}
			}
		}
1263288
protected boolean isCachable(ScriptEngine scriptEngine) {
    // Check if script-engine supports multithreading. If true it can be cached.
    Object threadingParameter = scriptEngine.getFactory().getParameter("THREADING");
    return threadingParameter != null;
  }
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;
    }
370094
def is_script(filename):
    '''
    '''
    if not os.path.isfile(filename):
        return False

    try:
        with open(filename, 'rb') as fp:
            return fp.read(2) == b'#!'
    except IOError:
        pass

    return False
828175
private boolean isReady() {

		assert disposed != null;
		assert open != null;

		if (disposed.get()) {
			LOG.warn("Cannot get image, webcam has been already disposed");
			return false;
		}

		if (!open.get()) {
			if (autoOpen) {
				open();
			} else {
				return false;
			}
		}

		return true;
	}
727141
@Override
    public Boolean isReady() {
        try {
            validateInitialization();
            validateActivation();
            validateMiddleware();
            return true;
        } catch (InvalidStateException e) {
            return false;
        }
    }
155681
public static boolean isInHeader(final String scriptname) {
    final NodeList linkList =
        Browser.getDocument().getHead().getElementsByTagName(CssResources.TAG_TYPE);
    for (int i = 0; i < linkList.getLength(); i++) {
      final LinkElement linkTag = (LinkElement) linkList.item(i);
      if (StringUtils.equals(linkTag.getType(), CssResources.SCRIPT_TYPE)
          && StringUtils.equals(linkTag.getRel(), CssResources.REL_TYPE)
          && StringUtils.contains(linkTag.getHref(), scriptname)) {
        return true;
      }
    }
    return false;
  }
977236
public boolean isSet() {
        if (isUsageMode()) {
            return true;
        }
        if (getJobFile() != null) {
            return true;
        }
        if (getListType() != null) {
            return true;
        }
        return false;
    }
1201076
def __IsInitialized(self):      
      
    is_initialized = False
    iam_id = self.GetAccessKeyId()
    if iam_id:
      if core.CirrusAccessIdMetadata(self.s3, iam_id).IsInitialized():
        is_initialized = True
    return is_initialized
548937
protected boolean isDbInitialized(final Connection con)
   {
      return SecurityHelper.doPrivilegedAction(new PrivilegedAction<Boolean>()
      {

         public Boolean run()
         {
            return JDBCUtils.tableExists(configTableName, con);
         }
      });
   }
864096
public static boolean isSentToMultisig(Script script) {
        List<ScriptChunk> chunks = script.chunks;
        if (chunks.size() < 4) return false;
        ScriptChunk chunk = chunks.get(chunks.size() - 1);
        // Must end in OP_CHECKMULTISIG[VERIFY].
        if (!chunk.isOpCode()) return false;
        if (!(chunk.equalsOpCode(OP_CHECKMULTISIG) || chunk.equalsOpCode(OP_CHECKMULTISIGVERIFY))) return false;
        try {
            // Second to last chunk must be an OP_N opcode and there should be that many data chunks (keys).
            ScriptChunk m = chunks.get(chunks.size() - 2);
            if (!m.isOpCode()) return false;
            int numKeys = decodeFromOpN(m.opcode);
            if (numKeys < 1 || chunks.size() != 3 + numKeys) return false;
            for (int i = 1; i < chunks.size() - 2; i++) {
                if (chunks.get(i).isOpCode()) return false;
            }
            // First chunk must be an OP_N opcode too.
            if (decodeFromOpN(chunks.get(0).opcode) < 1) return false;
        } catch (IllegalStateException e) {
            return false;   // Not an OP_N opcode.
        }
        return true;
    }
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;
    }
1262100
public boolean checkCleanStart() {
        String fwClean = get(BootstrapConstants.INITPROP_OSGI_CLEAN);
        if (fwClean != null && fwClean.equals(BootstrapConstants.OSGI_CLEAN_VALUE)) {
            return true;
        }

        String osgiClean = get(BootstrapConstants.OSGI_CLEAN);
        return Boolean.valueOf(osgiClean);
    }
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;
			}
		}
	}