Converts an array of init params to a Dictionary.

@param initParams array to be converted
@return Dictionary of init params
768982
public static Dictionary<String, String> convertInitParams(
			final WebAppInitParam[] initParams) {
		if (initParams == null || initParams.length == 0) {
			return null;
		}
		Hashtable<String, String> dictionary = new Hashtable<>();
		for (WebAppInitParam initParam : initParams) {
			dictionary.put(initParam.getParamName(), initParam.getParamValue());
		}
		return dictionary;
	}
1071350
private MappedParametrizedObjectEntry prepareISPNParameters(InitParams initParams) throws RepositoryException
   {
      MappedParametrizedObjectEntry qmEntry = new QuotaManagerEntry();

      putDefaultValues(qmEntry);
      putConfiguredValues(initParams, qmEntry);

      ISPNCacheFactory.configureCacheStore(qmEntry, INFINISPAN_JDBC_CL_DATASOURCE,
         INFINISPAN_JDBC_CL_DATA_COLUMN_TYPE, INFINISPAN_JDBC_CL_ID_COLUMN_TYPE,
         INFINISPAN_JDBC_CL_TIMESTAMP_COLUMN_TYPE, INFINISPAN_JDBC_CL_DIALECT);

      return qmEntry;
   }
283754
@Override
    public void init(final FilterConfig filterConfig) throws ServletException {

        // verify there are no init parameters configured that are not recognized
        // since an unrecognized init param might be the adopter trying to configure this filter in
        // an important way
        // and accidentally ignoring that intent might have security implications.
        final Enumeration initParamNames = filterConfig.getInitParameterNames();
        throwIfUnrecognizedParamName(initParamNames);

        final String initParamAllowMultiValuedParameters =
                filterConfig.getInitParameter(ALLOW_MULTI_VALUED_PARAMETERS);
        final String initParamParametersToCheck =
                filterConfig.getInitParameter(PARAMETERS_TO_CHECK);
        final String initParamCharactersToForbid =
                filterConfig.getInitParameter(CHARACTERS_TO_FORBID);

        try {
            this.allowMultiValueParameters =
                    parseStringToBooleanDefaultingToFalse(initParamAllowMultiValuedParameters);
        } catch (final Exception e) {
            throw new ServletException(
                    "Error parsing request parameter ["
                            + ALLOW_MULTI_VALUED_PARAMETERS
                            + "] with value ["
                            + initParamAllowMultiValuedParameters
                            + "]",
                    e);
        }

        try {
            this.parametersToCheck = parseParametersToCheck(initParamParametersToCheck);
        } catch (final Exception e) {
            throw new ServletException(
                    "Error parsing request parameter "
                            + PARAMETERS_TO_CHECK
                            + " with value ["
                            + initParamParametersToCheck
                            + "]",
                    e);
        }

        try {
            this.charactersToForbid = parseCharactersToForbid(initParamCharactersToForbid);
        } catch (final Exception e) {
            throw new ServletException(
                    "Error parsing request parameter "
                            + CHARACTERS_TO_FORBID
                            + " with value ["
                            + initParamCharactersToForbid
                            + "]",
                    e);
        }

        if (this.allowMultiValueParameters && this.charactersToForbid.isEmpty()) {
            throw new ServletException(
                    "Configuration to allow multi-value parameters and forbid no characters makes "
                            + getClass().getSimpleName()
                            + " a no-op, which is probably not what you want, "
                            + "so failing Filter init.");
        }
    }
273422
def init_params(self, initializer=mx.init.Uniform(0.01), **kwargs):
        
        self._module.init_params(initializer=initializer, **kwargs)
386007
def _format_params(self, type_, params):
        """"""
        if 'initial_state' in params:
            # NB: at this moment the error raised when initial_state does not match lin/quad (in
            # active qubits) is not very informative, but there is also no clean way to check here
            # that they match because lin can be either a list or a dict. In the future it would be
            # good to check.
            initial_state = params['initial_state']
            if isinstance(initial_state, Mapping):

                initial_state_list = [3]*self.properties['num_qubits']

                low = -1 if type_ == 'ising' else 0

                for v, val in initial_state.items():
                    if val == 3:
                        continue
                    if val <= 0:
                        initial_state_list[v] = low
                    else:
                        initial_state_list[v] = 1

                params['initial_state'] = initial_state_list
145901
public List<InitParamType<PortletType<T>>> getAllInitParam()
   {
      List<InitParamType<PortletType<T>>> list = new ArrayList<InitParamType<PortletType<T>>>();
      List<Node> nodeList = childNode.get("init-param");
      for(Node node: nodeList)
      {
         InitParamType<PortletType<T>>  type = new InitParamTypeImpl<PortletType<T>>(this, "init-param", childNode, node);
         list.add(type);
      }
      return list;
   }
153929
def get_params(self):
        ""
        import inspect
        a = inspect.getargspec(self.__init__)[0]
        out = dict()
        for key in a[1:]:
            value = getattr(self, "_%s" % key, None)
            out[key] = value
        return out
200562
protected void init(String init) {
        String[] pcs = StrUtil.split(init, StrUtil.U, 4);
        id = StrUtil.toInt(pcs[0]);
        serverCaps.domainName = pcs[1];
        serverCaps.siteName = pcs[2];
        userId = StrUtil.toInt(pcs[3]);
    }
883621
def _initParams(self, init_method=None):
        
        if self.bgRE:
            if init_method=='random':
                params0 = {'covar': sp.randn(self._gpNull.covar.getNumberParams())}
            else:
                if self.P==1:
                    params0 = {'covar':sp.sqrt(0.5) * sp.ones(2)}
                else:
                    cov = 0.5*sp.cov(self.Y.T) + 1e-4*sp.eye(self.P)
                    chol = la.cholesky(cov, lower=True)
                    params = chol[sp.tril_indices(self.P)]
                    params0 = {'covar': sp.concatenate([params, params])}
        else:
            if self.P==1:
                params_cn = sp.array([1.])
            else:
                cov = sp.cov(self.Y.T) + 1e-4*sp.eye(self.P)
                chol = la.cholesky(cov, lower=True)
                params_cn = chol[sp.tril_indices(self.P)]
            params0 = {'covar': params_cn}
        return params0
433399
private void initParameters()  {
		
		int idx = requestPath.indexOf("?");
		if(idx != -1){
			
			String strParams = null;
			try {
				strParams = URLDecoder.decode(requestPath.substring(idx+1), "UTF-8");
			} catch (UnsupportedEncodingException neverHappens) {
				/*URLEncoder:how not to use checked exceptions...*/
				throw new RuntimeException("Something went unexpectedly wrong while decoding a URL for a generator. ",
											neverHappens);
			}
			
			String[] params = strParams.split("&");
			for (int i = 0; i < params.length; i++) {
				String[] param = params[i].split("=");
				parameters.put(param[0], param[1]);
			}
		}else{ // No parameters
			parameters.clear();
		}
	}
338741
def _init_img_params(param):
        

        if param is not None:
            param = np.atleast_1d(param)
            if len(param) == 1:
                param = np.repeat(param, 2)

        return param
97520
def get_init_args(inst_type, init_args: dict, add_kwargs=False) -> Tuple[List, Dict]:
    ''''''
    try:
        parameters = signature(inst_type).parameters.values()
        args_keys = [p.name for p in parameters \
                if p.kind in [Parameter.POSITIONAL_ONLY, Parameter.POSITIONAL_OR_KEYWORD] \
                and p.default == Parameter.empty]
        args = [init_args[key] for key in args_keys]
        kwargs = _get_var_kwargs(parameters, args_keys, init_args)\
                 if add_kwargs else\
                 _get_kwargs(parameters, init_args)
    except KeyError as key_error:
        msg_format = 'parameter with key "{0}" is not found in node args'
        raise RenderingError(msg_format.format(key_error.args[0]))
    return (args, kwargs)
1328896
public void init(
            boolean forEncryption,
            KeyParameter params) {

        WorkingKey = generateWorkingKey(params.getKey(), forEncryption);
        this.forEncryption = forEncryption;
    }
310419
function initParams(uri, options, callback) {
  if ((typeof options === 'function') && !callback) callback = options
  if (options && typeof options === 'object') {
    options.uri = uri
  } else if (typeof uri === 'string') {
    options = {uri:uri}
  } else {
    options = uri
    uri = options.uri
  }
  return { uri: uri, options: options, callback: callback }
}
948558
private void initParameters(ProcessingParameters pParams) {
        processingConfig = pParams;
        String ignoreErrors = processingConfig.get(ConfigKey.IGNORE_ERRORS);
        if (ignoreErrors != null && ignoreErrors.matches("^(true|yes|on|1)$")) {
            valueFaultHandler = ValueFaultHandler.IGNORING_VALUE_FAULT_HANDLER;
        } else {
            valueFaultHandler = ValueFaultHandler.THROWING_VALUE_FAULT_HANDLER;
        }
    }
1217963
public static Map<String, String[]> getParameterMapFromJSON(JSONObject params) {

        Map<String, String[]> result = new HashMap<String, String[]>();
        Iterator<String> itKeys = params.keys();
        while (itKeys.hasNext()) {
            String key = itKeys.next();
            JSONArray paramValue = params.optJSONArray(key);
            result.put(key, new String[paramValue.length()]);
            for (int i = 0, l = paramValue.length(); i < l; i++) {
                result.get(key)[i] = paramValue.optString(i);
            }
        }
        return result;
    }
311196
def parse_params(self, params):
        
        for (key, value) in params.items():
            if not isinstance(value, str):
                string_params = self.to_string(value)
                params[key] = string_params
        return params