Determines whether system properties should override Selenium configuration in wiki.
If so Selenium will be configured according to property values, and locked so that wiki pages
no longer control Selenium setup.
@return true if Selenium was configured.
194930
protected boolean configureSeleniumIfNeeded() {
        setSeleniumDefaultTimeOut();
        try {
            DriverFactory factory = null;
            SeleniumDriverFactoryFactory factoryFactory = getSeleniumDriverFactoryFactory();
            if (factoryFactory != null) {
                factory = factoryFactory.getDriverFactory();

                if (factory != null) {
                    SeleniumDriverSetup.lockConfig();
                    Environment.getInstance().getSeleniumDriverManager().setFactory(factory);
                }
            }

            return factory != null;
        } catch (Exception e) {
            throw new RuntimeException("Error overriding Selenium config", e);
        }
    }
6262
public boolean hasModuleResourcesWithUndefinedSite() {

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

            }
        }
        return false;
    }
1260465
public function hasConfig() {
		if ($this->_configSupplied !== null) {
			return true;
		}
		
		if ($this instanceof LocatorAwareInterface && $this->hasLocator()
			&& $this->getLocator()->has($this->getConfigServiceId())) {
			return true;
		}
		
		return false;
	}
40311
public boolean isJavaScriptEnabled()
    {
        if (javaScriptEnabled == null)
        {
            synchronized(this)
            {
                // double lock checking idiom on volatile variable works since java5
                if (javaScriptEnabled == null)
                {
                    // no info means that it is default -> true
                    javaScriptEnabled = Boolean.TRUE;

                    FacesContext facesContext = FacesContext.getCurrentInstance();
                    if (facesContext != null)
                    {
                        Cookie cookie = (Cookie) facesContext.getExternalContext().
                                getRequestCookieMap().get(COOKIE_NAME_NOSCRIPT_ENABLED);
                        if (cookie!= null)
                        {
                            javaScriptEnabled = Boolean.parseBoolean((String) cookie.getValue());
                        }
                    }
                }
            }
        }
        return javaScriptEnabled;
    }
667182
public static function checkBrowserLynx()
    {
        if (stripos(self::$userAgentString, 'lynx') !== false) {
            $aresult = explode('/', stristr(self::$userAgentString, 'Lynx'));
            $aversion = explode(' ', (isset($aresult[1]) ? $aresult[1] : ''));
            self::$browser->setVersion($aversion[0]);
            self::$browser->setName(Browser::LYNX);

            return true;
        }

        return false;
    }
470761
public function has_overrides() {
        global $DB;

        $override = $DB->record_exists('assign_overrides', array('assignid' => $this->get_instance()->id));

        if ($override) {
            return true;
        }

        return false;
    }
861804
public boolean isModified()
    {
        gatekeeper.signIn();
        try
        {
            for (ChangeStack<String> stack : properties.values())
            {
                if (stack.isModified())
                {
                    return true;
                }
            }

            return false;
        }
        finally
        {
            gatekeeper.signOut();
        }
    }
1042369
private boolean runConfig()
	{
		if (lineSeparator == null)
		{
			logger.debug("Set lineSeparator");
			return false;
		}
		if (categoryIdentifers == null)
		{
			logger.warn("Set categoryIdentifers");
			return false;
		}
		if (languageIdentifers == null)
		{
			logger.warn("Set languageIdentifers");
			return false;
		}
		if (imageIdentifers == null)
		{
			logger.warn("Set imageIdentifers");
			return false;
		}
		if (templateParser == null)
		{
			logger.warn("Set templateParser");
			return false;
		}
		return true;
	}
273654
public boolean isSyncEnabled() {

        CmsSynchronizeSettings syncSettings = getSettings().getUserSettings().getSynchronizeSettings();
        return (syncSettings != null) && syncSettings.isSyncEnabled();
    }
181069
@Override
	public final boolean configChanged() {
		int currentConfigHash = doReadConfig().hashCode();
		boolean configChanged = this.propsHashCode != currentConfigHash;

		if (configChanged && LOGGER.isDebugEnabled()){
			LOGGER.debug("Changes in Jawr configuration properties file detected.");
		}
		
		this.propsHashCode = currentConfigHash;

		return configChanged;
	}
64384
public boolean doesSSLConfigExist(String sslAliasName) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "doesSSLConfigExist", new Object[] { sslAliasName });

        if (sslAliasName == null)
            throw new IllegalArgumentException("sslAliasName is null.");

        boolean exists = (null != SSLConfigManager.getInstance().getProperties(sslAliasName));

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "doesSSLConfigExist -> " + exists);
        return exists;
    }
654809
def is_provider_configured(opts, provider, required_keys=(), log_message=True, aliases=()):
    '''
    
    '''
    if ':' in provider:
        alias, driver = provider.split(':')
        if alias not in opts['providers']:
            return False
        if driver not in opts['providers'][alias]:
            return False
        for key in required_keys:
            if opts['providers'][alias][driver].get(key, None) is None:
                if log_message is True:
                    # There's at least one require configuration key which is not
                    # set.
                    log.warning(
                        "The required '%s' configuration setting is missing "
                        "from the '%s' driver, which is configured under the "
                        "'%s' alias.", key, provider, alias
                    )
                return False
        # If we reached this far, there's a properly configured provider.
        # Return it!
        return opts['providers'][alias][driver]

    for alias, drivers in six.iteritems(opts['providers']):
        for driver, provider_details in six.iteritems(drivers):
            if driver != provider and driver not in aliases:
                continue

            # If we reached this far, we have a matching provider, let's see if
            # all required configuration keys are present and not None.
            skip_provider = False
            for key in required_keys:
                if provider_details.get(key, None) is None:
                    if log_message is True:
                        # This provider does not include all necessary keys,
                        # continue to next one.
                        log.warning(
                            "The required '%s' configuration setting is "
                            "missing from the '%s' driver, which is configured "
                            "under the '%s' alias.", key, provider, alias
                        )
                    skip_provider = True
                    break

            if skip_provider:
                continue

            # If we reached this far, the provider included all required keys
            return provider_details

    # If we reached this point, the provider is not configured.
    return False
1081563
public function isElementHidden($elementName)
	{
		if( $this->settingExists($elementName) ? $settings = $this->getSetting($elementName) : false)
		{
			if(isset($settings['hidden']) && $settings['hidden'] == true)
			{
				return true;
			}
		}
		return false;
	}
315623
private static boolean configurationBoolean(Properties properties, String key, boolean defaultValue)
   {
      if (properties != null)
      {
         if (properties.containsKey(key))
            return Boolean.valueOf(properties.getProperty(key));
      }

      return defaultValue;
   }
424866
def is_private(self):
        
        self.switch_to()
        with self.selenium.context(self.selenium.CONTEXT_CHROME):
            return self.selenium.execute_script(
                """
                Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");

                let chromeWindow = arguments[0].ownerDocument.defaultView;
                return PrivateBrowsingUtils.isWindowPrivate(chromeWindow);
                """,
                self.document_element,
            )
1234660
public boolean overrides(ExecutableElement e1, ExecutableElement e2, TypeElement cls) {
        MethodSymbol rider = (MethodSymbol)e1;
        MethodSymbol ridee = (MethodSymbol)e2;
        ClassSymbol origin = (ClassSymbol)cls;

        return rider.name == ridee.name &&

               // not reflexive as per JLS
               rider != ridee &&

               // we don't care if ridee is static, though that wouldn't
               // compile
               !rider.isStatic() &&

               // Symbol.overrides assumes the following
               ridee.isMemberOf(origin, toolEnv.getTypes()) &&

               // check access, signatures and check return types
               rider.overrides(ridee, origin, toolEnv.getTypes(), true);
    }
84600
public function check()
    {
        $result = true;

        $configurationSettings = [
            'Database.Host',
            'Database.Username',
            'Database.Password',
            'Database.Port',
            'Database.Name',
        ];

        foreach ($configurationSettings as $setting) {
            if ($this->configuration->hasConfigurationKey($setting) === false) {
                $this->missingConfiguration[] = $setting;
                $result = false;
            }
        }

        return $result;
    }