Get single param or default.
@param name Name of query param
@param def Default, if not found
@return Value of it
@throws IOException if something fails reading parameters
769166
public String single(final CharSequence name, final String def)
        throws IOException {
        final String value;
        final Iterator<String> params = this.param(name).iterator();
        if (params.hasNext()) {
            value = params.next();
        } else {
            value = def;
        }
        return value;
    }
539491
public Object getParameter(String paramid, Object def) {
        final Object v = getParameter(paramid);
        if (v == null) {
            return def;
        } else {
            return v;
        }
    }
643843
public int getInt(String name, int defaultVal){
        if(this.configuration.containsKey(name)){
            return this.configuration.getInt(name);
        } else {
            return defaultVal;
        }
    }
460312
public String getOutputProperty(String name) {
        String val = getOutputPropertyNonDefault(name);
        // If no explicit value, try to get the default value
        if (val == null)
            val = getOutputPropertyDefault(name);
        return val;
        
    }
1045379
public static String getProperty(String name, String def) {
        String ret = System.getProperty(name, System.getenv(name));
        if (ret != null) {
            return ret;
        }
        return def;
    }
1361927
public String getQuery(String name)
    {
        QueryWrapper wrapper = namedNativeQueries != null && name != null ? namedNativeQueries.get(name) : null;
        return wrapper != null ? wrapper.getQuery() : null;
    }
259039
public int getIntParameter(int radix, String name, int defaultValue) {
        parseBody();
        return params.getIntValue(radix, name, defaultValue);
    }
502113
public String getParameter(String name) {
        String[] values = parameters.get(name);
        if (values == null) {
            return null;
        }

        if (values.length == 0) {
            return "";
        }
        return values[0];
    }
1092405
public Object get(String name) throws IOException {
        return Boolean.valueOf(isSet(name2Index(name)));
    }
1281464
public static String[] getQueryParameterValues(RESTRequest request, String name) {
        if (!"post".equalsIgnoreCase(request.getMethod())) {
            return request.getParameterValues(name);
        }

        if (request.getQueryString() == null) {
            return null;
        }

        Hashtable params = null;
        try {
            params = RequestUtils.parseQueryString(request.getQueryString());
        } catch (Exception e) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                Tr.event("DefaultRoutingHelper", tc, "Failed to parse the query string:\n Exception: " + e);
            }
            return null;
        }

        return (String[]) params.get(name);
    }
43646
public static String getSysProperty(String name, String def) {
    return System.getProperty(H2O.OptArgs.SYSTEM_PROP_PREFIX + name, def);
  }
103766
public static String getParameter(final HttpServletRequest request, final String name) {
		String value = request.getParameter(name);
		if (value == null) {
			return "";
		}
		return value;
	}
592341
public static Integer getPropertyAsInteger(String name, Integer def) {
        String value = getProperty(name);
        if (value != null) {
            try {
                return Integer.parseInt(value);
            } catch (NumberFormatException e) {
                LOG.log(Level.WARNING, "Failed to convert property value '" + value + "' to integer", e);
            }
        }
        return def;
    }
1216706
def get_parameter(self, name):
        """"""
        default_value = "$%!)(INVALID)(!%$"
        value = self.lib.tdGetDeviceParameter(self.id, name, default_value)
        if value == default_value:
            raise AttributeError(name)
        return value
1033349
public static Date getDateParam(String name, Date defaultValue) {
		String param = getParam(name);
		return StrUtil.isBlank(param) ? defaultValue : DateUtil.parse(param);
	}
1076198
public static function get($name = null, $default = null)
    {
        $queryParams = app()->request->getQueryParams();

        if (is_null($name)) {
            return $queryParams;
        } elseif (isset($queryParams[$name])) {
            return $queryParams[$name];
        }

        return $default;
    }
414517
public String getResponseHeaderValue(String name, String defaultVal) {
        if (m_response.containsHeader(name)) {
            return m_response.getFirstHeader(name).getValue();
        } else {
            return defaultVal;
        }
    }