Sets user specified settings (see README for more details)
350327
def process_settings(pelicanobj):
    """"""

    # Default settings
    inline_settings = {}
    inline_settings['config'] = {'[]':('', 'pelican-inline')}

    # Get the user specified settings
    try:
        settings = pelicanobj.settings['MD_INLINE']
    except:
        settings = None

    # If settings have been specified, add them to the config
    if isinstance(settings, dict):
        inline_settings['config'].update(settings)

    return inline_settings
36645
def configure(settings: Settings):
    
    if not settings or not isinstance(settings, Settings):
        raise TypeError('Settings is expected to be non-None and of type Settings')
    global SETTINGS  # pylint: disable=global-statement
    SETTINGS = settings
744359
def _configure(configuration_details):
    """"""
    path = Path(configuration_details.path).expanduser()
    with path.open('a') as shell_config:
        shell_config.write(u'\n')
        shell_config.write(configuration_details.content)
        shell_config.write(u'\n')
183639
def _set_prompt(self):
        """"""
        self.cwd = os.getcwd()
        self.prompt = Fore.CYAN + '{!r} $ '.format(self.cwd) + Fore.RESET
1079331
def configure(self, default_settings=global_settings, **options):
        
        if self._wrapped is not empty:
            raise RuntimeError('Settings already configured.')
        holder = UserSettingsHolder(default_settings)
        for name, value in options.items():
            setattr(holder, name, value)
        self._wrapped = holder
979865
private function setSettings()
    {
        // Use faster compression if available
        if (Memcached::HAVE_IGBINARY) {
            $this->memcached->setOption(Memcached::OPT_SERIALIZER, Memcached::SERIALIZER_IGBINARY);
        }
        $this->memcached->setOption(Memcached::OPT_DISTRIBUTION, Memcached::DISTRIBUTION_CONSISTENT);
        $this->memcached->setOption(Memcached::OPT_LIBKETAMA_COMPATIBLE, true);
        $this->memcached->setOption(Memcached::OPT_NO_BLOCK, true);
        $this->memcached->setOption(Memcached::OPT_TCP_NODELAY, true);
        $this->memcached->setOption(Memcached::OPT_COMPRESSION, false);
        $this->memcached->setOption(Memcached::OPT_CONNECT_TIMEOUT, 2);
    }
1373408
def set_settings(self, settings):
        
        for k, v in settings.items():
            setattr(self, k, v)
764027
def setting(self, opt, val):
        """"""
        opt = opt.encode()
        if isinstance(val, basestring):
            fluid_settings_setstr(self.settings, opt, val)
        elif isinstance(val, int):
            fluid_settings_setint(self.settings, opt, val)
        elif isinstance(val, float):
            fluid_settings_setnum(self.settings, opt, val)
1247434
def users_set_preferences(self, user_id, data, **kwargs):
        """"""
        return self.__call_api_post('users.setPreferences', userId=user_id, data=data, kwargs=kwargs)
1005719
def set_napp(self, user, napp, version=None):
        
        self.user = user
        self.napp = napp
        self.version = version or 'latest'
645106
def setUserPasswdCredentials(self, username, password):
        """"""

        self.setCredentialValues(username=username, password=password)
788420
public function editSettings()
    {
        $this->setTitleEditSettings();
        $this->setBreadcrumbEditSettings();

        $this->setData('settings', $this->getModuleSettings('xss'));

        $this->submitSettings();
        $this->setDataEditSettings();
        $this->outputEditSettings();
    }
582401
private function setSystemConfigs(){
		/* Set limiter cache, default: private */
		if($this->getCacheLimiter() != 'nochace' && $this->getCacheLimiter() != 'private' && $this->getCacheLimiter() != 'private_no_expire' && $this->getCacheLimiter() != 'public'){
			$this->getCacheLimiter('private');
		}
		session_cache_limiter($this->getCacheLimiter());


		//Update path to save sessions
		if(!file_exists(PATH_ROOT.$this->getSessionSavePath()) || $this->getSessionSavePath()==''){
			mkdir(PATH_ROOT.$this->getSessionSavePath(), 0777, true);
		}

		/* Set time in seconds for expite sessions */
		session_cache_expire((empty($this->getCacheExpire())?1000:$this->getCacheExpire()));
		session_save_path(PATH_ROOT.$this->getSessionSavePath());

		session_start();
		ob_start();


		$dir_session = session_save_path();
		if ($handle = opendir($dir_session)) {
		  foreach (glob($dir_session."sess_*") as $filename) {
		    if (filemtime($filename) + $this->getCacheExpire() < time()) {
		      @unlink($filename);
		    }
		  }
		}

		/*Set time zone for system */
		if($this->getChaceNavegation()==false){
			header('Expires: Sun, 01 Jan 2017 00:00:00 GMT');
			header('Cache-Control: no-store, no-cache, must-revalidate');
			header('Cache-Control: post-checkcheck=0, pre-check=0', FALSE);
			header('Pragma: no-cache');
		}

		/*Set time zone for system */
		if($this->getDateTimezone()!=''){
			ini_set('date.timezone', $this->getDateTimezone());
		}
		if($this->getUploadMaxFilesize()!=''){
			ini_set("upload_max_filesize", $this->getUploadMaxFilesize());
		}
		if($this->getPostMaxSize()!=''){
			ini_set('post_max_size',$this->getPostMaxSize());
		}

		//Set path for errors
		if(!file_exists(PATH_ROOT.$this->getErrorLog()) || $this->getErrorLog()==''){
			$difLog = explode('/',PATH_ROOT.$this->getErrorLog());
			array_pop($difLog);
			$difLog = implode('/', $difLog).'/';
			if(!file_exists($difLog) || $difLog==''){
				mkdir($difLog, 0777);
			}else{
				chmod($difLog, 0777);
			}
			$file = fopen(PATH_ROOT.$this->getErrorLog(), "w+") or die("Arquivo de log não pode ser aberto!");
			chmod(PATH_ROOT.$this->getErrorLog(), 0777);
			$txt = "Created: ".date('d-m-Y H:m:i')."\n";
			fwrite($file, $txt);
			fclose($file);
		}
		ini_set('error_log'	, 	PATH_ROOT.$this->getErrorLog());

		// error log
		if($this->getDisplayErrors()!='On' && $this->getDisplayErrors()!='Off' && $this->getDisplayErrors()!=''){
			throw new \Exception("setSystemConfigs() Valor de display_errors deve ser 'On', 'Off' ou ''.");
		}else if($this->getDisplayErrors()!=''){
			ini_set('display_errors'	, 	$this->getDisplayErrors());
		}

		//Set if have log errors
		if($this->getLogErrors()!='On' && $this->getLogErrors()!='Off' && $this->getLogErrors()!=''){
			throw new \Exception("setSystemConfigs() Valor de log_errors deve ser 'On', 'Off' ou ''.");
		}else if($this->getLogErrors()!=''){
			ini_set('log_errors'	, 	$this->getLogErrors());
		}


		//Set o tipo de erro
		if($this->getErrorReporting()!='' && array_search($this->getErrorReporting(), array("E_ERROR","E_WARNING","E_PARSE","E_NOTICE","E_CORE_ERROR","E_CORE_WARNING","E_COMPILE_ERROR","E_COMPILE_WARNING","E_USER_ERROR","E_USER_WARNING","E_USER_NOTICE","E_ALL","E_STRICT","E_RECOVERABLE_ERROR","0"))==''){
			$this->setErrorReporting('E_ALL');
		}
		if($this->getErrorReporting()!=''){

			switch ($this->getErrorReporting()) {
				case "E_ERROR"				: error_reporting(E_ERROR); 				break;
				case "E_WARNING"			: error_reporting(E_WARNING); 				break;
				case "E_PARSE"				: error_reporting(E_PARSE); 				break;
				case "E_NOTICE"				: error_reporting(E_NOTICE); 				break;
				case "E_CORE_ERROR"			: error_reporting(E_CORE_ERROR); 			break;
				case "E_CORE_WARNING"		: error_reporting(E_CORE_WARNING); 			break;
				case "E_COMPILE_ERROR"		: error_reporting(E_COMPILE_ERROR); 		break;
				case "E_COMPILE_WARNING"	: error_reporting(E_COMPILE_WARNING); 		break;
				case "E_USER_ERROR"			: error_reporting(E_USER_ERROR); 			break;
				case "E_USER_WARNING"		: error_reporting(E_USER_WARNING); 			break;
				case "E_USER_NOTICE"		: error_reporting(E_USER_NOTICE); 			break;
				case "E_ALL"				: error_reporting(E_ALL); 					break;
				case "E_STRICT"				: error_reporting(E_STRICT); 				break;
				case "E_RECOVERABLE_ERROR"	: error_reporting(E_RECOVERABLE_ERROR); 	break;

				default: error_reporting(0); break;
			}
		}


		/* Define o limitador de cache para 'private' */
		if($this->getLocale()==''){
			$this->setLocale('pt_BR');
		}
		setlocale(LC_CTYPE, $this->getLocale());
	}
453168
function configure(alg, pswd, sto) {
  algorithm = alg;
  password = pswd;
  sessionTimeout = sto;
}
1278572
public void setDefaultUserSettings(CmsDefaultUserSettings defaultUserSettings) {

        m_defaultUserSettings = defaultUserSettings;

        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(
                Messages.get().getBundle().key(
                    Messages.INIT_DEFAULT_USER_SETTINGS_1,
                    m_defaultUserSettings.getClass().getName()));
        }
    }
830248
public void setUserParam(String user) {
		try {
			getSipURI().setUserParam(user);
			super.parameters.put(USER, user);
		} catch (ParseException e) {
			logger.error("error setting parameter ", e);
		}
	}
674819
def set_item_data(self, item, filename, line_number):
        """"""
        set_item_user_text(item, '%s%s%d' % (filename, self.SEP, line_number))