Returns true if SPA (Single Page App) mode is enabled.
196628
public static boolean isSpaEnabled() {
        Configuration config = ConfigUtils.getCurrentConfig();
        if (config != null) {
            return config.getBoolean(SPA_ENABLED_CONFIG_KEY, false);
        } else {
            return false;
        }
    }
446712
final public function isEnabled() {
		
		if ($this->disabled) {
			return FALSE;
		}
		
		$app = Application::getInstance();
		$router = Router::getInstance();
		
		// no logs on command line and web API
		if ('cli' == php_sapi_name() or 'api' == $router->module) {
			
			return FALSE;
			
		// user is defined, could be admin
		} else if ($app->currentUser) {
			
			return (Options::get('show_log') and $app->currentUser->admin);
		
		// no logs on login page
		} else if ('user' == $router->module and 'login' == $router->action) {
				
			return FALSE;
					
		// no login, no user defined, collects logs
		} else {
			
			return TRUE;
			
		}
		
	}
80234
def is_in_schedule_mode(self):
        """"""
        resource = "schedule"
        mode_event = self.publish_and_get_event(resource)
        if mode_event and mode_event.get("resource", None) == "schedule":
            properties = mode_event.get('properties')
            return properties.get("active", False)
        return False
755248
public function isHintEnabled()
    {
        $isParamPresent = $this->_request->getParam('ath', false) === '1';

        if ($isParamPresent) {
            $applicationMode = $this->appState->getMode();
            $storeId = $this->storeManager->getStore()->getId();

            if ($applicationMode === AppState::MODE_DEVELOPER || $this->developerHelper->isDevAllowed($storeId)) {
                return true;
            }
        }

        return false;
    }
819755
public function isEnabled()
    {
        if (null === $this->enablePdfPreview) {
            $this->enablePdfPreview = $this->getContainer()->getParameter('kunstmaan_media.enable_pdf_preview');
        }

        return $this->enablePdfPreview;
    }
984422
def is_enabled(self, cls):
        """"""
        if cls not in self.enabled:
            self.enabled[cls] = self.is_component_enabled(cls)
        return self.enabled[cls]
475036
function enabled(name) {
		if (name[name.length - 1] === '*') {
			return true;
		}

		let i;
		let len;

		for (i = 0, len = createDebug.skips.length; i < len; i++) {
			if (createDebug.skips[i].test(name)) {
				return false;
			}
		}

		for (i = 0, len = createDebug.names.length; i < len; i++) {
			if (createDebug.names[i].test(name)) {
				return true;
			}
		}

		return false;
	}
498532
def server_enabled(s_name, **connection_args):
    '''
    
    '''
    server = _server_get(s_name, **connection_args)
    return server is not None and server.get_state() == 'ENABLED'
347792
def is_standalone(self):
        """"""
        return (not self.args.client and
                not self.args.browser and
                not self.args.server and
                not self.args.webserver)
1101943
public static function is_enabled() {
        global $CFG;

        // Check whether Inbound Message is enabled at all.
        if (!isset($CFG->messageinbound_enabled) || !$CFG->messageinbound_enabled) {
            return false;
        }

        // Check whether the outgoing mailbox and domain are configured properly.
        if (!isset($CFG->messageinbound_mailbox) || empty($CFG->messageinbound_mailbox)) {
            return false;
        }

        if (!isset($CFG->messageinbound_domain) || empty($CFG->messageinbound_domain)) {
            return false;
        }

        return true;
    }
661849
public boolean isServeServletsByClassnameEnabled() {
        // PK52059 START
        disallowServeServletsByClassnameProp = WCCustomProperties.DISALLOW_SERVE_SERVLETS_BY_CLASSNAME_PROP;
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {
            logger.logp(Level.FINE, CLASS_NAME, "isServeServletsByClassnameEnabled", "disallowServeServletsByClassnameProp = " + disallowServeServletsByClassnameProp);
        }
        if (disallowServeServletsByClassnameProp != null) {
            try {
                if (Boolean.valueOf(disallowServeServletsByClassnameProp).booleanValue()) {
                    this.serveServletsByClassnameEnabled = Boolean.FALSE;
                }
                if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {
                    logger.logp(Level.FINE, CLASS_NAME, "isServeServletsByClassnameEnabled", "PK52059: disallowServeServletsByClassnameProp set to "
                                    + disallowServeServletsByClassnameProp
                                    + " for application: " + this.getApplicationName());
                }
            } catch (Exception x) {
                logger.logp(Level.SEVERE, CLASS_NAME, "isServeServletsByClassnameEnabled",
                                "Illegal value set for property com.ibm.ws.webcontainer.disallowserveservletsbyclassname");
            }
        }  // PK52059 END

        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {
            logger.logp(Level.FINE, CLASS_NAME, "isServeServletsByClassnameEnabled", "value = " + (this.serveServletsByClassnameEnabled != null ? this.serveServletsByClassnameEnabled.booleanValue() : WCCustomProperties.SERVE_SERVLETS_BY_CLASSNAME_ENABLED));
        }

        if (this.serveServletsByClassnameEnabled != null) 
            return this.serveServletsByClassnameEnabled.booleanValue();

        return WCCustomProperties.SERVE_SERVLETS_BY_CLASSNAME_ENABLED;
    }
912580
def is_enabled(self):
        
        if self.name in settings.exclude_rules:
            return False
        elif self.name in settings.rules:
            return True
        elif self.enabled_by_default and ALL_ENABLED in settings.rules:
            return True
        else:
            return False
1321173
def enabled(name, **kwargs):
    '''
    
    '''
    if _service_is_upstart(name):
        return _upstart_is_enabled(name)
    else:
        if _service_is_sysv(name):
            return _sysv_is_enabled(name)
    return None
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;
    }
811740
private boolean isLastPage(CmsClientSitemapEntry entry) {

        return ((entry.isInNavigation() && (entry.getId().toString().equals(m_controller.getData().getReturnCode())))
            || ((entry.getDefaultFileId() != null)
                && entry.getDefaultFileId().toString().equals(m_controller.getData().getReturnCode())));
    }
605421
public static function isEnabled()
    {
        if (!self::$_checkedEnabled) {
            self::$_checkedEnabled = true;

            $conf = self::getConfiguration();

            $enabled = false;
            if (strtolower($conf->trigger) == 'always') {
                $enabled = true;
            } elseif (strtolower($conf->trigger) == 'parameter') {
                if ((isset($_GET['profile']) && $_GET['profile'] == true) || (isset($_COOKIE['profile']) && $_COOKIE['profile'] == true)) {
                    $enabled = true;
                }
            }

            // Process filters
            if ($enabled && $conf->enableFilters) {

                // sampling filter
                if ($enabled && rand(0,100000) > $conf->filters->sampling * 1000) {
                    $enabled = false;
                }

                // request uri whitelist/blacklist
                $requestUri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; // TODO: use script name instead for cli?
                if ($enabled && $conf->filters->requestUriWhiteList && !preg_match($conf->filters->requestUriWhiteList, $requestUri)) {
                    $enabled = false;
                }
                if ($enabled && $conf->filters->requestUriBlackList && preg_match($conf->filters->requestUriBlackList, $requestUri)) {
                    $enabled = false;
                }

                // note: timeThreshold and memoryThreshold will be checked before persisting records. In these cases data will still be recorded during the request
            }

            if ($enabled) {
                self::enable();
            }
        }
        return self::$_enabled;
    }
1147335
function isDisabled(app, key, prop) {
  // key + '.plugin'
  if (app.isFalse([key, prop])) {
    return true;
  }
  // key + '.plugin.disable'
  if (app.isTrue([key, prop, 'disable'])) {
    return true;
  }
  return false;
}