// ParamID returns foo_bar_id
969403
func (n Name) ParamID() string {
	return fmt.Sprintf("%s_id", strings.Replace(n.UnderSingular(), "/", "_", -1))
}
1083090
func (ps Params) AsID(name string) int64 {
	id, _ := strconv.ParseInt(ps.ByName(name), 10, 64)
	return id
}
502806
func ExecutionFromID(c context.Context, eid *dm.Execution_ID) *Execution {
	ret := &Execution{}
	ret.ID = invertedHexUint32(eid.Id)
	ret.Attempt = AttemptKeyFromID(c, eid.AttemptID())
	return ret
}
1060163
func (mpi *MempoolInfo) ID() uint64 {
	mpi.RLock()
	defer mpi.RUnlock()
	return mpi.Ident
}
829767
func Param(k string, v string) Filter {
	return func(r *http.Request) {
		q := r.URL.Query()
		q.Set(k, v)
		r.URL.RawQuery = q.Encode()
	}
}
415169
func (c *Client) ZAdd(key string, vs ...interface{}) (int, error) {
	if len(vs)%2 != 0 {
		return 0, errors.New("Incomplete parameter sequence")
	}
	v, err := c.execWithKey(true, "ZADD", key, vs...)
	if err != nil {
		return 0, err
	}
	return iface2int(v)
}
539246
func (g *graphMemoizer) ID(ctx context.Context) string {
	return g.g.ID(ctx)
}
22576
func (c *Client) Param(name, value string) *Client {
	c.Use(url.Param(name, value))
	return c
}
97770
func GenerateRandomID() (id string, err error) {
	buf, err := generateSecureRandomData(keyIDSize)
	if err != nil {
		return "", err
	}
	if !validateDataIntegrity(buf, keyIDSize) {
		return "", fmt.Errorf("error in generateRandomID: crypto/rand failed to generate random data")
	}
	id = common.Bytes2Hex(buf)
	return id, err
}
473518
func Param(req *http.Request, key string) string {
	return C(req).Param(key)
}
1059954
func (ts *TiDBStatement) AppendParam(paramID int, data []byte) error {
	if paramID >= len(ts.boundParams) {
		return mysql.NewErr(mysql.ErrWrongArguments, "stmt_send_longdata")
	}
	// If len(data) is 0, append an empty byte slice to the end to distinguish no data and no parameter.
	if len(data) == 0 {
		ts.boundParams[paramID] = []byte{}
	} else {
		ts.boundParams[paramID] = append(ts.boundParams[paramID], data...)
	}
	return nil
}
679583
func (c *Ctx) Param(name string) string {

	for _, entry := range c.params {
		if entry.Key == name {
			return entry.Value
		}
	}

	return blank
}
1133495
func Param(r *http.Request, key string) string {
	p := Params(r)
	if v, ok := p[key]; ok {
		return v
	}
	return ""
}
499751
func (s *Script) Param(name string, value interface{}) *Script {
	if s.params == nil {
		s.params = make(map[string]interface{})
	}
	s.params[name] = value
	return s
}
644649
func ReplaceParameter(s string, params interface{}, value interface{}) bool {
	if params == nil {
		return false
	}

	if paramsValue := reflect.ValueOf(params); paramsValue.Kind() == reflect.Slice {
		if paramsValueSliceLength := paramsValue.Len(); paramsValueSliceLength > 0 {

			if p := strings.SplitN(s, ".", 2); len(p) > 1 {
				index, err := strconv.ParseUint(p[0], 10, 64)

				if err != nil || paramsValueSliceLength <= int(index) {
					return false
				}

				return ReplaceParameter(p[1], params.([]interface{})[index], value)
			}
		}

		return false
	}

	if p := strings.SplitN(s, ".", 2); len(p) > 1 {
		if pValue, ok := params.(map[string]interface{})[p[0]]; ok {
			return ReplaceParameter(p[1], pValue, value)
		}
	} else {
		if _, ok := (*params.(*map[string]interface{}))[p[0]]; ok {
			(*params.(*map[string]interface{}))[p[0]] = value
			return true
		}
	}

	return false
}
14189
func (s *SiteInfo) Param(key interface{}) (interface{}, error) {
	keyStr, err := cast.ToStringE(key)
	if err != nil {
		return nil, err
	}
	keyStr = strings.ToLower(keyStr)
	return s.Params()[keyStr], nil
}
3041
func Param(key, value string) p.Plugin {
	return p.NewRequestPlugin(func(ctx *c.Context, h c.Handler) {
		ctx.Request.URL.Path = replace(ctx.Request.URL.Path, key, value)
		h.Next(ctx)
	})
}