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
listBuiltInCreateRequest creates the ListBuiltIn request.
listBuiltInCreateRequest создает запрос ListBuiltIn.
func (client *PolicyDefinitionsClient) listBuiltInCreateRequest(ctx context.Context, options *PolicyDefinitionsListBuiltInOptions) (*policy.Request, error) { urlPath := "/providers/Microsoft.Authorization/policyDefinitions" req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (client *SapMonitorsClient) listCreateRequest(ctx context.Context, options *SapMonitorsClientListOptions) (*policy.Request, error) {\n\turlPath := \"/subscriptions/{subscriptionId}/providers/Microsoft.HanaOnAzure/sapMonitors\"\n\tif client.subscriptionID == \"\" {\n\t\treturn nil, errors.New(\"parameter clien...
[ "0.60232586", "0.5982126", "0.5869841", "0.5857119", "0.5838637", "0.5705415", "0.56493896", "0.56372064", "0.5619246", "0.5618151", "0.56148225", "0.56142336", "0.5599064", "0.55896854", "0.5574594", "0.55553883", "0.55527395", "0.5521917", "0.5519978", "0.5480475", "0.54769...
0.7813031
0
listBuiltInHandleResponse handles the ListBuiltIn response.
listBuiltInHandleResponse обрабатывает ответ ListBuiltIn.
func (client *PolicyDefinitionsClient) listBuiltInHandleResponse(resp *http.Response) (PolicyDefinitionsListBuiltInResponse, error) { result := PolicyDefinitionsListBuiltInResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.PolicyDefinitionListResult); err != nil { return PolicyDefinitionsLi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (client *PolicyDefinitionsClient) getBuiltInHandleResponse(resp *http.Response) (PolicyDefinitionsGetBuiltInResponse, error) {\n\tresult := PolicyDefinitionsGetBuiltInResponse{RawResponse: resp}\n\tif err := runtime.UnmarshalAsJSON(resp, &result.PolicyDefinition); err != nil {\n\t\treturn PolicyDefinitionsGet...
[ "0.7082903", "0.65406626", "0.6517782", "0.6450229", "0.6407186", "0.6368368", "0.6320369", "0.626896", "0.62285346", "0.6223435", "0.6213455", "0.62095153", "0.61994046", "0.617806", "0.6167983", "0.6167837", "0.6165637", "0.6164217", "0.6158206", "0.61385083", "0.6090056", ...
0.85405135
0
listByManagementGroupCreateRequest creates the ListByManagementGroup request.
listByManagementGroupCreateRequest создает запрос ListByManagementGroup.
func (client *PolicyDefinitionsClient) listByManagementGroupCreateRequest(ctx context.Context, managementGroupID string, options *PolicyDefinitionsListByManagementGroupOptions) (*policy.Request, error) { urlPath := "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (client *MonitorsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *MonitorsClientListByResourceGroupOptions) (*policy.Request, error) {\n\turlPath := \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors\"\n\tif...
[ "0.69496083", "0.6796391", "0.67800164", "0.67291677", "0.6685094", "0.65846455", "0.65812635", "0.6464833", "0.64444846", "0.64438474", "0.6417571", "0.6413473", "0.6367035", "0.6345273", "0.6328532", "0.6325075", "0.63092667", "0.6294302", "0.6265202", "0.6218708", "0.62121...
0.78612286
0
listByManagementGroupHandleResponse handles the ListByManagementGroup response.
listByManagementGroupHandleResponse обрабатывает ответ ListByManagementGroup.
func (client *PolicyDefinitionsClient) listByManagementGroupHandleResponse(resp *http.Response) (PolicyDefinitionsListByManagementGroupResponse, error) { result := PolicyDefinitionsListByManagementGroupResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.PolicyDefinitionListResult); err != nil ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (client UsageDetailsClient) ListByManagementGroupResponder(resp *http.Response) (result UsageDetailsListResult, err error) {\n\terr = autorest.Respond(\n\t\tresp,\n\t\tclient.ByInspecting(),\n\t\tazure.WithErrorUnlessStatusCode(http.StatusOK),\n\t\tautorest.ByUnmarshallingJSON(&result),\n\t\tautorest.ByClosin...
[ "0.7555561", "0.70824856", "0.70370066", "0.70273715", "0.7022419", "0.70222783", "0.70171577", "0.6928565", "0.6868567", "0.6856361", "0.6823024", "0.6822074", "0.68173724", "0.6772575", "0.677189", "0.67256725", "0.67240644", "0.67218256", "0.6714559", "0.67127115", "0.6708...
0.8073399
0
startLiveReloadServer initializes a livereload to notify the browser of changes to code that does not need a recompile.
startLiveReloadServer инициализирует livereload для уведомления браузера о изменениях в коде, которые не требуют пересборки.
func startLiveReloadServer(tpls *template.Template, cfg *env.Config, staticAssets *static.Files) error { if cfg.IsProduction { return nil } log.Info("Initializing livereload") paths := []string{ "assets", "templates", } tmplFn := func(name string) (bool, error) { templates, err := initTemplates(cfg, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func reload(l net.Listener, httpServer *http.Server) error {\n\tconst errLoc = \"main.reload()\"\n\n\t// Making duplicate for socket descriptor\n\t// to use them in child process.\n\tfile, err := (l.(*net.TCPListener)).File()\n\tif err != nil {\n\t\treturn fmt.Errorf(\n\t\t\t\"%s: failed to get file of listener, r...
[ "0.5976077", "0.59226185", "0.5880268", "0.5784931", "0.57804745", "0.57739013", "0.5734538", "0.5710085", "0.56784874", "0.5660749", "0.562987", "0.56220937", "0.56210876", "0.56204873", "0.56059647", "0.56023747", "0.5602115", "0.5571002", "0.5558408", "0.5542132", "0.55389...
0.85250896
0
CreateFooterView creates a footer area for the application
CreateFooterView создает область подвала для приложения
func CreateFooterView(g *gocui.Gui) error { viewName := "footer" if footer, err := g.SetView(viewName, maxX/6+1, maxY-maxY/4, maxX-1, maxY-1); err != nil { if err != gocui.ErrUnknownView { return err } footer.Wrap = true footer.Title = "Top HeadLines" footer.SelBgColor = gocui.ColorGreen footer.SelFgCo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (tui *TUI) drawFooter() {\n\tmin := int(tui.trackDuration.Minutes())\n\tsecs := int(tui.trackDuration.Seconds()) % 60\n\tvar title string\n\tif tui.currentTrack != nil {\n\t\ttitle = tui.currentTrack.Title\n\t}\n\ttui.footer.Clear()\n\tfmt.Fprintf(tui.footer, \"%02d:%02d / %s\", min, secs, title)\n\ttui.app.D...
[ "0.5952441", "0.59190524", "0.5908554", "0.5871804", "0.5760129", "0.5682298", "0.5645047", "0.5610753", "0.55848986", "0.5469786", "0.5427311", "0.5382227", "0.53675103", "0.52462083", "0.5153982", "0.51538026", "0.50929487", "0.50820076", "0.50206304", "0.49679133", "0.4943...
0.81811273
0
WithProxyConfig returns a proxy config functional option
WithProxyConfig возвращает функциональный параметр конфигурации прокси
func WithProxyConfig(cfg config.Proxy) GRPCOption { return func(h *GRPCHandler) { h.proxyCfg = cfg } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func WithProxyUrl(proxyURL string) configurer {\n\treturn func(conf *config) {\n\t\tconf.proxyURL = proxyURL\n\t}\n}", "func (o MustGatherSpecOutput) ProxyConfig() MustGatherSpecProxyConfigPtrOutput {\n\treturn o.ApplyT(func(v MustGatherSpec) *MustGatherSpecProxyConfig { return v.ProxyConfig }).(MustGatherSpecPr...
[ "0.7345297", "0.7208164", "0.71902514", "0.71116483", "0.7076825", "0.69628906", "0.6940307", "0.69159514", "0.6877981", "0.67587405", "0.65878874", "0.6566005", "0.64126563", "0.6381108", "0.6376971", "0.63682663", "0.63555306", "0.6329982", "0.62516534", "0.6219726", "0.621...
0.7866575
0
WithRoleTokenConfig returns a role token config functional option
WithRoleTokenConfig возвращает функциональную опцию конфигурации токена роли
func WithRoleTokenConfig(cfg config.RoleToken) GRPCOption { return func(h *GRPCHandler) { h.roleCfg = cfg } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *handler) RoleToken(w http.ResponseWriter, r *http.Request) error {\n\tdefer flushAndClose(r.Body)\n\n\tvar data model.RoleRequest\n\terr := json.NewDecoder(r.Body).Decode(&data)\n\tif err != nil {\n\t\treturn err\n\t}\n\ttok, err := h.role(r.Context(), data.Domain, data.Role, data.ProxyForPrincipal, data....
[ "0.65500444", "0.6109445", "0.6060574", "0.5755772", "0.55504984", "0.5467545", "0.53978205", "0.53978205", "0.53978205", "0.5376566", "0.5308736", "0.5294586", "0.5285593", "0.52821636", "0.5274694", "0.52643675", "0.52467155", "0.51788664", "0.51758593", "0.5169364", "0.516...
0.7468508
0
Gets the defender chance after accounting for modifiers
Получает шанс защитника с учетом модификаторов
func (c *Conflict) GetModDefenderChance() int32 { // TODO: Return modifier defender chance return c.BaseChance() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func getDamage(attacker *pet, defender pet) (float64) {\n\tif doesCrit(attacker) {\n\t\treturn 2*(attacker.EffectiveATK * (100.00/(defender.EffectiveDEF + 100.00)))\n\t}\n\t\n\treturn attacker.EffectiveATK * (100.00/(defender.EffectiveDEF + 100.00))\n}", "func (c *Conflict) GetModAttackerChance() int32 {\n\t// T...
[ "0.6194889", "0.61754656", "0.61005557", "0.5939384", "0.5802302", "0.5753514", "0.5746806", "0.54749453", "0.54497707", "0.54424155", "0.5411699", "0.5332017", "0.53062475", "0.5304713", "0.5244101", "0.52316695", "0.5213608", "0.5160024", "0.51429135", "0.51058805", "0.5092...
0.7181684
0
Creates a new civil war
Создаёт новый гражданский войн
func (s *State) NewCivilWar(target pb.ProvinceId) bool { // TODO: Error return if s.IsAtWar(target) || s.IsSiteOfConflict(target) { return false } c := &Conflict{ name: "Civil War", // TODO length: 0, attackers: Faction{ rebels: *(s.Get(target).Dissidents()), progress: 0, }, defenders: Faction{...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (s *State) NewColonialWar(target pb.ProvinceId) bool { // TODO: Error return\n\tif s.IsAtWar(target) || s.IsSiteOfConflict(target) || s.Get(target).Occupier() != pb.ProvinceId_NONE {\n\t\treturn false\n\t}\n\tc := &Conflict{\n\t\tname: \"Colonial War\", // TODO\n\t\tlength: 0,\n\t\tattackers: Faction{\n\t\t...
[ "0.63012815", "0.6095818", "0.6035038", "0.57367706", "0.5401127", "0.5373335", "0.53593504", "0.5359165", "0.53430766", "0.5266468", "0.5165891", "0.5091316", "0.5086812", "0.5075339", "0.5065485", "0.5056614", "0.50516707", "0.50405157", "0.50387293", "0.5027701", "0.502645...
0.70646715
0
NewDialog is a helper to spawn a new bit of game dialog
NewDialog — это вспомогательный класс для создания нового фрагмента игрового диалога
func NewDialog(text string, fontSize float32) { rl.DrawRectangleRec( rl.NewRectangle(0, 0, float32(rl.GetScreenWidth()), float32(rl.GetScreenHeight()/5)), rl.Black, ) rl.DrawRectangleLinesEx( rl.NewRectangle(0, 0, float32(rl.GetScreenWidth()), float32(rl.GetScreenHeight()/5)), 4, rl.White, ) rl.DrawTextR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewDialog(text string) *Dialog {\n\treturn &Dialog{\n\t\tStyleName: \"Default\",\n\t\tStart: \"0:00:00.00\", End: \"0:00:05.00\",\n\t\tText: text}\n}", "func NewDialog(input TL) (d *Dialog) {\n\td = new(Dialog)\n\tif dialog, ok := input.(TL_dialog); ok {\n\t\tswitch pt := dialog.Peer.(type) {\n\t\tcase ...
[ "0.6481888", "0.63578427", "0.62546325", "0.6170362", "0.61563224", "0.60556924", "0.5908183", "0.58998257", "0.56593597", "0.5580943", "0.547547", "0.5463997", "0.54177654", "0.53838277", "0.53588384", "0.53536123", "0.5321696", "0.52956635", "0.5292912", "0.5272295", "0.526...
0.7018586
0
NewLocalHashMapDBMgr instantiates a new local LRU memmgr.
NewLocalHashMapDBMgr создает новый локальный LRU memmgr.
func NewLocalHashMapDBMgr(pfx string) *LocalHashMapDBMgr { return &LocalHashMapDBMgr{memMap: make(map[common.Key]interface{}), policy: common.DBMgrPolicyLocalMap, prefix: pfx, base: Base{common.Key{BPTkey: ""}, 0}} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewLocalManager(ctx context.Context, root string) *LocalManager {\n\treturn &LocalManager{path: root}\n}", "func (m *LocalManager) New(ctx context.Context, id string) (linker.Storage, error) {\n\tdb, err := NewLocalStorage(ctx, fmt.Sprintf(\"%s/db-%s\", m.path, id))\n\tif err != nil {\n\t\treturn nil, err\n...
[ "0.61819696", "0.60259074", "0.5961291", "0.5807322", "0.5721401", "0.5707583", "0.5698278", "0.5694999", "0.5629836", "0.56234133", "0.5574107", "0.5541237", "0.55317944", "0.55115384", "0.5459979", "0.54501456", "0.54334444", "0.5427154", "0.5390991", "0.5389694", "0.538360...
0.79498154
0
GetRoot Get root base for the tree.
GetRoot Получает базу корня для дерева.
func (mgr *LocalHashMapDBMgr) GetRoot() (*Base, error) { if mgr.base.RootKey.IsNil() || mgr.base.Degree == 0 { return nil, nil } return &mgr.base, nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (mt *MerkleTree) GetRoot() {\n\tvar concat string\n\t// if no current transactions, set root to ''\n\tif len(mt.TransactionIDs) == 0 {\n\t\troot := \"\"\n\t\tmt.Root = &root\n\t\treturn\n\t}\n\n\tif len(mt.TransactionIDs) == 1 {\n\t\troot := mt.TransactionIDs[0]\n\t\tmt.Root = &root\n\t} else {\n\t\tconcat = ...
[ "0.72971463", "0.6967713", "0.6905524", "0.68161714", "0.6813087", "0.6761039", "0.6685708", "0.6630886", "0.66104454", "0.6586958", "0.6486263", "0.6472821", "0.64700806", "0.6454522", "0.64251405", "0.6360517", "0.6333982", "0.6299451", "0.6248249", "0.62472093", "0.6242822...
0.7211411
1
SetRoot Set root base for the tree.
SetRoot Устанавливает корневую базу для дерева.
func (mgr *LocalHashMapDBMgr) SetRoot(base *Base) error { mgr.base.Degree = base.Degree mgr.base.RootKey = base.RootKey return nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func SetRoot(path string) {\n\trootPath = path\n}", "func (db *Database) SetRoot(newRoot *doltdb.RootValue) {\n\t// TODO: races\n\tdb.root = newRoot\n}", "func (m *SiteCollection) SetRoot(value Rootable)() {\n m.root = value\n}", "func (f *FileList) SetRoot(path string) {\n\tf.root = path\n}", "func (ap...
[ "0.76017094", "0.7533801", "0.73356307", "0.71561253", "0.7128585", "0.7020409", "0.7009551", "0.6978859", "0.6884092", "0.6771216", "0.66614586", "0.6644592", "0.65779394", "0.6544975", "0.6466843", "0.6459183", "0.6454095", "0.6399124", "0.6379322", "0.62789136", "0.6234404...
0.7836139
0
AtomicUpdate Updates the DB atomically with the provided ops.
AtomicUpdate Обновляет БД атомарно с использованием предоставленных операций.
func (mgr *LocalHashMapDBMgr) AtomicUpdate(ops []common.DBOp) error { for i := 0; i < len(ops); i++ { switch { case ops[i].Op == common.DBOpStore: mgr.Store(ops[i].K, ops[i].E) case ops[i].Op == common.DBOpDelete: mgr.Delete(ops[i].K) case ops[i].Op == common.DBOpSetRoot: mgr.SetRoot(ops[i].E.(*Base))...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func update(ctx context.Context, db transactor, fn func(*bolt.Tx) error) error {\n\ttx, ok := ctx.Value(transactionKey{}).(*bolt.Tx)\n\tif !ok {\n\t\treturn db.Update(fn)\n\t} else if !tx.Writable() {\n\t\treturn errors.Wrap(bolt.ErrTxNotWritable, \"unable to use transaction from context\")\n\t}\n\treturn fn(tx)\n...
[ "0.53321916", "0.5310427", "0.5304057", "0.5290424", "0.52536964", "0.5223758", "0.5218239", "0.5211529", "0.5206224", "0.5174038", "0.51708364", "0.5149535", "0.51188", "0.5112181", "0.5062066", "0.49757835", "0.4972469", "0.49406815", "0.49391848", "0.493276", "0.49311072",...
0.74732876
0
LogAllKeys Prints the content of memory manager
LogAllKeys Печатает содержимое менеджера памяти
func (mgr *LocalHashMapDBMgr) LogAllKeys() { for k, e := range mgr.memMap { glog.Infof("%v: %v", k, e) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *LRUCache) PrintAll() {\n\tc.mutex.RLock()\n\tdefer c.mutex.RUnlock()\n\tfor e := c.cacheList.Front(); e != nil; e = e.Next() {\n\t\tfmt.Printf(\"[%v, %v] \", e.Value.(*entry).key, e.Value.(*entry).value)\n\t}\n\tfmt.Println()\n\treturn\n}", "func PrintAll(c config.Config) error {\n\tlog.Info(\"Opening ...
[ "0.6180221", "0.60460794", "0.59220344", "0.5912047", "0.57457006", "0.574495", "0.5689104", "0.5659756", "0.5619629", "0.5607107", "0.5596631", "0.55544996", "0.55493444", "0.55463827", "0.55437076", "0.5507923", "0.54788", "0.5450998", "0.5426974", "0.54160655", "0.54081875...
0.78134096
0
Policy Get the policy name for this manager.
Политика Получить имя политики для этого менеджера.
func (mgr *LocalHashMapDBMgr) Policy() string { return mgr.policy }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (nri *NodeReportItem) GetPolicy() string {\n\n\tif nri.Policy == \"\" {\n\t\treturn \"no policy\"\n\t}\n\n\treturn nri.Policy\n}", "func (o ResiliencyPolicyOutput) PolicyName() pulumi.StringOutput {\n\treturn o.ApplyT(func(v *ResiliencyPolicy) pulumi.StringOutput { return v.PolicyName }).(pulumi.StringOutpu...
[ "0.71685594", "0.71337616", "0.7127744", "0.7121374", "0.71197397", "0.70768213", "0.7059616", "0.702617", "0.70009947", "0.7000554", "0.6979791", "0.69775784", "0.6968762", "0.6955846", "0.69364214", "0.692103", "0.69128716", "0.69038796", "0.68980217", "0.682995", "0.680249...
0.7230925
0
SetHeader to set header (NOT SUPPORTED)
SetHeader для установки заголовка (НЕ ВОЗМОЖНО)
func (l *EchoLogrus) SetHeader(string) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (s *Socket) SetHeader(key, value string) {\n\ts.Lock()\n\ts.Conn.httpHeader().Set(key, value)\n\ts.Unlock()\n}", "func (rm *REKTManager) SetHeader(key, value string) {\n\trm.headers.Set(key, value)\n}", "func (req *Request) SetHeader(name, val string) {\n\treq.w.Header().Set(name, val)\n}", "func SetHea...
[ "0.8070126", "0.7863313", "0.78547883", "0.7850843", "0.7806121", "0.7799137", "0.7771557", "0.77660334", "0.7763081", "0.77529764", "0.7746852", "0.7710076", "0.76950485", "0.7674024", "0.7665853", "0.7630679", "0.76287884", "0.75963986", "0.75706214", "0.7531666", "0.752930...
0.7985397
1
H1 hashes m to a curve point
H1 хэширует m в точку кривой
func H1(m []byte) (x, y *big.Int) { h := sha512.New() var i uint32 byteLen := (curve.BitSize + 7) >> 3 for x == nil && i < 100 { // TODO: Use a NIST specified DRBG. h.Reset() if err := binary.Write(h, binary.BigEndian, i); err != nil { panic(err) } if _, err := h.Write(m); err != nil { panic(err) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func hash1Prf(suite pairing.Suite, m string, k kyber.Scalar) kyber.Point {\n\thm := hash1(suite, m)\n\thmk := hm.Mul(k, hm)\n\treturn hmk\n}", "func HashG1(msg, dst []byte) *G1 {\n\treturn mapToCurve(hashToBase(msg, dst))\n}", "func (path *PATH) H(x float64) *PATH {\n\treturn path.AddPart(\"H\", x)\n}", "fun...
[ "0.670059", "0.6191052", "0.60214895", "0.59542876", "0.58978754", "0.585371", "0.5751907", "0.5730881", "0.57265484", "0.56613463", "0.5578008", "0.5534485", "0.54807895", "0.54439586", "0.5409997", "0.5383044", "0.5313983", "0.53073287", "0.5304563", "0.5226101", "0.5205866...
0.7891151
0
bind an existing texture object to the specified texture unit
связать существующий объект текстуры с указанным текстурным юнитом
func BindTextureUnit(unit uint32, texture uint32) { C.glowBindTextureUnit(gpBindTextureUnit, (C.GLuint)(unit), (C.GLuint)(texture)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func BindTextureUnit(unit uint32, texture uint32) {\n\tsyscall.Syscall(gpBindTextureUnit, 2, uintptr(unit), uintptr(texture), 0)\n}", "func BindTexture(target uint32, texture uint32) {\n C.glowBindTexture(gpBindTexture, (C.GLenum)(target), (C.GLuint)(texture))\n}", "func BindTexture(target Enum, t Texture) {\...
[ "0.7944882", "0.7141327", "0.7066944", "0.70379597", "0.69296485", "0.6858803", "0.6800018", "0.6781621", "0.6781285", "0.6778453", "0.6636072", "0.6617039", "0.6567981", "0.65639764", "0.64981437", "0.64981437", "0.6295844", "0.62708545", "0.6270802", "0.6261718", "0.6245072...
0.798627
1
specify the clear value for the color index buffers
установите явное значение для индексных буферов цвета
func ClearIndex(c float32) { C.glowClearIndex(gpClearIndex, (C.GLfloat)(c)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ClearIndex(c float32) {\n C.glowClearIndex(gpClearIndex, (C.GLfloat)(c))\n}", "func ClearIndex(c float32) {\n\tsyscall.Syscall(gpClearIndex, 1, uintptr(math.Float32bits(c)), 0, 0)\n}", "func (debugging *debuggingOpenGL) Clear(mask uint32) {\n\tdebugging.recordEntry(\"Clear\", mask)\n\tdebugging.gl.Clear(...
[ "0.7557742", "0.6926225", "0.6661539", "0.66511786", "0.6609662", "0.65809613", "0.6549761", "0.6321644", "0.63114774", "0.6242595", "0.62145805", "0.62142456", "0.6212063", "0.62066", "0.61998916", "0.6166759", "0.6153944", "0.6153944", "0.61492884", "0.61306447", "0.602728"...
0.732023
1
specify a twodimensional texture subimage in a compressed format
указать двумерное подизображение текстуры в сжатом формате
func CompressedTextureSubImage2D(texture uint32, level int32, xoffset int32, yoffset int32, width int32, height int32, format uint32, imageSize int32, data unsafe.Pointer) { C.glowCompressedTextureSubImage2D(gpCompressedTextureSubImage2D, (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func CompressedTextureSubImage2D(texture uint32, level int32, xoffset int32, yoffset int32, width int32, height int32, format uint32, imageSize int32, data unsafe.Pointer) {\n\tsyscall.Syscall9(gpCompressedTextureSubImage2D, 9, uintptr(texture), uintptr(level), uintptr(xoffset), uintptr(yoffset), uintptr(width), u...
[ "0.75624573", "0.74462503", "0.74462503", "0.7382152", "0.733096", "0.733096", "0.7265395", "0.71279454", "0.7097129", "0.7097129", "0.6861826", "0.6717682", "0.6717682", "0.6695255", "0.6680614", "0.6680614", "0.66295075", "0.6612707", "0.6605899", "0.6605899", "0.6574313", ...
0.7577275
1
specify a threedimensional texture subimage in a compressed format
указать трехмерную текстурную подизображение в сжатом формате
func CompressedTextureSubImage3D(texture uint32, level int32, xoffset int32, yoffset int32, zoffset int32, width int32, height int32, depth int32, format uint32, imageSize int32, data unsafe.Pointer) { C.glowCompressedTextureSubImage3D(gpCompressedTextureSubImage3D, (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(xof...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func CompressedTextureSubImage3D(texture uint32, level int32, xoffset int32, yoffset int32, zoffset int32, width int32, height int32, depth int32, format uint32, imageSize int32, data unsafe.Pointer) {\n\tsyscall.Syscall12(gpCompressedTextureSubImage3D, 11, uintptr(texture), uintptr(level), uintptr(xoffset), uintp...
[ "0.7413762", "0.726753", "0.726753", "0.72593474", "0.72593474", "0.7232897", "0.7199341", "0.71802086", "0.71552026", "0.71552026", "0.6744676", "0.667433", "0.667433", "0.6587511", "0.6587511", "0.6553164", "0.65196425", "0.63975227", "0.6391272", "0.6342379", "0.6342379", ...
0.74802285
1
copy pixels into a color table
скопировать пиксели в таблицу цветов
func CopyColorTable(target uint32, internalformat uint32, x int32, y int32, width int32) { C.glowCopyColorTable(gpCopyColorTable, (C.GLenum)(target), (C.GLenum)(internalformat), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func CopyColorTable(target uint32, internalformat uint32, x int32, y int32, width int32) {\n C.glowCopyColorTable(gpCopyColorTable, (C.GLenum)(target), (C.GLenum)(internalformat), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width))\n}", "func CopyColorSubTable(target uint32, start int32, x int32, y int32, width int...
[ "0.7236274", "0.7012368", "0.680525", "0.627135", "0.6227392", "0.6080061", "0.60735536", "0.60356534", "0.5952416", "0.59139735", "0.5843787", "0.5701853", "0.5590321", "0.5556233", "0.54842144", "0.54842144", "0.54763526", "0.54234326", "0.54201484", "0.5406675", "0.5373449...
0.70833987
1
copy pixels into a twodimensional convolution filter
скопировать пиксели в двумерный фильтр свертки
func CopyConvolutionFilter2D(target uint32, internalformat uint32, x int32, y int32, width int32, height int32) { C.glowCopyConvolutionFilter2D(gpCopyConvolutionFilter2D, (C.GLenum)(target), (C.GLenum)(internalformat), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLsizei)(height)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func CopyConvolutionFilter2D(target uint32, internalformat uint32, x int32, y int32, width int32, height int32) {\n C.glowCopyConvolutionFilter2D(gpCopyConvolutionFilter2D, (C.GLenum)(target), (C.GLenum)(internalformat), (C.GLint)(x), (C.GLint)(y), (C.GLsizei)(width), (C.GLsizei)(height))\n}", "func CopyConvolu...
[ "0.7410087", "0.6712185", "0.6649832", "0.64741814", "0.63578194", "0.63215214", "0.60116434", "0.5824171", "0.57838714", "0.5715813", "0.56136847", "0.5597352", "0.54525596", "0.53481835", "0.5248561", "0.5243912", "0.5227945", "0.519987", "0.5178303", "0.5174178", "0.516586...
0.7162849
1
copy a threedimensional texture subimage
скопировать подизображение трехмерного текстура
func CopyTextureSubImage3D(texture uint32, level int32, xoffset int32, yoffset int32, zoffset int32, x int32, y int32, width int32, height int32) { C.glowCopyTextureSubImage3D(gpCopyTextureSubImage3D, (C.GLuint)(texture), (C.GLint)(level), (C.GLint)(xoffset), (C.GLint)(yoffset), (C.GLint)(zoffset), (C.GLint)(x), (C.GL...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func CopyTextureSubImage3D(texture uint32, level int32, xoffset int32, yoffset int32, zoffset int32, x int32, y int32, width int32, height int32) {\n\tsyscall.Syscall9(gpCopyTextureSubImage3D, 9, uintptr(texture), uintptr(level), uintptr(xoffset), uintptr(yoffset), uintptr(zoffset), uintptr(x), uintptr(y), uintptr...
[ "0.7187993", "0.70949566", "0.70949566", "0.708144", "0.708144", "0.70596516", "0.7054913", "0.67202014", "0.6595204", "0.65076804", "0.65076804", "0.64512175", "0.63771796", "0.63712007", "0.6359094", "0.6359094", "0.6334243", "0.6325183", "0.63112533", "0.63112533", "0.6302...
0.72157633
1
Parameter callback has type C.GLDEBUGPROCAMD.
Параметр callback имеет тип C.GLDEBUGPROCAMD.
func DebugMessageCallbackAMD(callback unsafe.Pointer, userParam unsafe.Pointer) { C.glowDebugMessageCallbackAMD(gpDebugMessageCallbackAMD, (C.GLDEBUGPROCAMD)(callback), userParam) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func DebugMessageCallback(callback DebugProc, userParam unsafe.Pointer) {\n userDebugCallback = callback\n C.glowDebugMessageCallback(gpDebugMessageCallback, (C.GLDEBUGPROC)(unsafe.Pointer(&callback)), userParam)\n}", "func DebugMessageCallbackAMD(callback unsafe.Pointer, userParam unsafe.Pointer) {\n\tsyscall...
[ "0.7167712", "0.6670752", "0.6367215", "0.6367215", "0.6003104", "0.5930139", "0.5875492", "0.5819321", "0.56413215", "0.55396223", "0.55020416", "0.5496406", "0.54678655", "0.5454606", "0.53230804", "0.51372975", "0.51099735", "0.50893986", "0.50893986", "0.5085339", "0.5068...
0.73665047
0
return a compressed texture image
вернуть сжатое изображение текстуры
func GetCompressedTextureImage(texture uint32, level int32, bufSize int32, pixels unsafe.Pointer) { C.glowGetCompressedTextureImage(gpGetCompressedTextureImage, (C.GLuint)(texture), (C.GLint)(level), (C.GLsizei)(bufSize), pixels) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func GetCompressedTextureImage(texture uint32, level int32, bufSize int32, pixels unsafe.Pointer) {\n\tsyscall.Syscall6(gpGetCompressedTextureImage, 4, uintptr(texture), uintptr(level), uintptr(bufSize), uintptr(pixels), 0, 0)\n}", "func GetCompressedTexImage(target uint32, level int32, img unsafe.Pointer) {\n ...
[ "0.7429074", "0.69827163", "0.69083256", "0.69083256", "0.6807672", "0.66595125", "0.66595125", "0.6630492", "0.64481664", "0.64481664", "0.63997597", "0.61933315", "0.61933315", "0.6182891", "0.61170536", "0.6085721", "0.6085721", "0.6069289", "0.5932974", "0.5835475", "0.58...
0.752569
1
AddDefaultIndexes registers the default list of indexes.
AddDefaultIndexes регистрирует список по умолчанию индексов.
func AddDefaultIndexes(ctx context.Context, mgr ctrl.Manager) error { if err := ByMachineNode(ctx, mgr); err != nil { return err } if err := ByMachineProviderID(ctx, mgr); err != nil { return err } if feature.Gates.Enabled(feature.ClusterTopology) { if err := ByClusterClassName(ctx, mgr); err != nil { r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (f *AutoIndexingServiceGetIndexesFunc) SetDefaultHook(hook func(context.Context, shared.GetIndexesOptions) ([]types.Index, int, error)) {\n\tf.defaultHook = hook\n}", "func (f *ResolverGetIndexesByIDsFunc) SetDefaultHook(hook func(context.Context, ...int) ([]dbstore.Index, error)) {\n\tf.defaultHook = hook\...
[ "0.67015946", "0.65820223", "0.6558238", "0.62669903", "0.6112775", "0.56924784", "0.56649387", "0.5607494", "0.55619687", "0.5535923", "0.5508265", "0.5426262", "0.5390371", "0.53833604", "0.5379549", "0.53476596", "0.533891", "0.5274567", "0.52689487", "0.5254998", "0.51951...
0.8728488
0
NewGetExpertsIDNotFound creates a GetExpertsIDNotFound with default headers values
NewGetExpertsIDNotFound создает GetExpertsIDNotFound с значениями заголовков по умолчанию
func NewGetExpertsIDNotFound() *GetExpertsIDNotFound { return &GetExpertsIDNotFound{} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewNotFound(parameters ...wparams.ParamStorer) Error {\n\treturn newGenericError(nil, DefaultNotFound, wparams.NewParamStorer(parameters...))\n}", "func NewNotFound(s string, v ...interface{}) error {\n\treturn asNotFound(fmt.Errorf(s, v...))\n}", "func NewGetCustomIntegrationVersionByIDUsingGETNotFound()...
[ "0.5662817", "0.56517524", "0.5495926", "0.54688585", "0.5418953", "0.5308546", "0.52899915", "0.5279872", "0.5270878", "0.52628124", "0.5241968", "0.52075416", "0.52074784", "0.5170049", "0.5167049", "0.5156365", "0.51450014", "0.5113342", "0.5108819", "0.50972646", "0.50907...
0.71422535
0
NewCreateCoreV1NamespacedPodBindingOK creates CreateCoreV1NamespacedPodBindingOK with default headers values
NewCreateCoreV1NamespacedPodBindingOK создает CreateCoreV1NamespacedPodBindingOK с значениями заголовков по умолчанию
func NewCreateCoreV1NamespacedPodBindingOK() *CreateCoreV1NamespacedPodBindingOK { return &CreateCoreV1NamespacedPodBindingOK{} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *CreateCoreV1NamespacedPodBindingOK) WithPayload(payload *models.IoK8sAPICoreV1Binding) *CreateCoreV1NamespacedPodBindingOK {\n\to.Payload = payload\n\treturn o\n}", "func NewCreateCoreV1NamespacedPodBindingUnauthorized() *CreateCoreV1NamespacedPodBindingUnauthorized {\n\n\treturn &CreateCoreV1Namespaced...
[ "0.63520384", "0.6186931", "0.6132766", "0.58211017", "0.5794697", "0.56063914", "0.538274", "0.53195673", "0.525624", "0.5243301", "0.510414", "0.49943492", "0.4982679", "0.49806482", "0.4952446", "0.49439883", "0.49132204", "0.488667", "0.48738325", "0.48653427", "0.4865312...
0.7081246
0
WithPayload adds the payload to the create core v1 namespaced pod binding o k response
WithPayload добавляет payload в create core v1 namespaced pod binding o k response
func (o *CreateCoreV1NamespacedPodBindingOK) WithPayload(payload *models.IoK8sAPICoreV1Binding) *CreateCoreV1NamespacedPodBindingOK { o.Payload = payload return o }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *CreateCoreV1NamespacedPodBindingCreated) WithPayload(payload *models.IoK8sAPICoreV1Binding) *CreateCoreV1NamespacedPodBindingCreated {\n\to.Payload = payload\n\treturn o\n}", "func (o *CreateCoreV1NamespacedPodBindingCreated) SetPayload(payload *models.IoK8sAPICoreV1Binding) {\n\to.Payload = payload\n}"...
[ "0.71600986", "0.60759914", "0.59215206", "0.58727187", "0.5759193", "0.56535906", "0.55602", "0.54629165", "0.54402953", "0.53990656", "0.5341951", "0.53034186", "0.5286376", "0.5239901", "0.51543856", "0.51484925", "0.5105422", "0.50624555", "0.50260985", "0.50252205", "0.5...
0.7258825
0
SetPayload sets the payload to the create core v1 namespaced pod binding o k response
SetPayload устанавливает полезную нагрузку для создания core v1 namespaced pod binding o k response
func (o *CreateCoreV1NamespacedPodBindingOK) SetPayload(payload *models.IoK8sAPICoreV1Binding) { o.Payload = payload }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *CreateCoreV1NamespacedPodBindingCreated) SetPayload(payload *models.IoK8sAPICoreV1Binding) {\n\to.Payload = payload\n}", "func (o *CreateCoreV1NamespacedPodBindingAccepted) SetPayload(payload *models.IoK8sAPICoreV1Binding) {\n\to.Payload = payload\n}", "func (o *CreateCoreV1NamespacedServiceAccountTok...
[ "0.7574514", "0.6823581", "0.67944187", "0.6659133", "0.6657111", "0.6604768", "0.65083516", "0.64258933", "0.64172417", "0.6376208", "0.6357927", "0.6333871", "0.6318253", "0.63011295", "0.62972033", "0.6286647", "0.6250242", "0.6237566", "0.6207524", "0.6198076", "0.6186949...
0.7531282
1
WithPayload adds the payload to the create core v1 namespaced pod binding created response
WithPayload добавляет payload в ответ на создание create core v1 namespaced pod binding
func (o *CreateCoreV1NamespacedPodBindingCreated) WithPayload(payload *models.IoK8sAPICoreV1Binding) *CreateCoreV1NamespacedPodBindingCreated { o.Payload = payload return o }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *CreateCoreV1NamespacedPodBindingOK) WithPayload(payload *models.IoK8sAPICoreV1Binding) *CreateCoreV1NamespacedPodBindingOK {\n\to.Payload = payload\n\treturn o\n}", "func (o *CreateCoreV1NamespacedPodBindingCreated) SetPayload(payload *models.IoK8sAPICoreV1Binding) {\n\to.Payload = payload\n}", "func ...
[ "0.7040494", "0.6154935", "0.5884471", "0.5809372", "0.5791104", "0.56312996", "0.55489933", "0.5369722", "0.5353531", "0.53532404", "0.52937114", "0.5228546", "0.521564", "0.5198322", "0.51803315", "0.5170201", "0.50951815", "0.5085272", "0.50764763", "0.506338", "0.50485516...
0.72066486
0
SetPayload sets the payload to the create core v1 namespaced pod binding created response
SetPayload устанавливает полезную нагрузку для ответа на создание core v1 namespaced pod binding
func (o *CreateCoreV1NamespacedPodBindingCreated) SetPayload(payload *models.IoK8sAPICoreV1Binding) { o.Payload = payload }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *CreateCoreV1NamespacedPodBindingOK) SetPayload(payload *models.IoK8sAPICoreV1Binding) {\n\to.Payload = payload\n}", "func (o *CreateCoreV1NamespacedServiceAccountTokenCreated) SetPayload(payload *models.IoK8sAPIAuthenticationV1TokenRequest) {\n\to.Payload = payload\n}", "func (o *CreateCoreV1Namespace...
[ "0.73745334", "0.67489946", "0.67317206", "0.65107083", "0.6496046", "0.64906657", "0.64088506", "0.63850045", "0.6355121", "0.63480544", "0.6346671", "0.630173", "0.6298144", "0.6295662", "0.6277614", "0.62639123", "0.62403667", "0.6215138", "0.6203269", "0.6188285", "0.6186...
0.7524761
0
NewCreateCoreV1NamespacedPodBindingAccepted creates CreateCoreV1NamespacedPodBindingAccepted with default headers values
NewCreateCoreV1NamespacedPodBindingAccepted создает CreateCoreV1NamespacedPodBindingAccepted с значениями заголовков по умолчанию
func NewCreateCoreV1NamespacedPodBindingAccepted() *CreateCoreV1NamespacedPodBindingAccepted { return &CreateCoreV1NamespacedPodBindingAccepted{} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *CreateCoreV1NamespacedPodBindingAccepted) WithPayload(payload *models.IoK8sAPICoreV1Binding) *CreateCoreV1NamespacedPodBindingAccepted {\n\to.Payload = payload\n\treturn o\n}", "func NewCreateCoreV1NamespacedPodAccepted() *CreateCoreV1NamespacedPodAccepted {\n\treturn &CreateCoreV1NamespacedPodAccepted{...
[ "0.69764715", "0.6383097", "0.5926168", "0.5786029", "0.56956553", "0.5679013", "0.55781716", "0.5445475", "0.5294871", "0.5286224", "0.5186162", "0.51444805", "0.51283205", "0.5108229", "0.5104331", "0.51002", "0.5077701", "0.50480133", "0.50150347", "0.49778944", "0.4936965...
0.7632759
0
NewCreateCoreV1NamespacedPodBindingUnauthorized creates CreateCoreV1NamespacedPodBindingUnauthorized with default headers values
NewCreateCoreV1NamespacedPodBindingUnauthorized создает CreateCoreV1NamespacedPodBindingUnauthorized с значениями заголовков по умолчанию
func NewCreateCoreV1NamespacedPodBindingUnauthorized() *CreateCoreV1NamespacedPodBindingUnauthorized { return &CreateCoreV1NamespacedPodBindingUnauthorized{} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewCreateCoreV1NamespacedPodUnauthorized() *CreateCoreV1NamespacedPodUnauthorized {\n\treturn &CreateCoreV1NamespacedPodUnauthorized{}\n}", "func NewCreateNetworkingV1beta1NamespacedIngressUnauthorized() *CreateNetworkingV1beta1NamespacedIngressUnauthorized {\n\n\treturn &CreateNetworkingV1beta1NamespacedIn...
[ "0.6324373", "0.56614023", "0.55299544", "0.5471965", "0.54620415", "0.5333958", "0.53161937", "0.52693075", "0.52219146", "0.52057135", "0.52049303", "0.5203383", "0.5196548", "0.5158162", "0.5138266", "0.50582945", "0.505557", "0.50355905", "0.5028456", "0.4977101", "0.4967...
0.7638226
0
Deprecated: Use PopularityListRequest.ProtoReflect.Descriptor instead.
Устарело: используйте PopularityListRequest.ProtoReflect.Descriptor вместо этого.
func (*PopularityListRequest) Descriptor() ([]byte, []int) { return file_popularity_proto_rawDescGZIP(), []int{1} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*ListMetricsRequest) Descriptor() ([]byte, []int) {\n\treturn file_go_chromium_org_luci_analysis_proto_v1_metrics_proto_rawDescGZIP(), []int{0}\n}", "func (*PopularityListResponse) Descriptor() ([]byte, []int) {\n\treturn file_popularity_proto_rawDescGZIP(), []int{3}\n}", "func (*PopularityRequest) Descr...
[ "0.7237613", "0.71879435", "0.7142334", "0.7067568", "0.7032066", "0.6967289", "0.69310343", "0.6881598", "0.68485683", "0.6842119", "0.68362856", "0.68357027", "0.68323797", "0.6810191", "0.6805528", "0.67902154", "0.6782207", "0.6767958", "0.6764224", "0.6764095", "0.676043...
0.7821995
0
Deprecated: Use PopularityRequest.ProtoReflect.Descriptor instead.
Устарело: используйте PopularityRequest.ProtoReflect.Descriptor вместо этого.
func (*PopularityRequest) Descriptor() ([]byte, []int) { return file_popularity_proto_rawDescGZIP(), []int{2} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*PopularityListRequest) Descriptor() ([]byte, []int) {\n\treturn file_popularity_proto_rawDescGZIP(), []int{1}\n}", "func (*PatchCollectorsRequest) Descriptor() ([]byte, []int) {\n\treturn file_proto_clarifai_api_service_proto_rawDescGZIP(), []int{161}\n}", "func (*GetVersionRequest) Descriptor() ([]byte...
[ "0.7082874", "0.70466405", "0.70027757", "0.6991793", "0.6961903", "0.6930849", "0.69178694", "0.6898601", "0.688897", "0.68645346", "0.6864145", "0.6836272", "0.6826459", "0.68234265", "0.68149114", "0.68109876", "0.6810779", "0.6788016", "0.67873865", "0.67856604", "0.67804...
0.7320204
0
Deprecated: Use PopularityListResponse.ProtoReflect.Descriptor instead.
Устарело: используйте PopularityListResponse.ProtoReflect.Descriptor вместо этого.
func (*PopularityListResponse) Descriptor() ([]byte, []int) { return file_popularity_proto_rawDescGZIP(), []int{3} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*ListResponse) Descriptor() ([]byte, []int) {\n\treturn file_teams_v1_teams_proto_rawDescGZIP(), []int{1}\n}", "func (*ListResponse) Descriptor() ([]byte, []int) {\n\treturn file_proto_url_proto_rawDescGZIP(), []int{4}\n}", "func (*ListMetricsResponse) Descriptor() ([]byte, []int) {\n\treturn file_go_chr...
[ "0.71613175", "0.70811313", "0.6964309", "0.6961536", "0.69323695", "0.6889161", "0.68409914", "0.68287885", "0.6815276", "0.68109584", "0.6788512", "0.6770173", "0.6754738", "0.674238", "0.67397827", "0.668816", "0.66817975", "0.6667783", "0.6642515", "0.6640957", "0.6629113...
0.7601463
0
Deprecated: Use PopularityResponse.ProtoReflect.Descriptor instead.
Устарело: используйте PopularityResponse.ProtoReflect.Descriptor вместо этого.
func (*PopularityResponse) Descriptor() ([]byte, []int) { return file_popularity_proto_rawDescGZIP(), []int{4} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*PopularityListResponse) Descriptor() ([]byte, []int) {\n\treturn file_popularity_proto_rawDescGZIP(), []int{3}\n}", "func (*GetMetricsInfoResponse) Descriptor() ([]byte, []int) {\n\treturn file_github_com_yahuizhan_dappley_metrics_go_api_rpc_pb_rpc_proto_rawDescGZIP(), []int{44}\n}", "func (*MetricsResp...
[ "0.7134704", "0.7111636", "0.70104676", "0.6936063", "0.6926665", "0.6925415", "0.6913843", "0.6790236", "0.6789545", "0.67850775", "0.67768216", "0.6768377", "0.6763497", "0.6756869", "0.6733272", "0.6728977", "0.67196757", "0.6716262", "0.670581", "0.6693681", "0.6683952", ...
0.7181659
0
NewSignInItemRequestBuilderInternal instantiates a new SignInItemRequestBuilder and sets the default values.
NewSignInItemRequestBuilderInternal создает новый SignInItemRequestBuilder и устанавливает значения по умолчанию.
func NewSignInItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SignInItemRequestBuilder) { m := &SignInItemRequestBuilder{ } m.urlTemplate = "{+baseurl}/auditLogs/signIns/{signIn%2Did}{?%24select,%2...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewSignInItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SignInItemRequestBuilder) {\n urlParams := make(map[string]string)\n urlParams[\"request-raw-url\"] = rawUrl\n return NewSignInItemRequestBuilderInternal(urlPar...
[ "0.7817571", "0.6820168", "0.67984176", "0.6735601", "0.6698511", "0.6693382", "0.66908264", "0.6585633", "0.6532462", "0.6530671", "0.6504501", "0.64920276", "0.6485399", "0.6475157", "0.6458795", "0.6455845", "0.64397204", "0.6429171", "0.6412303", "0.63747364", "0.63693976...
0.82037175
0
NewSignInItemRequestBuilder instantiates a new SignInItemRequestBuilder and sets the default values.
NewSignInItemRequestBuilder создает новый SignInItemRequestBuilder и устанавливает значения по умолчанию.
func NewSignInItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SignInItemRequestBuilder) { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl return NewSignInItemRequestBuilderInternal(urlParams, reque...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewSignInItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SignInItemRequestBuilder) {\n m := &SignInItemRequestBuilder{\n }\n m.urlTemplate = \"{+baseurl}/auditLogs/signIns/{signIn%2Did}{?%24...
[ "0.71854013", "0.6183314", "0.61416644", "0.6106175", "0.60573894", "0.6029274", "0.60251683", "0.59547544", "0.58809215", "0.5861404", "0.58487034", "0.58435464", "0.5836316", "0.57725453", "0.57585907", "0.57419944", "0.5733746", "0.57195973", "0.57034683", "0.5679502", "0....
0.767015
0
getInstallationType returns the installation type as either CORE or FULL.
getInstallationType возвращает тип установки в виде CORE или FULL.
func getInstallationType(installationType string) (string, error) { switch installationType { case installationTypeServer: return windowsServerFull, nil case installationTypeServerCore: return windowsServerCore, nil default: return "", errors.Errorf("unsupported installation type: %s", installationType) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *DeeplinkRule) GetInstallType() string {\n\tif o == nil || o.InstallType == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\treturn *o.InstallType\n}", "func (o *AddOn) GetInstallMode() (value AddOnInstallMode, ok bool) {\n\tok = o != nil && o.bitmap_&512 != 0\n\tif ok {\n\t\tvalue = o.installMode\n\t}\...
[ "0.6033674", "0.5655952", "0.56538004", "0.5569289", "0.55534506", "0.548555", "0.5389482", "0.5383159", "0.5381609", "0.5369444", "0.5359032", "0.535424", "0.5350281", "0.5324424", "0.53146684", "0.53101766", "0.5280007", "0.527056", "0.52111757", "0.5170026", "0.51604617", ...
0.7311128
0
GetOSFamily returns the operating system family string. On Windows, it would be of the format "WINDOWS_SERVER__" In case of any exception this method just returns "windows" as operating system family.
GetOSFamily возвращает строку, представляющую семейство операционной системы. На Windows она будет иметь формат "WINDOWS_SERVER__". В случае возникновения любой ошибки этот метод просто возвращает "windows" как семейство операционной системы.
func GetOSFamily() string { // Find the build number of the os on which agent is running. versionInfo := windowsGetVersionFunc() buildNumber := int(versionInfo.BuildNumber) osRelease, ok := osReleaseFromBuildNumber[buildNumber] if !ok { seelog.Errorf("windows release with build number [%d] is unsupported", build...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func GetOperatingSystemFamily() string {\n\tkey, err := winRegistry.OpenKey(ecsWinRegistryRootKey, ecsWinRegistryRootPath, registry.QUERY_VALUE)\n\tif err != nil {\n\t\tseelog.Errorf(\"Unable to open Windows registry key to determine Windows version: %v\", err)\n\t\treturn unsupportedWindowsOS\n\t}\n\tdefer key.Cl...
[ "0.7497416", "0.6440313", "0.6265161", "0.62639576", "0.62581", "0.61973", "0.6124115", "0.60934013", "0.60089207", "0.5989644", "0.5955059", "0.586677", "0.58603936", "0.5839756", "0.5819483", "0.58168316", "0.58055353", "0.5803999", "0.577336", "0.57567614", "0.5718889", ...
0.83538216
0
parseAux examines the data of a SAM record's OPT fields, returning a slice of sam.Aux that are backed by the original data.
parseAux анализирует данные полей OPT записи SAM, возвращая срез sam.Aux, использующий оригинальные данные.
func parseAux(aux []byte, aa []sam.Aux) { naa := 0 for i := 0; i+2 < len(aux); { t := aux[i+2] switch j := jumps[t]; { case j > 0: j += 3 aa[naa] = sam.Aux(aux[i : i+j : i+j]) naa++ i += j case j < 0: switch t { case 'Z', 'H': var ( j int v byte ) for j, v = range aux[i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func parseAux(aux []byte) ([]sam.Aux, error) {\n\tif len(aux) == 0 {\n\t\treturn nil, nil\n\t}\n\n\t// Heuristically pre-allocate enough slots for the byte data.\n\t// Value chosen by experimentation and will not fit all inputs,\n\t// with the cost being over-allocation.\n\taa := make([]sam.Aux, 0, len(aux)/4)\n\n...
[ "0.7380473", "0.60085166", "0.58404934", "0.5604804", "0.5528614", "0.52840686", "0.5036604", "0.48920414", "0.48108783", "0.48038596", "0.47032255", "0.46916306", "0.46458298", "0.43914226", "0.4372695", "0.4316549", "0.43138635", "0.42837065", "0.42672035", "0.42277274", "0...
0.7002758
1
countAuxFields examines the data of a SAM record's OPT field to determine the number of auxFields there are.
countAuxFields анализирует данные поля OPT записи SAM, чтобы определить количество полей-дополнений.
func countAuxFields(aux []byte) (int, error) { naux := 0 for i := 0; i+2 < len(aux); { t := aux[i+2] switch j := jumps[t]; { case j > 0: j += 3 i += j naux++ case j < 0: switch t { case 'Z', 'H': var ( j int v byte ) for j, v = range aux[i:] { if v == 0 { // C string ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r MLDv2ReportMulticastAddressRecord) AuxDataLen() int {\n\treturn int(r[mldv2ReportMulticastAddressRecordAuxDataLenOffset]) * mldv2ReportMulticastAddressRecordAuxDataLenUnits\n}", "func NumFields(elemTyp reflect.Type, skipUnexported bool) int {\n\treturn len(lookupFields(elemTyp, skipUnexported, nil))\n}",...
[ "0.61733234", "0.57533646", "0.5688064", "0.5639402", "0.56135046", "0.56052715", "0.556544", "0.55280674", "0.55280674", "0.5502139", "0.5491858", "0.5484253", "0.54737127", "0.5459307", "0.5433384", "0.5412292", "0.5367275", "0.5298392", "0.52903736", "0.5258248", "0.521972...
0.7976709
0
UnmarshalHeader parses a sam.Header encoded in BAM binary format.
UnmarshalHeader парсит sam.Header, закодированный в бинарном формате BAM.
func UnmarshalHeader(buf []byte) (*sam.Header, error) { header, err := sam.NewHeader(nil, nil) if err != nil { return nil, err } hr := bytes.NewReader(buf) if err := header.DecodeBinary(hr); err != nil { return nil, err } if hr.Len() > 0 { return nil, fmt.Errorf("%d byte junk at the end of SAM header", hr....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func UnmarshalHeader(data []byte, m *MessageHeader) error {\n\tif len(data) < 16 {\n\t\treturn ErrMessageTooSmall\n\t}\n\td := decoder{buffer: data}\n\tm.Txid = uint32(d.readUint(4))\n\tm.Reserved = uint32(d.readUint(4))\n\tm.Flags = uint32(d.readUint(4))\n\tm.Ordinal = uint32(d.readUint(4))\n\treturn nil\n}", "...
[ "0.7207782", "0.6948204", "0.68720686", "0.67847025", "0.6483132", "0.6428106", "0.63860524", "0.63735026", "0.63142973", "0.6302375", "0.6265352", "0.62517077", "0.6154132", "0.6125591", "0.6122402", "0.61045206", "0.6078034", "0.602972", "0.5967966", "0.5937088", "0.5928305...
0.79296327
0
NewPodService returns a new Pod KubeService.
NewPodService возвращает новый Pod KubeService.
func NewPodService(kubeClient kubernetes.Interface, logger log.Logger, metricsRecorder metrics.Recorder) *PodService { logger = logger.With("service", "k8s.pod") return &PodService{ kubeClient: kubeClient, logger: logger, metricsRecorder: metricsRecorder, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewService(name string, namespace string, servicePorts []core.ServicePort) *core.Service {\n\n\tlabels := GetCommonLabels()\n\n\treturn &core.Service{\n\t\tTypeMeta: metav1.TypeMeta{\n\t\t\tKind: \"Service\",\n\t\t\tAPIVersion: core.SchemeGroupVersion.String(),\n\t\t},\n\t\tObjectMeta: metav1.ObjectMeta...
[ "0.6994864", "0.67725277", "0.677059", "0.6735671", "0.6686454", "0.667864", "0.6664134", "0.6664134", "0.6664134", "0.6664134", "0.66502446", "0.66502446", "0.66502446", "0.6645156", "0.6600781", "0.6594829", "0.65936637", "0.65918815", "0.65541756", "0.65410894", "0.6506458...
0.78941596
0
CreateProject gets incoming data and creates a project.
CreateProject получает входные данные и создает проект.
func CreateProject(w http.ResponseWriter, r *http.Request) { // Get incoming data, content n' stuff // Pass those data and create em' // Return new project and response }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func CreateProject(w http.ResponseWriter, r *http.Request) {\n\tvar p models.Project\n\n\tu := mw.GetUser(r.Context())\n\tif u == nil || !u.IsAdmin {\n\t\tw.WriteHeader(403)\n\t\tw.Write(apiError(\"you must be logged in as a system administrator to create a project\"))\n\t\treturn\n\t}\n\n\tdecoder := json.NewDeco...
[ "0.838281", "0.8108102", "0.8092922", "0.80711776", "0.7862171", "0.78485775", "0.7846764", "0.7839464", "0.7783809", "0.7779148", "0.7746391", "0.7695536", "0.7629132", "0.7626169", "0.7617919", "0.7612046", "0.76049435", "0.7562666", "0.75614625", "0.7513948", "0.74994123",...
0.8574186
0
UpdateProject gets incoming data and updates project data.
UpdateProject получает входные данные и обновляет данные проекта.
func UpdateProject(w http.ResponseWriter, r *http.Request) { // Get Project ID. // Perform db stuff. // Return a response. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func UpdateProject(w http.ResponseWriter, r *http.Request) {\n\tvar p models.Project\n\n\tu := mw.GetUser(r.Context())\n\tif u == nil || !u.IsAdmin {\n\t\tw.WriteHeader(403)\n\t\tw.Write(apiError(\"you must be logged in as a system administrator to create a project\"))\n\t\treturn\n\t}\n\n\tdecoder := json.NewDeco...
[ "0.7809559", "0.7789207", "0.7772251", "0.7736949", "0.7716326", "0.7592858", "0.75240904", "0.74874264", "0.74486184", "0.73906296", "0.73197263", "0.7312109", "0.7310997", "0.72480655", "0.711599", "0.70102924", "0.6985994", "0.6947166", "0.69454956", "0.688732", "0.6876805...
0.78469765
0
GetProjects gets incoming id array of project IDs and return their info.
GetProjects получает входной массив идентификаторов проектов и возвращает их информацию.
func GetProjects(w http.ResponseWriter, r *http.Request) { // Get IDs for projects // Grab those projects. // Return those cool projects and response }
{ "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.76841617", "0.76231533", "0.7400665", "0.73783094", "0.7172055", "0.7072802", "0.7026091", "0.69904083", "0.6946848", "0.6946312", "0.69244397", "0.69090414", "0.6883423", "0.67496324", "0.67429686", "0.6737116", "0.66872513", "0.66619146", "0.66527873", "0.66122216", "0.6...
0.8194551
0
GetPeerIdentity gets the connection's peer identity.
GetPeerIdentity получает идентичность узла соединения.
func (client *Client) GetPeerIdentity() (*identity.PeerIdentity, error) { return client.conn.PeerIdentity() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Client) GetIdentity(ctx context.Context) (string, error) {\n\tres, err := c.RpcClient.GetIdentity(ctx)\n\terr = checkRpcResult(res.GeneralResponse, err)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn res.Result.Identity, nil\n}", "func (ac *authenticatedConnection) RemotePeer() peer.ID {\n\tret...
[ "0.60653913", "0.59982324", "0.5994207", "0.59636384", "0.5954036", "0.58539706", "0.5807599", "0.58044755", "0.57964677", "0.56881976", "0.5614483", "0.5551721", "0.55338156", "0.55311227", "0.5515146", "0.5501002", "0.54259455", "0.5424778", "0.54058045", "0.53819424", "0.5...
0.8242226
0
ignoreEOF is an utility func for ignoring EOF error, when it's not important.
ignoreEOF — это вспомогательная функция для игнорирования ошибки EOF, когда это не важно.
func ignoreEOF(err error) error { if errors.Is(err, io.EOF) { return nil } return err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func IgnoreEOF(err error) error {\n\tif err == io.EOF {\n\t\treturn nil\n\t}\n\treturn err\n}", "func EOF(x error) error { return x }", "func eof(err error) bool { return err == io.EOF }", "func treatEOFErrorsAsNil(err error) error {\n\tif err == nil {\n\t\treturn nil\n\t}\n\tif errors.Is(err, io.EOF) {\n\t\...
[ "0.8521816", "0.66316926", "0.6306891", "0.6257713", "0.5980924", "0.59166044", "0.5870907", "0.5784568", "0.5784294", "0.57793224", "0.5767844", "0.57236004", "0.57236004", "0.57236004", "0.57236004", "0.57236004", "0.5638349", "0.5638349", "0.55618286", "0.5451496", "0.5416...
0.8567482
0
Function to convert a gravity to a string. Returns an empty string if the gravity type is unknown (or invalid)
Функция для преобразования гравитации в строку. Возвращает пустую строку, если тип гравитации неизвестен (или недействителен)
func (g *Gravity) String() string { // Iterate over the gravity types for name, gravity := range GravityTypes { // If the horizontal and vertical gravity is a match if g.HorizGravity == gravity.HorizGravity && g.VertGravity == gravity.VertGravity { return name } } // Otherwise return an empty string re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c CurveType) String() string {\n\tswitch c {\n\tcase Hilbert:\n\t\treturn \"Hilbert\"\n\tcase Morton:\n\t\treturn \"Morton\"\n\t}\n\treturn \"\"\n}", "func (o SpaceInformationType) String() string {\n\treturn ToString(reflect.ValueOf(o))\n}", "func (me Tangle360Type) String() string { return xsdt.Double(...
[ "0.5575802", "0.5499247", "0.5484856", "0.5476465", "0.54468846", "0.54457223", "0.54219407", "0.5417401", "0.541277", "0.5407705", "0.53995806", "0.53897923", "0.5382045", "0.536176", "0.5355089", "0.53541756", "0.5338253", "0.53325325", "0.53228474", "0.53225034", "0.531000...
0.7351317
0
Function to parse a string into a gravity type. If value is not a valid gravity, the function returns an error. If the value is an empty string, the default gravity 'def' is used instead
Функция для парсинга строки в тип гравитации. Если значение не является допустимым типом гравитации, функция возвращает ошибку. Если значение — пустая строка, используется вместо этого default-гравитация 'def'
func ParseGravity(value string, def Gravity) (Gravity, error) { // Convert the string to lowercase value = strings.ToLower(value) // If the value isn't given, use the default if value == "" { return def, nil } // Try to get the gravity type from the map gravity, ok := GravityTypes[value] if ok { return grav...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ParseStringToStorageClassType(value string) (ret StorageClassType) {\n\tswitch value {\n\tcase \"STANDARD\":\n\t\tret = StorageClassStandard\n\tcase \"STANDARD_IA\", \"WARM\":\n\t\tret = StorageClassWarm\n\tcase \"GLACIER\", \"COLD\":\n\t\tret = StorageClassCold\n\tdefault:\n\t\tret = \"\"\n\t}\n\treturn\n}",...
[ "0.5375152", "0.53319323", "0.518015", "0.5162776", "0.51477826", "0.50997907", "0.50446767", "0.49252293", "0.4923826", "0.49124753", "0.4878213", "0.487216", "0.48520857", "0.48334092", "0.47779343", "0.47779343", "0.47713298", "0.4755434", "0.47027177", "0.4701107", "0.469...
0.80514586
0
GetConnectionDetails calls the data catalog service
GetConnectionDetails вызывает службу каталога данных
func GetConnectionDetails(datasetID string, req *modules.DataInfo, input *app.M4DApplication) error { // Set up a connection to the data catalog interface server. conn, err := grpc.Dial(utils.GetDataCatalogServiceAddress(), grpc.WithInsecure(), grpc.WithBlock()) if err != nil { return err } defer conn.Close() c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func GetConnectionDetails(req *modules.DataInfo, input *app.M4DApplication) error {\n\t// Set up a connection to the data catalog interface server.\n\tconn, err := grpc.Dial(utils.GetDataCatalogServiceAddress(), grpc.WithInsecure(), grpc.WithBlock())\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer conn.Close()\n\...
[ "0.7811777", "0.64218867", "0.6247037", "0.6234979", "0.6198452", "0.61878574", "0.61641467", "0.61612487", "0.6139142", "0.61310023", "0.60981506", "0.6091691", "0.6087747", "0.59778386", "0.5948832", "0.5941653", "0.58762443", "0.57883453", "0.573324", "0.56949484", "0.5663...
0.77983415
1
FormatDiscoveryMessage returns string reparesentation of Playlist Summary
FormatDiscoveryMessage возвращает строковое представление Playlist Summary
func FormatDiscoveryMessage(summary *types.PlaylistTracksSummary) string { builder := &strings.Builder{} builder.WriteString(fmt.Sprintf("Playlist '%v' summary:\n", summary.Name)) for i, t := range summary.Tracks { str := fmt.Sprintf("#%v. [%v - %v](%v)\n", i+1, t.Artist, t.Name, t.Link) builder.WriteString(st...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func discover(logger *zap.Logger, overlay *kademlia.Protocol) string {\n\tids := overlay.Discover()\n\n\tvar str []string\n\tvar info string\n\tfor _, id := range ids {\n\t\tstr = append(str, fmt.Sprintf(\"%s(%s)\", id.Address, id.PubKey.String()[:PrintedLength]))\n\t}\n\n\tif len(ids) > 0 {\n\t\tlogger.Info(fmt.S...
[ "0.5028478", "0.48694223", "0.48003936", "0.4676342", "0.46760762", "0.46760762", "0.4615027", "0.45994487", "0.458241", "0.4579977", "0.45732588", "0.45495096", "0.45187613", "0.4513228", "0.44816542", "0.44712347", "0.44522518", "0.44487467", "0.4439808", "0.4423179", "0.44...
0.8633062
0
GetCategory returns the Category name of the DockerModule
GetCategory возвращает имя категории DockerModule
func (m *Module) GetCategory() string { return "docker" }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (Lawrencium) GetCategory() string {\n\tvar c categoryType = actinoid\n\treturn c.get()\n}", "func Category() string {\n\treturn category\n}", "func (Samarium) GetCategory() string {\n\tvar c categoryType = lanthanoid\n\treturn c.get()\n}", "func (Sodium) GetCategory() string {\n\tvar c categoryType = al...
[ "0.7168049", "0.7056861", "0.6867676", "0.6864481", "0.6832735", "0.6789213", "0.6726447", "0.65613014", "0.6523389", "0.65107214", "0.64703894", "0.6399247", "0.63079035", "0.6284974", "0.6259871", "0.62503314", "0.6238926", "0.6224922", "0.61545014", "0.6119946", "0.6119148...
0.84576774
0
Code returns the option's code
Код возвращает код опции
func (op *OptIAAddress) Code() OptionCode { return OptionIAAddr }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (op *OptVendorOpts) Code() OptionCode {\n\treturn OptionVendorOpts\n}", "func (o *BuildComboFormDescriptorOK) Code() int {\n\treturn 200\n}", "func (op *OptDHCPv4Msg) Code() OptionCode {\n\treturn OptionDHCPv4Msg\n}", "func (op *optClientLinkLayerAddress) Code() OptionCode {\n\treturn OptionClientLinkLa...
[ "0.72313315", "0.69734895", "0.6881529", "0.6850448", "0.6735197", "0.6698436", "0.66969913", "0.66453904", "0.6608055", "0.653936", "0.65173614", "0.6516536", "0.6487242", "0.64759696", "0.64638144", "0.6413874", "0.6338029", "0.6321097", "0.63162625", "0.631467", "0.6305693...
0.71896785
1
ParseOptIAAddress builds an OptIAAddress structure from a sequence of bytes. The input data does not include option code and length bytes.
ParseOptIAAddress строит структуру OptIAAddress из последовательности байтов. Входные данные не включают байты кода опции и длины.
func ParseOptIAAddress(data []byte) (*OptIAAddress, error) { var opt OptIAAddress buf := uio.NewBigEndianBuffer(data) opt.IPv6Addr = net.IP(buf.CopyN(net.IPv6len)) opt.PreferredLifetime = buf.Read32() opt.ValidLifetime = buf.Read32() if err := opt.Options.FromBytes(buf.ReadAll()); err != nil { return nil, err ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ParseAddress(addr string) (*Address, error) {\n\taddr = strings.ToUpper(addr)\n\tl := len(addr)\n\tif l < 50 {\n\t\treturn nil, InvalidAccountAddrError{reason: \"length\"}\n\t}\n\ti := l - 50 // start index of hex\n\n\tidh, err := hex.DecodeString(addr[i:])\n\tif err != nil {\n\t\treturn nil, InvalidAccountAd...
[ "0.6095162", "0.5969518", "0.5851808", "0.575989", "0.57291037", "0.56328076", "0.56151664", "0.5525519", "0.546415", "0.5449659", "0.5433965", "0.54182434", "0.5393001", "0.53877", "0.535847", "0.53314054", "0.5328453", "0.5295815", "0.5283535", "0.52241075", "0.51893", "0...
0.80320567
0
CreateVersionCommand creates a cmdline 'subcommand' to display version information. The format of the information printed is: / (; ; ...) The version and tags are set at build time using something like: go build ldflags \ "X github.com/grailbio/base/cmdutil.version=$version \ X github.com/grailbio/base/cmdutil.tags=$ta...
CreateVersionCommand создает cmdline 'подкоманду' для отображения информации о версии. Формат информации, которая выводится, следующий: / (; ; ...) Версия и метки устанавливаются во время сборки с помощью чего-то вроде: go build ldflags \ "X github.com/grailbio/base/cmdutil.version=$version \ X github.com/grailbio/base...
func CreateVersionCommand(name, prefix string) *cmdline.Command { return &cmdline.Command{ Runner: RunnerFunc(func(_ *cmdline.Env, _ []string) error { printVersion(prefix) return nil }), Name: name, Short: "Display version information", } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewVersionCommand(streams genericclioptions.IOStreams) *cobra.Command {\n\tcmd := &cobra.Command{\n\t\tUse: \"version\",\n\t\tShort: \"Print the version information for kubectl trace\",\n\t\tRunE: func(c *cobra.Command, args []string) error {\n\t\t\tfmt.Fprintln(streams.Out, version.String())\n\t\t\treturn ...
[ "0.71332157", "0.6940008", "0.6910998", "0.6894133", "0.68905944", "0.6856503", "0.67919654", "0.67875063", "0.6761101", "0.6744674", "0.66154164", "0.6593916", "0.653667", "0.64331496", "0.6401623", "0.63777304", "0.6329797", "0.62582576", "0.6193203", "0.6113864", "0.609285...
0.7849763
0
CreateInfoCommand creates a command akin to that created by CreatedVersionCommand but also includes the output of running each of the supplied info closures.
CreateInfoCommand создает команду, похожую на ту, которая создается с помощью CreatedVersionCommand, но также включает результат выполнения каждого из предоставленных закрытых выражений info.
func CreateInfoCommand(name, prefix string, info ...func(*context.T, *cmdline.Env, []string) error) *cmdline.Command { return &cmdline.Command{ Runner: v23cmd.RunnerFunc(func(ctx *context.T, env *cmdline.Env, args []string) error { printVersion(prefix) for _, ifn := range info { if err := ifn(ctx, env, arg...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewInfoCommand(agentCli *AgentCli) *cobra.Command {\n\tcmd := &cobra.Command{\n\t\tUse: \"info\",\n\t\tShort: \"Displays system-wide information.\",\n\t\tArgs: cli.NoArgs,\n\t\tPreRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\treturn agentCli.Initialize()\n\t\t},\n\t\tRun: func(cmd *cobra.Com...
[ "0.67512655", "0.63318264", "0.6103407", "0.60789835", "0.5999456", "0.5973875", "0.5964833", "0.5921458", "0.5850257", "0.5830768", "0.58251804", "0.57971406", "0.57530457", "0.5738728", "0.57342035", "0.57266986", "0.5688524", "0.5670645", "0.5661567", "0.5643408", "0.56196...
0.8077462
0
Prompt displays a CLI prompt to the user. It prints the specified message, and gives a list of options, with a preselected default (1 to not set any default). It reads the user input from the specified input stream (e.g. os.Stdin) and returns the selected option as a string.
Prompt отображает CLI-приглашение пользователю. Он выводит указанное сообщение и предоставляет список вариантов с предварительно выбранной по умолчанию опцией (1, чтобы не устанавливать никакой дефолт). Он считывает ввод пользователя из указанного потока ввода (например, os.Stdin) и возвращает выбранную опцию в виде ст...
func Prompt(stream io.Reader, message string, defaultIdx int, options ...string) (string, error) { if len(options) < 1 { return "", errors.New("no options specified") } validOptions := map[string]bool{} var buf bytes.Buffer buf.WriteString(message) buf.WriteString(" (") for i, o := range options { validOp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func Prompt(prompt string) (s string, err error) {\n\tfmt.Printf(\"%s\", prompt)\n\tstdin := bufio.NewReader(os.Stdin)\n\tl, _, err := stdin.ReadLine()\n\treturn string(l), err\n}", "func InputPrompt(label string, required bool) string {\n\tinput := bufio.NewScanner(os.Stdin)\n\n\tfmt.Printf(\"%s : \\n\", label)...
[ "0.67208904", "0.6344035", "0.6259892", "0.62460095", "0.6184595", "0.6145198", "0.6137686", "0.6094732", "0.6065367", "0.604232", "0.59828156", "0.59640247", "0.59612864", "0.5935014", "0.5933619", "0.59018624", "0.5896817", "0.5866267", "0.58331585", "0.5828249", "0.5823301...
0.76892096
0
NewCmd returns a cobra.Command for archiving images operations.
NewCmd возвращает cobra.Command для операций архивирования образов.
func NewCmd() *cobra.Command { cmd := &cobra.Command{ Use: "archive-images", Short: "Export Capact Docker images to a tar archive", Long: "Subcommand for various manifest generation operations", } cmd.AddCommand(NewFromHelmCharts()) return cmd }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewCmdCreate(out io.Writer) *cobra.Command {\n\tcf := &run.CreateFlags{}\n\n\tcmd := &cobra.Command{\n\t\tUse: \"create <image>\",\n\t\tShort: \"Create a new VM without starting it\",\n\t\tLong: dedent.Dedent(`\n\t\t\tCreate a new VM by combining the given image and kernel.\n\t\t\tVarious VM tunables can be...
[ "0.6740657", "0.6685995", "0.6685378", "0.6652252", "0.66018087", "0.65894043", "0.65083665", "0.6456303", "0.64481395", "0.6446897", "0.64370805", "0.6433159", "0.64153534", "0.63907087", "0.63795507", "0.63594395", "0.633699", "0.63093776", "0.63058627", "0.62995654", "0.62...
0.8364528
0
NewCloudAwsVirtualMachineAllOf instantiates a new CloudAwsVirtualMachineAllOf object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed
NewCloudAwsVirtualMachineAllOf создает новый объект CloudAwsVirtualMachineAllOf. Этот конструктор присваивает значения по умолчанию свойствам, которые определены, и убеждается, что свойства, требуемые API, установлены, но набор аргументов изменится при изменении набора требуемых свойств
func NewCloudAwsVirtualMachineAllOf(classId string, objectType string) *CloudAwsVirtualMachineAllOf { this := CloudAwsVirtualMachineAllOf{} this.ClassId = classId this.ObjectType = objectType return &this }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewCloudAwsVirtualMachineAllOfWithDefaults() *CloudAwsVirtualMachineAllOf {\n\tthis := CloudAwsVirtualMachineAllOf{}\n\tvar classId string = \"cloud.AwsVirtualMachine\"\n\tthis.ClassId = classId\n\tvar objectType string = \"cloud.AwsVirtualMachine\"\n\tthis.ObjectType = objectType\n\treturn &this\n}", "func...
[ "0.75913084", "0.64905167", "0.6456979", "0.6426578", "0.641052", "0.63549984", "0.62398493", "0.6167122", "0.6133941", "0.5522241", "0.549942", "0.5448296", "0.53074896", "0.52958477", "0.5290606", "0.52563024", "0.5180518", "0.51742876", "0.5128644", "0.5117864", "0.510673"...
0.79741985
0
NewCloudAwsVirtualMachineAllOfWithDefaults instantiates a new CloudAwsVirtualMachineAllOf object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set
NewCloudAwsVirtualMachineAllOfWithDefaults создает новый объект CloudAwsVirtualMachineAllOf. Этот конструктор присваивает только значения по умолчанию свойствам, для которых они определены, но не гарантирует, что свойства, требуемые API, будут заданы.
func NewCloudAwsVirtualMachineAllOfWithDefaults() *CloudAwsVirtualMachineAllOf { this := CloudAwsVirtualMachineAllOf{} var classId string = "cloud.AwsVirtualMachine" this.ClassId = classId var objectType string = "cloud.AwsVirtualMachine" this.ObjectType = objectType return &this }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewHyperflexVirtualMachineAllOfWithDefaults() *HyperflexVirtualMachineAllOf {\n\tthis := HyperflexVirtualMachineAllOf{}\n\tvar classId string = \"hyperflex.VirtualMachine\"\n\tthis.ClassId = classId\n\tvar objectType string = \"hyperflex.VirtualMachine\"\n\tthis.ObjectType = objectType\n\treturn &this\n}", ...
[ "0.7302019", "0.7197099", "0.6901963", "0.68930364", "0.66952777", "0.6453485", "0.61395067", "0.610039", "0.6019124", "0.59342843", "0.58286214", "0.5814285", "0.5803453", "0.57177156", "0.5695191", "0.5685849", "0.56805533", "0.55701065", "0.5556591", "0.5554377", "0.554983...
0.8176324
0
GetAwsBillingUnit returns the AwsBillingUnit field value if set, zero value otherwise.
GetAwsBillingUnit возвращает значение поля AwsBillingUnit, если оно задано, иначе возвращает нулевое значение.
func (o *CloudAwsVirtualMachineAllOf) GetAwsBillingUnit() CloudAwsBillingUnitRelationship { if o == nil || o.AwsBillingUnit == nil { var ret CloudAwsBillingUnitRelationship return ret } return *o.AwsBillingUnit }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *CloudAwsVirtualMachineAllOf) SetAwsBillingUnit(v CloudAwsBillingUnitRelationship) {\n\to.AwsBillingUnit = &v\n}", "func (o *CloudAwsVirtualMachineAllOf) GetAwsBillingUnitOk() (*CloudAwsBillingUnitRelationship, bool) {\n\tif o == nil || o.AwsBillingUnit == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Aw...
[ "0.725526", "0.7068037", "0.7028947", "0.49662375", "0.48930317", "0.48750502", "0.4870752", "0.48601797", "0.48181683", "0.4816353", "0.48036554", "0.47831035", "0.477327", "0.47651938", "0.47399577", "0.47384724", "0.469714", "0.46945193", "0.46901307", "0.46820793", "0.467...
0.7786322
0
GetAwsBillingUnitOk returns a tuple with the AwsBillingUnit field value if set, nil otherwise and a boolean to check if the value has been set.
GetAwsBillingUnitOk возвращает кортеж с значением поля AwsBillingUnit, если оно было задано, и nil в противном случае, а также булевое значение для проверки, было ли значение задано.
func (o *CloudAwsVirtualMachineAllOf) GetAwsBillingUnitOk() (*CloudAwsBillingUnitRelationship, bool) { if o == nil || o.AwsBillingUnit == nil { return nil, false } return o.AwsBillingUnit, true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *CloudAwsVirtualMachineAllOf) HasAwsBillingUnit() bool {\n\tif o != nil && o.AwsBillingUnit != nil {\n\t\treturn true\n\t}\n\n\treturn false\n}", "func (o *DataExportQuery) GetUnitOk() (*string, bool) {\n\tif o == nil || o.Unit == nil {\n\t\treturn nil, false\n\t}\n\treturn o.Unit, true\n}", "func (o *...
[ "0.7104922", "0.64157313", "0.6327983", "0.6289558", "0.62768763", "0.6262793", "0.6195215", "0.5979507", "0.5921889", "0.58292925", "0.58207434", "0.57992446", "0.5798347", "0.575605", "0.549987", "0.5464085", "0.5420285", "0.5416889", "0.540678", "0.5394582", "0.5384341", ...
0.81112826
0
HasAwsBillingUnit returns a boolean if a field has been set.
HasAwsBillingUnit возвращает логическое значение, если поле было задано.
func (o *CloudAwsVirtualMachineAllOf) HasAwsBillingUnit() bool { if o != nil && o.AwsBillingUnit != nil { return true } return false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *InlineResponse20075Stats) HasBilling() bool {\n\tif o != nil && o.Billing != nil {\n\t\treturn true\n\t}\n\n\treturn false\n}", "func (o *ViewProjectActivePages) HasBilling() bool {\n\tif o != nil && o.Billing != nil {\n\t\treturn true\n\t}\n\n\treturn false\n}", "func (o *EnvironmentUsageDto) HasSynt...
[ "0.700311", "0.6667693", "0.65554816", "0.64047885", "0.62540424", "0.5994485", "0.5865692", "0.5797638", "0.57723415", "0.56910723", "0.56457406", "0.5550224", "0.55298436", "0.55039054", "0.55026925", "0.54983115", "0.549359", "0.54661155", "0.54456234", "0.53839856", "0.53...
0.8600866
0
SetAwsBillingUnit gets a reference to the given CloudAwsBillingUnitRelationship and assigns it to the AwsBillingUnit field.
SetAwsBillingUnit получает ссылку на заданный CloudAwsBillingUnitRelationship и присваивает его полю AwsBillingUnit.
func (o *CloudAwsVirtualMachineAllOf) SetAwsBillingUnit(v CloudAwsBillingUnitRelationship) { o.AwsBillingUnit = &v }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *CloudAwsVirtualMachineAllOf) GetAwsBillingUnit() CloudAwsBillingUnitRelationship {\n\tif o == nil || o.AwsBillingUnit == nil {\n\t\tvar ret CloudAwsBillingUnitRelationship\n\t\treturn ret\n\t}\n\treturn *o.AwsBillingUnit\n}", "func (o *CloudAwsVirtualMachineAllOf) HasAwsBillingUnit() bool {\n\tif o != n...
[ "0.6953648", "0.5890108", "0.57229763", "0.5057883", "0.48786855", "0.48318487", "0.47494823", "0.47168577", "0.46298307", "0.46166262", "0.45543838", "0.4532828", "0.4531902", "0.4530853", "0.44759083", "0.4474687", "0.44626573", "0.4447421", "0.44248983", "0.44183716", "0.4...
0.78634876
0
GetKeyPair returns the KeyPair field value if set, zero value otherwise.
GetKeyPair возвращает значение поля KeyPair, если оно задано, в противном случае возвращает нулевое значение.
func (o *CloudAwsVirtualMachineAllOf) GetKeyPair() CloudAwsKeyPairRelationship { if o == nil || o.KeyPair == nil { var ret CloudAwsKeyPairRelationship return ret } return *o.KeyPair }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (client *Client) GetKeyPair(id string) (*model.KeyPair, error) {\n\treturn client.feclt.GetKeyPair(id)\n}", "func (client *Client) GetKeyPair(id string) (*model.KeyPair, error) {\n\treturn client.osclt.GetKeyPair(id)\n}", "func (o *CloudAwsVirtualMachineAllOf) GetKeyPairOk() (*CloudAwsKeyPairRelationship,...
[ "0.75120753", "0.74316525", "0.69698906", "0.6735079", "0.6679419", "0.6659267", "0.65252054", "0.64874285", "0.6468373", "0.6437245", "0.64149314", "0.6394708", "0.6146873", "0.6131079", "0.6117827", "0.6115615", "0.6075201", "0.6060732", "0.6035501", "0.60176426", "0.596817...
0.75254697
0
GetKeyPairOk returns a tuple with the KeyPair field value if set, nil otherwise and a boolean to check if the value has been set.
GetKeyPairOk возвращает кортеж с значением поля KeyPair, если оно задано, и nil в противном случае, а также булевое значение для проверки, было ли значение задано.
func (o *CloudAwsVirtualMachineAllOf) GetKeyPairOk() (*CloudAwsKeyPairRelationship, bool) { if o == nil || o.KeyPair == nil { return nil, false } return o.KeyPair, true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *PipelineSshKeyPairAllOf) GetPrivateKeyOk() (*string, bool) {\n\tif o == nil || o.PrivateKey == nil {\n\t\treturn nil, false\n\t}\n\treturn o.PrivateKey, true\n}", "func (o *CloudAwsVirtualMachineAllOf) HasKeyPair() bool {\n\tif o != nil && o.KeyPair != nil {\n\t\treturn true\n\t}\n\n\treturn false\n}", ...
[ "0.7061945", "0.6845642", "0.67340356", "0.64795125", "0.6298071", "0.6288251", "0.6209228", "0.6136143", "0.6126581", "0.61210567", "0.6116035", "0.6100783", "0.6099167", "0.606505", "0.60561866", "0.60348153", "0.6034516", "0.60280585", "0.600494", "0.597722", "0.597281", ...
0.8113723
0
SetKeyPair gets a reference to the given CloudAwsKeyPairRelationship and assigns it to the KeyPair field.
SetKeyPair получает ссылку на заданный CloudAwsKeyPairRelationship и присваивает его полю KeyPair.
func (o *CloudAwsVirtualMachineAllOf) SetKeyPair(v CloudAwsKeyPairRelationship) { o.KeyPair = &v }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *CloudAwsVirtualMachineAllOf) GetKeyPair() CloudAwsKeyPairRelationship {\n\tif o == nil || o.KeyPair == nil {\n\t\tvar ret CloudAwsKeyPairRelationship\n\t\treturn ret\n\t}\n\treturn *o.KeyPair\n}", "func (s stack) DeleteKeyPair(ctx context.Context, id string) fail.Error {\n\treturn fail.NotImplementedErr...
[ "0.59298825", "0.56376743", "0.5580803", "0.5503781", "0.54797757", "0.54481167", "0.54247004", "0.53521115", "0.5325494", "0.53130186", "0.5279733", "0.52649295", "0.52334094", "0.51875293", "0.51772195", "0.5161802", "0.5146233", "0.5131163", "0.51252997", "0.50984263", "0....
0.78977525
0
GetSecurityGroupsOk returns a tuple with the SecurityGroups field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned
GetSecurityGroupsOk возвращает кортеж с значением поля SecurityGroups, если оно было задано, и nil в противном случае, а также булевое значение для проверки, было ли значение задано. ЗАМЕЧАНИЕ: Если значение явно равно nil, будет возвращено `nil, true`
func (o *CloudAwsVirtualMachineAllOf) GetSecurityGroupsOk() ([]CloudAwsSecurityGroupRelationship, bool) { if o == nil || o.SecurityGroups == nil { return nil, false } return o.SecurityGroups, true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *CreateLoadBalancerRequest) GetSecurityGroupsOk() (*[]string, bool) {\n\tif o == nil || o.SecurityGroups == nil {\n\t\treturn nil, false\n\t}\n\treturn o.SecurityGroups, true\n}", "func (o *FiltersVmGroup) GetSecurityGroupIdsOk() (*[]string, bool) {\n\tif o == nil || o.SecurityGroupIds == nil {\n\t\tretu...
[ "0.8232663", "0.7047844", "0.70013595", "0.68706304", "0.68588334", "0.651668", "0.647456", "0.61981946", "0.6160259", "0.6145392", "0.6071484", "0.6070678", "0.60376275", "0.60219413", "0.59867287", "0.59803146", "0.587398", "0.5838932", "0.58343804", "0.5832709", "0.5827893...
0.77499956
1
HasSecurityGroups returns a boolean if a field has been set.
HasSecurityGroups возвращает логическое значение, если поле было задано.
func (o *CloudAwsVirtualMachineAllOf) HasSecurityGroups() bool { if o != nil && o.SecurityGroups != nil { return true } return false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *CreateLoadBalancerRequest) HasSecurityGroups() bool {\n\tif o != nil && o.SecurityGroups != nil {\n\t\treturn true\n\t}\n\n\treturn false\n}", "func (o *FiltersSecurityGroup) HasSecurityGroupIds() bool {\n\tif o != nil && o.SecurityGroupIds != nil {\n\t\treturn true\n\t}\n\n\treturn false\n}", "func (...
[ "0.82217926", "0.69316316", "0.6851042", "0.68082595", "0.6804337", "0.67036617", "0.6323814", "0.6295684", "0.62837297", "0.62552655", "0.6242088", "0.6223502", "0.6209826", "0.61676913", "0.60280645", "0.60165983", "0.59652287", "0.5922158", "0.59120315", "0.5886787", "0.58...
0.8029275
1
SetSecurityGroups gets a reference to the given []CloudAwsSecurityGroupRelationship and assigns it to the SecurityGroups field.
SetSecurityGroups получает ссылку на заданный []CloudAwsSecurityGroupRelationship и присваивает его полю SecurityGroups.
func (o *CloudAwsVirtualMachineAllOf) SetSecurityGroups(v []CloudAwsSecurityGroupRelationship) { o.SecurityGroups = v }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *CreateLoadBalancerRequest) SetSecurityGroups(v []string) {\n\to.SecurityGroups = &v\n}", "func (s *ModifyMountTargetSecurityGroupsInput) SetSecurityGroups(v []*string) *ModifyMountTargetSecurityGroupsInput {\n\ts.SecurityGroups = v\n\treturn s\n}", "func (s *DescribeMountTargetSecurityGroupsOutput) Se...
[ "0.7153404", "0.70500696", "0.70451057", "0.69159067", "0.6855702", "0.6766927", "0.66547847", "0.6568775", "0.63600767", "0.61523193", "0.5877236", "0.5828111", "0.5696654", "0.5696654", "0.56905776", "0.56866765", "0.56348604", "0.5631561", "0.56126946", "0.5588025", "0.555...
0.7528008
0
newConfig initialize a new server config, saves env parameters if found, otherwise use default parameters
newConfig инициализирует новый серверный конфиг, сохраняет параметры окружения, если они найдены, иначе использует параметры по умолчанию
func newConfig(envParams envParams) error { // Initialize server config. srvCfg := newServerConfigV14() // If env is set for a fresh start, save them to config file. if globalIsEnvCreds { srvCfg.SetCredential(envParams.creds) } if globalIsEnvBrowser { srvCfg.SetBrowser(envParams.browser) } // Create conf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func newConfig() (*rest.Config, error) {\n // try in cluster config first, it should fail quickly on lack of env vars\n cfg, err := inClusterConfig()\n if err != nil {\n cfg, err = clientcmd.BuildConfigFromFlags(\"\", clientcmd.RecommendedHomeFile)\n if err != nil {\n return nil, ...
[ "0.73115087", "0.70333534", "0.69000286", "0.67219496", "0.6460424", "0.6443269", "0.6437713", "0.63716805", "0.6369636", "0.6347529", "0.63264453", "0.63229084", "0.6315524", "0.63034165", "0.6300839", "0.6279276", "0.6262298", "0.6255001", "0.6136349", "0.6126579", "0.61171...
0.8209749
0
loadConfig loads a new config from disk, overrides params from env if found and valid
loadConfig загружает новый конфиг с диска, перезаписывает параметры из env, если они найдены и действительны
func loadConfig(envParams envParams) error { configFile := getConfigFile() if _, err := os.Stat(configFile); err != nil { return err } srvCfg := &serverConfigV14{} qc, err := quick.New(srvCfg) if err != nil { return err } if err = qc.Load(configFile); err != nil { return err } // If env is set overr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func LoadConfig(logger *zap.Logger, cfg interface{}) {\n\terr := envconfig.Process(\"\", cfg)\n\tif err != nil {\n\t\tenvconfig.Usage(\"\", cfg)\n\t\tlogger.Fatal(\"app: could not process config\", zap.Error(err))\n\t}\n}", "func loadConfig() {\n\toldUploadKeys = newUploadKeys\n\tuploadKeys = &oldUploadKeys\n\to...
[ "0.7223439", "0.722297", "0.71862006", "0.71744114", "0.7138698", "0.7075792", "0.70620877", "0.69731885", "0.69388396", "0.68734336", "0.68586993", "0.6851916", "0.6850344", "0.684288", "0.68320143", "0.6828521", "0.68100923", "0.6797417", "0.6796891", "0.6795742", "0.679368...
0.7518673
0
GetVersion get current config version.
GetVersion получает текущую версию конфигурации.
func (s serverConfigV14) GetVersion() string { serverConfigMu.RLock() defer serverConfigMu.RUnlock() return s.Version }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (cfg *Config) GetVersion() int {\n\treturn cfg.Version\n}", "func (d *MessagesDhConfig) GetVersion() (value int) {\n\tif d == nil {\n\t\treturn\n\t}\n\treturn d.Version\n}", "func (o *TeamConfiguration) GetVersion() string {\n\tif o == nil {\n\t\tvar ret string\n\t\treturn ret\n\t}\n\n\treturn o.Version\...
[ "0.76337713", "0.7046342", "0.6860525", "0.6821554", "0.6817502", "0.6817502", "0.6807261", "0.6802234", "0.6780509", "0.6766513", "0.6756908", "0.6733999", "0.6733999", "0.67327684", "0.6674252", "0.66709596", "0.661521", "0.6614874", "0.66082346", "0.66082346", "0.6597021",...
0.71078044
1
SetBrowser set if browser is enabled.
Установить браузер, если браузер включен.
func (s *serverConfigV14) SetBrowser(v string) { serverConfigMu.Lock() defer serverConfigMu.Unlock() // Set browser param s.Browser = v }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *UserSimulationEventInfo) SetBrowser(value *string)() {\n m.browser = value\n}", "func (m *IosiPadOSWebClip) SetUseManagedBrowser(value *bool)() {\n err := m.GetBackingStore().Set(\"useManagedBrowser\", value)\n if err != nil {\n panic(err)\n }\n}", "func (s *Portal) SetBrowserType(v...
[ "0.72971094", "0.66990113", "0.5628305", "0.55711406", "0.5487769", "0.53573465", "0.5282512", "0.5175293", "0.51374984", "0.5120229", "0.5111362", "0.5064141", "0.50546795", "0.49590006", "0.4958929", "0.48795363", "0.4874678", "0.4832962", "0.47898892", "0.47596237", "0.475...
0.7992024
0
UpdateAdminRole updates role of an admin
UpdateAdminRole обновляет роль администратора
func (orm *ORM) UpdateAdminRole(ctx context.Context, adminID string, role string) (bool, error) { var _Admin models.Admin err := orm.DB.DB.First(&_Admin, "id = ?", adminID).Error if errors.Is(err, gorm.ErrRecordNotFound) { return false, errors.New("AdminNotFound") } _Admin.Role = role orm.DB.DB.Save(&_Admin) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (bs *DefaultSecurity) UpdateAdminRoles(login string, delete bool) error {\n\tfor i, name := range bs.Admins.Roles {\n\t\tif name == login {\n\t\t\tif delete {\n\t\t\t\tbs.Admins.Roles = append(bs.Admins.Roles[:i], bs.Admins.Roles[i+1:]...)\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn errors.New(\"Role already e...
[ "0.75154316", "0.719224", "0.7145205", "0.7117579", "0.69392425", "0.6890341", "0.6837208", "0.6815211", "0.67718214", "0.6735075", "0.6655265", "0.66327924", "0.6616167", "0.66020566", "0.6572484", "0.6556261", "0.6539695", "0.649078", "0.6460554", "0.64441735", "0.6400338",...
0.75749993
0
ResendCode helps to resend a new code
ResendCode помогает отправить новый код
func (orm *ORM) ResendCode(ctx context.Context, adminID string) (*models.Admin, error) { var _Admin models.Admin // check if admin exists err := orm.DB.DB.First(&_Admin, "id = ?", adminID).Error if errors.Is(err, gorm.ErrRecordNotFound) { return nil, errors.New("AdminNotFound") } //generate code code := gene...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (dc *DexClient) ResendActivationCode(email string) error {\n\treturn dc.ResendActivationCodeContext(context.Background(), email)\n}", "func (dc *DexClient) ResendActivationCodeContext(ctx context.Context, email string) error {\n\t// Create request body\n\treq := map[string]string{\n\t\t\"email\": email,\n\t...
[ "0.6858339", "0.59381795", "0.58342206", "0.55491394", "0.5370716", "0.53603715", "0.53393215", "0.53146356", "0.53073716", "0.53061116", "0.5272337", "0.52508247", "0.5212652", "0.5147963", "0.5101353", "0.5094711", "0.509436", "0.509355", "0.5080473", "0.5077903", "0.507390...
0.7235184
0
CompareAdminCodes compares the admin code sent by user
CompareAdminCodes сравнивает административный код, отправленный пользователем
func (orm *ORM) CompareAdminCodes(ctx context.Context, adminID string, code string) (bool, error) { //check in redis to see if its the same and not expired value, err := orm.rdb.Get(ctx, fmt.Sprintf("%s", adminID)).Result() if err == redis.Nil { return false, errors.New("CodeHasExpired") } else if err != nil { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func checkAdmin(value int64) bool {\n\tfor _, i := range Config.Admins {\n\t\tif i == value {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}", "func (o *CTROracle) CheckAdmin(ciphertext []byte) bool {\n\tctr := stream.NewCTR(o.Key, o.Nonce)\n\tdecrypted := string(ctr.Decrypt(ciphertext))\n\n\treturn strings.I...
[ "0.5926233", "0.5840442", "0.5440513", "0.5376668", "0.53707075", "0.5186763", "0.51571697", "0.51361406", "0.50601006", "0.5047268", "0.50200075", "0.5019204", "0.5016419", "0.50071216", "0.49842063", "0.49710804", "0.49564472", "0.494138", "0.49289712", "0.490529", "0.49040...
0.80040187
0
Value returns a value constructed from the type of the event and filled via the bound contract's UnpackLog function. The optional typ parameter allows to disambiguate the type to select. This is useful in cases where the ID of an EventInfo refers to multiples EventType where each of the bound contract would be able to ...
Значение возвращает значение, построенное из типа события и заполненное с помощью функции UnpackLog связанного контракта. Опциональный параметр typ позволяет разрешить неоднозначность типа для выбора. Это полезно в случаях, когда идентификатор EventInfo ссылается на несколько EventType, и каждый из связанных контрактов...
func (ev *EventInfo) Value(log types.Log, typ ...reflect.Type) (res reflect.Value, err error) { var ty reflect.Type if len(typ) > 0 { ty = typ[0] } for _, u := range ev.Types { if ty != nil && ty != u.Type { continue } event := reflect.New(u.Type.Elem()) err = u.BoundContract.UnpackLog(event.Interface(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (e _event) Type() string { return e.Type_ }", "func (ev binlogEvent) Type() byte {\n\treturn ev.Bytes()[BinlogEventTypeOffset]\n}", "func (e *basicEvent) Type() Type {\n\treturn e.dtype\n}", "func EventType(val string) zap.Field {\n\treturn zap.String(FieldEventType, val)\n}", "func (bse *BaseEvent) T...
[ "0.5817425", "0.5224016", "0.5199794", "0.5174661", "0.50340146", "0.49963158", "0.4947979", "0.48776007", "0.4869081", "0.48292866", "0.47609672", "0.47547865", "0.4714412", "0.46656308", "0.46602678", "0.4621549", "0.45972863", "0.45967934", "0.4589144", "0.4566101", "0.455...
0.7790924
0
NewListGroupsOK creates a ListGroupsOK with default headers values
NewListGroupsOK создает ListGroupsOK с значениями заголовков по умолчанию
func NewListGroupsOK() *ListGroupsOK { return &ListGroupsOK{} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewListGroupsDefault(code int) *ListGroupsDefault {\n\treturn &ListGroupsDefault{\n\t\t_statusCode: code,\n\t}\n}", "func (c *DefaultIdentityProvider) ListGroups(ctx context.Context, options *metainternal.ListOptions) (*auth.GroupList, error) {\n\tkeyword := \"\"\n\tlimit := 50\n\tif options.FieldSelector !...
[ "0.6938777", "0.61539084", "0.61058784", "0.60837674", "0.6075854", "0.60570604", "0.60215706", "0.6012626", "0.60092974", "0.6003559", "0.599757", "0.59502655", "0.5944972", "0.5928773", "0.59200424", "0.5902793", "0.5882899", "0.5873967", "0.58671695", "0.5861143", "0.58153...
0.7069612
0
NewListGroupsBadRequest creates a ListGroupsBadRequest with default headers values
NewListGroupsBadRequest создает ListGroupsBadRequest с значениями заголовков по умолчанию
func NewListGroupsBadRequest() *ListGroupsBadRequest { return &ListGroupsBadRequest{} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewListServerGroupBadRequest() *ListServerGroupBadRequest {\n\treturn &ListServerGroupBadRequest{}\n}", "func NewGetConsistencyGroupsBadRequest() *GetConsistencyGroupsBadRequest {\n\treturn &GetConsistencyGroupsBadRequest{}\n}", "func NewGetHostGroupsBadRequest() *GetHostGroupsBadRequest {\n\treturn &GetH...
[ "0.7203379", "0.6827672", "0.6800662", "0.6767549", "0.65069234", "0.6362982", "0.6343974", "0.6341393", "0.6338169", "0.61313295", "0.6129404", "0.6056113", "0.60408044", "0.6037293", "0.60331726", "0.6015777", "0.5988406", "0.591956", "0.5843401", "0.5837527", "0.58244187",...
0.8323626
0
NewListGroupsForbidden creates a ListGroupsForbidden with default headers values
NewListGroupsForbidden создает ListGroupsForbidden с значениями заголовков по умолчанию
func NewListGroupsForbidden() *ListGroupsForbidden { return &ListGroupsForbidden{} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewListGroupsBadRequest() *ListGroupsBadRequest {\n\treturn &ListGroupsBadRequest{}\n}", "func NewGetHostGroupsForbidden() *GetHostGroupsForbidden {\n\treturn &GetHostGroupsForbidden{}\n}", "func getGroups(w http.ResponseWriter, r *http.Request) {\n InitResponse(&w)\n if r.Method == \"OPTIONS\" {return}...
[ "0.6481354", "0.63941246", "0.6109768", "0.5942938", "0.5937463", "0.5933636", "0.5757323", "0.5738157", "0.5690592", "0.5634998", "0.5624124", "0.55764693", "0.5573737", "0.5562796", "0.5555221", "0.552152", "0.55055183", "0.5485115", "0.5476348", "0.54459757", "0.54165435",...
0.7673657
0
NewListGroupsNotFound creates a ListGroupsNotFound with default headers values
NewListGroupsNotFound создает ListGroupsNotFound с значениями заголовков по умолчанию
func NewListGroupsNotFound() *ListGroupsNotFound { return &ListGroupsNotFound{} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewListGroupsDefault(code int) *ListGroupsDefault {\n\treturn &ListGroupsDefault{\n\t\t_statusCode: code,\n\t}\n}", "func NewListGroupsBadRequest() *ListGroupsBadRequest {\n\treturn &ListGroupsBadRequest{}\n}", "func NewGetHostGroupsNotFound() *GetHostGroupsNotFound {\n\treturn &GetHostGroupsNotFound{}\n}...
[ "0.63562137", "0.6228668", "0.6198471", "0.6065619", "0.58854806", "0.58265823", "0.5792491", "0.57695234", "0.57186234", "0.56959563", "0.5435722", "0.54346776", "0.5393077", "0.53348124", "0.5326011", "0.53110677", "0.5290318", "0.528526", "0.5273268", "0.52673376", "0.5266...
0.7558979
0
NewListGroupsDefault creates a ListGroupsDefault with default headers values
NewListGroupsDefault создает ListGroupsDefault с значениями заголовков по умолчанию
func NewListGroupsDefault(code int) *ListGroupsDefault { return &ListGroupsDefault{ _statusCode: code, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewDefaultGroups(ctx *pulumi.Context,\n\tname string, args *DefaultGroupsArgs, opts ...pulumi.ResourceOption) (*DefaultGroups, error) {\n\tif args == nil || args.GroupIds == nil {\n\t\treturn nil, errors.New(\"missing required argument 'GroupIds'\")\n\t}\n\tif args == nil || args.RealmId == nil {\n\t\treturn ...
[ "0.6909627", "0.6855606", "0.6750744", "0.67320436", "0.6511958", "0.6096127", "0.6058161", "0.6057901", "0.6002544", "0.5979988", "0.5939993", "0.5933852", "0.58916205", "0.5888019", "0.58734596", "0.5857483", "0.5743509", "0.5674591", "0.5649271", "0.562719", "0.56152534", ...
0.77026397
0
Code gets the status code for the list groups default response
Код получает код состояния для стандартного ответа списка групп по умолчанию
func (o *ListGroupsDefault) Code() int { return o._statusCode }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *PostVolumeGroupsListDefault) Code() int {\n\treturn o._statusCode\n}", "func (o *GetHostGroupsDefault) Code() int {\n\treturn o._statusCode\n}", "func (o *QueryCIDGroupsDefault) Code() int {\n\treturn o._statusCode\n}", "func (o *ListServerGroupOK) Code() int {\n\treturn 200\n}", "func (o *QueryUs...
[ "0.8499957", "0.84434056", "0.8435817", "0.8416033", "0.8345299", "0.8230771", "0.8145179", "0.80832684", "0.79981744", "0.79788136", "0.7896459", "0.7836262", "0.7748716", "0.7699286", "0.7659471", "0.7655369", "0.76534915", "0.7602137", "0.7558863", "0.75421864", "0.7498871...
0.8957152
0
ReactionDelete Handle when a reaction is deleted from a message
Обработка удаления реакции из сообщения
func (b *Bot) ReactionDelete(s *discordgo.Session, event *discordgo.MessageReactionRemove) { if f, ok := b.Commands.ReactionRemoveCommands[event.Emoji.Name]; ok { f(b, s, event) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func HandleDeleteRemindCommand(ctx context.Context, s *discordgo.Session, m *discordgo.MessageCreate, content []string) {\n\tuserID := fmt.Sprintf(\"%s-%s\", m.Author.Username, m.Author.ID)\n\n\terr := models.DeleteRemind(ctx, content[1], userID)\n\n\tif err != nil {\n\t\ts.ChannelMessageSend(m.ChannelID, fmt.Spri...
[ "0.7750925", "0.6899156", "0.68633205", "0.6679848", "0.6557125", "0.65511835", "0.6498537", "0.63918865", "0.6388954", "0.6379347", "0.63770807", "0.6354654", "0.6294034", "0.62326926", "0.6200813", "0.6182433", "0.60744053", "0.60292774", "0.5997569", "0.5922095", "0.587101...
0.7663503
1
Initialize will create database connection and wire up routes
Initialize будет создавать соединение с базой данных и настраивать маршруты
func (app *App) Initialize(user, password, dbname string) { connectionString := fmt.Sprintf("user=%s password=%s dbname=%s", user, password, dbname) var err error app.DB, err = sql.Open("postgres", connectionString) if err != nil { log.Fatal(err) } app.Router = mux.NewRouter() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (a *App) Initialize() {\n\tpsqlInfo := fmt.Sprintf(\"host=%s port=%d user=%s \"+\"password=%s dbname=%s sslmode=disable\",\n\thost, port, user, password, dbname)\n\tvar err error\n\ta.DB, err = sql.Open(\"postgres\", psqlInfo)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\ta.Router = mux.NewRouter()\n\ta....
[ "0.7584453", "0.75465846", "0.7507653", "0.74276567", "0.7385693", "0.7308852", "0.7270049", "0.7269961", "0.7269961", "0.71667546", "0.71504784", "0.71273017", "0.70464236", "0.7006716", "0.6994363", "0.6990787", "0.6919952", "0.68893766", "0.6831192", "0.6829179", "0.676510...
0.767754
0
HookClientConfigForWebhook construct a webhook.ClientConfig using a v1beta1.Webhook API object. webhook.ClientConfig is used to create a HookClient and the purpose of the config struct is to share that with other packages that need to create a HookClient.
HookClientConfigForWebhook строит webhook.ClientConfig с использованием объекта API v1beta1.Webhook. webhook.ClientConfig используется для создания HookClient, и цель структуры конфига — предоставить её другим пакетам, которым необходимо создать HookClient.
func HookClientConfigForWebhook(w *v1beta1.Webhook) webhook.ClientConfig { ret := webhook.ClientConfig{Name: w.Name, CABundle: w.ClientConfig.CABundle} if w.ClientConfig.URL != nil { ret.URL = *w.ClientConfig.URL } if w.ClientConfig.Service != nil { ret.Service = &webhook.ClientConfigService{ Name: w.Cl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func BuildClientConfigFor(webhookPath string, namespace, componentName string, servicePort int, mode, url string, caBundle []byte) admissionregistrationv1.WebhookClientConfig {\n\tvar (\n\t\tpath = webhookPath\n\t\tclientConfig = admissionregistrationv1.WebhookClientConfig{\n\t\t\t// can be empty if inject...
[ "0.6975738", "0.58652604", "0.5590961", "0.5589027", "0.5560638", "0.54133326", "0.5370507", "0.5327911", "0.53260064", "0.531939", "0.5312625", "0.5310126", "0.53042454", "0.5289221", "0.5241468", "0.52322096", "0.52140266", "0.52014375", "0.5191292", "0.5150803", "0.5130526...
0.85725427
0
Write writes len(b) bytes to memory. It returns the number of bytes written and an error, if any. Write returns a nonnil error when n != len(b).
Write записывает len(b) байтов в память. Он возвращает количество записанных байтов и ошибку, если она возникает. Write возвращает ненулевую ошибку, когда n != len(b).
func (m *Memory) Write(b []byte) (n int, err error) { if m == nil { return 0, os.ErrInvalid } if len(b) > len(m.buf) { n = len(m.buf) } else { n = len(b) } for i := 0; i < n; i++ { m.buf[i] = b[i] } m.buf = m.buf[n:] return n, nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (w *Writer) Write(b []byte) (n int, err error) {\n\tw.Lock()\n\tdefer w.Unlock()\n\tn = len(b)\n\twrite(w, b)\n\treturn n, err\n}", "func (w *Writer) Write(b []byte) int {\n\tif w.err != nil {\n\t\treturn 0\n\t}\n\tn, err := w.W.Write(b)\n\tw.check(n, err)\n\treturn n\n}", "func (w *ReadWriter) Write(b []...
[ "0.7429347", "0.7159322", "0.7155304", "0.7095502", "0.7083462", "0.69782776", "0.69447505", "0.6820908", "0.68133396", "0.6781417", "0.66773105", "0.6669058", "0.66512936", "0.66504216", "0.65993243", "0.6598238", "0.65876794", "0.65593493", "0.6512497", "0.6491802", "0.6484...
0.75367165
0
ProvidersAWS : Define the aws provider function
ProvidersAWS : Определите функцию провайдера aws
func ProvidersAWS(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json; charset=UTF-8") w.WriteHeader(http.StatusOK) if err := json.NewEncoder(w).Encode(awsResources); err != nil { panic(err) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewAWSProvider(dryRun bool) (Provider, error) {\n\tconfig := aws.NewConfig()\n\n\tsession, err := session.NewSessionWithOptions(session.Options{\n\t\tConfig: *config,\n\t\tSharedConfigState: session.SharedConfigEnable,\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tprovider := &AWSProvider...
[ "0.6819622", "0.62086576", "0.62025106", "0.61090666", "0.60824037", "0.60271865", "0.5967627", "0.59602726", "0.5927459", "0.5871286", "0.58574826", "0.5853901", "0.5825679", "0.58055574", "0.5767389", "0.5753407", "0.5695943", "0.5585618", "0.5578424", "0.5531067", "0.55276...
0.70843154
0
ResourceAWS : Define the aws resource function
ResourceAWS : Определить функцию ресурса aws
func ResourceAWS(w http.ResponseWriter, r *http.Request) { vars := mux.Vars(r) ResourceName := vars["ResourceName"] w.Header().Set("Content-Type", "application/json; charset=UTF-8") w.WriteHeader(http.StatusOK) if err := json.NewEncoder(w).Encode(awsResources[ResourceName]); err != nil { panic(err) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func resourceAwsLambdaFunctionCreate(d *schema.ResourceData, meta interface{}) error {\n\tconn := meta.(*AWSClient).lambdaconn\n\n\tfunctionName := d.Get(\"function_name\").(string)\n\treservedConcurrentExecutions := d.Get(\"reserved_concurrent_executions\").(int)\n\tiamRole := d.Get(\"role\").(string)\n\n\tlog.Pr...
[ "0.6991364", "0.6930179", "0.63717675", "0.58506465", "0.5662601", "0.5583528", "0.5579139", "0.5561207", "0.5452959", "0.54288423", "0.54267603", "0.53498", "0.53387374", "0.53074354", "0.53047895", "0.5234232", "0.5231297", "0.5206632", "0.52057105", "0.5187965", "0.5177647...
0.7337061
0
MysqlConnect return sql.DB connection
MysqlConnect возвращает соединение sql.DB
func MysqlConnect() *sql.DB { db, err := sql.Open("mysql", "root:mysql@/go-cms") err = db.Ping() if err != nil { fmt.Println(err.Error()) panic(err.Error()) // proper error handling instead of panic in your app } return db }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func Connect(ctx context.Context, dbName string) (*sql.DB, error) {\n\tdbusername := os.Getenv(\"MARIA_USERNAME\")\n\tdbpassword := os.Getenv(\"MARIA_PASSWORD\")\n\n\tdb, err := sql.Open(\"mysql\", dbusername+\":\"+dbpassword+\"@tcp(127.0.0.1:3306)/\"+dbName)\n\tif err != nil {\n\t\tlogger.Error.Println(logger.Get...
[ "0.7435016", "0.7401686", "0.72967714", "0.72485375", "0.72361165", "0.7153986", "0.71051663", "0.70108306", "0.6982586", "0.69476956", "0.6929489", "0.6918455", "0.69164646", "0.6911132", "0.6901979", "0.689255", "0.6888109", "0.68737906", "0.6856792", "0.6850909", "0.684650...
0.78162384
0
SelectFromPostByID return one row by Id
SelectFromPostByID возвращает одну строку по Id
func SelectFromPostByID(id int) *Post { db := MysqlConnect() defer db.Close() var post Post err := db.QueryRow("SELECT * FROM post where id = ?", id).Scan(&post.ID, &post.Title, &post.Description, &post.Post, &post.Date, &post.Author, &post.Thumbnail, &post.Categories) if err != nil { panic(err.Error()) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (store MySQL) GetPostByID(id int) (Post, error) {\n\tlog.Debug().Int(\"post_id\", id).Msg(\"GetPostByID\")\n\n\tconn := db.Connx(mysqlDbID)\n\n\trows, err := conn.Queryx(`\n SELECT\n `+postSelectSQL+`\n FROM\n `+postsTableName+`\n WHERE\n id = ?\n LIMIT 1`,\n\t\tid)\n\n\tif err != n...
[ "0.7332524", "0.70177686", "0.6865962", "0.6823647", "0.6802304", "0.67554516", "0.67408395", "0.6667746", "0.65764743", "0.6552099", "0.6530873", "0.6515364", "0.6512163", "0.644861", "0.6407746", "0.6329042", "0.63176656", "0.6305343", "0.6304021", "0.6272049", "0.624037", ...
0.74236697
0
mustParseInt parses the given expression as an int or returns an error.
mustParseInt парсит заданное выражение как целое число или возвращает ошибку.
func mustParseInt(expr string) (uint, error) { num, err := strconv.Atoi(expr) if err != nil { return 0, fmt.Errorf("Failed to parse int from %s: %s", expr, err) } if num < 0 { return 0, fmt.Errorf("Negative number (%d) not allowed: %s", num, expr) } return uint(num), nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func MustParseInteger(s string) Number {\n\tif res, err := ParseInteger(s); err != nil {\n\t\tpanic(err)\n\t} else {\n\t\treturn res\n\t}\n}", "func ParseInt(operand string) (value int, err error) {\n\ti64, err := strconv.ParseInt(operand, 0, 32)\n\treturn int(i64), err\n}", "func ParseCompileEvaluateInt(exp s...
[ "0.69212425", "0.6258728", "0.622956", "0.6207462", "0.6207462", "0.6166046", "0.614657", "0.6103113", "0.60874563", "0.60366434", "0.6028786", "0.60140276", "0.6012161", "0.5967202", "0.5948929", "0.59394974", "0.59371984", "0.59245354", "0.5917032", "0.58945227", "0.5839608...
0.7912464
0