Convert arguments to the WPARAM type.
    Used automatically by SendMessage, PostMessage, etc.
    You shouldn't need to call this function.
342857
def MAKE_WPARAM(wParam):
    
    wParam = ctypes.cast(wParam, LPVOID).value
    if wParam is None:
        wParam = 0
    return wParam
503357
private Arg[] getMethodArguments(List<Parameter> param)
    {
        
         Arg[] val = new Arg[param.size()];
        for (int i = 0; i < param.size(); i++)
        {
            String type = param.get(i).type;

            Arg arg = new Arg();
            arg.type = type;
            arg.name = param.get(i).name;
            Object v = null;
            String type1 = null;
            try
            {            
                type1 = this.getMappedType(type);              
                v = getObjectOfType(type1);
            }
            catch (Exception e)
            {
                throw new IllegalStateException("type codec failed for type " + type + " for domain " + e.getMessage());
            }

            // support unpacking of consecutive bits from a single byte
            this.bitCount = (byte)((type1 == "Bit") ? this.bitCount + 1 : 0);

            arg.value = v;
            val[i]=arg;            
        }

        return val;
    }
551784
def MapParamNames(params, request_type):
    """"""
    return [encoding.GetCustomJsonFieldMapping(request_type, json_name=p) or p
            for p in params]
469829
def convert_parameters(self, request, *args, **kwargs):
        '''
        
        '''
        args = list(args)
        urlparam_i = 0

        parameters = self.view_parameters.get(request.method.lower()) or self.view_parameters.get(None)
        if parameters is not None:
            # add urlparams into the arguments and convert the values
            for parameter_i, parameter in enumerate(parameters):
                # skip request object, *args, **kwargs
                if parameter_i == 0 or parameter.kind is inspect.Parameter.VAR_POSITIONAL or parameter.kind is inspect.Parameter.VAR_KEYWORD:
                    pass
                # value in kwargs?
                elif parameter.name in kwargs:
                    kwargs[parameter.name] = self.convert_value(kwargs[parameter.name], parameter, request)
                # value in args?
                elif parameter_i - 1 < len(args):
                    args[parameter_i - 1] = self.convert_value(args[parameter_i - 1], parameter, request)
                # urlparam value?
                elif urlparam_i < len(request.dmp.urlparams):
                    kwargs[parameter.name] = self.convert_value(request.dmp.urlparams[urlparam_i], parameter, request)
                    urlparam_i += 1
                # can we assign a default value?
                elif parameter.default is not inspect.Parameter.empty:
                    kwargs[parameter.name] = self.convert_value(parameter.default, parameter, request)
                # fallback is None
                else:
                    kwargs[parameter.name] = self.convert_value(None, parameter, request)

        return args, kwargs
1267672
def arg(params)
      rpc_desc.input.decode_json(params.reject { |k, _v| k == :selections }.to_json)
    end
80223
public String parameterToString(Object param) {
        if (param == null) {
            return "";
        } else if (param instanceof Date || param instanceof DateTime || param instanceof LocalDate) {
            //Serialize to json string and remove the " enclosing characters
            String jsonStr = json.serialize(param);
            return jsonStr.substring(1, jsonStr.length() - 1);
        } else if (param instanceof Collection) {
            StringBuilder b = new StringBuilder();
            for (Object o : (Collection)param) {
                if (b.length() > 0) {
                    b.append(",");
                }
                b.append(String.valueOf(o));
            }
            return b.toString();
        } else {
            return String.valueOf(param);
        }
    }
1347592
def parameter_converter(*convert_types):
    '''
    
    '''
    def inner(func):
        for ct in convert_types:
            ParameterConverter._register_converter(func, ct)
        return func
    return inner
302900
private static Class<?>[] convertParameterTypesToPrimitive(Class<?>[] parameterTypes) {
        Class<?>[] converted = new Class<?>[parameterTypes.length];
        for (int i = 0; i < parameterTypes.length; i++) {
            Class<?> primitiveWrapperType = PrimitiveWrapper.getPrimitiveFromWrapperType(parameterTypes[i]);
            if (primitiveWrapperType == null) {
                converted[i] = parameterTypes[i];
            } else {
                converted[i] = primitiveWrapperType;
            }
        }
        return converted;
    }
17326
function format( type, args ) {
  var now = new Date().toISOString(),
    tmpl = '[%s] %s: %s\n',
    msg;

  msg = args[ 0 ] instanceof Error ? args[ 0 ].stack :
    util.format.apply( util, args );

  return util.format( tmpl, now, type, msg );
}
731362
def _parse_typed_parameter(param):
    '''
    
    '''
    global _current_parameter_value
    type_, value = _expand_one_key_dictionary(param)
    _current_parameter.type = type_

    if _is_simple_type(value) and value != '':
        _current_parameter_value = SimpleParameterValue(value)
        _current_parameter.add_value(_current_parameter_value)
    elif isinstance(value, list):
        for i in value:
            if _is_simple_type(i):
                _current_parameter_value = SimpleParameterValue(i)
                _current_parameter.add_value(_current_parameter_value)
            elif isinstance(i, dict):
                _current_parameter_value = TypedParameterValue()
                _parse_typed_parameter_typed_value(i)
                _current_parameter.add_value(_current_parameter_value)
839008
def args_to_int(mapping, argument):
    
    if isinstance(argument, int):
        if argument == 0:
            return 0
        deprecation('passing extensions and flags as constants is deprecated')
        return argument
    elif isinstance(argument, (tuple, list)):
        return reduce(op.or_, [mapping[n] for n in set(argument) if n in mapping], 0)
    raise TypeError('argument must be a list of strings or an int')
98026
def param_set_send(self, parm_name, parm_value, parm_type=None):
        ''''''
        if self.mavlink10():
            if parm_type == None:
                parm_type = mavlink.MAVLINK_TYPE_FLOAT
            self.mav.param_set_send(self.target_system, self.target_component,
                                    parm_name, parm_value, parm_type)
        else:
            self.mav.param_set_send(self.target_system, self.target_component,
                                    parm_name, parm_value)
319659
def _convert_params(self, parameters):
        
        if isinstance(parameters, dict):
            return [self.make_param(name, value)
                    for name, value in parameters.items()]
        else:
            params = []
            for parameter in parameters:
                params.append(self.make_param('', parameter))
            return params
521819
def format_parameters(self, params):
        # type: (Dict[str, str]) -> None
        
        query = urlparse(self.url).query
        if query:
            self.url = self.url.partition('?')[0]
            existing_params = {
                p[0]: p[-1]
                for p in [p.partition('=') for p in query.split('&')]
            }
            params.update(existing_params)
        query_params = ["{}={}".format(k, v) for k, v in params.items()]
        query = '?' + '&'.join(query_params)
        self.url = self.url + query
1183251
def _checkParam(param, value, paramlimits, paramtypes):
    
    assert param in paramlimits, "Invalid param: {0}".format(param)
    (lowlim, highlim) = paramlimits[param]
    paramtype = paramtypes[param]
    if isinstance(paramtype, tuple):
        (paramtype, paramshape) = paramtype
        if not (isinstance(value, paramtype)):
            raise ValueError("{0} must be {1}, not {2}".format(
                    param, paramtype, type(param)))
        if value.shape != paramshape:
            raise ValueError("{0} must have shape {1}, not {2}".format(
                    param, paramshape, value.shape))
        if value.dtype != 'float':
            raise ValueError("{0} must have dtype float, not {1}".format(
                    param, value.dtype))
        if not ((lowlim <= value).all() and (value <= highlim).all()):
            raise ValueError("{0} must be >= {1} and <= {2}, not {3}".format(
                    param, lowlim, highlim, value))
    else:
        if not isinstance(value, paramtype):
            raise ValueError("{0} must be a {1}, not a {2}".format(
                    param, paramtype, type(value)))
        if not (lowlim <= value <= highlim):
            raise ValueError("{0} must be >= {1} and <= {2}, not {3}".format(
                    param, lowlim, highlim, value))
1081442
def ConvertMessage(self, value, message):
    
    message_descriptor = message.DESCRIPTOR
    full_name = message_descriptor.full_name
    if _IsWrapperMessage(message_descriptor):
      self._ConvertWrapperMessage(value, message)
    elif full_name in _WKTJSONMETHODS:
      methodcaller(_WKTJSONMETHODS[full_name][1], value, message)(self)
    else:
      self._ConvertFieldValuePair(value, message)
133547
Object convertArgument(String arg, Type paramType) throws IllegalArgumentException {
		Object result = null;
		if (null == arg || "null".equals(arg)) {
			return result;
		}
		logger.debug("Try to convert {} : param = {} : {}", new Object[]{arg, paramType, paramType.getClass()});
		try { // GenericArrayType, ParameterizedType, TypeVariable<D>, WildcardType, Class
			if (ParameterizedType.class.isInstance(paramType)) {
				JavaType javaType = getJavaType(paramType);
				logger.debug("Try to convert '{}' to JavaType : '{}'", arg, paramType);
				result = getObjectMapper().readValue(arg, javaType);
				logger.debug("Conversion of '{}' to '{}' : OK", arg, paramType);
			} else if (Class.class.isInstance(paramType)) {
				Class cls = (Class) paramType;
				logger.debug("Try to convert '{}' to Class '{}'", arg, paramType);
				checkStringArgument(cls, arg);
				result = getObjectMapper().readValue(arg, cls);
				logger.debug("Conversion of '{}' to '{}' : OK", arg, paramType);
			} else { // GenericArrayType, TypeVariable<D>, WildcardType
				logger.warn("Conversion of '{}' to '{}' not yet supported", arg, paramType);
			}
		} catch (IOException ex) {
			logger.debug("Conversion of '{}' to '{}' failed", arg, paramType);
			throw new IllegalArgumentException(paramType.toString());
		}
		return result;
	}