query
stringlengths
7
3.85k
document
stringlengths
11
430k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
CopySign sets z to x with the sign of y and returns z. It accepts NaN values.
func (z *Big) CopySign(x, y *Big) *Big { if debug { x.validate() y.validate() } // Pre-emptively capture signbit in case z == y. sign := y.form & signbit z.copyAbs(x) z.form |= sign return z }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func Copysign(x, y float32) float32 {\n\treturn float32(math.Copysign(float64(x), float64(y)))\n}", "func Copysign(x, y float32) float32 {\n\tconst sign = 1 << 31\n\treturn math.Float32frombits(math.Float32bits(x)&^sign | math.Float32bits(y)&sign)\n}", "func (z *Big) Copy(x *Big) *Big {\n\tif debug {\n\t\tx.va...
[ "0.77722967", "0.7512018", "0.5993056", "0.5640078", "0.54359055", "0.53883415", "0.53816557", "0.52782315", "0.52394253", "0.51437646", "0.5071439", "0.5047325", "0.5036318", "0.5000603", "0.49959162", "0.49682966", "0.49158344", "0.4904136", "0.48851633", "0.4869765", "0.47...
0.75588834
1
Float64 returns x as a float64 and a bool indicating whether x can fit into a float64 without truncation, overflow, or underflow. Special values are considered exact; however, special values that occur because the magnitude of x is too large to be represented as a float64 are not.
func (x *Big) Float64() (f float64, ok bool) { if debug { x.validate() } if !x.IsFinite() { switch x.form { case pinf, ninf: return math.Inf(int(x.form & signbit)), true case snan, qnan: return math.NaN(), true case ssnan, sqnan: return math.Copysign(math.NaN(), -1), true } } const ( maxPow10 = 22 // largest exact power of 10 maxMantissa = 1<<53 + 1 // largest exact mantissa ) switch xc := x.compact; { case !x.isCompact(): fallthrough //lint:ignore ST1015 convoluted, but on purpose default: f, _ = strconv.ParseFloat(x.String(), 64) ok = !math.IsInf(f, 0) && !math.IsNaN(f) case xc == 0: ok = true case x.IsInt(): if xc, ok := x.Int64(); ok { f = float64(xc) } else if xc, ok := x.Uint64(); ok { f = float64(xc) } ok = xc < maxMantissa || (xc&(xc-1)) == 0 case x.exp == 0: f = float64(xc) ok = xc < maxMantissa || (xc&(xc-1)) == 0 case x.exp > 0: f = float64(x.compact) * math.Pow10(x.exp) ok = x.compact < maxMantissa && x.exp < maxPow10 case x.exp < 0: f = float64(x.compact) / math.Pow10(-x.exp) ok = x.compact < maxMantissa && x.exp > -maxPow10 } if x.form&signbit != 0 { f = math.Copysign(f, -1) } return f, ok }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func isNaN64(f float64) bool { return f != f }", "func IsValidFloat64(val float64) bool {\n\tif math.IsNaN(val) {\n\t\treturn false\n\t}\n\tif math.IsInf(val, 0) {\n\t\treturn false\n\t}\n\treturn true\n}", "func CloseEnoughF64(a, b float64) bool { return ToleranceF64(a, b, 1e-8) }", "func VeryCloseF64(a, b ...
[ "0.69162524", "0.6890497", "0.6879801", "0.6812547", "0.6634595", "0.6512635", "0.64959264", "0.6441451", "0.64363927", "0.6405067", "0.62267417", "0.6203944", "0.61706656", "0.6093597", "0.60854876", "0.60854876", "0.60854876", "0.60595846", "0.603317", "0.6018857", "0.60031...
0.70267004
0
Float sets z to x and returns z. z is allowed to be nil. The result is undefined if z is a NaN value.
func (x *Big) Float(z *big.Float) *big.Float { if debug { x.validate() } if z == nil { z = new(big.Float) } switch x.form { case finite, finite | signbit: if x.isZero() { z.SetUint64(0) } else { z.SetRat(x.Rat(nil)) } case pinf, ninf: z.SetInf(x.form == pinf) default: // snan, qnan, ssnan, sqnan: z.SetUint64(0) } return z }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (z *Float) Set(x *Float) *Float {}", "func FloatSet(z *big.Float, x *big.Float,) *big.Float", "func FloatSetRat(z *big.Float, x *big.Rat,) *big.Float", "func (z *Float) SetFloat64(x float64) *Float {}", "func (z *Float) Copy(x *Float) *Float {}", "func FloatCopy(z *big.Float, x *big.Float,) *big.Flo...
[ "0.7320618", "0.7318478", "0.67963076", "0.6706169", "0.65353197", "0.6531598", "0.6487981", "0.63998747", "0.63235986", "0.62512195", "0.6203898", "0.61892086", "0.6120503", "0.6077566", "0.6072339", "0.5918691", "0.5891225", "0.5885803", "0.5863337", "0.584555", "0.5788752"...
0.65150666
6
FMA sets z to (x y) + u without any intermediate rounding.
func (z *Big) FMA(x, y, u *Big) *Big { return z.Context.FMA(z, x, y, u) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func affinize(points []*G1) {\n\tif len(points) == 0 {\n\t\treturn\n\t}\n\tws := make([]ff.Fp, len(points)+1)\n\tws[0].SetOne()\n\tfor i := 0; i < len(points); i++ {\n\t\tws[i+1].Mul(&ws[i], &points[i].z)\n\t}\n\n\tw := &ff.Fp{}\n\tw.Inv(&ws[len(points)])\n\n\tzinv := &ff.Fp{}\n\tfor i := len(points) - 1; i >= 0; ...
[ "0.57408684", "0.56587553", "0.5631097", "0.5547086", "0.53585625", "0.5339658", "0.52872926", "0.5235077", "0.5174893", "0.5167047", "0.5099495", "0.50588405", "0.50502396", "0.5019461", "0.501725", "0.5009467", "0.5008925", "0.4950905", "0.49338824", "0.4926024", "0.4867804...
0.7032753
0
Int sets z to x, truncating the fractional portion (if any) and returns z. z is allowed to be nil. If x is an infinity or a NaN value the result is undefined.
func (x *Big) Int(z *big.Int) *big.Int { if debug { x.validate() } if z == nil { z = new(big.Int) } if !x.IsFinite() { return z } if x.isCompact() { z.SetUint64(x.compact) } else { z.Set(&x.unscaled) } if x.Signbit() { z.Neg(z) } if x.exp == 0 { return z } return bigScalex(z, z, x.exp) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (z *Float) SetInt(x *Int) *Float {}", "func FloatSetInt(z *big.Float, x *big.Int,) *big.Float", "func FloatSetInf(z *big.Float, signbit bool) *big.Float", "func RatSetInt(z *big.Rat, x *big.Int,) *big.Rat", "func Int(num cty.Value) (cty.Value, error) {\n\tif num == cty.PositiveInfinity || num == cty.N...
[ "0.5891745", "0.5842197", "0.58383715", "0.57142097", "0.5668319", "0.55824393", "0.5520578", "0.5482356", "0.54121065", "0.5408934", "0.5359774", "0.53485197", "0.53456", "0.5337167", "0.52935195", "0.5247217", "0.5238465", "0.5194335", "0.5193267", "0.5169111", "0.5135624",...
0.5404971
10
Int64 returns x as an int64, truncating towards zero. The returned boolean indicates whether the conversion to an int64 was successful.
func (x *Big) Int64() (int64, bool) { if debug { x.validate() } if !x.IsFinite() { return 0, false } // x might be too large to fit into an int64 *now*, but rescaling x might // shrink it enough. See issue #20. if !x.isCompact() { xb := x.Int(nil) return xb.Int64(), xb.IsInt64() } u := x.compact if x.exp != 0 { var ok bool if u, ok = scalex(u, x.exp); !ok { return 0, false } } su := int64(u) if su >= 0 || x.Signbit() && su == -su { if x.Signbit() { su = -su } return su, true } return 0, false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func IsInt64(x *big.Int) bool {\n\treturn x.IsInt64()\n}", "func (x *Int) IsInt64() bool {}", "func AsInt64(val interface{}) (int64, bool) {\n\tswitch val.(type) {\n\tcase int64:\n\t\treturn val.(int64), true\n\tcase int:\n\t\treturn int64(val.(int)), true\n\tcase int32:\n\t\treturn int64(val.(int32)), true\n\...
[ "0.74957633", "0.7358272", "0.73101777", "0.7193197", "0.7080008", "0.70770097", "0.70752776", "0.7023111", "0.69888866", "0.69823414", "0.68923175", "0.68744254", "0.6852106", "0.68443376", "0.6838524", "0.67761654", "0.6774245", "0.67455125", "0.6726367", "0.66730005", "0.6...
0.7898785
0
Uint64 returns x as a uint64, truncating towards zero. The returned boolean indicates whether the conversion to a uint64 was successful.
func (x *Big) Uint64() (uint64, bool) { if debug { x.validate() } if !x.IsFinite() || x.Signbit() { return 0, false } // x might be too large to fit into an uint64 *now*, but rescaling x might // shrink it enough. See issue #20. if !x.isCompact() { xb := x.Int(nil) return xb.Uint64(), xb.IsUint64() } b := x.compact if x.exp == 0 { return b, true } return scalex(b, x.exp) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func IsUint64(x *big.Int) bool {\n\treturn x.IsUint64()\n}", "func (x *Int) IsUint64() bool {}", "func (z *Int) IsUint64() bool {\n\treturn (z[3] == 0) && (z[2] == 0) && (z[1] == 0)\n}", "func Uint64Val(x Value) (uint64, bool) {\n\tif v, ok := x.(*ratVal); ok {\n\t\tx = v.Value\n\t}\n\treturn constant.Uint64...
[ "0.7552163", "0.7529806", "0.71701646", "0.7107275", "0.70967805", "0.70193774", "0.69914687", "0.6868089", "0.68263274", "0.67936605", "0.6788953", "0.67658705", "0.67648816", "0.6721825", "0.67133445", "0.6692564", "0.66430235", "0.6638877", "0.6624757", "0.6616391", "0.650...
0.76390654
0
IsFinite returns true if x is finite.
func (x *Big) IsFinite() bool { return x.form & ^signbit == 0 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func IsFinite(f float64, sign int) bool {\n\n\treturn !math.IsInf(f, sign)\n}", "func (g GLC) IsFinite() (bool, error) {\n\tvar expandedVariables []string\n\treturn g.isFinite(g.InitialVariable, expandedVariables)\n}", "func IsFinite(scope *Scope, x tf.Output) (y tf.Output) {\n\tif scope.Err() != nil {\n\t\tre...
[ "0.8286918", "0.8070107", "0.804661", "0.7833303", "0.7490696", "0.73328984", "0.69117486", "0.661476", "0.6564865", "0.6270238", "0.6108329", "0.60892147", "0.60506237", "0.6028886", "0.60128975", "0.598571", "0.59734184", "0.5942874", "0.5867907", "0.5845846", "0.58361876",...
0.8008782
3
IsNormal returns true if x is normal.
func (x *Big) IsNormal() bool { return x.IsFinite() && x.adjusted() >= x.Context.minScale() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (obj *content) IsNormal() bool {\n\treturn obj.normal != nil\n}", "func (c *Candy) IsNormal() bool {\n\treturn c._type > 0 && c._type <= NbCandyType\n}", "func (me TxsdPresentationAttributesFontSpecificationFontStretch) IsNormal() bool {\n\treturn me.String() == \"normal\"\n}", "func (me TxsdPresentatio...
[ "0.6978493", "0.6832683", "0.6530506", "0.6522392", "0.6405958", "0.6360109", "0.6321225", "0.6214152", "0.6193896", "0.6151518", "0.6004056", "0.58610797", "0.582082", "0.5700992", "0.55730987", "0.55395657", "0.541299", "0.5309574", "0.53021777", "0.5297656", "0.5247428", ...
0.8046503
0
IsSubnormal returns true if x is subnormal.
func (x *Big) IsSubnormal() bool { return x.IsFinite() && x.adjusted() < x.Context.minScale() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (x *Big) IsNormal() bool {\n\treturn x.IsFinite() && x.adjusted() >= x.Context.minScale()\n}", "func (obj *content) IsNormal() bool {\n\treturn obj.normal != nil\n}", "func (c *Candy) IsNormal() bool {\n\treturn c._type > 0 && c._type <= NbCandyType\n}", "func (me TxsdPresentationAttributesFontSpecifica...
[ "0.65229833", "0.5292802", "0.4906575", "0.48972237", "0.48554552", "0.47551087", "0.47263622", "0.4701936", "0.46909374", "0.46324718", "0.45682678", "0.4566828", "0.45386723", "0.44625965", "0.44621158", "0.44608685", "0.4387859", "0.43782654", "0.4346102", "0.4341811", "0....
0.8129674
0
IsInf returns true if x is an infinity according to sign. If sign > 0, IsInf reports whether x is positive infinity. If sign < 0, IsInf reports whether x is negative infinity. If sign == 0, IsInf reports whether x is either infinity.
func (x *Big) IsInf(sign int) bool { return sign >= 0 && x.form == pinf || sign <= 0 && x.form == ninf }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func IsInf(f float32, sign int) bool {\n\t// Test for infinity by comparing against maximum float.\n\t// To avoid the floating-point hardware, could use:\n\t//\t`x := Float32bits(f)`\n\t//\t`return sign >= 0 && x == uvinf || sign <= 0 && x == uvneginf`\n\treturn sign >= 0 && f > MaxFloat32 || sign <= 0 && f < -Max...
[ "0.85563856", "0.80208313", "0.8010691", "0.7959639", "0.791601", "0.7724972", "0.7723768", "0.7549482", "0.7369673", "0.7367579", "0.7246049", "0.72361714", "0.72230864", "0.7112551", "0.6925236", "0.667426", "0.6602583", "0.659049", "0.658996", "0.6586077", "0.6585602", "...
0.87394303
0
IsNaN returns true if x is NaN. If sign > 0, IsNaN reports whether x is quiet NaN. If sign < 0, IsNaN reports whether x is signaling NaN. If sign == 0, IsNaN reports whether x is either NaN.
func (x *Big) IsNaN(quiet int) bool { return quiet >= 0 && x.form&qnan == qnan || quiet <= 0 && x.form&snan == snan }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func IsNan(arg float64) bool {\n\treturn math.IsNaN(arg)\n}", "func (v Value) IsNaN() bool {\n\treturn v.v.Kind() == reflect.Float64 && math.IsNaN(v.v.Float())\n}", "func (Integer) IsNaN() bool {\n\treturn false\n}", "func IsNan(f float64) bool {\n\n\treturn math.IsNaN(f)\n}", "func (*BigInt) IsNaN() bool ...
[ "0.7151861", "0.70489705", "0.7027137", "0.69230175", "0.68980867", "0.6880118", "0.6859038", "0.6685041", "0.6491412", "0.64820385", "0.638677", "0.63032633", "0.61607933", "0.6159763", "0.61364555", "0.6083304", "0.60447836", "0.5992494", "0.59710914", "0.5912776", "0.59039...
0.67186636
7
IsInt reports whether x is an integer. Infinity and NaN values are not integers.
func (x *Big) IsInt() bool { if debug { x.validate() } if !x.IsFinite() { return false } // 0, 5000, 40 if x.isZero() || x.exp >= 0 { return true } xp := x.Precision() exp := x.exp // 0.001 // 0.5 if -exp >= xp { return false } // 44.00 // 1.000 if x.isCompact() { for v := x.compact; v%10 == 0; v /= 10 { exp++ } // Avoid the overhead of copying x.unscaled if we know for a fact it's not // an integer. } else if x.unscaled.Bit(0) == 0 { v := new(big.Int).Set(&x.unscaled) r := new(big.Int) for { v.QuoRem(v, c.TenInt, r) if r.Sign() != 0 { break } exp++ } } return exp >= 0 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func IsInt(x Value) bool {\n\tswitch v := Val(x).(type) {\n\tcase int64, *big.Int:\n\t\treturn true\n\tcase *big.Rat:\n\t\treturn v.IsInt()\n\t}\n\treturn false\n}", "func IsInt(v cty.Value) hcl.Diagnostics {\n\tvar diags hcl.Diagnostics\n\n\tif v.IsNull() {\n\t\treturn diags\n\t}\n\tif v.Type() != cty.Number ||...
[ "0.8459752", "0.8078862", "0.7934551", "0.7692145", "0.7640611", "0.7374967", "0.723088", "0.71803105", "0.7160576", "0.70589256", "0.70163596", "0.69406474", "0.69217443", "0.68400544", "0.6819024", "0.6806735", "0.6694523", "0.66869605", "0.64541924", "0.63801026", "0.63574...
0.6872431
13
Mul sets z to x y and returns z.
func (z *Big) Mul(x, y *Big) *Big { return z.Context.Mul(z, x, y) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func Mul(z, x, y *Elt)", "func (z *Int) Mul(x, y *Int) *Int {}", "func (z *Float64) Mul(x, y *Float64) *Float64 {\n\ta := (x.l * y.l) + (y.r * x.r)\n\tb := (x.r * y.l) + (y.r * x.l)\n\tz.SetPair(a, b)\n\treturn z\n}", "func RatMul(z *big.Rat, x, y *big.Rat,) *big.Rat", "func (v *Vec3i) SetMul(other Vec3i) ...
[ "0.7870542", "0.7677118", "0.72692245", "0.71937406", "0.7186736", "0.7144699", "0.7068656", "0.70019877", "0.69182754", "0.6779325", "0.664848", "0.6635656", "0.65184134", "0.65160215", "0.64909726", "0.64568543", "0.6446939", "0.641071", "0.62620425", "0.62328297", "0.62091...
0.75033665
2
Neg sets z to x and returns z. If x is positive infinity, z will be set to negative infinity and visa versa. If x == 0, z will be set to zero as well. NaN will result in an error.
func (z *Big) Neg(x *Big) *Big { if debug { x.validate() } if !z.invalidContext(z.Context) && !z.checkNaNs(x, x, negation) { xform := x.form // copy in case z == x z.copyAbs(x) if !z.IsFinite() || z.compact != 0 || z.Context.RoundingMode == ToNegativeInf { z.form = xform ^ signbit } } return z.Context.round(z) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (z *Float) Neg(x *Float) *Float {}", "func FloatNeg(z *big.Float, x *big.Float,) *big.Float", "func (z *Float) Abs(x *Float) *Float {}", "func RatNeg(z *big.Rat, x *big.Rat,) *big.Rat", "func (z *Int) Neg(x *Int) *Int {}", "func Neg(z, x *big.Int) *big.Int {\n\treturn z.Neg(x)\n}", "func (z *Float...
[ "0.7231782", "0.71507126", "0.6635114", "0.6450123", "0.6422806", "0.63785046", "0.63411933", "0.6128639", "0.60820645", "0.60324293", "0.58987254", "0.58873147", "0.58386755", "0.5802333", "0.56693554", "0.5620133", "0.55897784", "0.55698377", "0.556133", "0.55603373", "0.55...
0.59579825
10
New creates a new Big decimal with the given value and scale. For example: New(1234, 3) // 1.234 New(42, 0) // 42 New(4321, 5) // 0.04321 New(1, 0) // 1 New(3, 10) // 30 000 000 000
func New(value int64, scale int) *Big { return new(Big).SetMantScale(value, scale) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func newDecimal(prec, scale int32) (*types.T, error) {\n\tif scale > prec {\n\t\terr := pgerror.WithCandidateCode(\n\t\t\terrors.Newf(\"scale (%d) must be between 0 and precision (%d)\", scale, prec),\n\t\t\tpgcode.InvalidParameterValue)\n\t\treturn nil, err\n\t}\n\treturn types.MakeDecimal(prec, scale), nil\n}", ...
[ "0.71687335", "0.69553965", "0.68472266", "0.6801925", "0.67120224", "0.6174388", "0.61388785", "0.6130154", "0.6117089", "0.60937726", "0.59742767", "0.5895762", "0.58735913", "0.5809028", "0.57657033", "0.5728065", "0.5727161", "0.5717478", "0.5668966", "0.5616128", "0.5600...
0.7762048
0
Payload returns the payload of x, provided x is a NaN value. If x is not a NaN value, the result is undefined.
func (x *Big) Payload() Payload { if !x.IsNaN(0) { return 0 } return Payload(x.compact) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewPayload() Payload {\n\tp := Payload{-1, \"\", 0, \"\", 0}\n\treturn p\n}", "func (nf *NetworkPayload) GetPayload() []byte {\n\treturn nil\n}", "func (v *Value) AsPayload() *Payload {\n\tif v.IsUndefined() {\n\t\treturn NewPayload()\n\t}\n\tswitch tv := v.raw.(type) {\n\tcase *Payload:\n\t\treturn tv\n\...
[ "0.5493443", "0.53596836", "0.5260217", "0.520517", "0.4958753", "0.4847305", "0.48398957", "0.48280612", "0.48033786", "0.4774764", "0.47630236", "0.47428694", "0.4729739", "0.47256187", "0.46816078", "0.4679572", "0.4677514", "0.4675227", "0.46629202", "0.46601516", "0.4634...
0.6568773
0
Precision returns the precision of x. That is, it returns the number of digits in the unscaled form of x. x == 0 has a precision of 1. The result is undefined if x is not finite.
func (x *Big) Precision() int { // Cannot call validate since validate calls this method. if !x.IsFinite() { return 0 } if x.precision == 0 { return 1 } return x.precision }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (d *Decimal) Precision() uint32 {\n\treturn (*accounting.Decimal)(d).\n\t\tGetPrecision()\n}", "func (d Decimal) Precision() int32 {\n\treturn -d.Exponent()\n}", "func (c Currency) Precision() int {\n\treturn c.prec\n}", "func (n Number) Precision() int8 {\n\treturn n.precision\n}", "func Precision(ap...
[ "0.6749858", "0.6596569", "0.6344909", "0.6229551", "0.6203113", "0.6081262", "0.5979742", "0.5857742", "0.58437103", "0.5767434", "0.5748789", "0.5739636", "0.5739636", "0.56803554", "0.5674", "0.55910194", "0.5590393", "0.55573237", "0.54589593", "0.54218894", "0.5418692", ...
0.73257846
0
Quantize sets z to the number equal in value and sign to z with the scale, n. The rounding of z is performed according to the rounding mode set in z.Context.RoundingMode. In order to perform truncation, set z.Context.RoundingMode to ToZero.
func (z *Big) Quantize(n int) *Big { return z.Context.Quantize(z, n) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func Quantize(buf *audio.PCMBuffer, bitDepth int) {\n\tif buf == nil {\n\t\treturn\n\t}\n\tmax := math.Pow(2, float64(bitDepth)) - 1\n\n\tbuf.SwitchPrimaryType(audio.Float)\n\tbufLen := buf.Len()\n\tfor i := 0; i < bufLen; i++ {\n\t\tbuf.Floats[i] = round((buf.Floats[i]+1)*max)/max - 1.0\n\t}\n}", "func (r *Ri) ...
[ "0.5608611", "0.5563615", "0.5199561", "0.5160299", "0.5131443", "0.5085433", "0.5079202", "0.50659317", "0.4939197", "0.4927903", "0.49073538", "0.48771855", "0.47888413", "0.47833872", "0.4747182", "0.4740615", "0.4731992", "0.47307068", "0.47210962", "0.47156143", "0.47052...
0.69798386
0
Quo sets z to x / y and returns z.
func (z *Big) Quo(x, y *Big) *Big { return z.Context.Quo(z, x, y) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (z *Float) Quo(x, y *Float) *Float {}", "func FloatQuo(z *big.Float, x, y *big.Float,) *big.Float", "func RatQuo(z *big.Rat, x, y *big.Rat,) *big.Rat", "func (z *Int) Quo(x, y *Int) *Int {}", "func (v *Vec3i) SetDiv(other Vec3i) {\n\tv.X /= other.X\n\tv.Y /= other.Y\n\tv.Z /= other.Z\n}", "func (z *...
[ "0.60730547", "0.6042108", "0.6023971", "0.5781043", "0.57618046", "0.5667484", "0.5625965", "0.56017685", "0.5543323", "0.5496648", "0.54894996", "0.547731", "0.5476026", "0.54493856", "0.54149026", "0.53925943", "0.5391164", "0.5375086", "0.536225", "0.5358733", "0.5342822"...
0.5662493
6
QuoInt sets z to x / y with the remainder truncated. See QuoRem for more details.
func (z *Big) QuoInt(x, y *Big) *Big { return z.Context.QuoInt(z, x, y) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func IntQuoRem(z *big.Int, x, y, r *big.Int,) (*big.Int, *big.Int,)", "func (z *Int) QuoRem(x, y, r *Int) (*Int, *Int) {}", "func IntQuo(z *big.Int, x, y *big.Int,) *big.Int", "func IntDiv(z *big.Int, x, y *big.Int,) *big.Int", "func (z *Int) Quo(x, y *Int) *Int {}", "func IntRem(z *big.Int, x, y *big.In...
[ "0.7472765", "0.72936076", "0.6718596", "0.66632986", "0.65173167", "0.6256829", "0.6183861", "0.60929185", "0.6073056", "0.606108", "0.59851223", "0.5890535", "0.5870699", "0.5868811", "0.58686084", "0.58576894", "0.5795034", "0.57838506", "0.5761324", "0.5613709", "0.552146...
0.6926797
2
QuoRem sets z to the quotient x / y and r to the remainder x % y, such that x = z y + r, and returns the pair (z, r).
func (z *Big) QuoRem(x, y, r *Big) (*Big, *Big) { return z.Context.QuoRem(z, x, y, r) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (z *Int) QuoRem(x, y, r *Int) (*Int, *Int) {}", "func IntQuoRem(z *big.Int, x, y, r *big.Int,) (*big.Int, *big.Int,)", "func quoRem(x, y int) (quo, rem int) {\n\tquo = x / y\n\trem = x - quo*y\n\treturn\n}", "func QuoRem(x, y, r *big.Int) (*big.Int, *big.Int) {\n\treturn new(big.Int).QuoRem(x, y, r)\n}"...
[ "0.782651", "0.77628213", "0.7099386", "0.6989584", "0.6791163", "0.63246447", "0.6182469", "0.59490997", "0.5859081", "0.57387716", "0.56355447", "0.5429526", "0.54193616", "0.54186124", "0.5415265", "0.5373845", "0.5330833", "0.5288362", "0.5288362", "0.52422345", "0.523644...
0.705671
3
Rat sets z to x and returns z. z is allowed to be nil. The result is undefined if x is an infinity or NaN value.
func (x *Big) Rat(z *big.Rat) *big.Rat { if debug { x.validate() } if z == nil { z = new(big.Rat) } if !x.IsFinite() { return z.SetInt64(0) } // Fast path for decimals <= math.MaxInt64. if x.IsInt() { if u, ok := x.Int64(); ok { // If profiled we can call scalex ourselves and save the overhead of // calling Int64. But I doubt it'll matter much. return z.SetInt64(u) } } num := new(big.Int) if x.isCompact() { num.SetUint64(x.compact) } else { num.Set(&x.unscaled) } if x.exp > 0 { arith.MulBigPow10(num, num, uint64(x.exp)) } if x.Signbit() { num.Neg(num) } denom := c.OneInt if x.exp < 0 { denom = new(big.Int) if shift, ok := arith.Pow10(uint64(-x.exp)); ok { denom.SetUint64(shift) } else { denom.Set(arith.BigPow10(uint64(-x.exp))) } } return z.SetFrac(num, denom) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (z *Float) SetRat(x *Rat) *Float {}", "func FloatSetRat(z *big.Float, x *big.Rat,) *big.Float", "func RatSet(z *big.Rat, x *big.Rat,) *big.Rat", "func (x *Float) Rat(z *Rat) (*Rat, Accuracy) {\n\t// possible: panic(\"unreachable\")\n}", "func (z *Rat) Set(x *Rat) *Rat {}", "func FloatRat(x *big.Floa...
[ "0.73778707", "0.69831675", "0.6645377", "0.6643432", "0.66268605", "0.62313914", "0.62217724", "0.6084067", "0.60632914", "0.60306674", "0.6018063", "0.59181076", "0.583361", "0.57868797", "0.57140726", "0.5706987", "0.5666669", "0.56218916", "0.5596837", "0.5586031", "0.554...
0.6346912
5
Raw directly returns x's raw compact and unscaled values. Caveat emptor: Neither are guaranteed to be valid. Raw is intended to support missing functionality outside this package and generally should be avoided. Additionally, Raw is the only part of this package's API which is not guaranteed to remain stable. This means the function could change or disappear at any time, even across minor version numbers.
func Raw(x *Big) (*uint64, *big.Int) { return &x.compact, &x.unscaled }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func Raw(s string) Value {\n\treturn quad.Raw(s)\n}", "func (n Number) Raw() interface{} {\n\treturn n.underlying()\n}", "func (v Value) Raw() string {\n\treturn string(v.input[v.start : v.start+v.size])\n}", "func (c Currency) Raw() int64 {\n\treturn c.m\n}", "func (vn VecN) Raw() []float64 {\n\treturn vn...
[ "0.64168406", "0.6339452", "0.6237392", "0.62326294", "0.6208013", "0.61576927", "0.60795105", "0.5818222", "0.5796609", "0.57943225", "0.57940865", "0.5776874", "0.5748706", "0.5735411", "0.5699503", "0.56879514", "0.5656565", "0.56269664", "0.5605789", "0.5553578", "0.55297...
0.69487935
0
Reduce reduces a finite z to its most simplest form.
func (z *Big) Reduce() *Big { return z.Context.Reduce(z) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func VREDUCESS_Z(i, mx, x, k, x1 operand.Op) { ctx.VREDUCESS_Z(i, mx, x, k, x1) }", "func VREDUCESD_Z(i, mx, x, k, x1 operand.Op) { ctx.VREDUCESD_Z(i, mx, x, k, x1) }", "func VREDUCEPS_Z(i, mxyz, k, xyz operand.Op) { ctx.VREDUCEPS_Z(i, mxyz, k, xyz) }", "func VREDUCEPD_Z(i, mxyz, k, xyz operand.Op) { ctx.VRE...
[ "0.5418615", "0.53875196", "0.5339523", "0.53097135", "0.524707", "0.5185971", "0.51534474", "0.5153013", "0.50972736", "0.50938153", "0.5091379", "0.50770324", "0.50621927", "0.5043481", "0.50147516", "0.5010768", "0.49960193", "0.49713972", "0.49566567", "0.49497017", "0.49...
0.52355194
5
Rem sets z to the remainder x % y. See QuoRem for more details.
func (z *Big) Rem(x, y *Big) *Big { return z.Context.Rem(z, x, y) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func IntQuoRem(z *big.Int, x, y, r *big.Int,) (*big.Int, *big.Int,)", "func (z *Int) QuoRem(x, y, r *Int) (*Int, *Int) {}", "func IntDivMod(z *big.Int, x, y, m *big.Int,) (*big.Int, *big.Int,)", "func (z *Int) DivMod(x, y, m *Int) (*Int, *Int) {}", "func IntRem(z *big.Int, x, y *big.Int,) *big.Int", "fun...
[ "0.7398744", "0.7098709", "0.7067952", "0.7055104", "0.69073147", "0.6627208", "0.6597806", "0.6574439", "0.65691066", "0.632363", "0.62499833", "0.62156296", "0.6178628", "0.6129219", "0.60879785", "0.60101384", "0.5970646", "0.5908157", "0.5896735", "0.5891395", "0.5821937"...
0.0
-1
RoundToInt rounds z down to an integral value.
func (z *Big) RoundToInt() *Big { return z.Context.RoundToInt(z) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (d LegacyDec) RoundInt() Int {\n\treturn NewIntFromBigInt(chopPrecisionAndRoundNonMutative(d.i))\n}", "func RoundToInt(f float64) int {\n\tif math.Abs(f) < 0.5 {\n\t\treturn 0\n\t}\n\treturn int(f + math.Copysign(0.5, f))\n}", "func integerPower(z, x *inf.Dec, y int64, s inf.Scale) *inf.Dec {\n\tif z == n...
[ "0.6222463", "0.60707176", "0.5877097", "0.5812608", "0.57941353", "0.55734134", "0.5557275", "0.549525", "0.5482456", "0.54750586", "0.54631066", "0.54584205", "0.53971136", "0.53742886", "0.53742886", "0.53742886", "0.5358152", "0.53350157", "0.5330478", "0.53285986", "0.53...
0.7330858
0
Scale returns x's scale.
func (x *Big) Scale() int { return -x.exp }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func Scale(value float64) *SimpleElement { return newSEFloat(\"scale\", value) }", "func (s *Surface) Scale(x, y float64) {\n\ts.Ctx.Call(\"scale\", x, y)\n}", "func (canvas *Canvas) Scale(x, y float32) {\n\twriteCommand(canvas.contents, \"cm\", x, 0, 0, y, 0, 0)\n}", "func (t *Transform) GetScale() *Vector ...
[ "0.7067415", "0.69420356", "0.6934427", "0.691587", "0.6910443", "0.6908746", "0.6885395", "0.68813145", "0.6766992", "0.6717634", "0.6649341", "0.6649029", "0.6606986", "0.66068214", "0.66049236", "0.6601579", "0.65879315", "0.65610296", "0.6549763", "0.6510218", "0.6500102"...
0.66740763
10
Set sets z to x and returns z. The result might be rounded depending on z's Context, and even if z == x.
func (z *Big) Set(x *Big) *Big { return z.Context.round(z.Copy(x)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (z *Float) Set(x *Float) *Float {}", "func (z *Rat) Set(x *Rat) *Rat {}", "func FloatSet(z *big.Float, x *big.Float,) *big.Float", "func FloatSetRat(z *big.Float, x *big.Rat,) *big.Float", "func RatSet(z *big.Rat, x *big.Rat,) *big.Rat", "func Set(z, x *big.Int) *big.Int {\n\treturn z.Set(x)\n}", ...
[ "0.71290857", "0.6694286", "0.655188", "0.65362024", "0.65268594", "0.64692193", "0.64211214", "0.6375159", "0.62010866", "0.6167918", "0.6071297", "0.6015038", "0.5890692", "0.5878823", "0.5815794", "0.58125335", "0.574378", "0.5728071", "0.56841", "0.5668045", "0.5591025", ...
0.7498269
0
SetBigMantScale sets z to the given value and scale.
func (z *Big) SetBigMantScale(value *big.Int, scale int) *Big { // Do this first in case value == z.unscaled. Don't want to clobber the sign. z.form = finite if value.Sign() < 0 { z.form |= signbit } z.unscaled.Abs(value) z.compact = c.Inflated z.precision = arith.BigLength(value) if z.unscaled.IsUint64() { if v := z.unscaled.Uint64(); v != c.Inflated { z.compact = v } } z.exp = -scale return z }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (z *Big) SetMantScale(value int64, scale int) *Big {\n\tz.SetUint64(arith.Abs(value))\n\tz.exp = -scale // compiler should optimize out z.exp = 0 in SetUint64\n\tif value < 0 {\n\t\tz.form |= signbit\n\t}\n\treturn z\n}", "func (z *Big) SetScale(scale int) *Big {\n\tz.exp = -scale\n\treturn z\n}", "func (...
[ "0.7482123", "0.7046453", "0.6483148", "0.62212074", "0.60076684", "0.6001548", "0.59609586", "0.58952105", "0.58950853", "0.5844871", "0.58230865", "0.57487625", "0.565793", "0.5607472", "0.556866", "0.55051416", "0.54992694", "0.5419335", "0.5405035", "0.53465384", "0.53412...
0.7995192
0
SetFloat sets z to exactly x and returns z.
func (z *Big) SetFloat(x *big.Float) *Big { if x.IsInf() { if x.Signbit() { z.form = ninf } else { z.form = pinf } return z } neg := x.Signbit() if x.Sign() == 0 { if neg { z.form |= signbit } z.compact = 0 z.precision = 1 return z } z.exp = 0 x0 := new(big.Float).Copy(x).SetPrec(big.MaxPrec) x0.Abs(x0) if !x.IsInt() { for !x0.IsInt() { x0.Mul(x0, c.TenFloat) z.exp-- } } if mant, acc := x0.Uint64(); acc == big.Exact { z.compact = mant z.precision = arith.Length(mant) } else { z.compact = c.Inflated x0.Int(&z.unscaled) z.precision = arith.BigLength(&z.unscaled) } z.form = finite if neg { z.form |= signbit } return z }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func FloatSet(z *big.Float, x *big.Float,) *big.Float", "func (z *Float) Set(x *Float) *Float {}", "func (z *Float) SetFloat64(x float64) *Float {}", "func FloatSetRat(z *big.Float, x *big.Rat,) *big.Float", "func FloatSetMode(z *big.Float, mode big.RoundingMode,) *big.Float", "func FloatSetInf(z *big.Fl...
[ "0.795142", "0.78136986", "0.7702954", "0.7409077", "0.6878095", "0.6817161", "0.6814346", "0.6796111", "0.6742635", "0.6722081", "0.6688294", "0.6603496", "0.65328836", "0.65287864", "0.6486636", "0.64737475", "0.6465528", "0.64144754", "0.6405877", "0.63998175", "0.6334951"...
0.7365888
4
SetFloat64 sets z to exactly x.
func (z *Big) SetFloat64(x float64) *Big { if x == 0 { var sign form if math.Signbit(x) { sign = signbit } return z.setZero(sign, 0) } if math.IsNaN(x) { var sign form if math.Signbit(x) { sign = signbit } return z.setNaN(0, qnan|sign, 0) } if math.IsInf(x, 0) { if math.IsInf(x, 1) { z.form = pinf } else { z.form = ninf } return z } // The gist of the following is lifted from math/big/rat.go, but adapted for // base-10 decimals. const expMask = 1<<11 - 1 bits := math.Float64bits(x) mantissa := bits & (1<<52 - 1) exp := int((bits >> 52) & expMask) if exp == 0 { // denormal exp -= 1022 } else { // normal mantissa |= 1 << 52 exp -= 1023 } if mantissa == 0 { return z.SetUint64(0) } shift := 52 - exp for mantissa&1 == 0 && shift > 0 { mantissa >>= 1 shift-- } z.exp = 0 z.form = finite | form(bits>>63) if shift > 0 { z.unscaled.SetUint64(uint64(shift)) z.unscaled.Exp(c.FiveInt, &z.unscaled, nil) arith.Mul(&z.unscaled, &z.unscaled, mantissa) z.exp = -shift } else { // TODO(eric): figure out why this doesn't work for _some_ numbers. See // https://github.com/ericlagergren/decimal/issues/89 // // z.compact = mantissa << uint(-shift) // z.precision = arith.Length(z.compact) z.compact = c.Inflated z.unscaled.SetUint64(mantissa) z.unscaled.Lsh(&z.unscaled, uint(-shift)) } return z.norm() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (z *Float) SetFloat64(x float64) *Float {}", "func (z *Float) SetUint64(x uint64) *Float {}", "func (z *Rat) SetFloat64(f float64) *Rat {}", "func FloatSet(z *big.Float, x *big.Float,) *big.Float", "func (z *Float) SetInt64(x int64) *Float {}", "func (f *Float) SetFloat64(x float64) *Float {\n\tf.do...
[ "0.8568957", "0.7604048", "0.74524355", "0.73438364", "0.72247237", "0.7088781", "0.68426555", "0.66933036", "0.65595174", "0.65009296", "0.6499476", "0.6490124", "0.64856577", "0.6448265", "0.63436514", "0.63082755", "0.61101353", "0.60744774", "0.60336155", "0.5992921", "0....
0.68706334
6
SetInf sets z to Inf if signbit is set or +Inf is signbit is not set, and returns z.
func (z *Big) SetInf(signbit bool) *Big { if signbit { z.form = ninf } else { z.form = pinf } return z }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (z *Float) SetInf(signbit bool) *Float {}", "func FloatSetInf(z *big.Float, signbit bool) *big.Float", "func Inf(sign int) float32 {\n\tvar v uint32\n\tif sign >= 0 {\n\t\tv = uvinf\n\t} else {\n\t\tv = uvneginf\n\t}\n\treturn Float32frombits(v)\n}", "func (x *Big) IsInf(sign int) bool {\n\treturn sign ...
[ "0.8629199", "0.82180965", "0.67190284", "0.6182511", "0.61708623", "0.6162603", "0.602588", "0.6004949", "0.5986634", "0.58150524", "0.5814855", "0.57910305", "0.57887775", "0.5758183", "0.5607472", "0.56050515", "0.54215986", "0.5413703", "0.5351654", "0.5299949", "0.524565...
0.8384886
1
SetMantScale sets z to the given value and scale.
func (z *Big) SetMantScale(value int64, scale int) *Big { z.SetUint64(arith.Abs(value)) z.exp = -scale // compiler should optimize out z.exp = 0 in SetUint64 if value < 0 { z.form |= signbit } return z }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (z *Big) SetBigMantScale(value *big.Int, scale int) *Big {\n\t// Do this first in case value == z.unscaled. Don't want to clobber the sign.\n\tz.form = finite\n\tif value.Sign() < 0 {\n\t\tz.form |= signbit\n\t}\n\n\tz.unscaled.Abs(value)\n\tz.compact = c.Inflated\n\tz.precision = arith.BigLength(value)\n\n\t...
[ "0.68702483", "0.6248807", "0.61674476", "0.6146303", "0.6134963", "0.60448337", "0.60083556", "0.58896357", "0.58430636", "0.5758922", "0.56517684", "0.56401706", "0.55845803", "0.5564209", "0.5545746", "0.54657805", "0.5404176", "0.5345362", "0.5323023", "0.53002053", "0.52...
0.76997876
0
setNaN is an internal NaNsetting method that panics when the OperatingMode is Go.
func (z *Big) setNaN(c Condition, f form, p Payload) *Big { z.form = f z.compact = uint64(p) z.Context.Conditions |= c if z.Context.OperatingMode == Go { panic(ErrNaN{Msg: z.Context.Conditions.String()}) } return z }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (z *Big) SetNaN(signal bool) *Big {\n\tif signal {\n\t\tz.form = snan\n\t} else {\n\t\tz.form = qnan\n\t}\n\tz.compact = 0 // payload\n\treturn z\n}", "func (Integer) IsNaN() bool {\n\treturn false\n}", "func (*BigInt) IsNaN() bool {\n\treturn false\n}", "func (x *Big) IsNaN(quiet int) bool {\n\treturn ...
[ "0.75140935", "0.5479909", "0.5413603", "0.5412807", "0.5314413", "0.5270599", "0.514888", "0.5118978", "0.4997433", "0.49969953", "0.4986642", "0.4976145", "0.4972884", "0.49156773", "0.47601044", "0.47450122", "0.4738099", "0.47066548", "0.46945947", "0.46789107", "0.465650...
0.77540654
0
SetNaN sets z to a signaling NaN if signal is true or quiet NaN otherwise and returns z. No conditions are raised.
func (z *Big) SetNaN(signal bool) *Big { if signal { z.form = snan } else { z.form = qnan } z.compact = 0 // payload return z }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (z *Big) setNaN(c Condition, f form, p Payload) *Big {\n\tz.form = f\n\tz.compact = uint64(p)\n\tz.Context.Conditions |= c\n\tif z.Context.OperatingMode == Go {\n\t\tpanic(ErrNaN{Msg: z.Context.Conditions.String()})\n\t}\n\treturn z\n}", "func (x *Big) IsNaN(quiet int) bool {\n\treturn quiet >= 0 && x.form&...
[ "0.74239993", "0.6201739", "0.5968852", "0.5890181", "0.54903305", "0.5423392", "0.52285933", "0.51462054", "0.5133921", "0.51028574", "0.49785635", "0.48616007", "0.48463738", "0.48407465", "0.48036268", "0.4778241", "0.47490975", "0.46815753", "0.46608052", "0.46586132", "0...
0.8064771
0
SetRat sets z to to the possibly rounded value of x and return z.
func (z *Big) SetRat(x *big.Rat) *Big { if x.IsInt() { return z.Context.round(z.SetBigMantScale(x.Num(), 0)) } var num, denom Big num.SetBigMantScale(x.Num(), 0) denom.SetBigMantScale(x.Denom(), 0) return z.Quo(&num, &denom) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (z *Float) SetRat(x *Rat) *Float {}", "func FloatSetRat(z *big.Float, x *big.Rat,) *big.Float", "func RatSet(z *big.Rat, x *big.Rat,) *big.Rat", "func RatSetFrac(z *big.Rat, a, b *big.Int,) *big.Rat", "func (z *Rat) Set(x *Rat) *Rat {}", "func (z *Rat) SetFrac(a, b *Int) *Rat {}", "func RatSetInt(...
[ "0.83360916", "0.7740379", "0.7161458", "0.7090396", "0.70478415", "0.6948242", "0.6323682", "0.61933255", "0.61871076", "0.60385567", "0.59962004", "0.5915905", "0.5885793", "0.58185494", "0.581638", "0.57433975", "0.54851097", "0.545949", "0.5458787", "0.53350526", "0.53350...
0.7430601
2
SetScale sets z's scale to scale and returns z.
func (z *Big) SetScale(scale int) *Big { z.exp = -scale return z }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (t *Transform) SetScale(sx, sy float64) *Transform {\n\tt.Scale1.X = sx - 1\n\tt.Scale1.Y = sy - 1\n\treturn t\n}", "func (t *Transform) SetScale(v *Vector) ITransform {\n\tt.Scale = v\n\treturn t\n}", "func (g *GameObject) SetScale(scale float64) {\r\n\tg.Hitbox.maxX *= scale / g.Scale\r\n\tg.Hitbox.maxY...
[ "0.70505315", "0.6758108", "0.6713929", "0.6677079", "0.66562027", "0.6576691", "0.6392196", "0.62601715", "0.62386155", "0.6198014", "0.61925036", "0.6184184", "0.61688167", "0.60977143", "0.6028688", "0.6024583", "0.59383476", "0.59314585", "0.59158814", "0.58420074", "0.58...
0.6945619
1
SetString sets z to the value of s, returning z and a bool indicating success. s must be a string in one of the following formats: 1.234 1234 1.234e+5 1.234E5 0.000001234 Inf NaN qNaN sNaN Each value may be preceded by an optional sign, ``'' or ``+''. ``Inf'' and ``NaN'' map to ``+Inf'' and ``qNaN'', respectively. NaN values may have optional diagnostic information, represented as trailing digits; for example, ``NaN123''. These digits are otherwise ignored but are included for robustness.
func (z *Big) SetString(s string) (*Big, bool) { if err := z.scan(strings.NewReader(s)); err != nil { return nil, false } return z, true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func FloatSetString(z *big.Float, s string) (*big.Float, bool)", "func RatSetString(z *big.Rat, s string) (*big.Rat, bool)", "func (f *Float) SetString(s string, base int) error {\n\tf.doinit()\n\tif base < 2 || base > 36 {\n\t\treturn os.ErrInvalid\n\t}\n\tp := C.CString(s)\n\tdefer C.free(unsafe.Pointer(p))\...
[ "0.7824855", "0.7118221", "0.60867715", "0.5958156", "0.583567", "0.579007", "0.56625277", "0.5600679", "0.55482984", "0.5476491", "0.5296352", "0.5292799", "0.5216194", "0.5213179", "0.52104795", "0.51960665", "0.5156387", "0.5130611", "0.512982", "0.51194686", "0.5075163", ...
0.613978
2
SetUint64 is shorthand for SetMantScale(x, 0) for an unsigned integer.
func (z *Big) SetUint64(x uint64) *Big { z.compact = x if x == c.Inflated { z.unscaled.SetUint64(x) } z.precision = arith.Length(x) z.exp = 0 z.form = finite return z }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (z *Rat) SetUint64(x uint64) *Rat {}", "func (z *Int) SetUint64(x uint64) *Int {}", "func SetUint64(z *big.Int, x uint64) *big.Int {\n\treturn z.SetUint64(x)\n}", "func (z *Element22) SetUint64(v uint64) *Element22 {\n\tz[0] = v\n\tz[1] = 0\n\tz[2] = 0\n\tz[3] = 0\n\tz[4] = 0\n\tz[5] = 0\n\tz[6] = 0\n\t...
[ "0.73395187", "0.729106", "0.71818507", "0.7126499", "0.7075077", "0.7042647", "0.70083535", "0.6851255", "0.67058647", "0.6661966", "0.66220045", "0.6615672", "0.6601334", "0.6601334", "0.6547794", "0.6539059", "0.6418768", "0.6283617", "0.6243698", "0.60050946", "0.5908653"...
0.7513824
0
ord returns similar to Sign except Inf is 2 and +Inf is +2.
func (x *Big) ord(abs bool) int { if x.form&inf != 0 { if x.form == pinf || abs { return +2 } return -2 } r := x.Sign() if abs && r < 0 { r = -r } return r }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (x *Int) Sign() int {}", "func calcSign(val float64) float64 {\n\tif val > 0 {\n\t\treturn 1\n\t}\n\treturn -1\n}", "func dorthInfty(p0, p2 Point) Point {\n\treturn Point{signf(p2.X - p0.X), -signf(p2.Y - p0.Y)}\n}", "func FloatSign(x *big.Float,) int", "func (f Fixed) Sign() int {\n\tif f.IsNaN() {\n...
[ "0.5777227", "0.5188269", "0.5188086", "0.5187969", "0.5134426", "0.5134426", "0.5123668", "0.50739413", "0.5066013", "0.5023007", "0.49716365", "0.49370477", "0.4899399", "0.48936492", "0.48849803", "0.4878196", "0.4849733", "0.48319378", "0.4806844", "0.47824758", "0.477905...
0.71257085
0
Sign returns: 1 if x 0 No distinction is made between +0 and 0. The result is undefined if x is a NaN value.
func (x *Big) Sign() int { if debug { x.validate() } if (x.IsFinite() && x.isZero()) || x.IsNaN(0) { return 0 } if x.form&signbit != 0 { return -1 } return 1 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func Sign(x float64) float64 {\n\tif x < 0 {\n\t\treturn -1\n\t}\n\tif x > 0 {\n\t\treturn 1\n\t}\n\treturn 0\n}", "func Sign(x int) int {\n\tif x < 0 {\n\t\treturn -1\n\t}\n\treturn 1\n}", "func calcSign(val float64) float64 {\n\tif val > 0 {\n\t\treturn 1\n\t}\n\treturn -1\n}", "func (f Fixed) Sign() int {...
[ "0.7989132", "0.75590163", "0.7203545", "0.70914", "0.70914", "0.7074754", "0.70662683", "0.6580768", "0.6564695", "0.6531949", "0.6505666", "0.64202595", "0.6416973", "0.63917357", "0.6371356", "0.6346127", "0.6341612", "0.63316786", "0.62732047", "0.6267306", "0.62441814", ...
0.6561281
9
Signbit reports whether x is negative, negative zero, negative infinity, or negative NaN.
func (x *Big) Signbit() bool { if debug { x.validate() } return x.form&signbit != 0 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (x *Float) Signbit() bool {}", "func Sign(x float64) float64 {\n\tif x < 0 {\n\t\treturn -1\n\t}\n\tif x > 0 {\n\t\treturn 1\n\t}\n\treturn 0\n}", "func FloatSignbit(x *big.Float,) bool", "func (f Float) Signbit() bool {\n\t// 0b1000000000000000\n\treturn f.se&0x8000 != 0\n}", "func Signbit(a float64)...
[ "0.77398324", "0.7594668", "0.74128157", "0.7371722", "0.7361564", "0.7361564", "0.7284012", "0.72452277", "0.71969754", "0.6993791", "0.68733305", "0.6861012", "0.6861012", "0.68431103", "0.66814494", "0.66291636", "0.63777107", "0.6142583", "0.61321634", "0.6102929", "0.606...
0.68379724
14
String returns the string representation of x. It's equivalent to the %s verb discussed in the Format method's documentation. Special cases depend on the OperatingMode.
func (x *Big) String() string { if x == nil { return "<nil>" } var ( b = new(strings.Builder) f = formatter{w: b, prec: x.Precision(), width: noWidth} e = sciE[x.Context.OperatingMode] ) b.Grow(x.Precision()) f.format(x, normal, e) return b.String() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (nims *NetInterfaceModeSelect) StringX(ctx context.Context) string {\n\tv, err := nims.String(ctx)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn v\n}", "func (nimgb *NetInterfaceModeGroupBy) StringX(ctx context.Context) string {\n\tv, err := nimgb.String(ctx)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tr...
[ "0.67269456", "0.66737294", "0.64220047", "0.64161074", "0.6334801", "0.62773335", "0.6265041", "0.6250889", "0.62411124", "0.62329996", "0.622916", "0.6224346", "0.622223", "0.62054604", "0.62054104", "0.62021345", "0.61967856", "0.6195242", "0.61898804", "0.61781365", "0.61...
0.630778
5
Sub sets z to x y and returns z.
func (z *Big) Sub(x, y *Big) *Big { return z.Context.Sub(z, x, y) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func Sub(z, x, y *Elt)", "func (v *Vec3i) SetSub(other Vec3i) {\n\tv.X -= other.X\n\tv.Y -= other.Y\n\tv.Z -= other.Z\n}", "func (z *Int) Sub(x, y *Int) *Int {}", "func (v Vec3i) Sub(other Vec3i) Vec3i {\n\treturn Vec3i{v.X - other.X, v.Y - other.Y, v.Z - other.Z}\n}", "func (u *Vec3) Sub(v *Vec3) *Vec3 {\...
[ "0.73003036", "0.7089744", "0.6911011", "0.6789992", "0.67244226", "0.6708758", "0.65887916", "0.65609795", "0.64671993", "0.6458616", "0.64492327", "0.6433949", "0.6428546", "0.64146143", "0.6404549", "0.63840085", "0.62998414", "0.6273318", "0.62339556", "0.60979605", "0.60...
0.68231016
3
validate ensures x's internal state is correct. There's no need for it to have good performance since it's for debug == true only.
func (x *Big) validate() { defer func() { if err := recover(); err != nil { pc, _, _, ok := runtime.Caller(4) if caller := runtime.FuncForPC(pc); ok && caller != nil { fmt.Println("called by:", caller.Name()) } type Big struct { Context Context unscaled big.Int compact uint64 exp int precision int form form } fmt.Printf("%#v\n", (*Big)(x)) panic(err) } }() switch x.form { case finite, finite | signbit: if x.isInflated() { if x.unscaled.IsUint64() && x.unscaled.Uint64() != c.Inflated { panic(fmt.Sprintf("inflated but unscaled == %d", x.unscaled.Uint64())) } if x.unscaled.Sign() < 0 { panic("x.unscaled.Sign() < 0") } if bl, xp := arith.BigLength(&x.unscaled), x.precision; bl != xp { panic(fmt.Sprintf("BigLength (%d) != x.Precision (%d)", bl, xp)) } } if x.isCompact() { if bl, xp := arith.Length(x.compact), x.Precision(); bl != xp { panic(fmt.Sprintf("BigLength (%d) != x.Precision() (%d)", bl, xp)) } } case snan, ssnan, qnan, sqnan, pinf, ninf: // OK case nan: panic(x.form.String()) default: panic(fmt.Sprintf("invalid form %s", x.form)) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c layout) validate() error {\n\tlog.Println(\"[CONFIG] Validating...\")\n\tvar stateNames = make(map[string]struct{})\n\tfor _, state := range c.States {\n\t\t// Address must be given\n\t\tif state.Address == \"\" {\n\t\t\treturn fmt.Errorf(\"[CONFIG] no address: '%s'\", state.Name)\n\t\t}\n\t\t// Address mu...
[ "0.6207214", "0.61084396", "0.6083325", "0.6044888", "0.60177207", "0.60151553", "0.59733284", "0.5963761", "0.5963745", "0.59573025", "0.5941212", "0.5924549", "0.5916653", "0.5896575", "0.58810246", "0.5852411", "0.5833823", "0.5823494", "0.57954365", "0.578536", "0.5776891...
0.64266586
0
%n: name %i: info %s(15:08) start in the golang time format %e(15:08) end in the golang time format %c: category
func (ev *Event) Format(format string) string { return fmt.Sprintf("Start um %s - Name %s\n", ev.Start.Format("15:04"), ev.Name) //return fmt.Sprintf("Start um %s - Name %s\n%s\n", ev.Start.Format("15:04"), ev.Name, ev.Info) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func Info(format string, v ...interface{}) {\n\tnow := time.Now()\n\tfmt.Printf(\"%04d/%02d/%02d %02d:%02d:%02d \", now.Year(), now.Month(), now.Day(), now.Hour(), now.Minute(), now.Second())\n\tfmt.Printf(format + \"\\n\", v ...)\n}", "func timeFormat(i interface{}) string {\n\tif i == nil {\n\t\treturn \"\"\n\...
[ "0.60300833", "0.5984522", "0.56032693", "0.5509569", "0.5505164", "0.54530114", "0.5419605", "0.54179835", "0.54158646", "0.54091454", "0.539712", "0.53604996", "0.53587306", "0.5345082", "0.5297486", "0.5289144", "0.52756804", "0.52756804", "0.52756804", "0.52756804", "0.52...
0.61823803
0
GetId returns the Id field if nonnil, zero value otherwise.
func (o *MicrosoftGraphWorkbookComment) GetId() string { if o == nil || o.Id == nil { var ret string return ret } return *o.Id }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *SingleSelectFieldField) GetId() int32 {\n\tif o == nil {\n\t\tvar ret int32\n\t\treturn ret\n\t}\n\n\treturn o.Id\n}", "func (o *SingleSelectFieldField) GetIdOk() (*int32, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn &o.Id, true\n}", "func (o *ProdutoVM) GetId() int64 {\n\tif o == ni...
[ "0.6953976", "0.67168885", "0.66161835", "0.660102", "0.6598684", "0.6574584", "0.65456045", "0.6534216", "0.652696", "0.64897794", "0.64836514", "0.6436118", "0.6433812", "0.63791615", "0.63787955", "0.63447875", "0.6341663", "0.63393587", "0.6339328", "0.6337854", "0.63315"...
0.0
-1
GetIdOk returns a tuple with the Id field if it's nonnil, zero value otherwise and a boolean to check if the value has been set.
func (o *MicrosoftGraphWorkbookComment) GetIdOk() (string, bool) { if o == nil || o.Id == nil { var ret string return ret, false } return *o.Id, true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *SingleSelectFieldField) GetIdOk() (*int32, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn &o.Id, true\n}", "func (o *ProdutoVM) GetIdOk() (*int64, bool) {\n\tif o == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Id.Get(), o.Id.IsSet()\n}", "func (o *LocalDatabaseProvider) GetIdOk() (*...
[ "0.78224844", "0.77446544", "0.7714638", "0.76874846", "0.7682164", "0.76202273", "0.76202273", "0.75946486", "0.75638247", "0.7550405", "0.7548159", "0.7534694", "0.7534606", "0.7528571", "0.7521218", "0.7514315", "0.7492807", "0.7488628", "0.7481412", "0.7471156", "0.746399...
0.0
-1
HasId returns a boolean if a field has been set.
func (o *MicrosoftGraphWorkbookComment) HasId() bool { if o != nil && o.Id != nil { return true } return false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *User) HasId() bool {\n\tif o != nil && o.Id != nil {\n\t\treturn true\n\t}\n\n\treturn false\n}", "func (o *User) HasId() bool {\n\tif o != nil && o.Id != nil {\n\t\treturn true\n\t}\n\n\treturn false\n}", "func (o *ModelsUser) HasId() bool {\n\tif o != nil && o.Id != nil {\n\t\treturn true\n\t}\n\n\t...
[ "0.7803682", "0.7803682", "0.7782001", "0.77493006", "0.76640564", "0.7561576", "0.7555614", "0.7519684", "0.7519557", "0.751327", "0.74863374", "0.748026", "0.74574", "0.745003", "0.7444921", "0.7437811", "0.7413338", "0.74073607", "0.7393123", "0.7382991", "0.7362027", "0...
0.64817476
90
SetId gets a reference to the given string and assigns it to the Id field.
func (o *MicrosoftGraphWorkbookComment) SetId(v string) { o.Id = &v }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (me *TartIdType) Set(s string) { (*xsdt.String)(me).Set(s) }", "func TestGetSetID(t *testing.T) {\n\tid := ID(\"someid\")\n\tvar r Record\n\tr.Set(&id)\n\n\tvar id2 ID\n\trequire.NoError(t, r.Load(&id2))\n\tassert.Equal(t, id, id2)\n}", "func (p *Process) CmdSetID(pac teoapi.Packet) (err error) {\n\tdata ...
[ "0.671707", "0.66311085", "0.65961593", "0.654557", "0.64179665", "0.6402706", "0.6308949", "0.6239355", "0.62046885", "0.6100801", "0.6075291", "0.60554713", "0.6033761", "0.6030782", "0.6029326", "0.59943116", "0.59880346", "0.5944602", "0.5934843", "0.5913901", "0.5906217"...
0.0
-1
GetContent returns the Content field if nonnil, zero value otherwise.
func (o *MicrosoftGraphWorkbookComment) GetContent() string { if o == nil || o.Content == nil { var ret string return ret } return *o.Content }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *GetMessagesAllOf) GetContent() interface{} {\n\tif o == nil {\n\t\tvar ret interface{}\n\t\treturn ret\n\t}\n\treturn o.Content\n}", "func (b *Blob) GetContent() string {\n\tif b == nil || b.Content == nil {\n\t\treturn \"\"\n\t}\n\treturn *b.Content\n}", "func (m Model) GetContent() string {\n\tretu...
[ "0.72860307", "0.72528857", "0.71743584", "0.71743584", "0.7036505", "0.6993604", "0.6942331", "0.6921864", "0.6866991", "0.68316424", "0.68258965", "0.68150693", "0.6804708", "0.6711301", "0.6673907", "0.6668974", "0.66565114", "0.6635864", "0.6627516", "0.6609262", "0.66012...
0.602728
60
GetContentOk returns a tuple with the Content field if it's nonnil, zero value otherwise and a boolean to check if the value has been set.
func (o *MicrosoftGraphWorkbookComment) GetContentOk() (string, bool) { if o == nil || o.Content == nil { var ret string return ret, false } return *o.Content, true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *ViewSampleProject) GetContentOk() (*map[string]interface{}, bool) {\n\tif o == nil || o.Content == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Content, true\n}", "func (o *GetMessagesAllOf) GetContentOk() (*interface{}, bool) {\n\tif o == nil || o.Content == nil {\n\t\treturn nil, false\n\t}\n\treturn...
[ "0.80017406", "0.79408884", "0.7936158", "0.7891302", "0.783001", "0.76929504", "0.76466423", "0.75997", "0.7336739", "0.72340393", "0.70073485", "0.6810419", "0.6604012", "0.645862", "0.62594706", "0.6246274", "0.6177604", "0.6143385", "0.611876", "0.60643893", "0.60283494",...
0.7436027
8
HasContent returns a boolean if a field has been set.
func (o *MicrosoftGraphWorkbookComment) HasContent() bool { if o != nil && o.Content != nil { return true } return false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *ViewSampleProject) HasContent() bool {\n\tif o != nil && o.Content != nil {\n\t\treturn true\n\t}\n\n\treturn false\n}", "func (o *SimpleStringWeb) HasContent() bool {\n\tif o != nil && o.Content != nil {\n\t\treturn true\n\t}\n\n\treturn false\n}", "func (o *DriveItemVersion) HasContent() bool {\n\ti...
[ "0.7470532", "0.71649307", "0.7099103", "0.70884323", "0.70447147", "0.6985137", "0.6899113", "0.6840653", "0.68236077", "0.6785173", "0.6721902", "0.63561416", "0.6296834", "0.6254155", "0.6204622", "0.61749446", "0.6151084", "0.60795254", "0.6074527", "0.6074329", "0.607273...
0.63925993
11
SetContent gets a reference to the given string and assigns it to the Content field.
func (o *MicrosoftGraphWorkbookComment) SetContent(v string) { o.Content = &v }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *ChatMessageAttachment) SetContent(value *string)() {\n err := m.GetBackingStore().Set(\"content\", value)\n if err != nil {\n panic(err)\n }\n}", "func (editor *Editor) SetContent(html string, index int) {\n\teditor.inst.Call(\"setContent\", html, index)\n}", "func (m *WorkbookCommentR...
[ "0.7248469", "0.71384996", "0.70648813", "0.6927052", "0.66024256", "0.652039", "0.6448842", "0.6412562", "0.62967324", "0.6257796", "0.6246422", "0.6246422", "0.6213247", "0.6145128", "0.6068305", "0.6034914", "0.6027223", "0.6008623", "0.6007775", "0.59951055", "0.5994749",...
0.5150617
81
SetContentExplicitNull (un)sets Content to be considered as explicit "null" value when serializing to JSON (pass true as argument to set this, false to unset) The Content value is set to nil even if false is passed
func (o *MicrosoftGraphWorkbookComment) SetContentExplicitNull(b bool) { o.Content = nil o.isExplicitNullContent = b }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *MicrosoftGraphVisualInfo) SetContentExplicitNull(b bool) {\n\to.Content = nil\n\to.isExplicitNullContent = b\n}", "func (o *DriveItemVersion) SetContentExplicitNull(b bool) {\n\to.Content = nil\n\to.isExplicitNullContent = b\n}", "func (o *InlineObject901) SetValueIfTrueExplicitNull(b bool) {\n\to.Val...
[ "0.76932585", "0.7527978", "0.6653902", "0.6630438", "0.6555314", "0.64957523", "0.6343414", "0.63400555", "0.6285292", "0.6185744", "0.61630803", "0.6076197", "0.5954041", "0.5881144", "0.58613396", "0.5819549", "0.5816799", "0.5776044", "0.5772046", "0.57659173", "0.5751211...
0.76145333
1
GetContentType returns the ContentType field if nonnil, zero value otherwise.
func (o *MicrosoftGraphWorkbookComment) GetContentType() string { if o == nil || o.ContentType == nil { var ret string return ret } return *o.ContentType }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *GetMessagesAllOf) GetContentType() interface{} {\n\tif o == nil {\n\t\tvar ret interface{}\n\t\treturn ret\n\t}\n\treturn o.ContentType\n}", "func (r *ReleaseAsset) GetContentType() string {\n\tif r == nil || r.ContentType == nil {\n\t\treturn \"\"\n\t}\n\treturn *r.ContentType\n}", "func (o *InlineR...
[ "0.7752258", "0.7363014", "0.7343811", "0.7250318", "0.72422904", "0.72274965", "0.7166052", "0.7135691", "0.71105003", "0.70960563", "0.70768976", "0.70522594", "0.69677293", "0.6942977", "0.69010484", "0.6865125", "0.6849224", "0.6791845", "0.67761767", "0.67645895", "0.671...
0.69808453
12
GetContentTypeOk returns a tuple with the ContentType field if it's nonnil, zero value otherwise and a boolean to check if the value has been set.
func (o *MicrosoftGraphWorkbookComment) GetContentTypeOk() (string, bool) { if o == nil || o.ContentType == nil { var ret string return ret, false } return *o.ContentType, true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *GetMessagesAllOf) GetContentTypeOk() (*interface{}, bool) {\n\tif o == nil || o.ContentType == nil {\n\t\treturn nil, false\n\t}\n\treturn &o.ContentType, true\n}", "func (o *InlineResponse20049Post) GetContentTypeOk() (*string, bool) {\n\tif o == nil || o.ContentType == nil {\n\t\treturn nil, false\n\t...
[ "0.78817636", "0.7724221", "0.77228767", "0.74312943", "0.6998404", "0.6843948", "0.6809836", "0.6389326", "0.63586456", "0.6267725", "0.62641394", "0.6243983", "0.62135416", "0.6205149", "0.616409", "0.61460066", "0.61456543", "0.61446464", "0.6105975", "0.6096652", "0.60801...
0.76570076
3
HasContentType returns a boolean if a field has been set.
func (o *MicrosoftGraphWorkbookComment) HasContentType() bool { if o != nil && o.ContentType != nil { return true } return false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *InlineResponse20049Post) HasContentType() bool {\n\tif o != nil && o.ContentType != nil {\n\t\treturn true\n\t}\n\n\treturn false\n}", "func (o *GetMessagesAllOf) HasContentType() bool {\n\tif o != nil && o.ContentType != nil {\n\t\treturn true\n\t}\n\n\treturn false\n}", "func (o *MicrosoftGraphListI...
[ "0.7573786", "0.7540341", "0.7538529", "0.7398957", "0.7365539", "0.70325786", "0.69804555", "0.67823416", "0.6748523", "0.67033076", "0.66077507", "0.6190773", "0.6122035", "0.61136115", "0.61129403", "0.60410094", "0.59980243", "0.59320676", "0.589925", "0.5887395", "0.5878...
0.72122514
5
SetContentType gets a reference to the given string and assigns it to the ContentType field.
func (o *MicrosoftGraphWorkbookComment) SetContentType(v string) { o.ContentType = &v }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Action) SetContentType(val string) string {\n\tvar ctype string\n\tif strings.ContainsRune(val, '/') {\n\t\tctype = val\n\t} else {\n\t\tif !strings.HasPrefix(val, \".\") {\n\t\t\tval = \".\" + val\n\t\t}\n\t\tctype = mime.TypeByExtension(val)\n\t}\n\tif ctype != \"\" {\n\t\tc.SetHeader(\"Content-Type\", ...
[ "0.78430754", "0.7798161", "0.7772444", "0.77703106", "0.7654774", "0.75559455", "0.752631", "0.744577", "0.7419545", "0.7359129", "0.73229665", "0.7292025", "0.7183151", "0.71086603", "0.7099292", "0.706196", "0.7061862", "0.7051272", "0.69764537", "0.6964467", "0.68886405",...
0.6297317
47
GetReplies returns the Replies field if nonnil, zero value otherwise.
func (o *MicrosoftGraphWorkbookComment) GetReplies() []MicrosoftGraphWorkbookCommentReply { if o == nil || o.Replies == nil { var ret []MicrosoftGraphWorkbookCommentReply return ret } return *o.Replies }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *MessageReplies) GetReplies() (value int) {\n\tif m == nil {\n\t\treturn\n\t}\n\treturn m.Replies\n}", "func GetReplies(w http.ResponseWriter, r *http.Request) {\n\tparams := mux.Vars(r)\n\tcommentID := params[\"comment_id\"]\n\n\tif commentID == \"\" {\n\t\tmsg := map[string]string{\"error\": \"comment ...
[ "0.769033", "0.68471485", "0.6440696", "0.63884795", "0.6322101", "0.63199073", "0.60624564", "0.5966768", "0.5865303", "0.5838394", "0.5683662", "0.5631738", "0.54620546", "0.53774023", "0.5307289", "0.52935123", "0.5277589", "0.52607006", "0.52401686", "0.49955958", "0.4962...
0.6689372
2
GetRepliesOk returns a tuple with the Replies field if it's nonnil, zero value otherwise and a boolean to check if the value has been set.
func (o *MicrosoftGraphWorkbookComment) GetRepliesOk() ([]MicrosoftGraphWorkbookCommentReply, bool) { if o == nil || o.Replies == nil { var ret []MicrosoftGraphWorkbookCommentReply return ret, false } return *o.Replies, true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewGetRepliesIDOK() *GetRepliesIDOK {\n\treturn &GetRepliesIDOK{}\n}", "func (m *MessageReplies) GetReplies() (value int) {\n\tif m == nil {\n\t\treturn\n\t}\n\treturn m.Replies\n}", "func (o *GetMessagesAllOf) GetReactionsOk() (*interface{}, bool) {\n\tif o == nil || o.Reactions == nil {\n\t\treturn nil,...
[ "0.6417596", "0.6255426", "0.5950571", "0.5895809", "0.58705825", "0.58232564", "0.5774508", "0.570393", "0.5547826", "0.5493874", "0.5454028", "0.5406109", "0.5384522", "0.5354651", "0.5348693", "0.5334422", "0.5319017", "0.53096014", "0.52918345", "0.5283456", "0.52464116",...
0.7425649
0
HasReplies returns a boolean if a field has been set.
func (o *MicrosoftGraphWorkbookComment) HasReplies() bool { if o != nil && o.Replies != nil { return true } return false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m SecurityListRequest) HasRepurchaseTerm() bool {\n\treturn m.Has(tag.RepurchaseTerm)\n}", "func (m CrossOrderCancelReplaceRequest) HasRepurchaseTerm() bool {\n\treturn m.Has(tag.RepurchaseTerm)\n}", "func (o *PostWebhook) HasPrRescoped() bool {\n\tif o != nil && o.PrRescoped != nil {\n\t\treturn true\n\...
[ "0.6166356", "0.60873276", "0.60239065", "0.6015529", "0.59779763", "0.5946915", "0.5864806", "0.5815077", "0.5794932", "0.5744371", "0.57413405", "0.5729629", "0.56734383", "0.56452215", "0.56445", "0.5633605", "0.56222725", "0.56136966", "0.56040984", "0.55954725", "0.55771...
0.6954371
0
SetReplies gets a reference to the given []MicrosoftGraphWorkbookCommentReply and assigns it to the Replies field.
func (o *MicrosoftGraphWorkbookComment) SetReplies(v []MicrosoftGraphWorkbookCommentReply) { o.Replies = &v }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *ChatMessage) SetReplies(value []ChatMessageable)() {\n m.replies = value\n}", "func (o *MicrosoftGraphWorkbookComment) GetReplies() []MicrosoftGraphWorkbookCommentReply {\n\tif o == nil || o.Replies == nil {\n\t\tvar ret []MicrosoftGraphWorkbookCommentReply\n\t\treturn ret\n\t}\n\treturn *o.Replies\n...
[ "0.7325392", "0.71738416", "0.5862128", "0.5842886", "0.5820806", "0.5809152", "0.5734729", "0.5624805", "0.55994105", "0.5487002", "0.5420558", "0.5414529", "0.5323386", "0.53125703", "0.5285075", "0.52696323", "0.52277744", "0.5119111", "0.51165307", "0.5108387", "0.5073747...
0.8394965
0
MarshalJSON returns the JSON representation of the model.
func (o MicrosoftGraphWorkbookComment) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Content == nil { if o.isExplicitNullContent { toSerialize["content"] = o.Content } } else { toSerialize["content"] = o.Content } if o.ContentType != nil { toSerialize["contentType"] = o.ContentType } if o.Replies != nil { toSerialize["replies"] = o.Replies } return json.Marshal(toSerialize) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m Model) MarshalJSON() ([]byte, error) {\n\tobjectMap := make(map[string]any)\n\tpopulate(objectMap, \"kind\", m.Kind)\n\tpopulate(objectMap, \"model\", m.Model)\n\tpopulate(objectMap, \"skuName\", m.SKUName)\n\treturn json.Marshal(objectMap)\n}", "func (m *Model) MarshalJSON() ([]byte, error) {\n\tif m.da...
[ "0.71582407", "0.71279377", "0.7047187", "0.68152744", "0.6574039", "0.6569073", "0.6527679", "0.6508534", "0.6501809", "0.64460707", "0.6431052", "0.6413172", "0.64060473", "0.63677573", "0.63509995", "0.6297178", "0.6292525", "0.62651086", "0.6256976", "0.62447673", "0.6218...
0.0
-1
HandleGetAllTableNames is an endpoint handler which return all the collection(table) names for specified data base
func HandleGetAllTableNames(adminMan *admin.Manager, modules *modules.Modules) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { // Get the JWT token from header token := utils.GetTokenFromHeader(r) defer utils.CloseTheCloser(r.Body) // Check if the request is authorised if err := adminMan.IsTokenValid(token); err != nil { _ = utils.SendErrorResponse(w, http.StatusUnauthorized, err.Error()) return } // Create a context of execution ctx, cancel := context.WithTimeout(r.Context(), 60*time.Second) defer cancel() vars := mux.Vars(r) dbAlias := vars["dbAlias"] crud := modules.DB() collections, err := crud.GetCollections(ctx, dbAlias) if err != nil { _ = utils.SendErrorResponse(w, http.StatusInternalServerError, err.Error()) return } cols := make([]string, len(collections)) for i, value := range collections { cols[i] = value.TableName } _ = utils.SendResponse(w, http.StatusOK, model.Response{Result: cols}) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (p *HbaseClient) GetTableNames() (r [][]byte, err error) {\n\tif err = p.sendGetTableNames(); err != nil {\n\t\treturn\n\t}\n\treturn p.recvGetTableNames()\n}", "func (th *TableHandler) GetTables(c echo.Context) (err error) {\n\treqID := c.Response().Header().Get(echo.HeaderXRequestID)\n\tlimit, offset, err...
[ "0.62497705", "0.57808363", "0.5736392", "0.56477576", "0.56258976", "0.5623935", "0.5459001", "0.5458035", "0.5439536", "0.5350748", "0.53380686", "0.5328151", "0.5307771", "0.5295626", "0.5273486", "0.5226321", "0.52094626", "0.52069426", "0.5204705", "0.5194583", "0.518532...
0.8256925
0
HandleGetDatabaseConnectionState gives the status of connection state of client
func HandleGetDatabaseConnectionState(adminMan *admin.Manager, modules *modules.Modules) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { // Get the JWT token from header token := utils.GetTokenFromHeader(r) defer utils.CloseTheCloser(r.Body) // Check if the request is authorised if err := adminMan.IsTokenValid(token); err != nil { _ = utils.SendErrorResponse(w, http.StatusUnauthorized, err.Error()) return } // Create a context of execution ctx, cancel := context.WithTimeout(r.Context(), 60*time.Second) defer cancel() vars := mux.Vars(r) dbAlias := vars["dbAlias"] crud := modules.DB() connState := crud.GetConnectionState(ctx, dbAlias) _ = utils.SendResponse(w, http.StatusOK, model.Response{Result: connState}) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ConnConnectionState(c *tls.Conn,) tls.ConnectionState", "func (o *VirtualizationVmwareVirtualMachineAllOf) GetConnectionState() string {\n\tif o == nil || o.ConnectionState == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\treturn *o.ConnectionState\n}", "func (m *ExternalConnection) GetState()(*Connect...
[ "0.61654705", "0.60577226", "0.60476184", "0.5804549", "0.57145476", "0.56411034", "0.5468413", "0.543951", "0.5418034", "0.54064167", "0.5388684", "0.5274031", "0.52640116", "0.52092063", "0.52074766", "0.5177916", "0.50860906", "0.5077236", "0.50597227", "0.5044706", "0.502...
0.7872185
0
HandleDeleteTable is an endpoint handler which deletes a table in specified database & removes it from config
func HandleDeleteTable(adminMan *admin.Manager, modules *modules.Modules, syncman *syncman.Manager) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { // Get the JWT token from header token := utils.GetTokenFromHeader(r) defer utils.CloseTheCloser(r.Body) // Check if the request is authorised if err := adminMan.IsTokenValid(token); err != nil { _ = utils.SendErrorResponse(w, http.StatusUnauthorized, err.Error()) return } // Create a context of execution ctx, cancel := context.WithTimeout(r.Context(), 60*time.Second) defer cancel() vars := mux.Vars(r) dbAlias := vars["dbAlias"] projectID := vars["project"] col := vars["col"] crud := modules.DB() if err := crud.DeleteTable(ctx, dbAlias, col); err != nil { _ = utils.SendErrorResponse(w, http.StatusInternalServerError, err.Error()) return } if err := syncman.SetDeleteCollection(ctx, projectID, dbAlias, col); err != nil { _ = utils.SendErrorResponse(w, http.StatusInternalServerError, err.Error()) return } _ = utils.SendOkayResponse(w) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func DeleteTableHandler(w http.ResponseWriter, req *http.Request) {\n\tif bbpd_runinfo.BBPDAbortIfClosed(w) {\n\t\treturn\n\t}\n\tif req.Method == \"POST\" {\n\t\tdeleteTable_POST_Handler(w, req)\n\t} else {\n\t\te := fmt.Sprintf(\"delete_table_route.DeleteTablesHandler:bad method %s\", req.Method)\n\t\tlog.Printf...
[ "0.6963174", "0.676391", "0.62355494", "0.62247586", "0.59905803", "0.59797716", "0.58880305", "0.5785819", "0.578474", "0.5781386", "0.5774196", "0.5727618", "0.57153195", "0.56381917", "0.5621189", "0.5557837", "0.554666", "0.5542971", "0.55374545", "0.5530049", "0.5524039"...
0.8042683
0
HandleSetDatabaseConfig is an endpoint handler which updates database config & connects to database
func HandleSetDatabaseConfig(adminMan *admin.Manager, syncman *syncman.Manager) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { // Get the JWT token from header token := utils.GetTokenFromHeader(r) v := config.CrudStub{} _ = json.NewDecoder(r.Body).Decode(&v) defer utils.CloseTheCloser(r.Body) // Check if the request is authorised if err := adminMan.IsTokenValid(token); err != nil { _ = utils.SendErrorResponse(w, http.StatusUnauthorized, err.Error()) return } ctx, cancel := context.WithTimeout(r.Context(), 60*time.Second) defer cancel() vars := mux.Vars(r) dbAlias := vars["dbAlias"] projectID := vars["project"] if err := syncman.SetDatabaseConnection(ctx, projectID, dbAlias, v); err != nil { _ = utils.SendErrorResponse(w, http.StatusInternalServerError, err.Error()) return } _ = utils.SendOkayResponse(w) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func HandleGetDatabaseConfig(adminMan *admin.Manager, syncMan *syncman.Manager) http.HandlerFunc {\n\treturn func(w http.ResponseWriter, r *http.Request) {\n\n\t\t// Get the JWT token from header\n\t\ttoken := utils.GetTokenFromHeader(r)\n\n\t\t// Check if the request is authorised\n\t\tif err := adminMan.IsTokenV...
[ "0.6874534", "0.63710827", "0.6368821", "0.6250105", "0.60468185", "0.5916883", "0.584699", "0.56245667", "0.56034696", "0.5554565", "0.5424244", "0.5418453", "0.53364885", "0.5325168", "0.5322918", "0.5299924", "0.5292995", "0.5275958", "0.52436614", "0.52342105", "0.5167328...
0.8562628
0
HandleGetDatabaseConfig returns handler to get Database Collection
func HandleGetDatabaseConfig(adminMan *admin.Manager, syncMan *syncman.Manager) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { // Get the JWT token from header token := utils.GetTokenFromHeader(r) // Check if the request is authorised if err := adminMan.IsTokenValid(token); err != nil { _ = utils.SendErrorResponse(w, http.StatusUnauthorized, err.Error()) return } ctx, cancel := context.WithTimeout(r.Context(), 60*time.Second) defer cancel() // get project id and dbType from url vars := mux.Vars(r) projectID := vars["project"] dbAlias := "" dbAliasQuery, exists := r.URL.Query()["dbAlias"] if exists { dbAlias = dbAliasQuery[0] } dbConfig, err := syncMan.GetDatabaseConfig(ctx, projectID, dbAlias) if err != nil { _ = utils.SendErrorResponse(w, http.StatusInternalServerError, err.Error()) return } _ = utils.SendResponse(w, http.StatusOK, model.Response{Result: dbConfig}) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func HandleSetDatabaseConfig(adminMan *admin.Manager, syncman *syncman.Manager) http.HandlerFunc {\n\treturn func(w http.ResponseWriter, r *http.Request) {\n\n\t\t// Get the JWT token from header\n\t\ttoken := utils.GetTokenFromHeader(r)\n\n\t\tv := config.CrudStub{}\n\t\t_ = json.NewDecoder(r.Body).Decode(&v)\n\t...
[ "0.67008924", "0.66117525", "0.6582587", "0.6033728", "0.5969824", "0.5961549", "0.5924019", "0.5892341", "0.5854782", "0.58050245", "0.5772277", "0.5765756", "0.5734855", "0.5729053", "0.5716585", "0.5699538", "0.5699309", "0.5600536", "0.5580118", "0.55763507", "0.5571217",...
0.8210549
0
HandleRemoveDatabaseConfig is an endpoint handler which removes database config
func HandleRemoveDatabaseConfig(adminMan *admin.Manager, syncman *syncman.Manager) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { defer utils.CloseTheCloser(r.Body) // Get the JWT token from header token := utils.GetTokenFromHeader(r) // Check if the request is authorised if err := adminMan.IsTokenValid(token); err != nil { _ = utils.SendErrorResponse(w, http.StatusUnauthorized, err.Error()) return } ctx, cancel := context.WithTimeout(r.Context(), 60*time.Second) defer cancel() vars := mux.Vars(r) dbAlias := vars["dbAlias"] projectID := vars["project"] if err := syncman.RemoveDatabaseConfig(ctx, projectID, dbAlias); err != nil { _ = utils.SendErrorResponse(w, http.StatusInternalServerError, err.Error()) return } _ = utils.SendOkayResponse(w) // return } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (s *Manager) RemoveDatabaseConfig(ctx context.Context, project, dbAlias string) error {\n\t// Acquire a lock\n\ts.lock.Lock()\n\tdefer s.lock.Unlock()\n\n\tprojectConfig, err := s.getConfigWithoutLock(project)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// update database config\n\tdelete(projectConfig.Modul...
[ "0.6576037", "0.6371723", "0.61062604", "0.6095322", "0.5963287", "0.5880917", "0.5838892", "0.58317995", "0.55250084", "0.54430795", "0.54256356", "0.5418952", "0.53683305", "0.5244312", "0.5226952", "0.5185141", "0.5163748", "0.51410645", "0.51362616", "0.5135068", "0.51169...
0.87260914
0
HandleGetPreparedQuery returns handler to get PreparedQuery
func HandleGetPreparedQuery(adminMan *admin.Manager, syncMan *syncman.Manager) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { // Get the JWT token from header token := utils.GetTokenFromHeader(r) // Check if the request is authorised if err := adminMan.IsTokenValid(token); err != nil { w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusUnauthorized) _ = json.NewEncoder(w).Encode(map[string]string{"error": err.Error()}) return } ctx, cancel := context.WithTimeout(r.Context(), 10*time.Second) defer cancel() // get project id and dbType from url vars := mux.Vars(r) projectID := vars["project"] dbAlias := "" dbAliasQuery, exists := r.URL.Query()["dbAlias"] if exists { dbAlias = dbAliasQuery[0] } idQuery, exists := r.URL.Query()["id"] id := "" if exists { id = idQuery[0] } result, err := syncMan.GetPreparedQuery(ctx, projectID, dbAlias, id) if err != nil { w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusInternalServerError) _ = json.NewEncoder(w).Encode(map[string]string{"error": err.Error()}) return } w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusOK) _ = json.NewEncoder(w).Encode(model.Response{Result: result}) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (s *HTTPServer) preparedQueryGet(id string, resp http.ResponseWriter, req *http.Request) (interface{}, error) {\n\targs := structs.PreparedQuerySpecificRequest{\n\t\tQueryID: id,\n\t}\n\tif done := s.parse(resp, req, &args.Datacenter, &args.QueryOptions); done {\n\t\treturn nil, nil\n\t}\n\n\tvar reply struct...
[ "0.6333289", "0.60487014", "0.58324856", "0.5713246", "0.55893195", "0.54791415", "0.540371", "0.5313706", "0.52738476", "0.5233486", "0.51003546", "0.507614", "0.5065565", "0.50296164", "0.49401554", "0.4906983", "0.49013954", "0.48929992", "0.48616147", "0.48577946", "0.483...
0.72330827
0
HandleSetPreparedQueries is an endpoint handler which updates database PreparedQueries
func HandleSetPreparedQueries(adminMan *admin.Manager, syncman *syncman.Manager) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { // Get the JWT token from header token := utils.GetTokenFromHeader(r) v := config.PreparedQuery{} _ = json.NewDecoder(r.Body).Decode(&v) defer utils.CloseTheCloser(r.Body) // Check if the request is authorised if err := adminMan.IsTokenValid(token); err != nil { w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusUnauthorized) _ = json.NewEncoder(w).Encode(map[string]string{"error": err.Error()}) return } ctx, cancel := context.WithTimeout(r.Context(), 10*time.Second) defer cancel() vars := mux.Vars(r) dbAlias := vars["dbAlias"] project := vars["project"] id := vars["id"] if err := syncman.SetPreparedQueries(ctx, project, dbAlias, id, &v); err != nil { w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusInternalServerError) _ = json.NewEncoder(w).Encode(map[string]string{"error": err.Error()}) return } w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusOK) // http status codee _ = json.NewEncoder(w).Encode(map[string]interface{}{}) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h ProxyHandler) HandleStmtPrepare(query string) (int, int, interface{}, error) {\n\tfmt.Println(\"prep: \", query)\n\treturn 0, 0, nil, fmt.Errorf(\"not supported now\")\n}", "func HandleRemovePreparedQueries(adminMan *admin.Manager, syncman *syncman.Manager) http.HandlerFunc {\n\treturn func(w http.Respon...
[ "0.6229541", "0.5962847", "0.58610016", "0.58486795", "0.5682206", "0.5546938", "0.54039687", "0.53830296", "0.5369521", "0.53393453", "0.5308527", "0.53072625", "0.5303313", "0.53032124", "0.5291541", "0.52078277", "0.5170898", "0.5154273", "0.5126583", "0.5117485", "0.50112...
0.81889164
0
HandleRemovePreparedQueries is an endpoint handler which removes database PreparedQueries
func HandleRemovePreparedQueries(adminMan *admin.Manager, syncman *syncman.Manager) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { defer utils.CloseTheCloser(r.Body) // Get the JWT token from header token := utils.GetTokenFromHeader(r) // Check if the request is authorised if err := adminMan.IsTokenValid(token); err != nil { w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusUnauthorized) _ = json.NewEncoder(w).Encode(map[string]string{"error": err.Error()}) return } ctx, cancel := context.WithTimeout(r.Context(), 10*time.Second) defer cancel() vars := mux.Vars(r) dbAlias := vars["dbAlias"] project := vars["project"] id := vars["id"] if err := syncman.RemovePreparedQueries(ctx, project, dbAlias, id); err != nil { w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusInternalServerError) _ = json.NewEncoder(w).Encode(map[string]string{"error": err.Error()}) return } w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusOK) // http status codee _ = json.NewEncoder(w).Encode(map[string]interface{}{}) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func HandleSetPreparedQueries(adminMan *admin.Manager, syncman *syncman.Manager) http.HandlerFunc {\n\treturn func(w http.ResponseWriter, r *http.Request) {\n\n\t\t// Get the JWT token from header\n\t\ttoken := utils.GetTokenFromHeader(r)\n\n\t\tv := config.PreparedQuery{}\n\t\t_ = json.NewDecoder(r.Body).Decode(&...
[ "0.5888563", "0.5686316", "0.5609039", "0.54530954", "0.54413426", "0.53977615", "0.51517636", "0.50869685", "0.4974192", "0.4917651", "0.46468815", "0.46307215", "0.45987618", "0.4592117", "0.4565425", "0.4542091", "0.45192263", "0.4510304", "0.45095384", "0.44702333", "0.44...
0.8162098
0
HandleModifySchema is an endpoint handler which updates the existing schema & updates the config
func HandleModifySchema(adminMan *admin.Manager, modules *modules.Modules, syncman *syncman.Manager) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { // Get the JWT token from header token := utils.GetTokenFromHeader(r) v := config.TableRule{} _ = json.NewDecoder(r.Body).Decode(&v) defer utils.CloseTheCloser(r.Body) // Check if the request is authorised if err := adminMan.IsTokenValid(token); err != nil { _ = utils.SendErrorResponse(w, http.StatusUnauthorized, err.Error()) return } vars := mux.Vars(r) dbAlias := vars["dbAlias"] projectID := vars["project"] col := vars["col"] // Create a context of execution ctx, cancel := context.WithTimeout(r.Context(), 60*time.Second) defer cancel() logicalDBName, err := syncman.GetLogicalDatabaseName(ctx, projectID, dbAlias) if err != nil { _ = utils.SendErrorResponse(w, http.StatusInternalServerError, err.Error()) return } schema := modules.Schema() if err := schema.SchemaModifyAll(ctx, dbAlias, logicalDBName, map[string]*config.TableRule{col: &v}); err != nil { _ = utils.SendErrorResponse(w, http.StatusInternalServerError, err.Error()) return } if err := syncman.SetModifySchema(ctx, projectID, dbAlias, col, v.Schema); err != nil { _ = utils.SendErrorResponse(w, http.StatusInternalServerError, err.Error()) return } _ = utils.SendOkayResponse(w) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func HandleModifyAllSchema(adminMan *admin.Manager, syncman *syncman.Manager) http.HandlerFunc {\n\treturn func(w http.ResponseWriter, r *http.Request) {\n\n\t\t// Get the JWT token from header\n\t\ttoken := utils.GetTokenFromHeader(r)\n\n\t\tv := config.CrudStub{}\n\t\t_ = json.NewDecoder(r.Body).Decode(&v)\n\t\t...
[ "0.72983176", "0.69974923", "0.6839018", "0.6790851", "0.63716346", "0.6250636", "0.60318166", "0.5930686", "0.58531696", "0.5836623", "0.58035827", "0.57919437", "0.572319", "0.56905335", "0.568128", "0.5633838", "0.56321174", "0.56176364", "0.5573111", "0.5523975", "0.55105...
0.8124072
0
HandleGetSchemas returns handler to get schema
func HandleGetSchemas(adminMan *admin.Manager, syncMan *syncman.Manager) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { // Get the JWT token from header token := utils.GetTokenFromHeader(r) // Check if the request is authorised if err := adminMan.IsTokenValid(token); err != nil { _ = utils.SendErrorResponse(w, http.StatusUnauthorized, err.Error()) return } ctx, cancel := context.WithTimeout(r.Context(), 60*time.Second) defer cancel() // get project id and dbType from url vars := mux.Vars(r) projectID := vars["project"] dbAlias := "" dbAliasQuery, exists := r.URL.Query()["dbAlias"] if exists { dbAlias = dbAliasQuery[0] } colQuery, exists := r.URL.Query()["col"] col := "" if exists { col = colQuery[0] } schemas, err := syncMan.GetSchemas(ctx, projectID, dbAlias, col) if err != nil { _ = utils.SendErrorResponse(w, http.StatusInternalServerError, err.Error()) return } _ = utils.SendResponse(w, http.StatusOK, model.Response{Result: schemas}) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func GetSchemas(w http.ResponseWriter, r *http.Request) {\n\trequestWhere, values, err := config.PrestConf.Adapter.WhereByRequest(r, 1)\n\tif err != nil {\n\t\thttp.Error(w, err.Error(), http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tsqlSchemas, hasCount := config.PrestConf.Adapter.SchemaClause(r)\n\n\tif requestWhe...
[ "0.7004768", "0.6699936", "0.66698825", "0.6629372", "0.65966946", "0.65060455", "0.6421018", "0.6378638", "0.62172014", "0.61479443", "0.61028916", "0.6035422", "0.590596", "0.59007186", "0.5847819", "0.5807947", "0.5741891", "0.5739257", "0.57041323", "0.5689232", "0.568883...
0.8195078
0
HandleSetTableRules is an endpoint handler which update database collection rules in config & creates collection if it doesn't exist
func HandleSetTableRules(adminMan *admin.Manager, syncman *syncman.Manager) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { // Get the JWT token from header token := utils.GetTokenFromHeader(r) v := config.TableRule{} _ = json.NewDecoder(r.Body).Decode(&v) defer utils.CloseTheCloser(r.Body) // Check if the request is authorised if err := adminMan.IsTokenValid(token); err != nil { _ = utils.SendErrorResponse(w, http.StatusUnauthorized, err.Error()) return } ctx, cancel := context.WithTimeout(r.Context(), 60*time.Second) defer cancel() vars := mux.Vars(r) dbAlias := vars["dbAlias"] projectID := vars["project"] col := vars["col"] if err := syncman.SetCollectionRules(ctx, projectID, dbAlias, col, &v); err != nil { _ = utils.SendErrorResponse(w, http.StatusInternalServerError, err.Error()) return } _ = utils.SendOkayResponse(w) // return } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func HandleGetTableRules(adminMan *admin.Manager, syncMan *syncman.Manager) http.HandlerFunc {\n\treturn func(w http.ResponseWriter, r *http.Request) {\n\n\t\t// Get the JWT token from header\n\t\ttoken := utils.GetTokenFromHeader(r)\n\n\t\t// Check if the request is authorised\n\t\tif err := adminMan.IsTokenValid...
[ "0.68676865", "0.6056035", "0.5995382", "0.5469408", "0.5430646", "0.5360334", "0.53322506", "0.5099649", "0.50065756", "0.50055325", "0.49860755", "0.49699572", "0.4905327", "0.48625025", "0.48625025", "0.4852737", "0.47984773", "0.47907025", "0.47798216", "0.4773209", "0.47...
0.8472057
0
HandleGetTableRules returns handler to get collection rule
func HandleGetTableRules(adminMan *admin.Manager, syncMan *syncman.Manager) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { // Get the JWT token from header token := utils.GetTokenFromHeader(r) // Check if the request is authorised if err := adminMan.IsTokenValid(token); err != nil { _ = utils.SendErrorResponse(w, http.StatusUnauthorized, err.Error()) return } ctx, cancel := context.WithTimeout(r.Context(), 60*time.Second) defer cancel() // get project id and dbAlias vars := mux.Vars(r) projectID := vars["project"] dbAlias := "" dbAliasQuery, exists := r.URL.Query()["dbAlias"] if exists { dbAlias = dbAliasQuery[0] } col := "" colQuery, exists := r.URL.Query()["col"] if exists { col = colQuery[0] } dbConfig, err := syncMan.GetCollectionRules(ctx, projectID, dbAlias, col) if err != nil { _ = utils.SendErrorResponse(w, http.StatusInternalServerError, err.Error()) return } _ = utils.SendResponse(w, http.StatusOK, model.Response{Result: dbConfig}) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func HandleSetTableRules(adminMan *admin.Manager, syncman *syncman.Manager) http.HandlerFunc {\n\treturn func(w http.ResponseWriter, r *http.Request) {\n\n\t\t// Get the JWT token from header\n\t\ttoken := utils.GetTokenFromHeader(r)\n\n\t\tv := config.TableRule{}\n\t\t_ = json.NewDecoder(r.Body).Decode(&v)\n\t\td...
[ "0.69260275", "0.62734264", "0.5644939", "0.557043", "0.55194503", "0.54998934", "0.54833883", "0.54473406", "0.54217273", "0.5348677", "0.53371495", "0.5312679", "0.5264292", "0.52637553", "0.5258468", "0.5245055", "0.5222252", "0.5206832", "0.51762116", "0.5171938", "0.5120...
0.82049686
0
HandleReloadSchema is an endpoint handler which return & sets the schemas of all collection in config
func HandleReloadSchema(adminMan *admin.Manager, modules *modules.Modules, syncman *syncman.Manager) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { // Get the JWT token from header token := utils.GetTokenFromHeader(r) defer utils.CloseTheCloser(r.Body) // Check if the request is authorised if err := adminMan.IsTokenValid(token); err != nil { _ = utils.SendErrorResponse(w, http.StatusUnauthorized, err.Error()) return } vars := mux.Vars(r) dbAlias := vars["dbAlias"] projectID := vars["project"] // Create a context of execution ctx, cancel := context.WithTimeout(r.Context(), 60*time.Second) defer cancel() schema := modules.Schema() colResult, err := syncman.SetReloadSchema(ctx, dbAlias, projectID, schema) if err != nil { _ = utils.SendErrorResponse(w, http.StatusInternalServerError, err.Error()) return } _ = utils.SendResponse(w, http.StatusOK, model.Response{Result: colResult}) // return } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (s *Manager) SetReloadSchema(ctx context.Context, dbAlias, project string, schemaArg *schema.Schema) (map[string]interface{}, error) {\n\t// Acquire a lock\n\ts.lock.Lock()\n\tdefer s.lock.Unlock()\n\n\tprojectConfig, err := s.getConfigWithoutLock(project)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tcol...
[ "0.7177776", "0.7145628", "0.673341", "0.6624522", "0.6543675", "0.6149476", "0.6075368", "0.60667056", "0.5946006", "0.5571808", "0.5567838", "0.54518217", "0.5399067", "0.5378405", "0.52802455", "0.5230651", "0.517944", "0.5177448", "0.51750547", "0.5151869", "0.50868386", ...
0.7888811
0
HandleInspectCollectionSchema gets the schema for particular collection & update the database collection schema in config
func HandleInspectCollectionSchema(adminMan *admin.Manager, modules *modules.Modules, syncman *syncman.Manager) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { // Get the JWT token from header token := utils.GetTokenFromHeader(r) defer utils.CloseTheCloser(r.Body) // Check if the request is authorised if err := adminMan.IsTokenValid(token); err != nil { _ = utils.SendErrorResponse(w, http.StatusUnauthorized, err.Error()) return } // Create a context of execution ctx, cancel := context.WithTimeout(r.Context(), 60*time.Second) defer cancel() vars := mux.Vars(r) dbAlias := vars["dbAlias"] col := vars["col"] projectID := vars["project"] logicalDBName, err := syncman.GetLogicalDatabaseName(ctx, projectID, dbAlias) if err != nil { _ = utils.SendErrorResponse(w, http.StatusInternalServerError, err.Error()) return } schema := modules.Schema() s, err := schema.SchemaInspection(ctx, dbAlias, logicalDBName, col) if err != nil { _ = utils.SendErrorResponse(w, http.StatusInternalServerError, err.Error()) return } if err := syncman.SetSchemaInspection(ctx, projectID, dbAlias, col, s); err != nil { _ = utils.SendErrorResponse(w, http.StatusInternalServerError, err.Error()) return } _ = utils.SendResponse(w, http.StatusOK, model.Response{Result: s}) // return } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func sampleSchema() *schemapb.CollectionSchema {\n\tschema := &schemapb.CollectionSchema{\n\t\tName: \"schema\",\n\t\tDescription: \"schema\",\n\t\tAutoID: true,\n\t\tFields: []*schemapb.FieldSchema{\n\t\t\t{\n\t\t\t\tFieldID: 102,\n\t\t\t\tName: \"FieldBool\",\n\t\t\t\tIsPrimaryKey: false...
[ "0.6002191", "0.5668754", "0.55984676", "0.54508936", "0.5389286", "0.53730094", "0.5371129", "0.53263897", "0.5297817", "0.52953386", "0.52618605", "0.5245622", "0.52429086", "0.5224411", "0.5188879", "0.5187949", "0.5158642", "0.5144006", "0.5132363", "0.5129445", "0.509499...
0.8027757
0
HandleModifyAllSchema is an endpoint handler which updates the existing schema & updates the config
func HandleModifyAllSchema(adminMan *admin.Manager, syncman *syncman.Manager) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { // Get the JWT token from header token := utils.GetTokenFromHeader(r) v := config.CrudStub{} _ = json.NewDecoder(r.Body).Decode(&v) defer utils.CloseTheCloser(r.Body) // Check if the request is authorised if err := adminMan.IsTokenValid(token); err != nil { _ = utils.SendErrorResponse(w, http.StatusUnauthorized, err.Error()) return } vars := mux.Vars(r) dbAlias := vars["dbAlias"] projectID := vars["project"] // Create a context of execution ctx, cancel := context.WithTimeout(r.Context(), 60*time.Second) defer cancel() if err := syncman.SetModifyAllSchema(ctx, dbAlias, projectID, v); err != nil { _ = utils.SendErrorResponse(w, http.StatusInternalServerError, err.Error()) return } _ = utils.SendOkayResponse(w) // return } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func HandleModifySchema(adminMan *admin.Manager, modules *modules.Modules, syncman *syncman.Manager) http.HandlerFunc {\n\treturn func(w http.ResponseWriter, r *http.Request) {\n\n\t\t// Get the JWT token from header\n\t\ttoken := utils.GetTokenFromHeader(r)\n\n\t\tv := config.TableRule{}\n\t\t_ = json.NewDecoder(...
[ "0.7679847", "0.69742095", "0.6728757", "0.66691935", "0.6480663", "0.6210196", "0.6210196", "0.61880237", "0.61793935", "0.57679015", "0.572682", "0.5706312", "0.56923145", "0.56712043", "0.5664309", "0.55865926", "0.55235964", "0.54683274", "0.5465102", "0.5459875", "0.5393...
0.8581223
0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *DaemonsetRef) DeepCopyInto(out *DaemonsetRef) { *out = *in }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.8216088", "0.8128937", "0.81051093", "0.8086112", "0.80840266", "0.806814", "0.80643326", "0.80272067", "0.8013088", "0.79972315", "0.799318", "0.7988673", "0.79883105", "0.79879236", "0.79879236", "0.7986761", "0.79770774", "0.7973031", "0.7970074", "0.7970074", "0.797007...
0.0
-1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonsetRef.
func (in *DaemonsetRef) DeepCopy() *DaemonsetRef { if in == nil { return nil } out := new(DaemonsetRef) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *BcsDaemonset) DeepCopy() *BcsDaemonset {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(BcsDaemonset)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *IngressDaemonSet) DeepCopy() *IngressDaemonSet {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(IngressDaemonSet)\n\tin.DeepCopyInto(ou...
[ "0.6627356", "0.6272149", "0.5870161", "0.5827506", "0.5707826", "0.5585251", "0.55466366", "0.5517457", "0.5514708", "0.53805035", "0.5360138", "0.53076094", "0.52681077", "0.52662474", "0.52429956", "0.5228576", "0.5196257", "0.5114117", "0.51059514", "0.5100633", "0.509757...
0.8755028
0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *EKSPodIdentityWebhook) DeepCopyInto(out *EKSPodIdentityWebhook) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) out.Spec = in.Spec in.Status.DeepCopyInto(&out.Status) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.8215289", "0.81280124", "0.81039286", "0.80862963", "0.8083811", "0.80673146", "0.8064545", "0.8026454", "0.8012046", "0.7996313", "0.799204", "0.79887754", "0.7987097", "0.7986994", "0.7986994", "0.79854053", "0.7975989", "0.7972486", "0.79695636", "0.79695636", "0.796956...
0.0
-1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EKSPodIdentityWebhook.
func (in *EKSPodIdentityWebhook) DeepCopy() *EKSPodIdentityWebhook { if in == nil { return nil } out := new(EKSPodIdentityWebhook) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *EKSPodIdentityWebhookList) DeepCopy() *EKSPodIdentityWebhookList {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(EKSPodIdentityWebhookList)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *EKSPodIdentityWebhookSpec) DeepCopy() *EKSPodIdentityWebhookSpec {\n\tif in == nil {\n\t\treturn nil\n...
[ "0.7455655", "0.659675", "0.64380205", "0.6092637", "0.5820071", "0.57413214", "0.5714943", "0.5300089", "0.5221228", "0.51092845", "0.5073489", "0.49398625", "0.47650415", "0.4762692", "0.47494987", "0.4719676", "0.4692562", "0.46774372", "0.4602285", "0.45991862", "0.452304...
0.8896081
0
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *EKSPodIdentityWebhook) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *ConsoleQuickStart) DeepCopyObject() runtime.Object {\n\tif c := in.DeepCopy(); c != nil {\n\t\treturn c\n\t}\n\treturn nil\n}", "func (in *ServingRuntime) DeepCopyObject() runtime.Object {\n\tif c := in.DeepCopy(); c != nil {\n\t\treturn c\n\t}\n\treturn nil\n}", "func (in *Keevakind) DeepCopyObject(...
[ "0.7313452", "0.71596146", "0.710827", "0.71008897", "0.7058157", "0.70423585", "0.7039146", "0.7030632", "0.69994885", "0.6974074", "0.6971826", "0.6956056", "0.69528073", "0.69508666", "0.6937996", "0.6936287", "0.6936287", "0.6927997", "0.6925237", "0.6922473", "0.691321",...
0.0
-1
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *EKSPodIdentityWebhookList) DeepCopyInto(out *EKSPodIdentityWebhookList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]EKSPodIdentityWebhook, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.8215831", "0.812879", "0.8104949", "0.8086246", "0.8083644", "0.8068615", "0.8064988", "0.8027893", "0.80128986", "0.7996562", "0.79928833", "0.79897606", "0.79880935", "0.7987752", "0.7987752", "0.7986811", "0.7977551", "0.79732406", "0.79701513", "0.79701513", "0.7970151...
0.0
-1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EKSPodIdentityWebhookList.
func (in *EKSPodIdentityWebhookList) DeepCopy() *EKSPodIdentityWebhookList { if in == nil { return nil } out := new(EKSPodIdentityWebhookList) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *EKSPodIdentityWebhook) DeepCopy() *EKSPodIdentityWebhook {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(EKSPodIdentityWebhook)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *GitHubWebhookList) DeepCopy() *GitHubWebhookList {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(GitHubWebh...
[ "0.75138044", "0.71253616", "0.6389425", "0.6092289", "0.580533", "0.5775616", "0.5734961", "0.56703657", "0.56364554", "0.5611077", "0.555949", "0.5512877", "0.5491004", "0.5488365", "0.548807", "0.54841", "0.5409213", "0.53670716", "0.53264004", "0.53166413", "0.5310518", ...
0.9170767
0
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *EKSPodIdentityWebhookList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *ConsoleQuickStart) DeepCopyObject() runtime.Object {\n\tif c := in.DeepCopy(); c != nil {\n\t\treturn c\n\t}\n\treturn nil\n}", "func (in *ServingRuntime) DeepCopyObject() runtime.Object {\n\tif c := in.DeepCopy(); c != nil {\n\t\treturn c\n\t}\n\treturn nil\n}", "func (in *Keevakind) DeepCopyObject(...
[ "0.7310628", "0.7156044", "0.71033555", "0.70980227", "0.7054339", "0.703866", "0.7034588", "0.7028135", "0.6996418", "0.6971367", "0.696867", "0.69530594", "0.695035", "0.6948232", "0.6935207", "0.69329184", "0.69329184", "0.6926076", "0.6922031", "0.69193244", "0.690913", ...
0.0
-1
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *EKSPodIdentityWebhookSpec) DeepCopyInto(out *EKSPodIdentityWebhookSpec) { *out = *in }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.8216088", "0.8128937", "0.81051093", "0.8086112", "0.80840266", "0.806814", "0.80643326", "0.80272067", "0.8013088", "0.79972315", "0.799318", "0.7988673", "0.79883105", "0.79879236", "0.79879236", "0.7986761", "0.79770774", "0.7973031", "0.7970074", "0.7970074", "0.797007...
0.0
-1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EKSPodIdentityWebhookSpec.
func (in *EKSPodIdentityWebhookSpec) DeepCopy() *EKSPodIdentityWebhookSpec { if in == nil { return nil } out := new(EKSPodIdentityWebhookSpec) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *EKSPodIdentityWebhook) DeepCopy() *EKSPodIdentityWebhook {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(EKSPodIdentityWebhook)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *GitHubWebhookSpec) DeepCopy() *GitHubWebhookSpec {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(GitHubWebh...
[ "0.7447531", "0.68233037", "0.625811", "0.58538747", "0.55260247", "0.53913707", "0.5371805", "0.5371805", "0.5307042", "0.5010729", "0.49849185", "0.49666238", "0.4917856", "0.49089196", "0.4845179", "0.48018003", "0.47993705", "0.47924098", "0.4772695", "0.4772695", "0.4762...
0.88325137
0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *EKSPodIdentityWebhookStatus) DeepCopyInto(out *EKSPodIdentityWebhookStatus) { *out = *in if in.PodIdentityWebhookSecret != nil { in, out := &in.PodIdentityWebhookSecret, &out.PodIdentityWebhookSecret *out = new(SecretRef) **out = **in } if in.PodIdentityWebhookService != nil { in, out := &in.PodIdentityWebhookService, &out.PodIdentityWebhookService *out = new(ServiceRef) **out = **in } if in.PodIdentityWebhookDaemonset != nil { in, out := &in.PodIdentityWebhookDaemonset, &out.PodIdentityWebhookDaemonset *out = new(DaemonsetRef) **out = **in } if in.PodIdentityWebhookConfiguration != nil { in, out := &in.PodIdentityWebhookConfiguration, &out.PodIdentityWebhookConfiguration *out = new(MutatingWebhookConfigurationRef) **out = **in } if in.PodIdentityWebhookServiceAccount != nil { in, out := &in.PodIdentityWebhookServiceAccount, &out.PodIdentityWebhookServiceAccount *out = new(ServiceAccountRef) **out = **in } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.8215289", "0.81280124", "0.81039286", "0.80862963", "0.8083811", "0.80673146", "0.8064545", "0.8026454", "0.8012046", "0.7996313", "0.799204", "0.79887754", "0.7987097", "0.7986994", "0.7986994", "0.79854053", "0.7975989", "0.7972486", "0.79695636", "0.79695636", "0.796956...
0.0
-1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EKSPodIdentityWebhookStatus.
func (in *EKSPodIdentityWebhookStatus) DeepCopy() *EKSPodIdentityWebhookStatus { if in == nil { return nil } out := new(EKSPodIdentityWebhookStatus) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *EKSPodIdentityWebhook) DeepCopy() *EKSPodIdentityWebhook {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(EKSPodIdentityWebhook)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *GitHubWebhookStatus) DeepCopy() *GitHubWebhookStatus {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(GitHub...
[ "0.7412", "0.6860369", "0.6748026", "0.6282171", "0.6095725", "0.6011908", "0.5978788", "0.5935275", "0.59312373", "0.5927533", "0.5919393", "0.5819512", "0.5815602", "0.58154786", "0.5715951", "0.5706863", "0.5685052", "0.5678343", "0.5663991", "0.56619436", "0.56577057", ...
0.90216064
0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *MutatingWebhookConfigurationRef) DeepCopyInto(out *MutatingWebhookConfigurationRef) { *out = *in }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.8216088", "0.8128937", "0.81051093", "0.8086112", "0.80840266", "0.806814", "0.80643326", "0.80272067", "0.8013088", "0.79972315", "0.799318", "0.7988673", "0.79883105", "0.79879236", "0.79879236", "0.7986761", "0.79770774", "0.7973031", "0.7970074", "0.7970074", "0.797007...
0.0
-1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingWebhookConfigurationRef.
func (in *MutatingWebhookConfigurationRef) DeepCopy() *MutatingWebhookConfigurationRef { if in == nil { return nil } out := new(MutatingWebhookConfigurationRef) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *AdmissionWebhookConfiguration) DeepCopy() *AdmissionWebhookConfiguration {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(AdmissionWebhookConfiguration)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *WebhookConfig) DeepCopy() *WebhookConfig {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout :...
[ "0.7793853", "0.7489177", "0.7276248", "0.7276248", "0.6999186", "0.68108094", "0.63378036", "0.6257152", "0.6257152", "0.6191447", "0.60581696", "0.5876469", "0.5876469", "0.58589596", "0.58589596", "0.58589596", "0.5825608", "0.56981975", "0.56957376", "0.56651753", "0.5627...
0.8851851
0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *Ref) DeepCopyInto(out *Ref) { *out = *in }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.8215289", "0.81280124", "0.81039286", "0.80862963", "0.8083811", "0.80673146", "0.8064545", "0.8026454", "0.8012046", "0.7996313", "0.799204", "0.79887754", "0.7987097", "0.7986994", "0.7986994", "0.79854053", "0.7975989", "0.7972486", "0.79695636", "0.79695636", "0.796956...
0.78453225
78
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Ref.
func (in *Ref) DeepCopy() *Ref { if in == nil { return nil } out := new(Ref) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *GitRef) DeepCopy() *GitRef {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(GitRef)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *RefSpec) DeepCopy() *RefSpec {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(RefSpec)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *RefSpec) D...
[ "0.70822686", "0.6410743", "0.6410743", "0.6265839", "0.62535995", "0.62149656", "0.61250263", "0.6099854", "0.6099854", "0.6018698", "0.5982944", "0.5973794", "0.5952699", "0.5942301", "0.5941175", "0.58627886", "0.58217555", "0.5793365", "0.57277805", "0.5645848", "0.564038...
0.7920549
0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *SecretRef) DeepCopyInto(out *SecretRef) { *out = *in }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.8216088", "0.8128937", "0.81051093", "0.8086112", "0.80840266", "0.806814", "0.80643326", "0.80272067", "0.8013088", "0.79972315", "0.799318", "0.7988673", "0.79883105", "0.79879236", "0.79879236", "0.7986761", "0.79770774", "0.7973031", "0.7970074", "0.7970074", "0.797007...
0.0
-1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretRef.
func (in *SecretRef) DeepCopy() *SecretRef { if in == nil { return nil } out := new(SecretRef) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *Secret) DeepCopy() *Secret {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Secret)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *SecretReference) DeepCopy() *SecretReference {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(SecretReference)\n\tin.DeepCopyInto(out)\n\treturn out\n}",...
[ "0.7781256", "0.745195", "0.745195", "0.745195", "0.7148328", "0.6931388", "0.6782078", "0.67413205", "0.67248464", "0.6716652", "0.669141", "0.6669019", "0.66052324", "0.6580276", "0.65783435", "0.65390766", "0.6525357", "0.64835936", "0.6468834", "0.64573145", "0.6455496", ...
0.82409436
2
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *ServiceAccountRef) DeepCopyInto(out *ServiceAccountRef) { *out = *in }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.8215289", "0.81280124", "0.81039286", "0.80862963", "0.8083811", "0.80673146", "0.8064545", "0.8026454", "0.8012046", "0.7996313", "0.799204", "0.79887754", "0.7987097", "0.7986994", "0.7986994", "0.79854053", "0.7975989", "0.7972486", "0.79695636", "0.79695636", "0.796956...
0.0
-1