query stringlengths 10 3.85k | ru_query stringlengths 9 3.76k | document stringlengths 17 430k | metadata dict | negatives listlengths 97 100 | negative_scores listlengths 97 100 | document_score stringlengths 5 10 | document_rank stringclasses 2
values |
|---|---|---|---|---|---|---|---|
NewBytesBuffer create a bytes buffer | NewBytesBuffer создает буфер байтов | func NewBytesBuffer(p []byte) *BytesBuffer {
return &BytesBuffer{reader: bytes.NewReader(p)}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func NewBufferBytes(data []byte) *Buffer {\n\treturn &Buffer{refCount: 0, buf: data, length: len(data)}\n}",
"func newBuffer() Buffer {\n\treturn &buffer{\n\t\tbytes: make([]byte, 0, 64),\n\t}\n}",
"func newBuffer(b []byte) *buffer {\n\treturn &buffer{proto.NewBuffer(b), 0}\n}",
"func NewBuffer(inp []byte) *... | [
"0.81802195",
"0.7357088",
"0.72746956",
"0.7250504",
"0.7194273",
"0.7021639",
"0.69860196",
"0.6953487",
"0.6906288",
"0.69045806",
"0.6828925",
"0.6827577",
"0.6809075",
"0.67834884",
"0.6779053",
"0.6775601",
"0.67704606",
"0.6725194",
"0.67095757",
"0.66958207",
"0.66910... | 0.82989466 | 0 |
Read from the byte buffer | Чтение из буфера байтов | func (bb *BytesBuffer) Read(p []byte) (n int, err error) {
return bb.reader.Read(p)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func Read(b []byte) { Reader.Read(b) }",
"func (cb *Buffer) Read(buf []byte) (int, error) {\n\tif buf == nil || len(buf) == 0 {\n\t\treturn 0, fmt.Errorf(\"Target buffer is null or empty\")\n\t}\n\n\ttoRead := min(len(buf), cb.ReadAvailability())\n\n\tlBytes := min(cb.rpos, toRead)\n\tcopy(buf[toRead-lBytes:toRe... | [
"0.73192525",
"0.71558887",
"0.71507657",
"0.7125411",
"0.7039935",
"0.70364684",
"0.69876087",
"0.69863915",
"0.69758904",
"0.69751304",
"0.69681305",
"0.69678485",
"0.69638294",
"0.6963164",
"0.6959764",
"0.6959191",
"0.6940648",
"0.6894346",
"0.68853796",
"0.6876418",
"0.6... | 0.75947374 | 0 |
Close the bytes buffer | Закройте буфер байтов | func (bb *BytesBuffer) Close() error {
return nil
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (b *bufCloser) Close() error { return nil }",
"func (b *Bytes) Close() error {\n\tif b.p != nil {\n\t\tPut(b.p)\n\t\tb.p = nil\n\t}\n\treturn nil\n}",
"func (bc BufConn) Close() error { return nil }",
"func (d Buf) Close() error {\n\treturn nil\n}",
"func (b *Buffer) Close() {\n\tb.length = 0\n\tb.poo... | [
"0.7059667",
"0.68554896",
"0.67279226",
"0.6424046",
"0.6312021",
"0.62552226",
"0.62393683",
"0.6169757",
"0.6165596",
"0.60919654",
"0.60889745",
"0.60793084",
"0.60702556",
"0.5916911",
"0.5909902",
"0.58884627",
"0.5861613",
"0.5854654",
"0.5819335",
"0.58160126",
"0.574... | 0.76870584 | 0 |
ToEd25519 converts the public key p into a ed25519 key. (x, y) = (sqrt(486664)u/v, (u1)/(u+1)) | ToEd25519 преобразует публичный ключ p в ключ ed25519. (x, y) = (sqrt(486664)u/v, (u1)/(u+1)) | func (p PublicKey) ToEd25519() (ed25519.PublicKey, error) {
a, err := convertMont(p)
if err != nil {
return nil, err
}
return a.Bytes(), nil
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func Ed25519PublicKeyToCurve25519(pk ed25519.PublicKey) []byte {\n\t// ed25519.PublicKey is a little endian representation of the y-coordinate,\n\t// with the most significant bit set based on the sign of the x-coordinate.\n\tbigEndianY := make([]byte, ed25519.PublicKeySize)\n\tfor i, b := range pk {\n\t\tbigEndia... | [
"0.7344533",
"0.70818925",
"0.70533943",
"0.66119736",
"0.66119736",
"0.6594977",
"0.6541674",
"0.65109813",
"0.6496604",
"0.64243305",
"0.6326358",
"0.6308357",
"0.6301593",
"0.6285583",
"0.61747074",
"0.6142724",
"0.60759276",
"0.6024686",
"0.60096884",
"0.58517253",
"0.584... | 0.75875074 | 0 |
Sign signs the given message with the private key p and returns a signature. It implements the XEdDSA sign method defined in XEdDSA performs two passes over messages to be signed and therefore cannot handle prehashed messages. Thus opts.HashFunc() must return zero to indicate the message hasn't been hashed. This can be... | Sign подписывает заданный сообщение с помощью приватного ключа p и возвращает подпись. Он реализует метод подписи XEdDSA, определённый в XEdDSA. Метод выполняет два прохода по сообщениям, которые подлежат подписи, поэтому не может обрабатывать предварительно хэшированные сообщения. Таким образом, opts.HashFunc() должен... | func (p PrivateKey) Sign(rand io.Reader, message []byte, opts crypto.SignerOpts) (signature []byte, err error) {
if opts.HashFunc() != crypto.Hash(0) {
return nil, errors.New("x25519: cannot sign hashed message")
}
return Sign(rand, p, message)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (priv PrivateKey) Sign(rand io.Reader, message []byte, opts crypto.SignerOpts) (signature []byte, err error) {\n\tif opts.HashFunc() != crypto.Hash(0) {\n\t\treturn nil, errors.New(\"sign: cannot sign hashed message\")\n\t}\n\n\tout := Sign(message, priv)\n\treturn out[:], nil\n}",
"func (sk *PrivateKey) Si... | [
"0.67398196",
"0.6680818",
"0.6339215",
"0.62464464",
"0.619496",
"0.6178088",
"0.61637336",
"0.6148355",
"0.6148355",
"0.61142945",
"0.6048279",
"0.6040095",
"0.6037477",
"0.5980279",
"0.59378606",
"0.59160537",
"0.5905036",
"0.5871749",
"0.5864553",
"0.585822",
"0.585396",
... | 0.7261845 | 0 |
Verify reports whether sig is a valid signature of message by publicKey. It will panic if len(publicKey) is not PublicKeySize. It implements the XEdDSA verify method defined in xeddsa_verify(u, M, (R || s)): if u >= p or R.y >= 2|p| or s >= 2|q|: return false A = convert_mont(u) if not on_curve(A): return false h = has... | Проверяет, является ли sig допустимой подписью сообщения message с использованием publicKey. Вызовет panic, если длина publicKey не равна PublicKeySize. Реализует метод проверки XEdDSA, определённый в xeddsa_verify(u, M, (R || s)): если u >= p или R.y >= 2|p| или s >= 2|q|: вернуть false A = convert_mont(u) если A не л... | func Verify(publicKey PublicKey, message, sig []byte) bool {
// The following code should be equivalent to:
//
// pub, err := publicKey.ToEd25519()
// if err != nil {
// return false
// }
// return ed25519.Verify(pub, message, sig)
if l := len(publicKey); l != PublicKeySize {
panic("x25519: bad... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func Verify(sig []byte, publicKey PublicKey) bool {\n\tif l := len(publicKey); l != PublicKeySize {\n\t\tpanic(\"sign: bad public key length: \" + strconv.Itoa(l))\n\t}\n\n\tif len(sig) < SignatureSize || sig[63]&224 != 0 {\n\t\treturn false\n\t}\n\tmsg := sig[SignatureSize:]\n\tsig = sig[:SignatureSize]\n\n\tretu... | [
"0.73681545",
"0.7215541",
"0.71791583",
"0.71225846",
"0.71195",
"0.70969844",
"0.7055452",
"0.70434874",
"0.6897032",
"0.6861955",
"0.67977583",
"0.67892903",
"0.6772671",
"0.67163485",
"0.671264",
"0.668523",
"0.6668513",
"0.6657132",
"0.6614563",
"0.6543836",
"0.65239805"... | 0.7219678 | 1 |
calculateKeyPair converts a Montgomery private key k to a twisted Edwards public key and private key (A, a) as defined in calculate_key_pair(k): E = kB A.y = E.y A.s = 0 if E.s == 1: a = k (mod q) else: a = k (mod q) return A, a | calculateKeyPair преобразует монтгомеровский приватный ключ k в публичный и приватный ключи (A, a) в виде искаженной эдвардской кривой, как определено в calculate_key_pair(k): E = kB A.y = E.y A.s = 0 если E.s == 1: a = k (mod q) иначе: a = k (mod q) return A, a | func (p PrivateKey) calculateKeyPair() ([]byte, *edwards25519.Scalar, error) {
var pA edwards25519.Point
var sa edwards25519.Scalar
k, err := (&edwards25519.Scalar{}).SetBytesWithClamping(p)
if err != nil {
return nil, nil, err
}
pub := pA.ScalarBaseMult(k).Bytes()
signBit := (pub[31] & 0x80) >> 7
if signB... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func GenerateKeyPair(group *schnorr.Group) (*SecKey, *PubKey) {\n\ts1 := common.GetRandomInt(group.Q)\n\ts2 := common.GetRandomInt(group.Q)\n\th1 := group.Exp(group.G, s1)\n\th2 := group.Exp(group.G, s2)\n\n\treturn NewSecKey(s1, s2), NewPubKey(h1, h2)\n}",
"func GenerateKeyPair(h func() hash.Hash, seed []byte) ... | [
"0.69897085",
"0.68689436",
"0.68633217",
"0.6845767",
"0.6727594",
"0.6598774",
"0.65976435",
"0.6574991",
"0.65571785",
"0.6535598",
"0.6515089",
"0.6499443",
"0.6463625",
"0.64459366",
"0.6434493",
"0.64074236",
"0.63993114",
"0.6224574",
"0.62184876",
"0.61737037",
"0.616... | 0.7862833 | 0 |
convertMont converts from a Montgomery ucoordinate to a twisted Edwards point P, according to convert_mont(u): umasked = u (mod 2|p|) P.y = u_to_y(umasked) P.s = 0 return P | convertMont преобразует координату u в системе Монтгомери в точку P вида twisted Edwards, согласно convert_mont(u): umasked = u (mod 2|p|) P.y = u_to_y(umasked) P.s = 0 return P | func convertMont(u PublicKey) (*edwards25519.Point, error) {
um, err := (&field.Element{}).SetBytes(u)
if err != nil {
return nil, err
}
// y = (u - 1)/(u + 1)
a := new(field.Element).Subtract(um, one)
b := new(field.Element).Add(um, one)
y := new(field.Element).Multiply(a, b.Invert(b)).Bytes()
// Set sign ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (p *Poly) toMont() {\n\tvar f int16 = int16((uint64(1) << 32) % uint64(q))\n\tfor i := 0; i < n; i++ {\n\t\tp[i] = montgomeryReduce(int32(p[i]) * int32(f))\n\t}\n}",
"func (z *Element22) ToMont() *Element22 {\n\tvar rSquare = Element22{\n\t\t11555390936043306539,\n\t\t958669060063230310,\n\t\t25809772728018... | [
"0.58092505",
"0.575109",
"0.56481266",
"0.5609317",
"0.5605688",
"0.56055814",
"0.56046015",
"0.54018146",
"0.53192925",
"0.5307692",
"0.5004337",
"0.49508178",
"0.49239808",
"0.48059493",
"0.46658686",
"0.46323827",
"0.4604539",
"0.4589097",
"0.45698458",
"0.45200107",
"0.4... | 0.70762175 | 0 |
Read is a shortcut function to read and parse projects | Read — это функция-сокращение для чтения и парсинга проектов | func Read(path string) (*Project, error) {
var error error
var data []byte
data, error = ioutil.ReadFile(path)
if error != nil {
return nil, error
}
var project = &Project{}
error = json.Unmarshal(data, project)
if error != nil {
return nil, error
}
return project, nil
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (a *Client) ReadProject(params *ReadProjectParams) (*ReadProjectOK, error) {\n\t// TODO: Validate the params before sending\n\tif params == nil {\n\t\tparams = NewReadProjectParams()\n\t}\n\n\tresult, err := a.transport.Submit(&runtime.ClientOperation{\n\t\tID: \"readProject\",\n\t\tMethod: ... | [
"0.7127253",
"0.67041546",
"0.63716996",
"0.62035036",
"0.61625195",
"0.61137533",
"0.6112978",
"0.606727",
"0.59411407",
"0.5883763",
"0.5815111",
"0.5776463",
"0.5734309",
"0.5713775",
"0.5671496",
"0.5671328",
"0.5665366",
"0.5647636",
"0.56434774",
"0.5642749",
"0.5633865... | 0.78015107 | 0 |
Clone wraps html/template.Clone to also clone the name | Clone оборачивает html/template.Clone, чтобы также клонировать имя | func (t *Template) Clone() (*Template, error) {
var tmpl, err = t.Template.Clone()
return &Template{tmpl, t.Name}, err
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (tc *STemplateController) Clone(clone_name string, recursive bool) (*srv_tmpl.ServiceTemplate, error) {\n\turl := urlTemplateAction(tc.ID)\n\taction := make(map[string]interface{})\n\n\taction[\"action\"] = map[string]interface{}{\n\t\t\"perform\": \"clone\",\n\t\t\"params\": map[string]interface{}{\n\t\t\t\"... | [
"0.7064204",
"0.6950689",
"0.68847734",
"0.6830195",
"0.6234559",
"0.6180015",
"0.61048836",
"0.6068922",
"0.59161884",
"0.58908933",
"0.58908623",
"0.58654845",
"0.58292323",
"0.56611645",
"0.5652772",
"0.56419474",
"0.56299615",
"0.5595035",
"0.55785984",
"0.5573975",
"0.55... | 0.76719445 | 0 |
Root creates a new TRoot for use in spawning templates. The name should match the main layout's name (as defined in the layout template) so execution of templates doesn't require a template.Lookup call, which can be somewhat error prone. | Root создает новый TRoot для использования при спауне шаблонов. Имя должно совпадать с именем основного макета (как определено в шаблоне макета), чтобы выполнение шаблонов не требовало вызова template.Lookup, что может быть довольно подвержено ошибкам. | func Root(name, path string) *TRoot {
var tmpl = &Template{template.New(name), name}
var t = &TRoot{tmpl, path}
return t
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (tp *Template) Root(name string) *Template {\n\ttp.root = name\n\treturn tp\n}",
"func (t *TRoot) Name() string {\n\treturn t.template.Name\n}",
"func (*Root) Name() (name string) { return \"/\" }",
"func (r *Root) Name() string { return \"\" }",
"func (a *App) getRoot(w http.ResponseWriter, r *http.R... | [
"0.7597663",
"0.6376488",
"0.5993522",
"0.56988734",
"0.5487304",
"0.5406119",
"0.53739834",
"0.53517014",
"0.5342579",
"0.5333323",
"0.531819",
"0.5317198",
"0.531694",
"0.5315867",
"0.5252057",
"0.5209373",
"0.5184296",
"0.51761675",
"0.5142933",
"0.50949264",
"0.50891984",... | 0.7620937 | 0 |
Funcs allows adding template function maps to TRoots; this should be done before creating any templates, or else previously created templates won't get the newest function maps | Funcs позволяет добавлять отображения шаблонных функций в TRoots; это должно быть выполнено перед созданием любых шаблонов, иначе ранее созданные шаблоны не получат самые последние отображения функций | func (t *TRoot) Funcs(fnList FuncMap) *TRoot {
t.template.Funcs(template.FuncMap(fnList))
return t
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (t *Tmpl) Funcs(funcMap template.FuncMap) {\n\tt.Template = t.Template.Funcs(funcMap)\n\tt.funcs = funcMap\n}",
"func (app *App) TemplateFuncs(funcs ...template.FuncMap) *App {\n\tapp.templateFuncs = append(app.templateFuncs, funcs...)\n\treturn app\n}",
"func (templateManager *TemplateManager) Funcs(func... | [
"0.717656",
"0.7118898",
"0.7076246",
"0.6852086",
"0.6742249",
"0.66769844",
"0.66769844",
"0.66100323",
"0.6607756",
"0.65820014",
"0.65328634",
"0.6508341",
"0.6488062",
"0.64860225",
"0.6327243",
"0.6289445",
"0.62823504",
"0.6241177",
"0.6225048",
"0.61612254",
"0.614882... | 0.72019356 | 0 |
Clone creates a copy of the TRoot for ease of creating sublayouts. Since TRoots cannot be executed externally, we don't have the possibility of returning an error. | Clone создаёт копию TRoot для удобства создания подрасположений. Поскольку TRootы не могут выполняться внешним образом, у нас нет возможности возвращать ошибку. | func (t *TRoot) Clone() *TRoot {
var clone, _ = t.template.Clone()
return &TRoot{clone, t.Path}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (t *Template) Clone() (*Template, error) {\n\tvar tmpl, err = t.Template.Clone()\n\treturn &Template{tmpl, t.Name}, err\n}",
"func (w *WebGLRenderTarget) Clone() *WebGLRenderTarget {\n\tw.p.Call(\"clone\")\n\treturn w\n}",
"func (b *Buildtemplate) Clone(source buildv1alpha1.BuildTemplate, clientset *clien... | [
"0.63205683",
"0.59134096",
"0.5870232",
"0.57930756",
"0.57629037",
"0.57532215",
"0.5749004",
"0.5738241",
"0.57212216",
"0.56898284",
"0.5618096",
"0.56123704",
"0.5608078",
"0.5585105",
"0.5582553",
"0.55766046",
"0.5572645",
"0.5569114",
"0.5555808",
"0.5512746",
"0.5509... | 0.7969468 | 0 |
ReadPartials parses the given files into the TRoot instance for gathering things like the toplevel layout, navigation elements, etc. The list of files is relative to the TRoot's Path. Returns on the first error encountered, if any. | ReadPartials парсит заданные файлы в экземпляр TRoot для сбора элементов вроде верхнего уровня разметки, навигационных элементов и т.д. Список файлов относится к пути TRoot. Возвращает при первом возникшем ошибке, если таковая есть. | func (t *TRoot) ReadPartials(files ...string) error {
for _, file := range files {
var _, err = t.template.ParseFiles(filepath.Join(t.Path, file))
if err != nil {
return err
}
}
return nil
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (t *TRoot) MustReadPartials(files ...string) {\n\tvar err = t.ReadPartials(files...)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}",
"func PartialLatexFiles(path string) {\n\t//read all files in directory sections\n\t// this must be settleable and discoverable\n\tvar counter int\n\n\ttype Content struct {\n\t\... | [
"0.7431444",
"0.6224712",
"0.59201527",
"0.5268718",
"0.5262331",
"0.49429238",
"0.48908126",
"0.4883328",
"0.48543856",
"0.48400208",
"0.48294452",
"0.4807043",
"0.47279018",
"0.4716206",
"0.46896315",
"0.46685848",
"0.4665916",
"0.46120083",
"0.459389",
"0.45938268",
"0.458... | 0.86572236 | 0 |
MustReadPartials calls ReadPartials and panics on any error | MustReadPartials вызывает ReadPartials и вызывает панику при любой ошибке | func (t *TRoot) MustReadPartials(files ...string) {
var err = t.ReadPartials(files...)
if err != nil {
panic(err)
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (t *TRoot) ReadPartials(files ...string) error {\n\tfor _, file := range files {\n\t\tvar _, err = t.template.ParseFiles(filepath.Join(t.Path, file))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}",
"func TestExtractPartialRead(t *testing.T) {\n\trc := mutate.Extract(invalidImage{})\n... | [
"0.60439926",
"0.5645817",
"0.54828453",
"0.5442675",
"0.5392826",
"0.52395606",
"0.52249944",
"0.51955503",
"0.5156704",
"0.51566005",
"0.5084639",
"0.50834095",
"0.5021623",
"0.49996892",
"0.49993837",
"0.499132",
"0.49418923",
"0.48929805",
"0.4889833",
"0.48810267",
"0.48... | 0.7883434 | 0 |
NewEnvironment creates new type environment with current analysis pass. | NewEnvironment создает новую среду типов с текущим проходом анализа. | func NewEnvironment(pass *analysis.Pass) *Environment {
return &Environment{
//TODO make it private and reject object named __val
ExplicitRefinementMap: map[types.Object]types.Type{},
ImplicitRefinementMap: map[types.Object]types.Type{},
funArgRefinementMap: map[string]types.Type{},
Scope: ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func NewEnvironment(name string, parent *Environment) *Environment {\n\treturn &Environment{\n\t\tname: name,\n\t\tparent: parent,\n\t\tdict: make(map[string]*Symbol),\n\t}\n}",
"func NewEnvironment() *Environment {\n\ts := make(map[string]Object)\n\treturn &Environment{store: s, outer: nil}\n}",
"func New... | [
"0.6802027",
"0.6662787",
"0.6633159",
"0.6615684",
"0.6584132",
"0.657267",
"0.6483676",
"0.6449514",
"0.6449514",
"0.6340193",
"0.62803227",
"0.6262485",
"0.6236817",
"0.6187867",
"0.61719394",
"0.61681217",
"0.61587524",
"0.61014456",
"0.60950303",
"0.6028156",
"0.6007955"... | 0.727 | 0 |
EncodeTo encodes the response to []byte by bencode and write the result into w. w may be http.ResponseWriter. | EncodeTo кодирует ответ в []byte с использованием bencode и записывает результат в w. w может быть http.ResponseWriter. | func (sr ScrapeResponse) EncodeTo(w io.Writer) (err error) {
return bencode.NewEncoder(w).Encode(sr)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (resp *Response) WriteTo(w http.ResponseWriter) {\n\tif resp.buf != nil {\n\t\tresp.Body = resp.buf.Bytes()\n\t\tresp.buf = nil\n\t}\n\n\tif w != nil {\n\t\t// Write the headers\n\t\tfor k, vs := range resp.Header {\n\t\t\t// Reset existing values\n\t\t\tw.Header().Del(k)\n\t\t\tif len(vs) == 1 {\n\t\t\t\tw.H... | [
"0.5900893",
"0.5624768",
"0.55791545",
"0.55571955",
"0.5534204",
"0.5395386",
"0.5389386",
"0.53571355",
"0.5337786",
"0.5306685",
"0.53040093",
"0.53040093",
"0.5280645",
"0.5271151",
"0.52391887",
"0.52389556",
"0.52290684",
"0.5228518",
"0.5228017",
"0.5222941",
"0.52040... | 0.7092946 | 0 |
NewClient returns a new HTTPClient. scrapeURL may be empty, which will replace the "announce" in announceURL with "scrape" to generate the scrapeURL. | NewClient возвращает новый HTTPClient. scrapeURL может быть пустым, что заменит "announce" в announceURL на "scrape", чтобы сгенерировать scrapeURL. | func NewClient(announceURL, scrapeURL string) *Client {
if scrapeURL == "" {
scrapeURL = strings.Replace(announceURL, "announce", "scrape", -1)
}
id := metainfo.NewRandomHash()
return &Client{AnnounceURL: announceURL, ScrapeURL: scrapeURL, ID: id}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func New(url string) *Client {\n\treturn &Client{&http.Client{}, url, func(r *http.Request) *http.Request { return r }}\n}",
"func New(url string) *Client {\n\treturn &Client{url: url, httpC: http.DefaultClient}\n}",
"func New() (crawl *Crawl) {\n\tc := &http.Client{\n\t\tTransport: http.DefaultTransport,\n\t}... | [
"0.6308598",
"0.6222202",
"0.6097972",
"0.6060751",
"0.6043418",
"0.604116",
"0.5992147",
"0.5986665",
"0.5968273",
"0.59570366",
"0.5919546",
"0.59144855",
"0.59128547",
"0.5904674",
"0.5874914",
"0.58727384",
"0.58473456",
"0.5841087",
"0.58391356",
"0.5830302",
"0.5823845"... | 0.76326865 | 0 |
Announce sends a Announce request to the tracker. | Announce отправляет запрос Announce на трекер. | func (t *Client) Announce(c context.Context, req AnnounceRequest) (
resp AnnounceResponse, err error) {
if req.PeerID.IsZero() {
if t.ID.IsZero() {
req.PeerID = metainfo.NewRandomHash()
} else {
req.PeerID = t.ID
}
}
err = t.send(c, t.AnnounceURL, req.ToQuery(), &resp)
return
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (b *Builder) Announce() (err error) {\n\targs := &rpc.AnnounceArgs{\n\t\tGOOS: b.b.GOOS(),\n\t\tGOARCH: b.b.GOARCH(),\n\t\tType: \"Builder\",\n\t\tURL: b.base,\n\t}\n\treply := new(rpc.AnnounceReply)\n\tif err = b.tcl.Call(\"Tracker.Announce\", args, reply); err != nil {\n\t\treturn\n\t}\n\tb.key = rep... | [
"0.7591315",
"0.7542612",
"0.7309203",
"0.73045576",
"0.70813364",
"0.69591624",
"0.6934339",
"0.6784179",
"0.6711855",
"0.6598236",
"0.62005067",
"0.62001413",
"0.6174527",
"0.61571336",
"0.60925037",
"0.6053757",
"0.59826213",
"0.58398366",
"0.58314586",
"0.5807263",
"0.576... | 0.7839598 | 0 |
build state function that will check if a job responsible for building function image succeeded or failed; if a job is not running start one | Постройте функцию состояния, которая проверит, успешно ли завершил работу задача, отвечающая за построение образа функции; если задача не запущена, запустите её | func buildStateFnCheckImageJob(expectedJob batchv1.Job) stateFn {
return func(ctx context.Context, r *reconciler, s *systemState) (stateFn, error) {
labels := s.internalFunctionLabels()
err := r.client.ListByLabel(ctx, s.instance.GetNamespace(), labels, &s.jobs)
if err != nil {
return nil, errors.Wrap(err, "... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (st *buildStatus) start() {\n\tsetStatus(st.BuilderRev, st)\n\tgo func() {\n\t\terr := st.build()\n\t\tif err == errSkipBuildDueToDeps {\n\t\t\tst.setDone(true)\n\t\t} else {\n\t\t\tif err != nil {\n\t\t\t\tfmt.Fprintf(st, \"\\n\\nError: %v\\n\", err)\n\t\t\t\tlog.Println(st.BuilderRev, \"failed:\", err)\n\t\... | [
"0.5804885",
"0.576292",
"0.57217044",
"0.56923383",
"0.5667544",
"0.5643866",
"0.56260103",
"0.5621047",
"0.55758095",
"0.5512292",
"0.5495707",
"0.54381084",
"0.5428398",
"0.5407359",
"0.5348316",
"0.5330184",
"0.53044367",
"0.5302426",
"0.5284066",
"0.52470475",
"0.5225209... | 0.7990586 | 0 |
Save changes the configuration of the hostonly network. | Сохраните изменения конфигурации сети hostonly. | func (n *hostOnlyNetwork) Save(vbox VBoxManager) error {
if err := n.SaveIPv4(vbox); err != nil {
return err
}
if n.DHCP {
vbox.vbm("hostonlyif", "ipconfig", n.Name, "--dhcp") // not implemented as of VirtualBox 4.3
}
return nil
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (ctx *BoltDbContext) SaveHost(host Host) error {\n\treturn ctx.db.Update(func(tx *bolt.Tx) error {\n\t\tb := tx.Bucket([]byte(hostsBucketName))\n\t\terr := b.Put([]byte(host.Address), host.GobEncode())\n\t\treturn err\n\t})\n}",
"func (hc *Hailconfig) Save() error {\n\terr := hc.f.Reset()\n\tif err != nil {... | [
"0.57114166",
"0.5705443",
"0.55867183",
"0.55641735",
"0.5545801",
"0.5540158",
"0.55362916",
"0.5509479",
"0.5506129",
"0.5503006",
"0.5464419",
"0.5461447",
"0.5456357",
"0.54298675",
"0.5423216",
"0.5402514",
"0.5287204",
"0.5237437",
"0.5235597",
"0.52300316",
"0.522529"... | 0.76610893 | 0 |
SaveIPv4 changes the ipv4 configuration of the hostonly network. | SaveIPv4 изменяет конфигурацию ipv4 сети hostonly. | func (n *hostOnlyNetwork) SaveIPv4(vbox VBoxManager) error {
if n.IPv4.IP != nil && n.IPv4.Mask != nil {
if err := vbox.vbm("hostonlyif", "ipconfig", n.Name, "--ip", n.IPv4.IP.String(), "--netmask", net.IP(n.IPv4.Mask).String()); err != nil {
return err
}
}
return nil
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (f *FSEIDFields) SetIPv4Flag() {\n\tf.Flags |= 0x02\n}",
"func (internet Internet) IPv4(v reflect.Value) (interface{}, error) {\n\treturn internet.ipv4(), nil\n}",
"func IPv4(a, b, c, d uint8) IP {\n\treturn IP{\n\t\tlo: 0xffff00000000 | uint64(a)<<24 | uint64(b)<<16 | uint64(c)<<8 | uint64(d),\n\t\tz: z... | [
"0.6443081",
"0.6388994",
"0.63776445",
"0.6346549",
"0.6192383",
"0.61467063",
"0.6119341",
"0.59505796",
"0.58408594",
"0.5829703",
"0.5822138",
"0.5800136",
"0.574169",
"0.5729033",
"0.57041806",
"0.5692545",
"0.5672946",
"0.56706774",
"0.5669973",
"0.5656812",
"0.56447315... | 0.8872807 | 0 |
createHostonlyAdapter creates a new hostonly network. | createHostonlyAdapter создает новый сетевой интерфейс host-only. | func createHostonlyAdapter(vbox VBoxManager) (*hostOnlyNetwork, error) {
out, err := vbox.vbmOut("hostonlyif", "create")
if err != nil {
return nil, err
}
res := reHostOnlyAdapterCreated.FindStringSubmatch(string(out))
if res == nil {
return nil, errors.New("Failed to create host-only adapter")
}
return &h... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func createHostWithIp(nodeId int, ip string, port int) (core.Host, error) {\n\t// Producing private key using nodeId\n\tr := mrand.New(mrand.NewSource(int64(nodeId)))\n\n\tprvKey, _ := ecdsa.GenerateKey(btcec.S256(), r)\n\tsk := (*crypto.Secp256k1PrivateKey)(prvKey)\n\n\t// Starting a peer with default configs\n\t... | [
"0.5605203",
"0.5528005",
"0.5470935",
"0.54345465",
"0.5420929",
"0.53596747",
"0.53540576",
"0.5293824",
"0.52900076",
"0.52677083",
"0.52036476",
"0.52007806",
"0.5181415",
"0.5149478",
"0.5139053",
"0.511084",
"0.5104876",
"0.5074306",
"0.50325537",
"0.5014431",
"0.499159... | 0.84993964 | 0 |
listHostOnlyAdapters gets all hostonly adapters in a map keyed by NetworkName. | listHostOnlyAdapters получает все адаптеры hostonly в виде карты, ключом которой является NetworkName. | func listHostOnlyAdapters(vbox VBoxManager) (map[string]*hostOnlyNetwork, error) {
out, err := vbox.vbmOut("list", "hostonlyifs")
if err != nil {
return nil, err
}
byName := map[string]*hostOnlyNetwork{}
byIP := map[string]*hostOnlyNetwork{}
n := &hostOnlyNetwork{}
err = parseKeyValues(out, reColonLine, func... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func listDHCPServers(vbox VBoxManager) (map[string]*dhcpServer, error) {\n\tout, err := vbox.vbmOut(\"list\", \"dhcpservers\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tm := map[string]*dhcpServer{}\n\tdhcp := &dhcpServer{}\n\n\terr = parseKeyValues(out, reColonLine, func(key, val string) error {\n\t\tswit... | [
"0.4922467",
"0.49170256",
"0.48662174",
"0.46048605",
"0.45793784",
"0.4545906",
"0.4537662",
"0.45205545",
"0.45185655",
"0.44573838",
"0.44563538",
"0.4444831",
"0.44146225",
"0.4406497",
"0.43984336",
"0.43956515",
"0.43870476",
"0.4317521",
"0.42667553",
"0.4260609",
"0.... | 0.7816921 | 0 |
removeOrphanDHCPServers removed the DHCP servers linked to no hostonly adapter | removeOrphanDHCPServers удалил DHCP-серверы, связанные с ни одним адаптером Host-only | func removeOrphanDHCPServers(vbox VBoxManager) error {
dhcps, err := listDHCPServers(vbox)
if err != nil {
return err
}
if len(dhcps) == 0 {
return nil
}
nets, err := listHostOnlyAdapters(vbox)
if err != nil {
return err
}
for name := range dhcps {
if strings.HasPrefix(name, dhcpPrefix) {
if _, p... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func DHCPsDelete() error {\n\tdhcps, err := DHCPsGet()\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor _, d := range dhcps {\n\t\tif isUnmanaged(UnmanagedID(d.Ifname), LINKTYPE) {\n\t\t\tlogger.Log.Info(fmt.Sprintf(\"Skipping Unmanaged Link %v DHCP configuration\", d.Ifname))\n\t\t\tcontinue\n\t\t}\n\t\terr = DHCPD... | [
"0.6231171",
"0.5975118",
"0.592964",
"0.5638924",
"0.5413972",
"0.51644886",
"0.5150004",
"0.5145574",
"0.51422113",
"0.50841993",
"0.5060565",
"0.5032385",
"0.50233114",
"0.50209886",
"0.5001533",
"0.49985364",
"0.49904168",
"0.4957759",
"0.49550113",
"0.49398196",
"0.49369... | 0.80990946 | 0 |
addHostOnlyDHCPServer adds a DHCP server to a hostonly network. | addHostOnlyDHCPServer добавляет сервер DHCP в сеть hostonly. | func addHostOnlyDHCPServer(ifname string, d dhcpServer, vbox VBoxManager) error {
name := dhcpPrefix + ifname
dhcps, err := listDHCPServers(vbox)
if err != nil {
return err
}
// On some platforms (OSX), creating a host-only adapter adds a default dhcpserver,
// while on others (Windows?) it does not.
command... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func WithDHCPServer(subnet *net.IPNet) Option {\n\treturn func(d *dnsmasq) {\n\t\td.subnet = subnet\n\t}\n}",
"func (p *PerHost) AddHost(host string) {\n\tif strings.HasSuffix(host, \".\") {\n\t\thost = host[:len(host)-1]\n\t}\n\tp.bypassHosts = append(p.bypassHosts, host)\n}",
"func (lv *Libvirt) AddTransient... | [
"0.63686794",
"0.57897925",
"0.57406795",
"0.56142825",
"0.55573124",
"0.5441052",
"0.5403369",
"0.5396786",
"0.534772",
"0.524854",
"0.5180699",
"0.5176822",
"0.5176461",
"0.5159396",
"0.5083173",
"0.50322163",
"0.49743834",
"0.49698305",
"0.496737",
"0.49510124",
"0.4906773... | 0.8681207 | 0 |
listDHCPServers lists all DHCP server settings in a map keyed by DHCP.NetworkName. | listDHCPServers перечисляет все настройки сервера DHCP в виде карты, ключом которой является DHCP.NetworkName. | func listDHCPServers(vbox VBoxManager) (map[string]*dhcpServer, error) {
out, err := vbox.vbmOut("list", "dhcpservers")
if err != nil {
return nil, err
}
m := map[string]*dhcpServer{}
dhcp := &dhcpServer{}
err = parseKeyValues(out, reColonLine, func(key, val string) error {
switch key {
case "NetworkName"... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *VirtualizationVmwareVirtualMachineAllOf) GetDnsServerList() []string {\n\tif o == nil {\n\t\tvar ret []string\n\t\treturn ret\n\t}\n\treturn o.DnsServerList\n}",
"func WithDHCPNameServers(dns []string) Option {\n\treturn func(d *dnsmasq) {\n\t\td.dns = dns\n\t}\n}",
"func (client WorkloadNetworksClien... | [
"0.5871556",
"0.57992846",
"0.5637868",
"0.5621159",
"0.561796",
"0.55982745",
"0.5547308",
"0.5486327",
"0.5452146",
"0.5445553",
"0.5430095",
"0.5428605",
"0.5427161",
"0.53797334",
"0.5372634",
"0.53152144",
"0.5299417",
"0.52930343",
"0.5261868",
"0.5255848",
"0.52518666"... | 0.8791519 | 0 |
parseIPv4Mask parses IPv4 netmask written in IP form (e.g. 255.255.255.0). This function should really belong to the net package. | parseIPv4Mask парсит IPv4-маску, записанную в виде IP (например, 255.255.255.0). Эта функция действительно должна принадлежать пакету net. | func parseIPv4Mask(s string) net.IPMask {
mask := net.ParseIP(s)
if mask == nil {
return nil
}
return net.IPv4Mask(mask[12], mask[13], mask[14], mask[15])
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func parseMask4(s string) (mask Prefix, i int) {\n\ti = len(s)\n\tif i == 0 {\n\t\treturn 0, 0\n\t}\n\tif !isD(s[0]) {\n\t\treturn 0, 0\n\t}\n\tmask = Prefix(s[0] - '0')\n\tif i == 1 || !isD(s[1]) {\n\t\treturn mask, 1\n\t}\n\tmask = mask*10 + Prefix(s[1]-'0')\n\tif mask > 32 {\n\t\treturn 0, 0\n\t}\n\tif i == 2 |... | [
"0.6910413",
"0.65817773",
"0.64788103",
"0.64404845",
"0.61875916",
"0.61496323",
"0.6074284",
"0.60079217",
"0.59941304",
"0.59614414",
"0.58839774",
"0.58533674",
"0.582732",
"0.5775293",
"0.57644033",
"0.57606894",
"0.5736692",
"0.573576",
"0.570588",
"0.5696371",
"0.5683... | 0.86540896 | 0 |
NewPreRunner takes a name and a standalone pre runner compatible function and turns them into a Group compatible PreRunner, ready for registration. | NewPreRunner принимает имя и функцию-предварительный запускатор, совместимую с самостоятельным запуском, и преобразует их в PreRunner, совместимый с группой, готовый к регистрации. | func NewPreRunner(name string, fn func() error) PreRunner {
return preRunner{name: name, fn: fn}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func preRun(c *cobra.Command, args []string) error {\n\tif len(args) < 1 {\n\t\treturn errors.New(\"Missing name argument\")\n\t}\n\n\tname = args[0]\n\treturn nil\n}",
"func newRunnerGroup(scope RunnerGroupScope, name string) RunnerGroup {\n\tif name == \"\" {\n\t\treturn RunnerGroup{\n\t\t\tScope: scope,\n\t\t... | [
"0.574454",
"0.5559259",
"0.5491292",
"0.54819775",
"0.54751414",
"0.54033977",
"0.53813756",
"0.5324207",
"0.5233656",
"0.5183823",
"0.51202166",
"0.511692",
"0.50739557",
"0.5055979",
"0.50478184",
"0.50427",
"0.49869433",
"0.49579746",
"0.49525964",
"0.4946813",
"0.4937391... | 0.82757413 | 0 |
NewGroup return a Group with input name. | NewGroup возвращает группу с указанным именем. | func NewGroup(name string) Group {
return Group{
name: name,
readyCh: make(chan struct{}),
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func NewGroup(owner, name string) Group {\n\tnow := time.Now()\n\treturn Group{\n\t\tOwner: owner,\n\t\tName: name,\n\t\tDescription: name,\n\t\tAccess: \"private\",\n\t\tBirthtime: now,\n\t\tMTime: now,\n\t}\n}",
"func NewGroup(name string, members ...string) *Group {\n\treturn &Group{... | [
"0.7774005",
"0.7614487",
"0.7580504",
"0.7580504",
"0.75550216",
"0.7460315",
"0.7294258",
"0.72896034",
"0.7261106",
"0.7210766",
"0.7202386",
"0.71659905",
"0.7141491",
"0.70930296",
"0.6947957",
"0.6907739",
"0.6901332",
"0.6881721",
"0.6866693",
"0.68410695",
"0.68170804... | 0.79604924 | 0 |
Name shows the name of the group. | Имя показывает имя группы. | func (g Group) Name() string {
return g.name
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (g *Group) Name() string {\n\treturn g.name\n}",
"func (g *Group) Name() string {\n\treturn g.name\n}",
"func (o ServerGroupOutput) Name() pulumi.StringOutput {\n\treturn o.ApplyT(func(v *ServerGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)\n}",
"func (o InstanceGroupOutput) Name() ... | [
"0.80168146",
"0.80168146",
"0.75941217",
"0.75454223",
"0.74364364",
"0.7433477",
"0.7422203",
"0.73819286",
"0.7380036",
"0.73613214",
"0.7249155",
"0.72418725",
"0.7185711",
"0.7158183",
"0.7133307",
"0.7036169",
"0.7024919",
"0.7012739",
"0.6959442",
"0.6914941",
"0.68954... | 0.8108221 | 0 |
Register will inspect the provided objects implementing the Unit interface to see if it needs to register the objects for any of the Group bootstrap phases. If a Unit doesn't satisfy any of the bootstrap phases it is ignored by Group. The returned array of booleans is of the same size as the amount of provided Units, s... | Регистр проверит предоставляемые объекты, реализующие интерфейс Unit, чтобы определить, нужно ли зарегистрировать их для любого из этапов запуска Group. Если Unit не удовлетворяет ни одному из этапов запуска, он игнорируется Group. Возвращаемый массив логических значений имеет такую же длину, как и количество предостав... | func (g *Group) Register(units ...Unit) []bool {
g.log = logger.GetLogger(g.name)
hasRegistered := make([]bool, len(units))
for idx := range units {
if !g.configured {
// if RunConfig has been called we can no longer register Config
// phases of Units
if c, ok := units[idx].(Config); ok {
g.c = append... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *MemoryArrayAllOf) HasUnits() bool {\n\tif o != nil && o.Units != nil {\n\t\treturn true\n\t}\n\n\treturn false\n}",
"func Register(pcs ...components.Pluggable) int {\n\tregisteredComponents := 0\n\tfor _, pc := range pcs {\n\t\tregister, ok := registries[pc.Type]\n\t\tif !ok {\n\t\t\tlog.Warnf(\"%s is n... | [
"0.5419398",
"0.5418993",
"0.531174",
"0.5119865",
"0.50986594",
"0.49601153",
"0.4939661",
"0.4924268",
"0.49226665",
"0.48969033",
"0.48539323",
"0.47764537",
"0.4633344",
"0.46204185",
"0.45852447",
"0.45746577",
"0.45736307",
"0.45174125",
"0.44895804",
"0.44889534",
"0.4... | 0.7825831 | 0 |
RunConfig runs the Config phase of all registered Config aware Units. Only use this function if needing to add additional wiring between config and (pre)run phases and a separate PreRunner phase is not an option. In most cases it is best to use the Run method directly as it will run the Config phase prior to executing ... | RunConfig запускает этап конфигурации (Config) всех зарегистрированных Units, осознающих конфигурацию. Используйте эту функцию только в случае необходимости добавления дополнительных связей между этапом конфигурации и (пред)запуском, а отдельный этап PreRunner не является опцией. В большинстве случаев лучше использоват... | func (g *Group) RunConfig() (interrupted bool, err error) {
g.log = logger.GetLogger(g.name)
g.configured = true
if g.name == "" {
// use the binary name if custom name has not been provided
g.name = path.Base(os.Args[0])
}
defer func() {
if err != nil {
g.log.Error().Err(err).Msg("unexpected exit")
}... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func ConfigRun(ctx *cli.Context) error {\n\topt, err := InitOption(ctx)\n\tif err != nil {\n\t\treturn xerrors.Errorf(\"option error: %w\", err)\n\t}\n\n\t// Disable OS and language analyzers\n\topt.DisabledAnalyzers = append(analyzer.TypeOSes, analyzer.TypeLanguages...)\n\n\t// Scan only config files\n\topt.VulnT... | [
"0.71010476",
"0.64792436",
"0.6213528",
"0.62125707",
"0.61918336",
"0.60716456",
"0.60399765",
"0.60297084",
"0.6020371",
"0.60044134",
"0.5958",
"0.59382945",
"0.58830523",
"0.58809024",
"0.5818161",
"0.5803526",
"0.5797414",
"0.5793293",
"0.5785053",
"0.57504505",
"0.5725... | 0.7411264 | 0 |
Run will execute all phases of all registered Units and block until an error occurs. If RunConfig has been called prior to Run, the Group's Config phase will be skipped and Run continues with the PreRunner and Service phases. The following phases are executed in the following sequence: Config phase (serially, in order ... | Run выполнит все фазы всех зарегистрированных Units и заблокирует выполнение до возникновения ошибки. Если RunConfig был вызван до Run, фаза Config группы будет пропущена, и Run продолжится с фаз PreRunner и Service. Следующие фазы выполняются в следующем порядке: Фаза Config (последовательно, в порядке регистрации Uni... | func (g *Group) Run() (err error) {
// run config registration and flag parsing stages
if interrupted, errRun := g.RunConfig(); interrupted || errRun != nil {
return errRun
}
defer func() {
if err != nil {
g.log.Fatal().Err(err).Stack().Msg("unexpected exit")
}
}()
// execute pre run stage and exit on e... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (c *Cfg) Run(args ...string) {\n\tif args == nil {\n\t\targs = os.Args[1:]\n\t}\n\tc, cmd, args, err := c.Parse(args)\n\tif err == nil {\n\t\tif err = cmd.Main(args); err == nil {\n\t\t\tExit(0)\n\t\t\treturn\n\t\t}\n\t}\n\tif err == ErrHelp {\n\t\tw := newWriter(c)\n\t\tdefer w.done(os.Stderr, 0)\n\t\tw.help... | [
"0.67258763",
"0.66956735",
"0.66749555",
"0.6631407",
"0.6609172",
"0.6555715",
"0.6465029",
"0.64125794",
"0.64101774",
"0.64062446",
"0.6338222",
"0.6321938",
"0.63210386",
"0.63161224",
"0.63157916",
"0.6259968",
"0.6221255",
"0.62152505",
"0.61776745",
"0.6164499",
"0.61... | 0.7633714 | 0 |
ListUnits returns a list of all Group phases and the Units registered to each of them. | ListUnits возвращает список всех фаз Group и Units, зарегистрированных для каждой из них. | func (g Group) ListUnits() string {
var (
s string
t = "cli"
)
if len(g.c) > 0 {
s += "\n- config: "
for _, u := range g.c {
if u != nil {
s += u.Name() + " "
}
}
}
if len(g.p) > 0 {
s += "\n- prerun: "
for _, u := range g.p {
if u != nil {
s += u.Name() + " "
}
}
}
if len(g.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func ListUnits(w http.ResponseWriter) error {\n\tconn, err := sd.NewSystemdConnection()\n\tif err != nil {\n\t\tlog.Errorf(\"Failed to get systemd bus connection: %s\", err)\n\t\treturn err\n\t}\n\tdefer conn.Close()\n\n\tunits, err := conn.ListUnits()\n\tif err != nil {\n\t\tlog.Errorf(\"Failed ListUnits: %v\", e... | [
"0.72441345",
"0.7032067",
"0.6085787",
"0.6073443",
"0.595272",
"0.5778228",
"0.5681488",
"0.5550705",
"0.5550341",
"0.5543723",
"0.553827",
"0.55062217",
"0.5478257",
"0.5455158",
"0.54498625",
"0.5443609",
"0.53967434",
"0.5386662",
"0.53394026",
"0.5324254",
"0.5321294",
... | 0.75670975 | 0 |
WaitTillReady blocks the goroutine till all modules are ready. | WaitTillReady блокирует горутину до тех пор, пока все модули не будут готовы. | func (g *Group) WaitTillReady() {
<-g.readyCh
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (envManager *TestEnvManager) WaitUntilReady() (bool, error) {\n\tlog.Println(\"Start checking components' status\")\n\tretry := u.Retrier{\n\t\tBaseDelay: 1 * time.Second,\n\t\tMaxDelay: 10 * time.Second,\n\t\tRetries: 8,\n\t}\n\n\tready := false\n\tretryFn := func(_ context.Context, i int) error {\n\t\tfo... | [
"0.71673805",
"0.7037186",
"0.6973799",
"0.69529676",
"0.6943009",
"0.67180645",
"0.6540523",
"0.65389913",
"0.6448208",
"0.64068717",
"0.63826364",
"0.6358909",
"0.63548183",
"0.6340962",
"0.6263704",
"0.6206062",
"0.61352175",
"0.6132525",
"0.61261886",
"0.60737973",
"0.603... | 0.7307017 | 0 |
SetNameIndex sets index of slice element on Name. | SetNameIndex задает индекс элемента среза на Name. | func (v *StringIsPath) SetNameIndex(i int) {
v.Name = fmt.Sprintf("%s[%d]", RxSetNameIndex.ReplaceAllString(v.Name, ""), i)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (v *StringHasSuffixAny) SetNameIndex(i int) {\n\tv.Name = fmt.Sprintf(\"%s[%d]\", RxSetNameIndex.ReplaceAllString(v.Name, \"\"), i)\n}",
"func (v *StringIsUserGroupOrWhitelisted) SetNameIndex(i int) {\n\tv.Name = fmt.Sprintf(\"%s[%d]\", RxSetNameIndex.ReplaceAllString(v.Name, \"\"), i)\n}",
"func (v *Stri... | [
"0.748726",
"0.7431408",
"0.6964414",
"0.6346891",
"0.6253622",
"0.6180723",
"0.6141942",
"0.60409635",
"0.59939164",
"0.5878266",
"0.5856989",
"0.5851746",
"0.57178617",
"0.5685566",
"0.5639303",
"0.56303644",
"0.55680585",
"0.5561141",
"0.5557104",
"0.5499101",
"0.548195",
... | 0.77226394 | 0 |
runIndex is the main function for the index subcommand | runIndex — основная функция для подкоманды index | func runIndex() {
// check index flag is set (global flag but don't require it for all sub commands)
if *indexDir == "" {
fmt.Println("please specify a directory for the index files (--indexDir)")
os.Exit(1)
}
// set up profiling
if *profiling == true {
defer profile.Start(profile.MemProfile, profile.Profi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func index(w http.ResponseWriter, req *http.Request, ctx httputil.Context) (e *httputil.Error) {\n\tif req.URL.Path != \"/\" {\n\t\tnotFound(w, req)\n\t\treturn\n\t}\n\tm := newManager(ctx)\n\n\tres, err := m.Index()\n\tif err != nil {\n\t\te = httputil.Errorf(err, \"couldn't query for test results\")\n\t\treturn\... | [
"0.72352827",
"0.7231066",
"0.6974629",
"0.6947217",
"0.6895008",
"0.68026304",
"0.66526365",
"0.65366894",
"0.65255636",
"0.6510996",
"0.6510996",
"0.64903265",
"0.6484665",
"0.648378",
"0.64530957",
"0.64055777",
"0.6405252",
"0.6393524",
"0.63744456",
"0.63676375",
"0.6320... | 0.7970374 | 0 |
/ Returns an elliptic.CurveWrapper around this group. The elliptic.CurveParams returned by the .Params() method the Curve should not be used for doing ScalarMult, etc.! | Возвращает объект elliptic.CurveWrapper вокруг этой группы. Эллиптические.CurveParams, возвращаемые методом .Params(), не должны использоваться для ScalarMult и т.д.! | func (m *ModulusGroup) AsCurve() elliptic.Curve {
return &asCurve{m}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (s Keygen) Curve() elliptic.Curve {\n\treturn s.group\n}",
"func getCurve() elliptic.Curve {\n return elliptic.P256()\n}",
"func CurveParamsParams(curve *elliptic.CurveParams,) *elliptic.CurveParams",
"func NewCurve(xyz XYZer) Curve {\n\tc := Curve{}\n\tc.points.minXYZ.X, c.points.minXYZ.Y, c.points.... | [
"0.6798301",
"0.6065067",
"0.5757176",
"0.56906825",
"0.56289303",
"0.54817134",
"0.5463004",
"0.5415355",
"0.539792",
"0.53937465",
"0.5361424",
"0.5323893",
"0.5249899",
"0.51688224",
"0.50669473",
"0.5043877",
"0.50011253",
"0.49452612",
"0.49054405",
"0.48807684",
"0.4798... | 0.7203198 | 0 |
MaxItemID retrieves the current largest item id is at You can walk backward from here to discover all items. | MaxItemID возвращает текущий наибольший идентификатор предмета. Вы можете идти в обратном направлении отсюда, чтобы обнаружить все предметы. | func MaxItemID() int {
var maxItemID int
err := getJSON(MaxItemIDURL, &maxItemID)
if err != nil {
log.Panicln(err.Error())
}
return maxItemID
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func getMaxID() uint8 {\n\tmaxID++\n\treturn maxID\n}",
"func getMaxID() int {\n\n\tif len(cdb.classMap) != 0 {\n\t\tkeys := make([]int, 0, len(cdb.classMap))\n\t\tfor k := range cdb.classMap {\n\t\t\tkeys = append(keys, k)\n\t\t}\n\t\tsort.Ints(keys)\n\t\treturn keys[len(keys)-1]\n\t}\n\n\treturn -1\n\n}",
"f... | [
"0.6239351",
"0.62393034",
"0.6184761",
"0.6177771",
"0.61411256",
"0.5951838",
"0.59276485",
"0.5924461",
"0.5894317",
"0.5864182",
"0.58507824",
"0.5841664",
"0.5819029",
"0.57879007",
"0.5785859",
"0.5710718",
"0.5693274",
"0.5676167",
"0.56462955",
"0.56358624",
"0.559829... | 0.86796016 | 0 |
Deprecated: Use CodeRequest.ProtoReflect.Descriptor instead. | Устарело: используйте CodeRequest.ProtoReflect.Descriptor вместо этого. | func (*CodeRequest) Descriptor() ([]byte, []int) {
return file_helloworld_helloworld_proto_rawDescGZIP(), []int{1}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (*CodeLensRequest) Descriptor() ([]byte, []int) {\n\treturn file_protocol_rpc_rpc_proto_rawDescGZIP(), []int{163}\n}",
"func (*PatchCollectorsRequest) Descriptor() ([]byte, []int) {\n\treturn file_proto_clarifai_api_service_proto_rawDescGZIP(), []int{161}\n}",
"func (*ModifyRequest) Descriptor() ([]byte, ... | [
"0.72352815",
"0.71125454",
"0.7089678",
"0.7086867",
"0.7050585",
"0.7002672",
"0.69934523",
"0.6932713",
"0.69018894",
"0.68992066",
"0.6889897",
"0.68843466",
"0.68616295",
"0.6860479",
"0.68583477",
"0.68542755",
"0.68515146",
"0.6844837",
"0.68435585",
"0.6838578",
"0.68... | 0.72652876 | 0 |
Deprecated: Use PaqueteRequest.ProtoReflect.Descriptor instead. | Устарело: используйте PaqueteRequest.ProtoReflect.Descriptor вместо этого. | func (*PaqueteRequest) Descriptor() ([]byte, []int) {
return file_helloworld_helloworld_proto_rawDescGZIP(), []int{2}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (*ModifyRequest) Descriptor() ([]byte, []int) {\n\treturn file_proto_engine_proto_rawDescGZIP(), []int{10}\n}",
"func (*PatchCollectorsRequest) Descriptor() ([]byte, []int) {\n\treturn file_proto_clarifai_api_service_proto_rawDescGZIP(), []int{161}\n}",
"func (*AddPeerRequest) Descriptor() ([]byte, []int)... | [
"0.72573286",
"0.7218847",
"0.71748",
"0.7132119",
"0.7117333",
"0.71093345",
"0.70960057",
"0.70482236",
"0.7047904",
"0.7028092",
"0.70185226",
"0.7012674",
"0.70116967",
"0.70067143",
"0.70019865",
"0.69961846",
"0.6985266",
"0.6979804",
"0.6976487",
"0.6974723",
"0.697410... | 0.7264457 | 0 |
NewGetPlatformsParams creates a new GetPlatformsParams object with the default values initialized. | NewGetPlatformsParams создает новый объект GetPlatformsParams с инициализацией значений по умолчанию. | func NewGetPlatformsParams() *GetPlatformsParams {
var ()
return &GetPlatformsParams{
timeout: cr.DefaultTimeout,
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func NewGetPlatformsParamsWithTimeout(timeout time.Duration) *GetPlatformsParams {\n\tvar ()\n\treturn &GetPlatformsParams{\n\n\t\ttimeout: timeout,\n\t}\n}",
"func NewGetPlatformsParamsWithHTTPClient(client *http.Client) *GetPlatformsParams {\n\tvar ()\n\treturn &GetPlatformsParams{\n\t\tHTTPClient: client,\n\t... | [
"0.7555398",
"0.7425465",
"0.66280895",
"0.6524783",
"0.6367459",
"0.623201",
"0.6032082",
"0.5907493",
"0.58632076",
"0.570186",
"0.56994843",
"0.5553735",
"0.55019903",
"0.547514",
"0.5458275",
"0.5445687",
"0.5440679",
"0.5381146",
"0.5365345",
"0.5304436",
"0.5302954",
... | 0.88731694 | 0 |
NewGetPlatformsParamsWithTimeout creates a new GetPlatformsParams object with the default values initialized, and the ability to set a timeout on a request | NewGetPlatformsParamsWithTimeout создает новый объект GetPlatformsParams с инициализированными значениями по умолчанию, а также возможность установить таймаут на запрос | func NewGetPlatformsParamsWithTimeout(timeout time.Duration) *GetPlatformsParams {
var ()
return &GetPlatformsParams{
timeout: timeout,
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *GetPlatformsParams) WithTimeout(timeout time.Duration) *GetPlatformsParams {\n\to.SetTimeout(timeout)\n\treturn o\n}",
"func NewGetPlatformsParams() *GetPlatformsParams {\n\tvar ()\n\treturn &GetPlatformsParams{\n\n\t\ttimeout: cr.DefaultTimeout,\n\t}\n}",
"func (o *GetPlatformsParams) SetTimeout(time... | [
"0.8099803",
"0.7864803",
"0.68469137",
"0.6831266",
"0.6502288",
"0.6194031",
"0.6076022",
"0.59323996",
"0.58478737",
"0.5819925",
"0.5788982",
"0.57653457",
"0.5737436",
"0.57203186",
"0.56848276",
"0.5684553",
"0.56770486",
"0.5665245",
"0.56478405",
"0.5646077",
"0.56403... | 0.8511127 | 0 |
NewGetPlatformsParamsWithContext creates a new GetPlatformsParams object with the default values initialized, and the ability to set a context for a request | NewGetPlatformsParamsWithContext создает новый объект GetPlatformsParams с инициализированными значениями по умолчанию и возможностью установки контекста для запроса | func NewGetPlatformsParamsWithContext(ctx context.Context) *GetPlatformsParams {
var ()
return &GetPlatformsParams{
Context: ctx,
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func NewGetPlatformsParams() *GetPlatformsParams {\n\tvar ()\n\treturn &GetPlatformsParams{\n\n\t\ttimeout: cr.DefaultTimeout,\n\t}\n}",
"func (o *GetPlatformsParams) WithContext(ctx context.Context) *GetPlatformsParams {\n\to.SetContext(ctx)\n\treturn o\n}",
"func NewGetPlatformsParamsWithHTTPClient(client *h... | [
"0.79062843",
"0.75749254",
"0.717758",
"0.6895261",
"0.6486832",
"0.64502275",
"0.60652006",
"0.5622456",
"0.5587018",
"0.5517432",
"0.5431089",
"0.5329733",
"0.5258846",
"0.52431345",
"0.49316105",
"0.49075675",
"0.48815322",
"0.48812634",
"0.4881164",
"0.485486",
"0.483336... | 0.8426746 | 0 |
NewGetPlatformsParamsWithHTTPClient creates a new GetPlatformsParams object with the default values initialized, and the ability to set a custom HTTPClient for a request | NewGetPlatformsParamsWithHTTPClient создает новый объект GetPlatformsParams с инициализированными значениями по умолчанию и возможностью задать пользовательский HTTPClient для запроса | func NewGetPlatformsParamsWithHTTPClient(client *http.Client) *GetPlatformsParams {
var ()
return &GetPlatformsParams{
HTTPClient: client,
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *GetPlatformsParams) WithHTTPClient(client *http.Client) *GetPlatformsParams {\n\to.SetHTTPClient(client)\n\treturn o\n}",
"func NewGetPlatformsParams() *GetPlatformsParams {\n\tvar ()\n\treturn &GetPlatformsParams{\n\n\t\ttimeout: cr.DefaultTimeout,\n\t}\n}",
"func (o *GetPlatformsParams) SetHTTPClien... | [
"0.82473236",
"0.72261274",
"0.6987023",
"0.6613042",
"0.66055197",
"0.61128336",
"0.60561305",
"0.59734505",
"0.5956229",
"0.5941421",
"0.59126693",
"0.58695054",
"0.5867843",
"0.58573145",
"0.58371466",
"0.5729112",
"0.5689428",
"0.5687673",
"0.5664992",
"0.563189",
"0.5624... | 0.85485095 | 0 |
WithTimeout adds the timeout to the get platforms params | WithTimeout добавляет таймаут в параметры получения платформ | func (o *GetPlatformsParams) WithTimeout(timeout time.Duration) *GetPlatformsParams {
o.SetTimeout(timeout)
return o
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *GetPlatformsParams) SetTimeout(timeout time.Duration) {\n\to.timeout = timeout\n}",
"func NewGetPlatformsParamsWithTimeout(timeout time.Duration) *GetPlatformsParams {\n\tvar ()\n\treturn &GetPlatformsParams{\n\n\t\ttimeout: timeout,\n\t}\n}",
"func WithTimeout(t time.Duration) apiOption {\n\treturn f... | [
"0.70924264",
"0.70087135",
"0.63422763",
"0.60646397",
"0.598531",
"0.59620464",
"0.5948087",
"0.58235776",
"0.5817179",
"0.5794681",
"0.57502705",
"0.57502705",
"0.5739896",
"0.572764",
"0.57164013",
"0.57161456",
"0.57042384",
"0.56877244",
"0.56648874",
"0.56480193",
"0.5... | 0.7747894 | 0 |
SetTimeout adds the timeout to the get platforms params | SetTimeout добавляет таймаут в параметры get platforms | func (o *GetPlatformsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *GetOperatingSystemsParams) SetTimeout(timeout time.Duration) {\n\to.timeout = timeout\n}",
"func (o *PublicWebLinkPlatformEstablishParams) SetTimeout(timeout time.Duration) {\n\to.timeout = timeout\n}",
"func (o *GetGPUArchitectureParams) SetTimeout(timeout time.Duration) {\n\to.timeout = timeout\n}",... | [
"0.7305111",
"0.72466415",
"0.71178937",
"0.7100496",
"0.69969594",
"0.6993028",
"0.6947879",
"0.6941489",
"0.69177073",
"0.6908698",
"0.6838413",
"0.6813882",
"0.6804481",
"0.6794519",
"0.67828983",
"0.67797804",
"0.67492235",
"0.6746541",
"0.67458135",
"0.67379045",
"0.6735... | 0.8151992 | 0 |
SetContext adds the context to the get platforms params | SetContext добавляет контекст к параметрам get platforms | func (o *GetPlatformsParams) SetContext(ctx context.Context) {
o.Context = ctx
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *GetGPUArchitectureParams) SetContext(ctx context.Context) {\n\to.Context = ctx\n}",
"func (o *PublicWebLinkPlatformEstablishParams) SetContext(ctx context.Context) {\n\to.Context = ctx\n}",
"func (o *GetaspecificPbxDeviceFirmwareBinaryParams) SetContext(ctx context.Context) {\n\to.Context = ctx\n}",
... | [
"0.6786597",
"0.6569877",
"0.6501057",
"0.6415769",
"0.64072716",
"0.6354175",
"0.63233936",
"0.63068795",
"0.63018876",
"0.6285175",
"0.6277759",
"0.6277518",
"0.627217",
"0.6267961",
"0.6259615",
"0.6256487",
"0.62138826",
"0.6211839",
"0.6208424",
"0.6195113",
"0.6182538",... | 0.7558212 | 0 |
WithHTTPClient adds the HTTPClient to the get platforms params | WithHTTPClient добавляет HTTPClient в параметры get platforms | func (o *GetPlatformsParams) WithHTTPClient(client *http.Client) *GetPlatformsParams {
o.SetHTTPClient(client)
return o
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *GetPlatformsParams) SetHTTPClient(client *http.Client) {\n\to.HTTPClient = client\n}",
"func NewGetPlatformsParamsWithHTTPClient(client *http.Client) *GetPlatformsParams {\n\tvar ()\n\treturn &GetPlatformsParams{\n\t\tHTTPClient: client,\n\t}\n}",
"func (o *GetBundleByKeyParams) SetHTTPClient(client *... | [
"0.74874324",
"0.67684495",
"0.6612133",
"0.66043484",
"0.65645367",
"0.6550549",
"0.6467634",
"0.64491713",
"0.64115715",
"0.6409021",
"0.63899356",
"0.63747627",
"0.6371442",
"0.635973",
"0.6344963",
"0.6342673",
"0.63373876",
"0.6336873",
"0.63319355",
"0.63319236",
"0.633... | 0.75234395 | 0 |
SetHTTPClient adds the HTTPClient to the get platforms params | SetHTTPClient добавляет HTTPClient в параметры get platforms | func (o *GetPlatformsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *GetGPUArchitectureParams) SetHTTPClient(client *http.Client) {\n\to.HTTPClient = client\n}",
"func (o *GetBundleByKeyParams) SetHTTPClient(client *http.Client) {\n\to.HTTPClient = client\n}",
"func (o *PublicWebLinkPlatformEstablishParams) SetHTTPClient(client *http.Client) {\n\to.HTTPClient = client\... | [
"0.7773785",
"0.76442534",
"0.76175207",
"0.76163924",
"0.7615906",
"0.7574128",
"0.75327814",
"0.75107133",
"0.7496636",
"0.7492477",
"0.74772483",
"0.7469208",
"0.74516153",
"0.7449262",
"0.74492323",
"0.7444003",
"0.744089",
"0.74403507",
"0.7437406",
"0.7435754",
"0.74265... | 0.8377742 | 0 |
WithExtended adds the extended to the get platforms params | WithExtended добавляет расширенное к параметрам get platforms | func (o *GetPlatformsParams) WithExtended(extended *bool) *GetPlatformsParams {
o.SetExtended(extended)
return o
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *GetPlatformsParams) SetExtended(extended *bool) {\n\to.Extended = extended\n}",
"func (b *MessagesGetHistoryBuilder) Extended(v bool) *MessagesGetHistoryBuilder {\n\tb.Params[\"extended\"] = v\n\treturn b\n}",
"func (b *MessagesGetByIDBuilder) Extended(v bool) *MessagesGetByIDBuilder {\n\tb.Params[\"e... | [
"0.761028",
"0.563234",
"0.56002456",
"0.5536339",
"0.5500236",
"0.5369291",
"0.507227",
"0.5051095",
"0.49456128",
"0.49286032",
"0.49263084",
"0.49066523",
"0.4895168",
"0.48209637",
"0.4819409",
"0.47902983",
"0.4787378",
"0.47806302",
"0.4741045",
"0.47262233",
"0.4717741... | 0.7949409 | 0 |
SetExtended adds the extended to the get platforms params | SetExtended добавляет расширенное к параметрам платформ для получения | func (o *GetPlatformsParams) SetExtended(extended *bool) {
o.Extended = extended
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *GetPlatformsParams) WithExtended(extended *bool) *GetPlatformsParams {\n\to.SetExtended(extended)\n\treturn o\n}",
"func (o *VulnerabilitiesRequest) SetExtended(v bool) {\n\to.Extended = &v\n}",
"func (b *MessagesGetHistoryBuilder) Extended(v bool) *MessagesGetHistoryBuilder {\n\tb.Params[\"extended\"... | [
"0.71823275",
"0.6650728",
"0.5868713",
"0.5740037",
"0.57266814",
"0.55311686",
"0.53988254",
"0.53365576",
"0.5276123",
"0.51772213",
"0.5176059",
"0.51389223",
"0.51068175",
"0.5083746",
"0.5057755",
"0.5052479",
"0.49989742",
"0.49774477",
"0.49474514",
"0.4946438",
"0.48... | 0.8300686 | 0 |
ListMetricEquipAttr implements Licence ListMetricEquipAttr function | ListMetricEquipAttr реализует функцию Licence ListMetricEquipAttr | func (l *LicenseRepository) ListMetricEquipAttr(ctx context.Context, scopes ...string) ([]*v1.MetricEquipAttrStand, error) {
respJSON, err := l.listMetricWithMetricType(ctx, v1.MetricEquipAttrStandard, scopes...)
if err != nil {
logger.Log.Error("dgraph/ListMetricEquipAttr - listMetricWithMetricType", zap.Error(err... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func cmdAttributeList(c *cli.Context) error {\n\tif err := adm.VerifyNoArgument(c); err != nil {\n\t\treturn err\n\t}\n\n\treturn adm.Perform(`get`, `/attribute/`, `list`, nil, c)\n}",
"func AttributeList(attr int32) (list map[string]int32) {\n\tlist = map[string]int32{}\n\tfor bit, name := range VideoAttribute ... | [
"0.58724934",
"0.5863162",
"0.57436544",
"0.57390493",
"0.54155165",
"0.5408128",
"0.5230414",
"0.51869965",
"0.51444864",
"0.51340497",
"0.50995654",
"0.5063905",
"0.50034463",
"0.4998801",
"0.4996387",
"0.4985066",
"0.49573505",
"0.4939282",
"0.4936213",
"0.4924132",
"0.490... | 0.8314187 | 0 |
CheckCookie mocks base method | CheckCookie имитирует базовый метод | func (m *MockServiceAuth) CheckCookie(arg0 echo.Context) (int64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CheckCookie", arg0)
ret0, _ := ret[0].(int64)
ret1, _ := ret[1].(error)
return ret0, ret1
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (c *Checker) HasCookie(key, expectedValue string) *Checker {\n\tvalue, exists := c.cookies[key]\n\tassert.True(c.t, exists && expectedValue == value)\n\treturn c\n}",
"func getCookie(r *http.Request, cookiename string) (bool, *http.Cookie) {\n // Ignoring error value because it is likely that the cookie ... | [
"0.612215",
"0.6105234",
"0.60702807",
"0.60390204",
"0.59975195",
"0.59955245",
"0.5935115",
"0.5835304",
"0.582638",
"0.5762133",
"0.5701",
"0.5612771",
"0.5557298",
"0.5547791",
"0.5532456",
"0.55284435",
"0.55165887",
"0.551043",
"0.5466343",
"0.5459785",
"0.54391205",
... | 0.731943 | 0 |
Login mocks base method | Метод логина мокирует базовый метод | func (m *MockServiceAuth) Login(arg0 models.UserInputLogin) (models.UserSession, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Login", arg0)
ret0, _ := ret[0].(models.UserSession)
ret1, _ := ret[1].(error)
return ret0, ret1
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (m *MockHandler) Login(arg0 http.ResponseWriter, arg1 *http.Request) {\n\tm.ctrl.T.Helper()\n\tm.ctrl.Call(m, \"Login\", arg0, arg1)\n}",
"func (m *MockAuthService) Login(arg0 http.ResponseWriter, arg1 *http.Request) {\n\tm.ctrl.T.Helper()\n\tm.ctrl.Call(m, \"Login\", arg0, arg1)\n}",
"func TestLogin(w ht... | [
"0.7183621",
"0.71248025",
"0.6753659",
"0.6664102",
"0.6646322",
"0.66238445",
"0.661635",
"0.66042656",
"0.65960777",
"0.65740645",
"0.65580904",
"0.64773464",
"0.64741534",
"0.6403498",
"0.6395945",
"0.6352871",
"0.63038814",
"0.62659204",
"0.6252402",
"0.6243144",
"0.6224... | 0.7311137 | 0 |
Registration indicates an expected call of Registration | Регистрация указывает на ожидаемый вызов Регистрации | func (mr *MockServiceAuthMockRecorder) Registration(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Registration", reflect.TypeOf((*MockServiceAuth)(nil).Registration), arg0)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (_DelegateProfile *DelegateProfileCaller) Registered(opts *bind.CallOpts, _addr common.Address) (bool, error) {\n\tvar (\n\t\tret0 = new(bool)\n\t)\n\tout := ret0\n\terr := _DelegateProfile.contract.Call(opts, out, \"registered\", _addr)\n\treturn *ret0, err\n}",
"func (s SwxProxy) Register(_ context.Contex... | [
"0.6324035",
"0.6104856",
"0.60354984",
"0.6025592",
"0.59889084",
"0.5973536",
"0.595364",
"0.5939176",
"0.59270525",
"0.59216005",
"0.5921067",
"0.5891129",
"0.5848316",
"0.5830676",
"0.58157265",
"0.58123446",
"0.58084095",
"0.57710874",
"0.57505393",
"0.5747051",
"0.57046... | 0.7010462 | 0 |
Popup is a wrapper around gtk_popover_popup(). | Popup — это обертка вокруг gtk_popover_popup(). | func (v *Popover) Popup() {
C.gtk_popover_popup(v.native())
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (v *Popover) Popdown() {\n\tC.gtk_popover_popdown(v.native())\n}",
"func Popup(name string) *PopupWidget {\n\treturn &PopupWidget{\n\t\tname: Context.FontAtlas.RegisterString(name),\n\t\tflags: 0,\n\t\tlayout: nil,\n\t}\n}",
"func NewPopupMenu(parent Widget, b Base, mo ...MenuOption) *PopupMenu {\n\tpm... | [
"0.7245628",
"0.67946184",
"0.671131",
"0.6632335",
"0.63890284",
"0.58852094",
"0.58588827",
"0.5829165",
"0.57027376",
"0.5697189",
"0.5695752",
"0.5623324",
"0.5471221",
"0.54265916",
"0.5425965",
"0.5336367",
"0.5220583",
"0.51320916",
"0.5081396",
"0.48694453",
"0.486944... | 0.8746411 | 0 |
Popdown is a wrapper around gtk_popover_popdown(). | Popdown — это обертка вокруг gtk_popover_popdown(). | func (v *Popover) Popdown() {
C.gtk_popover_popdown(v.native())
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (v *Popover) Popup() {\n\tC.gtk_popover_popup(v.native())\n}",
"func NewPopupMenu(parent Widget, b Base, mo ...MenuOption) *PopupMenu {\n\tpm := &PopupMenu{\n\t\tPanel: NewPanel(nil, b),\n\t}\n\tInitWidget(parent, pm)\n\tpad := pm.MyTheme().Pad\n\tbtH := b.Rect.H() - pad\n\tbtW := b.Rect.W() - pad*2\n\tpm.R... | [
"0.771435",
"0.6271339",
"0.6096663",
"0.60613847",
"0.58930135",
"0.5520053",
"0.5439196",
"0.51506114",
"0.51457214",
"0.510715",
"0.50609976",
"0.50515825",
"0.50288045",
"0.49635243",
"0.49324164",
"0.48336193",
"0.4772766",
"0.4770371",
"0.4765281",
"0.47626668",
"0.4761... | 0.89984757 | 0 |
/ GtkFileChooser AddChoice is a wrapper around gtk_file_chooser_add_choice(). | GtkFileChooser AddChoice — это обертка вокруг gtk_file_chooser_add_choice(). | func (v *FileChooser) AddChoice(id, label string, options, optionLabels []string) {
cId := C.CString(id)
defer C.free(unsafe.Pointer(cId))
cLabel := C.CString(label)
defer C.free(unsafe.Pointer(cLabel))
if options == nil || optionLabels == nil {
C.gtk_file_chooser_add_choice(v.native(), (*C.gchar)(cId), (*C.gc... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (v *FileChooser) SetChoice(id, option string) {\n\tcId := C.CString(id)\n\tdefer C.free(unsafe.Pointer(cId))\n\tcOption := C.CString(option)\n\tdefer C.free(unsafe.Pointer(cOption))\n\tC.gtk_file_chooser_set_choice(v.native(), (*C.gchar)(cId), (*C.gchar)(cOption))\n}",
"func (v *FileChooser) GetChoice(id st... | [
"0.67540985",
"0.6272586",
"0.5666724",
"0.53501856",
"0.5213042",
"0.5131987",
"0.5029371",
"0.49853897",
"0.49848685",
"0.4980705",
"0.49217358",
"0.48278055",
"0.48229167",
"0.48218247",
"0.46595183",
"0.4618801",
"0.4616831",
"0.45478475",
"0.45407698",
"0.45162332",
"0.4... | 0.8392795 | 0 |
RemoveChoice is a wrapper around gtk_file_chooser_remove_choice(). | RemoveChoice — это обертка вокруг gtk_file_chooser_remove_choice(). | func (v *FileChooser) RemoveChoice(id string) {
cId := C.CString(id)
defer C.free(unsafe.Pointer(cId))
C.gtk_file_chooser_remove_choice(v.native(), (*C.gchar)(cId))
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (v *FileChooser) GetChoice(id string) string {\n\tcId := C.CString(id)\n\tdefer C.free(unsafe.Pointer(cId))\n\tc := C.gtk_file_chooser_get_choice(v.native(), (*C.gchar)(cId))\n\treturn C.GoString(c)\n}",
"func (v *FileChooser) SetChoice(id, option string) {\n\tcId := C.CString(id)\n\tdefer C.free(unsafe.Poi... | [
"0.533146",
"0.5215007",
"0.5209094",
"0.49791583",
"0.49628338",
"0.49071372",
"0.48017108",
"0.478262",
"0.46966022",
"0.4593523",
"0.45922872",
"0.45756906",
"0.45345142",
"0.451024",
"0.45045552",
"0.44789824",
"0.4443359",
"0.44415736",
"0.44238982",
"0.44187573",
"0.440... | 0.86442417 | 0 |
SetChoice is a wrapper around gtk_file_chooser_set_choice(). | SetChoice — это обертка вокруг gtk_file_chooser_set_choice(). | func (v *FileChooser) SetChoice(id, option string) {
cId := C.CString(id)
defer C.free(unsafe.Pointer(cId))
cOption := C.CString(option)
defer C.free(unsafe.Pointer(cOption))
C.gtk_file_chooser_set_choice(v.native(), (*C.gchar)(cId), (*C.gchar)(cOption))
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (v *FileChooser) AddChoice(id, label string, options, optionLabels []string) {\n\tcId := C.CString(id)\n\tdefer C.free(unsafe.Pointer(cId))\n\n\tcLabel := C.CString(label)\n\tdefer C.free(unsafe.Pointer(cLabel))\n\n\tif options == nil || optionLabels == nil {\n\t\tC.gtk_file_chooser_add_choice(v.native(), (*C... | [
"0.6469274",
"0.6148542",
"0.6068018",
"0.5769264",
"0.57536185",
"0.56970453",
"0.5626628",
"0.55424106",
"0.51889265",
"0.51361847",
"0.51076907",
"0.5051737",
"0.49173164",
"0.4893991",
"0.4842663",
"0.4834679",
"0.47279584",
"0.46964598",
"0.4682138",
"0.4653016",
"0.4625... | 0.86250484 | 0 |
GetChoice is a wrapper around gtk_file_chooser_get_choice(). | GetChoice — это обертка вокруг gtk_file_chooser_get_choice(). | func (v *FileChooser) GetChoice(id string) string {
cId := C.CString(id)
defer C.free(unsafe.Pointer(cId))
c := C.gtk_file_chooser_get_choice(v.native(), (*C.gchar)(cId))
return C.GoString(c)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (v *FileChooser) SetChoice(id, option string) {\n\tcId := C.CString(id)\n\tdefer C.free(unsafe.Pointer(cId))\n\tcOption := C.CString(option)\n\tdefer C.free(unsafe.Pointer(cOption))\n\tC.gtk_file_chooser_set_choice(v.native(), (*C.gchar)(cId), (*C.gchar)(cOption))\n}",
"func Choice(m string, exacts []string... | [
"0.5884683",
"0.5797472",
"0.5483212",
"0.5472473",
"0.54234344",
"0.53660977",
"0.5348636",
"0.5299239",
"0.52480185",
"0.5243561",
"0.52337843",
"0.5179653",
"0.5166573",
"0.51321834",
"0.5097163",
"0.4941595",
"0.48885983",
"0.48517326",
"0.48319155",
"0.4736443",
"0.47352... | 0.8411069 | 0 |
/ GtkScrolledWindow GetMaxContentWidth is a wrapper around gtk_scrolled_window_get_max_content_width(). | GtkScrolledWindow GetMaxContentWidth — это обертка вокруг gtk_scrolled_window_get_max_content_width(). | func (v *ScrolledWindow) GetMaxContentWidth() int {
c := C.gtk_scrolled_window_get_max_content_width(v.native())
return int(c)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (v *ScrolledWindow) GetMaxContentHeight() int {\n\tc := C.gtk_scrolled_window_get_max_content_height(v.native())\n\treturn int(c)\n}",
"func (v *ScrolledWindow) SetMaxContentWidth(width int) {\n\tC.gtk_scrolled_window_set_max_content_width(v.native(), C.gint(width))\n}",
"func (v *ScrolledWindow) SetMaxCo... | [
"0.7802157",
"0.7460506",
"0.66026855",
"0.6217259",
"0.584643",
"0.57835525",
"0.5716844",
"0.56006247",
"0.5530119",
"0.5475368",
"0.5411298",
"0.538574",
"0.53694135",
"0.53360945",
"0.53360945",
"0.5301836",
"0.52574384",
"0.52144426",
"0.5204811",
"0.51416606",
"0.512083... | 0.8826436 | 0 |
SetMaxContentWidth is a wrapper around gtk_scrolled_window_set_max_content_width(). | SetMaxContentWidth — это обертка вокруг gtk_scrolled_window_set_max_content_width(). | func (v *ScrolledWindow) SetMaxContentWidth(width int) {
C.gtk_scrolled_window_set_max_content_width(v.native(), C.gint(width))
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (v *ScrolledWindow) SetMaxContentHeight(width int) {\n\tC.gtk_scrolled_window_set_max_content_height(v.native(), C.gint(width))\n}",
"func (v *ScrolledWindow) GetMaxContentWidth() int {\n\tc := C.gtk_scrolled_window_get_max_content_width(v.native())\n\treturn int(c)\n}",
"func (v *ScrolledWindow) GetMaxCo... | [
"0.7728575",
"0.7647834",
"0.65633065",
"0.6101868",
"0.55851233",
"0.5574874",
"0.55399346",
"0.54410404",
"0.53355515",
"0.5113834",
"0.505512",
"0.49563086",
"0.49242747",
"0.48697284",
"0.48511386",
"0.48052323",
"0.47839496",
"0.47761905",
"0.4729902",
"0.47225168",
"0.4... | 0.8705722 | 0 |
GetMaxContentHeight is a wrapper around gtk_scrolled_window_get_max_content_height(). | GetMaxContentHeight является обёрткой вокруг gtk_scrolled_window_get_max_content_height(). | func (v *ScrolledWindow) GetMaxContentHeight() int {
c := C.gtk_scrolled_window_get_max_content_height(v.native())
return int(c)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (v *ScrolledWindow) GetMaxContentWidth() int {\n\tc := C.gtk_scrolled_window_get_max_content_width(v.native())\n\treturn int(c)\n}",
"func (v *ScrolledWindow) SetMaxContentHeight(width int) {\n\tC.gtk_scrolled_window_set_max_content_height(v.native(), C.gint(width))\n}",
"func (v *ScrolledWindow) SetMaxCo... | [
"0.80224156",
"0.738089",
"0.6511789",
"0.575716",
"0.5734719",
"0.5732532",
"0.5663143",
"0.55172205",
"0.54255056",
"0.5353016",
"0.53288096",
"0.5287494",
"0.5258306",
"0.5254579",
"0.5203907",
"0.5163954",
"0.5143804",
"0.51205325",
"0.5093301",
"0.50751376",
"0.5039852",... | 0.9018182 | 0 |
SetMaxContentHeight is a wrapper around gtk_scrolled_window_set_max_content_height(). | SetMaxContentHeight — это обертка вокруг gtk_scrolled_window_set_max_content_height(). | func (v *ScrolledWindow) SetMaxContentHeight(width int) {
C.gtk_scrolled_window_set_max_content_height(v.native(), C.gint(width))
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (v *ScrolledWindow) SetMaxContentWidth(width int) {\n\tC.gtk_scrolled_window_set_max_content_width(v.native(), C.gint(width))\n}",
"func (v *ScrolledWindow) GetMaxContentHeight() int {\n\tc := C.gtk_scrolled_window_get_max_content_height(v.native())\n\treturn int(c)\n}",
"func (v *ScrolledWindow) GetMaxCo... | [
"0.8023439",
"0.7892212",
"0.7063212",
"0.59386873",
"0.5932504",
"0.52396935",
"0.5048182",
"0.5048182",
"0.50402075",
"0.5032491",
"0.5004204",
"0.5002754",
"0.49823657",
"0.49187666",
"0.49154866",
"0.48963708",
"0.48863816",
"0.4872838",
"0.48663074",
"0.48459524",
"0.484... | 0.87742 | 0 |
GetPropagateNaturalWidth is a wrapper around gtk_scrolled_window_get_propagate_natural_width(). | GetPropagateNaturalWidth — это обертка вокруг gtk_scrolled_window_get_propagate_natural_width(). | func (v *ScrolledWindow) GetPropagateNaturalWidth() bool {
c := C.gtk_scrolled_window_get_propagate_natural_width(v.native())
return gobool(c)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (v *ScrolledWindow) SetPropagateNaturalWidth(propagate bool) {\n\tC.gtk_scrolled_window_set_propagate_natural_width(v.native(), gbool(propagate))\n}",
"func (v *ScrolledWindow) GetPropagateNaturalHeight() bool {\n\tc := C.gtk_scrolled_window_get_propagate_natural_height(v.native())\n\treturn gobool(c)\n}",
... | [
"0.81382954",
"0.74754125",
"0.6816626",
"0.5524392",
"0.55122465",
"0.53927827",
"0.51792467",
"0.5166886",
"0.510769",
"0.5031366",
"0.48824355",
"0.48683724",
"0.47451147",
"0.47078547",
"0.46988234",
"0.4590461",
"0.45584512",
"0.4545798",
"0.44968885",
"0.44810912",
"0.4... | 0.87654483 | 0 |
SetPropagateNaturalWidth is a wrapper around gtk_scrolled_window_set_propagate_natural_width(). | SetPropagateNaturalWidth является обёрткой вокруг gtk_scrolled_window_set_propagate_natural_width(). | func (v *ScrolledWindow) SetPropagateNaturalWidth(propagate bool) {
C.gtk_scrolled_window_set_propagate_natural_width(v.native(), gbool(propagate))
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (v *ScrolledWindow) SetPropagateNaturalHeight(propagate bool) {\n\tC.gtk_scrolled_window_set_propagate_natural_height(v.native(), gbool(propagate))\n}",
"func (v *ScrolledWindow) GetPropagateNaturalWidth() bool {\n\tc := C.gtk_scrolled_window_get_propagate_natural_width(v.native())\n\treturn gobool(c)\n}",
... | [
"0.7961128",
"0.79388314",
"0.6707606",
"0.5346279",
"0.47825405",
"0.4755107",
"0.46057013",
"0.45764875",
"0.45117897",
"0.4315776",
"0.42900914",
"0.4247731",
"0.42211503",
"0.42068702",
"0.42030233",
"0.4134348",
"0.41119507",
"0.4108613",
"0.4049972",
"0.40450892",
"0.40... | 0.91999835 | 0 |
GetPropagateNaturalHeight is a wrapper around gtk_scrolled_window_get_propagate_natural_height(). | GetPropagateNaturalHeight — это обертка вокруг gtk_scrolled_window_get_propagate_natural_height(). | func (v *ScrolledWindow) GetPropagateNaturalHeight() bool {
c := C.gtk_scrolled_window_get_propagate_natural_height(v.native())
return gobool(c)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (v *ScrolledWindow) SetPropagateNaturalHeight(propagate bool) {\n\tC.gtk_scrolled_window_set_propagate_natural_height(v.native(), gbool(propagate))\n}",
"func (v *ScrolledWindow) GetPropagateNaturalWidth() bool {\n\tc := C.gtk_scrolled_window_get_propagate_natural_width(v.native())\n\treturn gobool(c)\n}",
... | [
"0.7887868",
"0.74162084",
"0.6701644",
"0.5282257",
"0.51819026",
"0.5121254",
"0.501534",
"0.4822917",
"0.47664776",
"0.4716606",
"0.46773928",
"0.46360207",
"0.46136078",
"0.45566",
"0.45110223",
"0.45107284",
"0.44809556",
"0.4468844",
"0.4460032",
"0.4425723",
"0.4416638... | 0.88503075 | 0 |
SetPropagateNaturalHeight is a wrapper around gtk_scrolled_window_set_propagate_natural_height(). | SetPropagateNaturalHeight — это обертка вокруг gtk_scrolled_window_set_propagate_natural_height(). | func (v *ScrolledWindow) SetPropagateNaturalHeight(propagate bool) {
C.gtk_scrolled_window_set_propagate_natural_height(v.native(), gbool(propagate))
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (v *ScrolledWindow) GetPropagateNaturalHeight() bool {\n\tc := C.gtk_scrolled_window_get_propagate_natural_height(v.native())\n\treturn gobool(c)\n}",
"func (v *ScrolledWindow) SetPropagateNaturalWidth(propagate bool) {\n\tC.gtk_scrolled_window_set_propagate_natural_width(v.native(), gbool(propagate))\n}",
... | [
"0.8024622",
"0.7986467",
"0.6738286",
"0.48992896",
"0.46789613",
"0.45104513",
"0.44237876",
"0.43279177",
"0.42821398",
"0.42359063",
"0.41540527",
"0.4000865",
"0.39987636",
"0.397609",
"0.39755943",
"0.39618266",
"0.39565128",
"0.3954699",
"0.39486593",
"0.39300218",
"0.... | 0.91302776 | 0 |
Post is post message to slack | Post — отправить сообщение в slack | func (s *Slack) Post(msg Message) (err error) {
b, err := json.Marshal(msg)
if err != nil {
return err
}
buf := bytes.NewBuffer(b)
req, err := http.NewRequest("POST", s.URL, buf)
if err != nil {
return errors.Wrap(err, "Can't make new request")
}
req.Header.Set("User-Agent", "Mozilla/5.0 (Windows; U; Win... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (s SlackReporter) Post(ctx context.Context, msg string) (string, error) {\n\t_, ts, err := s.api.PostMessageContext(ctx, s.channel, slack.MsgOptionText(msg, false))\n\treturn ts, err\n}",
"func (t *FakeSlackChat) postMessage(msg Message) error {\n\treturn nil\n}",
"func (s Slack) PostMessage(title string,... | [
"0.76651305",
"0.7442603",
"0.71486974",
"0.71397513",
"0.71380925",
"0.70558584",
"0.7021113",
"0.6846197",
"0.6742398",
"0.6505753",
"0.650403",
"0.6456163",
"0.63341874",
"0.63200605",
"0.6228203",
"0.62201923",
"0.61911505",
"0.6082172",
"0.6075067",
"0.60693914",
"0.6054... | 0.7452913 | 1 |
Get takes name of the cloudwatchEventTarget, and returns the corresponding cloudwatchEventTarget object, and an error if there is any. | Get получает имя целевого объекта cloudwatchEventTarget и возвращает соответствующий объект cloudwatchEventTarget и ошибку, если она есть. | func (c *FakeCloudwatchEventTargets) Get(name string, options v1.GetOptions) (result *v1alpha1.CloudwatchEventTarget, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(cloudwatcheventtargetsResource, c.ns, name), &v1alpha1.CloudwatchEventTarget{})
if obj == nil {
return nil, err
}
return obj.(*v1al... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func GetEventTarget(ctx *pulumi.Context,\n\tname string, id pulumi.IDInput, state *EventTargetState, opts ...pulumi.ResourceOption) (*EventTarget, error) {\n\tvar resource EventTarget\n\terr := ctx.ReadResource(\"aws:cloudwatch/eventTarget:EventTarget\", name, id, state, &resource, opts...)\n\tif err != nil {\n\t\... | [
"0.72349846",
"0.60446095",
"0.5682909",
"0.54533374",
"0.5292888",
"0.5286852",
"0.52845055",
"0.51380754",
"0.51060545",
"0.5100123",
"0.49953666",
"0.49781477",
"0.4978093",
"0.49507922",
"0.49051094",
"0.48928928",
"0.4878934",
"0.48690373",
"0.48504093",
"0.48341855",
"0... | 0.7304512 | 0 |
List takes label and field selectors, and returns the list of CloudwatchEventTargets that match those selectors. | Список принимает метки и селекторы полей и возвращает список CloudwatchEventTargets, соответствующих этим селекторам. | func (c *FakeCloudwatchEventTargets) List(opts v1.ListOptions) (result *v1alpha1.CloudwatchEventTargetList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(cloudwatcheventtargetsResource, cloudwatcheventtargetsKind, c.ns, opts), &v1alpha1.CloudwatchEventTargetList{})
if obj == nil {
return nil, er... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (c *FakeAWSSNSTargets) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.AWSSNSTargetList, err error) {\n\tobj, err := c.Fake.\n\t\tInvokes(testing.NewListAction(awssnstargetsResource, awssnstargetsKind, c.ns, opts), &v1alpha1.AWSSNSTargetList{})\n\n\tif obj == nil {\n\t\treturn nil, err\n\t}\n... | [
"0.61464715",
"0.56628346",
"0.56543076",
"0.54902506",
"0.5228712",
"0.52107954",
"0.51932913",
"0.5172048",
"0.5141491",
"0.51324284",
"0.5112907",
"0.5101192",
"0.50956565",
"0.5068237",
"0.50504357",
"0.50469285",
"0.50433314",
"0.502446",
"0.49555793",
"0.49431434",
"0.4... | 0.77347326 | 0 |
Watch returns a watch.Interface that watches the requested cloudwatchEventTargets. | Watch возвращает интерфейс watch.Interface, который наблюдает за запрошенными cloudwatchEventTargets. | func (c *FakeCloudwatchEventTargets) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(cloudwatcheventtargetsResource, c.ns, opts))
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (c *ConsulClient) Watch(ctx context.Context, wh *WatchConfig) (IWatcher, error) {\n\tregistryOperationCount.WithLabelValues(env, \"Watch\").Inc()\n\n\tstartTime := time.Now()\n\tdefer func() {\n\t\tregistryOperationTimeTaken.WithLabelValues(env, \"Watch\").Observe(time.Now().Sub(startTime).Seconds())\n\t}()\n... | [
"0.5909597",
"0.59083927",
"0.5884586",
"0.58768004",
"0.58135056",
"0.5808285",
"0.5632079",
"0.5628538",
"0.5565414",
"0.55580974",
"0.5540909",
"0.5540064",
"0.55053604",
"0.55044025",
"0.55031914",
"0.5497162",
"0.54961246",
"0.5490093",
"0.5444556",
"0.5431618",
"0.54204... | 0.74523795 | 0 |
Create takes the representation of a cloudwatchEventTarget and creates it. Returns the server's representation of the cloudwatchEventTarget, and an error, if there is any. | Create принимает представление cloudwatchEventTarget и создаёт его. Возвращает представление cloudwatchEventTarget, предоставленное сервером, и ошибку, если она есть. | func (c *FakeCloudwatchEventTargets) Create(cloudwatchEventTarget *v1alpha1.CloudwatchEventTarget) (result *v1alpha1.CloudwatchEventTarget, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(cloudwatcheventtargetsResource, c.ns, cloudwatchEventTarget), &v1alpha1.CloudwatchEventTarget{})
if obj == nil... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func NewEventTarget(ctx *pulumi.Context,\n\tname string, args *EventTargetArgs, opts ...pulumi.ResourceOption) (*EventTarget, error) {\n\tif args == nil || args.Arn == nil {\n\t\treturn nil, errors.New(\"missing required argument 'Arn'\")\n\t}\n\tif args == nil || args.Rule == nil {\n\t\treturn nil, errors.New(\"m... | [
"0.687223",
"0.5633696",
"0.5631251",
"0.538129",
"0.5321042",
"0.529999",
"0.5294296",
"0.5265981",
"0.5259876",
"0.5250571",
"0.52373767",
"0.52258664",
"0.52252287",
"0.52154547",
"0.5198454",
"0.5183503",
"0.5154956",
"0.5070703",
"0.50693345",
"0.5064346",
"0.5045063",
... | 0.7889584 | 0 |
Update takes the representation of a cloudwatchEventTarget and updates it. Returns the server's representation of the cloudwatchEventTarget, and an error, if there is any. | Update принимает представление cloudwatchEventTarget и обновляет его. Возвращает представление cloudwatchEventTarget, предоставленное сервером, и ошибку, если она есть. | func (c *FakeCloudwatchEventTargets) Update(cloudwatchEventTarget *v1alpha1.CloudwatchEventTarget) (result *v1alpha1.CloudwatchEventTarget, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(cloudwatcheventtargetsResource, c.ns, cloudwatchEventTarget), &v1alpha1.CloudwatchEventTarget{})
if obj == nil... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (c *FakeCloudwatchEventTargets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.CloudwatchEventTarget, err error) {\n\tobj, err := c.Fake.\n\t\tInvokes(testing.NewPatchSubresourceAction(cloudwatcheventtargetsResource, c.ns, name, pt, data, subresources...), &v1alp... | [
"0.5389559",
"0.5306597",
"0.51904404",
"0.515413",
"0.5118005",
"0.5084545",
"0.50144255",
"0.49988312",
"0.4901944",
"0.48523718",
"0.483984",
"0.48148668",
"0.4811473",
"0.47936144",
"0.47582054",
"0.47557688",
"0.4751602",
"0.47373387",
"0.46917793",
"0.46882197",
"0.4630... | 0.7178435 | 0 |
Delete takes name of the cloudwatchEventTarget and deletes it. Returns an error if one occurs. | Delete удаляет имя целевого объекта cloudwatchEventTarget и удаляет его. Возвращает ошибку, если она возникает. | func (c *FakeCloudwatchEventTargets) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(cloudwatcheventtargetsResource, c.ns, name), &v1alpha1.CloudwatchEventTarget{})
return err
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (e *EventAPI) Delete(name string) error {\n\treturn e.client.httpDELETE(e.backOffConf.create(), e.eventURL(name), \"unable to delete event type\")\n}",
"func (w *Watcher) DeleteTarget(targetName string) (error) {\n\tmutableMutex.Lock()\n\tdefer mutableMutex.Unlock()\n\tif w.TargetMap == nil {\n\t\tw.TargetM... | [
"0.6356107",
"0.57694995",
"0.5659969",
"0.56342745",
"0.5527379",
"0.5476646",
"0.54259104",
"0.5411367",
"0.53984815",
"0.539605",
"0.5359793",
"0.5313885",
"0.52959067",
"0.5263439",
"0.5223835",
"0.51805806",
"0.51521486",
"0.51521426",
"0.51359683",
"0.5103432",
"0.50982... | 0.703014 | 0 |
Patch applies the patch and returns the patched cloudwatchEventTarget. | Патч применяет патч и возвращает отремонтированный cloudwatchEventTarget. | func (c *FakeCloudwatchEventTargets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.CloudwatchEventTarget, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(cloudwatcheventtargetsResource, c.ns, name, pt, data, subresources...), &v1alpha1.Cloudw... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (c *FakeCloudwatchEventTargets) Update(cloudwatchEventTarget *v1alpha1.CloudwatchEventTarget) (result *v1alpha1.CloudwatchEventTarget, err error) {\n\tobj, err := c.Fake.\n\t\tInvokes(testing.NewUpdateAction(cloudwatcheventtargetsResource, c.ns, cloudwatchEventTarget), &v1alpha1.CloudwatchEventTarget{})\n\n\t... | [
"0.5266063",
"0.49771908",
"0.48856008",
"0.47132525",
"0.4605321",
"0.45569208",
"0.4526433",
"0.44783974",
"0.44632348",
"0.44467813",
"0.44410396",
"0.434499",
"0.4281584",
"0.42695108",
"0.42690158",
"0.42472798",
"0.4209925",
"0.4201461",
"0.41979274",
"0.4197556",
"0.41... | 0.7371751 | 0 |
JSON jsonified content message. | Сообщение с jsonified содержимым JSON. | func (c contentMessage) JSON() string {
c.Status = "success"
jsonMessageBytes, e := json.MarshalIndent(c, "", " ")
fatalIf(probe.NewError(e), "Unable to marshal into JSON.")
return string(jsonMessageBytes)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (msg *Message) JsonContent() (string, error) {\n\t//if msg.Content == nil {\n\t//\treturn \"\", nil\n\t//}\n\tb, err := json.Marshal(msg.Content)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn string(b), nil\n}",
"func (m lockCmdMessage) JSON() string {\n\tmsgBytes, e := json.MarshalIndent(m, \"\",... | [
"0.81981593",
"0.7193156",
"0.71297085",
"0.70724344",
"0.69950885",
"0.69847697",
"0.6969687",
"0.6947664",
"0.6947664",
"0.6902756",
"0.6756524",
"0.67506754",
"0.6678022",
"0.6643379",
"0.6576812",
"0.6566346",
"0.64627314",
"0.644587",
"0.6444574",
"0.6435986",
"0.6433906... | 0.82813597 | 1 |
parseContent parse client Content container into printer struct. | parseContent преобразует клиентский контейнер Content в структуру printer. | func parseContent(c *clientContent) contentMessage {
content := contentMessage{}
content.Time = c.Time.Local()
// guess file type.
content.Filetype = func() string {
if c.Type.IsDir() {
return "folder"
}
return "file"
}()
content.Size = c.Size
md5sum := strings.TrimPrefix(c.ETag, "\"")
md5sum = strin... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func ParseContent(content string, params Params) (string, error) {\n\tcheckAndInitDefaultView()\n\treturn defaultViewObj.ParseContent(content, params)\n}",
"func (c *GRPCClient) Content(ctx context.Context, contentPath string) (component.ContentResponse, error) {\n\tvar contentResponse component.ContentResponse\... | [
"0.57283705",
"0.56128794",
"0.55986345",
"0.55372673",
"0.54029614",
"0.5345638",
"0.5332285",
"0.5297525",
"0.5254313",
"0.5217522",
"0.51418024",
"0.5105939",
"0.509732",
"0.50940305",
"0.5086418",
"0.5086146",
"0.50813574",
"0.50558066",
"0.50556326",
"0.50510985",
"0.503... | 0.728402 | 0 |
BeforeNow checks a mm/dd/yyyy string to determine if it is before now. | BeforeNow проверяет строку в формате mm/dd/yyyy, чтобы определить, является ли она датой, предшествующей текущему моменту. | func BeforeNow(d string) bool {
f := strings.FieldsFunc(d, func(r rune) bool { return r == '/' })
t := time.Date(atoi(f[2]), time.Month(atoi(f[0])), atoi(f[1]), 0, 0, 0, 0, time.UTC)
return t.Before(time.Now())
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func ISODateStringBeforeToday(datetime string) (bool, error) {\n\tdate, err := IsoDateFormatter(datetime)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\ttoday := time.Date(time.Now().Year(), time.Now().Month(), time.Now().Day(), 0, 0, 0, 0, date.Location())\n\tif date.Before(today) {\n\t\treturn true, nil\n\t}\... | [
"0.6379344",
"0.5772175",
"0.57539195",
"0.5719056",
"0.5665737",
"0.5650461",
"0.5630643",
"0.5603314",
"0.55422056",
"0.55358124",
"0.55042726",
"0.5495403",
"0.54829955",
"0.5410564",
"0.5358622",
"0.53530425",
"0.53356326",
"0.53226084",
"0.526414",
"0.5255999",
"0.524479... | 0.83958715 | 0 |
////////////////////////////////////////////////////////////////////////////////// // IsAttachment return true if content is attachment | ////////////////////////////////////////////////////////////////////////////////// // IsAttachment возвращает true, если содержимое является вложением | func (c *Content) IsAttachment() bool {
return c.Type == CONTENT_TYPE_ATTACHMENT
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (p *Part) IsAttachment() bool {\n\tif p.gmimePart == nil {\n\t\treturn false\n\t}\n\tif !gobool(C.gmime_is_part(p.gmimePart)) || gobool(C.gmime_is_multi_part(p.gmimePart)) {\n\t\treturn false\n\t}\n\tif gobool(C.g_mime_part_is_attachment((*C.GMimePart)(unsafe.Pointer(p.gmimePart)))) {\n\t\treturn true\n\t}\n\... | [
"0.8364052",
"0.712331",
"0.6851076",
"0.6623727",
"0.65944177",
"0.63823783",
"0.6326309",
"0.62711173",
"0.61442995",
"0.61011577",
"0.60864383",
"0.60676914",
"0.60450274",
"0.59972024",
"0.5980794",
"0.5883554",
"0.5855307",
"0.583973",
"0.58200735",
"0.58034015",
"0.5758... | 0.9088709 | 0 |
IsComment return true if content is comment | IsComment возвращает true, если содержимое является комментарием | func (c *Content) IsComment() bool {
return c.Type == CONTENT_TYPE_COMMENT
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (t Type) IsComment() bool {\n\treturn comm_start < t && t < comm_end\n}",
"func isComment(s state) bool {\n\tswitch s {\n\tcase stateHTMLCmt, stateJSBlockCmt, stateJSLineCmt, stateCSSBlockCmt, stateCSSLineCmt:\n\t\treturn true\n\t}\n\treturn false\n}",
"func (t Token) IsComment() bool {\n\treturn t.Kind =... | [
"0.8070134",
"0.78601515",
"0.7623746",
"0.7510202",
"0.7351018",
"0.7310748",
"0.69591284",
"0.6869606",
"0.6863134",
"0.6551534",
"0.64144266",
"0.6250492",
"0.6241997",
"0.62200755",
"0.61377007",
"0.6091443",
"0.6089278",
"0.6064151",
"0.6043184",
"0.60294676",
"0.6027368... | 0.85867846 | 0 |
IsPage return true if content is page | IsPage возвращает true, если содержимое является страницей | func (c *Content) IsPage() bool {
return c.Type == CONTENT_TYPE_PAGE
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (c *Container) IsPage() bool {\n\treturn c.Title != \"\"\n}",
"func (si *StructInfo) IsPage() bool {\n\treturn si.Kind == core.PAGE\n}",
"func (p Page) inPage(s string) bool {\n\tfor _, v := range p.Links {\n\t\tif s == v.Url.String() || v.Url.String()+\"/\" == s {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn... | [
"0.8182451",
"0.72458345",
"0.6284937",
"0.62021935",
"0.6069874",
"0.5863453",
"0.5849004",
"0.5813375",
"0.5769847",
"0.57443935",
"0.5733453",
"0.57127947",
"0.56711227",
"0.5647718",
"0.5588009",
"0.55775696",
"0.55400574",
"0.553223",
"0.55277514",
"0.5482119",
"0.548072... | 0.8657112 | 0 |
IsTrashed return true if content is trashed | IsTrashed возвращает true, если содержимое помечено как удалённое | func (c *Content) IsTrashed() bool {
return c.Status == CONTENT_STATUS_TRASHED
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *TrashStructureApplication) HasTrashed() bool {\n\tif o != nil && !IsNil(o.Trashed) {\n\t\treturn true\n\t}\n\n\treturn false\n}",
"func (o *TrashStructureApplication) GetTrashed() bool {\n\tif o == nil || IsNil(o.Trashed) {\n\t\tvar ret bool\n\t\treturn ret\n\t}\n\treturn *o.Trashed\n}",
"func (o *Tra... | [
"0.67762494",
"0.67077285",
"0.6215999",
"0.5996488",
"0.5649976",
"0.533048",
"0.53276575",
"0.5198325",
"0.5166646",
"0.51392007",
"0.50936794",
"0.5033882",
"0.49881992",
"0.49692014",
"0.49692014",
"0.48998713",
"0.48027912",
"0.4781283",
"0.47776878",
"0.47514683",
"0.47... | 0.8638603 | 0 |
IsDraft return true if content is draft | IsDraft возвращает true, если содержимое является черновиком | func (c *Content) IsDraft() bool {
return c.Status == CONTENT_STATUS_DRAFT
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (m *ModelStatus) IsDraft() bool {\n\treturn m.Status == Draft\n}",
"func IsDraft(source string) bool {\n\treturn strings.Contains(filepath.Base(filepath.Dir(source)), \"drafts\")\n}",
"func (r *RepositoryRelease) GetDraft() bool {\n\tif r == nil || r.Draft == nil {\n\t\treturn false\n\t}\n\treturn *r.Draf... | [
"0.76661915",
"0.72118825",
"0.62594146",
"0.60783345",
"0.57742465",
"0.5612218",
"0.5590993",
"0.5470714",
"0.53782576",
"0.5354119",
"0.5348146",
"0.5320405",
"0.5315136",
"0.52890354",
"0.5246484",
"0.52413845",
"0.52356356",
"0.5234108",
"0.52093893",
"0.52065074",
"0.51... | 0.86880225 | 0 |
IsGlobal return true if space is global | IsGlobal возвращает true, если пространство глобальное | func (s *Space) IsGlobal() bool {
return s.Type == SPACE_TYPE_GLOBAL
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (TypesObject) IsGlobal() bool { return boolResult }",
"func (o *RiskRulesListAllOfData) HasIsGlobal() bool {\n\tif o != nil && !IsNil(o.IsGlobal) {\n\t\treturn true\n\t}\n\n\treturn false\n}",
"func IsObjectGlobal(obj *metav1.ObjectMeta) bool {\n\tif obj.Annotations == nil {\n\t\treturn false\n\t}\n\n\tif... | [
"0.8007148",
"0.6786136",
"0.66457736",
"0.6634526",
"0.6249949",
"0.6210618",
"0.60924387",
"0.6089236",
"0.6016408",
"0.58948666",
"0.5890985",
"0.5815646",
"0.57908267",
"0.57907593",
"0.5763864",
"0.5744893",
"0.573173",
"0.56694597",
"0.563088",
"0.5604707",
"0.5591501",... | 0.8851892 | 0 |
IsPersonal return true if space is personal | IsPersonal возвращает true, если пространство личное | func (s *Space) IsPersonal() bool {
return s.Type == SPACE_TYPE_PERSONAL
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (obj *Global) IsPersonalMode(ctx context.Context) (bool, error) {\n\tresult := &struct {\n\t\tReturn bool `json:\"qReturn\"`\n\t}{}\n\terr := obj.RPC(ctx, \"IsPersonalMode\", result)\n\treturn result.Return, err\n}",
"func (s *System) IsPublic() bool { return s.Name == PublicSystem.Name || s.Name == PublicC... | [
"0.70180583",
"0.6078018",
"0.58026356",
"0.5692048",
"0.56086373",
"0.55681205",
"0.55415803",
"0.5512311",
"0.54638976",
"0.5388905",
"0.5357469",
"0.52480066",
"0.5236056",
"0.52012086",
"0.5195337",
"0.51941645",
"0.5180246",
"0.51634693",
"0.51496786",
"0.510989",
"0.510... | 0.8510974 | 0 |
IsArchived return true if space is archived | IsArchived возвращает true, если пространство архивировано | func (s *Space) IsArchived() bool {
return s.Type == SPACE_STATUS_ARCHIVED
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (sdk Sdk) IsArchived() bool {\n\treturn sdk.archiveFile() != \"\"\n}",
"func (r *BackupItem) IsArchived() bool {\n\treturn r.Status&StatusArchived == StatusArchived\n}",
"func (r *BackupItem) IsArchived() bool {\n\treturn r.Status&StatusArchived == StatusArchived\n}",
"func (r *RoleList) HasArchived() b... | [
"0.7998938",
"0.7904601",
"0.7904601",
"0.68943787",
"0.6770506",
"0.67099184",
"0.6696357",
"0.66641325",
"0.6639419",
"0.66274315",
"0.6606585",
"0.65943253",
"0.6559072",
"0.6552962",
"0.6517748",
"0.6511882",
"0.64961284",
"0.6490567",
"0.6486505",
"0.6484248",
"0.6432670... | 0.8670008 | 0 |
IsPage return true if container is page | IsPage возвращает true, если контейнер является страницей | func (c *Container) IsPage() bool {
return c.Title != ""
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (c *Content) IsPage() bool {\n\treturn c.Type == CONTENT_TYPE_PAGE\n}",
"func (si *StructInfo) IsPage() bool {\n\treturn si.Kind == core.PAGE\n}",
"func (p *Paginator) IsCurrentPage(page int) bool {\n\treturn p.CurrentPage() == page\n}",
"func (p *Pagination) IsCurrentPage(page int) bool {\n\treturn p.C... | [
"0.7772381",
"0.72924674",
"0.632932",
"0.61344856",
"0.610035",
"0.60268337",
"0.6011801",
"0.58766586",
"0.5786298",
"0.57827115",
"0.57642055",
"0.5759891",
"0.566043",
"0.56425154",
"0.56420946",
"0.5632037",
"0.5631244",
"0.5612727",
"0.5582618",
"0.5552817",
"0.55508125... | 0.8593985 | 0 |
IsSpace return true if container is space | IsSpace возвращает true, если контейнер является пространством | func (c *Container) IsSpace() bool {
return c.Key != ""
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func isSpace(c byte) bool {\n\treturn c == space\n}",
"func isSpace(b byte) bool {\n\tswitch b {\n\tcase 32, 12, 9:\n\t\treturn true\n\tdefault:\n\t\treturn false\n\t}\n}",
"func IsSpaceRoot(r *Node) bool {\n\tpath := r.InternalPath()\n\tif spaceNameBytes, err := xattr.Get(path, xattrs.SpaceNameAttr); err == n... | [
"0.6675399",
"0.63208467",
"0.62378913",
"0.61830646",
"0.6046376",
"0.6005166",
"0.59704506",
"0.5963759",
"0.59173125",
"0.590388",
"0.5838448",
"0.58182573",
"0.5815866",
"0.5789589",
"0.5774671",
"0.57681674",
"0.5735624",
"0.5731149",
"0.5728202",
"0.57250816",
"0.571731... | 0.8235814 | 0 |
UnmarshalJSON is custom container ID unmarshaler | UnmarshalJSON — это пользовательский десериализатор идентификатора контейнера | func (c *ContainerID) UnmarshalJSON(b []byte) error {
switch {
case len(b) == 0:
// nop
case b[0] == '"':
*c = ContainerID(strings.Replace(string(b), "\"", "", -1))
default:
*c = ContainerID(string(b))
}
return nil
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (c *Container) UnmarshalJSON(data []byte) error {\n\tvar rawMsg map[string]json.RawMessage\n\tif err := json.Unmarshal(data, &rawMsg); err != nil {\n\t\treturn fmt.Errorf(\"unmarshalling type %T: %v\", c, err)\n\t}\n\tfor key, val := range rawMsg {\n\t\tvar err error\n\t\tswitch key {\n\t\tcase \"id\":\n\t\t\... | [
"0.7148999",
"0.6506939",
"0.6456671",
"0.626328",
"0.62423307",
"0.62230057",
"0.62131965",
"0.62050635",
"0.61372226",
"0.6101458",
"0.6020385",
"0.60104495",
"0.5999803",
"0.59816074",
"0.5956228",
"0.5951397",
"0.59462184",
"0.5914333",
"0.59087616",
"0.5903828",
"0.58749... | 0.74064636 | 0 |
Deprecated: Use ListRepositoryReq.ProtoReflect.Descriptor instead. | Устарело: используйте ListRepositoryReq.ProtoReflect.Descriptor вместо этого. | func (*ListRepositoryReq) Descriptor() ([]byte, []int) {
return file_api_ops_proto_rawDescGZIP(), []int{3}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (*ListMetadataRequest) Descriptor() ([]byte, []int) {\n\treturn file_go_chromium_org_luci_cipd_api_cipd_v1_repo_proto_rawDescGZIP(), []int{23}\n}",
"func (*ListRepositoriesRequest) Descriptor() ([]byte, []int) {\n\treturn file_modeldb_versioning_VersioningService_proto_rawDescGZIP(), []int{12}\n}",
"func ... | [
"0.73137987",
"0.72216994",
"0.71340483",
"0.71158785",
"0.69697946",
"0.6960516",
"0.6959861",
"0.6948829",
"0.6934028",
"0.6908448",
"0.69048285",
"0.690034",
"0.68986243",
"0.689512",
"0.68887913",
"0.68837196",
"0.68708044",
"0.68625325",
"0.68586475",
"0.6857217",
"0.684... | 0.75993085 | 0 |
Deprecated: Use ListRepositoryRes.ProtoReflect.Descriptor instead. | Устарело: используйте ListRepositoryRes.ProtoReflect.Descriptor вместо этого. | func (*ListRepositoryRes) Descriptor() ([]byte, []int) {
return file_api_ops_proto_rawDescGZIP(), []int{4}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (*ListRepositoryReq) Descriptor() ([]byte, []int) {\n\treturn file_api_ops_proto_rawDescGZIP(), []int{3}\n}",
"func (*ListMetadataRequest) Descriptor() ([]byte, []int) {\n\treturn file_go_chromium_org_luci_cipd_api_cipd_v1_repo_proto_rawDescGZIP(), []int{23}\n}",
"func (*ListMetadataResponse) Descriptor()... | [
"0.702423",
"0.6973052",
"0.69654864",
"0.6897099",
"0.68097436",
"0.67948705",
"0.6777074",
"0.6746349",
"0.67213786",
"0.668595",
"0.6660488",
"0.66343534",
"0.65886915",
"0.65775126",
"0.65540314",
"0.65510374",
"0.6541655",
"0.651642",
"0.6510909",
"0.6510901",
"0.650161"... | 0.734723 | 0 |
Deprecated: Use ListJobReq.ProtoReflect.Descriptor instead. | Устарело: используйте ListJobReq.ProtoReflect.Descriptor вместо этого. | func (*ListJobReq) Descriptor() ([]byte, []int) {
return file_api_ops_proto_rawDescGZIP(), []int{7}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (*ListJobsRequest) Descriptor() ([]byte, []int) {\n\treturn file_pkg_manager_http_grpc_job_proto_rawDescGZIP(), []int{3}\n}",
"func (*ListBatchJobResultsRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_ads_googleads_v14_services_batch_job_service_proto_rawDescGZIP(), []int{7}\n}",
"func (*Get... | [
"0.7615721",
"0.7097827",
"0.7036084",
"0.6987018",
"0.6931635",
"0.6919937",
"0.69092584",
"0.68779176",
"0.6857533",
"0.68378437",
"0.6824317",
"0.681413",
"0.6808692",
"0.68012184",
"0.67888135",
"0.678158",
"0.6770477",
"0.67660964",
"0.67263854",
"0.6692397",
"0.6688013"... | 0.75819296 | 1 |
Deprecated: Use ListJobRes.ProtoReflect.Descriptor instead. | Устарело: используйте ListJobRes.ProtoReflect.Descriptor вместо этого. | func (*ListJobRes) Descriptor() ([]byte, []int) {
return file_api_ops_proto_rawDescGZIP(), []int{8}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (*ListJobsRequest) Descriptor() ([]byte, []int) {\n\treturn file_pkg_manager_http_grpc_job_proto_rawDescGZIP(), []int{3}\n}",
"func (*ListJobReq) Descriptor() ([]byte, []int) {\n\treturn file_api_ops_proto_rawDescGZIP(), []int{7}\n}",
"func (*ListJobsResponse) Descriptor() ([]byte, []int) {\n\treturn file... | [
"0.71542174",
"0.7084673",
"0.70369273",
"0.6963372",
"0.6837766",
"0.67902213",
"0.6754233",
"0.67203486",
"0.66875696",
"0.66731966",
"0.66695327",
"0.66659844",
"0.6660195",
"0.66439104",
"0.66189617",
"0.66168547",
"0.6597521",
"0.6573736",
"0.65519154",
"0.6539392",
"0.6... | 0.73013926 | 0 |
Deprecated: Use ListVariableReq.ProtoReflect.Descriptor instead. | Устарело: используйте ListVariableReq.ProtoReflect.Descriptor вместо этого. | func (*ListVariableReq) Descriptor() ([]byte, []int) {
return file_api_ops_proto_rawDescGZIP(), []int{11}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (*ListVariableRes) Descriptor() ([]byte, []int) {\n\treturn file_api_ops_proto_rawDescGZIP(), []int{12}\n}",
"func (*Variable) Descriptor() ([]byte, []int) {\n\treturn file_google_devtools_clouddebugger_v2_data_proto_rawDescGZIP(), []int{3}\n}",
"func (*ListRequest) Descriptor() ([]byte, []int) {\n\tretur... | [
"0.7003119",
"0.6571559",
"0.65231967",
"0.65141094",
"0.6512945",
"0.6493738",
"0.6483414",
"0.64811575",
"0.64797944",
"0.64721453",
"0.6448194",
"0.64414454",
"0.64365965",
"0.6429342",
"0.64083",
"0.63977855",
"0.63758576",
"0.63715404",
"0.63642275",
"0.6352802",
"0.6351... | 0.76881313 | 0 |
Deprecated: Use ListVariableRes.ProtoReflect.Descriptor instead. | Устарело: используйте ListVariableRes.ProtoReflect.Descriptor вместо этого. | func (*ListVariableRes) Descriptor() ([]byte, []int) {
return file_api_ops_proto_rawDescGZIP(), []int{12}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (*ListVariableReq) Descriptor() ([]byte, []int) {\n\treturn file_api_ops_proto_rawDescGZIP(), []int{11}\n}",
"func (*Variable) Descriptor() ([]byte, []int) {\n\treturn file_google_devtools_clouddebugger_v2_data_proto_rawDescGZIP(), []int{3}\n}",
"func (*Type_ListType) Descriptor() ([]byte, []int) {\n\tret... | [
"0.7172866",
"0.66695154",
"0.6534382",
"0.650128",
"0.6460396",
"0.63638353",
"0.6329906",
"0.6309684",
"0.6288664",
"0.62838805",
"0.6276277",
"0.62503725",
"0.62489116",
"0.6238479",
"0.62189096",
"0.62014437",
"0.62013793",
"0.6194213",
"0.6187662",
"0.6171217",
"0.617054... | 0.7408062 | 0 |
Deprecated: Use DescribeRepositoryReq.ProtoReflect.Descriptor instead. | Устарело: используйте DescribeRepositoryReq.ProtoReflect.Descriptor вместо этого. | func (*DescribeRepositoryReq) Descriptor() ([]byte, []int) {
return file_api_ops_proto_rawDescGZIP(), []int{13}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (*GetRepositoryRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_devtools_artifactregistry_v1_repository_proto_rawDescGZIP(), []int{3}\n}",
"func (*ComputeRepositoryDiffRequest) Descriptor() ([]byte, []int) {\n\treturn file_modeldb_versioning_VersioningService_proto_rawDescGZIP(), []int{22}\n}",... | [
"0.73243886",
"0.72970176",
"0.7288239",
"0.71888715",
"0.7183465",
"0.7175035",
"0.713901",
"0.71179855",
"0.69901067",
"0.6977314",
"0.6969404",
"0.692119",
"0.69194776",
"0.6916009",
"0.6915778",
"0.6902419",
"0.6895223",
"0.6869635",
"0.68641007",
"0.6858219",
"0.68566984... | 0.7458026 | 0 |