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
UpdateProtectBranch saves branch protection options. If ID is 0, it creates a new record. Otherwise, updates existing record.
UpdateProtectBranch сохраняет параметры защиты ветки. Если ID равно 0, создаётся новый запись. В противном случае, обновляется существующая запись.
func UpdateProtectBranch(protectBranch *ProtectBranch) (err error) { sess := x.NewSession() defer sess.Close() if err = sess.Begin(); err != nil { return err } if protectBranch.ID == 0 { if _, err = sess.Insert(protectBranch); err != nil { return fmt.Errorf("Insert: %v", err) } } if _, err = sess.ID(p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func EditBranchProtection(ctx *context.APIContext) {\n\t// swagger:operation PATCH /repos/{owner}/{repo}/branch_protections/{name} repository repoEditBranchProtection\n\t// ---\n\t// summary: Edit a branch protections for a repository. Only fields that are set will be changed\n\t// consumes:\n\t// - application/js...
[ "0.6981953", "0.68028724", "0.67981833", "0.6534552", "0.57428634", "0.5720844", "0.56828713", "0.5580903", "0.5515201", "0.5496755", "0.5369292", "0.4983595", "0.49808177", "0.49740207", "0.48678598", "0.48411614", "0.4827034", "0.47039238", "0.46725774", "0.46675575", "0.45...
0.7305021
0
UpdateOrgProtectBranch saves branch protection options of organizational repository. If ID is 0, it creates a new record. Otherwise, updates existing record. This function also performs check if whitelist user and team's IDs have been changed to avoid unnecessary whitelist delete and regenerate.
UpdateOrgProtectBranch сохраняет параметры защиты ветки организационного репозитория. Если ID равно 0, создаётся новый запись. В противном случае, обновляется существующая запись. Эта функция также проверяет, изменились ли идентификаторы пользователей и команд в белом списке, чтобы избежать ненужного удаления и пересоз...
func UpdateOrgProtectBranch(repo *Repository, protectBranch *ProtectBranch, whitelistUserIDs, whitelistTeamIDs string) (err error) { if err = repo.GetOwner(); err != nil { return fmt.Errorf("GetOwner: %v", err) } else if !repo.Owner.IsOrganization() { return fmt.Errorf("expect repository owner to be an organizati...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func EditBranchProtection(ctx *context.APIContext) {\n\t// swagger:operation PATCH /repos/{owner}/{repo}/branch_protections/{name} repository repoEditBranchProtection\n\t// ---\n\t// summary: Edit a branch protections for a repository. Only fields that are set will be changed\n\t// consumes:\n\t// - application/js...
[ "0.6461851", "0.6423092", "0.6416864", "0.63546205", "0.61288905", "0.5720693", "0.5681801", "0.53321487", "0.5272768", "0.48651224", "0.4766242", "0.47318128", "0.45781916", "0.45240498", "0.45019257", "0.4427853", "0.4406283", "0.4384094", "0.43788534", "0.4349381", "0.4330...
0.758683
0
GetProtectBranchesByRepoID returns a list of ProtectBranch in given repository.
GetProtectBranchesByRepoID возвращает список ProtectBranch в заданном репозитории.
func GetProtectBranchesByRepoID(repoID int64) ([]*ProtectBranch, error) { protectBranches := make([]*ProtectBranch, 0, 2) return protectBranches, x.Where("repo_id = ? and protected = ?", repoID, true).Asc("name").Find(&protectBranches) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *client) GetBranches(org, repo string, onlyProtected bool) ([]Branch, error) {\n\tdurationLogger := c.log(\"GetBranches\", org, repo, onlyProtected)\n\tdefer durationLogger()\n\n\tvar branches []Branch\n\terr := c.readPaginatedResultsWithValues(\n\t\tfmt.Sprintf(\"/repos/%s/%s/branches\", org, repo),\n\t\t...
[ "0.63642013", "0.6320566", "0.5900391", "0.56682706", "0.5501149", "0.54667157", "0.54543006", "0.54134506", "0.51837456", "0.51545143", "0.4974663", "0.49698856", "0.496513", "0.494982", "0.49366364", "0.48883775", "0.48778513", "0.48493487", "0.48474577", "0.4751535", "0.47...
0.90316087
0
QuickExec quick exec an simple command line
QuickExec быстрое выполнение простой командной строки
func QuickExec(cmdLine string, workDir ...string) (string, error) { return ExecLine(cmdLine, workDir...) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func main() {\n\tlines := util.ReadLines()\n\n\tansP1, ansP2 := Exec(lines)\n\tfmt.Printf(\"Part1: %v\\n\", ansP1)\n\tfmt.Printf(\"Part2: %v\\n\", ansP2)\n}", "func main() {\n\tInitVars()\n\ttfmBins := InitTfmBins(&OsPath)\n\tverConstraints, err := ParseTfmConfigs(\"./\")\n\tif err != nil {\n\t\tfmt.Fprintf(os.S...
[ "0.6264366", "0.6004395", "0.5772538", "0.5772538", "0.5772538", "0.5772538", "0.5772538", "0.5772538", "0.5772538", "0.57653713", "0.5761175", "0.57583976", "0.5720655", "0.566654", "0.5643779", "0.562086", "0.55483186", "0.5535528", "0.55332303", "0.553222", "0.55076367", ...
0.7113928
0
ExecLine quick exec an command line string
ExecLine быстрое выполнение командной строки
func ExecLine(cmdLine string, workDir ...string) (string, error) { p := cmdline.NewParser(cmdLine) // create a new Cmd instance cmd := p.NewExecCmd() if len(workDir) > 0 { cmd.Dir = workDir[0] } bs, err := cmd.Output() return string(bs), err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func QuickExec(cmdLine string, workDir ...string) (string, error) {\n\treturn ExecLine(cmdLine, workDir...)\n}", "func (ui *UI) exec(ctx context.Context, line string, reqCh chan execReq) int {\n\treq := execReq{\n\t\tctx: ctx,\n\t\tline: line,\n\t\tui: ui,\n\t\trespCh: make(chan int),\n\t}\n\tselect {\n...
[ "0.6906744", "0.6147474", "0.60744816", "0.60500157", "0.5863146", "0.58578545", "0.5813975", "0.5777007", "0.5759011", "0.5743766", "0.5711614", "0.5693573", "0.56703174", "0.56509113", "0.5646578", "0.5635001", "0.5626724", "0.5615617", "0.55758286", "0.5570272", "0.5558317...
0.7586125
0
ShellExec exec command by shell cmdLine. eg: "ls al"
Выполняет команду exec через shell cmdLine. Например: "ls al"
func ShellExec(cmdLine string, shells ...string) (string, error) { // shell := "/bin/sh" shell := "sh" if len(shells) > 0 { shell = shells[0] } var out bytes.Buffer cmd := exec.Command(shell, "-c", cmdLine) cmd.Stdout = &out if err := cmd.Run(); err != nil { return "", err } return out.String(), nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ExecuteShell(ctx context.Context) interface{} {\n\treturn func(line string) (io.Reader, error) {\n\t\tc := exec.Command(\"sh\", \"-\")\n\n\t\tcopyDone := make(chan error)\n\t\ttimeout := time.After(ContextGetTimeout(ctx))\n\n\t\toutput := new(bytes.Buffer)\n\t\tif stdout, err := c.StdoutPipe(); err == nil {\n...
[ "0.6343495", "0.61270344", "0.5937417", "0.5901834", "0.5735678", "0.5730066", "0.5700993", "0.567958", "0.562397", "0.56186557", "0.56005836", "0.5578034", "0.55685246", "0.55685246", "0.551668", "0.547903", "0.54406506", "0.543145", "0.54090106", "0.5396964", "0.53954333", ...
0.75436246
0
NewRabbitMQServer returns the new rabbitmq server with the connection and channel
NewRabbitMQServer возвращает новый сервер rabbitmq с соединением и каналом
func NewRabbitMQServer(username string, password string, host string) *Server { return &Server{ RabbitMQUsername: username, RabbitMQPassword: password, RabbitMQHost: host, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewServer(cfg *ServerConfig) (*Server, error) {\n\tvar s = &Server{\n\t\tmux: http.NewServeMux(),\n\t}\n\n\t// register api handlers\n\ts.registerHandlers()\n\tconsole.Info(\"registered handlers\")\n\n\t// http client for authorization\n\ts.hc = &http.Client{}\n\n\t// establish rabbitmq session\n\tmqaddr := f...
[ "0.7595138", "0.66407835", "0.6526455", "0.6236298", "0.6043651", "0.6040377", "0.6027341", "0.58490276", "0.58328205", "0.5806928", "0.5803156", "0.57954323", "0.5707904", "0.5688219", "0.5674982", "0.55992335", "0.55966425", "0.5593839", "0.5593327", "0.558049", "0.55695677...
0.7509787
1
Defang Takes an IOC and defangs it using the standard defangReplacements
Defang принимает IOC и «дезактивирует» его с использованием стандартных defangReplacements
func (ioc *IOC) Defang() *IOC { copy := *ioc ioc = &copy // Just do a string replace on each if replacements, ok := defangReplacements[ioc.Type]; ok { for _, fangPair := range replacements { ioc.IOC = strings.ReplaceAll(ioc.IOC, fangPair.fanged, fangPair.defanged) } } return ioc }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (ioc *IOC) Fang() *IOC {\n\tcopy := *ioc\n\tioc = &copy\n\n\t// String replace all defangs in our standard set\n\tif replacements, ok := defangReplacements[ioc.Type]; ok {\n\t\tfor _, fangPair := range replacements {\n\t\t\tioc.IOC = strings.ReplaceAll(ioc.IOC, fangPair.defanged, fangPair.fanged)\n\t\t}\n\t}\...
[ "0.61296785", "0.5149551", "0.4850799", "0.47487968", "0.46673915", "0.44889128", "0.4452262", "0.44432408", "0.44358099", "0.44134143", "0.43503362", "0.43301424", "0.4324857", "0.43207198", "0.4270548", "0.42602628", "0.425869", "0.425649", "0.42529112", "0.42438713", "0.42...
0.7187308
0
IsFanged Takes an IOC and returns if it is fanged. Non fanging types (bitcoin, hashes, file, cve) are always determined to not be fanged
IsFanged принимает IOC и возвращает, является ли он фанговым. Типы, которые не поддерживают фангование (биткойн, хэши, файл, CVE), всегда определяются как не фанговые
func (ioc *IOC) IsFanged() bool { if ioc.Type == Bitcoin || ioc.Type == MD5 || ioc.Type == SHA1 || ioc.Type == SHA256 || ioc.Type == SHA512 || ioc.Type == File || ioc.Type == CVE { return false } // Basically just check if the fanged version is different from the input // This does label a partially ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (b Bet) IsForced() bool {\n\tswitch b.Type {\n\tcase bet.Ante, bet.BringIn, bet.SmallBlind, bet.BigBlind, bet.GuestBlind, bet.Straddle:\n\t\treturn true\n\tdefault:\n\t\treturn false\n\t}\n}", "func (me TxsdWorkType) IsFc() bool { return me.String() == \"FC\" }", "func (me TxsdWorkType) IsFo() bool { retu...
[ "0.5777848", "0.5636446", "0.5450624", "0.53252184", "0.5296213", "0.52835715", "0.5083163", "0.5069068", "0.49672344", "0.4967114", "0.4961127", "0.49527285", "0.4931717", "0.49222323", "0.49133813", "0.49083734", "0.4903117", "0.48999462", "0.48911142", "0.48828495", "0.485...
0.7952134
0
Get finds projects by tags or all projects or the project in the current directory
Get находит проекты по тегам или все проекты или проект в текущей директории
func (i *Index) Get(tags []string, all bool) ([]string, error) { switch { case all: err := i.clean() return i.projects(), err case len(tags) > 0: if err := i.clean(); err != nil { return []string{}, err } projectsWithTags := []string{} for _, p := range i.projects() { found, err := i.hasTags(p, tag...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func GetProjects(w http.ResponseWriter, r *http.Request, auth string) []Project {\n\tvar projects []Project\n\tprojectFileName := auth + globals.PROJIDFILE\n\t//First see if project already exist\n\tstatus, filepro := caching.ShouldFileCache(projectFileName, globals.PROJIDDIR)\n\tdefer filepro.Close()\n\tif status...
[ "0.649808", "0.61884755", "0.61773306", "0.61728644", "0.6160904", "0.6150968", "0.6148858", "0.61327946", "0.61255896", "0.6123783", "0.61141396", "0.6096289", "0.6066046", "0.60416514", "0.6032895", "0.6004244", "0.59767795", "0.59659183", "0.59482855", "0.5927783", "0.5922...
0.7243131
0
loginAttempt increments the number of login attempts in sessions variable
loginAttempt увеличивает количество попыток входа в сессионную переменную
func loginAttempt(sess *sessions.Session) { // Log the attempt if sess.Values[sessLoginAttempt] == nil { sess.Values[sessLoginAttempt] = 1 } else { sess.Values[sessLoginAttempt] = sess.Values[sessLoginAttempt].(int) + 1 } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func AuthenticateLoginAttempt(r *http.Request) *sessions.Session {\n\tvar userid string\n\tlog.Println(\"Authenticating Login credentials.\")\n\tattemptEmail := template.HTMLEscapeString(r.Form.Get(\"email\")) //Escape special characters for security.\n\tattemptPassword := template.HTMLEscapeString(r.Form.Ge...
[ "0.68752503", "0.68752503", "0.6131486", "0.58911663", "0.57096565", "0.5694199", "0.5596062", "0.5593208", "0.55727524", "0.55451465", "0.5532529", "0.54767036", "0.54591733", "0.54341775", "0.5418249", "0.5364072", "0.5343915", "0.53298", "0.5306828", "0.53017807", "0.52956...
0.8348744
0
jdecrypt private function to "decrypt" password
частная функция jdecrypt для "расшифровки" пароля
func jdecrypt( stCuen string , stPass string)(stRes string,err error){ var stEnc []byte stEnc, err = base64.StdEncoding.DecodeString(stPass) if err != nil { log.Println("jdecrypt ", stPass, err ) } else{ lon := len(stEnc) lan := len(stCuen) if lon > ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func DecryptJasypt(encrypted []byte, password string) ([]byte, error) {\n\tif len(encrypted) < des.BlockSize {\n\t\treturn nil, fmt.Errorf(\"Invalid encrypted text. Text length than block size.\")\n\t}\n\n\tsalt := encrypted[:des.BlockSize]\n\tct := encrypted[des.BlockSize:]\n\n\tkey, err := PBKDF1MD5([]byte(passw...
[ "0.7013464", "0.6491337", "0.6297993", "0.6259881", "0.61593276", "0.6147527", "0.6136691", "0.6125619", "0.61233604", "0.605838", "0.605469", "0.60460126", "0.6022822", "0.6017218", "0.60095084", "0.59779716", "0.5960361", "0.59481645", "0.59393644", "0.59285855", "0.5919928...
0.77491564
0
JLoginGET service to return persons data
Сервис JLoginGET для возврата данных о людях
func JLoginGET(w http.ResponseWriter, r *http.Request) { var params httprouter.Params sess := model.Instance(r) v := view.New(r) v.Vars["token"] = csrfbanana.Token(w, r, sess) params = context.Get(r, "params").(httprouter.Params) cuenta := params.ByName("cuenta") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func GetData(accessToken string, w http.ResponseWriter, r *http.Request) {\n\trequest, err := http.NewRequest(\"GET\", \"https://auth.vatsim.net/api/user\", nil)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\trequest.Header.Add(\"Bearer\", accessToken)\n\trequest.Header.Add(\"accept\", \"application/json\")\n\tc...
[ "0.63776165", "0.6154853", "0.615378", "0.6062602", "0.59676594", "0.5934943", "0.5893324", "0.58626664", "0.5861018", "0.5853691", "0.584366", "0.5807749", "0.5805815", "0.57685137", "0.5765969", "0.57202905", "0.57076734", "0.57067597", "0.5703087", "0.5691566", "0.5685883"...
0.76519233
0
LoginGET displays the login page
LoginGET отображает страницу входа
func LoginGET(w http.ResponseWriter, r *http.Request) { sess := model.Instance(r) v := view.New(r) v.Name = "login/login" v.Vars["token"] = csrfbanana.Token(w, r, sess) // Refill any form fields view.Repopulate([]string{"cuenta","password"}, r.Form, v.Vars) v.Render(w) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func LoginGET(c *gin.Context) {\n\tc.HTML(http.StatusOK, \"login.html\", gin.H{})\n}", "func (m *Repository) GetLogin(w http.ResponseWriter, r *http.Request) {\n\tif m.App.Session.Exists(r.Context(), \"user_id\") {\n\t\thttp.Redirect(w, r, \"/\", http.StatusSeeOther)\n\t\treturn\n\t}\n\n\trender.Template(w, r, \...
[ "0.78163654", "0.75899374", "0.7468364", "0.7320955", "0.7160428", "0.691093", "0.68139416", "0.6773794", "0.675614", "0.6752772", "0.66593784", "0.66468394", "0.6646164", "0.66439223", "0.6637479", "0.6600472", "0.659737", "0.65903026", "0.6589105", "0.65679455", "0.65355605...
0.801604
0
Implements the json.Marshaler interface and JSON encodes the Jwk
Реализует интерфейс json.Marshaler и кодирует Jwk в JSON
func (jwk *Jwk) MarshalJSON() (data []byte, err error) { // Remove any potentionally conflicting claims from the JWK's additional members delete(jwk.AdditionalMembers, "kty") delete(jwk.AdditionalMembers, "kid") delete(jwk.AdditionalMembers, "alg") delete(jwk.AdditionalMembers, "use") delete(jwk.AdditionalMember...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (j *JWK) MarshalJSON() ([]byte, error) {\n\tif isSecp256k1(j.Kty, j.Crv) {\n\t\treturn marshalSecp256k1(j)\n\t}\n\n\treturn (&j.JSONWebKey).MarshalJSON()\n}", "func JSONEncoder() Encoder { return jsonEncoder }", "func (m KeyPair) MarshalJSON() ([]byte, error) {\n\t_parts := make([][]byte, 0, 2)\n\n\taO0, ...
[ "0.70164174", "0.6944281", "0.68375885", "0.67024183", "0.6682063", "0.6647078", "0.6481345", "0.647343", "0.64550096", "0.64235896", "0.64145947", "0.637341", "0.6367879", "0.6362876", "0.6359962", "0.63448554", "0.63441277", "0.632238", "0.6312419", "0.62963176", "0.6285640...
0.76333815
0
Validate checkes the JWK object to verify the parameter set represent a valid JWK. If jwk is valid a nil error will be returned. If a JWK is invalid an error will be returned describing the values that causes the validation to fail.
Validate проверяет объект JWK, чтобы убедиться, что набор параметров представляет собой допустимый JWK. Если jwk допустим, будет возвращена nil-ошибка. Если JWK недопустим, будет возвращена ошибка, описывающая значения, приводящие к неудаче проверки.
func (jwk *Jwk) Validate() error { // If the alg parameter is set, make sure it matches the set JWK Type if len(jwk.Algorithm) > 0 { algKeyType := GetKeyType(jwk.Algorithm) if algKeyType != jwk.Type { fmt.Errorf("Jwk Type (kty=%v) doesn't match the algorithm key type (%v)", jwk.Type, algKeyType) } } switc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (jwk *Jwk) validateECParams() error {\n\tif jwk.X == nil {\n\t\treturn errors.New(\"EC Required Param (X) is nil\")\n\t}\n\tif jwk.Y == nil {\n\t\treturn errors.New(\"EC Required Param (Y) is nil\")\n\t}\n\tif jwk.Curve == nil {\n\t\treturn errors.New(\"EC Required Param (Crv) is nil\")\n\t}\n\treturn nil\n}"...
[ "0.6095678", "0.569532", "0.5664185", "0.560481", "0.5594125", "0.55730027", "0.5429043", "0.5408447", "0.52270234", "0.5226582", "0.5189666", "0.5134343", "0.5122218", "0.51015174", "0.5083125", "0.50354177", "0.5019506", "0.50113547", "0.49843422", "0.4983307", "0.49801493"...
0.7443554
0
ValidateRSAParams checks the RSA parameters of a RSA type of JWK. If a JWK is invalid an error will be returned describing the values that causes the validation to fail.
ValidateRSAParams проверяет параметры RSA ключа JWK типа RSA. Если ключ JWK недействителен, будет возвращаться ошибка, описывающая значения, приводящие к провалу проверки.
func (jwk *Jwk) validateRSAParams() error { if jwk.E < 1 { return errors.New("RSA Required Param (E) is empty/default (<= 0)") } if jwk.N == nil { return errors.New("RSA Required Param (N) is nil") } pOk := jwk.P != nil qOk := jwk.Q != nil dpOk := jwk.Dp != nil dqOk := jwk.Dq != nil qiOk := jwk.Qi != nil ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (priv *PKCS11PrivateKeyRSA) Validate() error {\n\tpub := priv.key.PubKey.(*rsa.PublicKey)\n\tif pub.E < 2 {\n\t\treturn errMalformedRSAKey\n\t}\n\t// The software implementation actively rejects 'large' public\n\t// exponents, in order to simplify its own implementation.\n\t// Here, instead, we expect the PKC...
[ "0.6804986", "0.6333782", "0.6148202", "0.58484894", "0.5737118", "0.56840175", "0.56579584", "0.5655421", "0.5614205", "0.5572611", "0.55541784", "0.55131155", "0.5499171", "0.54608613", "0.54498476", "0.54304063", "0.54144347", "0.5405987", "0.5393092", "0.5390702", "0.5346...
0.82881474
0
NewIndexDB creates a new instance of IndexDB
NewIndexDB создает новый экземпляр IndexDB
func NewIndexDB(db store.DB, recordStore *RecordDB) *IndexDB { return &IndexDB{db: db, recordStore: recordStore} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func CreateIndexDB(langName string, dbT DBType) IndexDB {\n\t// TODO 暂时只实现了内存存储,一次性的。\n\treturn initMenDB(langName)\n}", "func NewIndex(addr, name, typ string, md *index.Metadata) (*Index, error) {\n\n\tfmt.Println(\"Get a new index: \", addr, name)\n client := &http.Client{\n\t\tTransport: &http.Transpo...
[ "0.7321358", "0.7077958", "0.6995988", "0.695568", "0.68397", "0.6816478", "0.6716526", "0.6652811", "0.664919", "0.66478133", "0.6618617", "0.65940624", "0.65865254", "0.6480771", "0.64426786", "0.64285284", "0.6395965", "0.6346326", "0.6320402", "0.6302338", "0.6245616", ...
0.7238606
1
UpdateLastKnownPulse must be called after updating TopSyncPulse
UpdateLastKnownPulse должен вызываться после обновления TopSyncPulse
func (i *IndexDB) UpdateLastKnownPulse(ctx context.Context, topSyncPulse insolar.PulseNumber) error { i.lock.Lock() defer i.lock.Unlock() indexes, err := i.ForPulse(ctx, topSyncPulse) if err != nil && err != ErrIndexNotFound { return errors.Wrapf(err, "failed to get indexes for pulse: %d", topSyncPulse) } for...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (trd *trxDispatcher) updateLastSeenBlock() {\n\t// get the current value\n\tlsb := trd.blkObserver.Load()\n\tlog.Noticef(\"last seen block is #%d\", lsb)\n\n\t// make the change in the database so the progress persists\n\terr := repo.UpdateLastKnownBlock((*hexutil.Uint64)(&lsb))\n\tif err != nil {\n\t\tlog.Er...
[ "0.5581604", "0.5498568", "0.5405669", "0.5070121", "0.5051444", "0.50203633", "0.4999089", "0.49901783", "0.4933522", "0.49308974", "0.4929331", "0.4919969", "0.49038833", "0.48871338", "0.48802578", "0.48719504", "0.48650056", "0.48559475", "0.48462912", "0.48119715", "0.47...
0.70539033
0
TruncateHead remove all records after lastPulse
TruncateHead удаляет все записи после lastPulse
func (i *IndexDB) TruncateHead(ctx context.Context, from insolar.PulseNumber) error { i.lock.Lock() defer i.lock.Unlock() it := i.db.NewIterator(&indexKey{objID: *insolar.NewID(pulse.MinTimePulse, nil), pn: from}, false) defer it.Close() var hasKeys bool for it.Next() { hasKeys = true key := newIndexKey(it....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RecordDB) TruncateHead(ctx context.Context, from insolar.PulseNumber) error {\n\n\tif err := r.truncateRecordsHead(ctx, from); err != nil {\n\t\treturn errors.Wrap(err, \"failed to truncate records head\")\n\t}\n\n\tif err := r.truncatePositionRecordHead(ctx, recordPositionKey{pn: from}, recordPositionKey...
[ "0.75272435", "0.5956599", "0.58818066", "0.585593", "0.58506346", "0.5821484", "0.5794194", "0.57208204", "0.5657627", "0.5587941", "0.5498917", "0.5479526", "0.54287946", "0.5406762", "0.5404167", "0.53492576", "0.5343496", "0.5339121", "0.5239251", "0.5235306", "0.5232906"...
0.7663238
0
WaitReady waits for machinecontroller and its webhook to become ready
WaitReady ожидает, пока machinecontroller и его webhook станут готовыми
func WaitReady(s *state.State) error { if !s.Cluster.MachineController.Deploy { return nil } s.Logger.Infoln("Waiting for machine-controller to come up...") if err := cleanupStaleResources(s.Context, s.DynamicClient); err != nil { return err } if err := waitForWebhook(s.Context, s.DynamicClient); err != ni...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func WaitReady(ctx *util.Context) error {\n\tif !ctx.Cluster.MachineController.Deploy {\n\t\treturn nil\n\t}\n\n\tctx.Logger.Infoln(\"Waiting for machine-controller to come up…\")\n\n\t// Wait a bit to let scheduler to react\n\ttime.Sleep(10 * time.Second)\n\n\tif err := WaitForWebhook(ctx.DynamicClient); err != n...
[ "0.81729543", "0.73304754", "0.6926979", "0.69264543", "0.6682231", "0.6572147", "0.6555187", "0.6544689", "0.64363945", "0.62041384", "0.61236566", "0.60687506", "0.60536796", "0.60392857", "0.5971176", "0.59554976", "0.58414894", "0.58387625", "0.5814672", "0.5803259", "0.5...
0.7730005
1
waitForCRDs waits for machinecontroller CRDs to be created and become established
waitForCRDs ожидает создания и установки machinecontroller CRDs
func waitForCRDs(s *state.State) error { condFn := clientutil.CRDsReadyCondition(s.Context, s.DynamicClient, CRDNames()) err := wait.PollUntilContextTimeout(s.Context, 5*time.Second, 3*time.Minute, false, condFn.WithContext()) return fail.KubeClient(err, "waiting for machine-controller CRDs to became ready") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *MeshReconciler) waitForCRD(name string, client runtimeclient.Client) error {\n\tm.logger.WithField(\"name\", name).Debug(\"waiting for CRD\")\n\n\tbackoffConfig := backoff.ConstantBackoffConfig{\n\t\tDelay: time.Duration(backoffDelaySeconds) * time.Second,\n\t\tMaxRetries: backoffMaxretries,\n\t}\n\t...
[ "0.67166954", "0.6538773", "0.63380307", "0.6060883", "0.59197", "0.58800954", "0.5797496", "0.57853615", "0.5667254", "0.5638806", "0.55470073", "0.5496028", "0.54223436", "0.53780425", "0.5365897", "0.5323093", "0.531257", "0.5297731", "0.5264647", "0.5243112", "0.5234411",...
0.83833635
0
DestroyWorkers destroys all MachineDeployment, MachineSet and Machine objects
DestroyWorkers уничтожает все MachineDeployment, MachineSet и Machine объекты
func DestroyWorkers(s *state.State) error { if !s.Cluster.MachineController.Deploy { s.Logger.Info("Skipping deleting workers because machine-controller is disabled in configuration.") return nil } if s.DynamicClient == nil { return fail.NoKubeClient() } ctx := context.Background() // Annotate nodes with...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (bc *BaseCluster) Destroy() {\n\tfor _, m := range bc.Machines() {\n\t\tbc.numMachines--\n\t\tm.Destroy()\n\t}\n}", "func (mr *MapReduce) KillWorkers() *list.List {\n l := list.New()\n for _, w := range mr.Workers {\n DPrintf(\"DoWork: shutdown %s\\n\", w.address)\n args := &ShutdownArgs{}\n var ...
[ "0.6304216", "0.626198", "0.626198", "0.626198", "0.60066", "0.5894493", "0.5889124", "0.58310187", "0.57876456", "0.57876456", "0.57876456", "0.57876456", "0.57876456", "0.57876456", "0.57876456", "0.57876456", "0.57876456", "0.57876456", "0.57876456", "0.5772434", "0.565664...
0.7957886
0
WaitDestroy waits for all Machines to be deleted
WaitDestroy ожидает удаления всех Machine
func WaitDestroy(s *state.State) error { s.Logger.Info("Waiting for all machines to get deleted...") return wait.PollUntilContextTimeout(s.Context, 5*time.Second, 5*time.Minute, false, func(ctx context.Context) (bool, error) { list := &clusterv1alpha1.MachineList{} if err := s.DynamicClient.List(ctx, list, dyncl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (bc *BaseCluster) Destroy() {\n\tfor _, m := range bc.Machines() {\n\t\tbc.numMachines--\n\t\tm.Destroy()\n\t}\n}", "func WaitForDeletion(ctx context.Context, mcpKey types.NamespacedName, timeout time.Duration) error {\n\treturn wait.PollImmediate(5*time.Second, timeout, func() (bool, error) {\n\t\tmcp := &...
[ "0.65745693", "0.62703717", "0.62244946", "0.6161704", "0.60007936", "0.59899086", "0.57228744", "0.57008475", "0.567827", "0.56474024", "0.5596537", "0.55710554", "0.5490832", "0.5463808", "0.5462064", "0.5462064", "0.5438312", "0.5418636", "0.54070365", "0.5403932", "0.5366...
0.7794994
0
waitForMachineController waits for machinecontroller to become running
waitForMachineController ожидает, пока machinecontroller станет запущенным
func waitForMachineController(ctx context.Context, client dynclient.Client) error { condFn := clientutil.PodsReadyCondition(ctx, client, dynclient.ListOptions{ Namespace: resources.MachineControllerNameSpace, LabelSelector: labels.SelectorFromSet(map[string]string{ appLabelKey: resources.MachineControllerName, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func waitForMachineState(api *cloudapi.Client, id, state string, timeout time.Duration) error {\n\treturn waitFor(\n\t\tfunc() (bool, error) {\n\t\t\tcurrentState, err := readMachineState(api, id)\n\t\t\treturn currentState == state, err\n\t\t},\n\t\tmachineStateChangeCheckInterval,\n\t\tmachineStateChangeTimeout,...
[ "0.6205696", "0.59781384", "0.5872165", "0.57533246", "0.55674094", "0.5406494", "0.5349306", "0.53339887", "0.5305528", "0.52262676", "0.5192839", "0.5190781", "0.5143582", "0.51317656", "0.51000625", "0.5088618", "0.5088441", "0.50841904", "0.50794375", "0.5047249", "0.5038...
0.79245347
0
waitForWebhook waits for machinecontrollerwebhook to become running
waitForWebhook ожидает, пока machinecontrollerwebhook станет запущенным
func waitForWebhook(ctx context.Context, client dynclient.Client) error { condFn := clientutil.PodsReadyCondition(ctx, client, dynclient.ListOptions{ Namespace: resources.MachineControllerNameSpace, LabelSelector: labels.SelectorFromSet(map[string]string{ appLabelKey: resources.MachineControllerWebhookName, }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func waitFor(ctx context.Context, eventName string) error {\n\tch := make(chan struct{})\n\tcctx, cancel := context.WithCancel(ctx)\n\tchromedp.ListenTarget(cctx, func(ev interface{}) {\n\t\tswitch e := ev.(type) {\n\t\tcase *page.EventLifecycleEvent:\n\t\t\tif e.Name == eventName {\n\t\t\t\tcancel()\n\t\t\t\tclos...
[ "0.5618916", "0.5599623", "0.5432932", "0.54272896", "0.5426101", "0.54169494", "0.5409126", "0.54035944", "0.5363949", "0.527401", "0.5210134", "0.52003247", "0.51873827", "0.5170767", "0.5069141", "0.50672245", "0.50620365", "0.50183946", "0.49992928", "0.49969497", "0.4977...
0.78812975
0
DefaultKeymap returns a copy of the default Keymap Useful if inspection/customization is needed.
DefaultKeymap возвращает копию стандартной Keymap, полезную при необходимости проверки/настройки.
func DefaultKeymap() Keymap { return Keymap{ ansi.NEWLINE: (*Core).Enter, ansi.CARRIAGE_RETURN: (*Core).Enter, ansi.CTRL_C: (*Core).Interrupt, ansi.CTRL_D: (*Core).DeleteOrEOF, ansi.CTRL_H: (*Core).Backspace, ansi.BACKSPACE: (*Core).Backspace, ansi.CTRL_L: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewDefaultKeyMap() *KeyMap {\n\treturn &KeyMap{\n\t\tYes: []string{\"y\", \"Y\"},\n\t\tNo: []string{\"n\", \"N\"},\n\t\tSelectYes: []string{\"left\"},\n\t\tSelectNo: []string{\"right\"},\n\t\tToggle: []string{\"tab\"},\n\t\tSubmit: []string{\"enter\"},\n\t\tAbort: []string{\"ctrl+c\"},...
[ "0.74792606", "0.6471782", "0.6430026", "0.6413645", "0.6204454", "0.6148289", "0.611857", "0.5991836", "0.5914652", "0.5903464", "0.5883921", "0.5832911", "0.5769057", "0.56442523", "0.5629255", "0.5577586", "0.5549471", "0.54746073", "0.54746073", "0.5446178", "0.5425417", ...
0.75022745
0
CreateFileSystem invokes the dfs.CreateFileSystem API synchronously
CreateFileSystem вызывает API dfs.CreateFileSystem синхронно
func (client *Client) CreateFileSystem(request *CreateFileSystemRequest) (response *CreateFileSystemResponse, err error) { response = CreateCreateFileSystemResponse() err = client.DoAction(request, response) return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (manager *mockFileSystemManager) CreateFileSystem(ctx context.Context, groupName string, filesystemName string, timeout *int32, xMsDate string, datalakeName string) (*autorest.Response, error) {\n\tfs := fileSystemResource{\n\t\tresourceGroupName: groupName,\n\t\tstorageAccountName: datalakeName,\n\t\tfilesy...
[ "0.7532974", "0.72078437", "0.71549237", "0.709281", "0.7048207", "0.7030605", "0.70085895", "0.6557903", "0.6551424", "0.6468269", "0.6361563", "0.63513356", "0.62807924", "0.62282985", "0.60684615", "0.6032318", "0.60243344", "0.6024124", "0.5850698", "0.5837949", "0.582154...
0.74027896
1
CreateFileSystemWithChan invokes the dfs.CreateFileSystem API asynchronously
CreateFileSystemWithChan вызывает асинхронно API dfs.CreateFileSystem
func (client *Client) CreateFileSystemWithChan(request *CreateFileSystemRequest) (<-chan *CreateFileSystemResponse, <-chan error) { responseChan := make(chan *CreateFileSystemResponse, 1) errChan := make(chan error, 1) err := client.AddAsyncTask(func() { defer close(responseChan) defer close(errChan) response,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (client *Client) CreateFileSystemWithCallback(request *CreateFileSystemRequest, callback func(response *CreateFileSystemResponse, err error)) <-chan int {\n\tresult := make(chan int, 1)\n\terr := client.AddAsyncTask(func() {\n\t\tvar response *CreateFileSystemResponse\n\t\tvar err error\n\t\tdefer close(resul...
[ "0.7438406", "0.59352165", "0.58698547", "0.58682775", "0.5800312", "0.5783298", "0.5782387", "0.5774499", "0.56610906", "0.56329244", "0.5362752", "0.53274715", "0.52781004", "0.52586395", "0.52302724", "0.5204847", "0.517791", "0.5176203", "0.5168632", "0.50918365", "0.5090...
0.80296123
0
CreateFileSystemWithCallback invokes the dfs.CreateFileSystem API asynchronously
CreateFileSystemWithCallback вызывает асинхронно API dfs.CreateFileSystem
func (client *Client) CreateFileSystemWithCallback(request *CreateFileSystemRequest, callback func(response *CreateFileSystemResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { var response *CreateFileSystemResponse var err error defer close(result) response, err...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (manager *mockFileSystemManager) CreateFileSystem(ctx context.Context, groupName string, filesystemName string, timeout *int32, xMsDate string, datalakeName string) (*autorest.Response, error) {\n\tfs := fileSystemResource{\n\t\tresourceGroupName: groupName,\n\t\tstorageAccountName: datalakeName,\n\t\tfilesy...
[ "0.66443145", "0.6494744", "0.64063805", "0.6279257", "0.6207732", "0.6184654", "0.61342597", "0.60683924", "0.6045436", "0.56931496", "0.5614541", "0.55832964", "0.5576147", "0.54953367", "0.5450374", "0.5437641", "0.53679824", "0.536721", "0.536561", "0.53433496", "0.533860...
0.8151044
0
CreateCreateFileSystemRequest creates a request to invoke CreateFileSystem API
CreateCreateFileSystemRequest создает запрос для вызова API CreateFileSystem
func CreateCreateFileSystemRequest() (request *CreateFileSystemRequest) { request = &CreateFileSystemRequest{ RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("DFS", "2018-06-20", "CreateFileSystem", "alidfs", "openAPI") request.Method = requests.POST return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (client *Client) CreateFileSystem(request *CreateFileSystemRequest) (response *CreateFileSystemResponse, err error) {\n\tresponse = CreateCreateFileSystemResponse()\n\terr = client.DoAction(request, response)\n\treturn\n}", "func CreateListFileSystemsRequest() (request *ListFileSystemsRequest) {\n\trequest ...
[ "0.74044955", "0.7277164", "0.7208954", "0.7005334", "0.6775199", "0.67420554", "0.66735137", "0.662397", "0.6544891", "0.63551843", "0.6137757", "0.605717", "0.59149057", "0.5900351", "0.58727604", "0.57616615", "0.57495767", "0.5742306", "0.573904", "0.57332695", "0.5698775...
0.8567599
0
CreateCreateFileSystemResponse creates a response to parse from CreateFileSystem response
CreateCreateFileSystemResponse создает ответ для парсинга из ответа CreateFileSystem
func CreateCreateFileSystemResponse() (response *CreateFileSystemResponse) { response = &CreateFileSystemResponse{ BaseResponse: &responses.BaseResponse{}, } return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (manager *mockFileSystemManager) CreateFileSystem(ctx context.Context, groupName string, filesystemName string, timeout *int32, xMsDate string, datalakeName string) (*autorest.Response, error) {\n\tfs := fileSystemResource{\n\t\tresourceGroupName: groupName,\n\t\tstorageAccountName: datalakeName,\n\t\tfilesy...
[ "0.7409187", "0.7196471", "0.7153243", "0.68064606", "0.67132664", "0.66525936", "0.65382826", "0.6406937", "0.6363215", "0.6359061", "0.6322241", "0.6244479", "0.61652124", "0.61642545", "0.61275655", "0.6105425", "0.5946818", "0.5941657", "0.5848543", "0.5826824", "0.577976...
0.8397854
0
SaveBody creates or overwrites the existing response body file for the url associated with the given Fetcher
SaveBody создает или перезаписывает существующий файл тела ответа для URL, связанного с заданным Fetcher
func (f Fetcher) SaveBody() { file, err := os.Create(f.url) check(err) defer file.Close() b := f.processBody() _, err = file.Write(b) check(err) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *Response) Save(fileName string) error {\r\n\treturn ioutil.WriteFile(fileName, r.Body, 0644)\r\n}", "func (response *S3Response) WriteBody(dst io.Writer) error {\n defer response.Close()\n _, err := io.Copy(dst, response.httpResponse.Body)\n return err\n}", "func saveFile(savedPath string, re...
[ "0.6250908", "0.5745216", "0.54999065", "0.53012586", "0.52373475", "0.5236081", "0.52156407", "0.5190274", "0.5153593", "0.5066596", "0.50165904", "0.5004325", "0.5003726", "0.49831364", "0.49391568", "0.4936893", "0.49297172", "0.4924654", "0.49175733", "0.49039724", "0.488...
0.85055155
0
processBody reads the response body associated for the given Fetcher and reports any errors
processBody считывает тело ответа, связанное с заданным Fetcher, и сообщает об любых ошибках
func (f Fetcher) processBody() []byte { b, err := io.ReadAll(f.resp.Body) f.resp.Body.Close() if f.resp.StatusCode >= 300 { log.Fatalf("Response failed with status code: %d\n and body: %s\n", f.resp.StatusCode, b) } check(err) return b }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func decodeBody(resp *http.Response, out interface{}) (error) {\n\tswitch resp.ContentLength {\n\tcase 0:\n\t\tif out == nil {\n\t\t\treturn nil\n\t\t}\n\t\treturn errors.New(\"Got 0 byte response with non-nil decode object\")\n\tdefault:\n\t\tdec := json.NewDecoder(resp.Body)\n\t\treturn dec.Decode(out)\n\t}\n}",...
[ "0.5680592", "0.56435114", "0.5631959", "0.5522728", "0.54882276", "0.5482303", "0.54751396", "0.5364349", "0.5358157", "0.53234804", "0.5321872", "0.52747655", "0.5210658", "0.51857114", "0.5130053", "0.5072723", "0.50544876", "0.5036079", "0.5028855", "0.49748597", "0.49637...
0.7787903
0
NewTreeFromState initiates a Tree from state data previously written by
NewTreeFromState инициирует Tree из данных состояния, ранее записанных с помощью
func NewTreeFromState(data io.Reader) (*Tree, error) { idx := &Tree{ newBlocks: make(chan int), done: make(chan bool), blockMap: make(map[int]int), } if err := idx.loadState(data); err != nil { return nil, fmt.Errorf("Failed loading index state : %v", err) } go idx.blockAllocator() return idx, nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (db *DB) InitStateTree(depth int) error {\n\trootNode := core.NewStateRoot(depth)\n\treturn db.Instance.Create(&rootNode).Error\n}", "func newTreeNode(parent *treeNode, move Move, state GameState, ucbC float64) *treeNode {\n\t// Construct the new node.\n\tnode := treeNode{\n\t\tparent: parent,\n\t\t...
[ "0.6912023", "0.6191913", "0.6073148", "0.60606235", "0.6037155", "0.59091216", "0.58979636", "0.58852684", "0.5877665", "0.5856578", "0.583802", "0.5774494", "0.5756803", "0.57559043", "0.5738696", "0.5727683", "0.5727124", "0.5712563", "0.5702321", "0.56940013", "0.5655744"...
0.8084078
0
Len returns the current number of items in the tree It needs to query all allocators for their counters, so it will block if an allocator is constantly reserved...
Len возвращает текущее количество элементов в дереве. Для этого ему необходимо запросить у всех аллокаторов их счётчики, поэтому он будет блокироваться, если аллокатор постоянно зарезервирован...
func (idx *Tree) Len() (count int) { idx.Stop() count = int(idx.liveObjects) for _, a := range idx.allocators { count += int(a.itemCounter) } idx.Start() return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (t *Tree) Len() int { return t.Count }", "func (s *Pool) Len() int { return int(atomic.LoadUint32(&s.avail)) }", "func (t *BinaryTree) Size() int { return t.count }", "func (t *Tree) Len() int {\n\treturn t.Count\n}", "func (h ReqHeap) Len() int { return len(h) }", "func (p NodePools) Len() int { re...
[ "0.6939439", "0.6840272", "0.6690427", "0.6655519", "0.6647418", "0.66106826", "0.64596206", "0.6438696", "0.64009213", "0.6397146", "0.6384905", "0.6336007", "0.6332157", "0.6309753", "0.6295182", "0.62948596", "0.62872094", "0.6268528", "0.6266187", "0.62337065", "0.6231077...
0.8014996
0
Stop withdraws all allocators to prevent any more write or reads. It will blocks until it gets all allocators. If already stopped, it returns silently.
Stop останавливает все аллоциаторы, чтобы предотвратить любые дальнейшие записи или чтения. Он блокируется до тех пор, пока не получит все аллоциаторы. Если уже остановлен, он возвращается без вывода.
func (idx *Tree) Stop() { if !atomic.CompareAndSwapInt32(&idx.stopped, 0, 1) { return } for i := 0; i < len(idx.allocators); i++ { _ = idx.allocatorQueue.get() } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (fetchers Fetchers) Stop() {\n\tfor _, fetcher := range fetchers {\n\t\tfetcher.Stop()\n\t}\n}", "func (r *reducer) stop() {\n\tfor _, m := range r.mappers {\n\t\tm.stop()\n\t}\n\tsyncClose(r.done)\n}", "func exitAllocRunner(runners ...AllocRunner) {\n\tfor _, ar := range runners {\n\t\tterminalAlloc := a...
[ "0.6062398", "0.6048799", "0.59177333", "0.58795786", "0.5779963", "0.5743292", "0.5741704", "0.5685443", "0.56540674", "0.5640358", "0.56347626", "0.56151617", "0.5592923", "0.5573741", "0.55554795", "0.5539427", "0.55270153", "0.5490114", "0.5471471", "0.5466442", "0.545379...
0.7085047
0
allocateNode returns the new node and its data block, position at start
allocateNode возвращает новый узел и его блок данных, позиционируясь в начале
func (idx *Tree) allocateNode(a *Allocator, count int, prefixLen int) (n uint64, data []uint64) { prefixSlots := (prefixLen + 7) >> 3 if prefixLen >= 255 { prefixSlots++ } count += prefixSlots n = a.newNode(count) block := int(n >> blockSlotsShift) offset := int(n & blockSlotsOffsetMask) data = idx.blocks[blo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (t *BTree) AllocateNode() *BTreeNode {\n\tx := BTreeNode{}\n\tfor i := 0; i < 2*t.t; i++ {\n\t\tx.children = append(x.children, t.nullNode)\n\t}\n\tfor i := 0; i < 2*t.t-1; i++ {\n\t\tx.keys = append(x.keys, -1)\n\t}\n\treturn &x\n}", "func (idx *Tree) allocateNodeWithPrefix(a *Allocator, count int, prefix ...
[ "0.67350614", "0.66224706", "0.6255893", "0.62361896", "0.58610564", "0.5856234", "0.573066", "0.57271", "0.5717261", "0.5710908", "0.5661831", "0.5650009", "0.56370544", "0.56184864", "0.55880314", "0.55836654", "0.5574136", "0.55566436", "0.5539488", "0.5515493", "0.5494545...
0.7961014
0
allocateNodeWithPrefix returns the new node and its data block, positioned after the prefix
allocateNodeWithPrefix возвращает новый узел и его данные, расположенные после префикса
func (idx *Tree) allocateNodeWithPrefix(a *Allocator, count int, prefix []byte) (n uint64, data []uint64) { prefixLen := len(prefix) prefixSlots := (prefixLen + 7) >> 3 if prefixLen >= 255 { prefixSlots++ } count += prefixSlots n = a.newNode(count) block := int(n >> blockSlotsShift) offset := int(n & blockSlo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (idx *Tree) allocateNode(a *Allocator, count int, prefixLen int) (n uint64, data []uint64) {\n\tprefixSlots := (prefixLen + 7) >> 3\n\tif prefixLen >= 255 {\n\t\tprefixSlots++\n\t}\n\tcount += prefixSlots\n\tn = a.newNode(count)\n\tblock := int(n >> blockSlotsShift)\n\toffset := int(n & blockSlotsOffsetMask)\...
[ "0.6869773", "0.59520763", "0.56966764", "0.56332743", "0.5543914", "0.5521665", "0.5477629", "0.54177904", "0.5407354", "0.5355928", "0.5346138", "0.5242986", "0.5131678", "0.51244336", "0.51227385", "0.5112621", "0.51077956", "0.50852245", "0.50659835", "0.5065695", "0.5056...
0.8430526
0
GetAllocator reserves an allocator used for bulk Lookup/Update/Delete operations.
GetAllocator выделяет аллокатор, используемый для массовых операций Lookup/Update/Delete.
func (idx *Tree) GetAllocator() *Allocator { return idx.allocators[idx.allocatorQueue.get()] }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func GetRuntimePortAllocator() (*RuntimePortAllocator, error) {\n\tif rpa.pa == nil {\n\t\tif err := rpa.createAndRestorePortAllocator(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn rpa, nil\n}", "func NewAllocator(provider lCoreProvider) *Allocator {\n\treturn &Allocator{\n\t\tConfig: make(Alloc...
[ "0.68342525", "0.6720525", "0.67027986", "0.6658546", "0.66041344", "0.65315723", "0.6260463", "0.6200884", "0.613557", "0.60628927", "0.595554", "0.588803", "0.5842821", "0.5842404", "0.5824318", "0.57718134", "0.5739044", "0.56429476", "0.559904", "0.5523092", "0.537339", ...
0.7612451
0
ReleaseAllocator returns an allocator previously reserved using GetAllocator
ReleaseAllocator возвращает аллокатор, ранее зарезервированный с помощью GetAllocator
func (idx *Tree) ReleaseAllocator(a *Allocator) { idx.allocatorQueue.put(a.id) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (allocator *Allocator) ReleaseAllocator() {\n\tC.zj_AllocatorRelease(allocator.A)\n}", "func (a *ResourceAllocator) Free(b []byte) {\n\tif a == nil {\n\t\tDefaultAllocator.Free(b)\n\t\treturn\n\t}\n\n\tsize := len(b)\n\n\t// Release the memory to the allocator first.\n\talloc := a.allocator()\n\talloc.Free(...
[ "0.81131625", "0.64977455", "0.64955264", "0.6233524", "0.6059499", "0.604095", "0.59881294", "0.59217936", "0.59119517", "0.5881009", "0.585588", "0.5847171", "0.5824737", "0.5790185", "0.56845546", "0.5651543", "0.5623506", "0.5620355", "0.56128675", "0.5577229", "0.5566453...
0.7707561
1
PrepareUpdate reserves an allocator and uses it to prepare an update operation. See Allocator.PrepareUpdate for details
PrepareUpdate выделяет аллоциатор и использует его для подготовки операции обновления. См. Allocator.PrepareUpdate для деталей
func (idx *Tree) PrepareUpdate(key []byte) (found bool, op *UpdateOperation) { id := idx.allocatorQueue.get() op = newUpdateOperation(idx, idx.allocators[id], true) return op.prepareUpdate(key), op }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (t *Table) PrepareUpdate(tu fibdef.Update) (*UpdateCommand, error) {\n\tu := &UpdateCommand{}\n\tu.real.RealUpdate = tu.Real()\n\tu.virt.VirtUpdate = tu.Virt()\n\n\tu.allocSplit = u.real.prepare(t)\n\tu.allocated = make([]*Entry, u.allocSplit+u.virt.prepare(t))\n\tif e := t.allocBulk(u.allocated); e != nil {\...
[ "0.7424789", "0.5677787", "0.5536896", "0.5494887", "0.53911835", "0.5362883", "0.53093344", "0.52692324", "0.5254965", "0.5247992", "0.51920253", "0.51712793", "0.5147966", "0.5011077", "0.5002912", "0.4989964", "0.48652557", "0.48066962", "0.47724175", "0.47566584", "0.4719...
0.75170195
0
PrepareDelete reserves an allocator and uses it to prepare a delete operation. See Allocator.PrepareDelete for details
PrepareDelete выделяет аллоциатор и использует его для подготовки операции удаления. См. Allocator.PrepareDelete для деталей
func (idx *Tree) PrepareDelete(key []byte) (found bool, op *DeleteOperation) { id := idx.allocatorQueue.get() op = newDeleteOperation(idx, idx.allocators[id], true) if op.prepare(key) { return true, op } op.Abort() return false, nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (client Client) DeletePreparer(resourceGroupName string, name string) (*http.Request, error) {\n\tpathParameters := map[string]interface{}{\n\t\t\"name\": url.QueryEscape(name),\n\t\t\"resourceGroupName\": url.QueryEscape(resourceGroupName),\n\t\t\"subscriptionId\": url.QueryEscape(client.Subs...
[ "0.52881616", "0.5262748", "0.5250947", "0.51915395", "0.51663846", "0.5157574", "0.51027143", "0.50212806", "0.49939945", "0.49535996", "0.49505183", "0.49463445", "0.49417627", "0.49401733", "0.49396092", "0.49217606", "0.49027976", "0.4893439", "0.4889526", "0.48798436", "...
0.7151367
0
MaxKey returns the maximum key having the given searchPrefix, or the maximum key in the whole index if searchIndex is nil. Maximum means the last key in the lexicographic order. If keys are uint64 in BigEndian it is also the largest number. If ok is false the index is empty. For example, if we store temperature reading...
MaxKey возвращает максимальный ключ, имеющий заданный searchPrefix, или максимальный ключ в целом индекса, если searchIndex равно nil. Максимальным считается последний ключ в лексикографическом порядке. Если ключи являются uint64 в BigEndian, это также наибольшее число. Если ok равно false, индекс пуст. Например, если ...
func (idx *Tree) MaxKey(searchPrefix []byte) (v uint64, ok bool) { raw, _ := idx.partialSearch(searchPrefix) if raw == 0 { return 0, false } if isLeaf(raw) { return getLeafValue(raw), true } // now find the max searchLoop: for { _, node, count, prefixLen := explodeNode(raw) block := int(node >> blockSlot...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func GetMaxIndexKey(shardID uint64, key []byte) []byte {\n\tkey = getKeySlice(key, idKeyLength)\n\treturn getIDKey(maxIndexSuffix, shardID, key)\n}", "func MaxKey() Val { return Val{t: bsontype.MaxKey} }", "func (this *AllOne) GetMaxKey() string {\n\tif this.tail.pre != this.head {\n\t\tfor k := range this.tai...
[ "0.64017457", "0.63471687", "0.5947757", "0.5752474", "0.56805396", "0.55782866", "0.5567208", "0.55566853", "0.5465598", "0.54230475", "0.5320258", "0.53081363", "0.52548325", "0.52321553", "0.51663005", "0.515594", "0.51534414", "0.5117315", "0.5105535", "0.5103728", "0.506...
0.76495737
0
MinKey returns the minimum key having the given searchPrefix, or the minimum key in the whole index if searchIndex is nil. Minimum means the first key in the lexicographic order. If keys are uint64 in BigEndian it is also the smallest number. If ok is false the index is empty.
MinKey возвращает минимальный ключ, соответствующий заданному searchPrefix, или минимальный ключ в целом по индексу, если searchIndex равен nil. Минимальным считается первый ключ в лексикографическом порядке. Если ключи являются uint64 в формате BigEndian, это также наименьшее число. Если ok имеет значение false, индек...
func (idx *Tree) MinKey(searchPrefix []byte) (v uint64, ok bool) { raw, _ := idx.partialSearch(searchPrefix) if raw == 0 { return 0, false } if isLeaf(raw) { return getLeafValue(raw), true } // now find the min searchLoop: for { _, node, count, prefixLen := explodeNode(raw) block := int(node >> blockSlot...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (tf tFiles) searchMin(icmp *iComparer, ikey internalKey) int {\n\treturn sort.Search(len(tf), func(i int) bool {\n\t\treturn icmp.Compare(tf[i].imin, ikey) >= 0\n\t})\n}", "func (t *binarySearchST) Min() interface{} {\n\tutils.AssertF(!t.IsEmpty(), \"called Min() with empty symbol table\")\n\treturn t.keys[...
[ "0.6254368", "0.5750522", "0.57202524", "0.5673002", "0.5619895", "0.55524933", "0.5537136", "0.5501438", "0.5443638", "0.5435102", "0.540519", "0.536403", "0.53208256", "0.5270773", "0.51773477", "0.5168706", "0.5153912", "0.51201713", "0.51032627", "0.510243", "0.50744075",...
0.7585947
0
Count returns the number of nodes and leaves in the part of tree having the given prefix, or the whole tree if searchPrefix is nil.
Count возвращает количество узлов и листьев в части дерева, имеющей заданный префикс, или всё дерево, если searchPrefix равно nil.
func (idx *Tree) Count(searchPrefix []byte) (nodes, leaves int) { return NewCounter(idx).Count(searchPrefix) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (db *DB) CountPrefix(prefix interface{}, value interface{}, count *int) error {\n\treturn db.bolt.View(func(tx *bolt.Tx) error {\n\t\treturn db.CountPrefixTx(tx, prefix, value, count)\n\t})\n}", "func (db *DB) CountPrefixTx(tx *bolt.Tx, prefix interface{}, value interface{}, count *int) error {\n\t*count = ...
[ "0.676077", "0.6484417", "0.63465744", "0.6022248", "0.6011498", "0.5960126", "0.5949926", "0.57407993", "0.5624859", "0.5569003", "0.5540688", "0.54302657", "0.54262424", "0.5414123", "0.5365138", "0.5362125", "0.53595495", "0.5323589", "0.53140223", "0.53023636", "0.5278311...
0.77689135
0
LookupCalled looks up ssa.Instruction that call the `fn` func in the given instr
LookupCalled ищет ssa.Instruction, вызывающую функцию `fn` в заданном instr
func LookupCalled(instr ssa.Instruction, fn *types.Func) ([]ssa.Instruction, bool) { instrs := []ssa.Instruction{} call, ok := instr.(ssa.CallInstruction) if !ok { return instrs, false } ssaCall := call.Value() if ssaCall == nil { return instrs, false } common := ssaCall.Common() if common == nil { ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *Module) instCall(old *ast.InstCall, resolved, unresolved map[ast.NamedValue]value.Named) bool {\n\tif isUnresolved(unresolved, old.Callee) || isUnresolved(unresolved, old.Args...) {\n\t\treturn false\n\t}\n\tv := m.getLocal(old.Name)\n\tinst, ok := v.(*ir.InstCall)\n\tif !ok {\n\t\tpanic(fmt.Errorf(\"inva...
[ "0.55088776", "0.51450753", "0.5084626", "0.49590853", "0.49253467", "0.49151275", "0.49031597", "0.48806983", "0.48682708", "0.4830155", "0.48227826", "0.47652534", "0.47241217", "0.46917644", "0.4687812", "0.46794826", "0.46600193", "0.46538463", "0.4650809", "0.46494117", ...
0.8261184
0
HasArgs returns whether the given ssa.Instruction has `typ` type args
HasArgs возвращает значение, указывающее, имеет ли заданная ssa.Instruction аргументы типа `typ`
func HasArgs(instr ssa.Instruction, typ types.Type) bool { call, ok := instr.(ssa.CallInstruction) if !ok { return false } ssaCall := call.Value() if ssaCall == nil { return false } for _, arg := range ssaCall.Call.Args { if types.Identical(arg.Type(), typ) { return true } } return false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (i Instruction) IsVariadic() bool {\n\treturn len(i.Arities()) > 1\n}", "func (TypesObject) IsVariadicParam() bool { return boolResult }", "func (f flagString) HasArg() bool {\n\treturn true\n}", "func (a *Args) Has(arg rune) bool {\n\t_, ok := a.marhalers[arg]\n\treturn ok\n}", "func (f flagBool) Has...
[ "0.6620399", "0.6070014", "0.58602", "0.5559968", "0.551633", "0.5394115", "0.53795916", "0.5353696", "0.5310007", "0.5298867", "0.52459556", "0.52079266", "0.5189788", "0.51717234", "0.51651365", "0.5159262", "0.51278657", "0.5124402", "0.51076514", "0.5105842", "0.50955737"...
0.8171181
0
withClerk invokes the specified callback with a clerk that manages the specified queue. If there is no such clerk, withClerk first creates one. The clerk's reference count is incremented for the duration of the callback. withClerk returns whatever the callback returns.
withClerk вызывает указанный обратный вызов с клерком, управляющим указанной очередью. Если такой клерк отсутствует, withClerk сначала создает его. Счетчик ссылок клерка увеличивается на время выполнения обратного вызова. withClerk возвращает то, что возвращает обратный вызов.
func (registry *Registry) withClerk(queue string, callback func(*clerk) error) error { registry.mutex.Lock() entry, found := registry.queues[queue] if !found { entry = &refCountedClerk{ Clerk: clerk{ // TODO: context Enqueue: make(chan messageSend), Dequeue: make(chan messageReceive), Registry...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (this *ModuleManager) CallWithCallback(topic string, f, cb interface{}, cbParams, params []interface{}) (err error) {\n\tif m := this.GetModule(topic); m != nil {\n\t\terr = m.CallWithCallback(f, cb, cbParams, params)\n\t} else {\n\t\t// fmt.Println(this)\n\t\terr = Post.PutQueueWithCallback(f, cb, cbParams, ...
[ "0.5876569", "0.56525135", "0.53222644", "0.47999582", "0.47828177", "0.47699308", "0.47098765", "0.46049252", "0.45920306", "0.4560763", "0.45019993", "0.44990736", "0.4407609", "0.4383445", "0.42866144", "0.42831054", "0.42361563", "0.42217386", "0.4204431", "0.42024133", "...
0.79700077
0
optionalTimeout returns a channel on which the current time will be sent when the specified deadline arrives. Or, if deadline is nil, optionalTimeout returns a nil channel (receives will block forever, i.e. no timeout).
optionalTimeout возвращает канал, на котором будет отправлено текущее время, когда наступит указанный срок. Или, если срок истечения не указан, optionalTimeout возвращает nil-канал (прием будет блокироваться бесконечно, то есть нет таймаута).
func optionalTimeout(deadline *time.Time) <-chan time.Time { var timeout <-chan time.Time if deadline != nil { timeout = time.NewTimer(time.Until(*deadline)).C } return timeout }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (f *Sink) TimeoutChan() <-chan time.Time {\n\treturn f.timeoutTimer.C\n}", "func With_timeout_nowait(ctx context.Context, timeout time.Duration) option {\n\treturn func(o *Group) {\n\t\tif o.Context != nil {\n\t\t\tpanic(\"context already set\")\n\t\t}\n\t\tif ctx == nil {\n\t\t\to.Context, o.CancelFunc = c...
[ "0.5174397", "0.5156724", "0.5065961", "0.5060068", "0.5043165", "0.50363374", "0.4978916", "0.49680018", "0.4962167", "0.49414706", "0.4929812", "0.48641688", "0.4854244", "0.48350728", "0.48332527", "0.48316026", "0.48256624", "0.48114562", "0.47939524", "0.4789711", "0.478...
0.8052867
0
copyHeader adds the HTTP header whose name is the specified `which` from the specified headers `from` to the specified headers `to`.
copyHeader добавляет HTTP-заголовок, имя которого указано в `which`, из указанных заголовков `from` в указанные заголовки `to`.
func copyHeader(which string, from http.Header, to http.Header) { for _, value := range from.Values(which) { to.Add(which, value) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func copyHeader(target, source http.Header) {\n\tfor k, vs := range source {\n\t\ttarget[k] = vs\n\t}\n}", "func copyHeader(src, dest http.Header) {\n\tfor key, val := range src {\n\t\tfor _, v := range val {\n\t\t\tdest.Add(key, v)\n\t\t}\n\t}\n}", "func copyHeader(dst http.Header, src http.Header) {\n\tfor k...
[ "0.7428583", "0.73180294", "0.6969307", "0.6939664", "0.68874514", "0.68320334", "0.68258685", "0.68127483", "0.6698579", "0.66148335", "0.6614227", "0.65428376", "0.62228173", "0.61663586", "0.6070402", "0.5893018", "0.572726", "0.5709158", "0.5704184", "0.56725305", "0.5646...
0.83915895
0
RemoveIfUnused deletes the entry for the specified queue in this registry if its reference count is zero. Return whether the entry has been removed, and any error that occurred.
RemoveIfUnused удаляет запись для указанной очереди в этом реестре, если счетчик ссылок равен нулю. Возвращает, была ли запись удалена, и любую произошедшую ошибку.
func (registry *Registry) RemoveIfUnused(queue string) (bool, error) { registry.mutex.Lock() defer registry.mutex.Unlock() entry, found := registry.queues[queue] if !found { // "Not found" is unexpected, since I expect only the clerk itself // would be trying to remove its queue (so why, then, is it already ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func DeleteTimerQueue(timerQueue HANDLE) bool {\n\tret1 := syscall3(deleteTimerQueue, 1,\n\t\tuintptr(timerQueue),\n\t\t0,\n\t\t0)\n\treturn ret1 != 0\n}", "func (q *Queue) MaybeRemoveMissing(names []string) int {\n\tq.mu.Lock()\n\tsameSize := len(q.items) == len(names)\n\tq.mu.Unlock()\n\n\t// heuristically ski...
[ "0.60027367", "0.5677631", "0.563571", "0.5616582", "0.5497436", "0.5481202", "0.54472536", "0.54457", "0.54185396", "0.53994423", "0.5352575", "0.5277354", "0.52290535", "0.5129753", "0.5122774", "0.5116718", "0.5096262", "0.5095654", "0.50874686", "0.5082583", "0.50537497",...
0.83653677
0
GetSecret returns the value of the NovaScheduler.Spec.Secret
GetSecret возвращает значение NovaScheduler.Spec.Secret
func (n NovaScheduler) GetSecret() string { return n.Spec.Secret }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *AssetReportRefreshRequest) GetSecret() string {\n\tif o == nil || o.Secret == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\treturn *o.Secret\n}", "func GetSecret(tid string) ([]byte, error) {\n\tvar token string\n\n\tif err := db.QueryRow(\"SELECT token FROM event_tasks WHERE id = $1\", tid).\n\t\tS...
[ "0.7372657", "0.72075814", "0.7123475", "0.71159655", "0.70768034", "0.70471925", "0.7036488", "0.69847095", "0.6893502", "0.68894595", "0.68886346", "0.68447804", "0.6838665", "0.68321365", "0.67905784", "0.6787732", "0.6769878", "0.67160785", "0.67097425", "0.6685262", "0.6...
0.9030379
0
NewTravisBuildListCommand will add a `travis build list` command which is responsible for showing a list of build
NewTravisBuildListCommand добавит команду `travis build list`, отвечающую за отображение списка сборок
func NewTravisBuildListCommand(client *travis.Client) *cobra.Command { cmd := &cobra.Command{ Use: "list", Short: "List all the builds", RunE: func(cmd *cobra.Command, args []string) error { return ListBuilds(client, os.Stdout) }, } return cmd }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ListBuilds(client *travis.Client, w io.Writer) error {\n\tfilterBranch := \"master\"\n\n\topt := &travis.RepositoryListOptions{Member: viper.GetString(\"TRAVIS_CI_OWNER\"), Active: true}\n\trepos, _, err := client.Repositories.Find(opt)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\ttr := tabwriter.NewWriter(w,...
[ "0.7019383", "0.6365712", "0.62861466", "0.62341", "0.61762345", "0.61427575", "0.61323035", "0.6077577", "0.5928921", "0.5884531", "0.5867837", "0.58048195", "0.57902944", "0.5639388", "0.56278795", "0.5610364", "0.5604566", "0.5572504", "0.5563013", "0.5516337", "0.5463784"...
0.8401678
0
Bind a `RunnableWithContext` to this runner. WARNING: invoking it when state is StateRunning may cause blocked.
Привяжите `RunnableWithContext` к этому запускатору. ВАЖНО: вызов при состоянии StateRunning может привести к блокировке.
func (s *DeterminationWithContext) Bind(ctx context.Context, runnable RunnableWithContext) *DeterminationWithContext { defer s.lock.Unlock() /*_*/ s.lock.Lock() s.rctx = ctx s.runn = runnable return s }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (tx *WriteTx) RunWithContext(ctx context.Context) error {\n\tif tx.err != nil {\n\t\treturn tx.err\n\t}\n\tinput, err := tx.input()\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = retry(ctx, func() error {\n\t\tout, err := tx.db.client.TransactWriteItemsWithContext(ctx, input)\n\t\tif tx.cc != nil && out != ...
[ "0.6004581", "0.5999245", "0.59970725", "0.5727529", "0.56164736", "0.55119467", "0.5381095", "0.5210632", "0.52035266", "0.5194531", "0.5181738", "0.51611114", "0.5145714", "0.5078032", "0.50537634", "0.5029204", "0.5004192", "0.49929345", "0.4977733", "0.49630624", "0.49399...
0.7612144
0
WhileRunning do something if it is running. It provides a context o check if it stops.
Пока выполняется, выполняйте что-то, если она запущена. Она предоставляет контекст для проверки, остановлена ли она.
func (s *DeterminationWithContext) WhileRunning(do func(context.Context) error) error { return s.whilerunning(func() error { select { case <-s.sctx.Done(): return ErrRunnerIsClosing default: return do(s.sctx) } }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *Manager) WaitUntilRunning() {\n\tfor {\n\t\tm.mu.Lock()\n\n\t\tif m.ctx != nil {\n\t\t\tm.mu.Unlock()\n\t\t\treturn\n\t\t}\n\n\t\tstarted := m.started\n\t\tm.mu.Unlock()\n\n\t\t// Block until we have been started.\n\t\t<-started\n\t}\n}", "func (s *Stopwatch) isRunning() bool {\n\treturn !s.refTime.IsZe...
[ "0.622798", "0.61385405", "0.6091839", "0.5883035", "0.58240783", "0.57762426", "0.56919473", "0.5631193", "0.56184846", "0.5609338", "0.5568484", "0.55551463", "0.5537527", "0.55302274", "0.5524895", "0.5518544", "0.549713", "0.544841", "0.54235667", "0.5421718", "0.53941876...
0.7218582
0
RecordReqDuration records the duration of given operation in metrics system
RecordReqDuration записывает продолжительность заданной операции в систему метрик
func (pr PrometheusRecorder) RecordReqDuration(jenkinsService, operation string, code int, elapsedTime float64) { reportRequestDuration(jenkinsService, operation, code, elapsedTime) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func recordDuration(name string, hostname string, path string, method string, duration float64) {\n\trequestDurations.WithLabelValues(name, hostname, path, method).Observe(duration)\n}", "func (me *Metrics) RecordRequestTime(labels Labels, length time.Duration) {\n\t// Only record times for successful requests, ...
[ "0.7509087", "0.6741319", "0.6448921", "0.601776", "0.58529365", "0.5823079", "0.573807", "0.5685555", "0.5597103", "0.5575818", "0.5555443", "0.55546105", "0.5551546", "0.5550965", "0.54829746", "0.54797477", "0.54717624", "0.5451511", "0.5430681", "0.5402279", "0.5385498", ...
0.83944345
0
CreateListFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
CreateListFromDiscriminatorValue создает новый экземпляр соответствующего класса на основе значения дискриминатора
func CreateListFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewList(), nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func CreateBrowserSiteListFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {\n return NewBrowserSiteList(), nil\n}", "func CreateSharepointIdsFromDiscriminatorValue(p...
[ "0.7130501", "0.65420735", "0.6469803", "0.63655806", "0.62998223", "0.62049437", "0.61957437", "0.61202574", "0.61152625", "0.6078244", "0.6048618", "0.60275096", "0.601459", "0.59926915", "0.596089", "0.59600526", "0.5952939", "0.59473586", "0.59227026", "0.59070474", "0.58...
0.85900795
0
GetColumns gets the columns property value. The collection of field definitions for this list.
GetColumns получает значение свойства columns. Коллекция определений полей для этого списка.
func (m *List) GetColumns()([]ColumnDefinitionable) { return m.columns }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *Model) GetColumns() []Column {\n\treturn m.Columns\n}", "func (fmd *FakeMysqlDaemon) GetColumns(ctx context.Context, dbName, table string) ([]*querypb.Field, []string, error) {\n\treturn []*querypb.Field{}, []string{}, nil\n}", "func (c *Client) GetColumns(sheetID string) (cols []Column, err error) {\...
[ "0.6995068", "0.6583713", "0.65590763", "0.6495269", "0.64883107", "0.63101625", "0.6274126", "0.6241689", "0.6212528", "0.6161865", "0.605871", "0.60496694", "0.6028404", "0.6013853", "0.599702", "0.5981092", "0.5973022", "0.5952178", "0.59382784", "0.5925666", "0.58940035",...
0.76532036
0
GetContentTypes gets the contentTypes property value. The collection of content types present in this list.
GetContentTypes получает значение свойства contentTypes. Коллекция типов содержимого, присутствующих в этом списке.
func (m *List) GetContentTypes()([]ContentTypeable) { return m.contentTypes }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *LastMileAccelerationOptions) GetContentTypes() []string {\n\tif o == nil || o.ContentTypes == nil {\n\t\tvar ret []string\n\t\treturn ret\n\t}\n\treturn *o.ContentTypes\n}", "func (m *List) SetContentTypes(value []ContentTypeable)() {\n m.contentTypes = value\n}", "func (set *ContentTypeSet) Types(...
[ "0.77380264", "0.7120515", "0.6951072", "0.683847", "0.6325658", "0.63171864", "0.62789446", "0.61402726", "0.6130467", "0.6012503", "0.5989417", "0.5985794", "0.59765583", "0.58592784", "0.56957906", "0.56474996", "0.5573628", "0.5445044", "0.5442282", "0.54262537", "0.54202...
0.79392874
0
GetDisplayName gets the displayName property value. The displayable title of the list.
GetDisplayName получает значение свойства displayName. Отображаемое название списка.
func (m *List) GetDisplayName()(*string) { return m.displayName }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *DeviceClient) GetDisplayName() string {\n\tif o == nil || o.DisplayName == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\treturn *o.DisplayName\n}", "func (o *RoleWithAccess) GetDisplayName() string {\n\tif o == nil || o.DisplayName == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\treturn *o.Displ...
[ "0.7741837", "0.7733561", "0.74696445", "0.7466271", "0.74494886", "0.7443389", "0.74368083", "0.7429317", "0.7401814", "0.74005044", "0.73881435", "0.73865306", "0.73865306", "0.7367366", "0.7334453", "0.73278743", "0.73046476", "0.72927064", "0.727479", "0.7256103", "0.7253...
0.83683056
0
GetDrive gets the drive property value. Only present on document libraries. Allows access to the list as a [drive][] resource with [driveItems][driveItem].
GetDrive получает значение свойства drive. Доступно только для библиотек документов. Позволяет получить доступ к списку как к ресурсу [drive][] с [driveItems][driveItem].
func (m *List) GetDrive()(Driveable) { return m.drive }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *Block) GetDrive(ctx context.Context) (drive dbus.ObjectPath, err error) {\n\terr = o.object.CallWithContext(ctx, \"org.freedesktop.DBus.Properties.Get\", 0, InterfaceBlock, \"Drive\").Store(&drive)\n\treturn\n}", "func (m *Group) GetDrive()(Driveable) {\n return m.drive\n}", "func (m *User) GetDriv...
[ "0.752509", "0.7201301", "0.7189572", "0.6953924", "0.6819783", "0.6769293", "0.6731472", "0.66618615", "0.64475167", "0.6344764", "0.62929523", "0.6108446", "0.5979537", "0.59536654", "0.59533954", "0.59533954", "0.5950644", "0.59289634", "0.5919691", "0.5914934", "0.5872783...
0.78761816
0
GetItems gets the items property value. All items contained in the list.
GetItems получает значение свойства items. Все элементы, содержащиеся в списке.
func (m *List) GetItems()([]ListItemable) { return m.items }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (l *RestAPIList) GetItems() []resource.Managed {\n\titems := make([]resource.Managed, len(l.Items))\n\tfor i := range l.Items {\n\t\titems[i] = &l.Items[i]\n\t}\n\treturn items\n}", "func GetItems(c *gin.Context) {\n\tvar items []model.ItemJson\n\terr := util.DB.Table(\"items\").Find(&items).Error\n\tif err...
[ "0.75478745", "0.744459", "0.7434444", "0.74341697", "0.7407838", "0.73677117", "0.73617125", "0.7360272", "0.7359669", "0.7346144", "0.7336508", "0.7334327", "0.73200595", "0.7295804", "0.72761357", "0.72758305", "0.72643614", "0.7261494", "0.72567713", "0.7251349", "0.72445...
0.7805831
0
GetList gets the list property value. Provides additional details about the list.
GetList получает значение свойства списка. Предоставляет дополнительные сведения о списке.
func (m *List) GetList()(ListInfoable) { return m.list }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (client *ClientImpl) GetList(ctx context.Context, args GetListArgs) (*PickList, error) {\n\trouteValues := make(map[string]string)\n\tif args.ListId == nil {\n\t\treturn nil, &azuredevops.ArgumentNilError{ArgumentName: \"args.ListId\"}\n\t}\n\trouteValues[\"listId\"] = (*args.ListId).String()\n\n\tlocationId,...
[ "0.7402214", "0.7211892", "0.7197566", "0.7090484", "0.7002887", "0.69607484", "0.69395965", "0.68194044", "0.6801362", "0.67747223", "0.6725991", "0.663443", "0.66022295", "0.6588623", "0.65876096", "0.65801454", "0.65714175", "0.65714175", "0.6566503", "0.6454622", "0.64090...
0.7468337
0
GetOperations gets the operations property value. The collection of longrunning operations on the list.
GetOperations получает значение свойства operations. Коллекция долгоживущих операций в списке.
func (m *List) GetOperations()([]RichLongRunningOperationable) { return m.operations }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (e *Endpoint) GetOperations() []models.EndpointOperation {\n\treturn e.Operations\n}", "func GetOperations() ([]dtos.Operation, error) {\n\tvar ops []dtos.Operation\n\n\tresp, err := makeJSONRequest(\"GET\", apiURL+\"/operations\", http.NoBody)\n\tif err != nil {\n\t\treturn ops, errors.Append(err, ErrCanno...
[ "0.7211943", "0.7144373", "0.7129846", "0.7005646", "0.6984113", "0.6979087", "0.6979087", "0.6970134", "0.6949761", "0.6890829", "0.6889747", "0.6889747", "0.68835425", "0.68729496", "0.68609893", "0.68579656", "0.68536425", "0.67909795", "0.6768954", "0.6740723", "0.6734948...
0.83329624
0
GetSharepointIds gets the sharepointIds property value. Returns identifiers useful for SharePoint REST compatibility. Readonly.
GetSharepointIds получает значение свойства sharepointIds. Возвращает идентификаторы, полезные для совместимости с SharePoint REST. Только для чтения.
func (m *List) GetSharepointIds()(SharepointIdsable) { return m.sharepointIds }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *Drive) GetSharePointIds()(SharepointIdsable) {\n return m.sharePointIds\n}", "func (o *MicrosoftGraphItemReference) GetSharepointIds() AnyOfmicrosoftGraphSharepointIds {\n\tif o == nil || o.SharepointIds == nil {\n\t\tvar ret AnyOfmicrosoftGraphSharepointIds\n\t\treturn ret\n\t}\n\treturn *o.Sharepoi...
[ "0.8100934", "0.79997236", "0.7919966", "0.67751956", "0.6737591", "0.6716384", "0.66700727", "0.64469844", "0.6421894", "0.62926507", "0.6288443", "0.614765", "0.5920941", "0.5585824", "0.5475095", "0.54425955", "0.5382097", "0.5301088", "0.5294862", "0.5176188", "0.51289743...
0.80914927
1
GetSubscriptions gets the subscriptions property value. The set of subscriptions on the list.
GetSubscriptions получает значение свойства subscriptions. Сет subscriptions на списке.
func (m *List) GetSubscriptions()([]Subscriptionable) { return m.subscriptions }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (svc *SubscriptionService) GetSubscriptions(params *param.GetParams) ([]*nimbleos.Subscription, error) {\n\tsubscriptionResp, err := svc.objectSet.GetObjectListFromParams(params)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn subscriptionResp, nil\n}", "func (c *Client) GetSubscriptions(queryParams ...
[ "0.7868426", "0.7729767", "0.7729074", "0.7635478", "0.75740594", "0.74823356", "0.7409729", "0.7403774", "0.7206823", "0.71313256", "0.7025433", "0.7023735", "0.69475216", "0.6929064", "0.6929064", "0.69113976", "0.6910021", "0.68576664", "0.6846115", "0.6791046", "0.6753372...
0.8141
0
SetColumns sets the columns property value. The collection of field definitions for this list.
SetColumns задает значение свойства columns. Коллекция определений полей для этого списка.
func (m *List) SetColumns(value []ColumnDefinitionable)() { m.columns = value }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Creater) SetColumns(c1 []builder.Columns) builder.Creater {\n\n\tcolumnDefs := make([]string, 0, len(c1))\n\n\tfor _, item := range c1 {\n\t\tcolumnDefs = append(columnDefs, fmt.Sprintf(\"%s %s %s\", item.Name, item.Datatype, item.Constraint))\n\t}\n\n\tcolumns := strings.Join(columnDefs, seperator)\n\tc....
[ "0.69769454", "0.6804708", "0.67329115", "0.65630496", "0.6390641", "0.6051947", "0.6024405", "0.5607218", "0.5591005", "0.556967", "0.55185026", "0.5513934", "0.5410269", "0.539816", "0.53536016", "0.5328212", "0.52258617", "0.52192163", "0.52094", "0.51368654", "0.5131282",...
0.7975869
0
SetContentTypes sets the contentTypes property value. The collection of content types present in this list.
SetContentTypes задает значение свойства contentTypes. Коллекция типов содержимого, присутствующих в этом списке.
func (m *List) SetContentTypes(value []ContentTypeable)() { m.contentTypes = value }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *LastMileAccelerationOptions) SetContentTypes(v []string) {\n\to.ContentTypes = &v\n}", "func (o *ExtrasSavedFiltersListParams) SetContentTypes(contentTypes *string) {\n\to.ContentTypes = contentTypes\n}", "func ContentTypes(types []string, blacklist bool) Option {\n\treturn func(c *config) error {\n\t...
[ "0.8701873", "0.81465465", "0.7151172", "0.70922256", "0.67580223", "0.6733916", "0.672834", "0.6628651", "0.65903586", "0.6576717", "0.6566702", "0.64906377", "0.64708567", "0.64687985", "0.643722", "0.63983715", "0.634481", "0.59890896", "0.59173846", "0.5863382", "0.586291...
0.82240343
1
SetDrive sets the drive property value. Only present on document libraries. Allows access to the list as a [drive][] resource with [driveItems][driveItem].
SetDrive задает значение свойства drive. Наличие свойства ограничено документными библиотеками. Позволяет получить доступ к списку как к ресурсу [drive][] с элементами [driveItems][driveItem].
func (m *List) SetDrive(value Driveable)() { m.drive = value }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *Group) SetDrive(value Driveable)() {\n m.drive = value\n}", "func (m *User) SetDrive(value Driveable)() {\n m.drive = value\n}", "func (o *User) SetDrive(v AnyOfmicrosoftGraphDrive) {\n\to.Drive = &v\n}", "func (o *User) SetDrive(v Drive) {\n\to.Drive = &v\n}", "func (m *Drive) SetDriveType(...
[ "0.7992977", "0.78732735", "0.7630548", "0.7536296", "0.69157124", "0.6463099", "0.6364722", "0.62700015", "0.6150766", "0.5855303", "0.5782538", "0.57769513", "0.5764786", "0.5764786", "0.57268894", "0.57063174", "0.56432295", "0.55852723", "0.5579085", "0.55205274", "0.5448...
0.8223476
0
SetList sets the list property value. Provides additional details about the list.
SetList устанавливает значение свойства списка. Предоставляет дополнительные сведения о списке.
func (m *List) SetList(value ListInfoable)() { m.list = value }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *Drive) SetList(value Listable)() {\n m.list = value\n}", "func (this *Iter) SetList(l *[]interface{}) {\n\tthis.list = l\n\tthis.index = -1\n\tthis.currentPage = 1\n}", "func (options *ListJobsOptions) SetList(list string) *ListJobsOptions {\n\toptions.List = core.StringPtr(list)\n\treturn options\...
[ "0.7852837", "0.7834302", "0.7707903", "0.76114416", "0.7607494", "0.75335294", "0.7371298", "0.7231533", "0.7130639", "0.68794", "0.68399435", "0.67001563", "0.66798425", "0.66119003", "0.65419525", "0.6505559", "0.6407199", "0.6404088", "0.6371527", "0.6308061", "0.62936723...
0.8415547
0
SetOperations sets the operations property value. The collection of longrunning operations on the list.
SetOperations задает значение свойства operations. Коллекция долгоживущих операций в списке.
func (m *List) SetOperations(value []RichLongRunningOperationable)() { m.operations = value }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *ExternalConnection) SetOperations(value []ConnectionOperationable)() {\n m.operations = value\n}", "func (m *Workbook) SetOperations(value []WorkbookOperationable)() {\n m.operations = value\n}", "func (m *List) GetOperations()([]RichLongRunningOperationable) {\n return m.operations\n}", "f...
[ "0.7198802", "0.69220114", "0.66551083", "0.6605073", "0.6553442", "0.6553442", "0.6538797", "0.6449035", "0.6385875", "0.63704", "0.6315704", "0.6312198", "0.62994707", "0.61955124", "0.6192981", "0.6184774", "0.6169092", "0.61600715", "0.61439407", "0.6048", "0.6038706", ...
0.8358397
0
SetSharepointIds sets the sharepointIds property value. Returns identifiers useful for SharePoint REST compatibility. Readonly.
SetSharepointIds задает значение свойства sharepointIds. Возвращает идентификаторы, полезные для совместимости с SharePoint REST. Только для чтения.
func (m *List) SetSharepointIds(value SharepointIdsable)() { m.sharepointIds = value }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *MicrosoftGraphListItem) SetSharepointIds(v AnyOfmicrosoftGraphSharepointIds) {\n\to.SharepointIds = &v\n}", "func (o *MicrosoftGraphItemReference) SetSharepointIds(v AnyOfmicrosoftGraphSharepointIds) {\n\to.SharepointIds = &v\n}", "func (m *Drive) SetSharePointIds(value SharepointIdsable)() {\n m.s...
[ "0.7952072", "0.7934823", "0.77746314", "0.75141704", "0.750047", "0.6807269", "0.6786915", "0.67614096", "0.6590971", "0.63483787", "0.6196856", "0.5963558", "0.59606564", "0.57671094", "0.556037", "0.544962", "0.5333266", "0.53018636", "0.5215398", "0.51930815", "0.5125199"...
0.8109699
0
SetSubscriptions sets the subscriptions property value. The set of subscriptions on the list.
SetSubscriptions задает значение свойства subscriptions. Сет subscriptions на списке.
func (m *List) SetSubscriptions(value []Subscriptionable)() { m.subscriptions = value }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (mr *MockSessionMockRecorder) SetSubscriptions(arg0 interface{}) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"SetSubscriptions\", reflect.TypeOf((*MockSession)(nil).SetSubscriptions), arg0)\n}", "func (m *MockSession) SetSubscriptions(arg0 []*nats.Subs...
[ "0.6805649", "0.6752347", "0.64073074", "0.6334549", "0.6187249", "0.6187249", "0.6186094", "0.6131424", "0.61299884", "0.6005485", "0.6001537", "0.5987716", "0.5975161", "0.5895233", "0.5893747", "0.5869636", "0.5850222", "0.5823477", "0.57931256", "0.57788503", "0.5737833",...
0.8208021
0
SetSystem sets the system property value. If present, indicates that this is a systemmanaged list. Readonly.
SetSystem устанавливает значение системного свойства. Если присутствует, указывает, что это список, управляемый системой. Только для чтения.
func (m *List) SetSystem(value SystemFacetable)() { m.system = value }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *RoleWithAccess) SetSystem(v bool) {\n\to.System = &v\n}", "func (o *IamServiceProviderAllOf) SetSystem(v IamSystemRelationship) {\n\to.System = &v\n}", "func (m *Drive) SetSystem(value SystemFacetable)() {\n m.system = value\n}", "func (m *AndroidManagedStoreApp) SetIsSystemApp(value *bool)() {\n...
[ "0.7896474", "0.72561866", "0.6967416", "0.6135101", "0.60012877", "0.5942262", "0.57586634", "0.57460856", "0.5723831", "0.5708102", "0.56640434", "0.5659007", "0.5594216", "0.5577806", "0.5535843", "0.5497821", "0.54853433", "0.5480487", "0.547595", "0.5474845", "0.54435337...
0.78210694
1
ReqParticipant specifies the participation role for the calendar user specified by the property is a required participant, REQPARTICIPANT.
ReqParticipant определяет роль участия для пользователя календаря, указанным свойством является обязательным участником, REQPARTICIPANT.
func ReqParticipant() parameter.Parameter { return Other("REQ-PARTICIPANT") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func OptParticipant() parameter.Parameter {\n\treturn Other(\"OPT-PARTICIPANT\")\n}", "func (s *ChannelDefinition) SetParticipantRole(v string) *ChannelDefinition {\n\ts.ParticipantRole = &v\n\treturn s\n}", "func (s *TranscriptFilter) SetParticipantRole(v string) *TranscriptFilter {\n\ts.ParticipantRole = &v\...
[ "0.6335902", "0.6020651", "0.5960029", "0.59365475", "0.59108174", "0.58237433", "0.55794024", "0.55225873", "0.5517706", "0.53861356", "0.5348708", "0.53117955", "0.5155773", "0.5102707", "0.50262994", "0.49464083", "0.4815764", "0.4769822", "0.47673255", "0.47654703", "0.47...
0.8265217
0
OptParticipant specifies the participation role for the calendar user specified by the property is an optional participant, OPTPARTICIPANT.
OptParticipant определяет роль участия для пользователя календаря, указываемого свойством, являющегося необязательным участником, OPTPARTICIPANT.
func OptParticipant() parameter.Parameter { return Other("OPT-PARTICIPANT") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ReqParticipant() parameter.Parameter {\n\treturn Other(\"REQ-PARTICIPANT\")\n}", "func (s *TranscriptFilter) SetParticipantRole(v string) *TranscriptFilter {\n\ts.ParticipantRole = &v\n\treturn s\n}", "func (s *ParticipantTimerConfiguration) SetParticipantRole(v string) *ParticipantTimerConfiguration {\n\...
[ "0.6225694", "0.5972394", "0.5920174", "0.58749056", "0.5850301", "0.582409", "0.577012", "0.5664515", "0.5388283", "0.532105", "0.53170985", "0.5031255", "0.49427384", "0.4867233", "0.4839651", "0.47024885", "0.46469593", "0.46357363", "0.4633046", "0.4591002", "0.45416632",...
0.80076027
0
NonParticipant specifies the participation role for the calendar user specified by the property is a nonparticipant, NONPARTICIPANT.
NonParticipant определяет роль участия для календарного пользователя, указанного свойством является неучастником, NONPARTICIPANT.
func NonParticipant() parameter.Parameter { return Other("NON-PARTICIPANT") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (rec *RawEventCreate) SetNonInteractive(b bool) *RawEventCreate {\n\trec.mutation.SetNonInteractive(b)\n\treturn rec\n}", "func OutcomeOverviewParticipantsNotIn(vs ...string) predicate.OutcomeOverview {\n\tv := make([]interface{}, len(vs))\n\tfor i := range v {\n\t\tv[i] = vs[i]\n\t}\n\treturn predicate.Out...
[ "0.54938054", "0.5477978", "0.5378485", "0.5321094", "0.5321094", "0.5321094", "0.5321094", "0.5321094", "0.5321094", "0.5321094", "0.5321094", "0.5321094", "0.5321094", "0.5267588", "0.52520335", "0.52256835", "0.51861835", "0.51774764", "0.5175691", "0.516526", "0.5157808",...
0.7944042
0
EscrowBalance returns the escrow balance for the ID.
EscrowBalance возвращает баланс эскроу для идентификатора.
func (s *ImmutableState) EscrowBalance(id signature.PublicKey) *quantity.Quantity { account := s.Account(id) return account.Escrow.Active.Balance.Clone() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func GetAccountBalanceById(w http.ResponseWriter, r *http.Request) {\n\tparams := mux.Vars(r)\n\n\taccountID, erro := strconv.ParseUint(params[\"accountID\"], 10, 64)\n\tif erro != nil {\n\t\tresponses.Error(w, http.StatusBadRequest, erro)\n\t\treturn\n\t}\n\n\tdb, erro := database.Connect()\n\tif erro != nil {\n\...
[ "0.55822587", "0.54363596", "0.54326504", "0.52948654", "0.5267713", "0.52443856", "0.5239745", "0.52388304", "0.5234785", "0.5226584", "0.5223258", "0.51968634", "0.51808625", "0.5170468", "0.51638365", "0.5147292", "0.51023656", "0.5096022", "0.5095926", "0.50698835", "0.50...
0.80400485
0
TransferFromCommon transfers up to the amount from the global common pool to the general balance of the account, returning true iff the amount transferred is > 0. WARNING: This is an internal routine to be used to implement incentivization policy, and MUST NOT be exposed outside of backend implementations.
TransferFromCommon переносит до указанной суммы из глобального общего пула на общий баланс аккаунта, возвращая true, если сумма переведена больше нуля. ВНИМАНИЕ: Это внутренняя процедура, предназначенная для реализации политики стимулирования, и ЕЕ НЕ СЛЕДУЕТ ЭКСПОНИРОВАТЬ ВНЕ СЕРВЕРНЫХ ИМПЛЕМЕНТАЦИЙ.
func (s *MutableState) TransferFromCommon(ctx *abci.Context, toID signature.PublicKey, amount *quantity.Quantity) (bool, error) { commonPool, err := s.CommonPool() if err != nil { return false, errors.Wrap(err, "staking: failed to query common pool for transfer") } to := s.Account(toID) transfered, err := quant...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func CanTransfer(view *txo.UtxoViewpoint, block *asiutil.Block, db fvm.StateDB, addr common.Address,\n\tamount *big.Int, vtx *virtualtx.VirtualTransaction, calculateBalanceFunc fvm.CalculateBalanceFunc, assets *protos.Asset) bool {\n\tif amount.Cmp(common.Big0) == 0 {\n\t\treturn true\n\t}\n\tif assets == nil {\n\...
[ "0.59644663", "0.5832566", "0.576338", "0.5730674", "0.54021853", "0.5374337", "0.53338605", "0.53338605", "0.5328754", "0.5288938", "0.5288938", "0.5288416", "0.5273202", "0.5263543", "0.5263543", "0.5263543", "0.52464753", "0.52325016", "0.5202835", "0.5197652", "0.51842266...
0.7480716
0
AddRewards computes and transfers a staking reward to active escrow accounts. If an error occurs, the pool and affected accounts are left in an invalid state. This may fail due to the common pool running out of tokens. In this case, the returned error's cause will be `staking.ErrInsufficientBalance`, and it should be s...
AddRewards вычисляет и переводит стакинговое вознаграждение на активные счета в режиме эскроу. Если произойдет ошибка, пулы и затронутые аккаунты останутся в неверном состоянии. Это может завершиться неудачей из-за исчерпания токенов в общем пуле. В этом случае причина возвращаемой ошибки будет `staking.ErrInsufficient...
func (s *MutableState) AddRewards(time epochtime.EpochTime, factor *quantity.Quantity, accounts []signature.PublicKey) error { steps, err := s.RewardSchedule() if err != nil { return err } var activeStep *staking.RewardStep for _, step := range steps { if time < step.Until { activeStep = &step break } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func accumulateRewards(config *params.ChainConfig, state *state.DB, header *types.Header) {\n\t// TODO: implement mining rewards\n}", "func (_RandomBeacon *RandomBeaconTransactor) WithdrawRewards(opts *bind.TransactOpts, stakingProvider common.Address) (*types.Transaction, error) {\n\treturn _RandomBeacon.contra...
[ "0.6756725", "0.64123845", "0.6352972", "0.6323859", "0.6277504", "0.6244347", "0.6214062", "0.6086639", "0.598928", "0.59732753", "0.5944851", "0.5910994", "0.58423203", "0.5786412", "0.5620724", "0.5618472", "0.5605595", "0.55774486", "0.5538607", "0.54995674", "0.54924965"...
0.76440066
0
AddRewardSingleAttenuated computes, scales, and transfers a staking reward to an active escrow account.
AddRewardSingleAttenuated вычисляет, масштабирует и переносит стакинг-приз в активный счет-гарантия.
func (s *MutableState) AddRewardSingleAttenuated(time epochtime.EpochTime, factor *quantity.Quantity, attenuationNumerator, attenuationDenominator int, account signature.PublicKey) error { steps, err := s.RewardSchedule() if err != nil { return err } var activeStep *staking.RewardStep for _, step := range steps ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Coinbase) AddReward(output *Output) {\n\toutput.EncryptedMask = make([]byte, 1)\n\tc.Rewards = append(c.Rewards, output)\n}", "func (a Actor) AwardBlockReward(rt vmr.Runtime, params *AwardBlockRewardParams) *adt.EmptyValue {\n\trt.ValidateImmediateCallerIs(builtin.SystemActorAddr)\n\tAssertMsg(rt.Curren...
[ "0.612093", "0.59551144", "0.59414524", "0.5776947", "0.5700438", "0.5679214", "0.54675496", "0.53945607", "0.53710365", "0.52962494", "0.52574825", "0.5234012", "0.52230954", "0.5210352", "0.5163299", "0.514713", "0.5118373", "0.5050562", "0.50385445", "0.5029193", "0.499178...
0.84411126
0
NewMerkleBlobAccess creates an adapter that validates that blobs read from and written to storage correspond with the digest that is used for identification. It ensures that the size and the SHA256 based checksum match. This is used to ensure clients cannot corrupt the CAS and that if corruption were to occur, use of c...
NewMerkleBlobAccess создает адаптер, который проверяет, соответствуют ли данные, считываемые из и записываемые в хранилище, дайджесту, используемому для идентификации. Он гарантирует, что размер и контрольная сумма, основанная на SHA256, совпадают. Это используется для обеспечения того, чтобы клиенты не могли повредить...
func NewMerkleBlobAccess(blobAccess BlobAccess) BlobAccess { return &merkleBlobAccess{ BlobAccess: blobAccess, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewFlatBlobAccess(keyLocationMap KeyLocationMap, locationBlobMap LocationBlobMap, digestKeyFormat digest.KeyFormat, lock *sync.RWMutex, storageType string, capabilitiesProvider capabilities.Provider) blobstore.BlobAccess {\n\tflatBlobAccessPrometheusMetrics.Do(func() {\n\t\tprometheus.MustRegister(flatBlobAcc...
[ "0.58413476", "0.5624401", "0.5494648", "0.5427737", "0.5140033", "0.50221825", "0.49835172", "0.4974719", "0.49557987", "0.49510318", "0.4940078", "0.4915983", "0.49132773", "0.48539382", "0.48506436", "0.48390308", "0.48285547", "0.4827324", "0.4816197", "0.47794566", "0.47...
0.75446844
0
Restart restarts the application
Перезапуск перезапускает приложение
func Restart() { log.Println("An error has occured, restarting the app") file, _ := osext.Executable() syscall.Exec(file, os.Args, os.Environ()) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func Restart(args ...string) {\n logger.Log(fmt.Sprintf(\"Restarting %v\\n\", process))\n Stop(args...)\n Start(args...)\n}", "func (r *Runner) Restart(application *config.Application) {\n\tif cmd, ok := r.cmds[application.Name]; ok {\n\t\tpgid, err := syscall.Getpgid(cmd.Process.Pid)\n\t\tif err == nil {\n\t...
[ "0.74956864", "0.7276446", "0.724625", "0.7144054", "0.70957565", "0.7012717", "0.7004468", "0.69704926", "0.6808136", "0.67299974", "0.6707739", "0.6671288", "0.66431946", "0.66143584", "0.65433764", "0.6533106", "0.6501655", "0.64996433", "0.6497295", "0.6495759", "0.649499...
0.77647364
0
IsInputNode returns whether Node is InputNode
IsInputNode возвращает true, если Node является InputNode
func (inNode *InputNode) IsInputNode() bool { return true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func isInput(n *html.Node) bool {\n\treturn n.Type == html.ElementNode && n.Data == \"input\"\n}", "func (neuron *Neuron) IsInput() bool {\n\tif neuron.Net == nil {\n\t\treturn false\n\t}\n\treturn neuron.Net.IsInput(neuron.neuronIndex)\n}", "func (w *Wire) IsInput() bool {\n\treturn w.input == nil\n}", "fun...
[ "0.77378595", "0.7563745", "0.7193405", "0.6881346", "0.6374417", "0.6312678", "0.6054738", "0.5895529", "0.5886826", "0.5841217", "0.58025974", "0.5732391", "0.56517136", "0.562411", "0.56054157", "0.5595582", "0.5592241", "0.5553411", "0.5546443", "0.5511153", "0.54900104",...
0.87470484
0
InStream returns the internal MsgStream
InStream возвращает внутренний MsgStream
func (inNode *InputNode) InStream() msgstream.MsgStream { return inNode.inStream }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *eventSourceMessageReceivedClient) GetStream() rpcc.Stream { return c.Stream }", "func (c *signedExchangeReceivedClient) GetStream() rpcc.Stream { return c.Stream }", "func (s *Chan) In() chan []byte {\n\treturn s.inMsgChan\n}", "func In(stream pb.Chat_StreamClient, ch chan pb.Message) {\n\tfor {\n\t...
[ "0.6105474", "0.6063308", "0.58948004", "0.5838755", "0.58044165", "0.57779425", "0.57277787", "0.5700929", "0.5552331", "0.55458105", "0.5520131", "0.5516159", "0.54422444", "0.54403114", "0.54284227", "0.54207987", "0.5408762", "0.53644747", "0.5340302", "0.5325053", "0.532...
0.7173401
0
NewInputNode composes an InputNode with provided MsgStream, name and parameters
NewInputNode составляет InputNode с предоставленным MsgStream, именем и параметрами
func NewInputNode(inStream msgstream.MsgStream, nodeName string, maxQueueLength int32, maxParallelism int32, role string, nodeID int64, collectionID int64, dataType string) *InputNode { baseNode := BaseNode{} baseNode.SetMaxQueueLength(maxQueueLength) baseNode.SetMaxParallelism(maxParallelism) return &InputNode{ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewInput(Name string, Type string, Repr msgs.Representation, Chan string, Default msgs.Message) Input {\n\n\t// Validates if the message-type is registered\n\tif !msgs.IsMessageTypeRegistered(Type) {\n\t\terrorString := fmt.Sprintf(\"The '%s' message type has not been registered!\", Type)\n\t\tpanic(errorStri...
[ "0.6755735", "0.6387063", "0.6107659", "0.6013483", "0.60084355", "0.5982119", "0.59718966", "0.5887658", "0.57997257", "0.57652515", "0.5739579", "0.56995016", "0.5677465", "0.55904806", "0.5589528", "0.5555853", "0.5499458", "0.5491909", "0.54152054", "0.540663", "0.5405652...
0.7976249
0
ODataCount returns the number of rows from a table
ODataCount возвращает количество строк из таблицы
func ODataCount(db *sql.DB, table string) (int, error) { var count int selectStmt := fmt.Sprintf("SELECT count(*) FROM %s", pq.QuoteIdentifier(table)) row := db.QueryRow(selectStmt) err := row.Scan(&count) if err != nil { return 0, err } return count, nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (s *RepositoryService) Count(rs app.RequestScope) (int64, error) {\n\treturn s.dao.Count(rs.DB())\n}", "func (eq *EntityQuery) Count(ctx context.Context) (int, error) {\n\tif err := eq.prepareQuery(ctx); err != nil {\n\t\treturn 0, err\n\t}\n\treturn eq.sqlCount(ctx)\n}", "func (s *NewsService) Count(rs a...
[ "0.65731376", "0.6423667", "0.6399858", "0.6366155", "0.6364464", "0.6363455", "0.63600063", "0.63275915", "0.6326546", "0.62999713", "0.6288543", "0.6251071", "0.6241342", "0.62159956", "0.6206949", "0.62037224", "0.6189948", "0.6167601", "0.61594486", "0.61513174", "0.61453...
0.8465603
0
post handleDBGettokenizedcards receive and handle the request from client, access DB, and web
post handleDBGettokenizedcards получает и обрабатывает запрос от клиента, обращается к базе данных и вебу
func handleDBPostGettokenizedcards(w http.ResponseWriter, r *http.Request) { defer func() { db.Connection.Close(nil) }() var errorGeneral string var errorGeneralNbr string var requestData modelito.RequestTokenizedCards errorGeneral="" requestData, errorGeneral=obtainPostParmsGettokenizedca...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func handleDBGeneratetokenized(w http.ResponseWriter, r *http.Request) {\n\tdefer func() {\n\t\tdb.Connection.Close(nil)\n\t}()\n var requestData modelito.RequestTokenized\n var errorGeneral string\n var errorGeneralNbr string\n \n errorGeneral=\"\"\n requestData,errorGeneral =obtainParm...
[ "0.6588198", "0.64763606", "0.6018936", "0.579982", "0.5634544", "0.56159276", "0.5453365", "0.5441846", "0.5394664", "0.5379061", "0.5350443", "0.5323084", "0.52241564", "0.51942533", "0.5153262", "0.51236796", "0.51103026", "0.510832", "0.5101802", "0.50940883", "0.50757515...
0.78089374
0
/////////////////////////////v4 /////////////////////////////v4 v4handleDBProcesspayment receive and handle the request from client, access DB
/////////////////////////////v4 /////////////////////////////v4 v4handleDBProcesspayment получает и обрабатывает запрос от клиента, обращается к БД
func v4handleDBPostProcesspayment(w http.ResponseWriter, r *http.Request) { defer func() { db.Connection.Close(nil) }() var errorGeneral string var errorGeneralNbr string var requestData modelito.RequestPayment errorGeneral="" requestData,errorGeneral =obtainPostParmsProcessPayment(r,errorGener...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func v4handleDBProcesspayment(w http.ResponseWriter, r *http.Request) {\n\tdefer func() {\n\t\tdb.Connection.Close(nil)\n\t}()\n\n var errorGeneral string\n var\terrorGeneralNbr string\n var requestData modelito.RequestPayment\n errorGeneral=\"\"\nrequestData,errorGeneral =obtainParmsProcessPayment(r,e...
[ "0.8299379", "0.6380844", "0.60654527", "0.5884241", "0.58363223", "0.579999", "0.57807887", "0.5764955", "0.5746082", "0.5651478", "0.5642665", "0.56156886", "0.5587672", "0.5553257", "0.54693264", "0.5430645", "0.5390535", "0.53442734", "0.5306043", "0.5254643", "0.525085",...
0.80649585
1
/////////////////////////////v4 /////////////////////////////v4 v4handleDBProcesspayment receive and handle the request from client, access DB
/////////////////////////////v4 /////////////////////////////v4 v4handleDBProcesspayment получает и обрабатывает запрос от клиента, обращается к БД
func v4handleDBProcesspayment(w http.ResponseWriter, r *http.Request) { defer func() { db.Connection.Close(nil) }() var errorGeneral string var errorGeneralNbr string var requestData modelito.RequestPayment errorGeneral="" requestData,errorGeneral =obtainParmsProcessPayment(r,errorGeneral) //////...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func v4handleDBPostProcesspayment(w http.ResponseWriter, r *http.Request) {\n\tdefer func() {\n\t\tdb.Connection.Close(nil)\n\t}()\n var errorGeneral string\n var errorGeneralNbr string\n var requestData modelito.RequestPayment\n \n errorGeneral=\"\"\nrequestData,errorGeneral =obtainPostParmsProcess...
[ "0.8066236", "0.63811046", "0.60661125", "0.5885126", "0.5838394", "0.58021265", "0.57802284", "0.5765489", "0.5746198", "0.56511474", "0.5642199", "0.56173843", "0.55882144", "0.55527824", "0.547019", "0.54304844", "0.5391546", "0.5343794", "0.5305601", "0.52543783", "0.5251...
0.8300391
0
Bit returns a uint32 with vth bit set to 1.
Bit возвращает uint32 с битом vth установленным в 1.
func Bit(v int) uint32 { return uint32(1) << uint32(v) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (x *Int) Bit(i int) uint {}", "func IntBit(x *big.Int, i int) uint", "func Bit(x, n uint) uint {\n\treturn (x >> n) & 1\n}", "func MSB32(x uint32) uint32", "func Val(value byte, bit byte) byte {\n\treturn (value >> bit) & 1\n}", "func getBit(n int32, i int) int32 {\n\tresult := n & (1 << uint(i))\n\...
[ "0.6833733", "0.66398203", "0.65513724", "0.64699847", "0.6399387", "0.63546085", "0.61861306", "0.61491585", "0.61178416", "0.6110519", "0.6080812", "0.6062119", "0.6059498", "0.587452", "0.5837608", "0.5821337", "0.58110696", "0.5806684", "0.5805188", "0.57958925", "0.57812...
0.8089188
0
SetPostviewImageSize sets the Post View image size for the camera: The possible options are: "2M" a smaller preview, usually 2Megpixels in size, sometimes not camera dependant "Original" the size of the image taken
SetPostviewImageSize задает размер изображения в режиме просмотра для камеры: возможные варианты: "2M" — более мелкий предварительный просмотр, обычно размером 2 мегапикселя, иногда не зависящий от камеры "Original" — размер изображения, которое было снято
func (c *Camera) SetPostviewImageSize(size PostViewSize) (err error) { _, err = c.newRequest(endpoints.Camera, "setPostviewImageSize", size).Do() return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Camera) GetPostviewImageSize() (size string, err error) {\n\tresp, err := c.newRequest(endpoints.Camera, \"getPostviewImageSize\").Do()\n\tif err != nil {\n\t\treturn\n\t}\n\n\tif len(resp.Result) > 0 {\n\t\terr = json.Unmarshal(resp.Result[0], &size)\n\t}\n\n\treturn\n}", "func (c *Camera) SetImageSize...
[ "0.6737561", "0.62523794", "0.6224132", "0.5630493", "0.5371186", "0.5294629", "0.49871954", "0.49389657", "0.48399967", "0.47075906", "0.4678444", "0.46008775", "0.4587406", "0.44018033", "0.4371223", "0.43571287", "0.43469974", "0.43336517", "0.43305343", "0.43261597", "0.4...
0.83650637
0
GetPostviewImageSize obtains the current Post View Image size from the camera: The possible options are: "2M" a smaller preview, usually 2Megpixels in size, sometimes not camera dependant "Original" the size of the image taken
GetPostviewImageSize получает текущий размер изображения Post View с камеры: возможные варианты: "2M" — более мелкий предварительный просмотр, обычно размером 2 мегапикселя, иногда не зависящий от камеры "Original" — размер изображения, которое было снято
func (c *Camera) GetPostviewImageSize() (size string, err error) { resp, err := c.newRequest(endpoints.Camera, "getPostviewImageSize").Do() if err != nil { return } if len(resp.Result) > 0 { err = json.Unmarshal(resp.Result[0], &size) } return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Camera) GetSupportedPostviewImageSize() (sizes []string, err error) {\n\tresp, err := c.newRequest(endpoints.Camera, \"getSupportedPostviewImageSize\").Do()\n\tif err != nil {\n\t\treturn\n\t}\n\n\tif len(resp.Result) > 0 {\n\t\terr = json.Unmarshal(resp.Result[0], &sizes)\n\t}\n\n\treturn\n}", "func (c...
[ "0.7458114", "0.69781554", "0.61268085", "0.48669896", "0.48574117", "0.47957015", "0.47445032", "0.47146225", "0.47024658", "0.46297923", "0.46039", "0.45731974", "0.45198196", "0.4490976", "0.44749692", "0.44173935", "0.44143057", "0.44099662", "0.44064572", "0.439179", "0....
0.8124131
0
GetSupportedPostviewImageSize obtains the supported Post View Image sizes from the camera
GetSupportedPostviewImageSize получает поддерживаемые размеры изображения Post View с камеры
func (c *Camera) GetSupportedPostviewImageSize() (sizes []string, err error) { resp, err := c.newRequest(endpoints.Camera, "getSupportedPostviewImageSize").Do() if err != nil { return } if len(resp.Result) > 0 { err = json.Unmarshal(resp.Result[0], &sizes) } return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Camera) GetAvailablePostviewImageSize() (current string, available []string, err error) {\n\tresp, err := c.newRequest(endpoints.Camera, \"getAvailablePostviewImageSize\").Do()\n\tif err != nil {\n\t\treturn\n\t}\n\n\tif len(resp.Result) >= 1 {\n\t\t// Current size\n\t\tif err := json.Unmarshal(resp.Resul...
[ "0.74820864", "0.730369", "0.571322", "0.4549322", "0.44948772", "0.4281146", "0.427835", "0.4273784", "0.4234962", "0.42299852", "0.418386", "0.4142235", "0.41321218", "0.4115057", "0.41139987", "0.40988758", "0.4079467", "0.40490967", "0.40485758", "0.40454385", "0.4030844"...
0.86533886
0
GetAvailablePostviewImageSize obtains the current and available Post View Image sizes from the camera
GetAvailablePostviewImageSize получает текущий и доступный размер изображения Post View с камеры
func (c *Camera) GetAvailablePostviewImageSize() (current string, available []string, err error) { resp, err := c.newRequest(endpoints.Camera, "getAvailablePostviewImageSize").Do() if err != nil { return } if len(resp.Result) >= 1 { // Current size if err := json.Unmarshal(resp.Result[0], &current); err != n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Camera) GetSupportedPostviewImageSize() (sizes []string, err error) {\n\tresp, err := c.newRequest(endpoints.Camera, \"getSupportedPostviewImageSize\").Do()\n\tif err != nil {\n\t\treturn\n\t}\n\n\tif len(resp.Result) > 0 {\n\t\terr = json.Unmarshal(resp.Result[0], &sizes)\n\t}\n\n\treturn\n}", "func (c...
[ "0.7907042", "0.7288901", "0.5191613", "0.46706542", "0.45597464", "0.44490406", "0.44459066", "0.43250227", "0.42954162", "0.42822164", "0.42566746", "0.4238603", "0.42044538", "0.41916734", "0.41730225", "0.4146435", "0.40981996", "0.40936428", "0.4080742", "0.40763035", "0...
0.8519555
0
HandleRequest handles incoming request
HandleRequest обрабатывает входящий запрос
func HandleRequest(ctx context.Context, request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) { _, _ = pretty.Println("parsed:", request.Body) return events.APIGatewayProxyResponse{Body: "response is working", StatusCode: 200}, nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *Handler) handleRequest(w http.ResponseWriter, r *http.Request) {\n\tmethod := r.Method\n\th.handleCommon(w, r, method)\n}", "func HandleRequest(db *sql.DB) {\n\troutes := chi.NewRouter()\n\t// Route for user API\n\troutes.Get(\"/v1/users\", initRetrieveResolver(db).GetAllUsers)\n\troutes.Post(\"/v1/user...
[ "0.74420005", "0.72612906", "0.7180297", "0.7127764", "0.7055004", "0.70397246", "0.6982768", "0.6969357", "0.6969128", "0.69621074", "0.6961445", "0.6941809", "0.69207567", "0.6908853", "0.6908045", "0.68994975", "0.68979985", "0.6867785", "0.6861937", "0.6854056", "0.684881...
0.73736703
1
New creates and returns (but does not start) a new KeyValueServer.
New создает и возвращает (но не запускает) новый KeyValueServer.
func New(store kvstore.KVStore) KeyValueServer { // TODO: implement this! var server keyValueServer server.clientNum = 0 server.listener = nil server.readChan = make(chan []byte) server.channelMap = make(map[net.Conn]chan []byte) // 使用接口时,返回接口类型变量, 参考 book p113 return &server }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func New() KeyValueServer {\n\treturn &keyValueServer{\n\t\tnil,\n\t\tmake([]*client, 0),\n\t\tmake(chan *request),\n\t\tmake(chan *request),\n\t\tmake(chan []byte),\n\t\tmake(chan net.Conn),\n\t\tmake(chan int),\n\t\tmake(chan int),\n\t\tmake(chan *client),\n\t\tmake(chan int),\n\t\tmake(chan int)}\n}", "func N...
[ "0.80415136", "0.7734398", "0.6711053", "0.6413338", "0.64029986", "0.6365256", "0.6311367", "0.63072085", "0.63063824", "0.62676656", "0.6260089", "0.6259903", "0.62559277", "0.62521654", "0.624715", "0.624715", "0.6245179", "0.6245179", "0.6236103", "0.6229519", "0.6223292"...
0.814005
0
InterceptRequest creates new request interceptor
InterceptRequest создает новый интерсептор запроса
func InterceptRequest(f func(http.Header)) *RequestInterceptor { return &RequestInterceptor{Intercept: f} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (a *APITest) Intercept(interceptor Intercept) *APITest {\n\ta.request.interceptor = interceptor\n\treturn a\n}", "func (this Interceptor) Intercept(url string, exec rack.Middleware) error {\n\tif this[url] != nil {\n\t\treturn PreExistingInterceptorError{url}\n\t}\n\tthis[url] = exec\n\treturn nil\n}", "f...
[ "0.71772784", "0.6711371", "0.6566157", "0.65058345", "0.63735974", "0.6020365", "0.5849495", "0.58412755", "0.5832512", "0.5831639", "0.58202237", "0.5789917", "0.5758646", "0.57329756", "0.5705637", "0.57048255", "0.56965905", "0.56952894", "0.56863815", "0.56753355", "0.56...
0.7859327
0
InterceptResponse creates new response interceptor
InterceptResponse создает новый перехватчик ответа
func InterceptResponse(f ResponseInterceptFunc) *ResponseInterceptor { return &ResponseInterceptor{Intercept: f} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *middleware) InterceptResponse(ctx context.Context, next gqlgen.ResponseHandler) *gqlgen.Response {\n\tresp := next(ctx)\n\n\toperations, ok := FromCtx(ctx)\n\tif !ok {\n\t\treturn resp\n\t}\n\n\tlocations := make([]string, 0)\n\tfor _, operation := range *operations {\n\t\toperationURL := fmt.Sprintf(\"%s...
[ "0.6732688", "0.61742854", "0.61518264", "0.60882735", "0.6087335", "0.59464914", "0.5909216", "0.5903693", "0.58017325", "0.5780744", "0.57799304", "0.574046", "0.57401216", "0.5722633", "0.5645109", "0.5630329", "0.54868275", "0.5467772", "0.54632527", "0.5380859", "0.53800...
0.79600096
0