text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (p *proxy) ValidatorDowntime(valID *hexutil.Big) (uint64, uint64, error) { return p.rpc.ValidatorDowntime(valID) }
[ -1.2872650623321533, 0.16391322016716003, 0.21089380979537964, 0.14108306169509888, -0.45971325039863586, -0.04336659237742424, -0.06801729649305344, 0.3462715148925781, 0.5214321613311768, -0.22347493469715118, -0.015698477625846863, -0.06372196972370148, -0.8744792938232422, 0.6307478547...
func (p *proxy) DownValidators() ([]types.OfflineValidator, error) { topID, err := p.LastValidatorId() if err != nil { return nil, err } list := make([]types.OfflineValidator, 0) for i := uint64(0); i < topID; i++ { ot, ob, err := p.ValidatorDowntime((*hexutil.Big)(big.NewInt(int64(i)))) if err != nil { ...
[ -1.3627173900604248, 0.09819908440113068, 0.6147344708442688, -0.3953077793121338, -0.09672343730926514, 0.3314095735549927, -0.025701481848955154, 0.3356906771659851, 0.23455432057380676, -0.2880944013595581, 0.22358986735343933, 1.0102629661560059, -1.7371894121170044, 0.5941953659057617...
func deleteTest(t *testing.T, creds client.Credentials, deleteData []testDeleteData) { server := setup(t, testMultiUserFilenameJSON) defer teardown(t, server) tokenCookie := login(t, server, creds) defer logout(t, server, tokenCookie) for _, d := range deleteData { t.Run(fmt.Sprintf("ID-%s", d.id), func(t *t...
[ -0.08998805284500122, 0.182293102145195, 0.6285502314567566, 0.15734907984733582, 0.25093767046928406, 0.4002801179885864, -0.11190667748451233, -0.4489772617816925, 0.20424041152000427, -0.8044840097427368, -0.025448646396398544, 0.48234501481056213, -0.4756280481815338, 0.202177077531814...
func TestDeleteAdminPrivileges(t *testing.T) { creds := client.Credentials{Username: testAdmin1Username, Password: testAdmin1UserPassword} testData := []testDeleteData{ testDeleteData{testAdmin1ID, http.StatusBadRequest}, // Can't delete yourself testDeleteData{testStaff1ID, http.StatusOK}, testDeleteData{testB...
[ -0.16001777350902557, 0.36257389187812805, 0.31688880920410156, 0.4887400269508362, 0.37516161799430847, 0.6119564175605774, -0.5393258333206177, -0.5604976415634155, 0.5324586033821106, -0.3230193257331848, 0.16705535352230072, 1.0737868547439575, -0.5733627080917358, 0.8305427432060242, ...
func TestDeleteStaffPrivileges(t *testing.T) { creds := client.Credentials{Username: testStaff1Username, Password: testStaff1UserPassword} testData := []testDeleteData{ testDeleteData{testAdmin1ID, http.StatusForbidden}, // Delete of admin not allowed testDeleteData{testStaff1ID, http.StatusBadRequest}, // Can't...
[ 0.10331863909959793, 0.5141564607620239, 0.6126719117164612, 0.538674533367157, 0.28620970249176025, 0.8439575433731079, -0.10180959105491638, -0.4722357392311096, 0.11913073062896729, -0.4595993757247925, -0.10106810927391052, 0.9793965816497803, -0.4352872967720032, 0.5912883877754211, ...
func TestDeleteBasicPrivileges(t *testing.T) { creds := client.Credentials{Username: testBasic1Username, Password: testBasic1UserPassword} testData := []testDeleteData{ testDeleteData{testAdmin1ID, http.StatusForbidden}, testDeleteData{testStaff1ID, http.StatusForbidden}, testDeleteData{testBasic1ID, http.Statu...
[ 0.2844018340110779, 0.49458572268486023, 0.5043008327484131, 0.6779147982597351, 0.2889231741428375, 1.1823467016220093, -0.68290776014328, -0.5983284115791321, -0.1439443975687027, -0.5823470950126648, -0.0906866118311882, 0.7638946771621704, -0.6751480102539062, -0.11322389543056488, 0...
func GenerateCombinedKey(key1, key2, key3 []byte) ([]byte, string) { xored := make([]byte, 16) length := len(xored) for i := 0; i < length; i++ { xored[i] = key1[i] ^ key2[i] ^ key3[i] } return xored, strings.ToUpper(hex.EncodeToString(xored)) }
[ -0.13583077490329742, 0.19863879680633545, 0.7318984270095825, 0.4123193323612213, 0.2195911705493927, 0.3914453983306885, -1.3652178049087524, 0.9019308090209961, -0.20800882577896118, 1.071528434753418, -0.9516769051551819, 0.16319669783115387, -0.9383867979049683, 0.2058177888393402, ...
func GetCountLogHandler(client *elastic.Client) func(c echo.Context) error { return func(c echo.Context) error { return countLogs(c, client) } }
[ 0.49058371782302856, -0.26289102435112, 0.7008635997772217, -0.2338036596775055, -0.026102054864168167, 0.6709429025650024, 0.6429358124732971, -0.3216747045516968, -0.5158995389938354, 0.14282725751399994, -0.28856053948402405, 0.23685212433338165, 0.38379594683647156, 0.06755524128675461...
func NewWsContext(deviceId, userId int64, conn *websocket.Conn) *WsContext { return &WsContext{ DeviceId: deviceId, UserId: userId, Conn: conn, } }
[ 0.6782059669494629, -0.482571542263031, 0.29722484946250916, 0.3185737133026123, -1.5070855617523193, -0.526850700378418, -0.6521378755569458, -0.9129281044006348, 1.1309552192687988, 0.02794109843671322, -0.8475381731987, 1.0456773042678833, -0.30535683035850525, 0.22943955659866333, -0...
func Generate() (PrivateKey, error) { var key PrivateKey pub, priv, err := box.GenerateKey(rand.Reader) if err != nil { return key, err } copy(key[:], priv[:]) copy(key[KeySize:], pub[:]) return key, nil }
[ -0.8836971521377563, 0.4436440169811249, 0.34199392795562744, -0.20996873080730438, -0.08571166545152664, 0.3504036068916321, -0.9638119339942932, -0.7262086272239685, 0.1657605767250061, 0.5457421541213989, -0.5155165791511536, 0.6903557777404785, -0.8319752812385559, 0.3348924517631531, ...
func NewPrivateKey(str string) (key PrivateKey, err error) { bs, err := base58.Decode(str) if err != nil { return key, err } if len(bs) != KeySize { return key, errors.New("invalid key") } copy(key[:], bs) return key, nil }
[ -0.18835408985614777, -0.4908508062362671, 0.14401143789291382, 0.5165582299232483, -0.5034022927284241, -0.7715714573860168, -0.4076196253299713, -0.7515485882759094, 1.3527534008026123, 1.2504454851150513, -0.39677760004997253, 0.7914794683456421, -1.228713870048523, -0.4681377112865448,...
func (key PrivateKey) Decrypt(data []byte) (PublicKey, []byte, error) { var priv [KeySize]byte copy(priv[:], key[:]) if len(data) < KeySize { return PublicKey{}, nil, fmt.Errorf("invalid message: expected public key") } var pub [KeySize]byte copy(pub[:], data[:]) data = data[KeySize:] if len(data) < NonceS...
[ -0.23492372035980225, 1.1745306253433228, 0.6741936802864075, -0.21206910908222198, -0.7457257509231567, -0.31951671838760376, 0.3323509991168976, -0.1715317815542221, 0.1359056979417801, 0.311053603887558, 0.13043905794620514, 0.6300405263900757, -0.9823750853538513, 0.5801199078559875, ...
func (key PrivateKey) Encrypt(peersPublicKey PublicKey, data []byte) []byte { var priv [KeySize]byte copy(priv[:], key[:KeySize]) var pub [KeySize]byte copy(pub[:], peersPublicKey[:]) nonce := generateNonce() sealed := box.Seal(nil, data, &nonce, &pub, &priv) result := make([]byte, 0, len(pub)+len(nonce)+len(...
[ -0.6585033535957336, 1.3350999355316162, 0.5987737774848938, -0.6184343099594116, 0.1887339949607849, -0.45697450637817383, -0.792267382144928, -0.5064384937286377, -0.10769874602556229, 0.5544511675834656, -0.19986572861671448, 0.5086535215377808, -1.923956274986267, 0.6607165932655334, ...
func (key PrivateKey) String() string { return base58.Encode(key[:]) }
[ -0.9533242583274841, -1.0600242614746094, -0.09132377058267593, -0.27026596665382385, 0.5491601228713989, 0.42291444540023804, -0.46312659978866577, -0.999387800693512, 0.5804735422134399, 1.789546012878418, -0.59150630235672, 1.3647310733795166, -1.542264699935913, 0.05148329213261604, ...
func (key PrivateKey) MarshalYAML() (interface{}, error) { return key.String(), nil }
[ -0.1713099479675293, -0.10672099143266678, 0.3303704559803009, 0.12710154056549072, -0.12947937846183777, 0.09025774896144867, -0.2465762048959732, 0.21047571301460266, 0.8674881458282471, 0.5979951620101929, -0.49227041006088257, 0.8483858108520508, -0.12749680876731873, 0.012172433547675...
func (key *PrivateKey) UnmarshalYAML(unmarshal func(interface{}) error) error { var str string err := unmarshal(&str) if err != nil { return err } *key, err = NewPrivateKey(str) if err != nil { return err } return nil }
[ -0.2296871691942215, 0.669320285320282, 0.5856992602348328, -0.5434086322784424, -0.41018110513687134, -0.8458905816078186, 0.1943792998790741, 0.2803731858730316, 0.4108741879463196, 1.0441020727157593, -0.24418878555297852, 1.0023161172866821, -0.2485843151807785, -0.12478526681661606, ...
func NewPublicKey(str string) (key PublicKey, err error) { bs, err := base58.Decode(str) if err != nil { return key, err } if len(bs) != KeySize { return key, errors.New("invalid key") } copy(key[:], bs) return key, nil }
[ 0.33108460903167725, -0.5306055545806885, 0.06444758921861649, 0.5468360185623169, -0.820681095123291, -0.5166881680488586, 0.07918378710746765, -0.1956780105829239, 0.32725757360458374, 1.2735713720321655, -0.853269636631012, 0.7995331883430481, -0.6426186561584473, 0.25260651111602783, ...
func (key PublicKey) String() string { return base58.Encode(key[:]) }
[ -0.3228110671043396, -0.7456108927726746, -0.1946096420288086, -0.14913854002952576, 0.0031128262635320425, 0.8186711072921753, -0.36143290996551514, -0.616638720035553, -0.055094700306653976, 1.3124557733535767, -0.6657660007476807, 1.4826477766036987, -1.075327754020691, 0.33526709675788...
func (key PublicKey) MarshalYAML() (interface{}, error) { return key.String(), nil }
[ 0.574713408946991, 0.02165486477315426, 0.2197144627571106, 0.24094782769680023, -0.46558699011802673, 0.517670214176178, -0.2936009168624878, 0.4335709810256958, 0.33413171768188477, 0.36205440759658813, -0.45737820863723755, 0.8249333500862122, 0.2518225908279419, 0.23549462854862213, ...
func (key *PublicKey) UnmarshalYAML(unmarshal func(interface{}) error) error { var str string err := unmarshal(&str) if err != nil { return err } *key, err = NewPublicKey(str) if err != nil { return err } return nil }
[ 0.5833985209465027, 0.8068907260894775, 0.47084182500839233, -0.3762025833129883, -0.8650843501091003, -0.6431533694267273, 0.28441306948661804, 0.8271788954734802, -0.2138415277004242, 0.7160816192626953, -0.12315229326486588, 0.8646312355995178, 0.1636420041322708, 0.11460747569799423, ...
func New(c *client.Client, u *client.UserConfig) Gateway { return &gateway{ *gw.NewHTTPGateway(c, u), } }
[ 0.6076831221580505, -0.3747585117816925, 0.16288867592811584, 0.449398398399353, -1.0986557006835938, 0.4609639346599579, -0.1253553330898285, -0.06198686733841896, -0.4634016156196594, -0.45310449600219727, -0.2739620804786682, 0.9515569806098938, 0.10176289826631546, 1.1610959768295288, ...
func (g *gateway) SearchDistinctValues(ctx context.Context, index string, field string) ([]byte, error) { searchURL, err := g.buildSearchURL(index) if err != nil { return nil, err } searchRequest, err := g.BuildRequest(ctx, http.MethodGet, buildPayload(field), searchURL.String(), gw.GetHeaders()) if err != nil {...
[ -0.9596718549728394, 1.275253176689148, 0.7649153470993042, -0.3024426996707916, 0.26672714948654175, 0.9711805582046509, -0.2791895568370819, -0.9416715502738953, -0.004090686794370413, -0.1530119776725769, -0.3950478732585907, 0.32672855257987976, -1.088327407836914, 0.530203640460968, ...
func (fi bindataFileInfo) Name() string { return fi.name }
[ 0.08166918903589249, -1.4572765827178955, 0.4833078384399414, 0.14237014949321747, -0.3545391261577606, 0.8819460272789001, 0.010945647954940796, -0.2467803955078125, -1.2708252668380737, -0.10601194947957993, -0.3917791545391083, -0.41195377707481384, 0.39125633239746094, 0.16644497215747...
func (fi bindataFileInfo) Size() int64 { return fi.size }
[ 0.16575103998184204, -0.1223422959446907, 0.17271094024181366, -0.07949239760637283, 0.3543928861618042, 0.7548951506614685, 0.5927076935768127, 0.07495921850204468, -1.0578577518463135, -1.1731369495391846, -0.10568573325872421, -0.17690835893154144, -0.33118754625320435, 0.30395281314849...
func (fi bindataFileInfo) Mode() os.FileMode { return fi.mode }
[ -0.41162919998168945, -0.9577594995498657, 0.44155263900756836, -0.13144180178642273, 0.5922524929046631, 1.610377311706543, 0.009310288354754448, 0.2884019613265991, -1.065315842628479, -1.1910521984100342, 0.4981614947319031, -0.2990283668041229, -0.17645005881786346, 0.4694020748138428,...
func (fi bindataFileInfo) ModTime() time.Time { return fi.modTime }
[ -0.2685695290565491, -0.8271465301513672, 0.35384321212768555, -0.4112885892391205, 0.37963899970054626, 0.6579224467277527, -0.6294410824775696, 0.37015482783317566, -0.2557626962661743, 0.014167135581374168, 0.4302074909210205, -0.03708653151988983, -0.8495825529098511, 0.746182441711425...
func (fi bindataFileInfo) IsDir() bool { return fi.mode&os.ModeDir != 0 }
[ 0.10024337470531464, -1.1714235544204712, 0.4835644066333771, 1.0096218585968018, 0.10103324800729752, 1.1084051132202148, 0.2600550055503845, 0.2042960673570633, -0.43129751086235046, -1.1601366996765137, 0.3743494749069214, 0.08362120389938354, -0.2748109698295593, 0.8501272797584534, ...
func (fi bindataFileInfo) Sys() interface{} { return nil }
[ -0.18937675654888153, -0.91487056016922, 0.4192674458026886, 0.23279045522212982, 0.01389834750443697, -0.11405561864376068, 0.5312886238098145, -0.4064529240131378, -0.1416921764612198, -1.7679998874664307, -0.9565558433532715, 0.39589381217956543, 0.34836944937705994, 0.461544007062912, ...
func Asset(name string) ([]byte, error) { cannonicalName := strings.Replace(name, "\\", "/", -1) if f, ok := _bindata[cannonicalName]; ok { a, err := f() if err != nil { return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err) } return a.bytes, nil } return nil, fmt.Errorf("Asset %s not foun...
[ -0.7961482405662537, -1.2313158512115479, 0.6331650614738464, -0.6093901991844177, -1.546920895576477, -0.11101029813289642, 0.129714235663414, -1.3390333652496338, -1.135871410369873, 0.4855230152606964, 0.30901390314102173, 0.3249545693397522, -0.6009676456451416, -0.44264793395996094, ...
func MustAsset(name string) []byte { a, err := Asset(name) if err != nil { panic("asset: Asset(" + name + "): " + err.Error()) } return a }
[ -0.012778956443071365, 0.11985661834478378, 0.4091298282146454, -0.5268413424491882, -0.8276715278625488, 0.4719155430793762, -0.8186293840408325, -1.5736604928970337, 0.16388541460037231, 0.6357062458992004, -0.5354578495025635, 0.35693347454071045, 0.0057142809964716434, -0.0248885955661...
func AssetInfo(name string) (os.FileInfo, error) { cannonicalName := strings.Replace(name, "\\", "/", -1) if f, ok := _bindata[cannonicalName]; ok { a, err := f() if err != nil { return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err) } return a.info, nil } return nil, fmt.Errorf("Asset...
[ 0.3719695508480072, -1.1052989959716797, 0.5630441904067993, -0.9225736260414124, -1.356386423110962, 0.003355572931468487, 0.6777525544166565, -0.8006678819656372, -1.274828553199768, 0.311536967754364, 0.26360753178596497, 0.26388123631477356, 0.06357761472463608, -0.39880770444869995, ...
func AssetNames() []string { names := make([]string, 0, len(_bindata)) for name := range _bindata { names = append(names, name) } return names }
[ -0.7293784618377686, -0.8460342288017273, 0.7321816682815552, -0.39323121309280396, -0.48951536417007446, 0.7661203145980835, -0.5028699636459351, -0.8655748963356018, -0.4145073890686035, 0.8099913597106934, 0.16903363168239594, 1.163049578666687, -0.028152840211987495, 0.0342608317732811...
func RestoreAsset(dir, name string) error { data, err := Asset(name) if err != nil { return err } info, err := AssetInfo(name) if err != nil { return err } err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0o755)) if err != nil { return err } err = ioutil.WriteFile(_filePath(dir, name), ...
[ 0.3775036036968231, -0.2965455949306488, 0.6711953282356262, -1.2307699918746948, -0.025371916592121124, -0.05296213552355766, 0.05295560508966446, -0.4704309403896332, -0.30881088972091675, -0.2702583968639374, 0.10923245549201965, 0.2335897535085678, -0.2257544845342636, -0.5065960288047...
func RestoreAssets(dir, name string) error { children, err := AssetDir(name) // File if err != nil { return RestoreAsset(dir, name) } // Dir for _, child := range children { err = RestoreAssets(dir, filepath.Join(name, child)) if err != nil { return err } } return nil }
[ 0.4226192533969879, 0.3001989424228668, 0.5813396573066711, -0.20641714334487915, -0.23828980326652527, -0.24414613842964172, 0.5739712119102478, -0.029911452904343605, 0.061882976442575455, -0.43923527002334595, 0.5113739371299744, 0.3275964856147766, -0.612514853477478, 0.035165321081876...
func (o *GetCustomerCategoryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewGetCustomerCategoryOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return re...
[ -0.16411474347114563, -0.7813995480537415, 0.6864367723464966, 0.5560430884361267, -0.3777914345264435, -1.2699798345565796, 0.09541022032499313, -0.6050595045089722, 0.23787380754947662, -0.06749443709850311, 0.5859562754631042, -0.6568400859832764, -0.6698474287986755, 0.2937785983085632...
func NewGetCustomerCategoryOK() *GetCustomerCategoryOK { return &GetCustomerCategoryOK{} }
[ 0.26314911246299744, -0.07860762625932693, 0.26886212825775146, 1.3423492908477783, -0.4920485317707062, -1.3762139081954956, 0.8398030996322632, 0.3396766185760498, -0.555873692035675, -0.9831610918045044, -0.3709448277950287, -0.23069973289966583, 0.2650609016418457, 0.3891220688819885, ...
func List() (list []*Info) { initBdevLib() for d := C.spdk_bdev_first(); d != nil; d = C.spdk_bdev_next(d) { list = append(list, (*Info)(d)) } return list }
[ -0.01756366714835167, 0.09461907297372818, 0.308483362197876, 1.3378456830978394, 0.8371985554695129, -0.16855840384960175, 0.14611254632472992, 0.4306586980819702, -0.1957630068063736, -0.5020986199378967, -0.45936834812164307, 0.10783755034208298, 0.0004542046517599374, 1.563611626625061...
func Find(name string) *Info { initBdevLib() nameC := C.CString(name) defer C.free(unsafe.Pointer(nameC)) d := C.spdk_bdev_get_by_name(nameC) return (*Info)(d) }
[ 0.4971778690814972, 0.2627427577972412, 0.41540974378585815, 0.2585301399230957, -0.6734380722045898, -0.45310965180397034, 0.3908608555793762, -1.342950463294983, -1.0980695486068726, 0.14050017297267914, -0.28996822237968445, -0.06957681477069855, -0.8192524313926697, 0.7798247337341309,...
func (bdi *Info) Name() string { return C.GoString(C.spdk_bdev_get_name(bdi.ptr())) }
[ -0.2909168004989624, -0.0987522304058075, 0.5828098058700562, 0.7811417579650879, -0.411761075258255, 0.07572093605995178, 0.8354142904281616, -0.7792807221412659, -0.710737407207489, 0.556376576423645, -0.36502864956855774, 0.0755624994635582, -0.4996008276939392, 0.37309443950653076, 0...
func (bdi *Info) ProduceName() string { return C.GoString(C.spdk_bdev_get_product_name(bdi.ptr())) }
[ -0.508110523223877, 0.40351131558418274, 0.7526312470436096, 0.5539480447769165, -0.541612446308136, -0.06235737353563309, 0.6414504051208496, -1.1046911478042603, -0.09531845897436142, 0.6387902498245239, 0.18765093386173248, 0.10363893955945969, -0.4985542297363281, -0.6406552791595459, ...
func (bdi *Info) BlockSize() int { return int(C.spdk_bdev_get_block_size(bdi.ptr())) }
[ 0.26047971844673157, 1.5921754837036133, 0.7610371708869934, 0.8845229148864746, 0.2274000495672226, -0.23769885301589966, 1.3197212219238281, -0.42912569642066956, -0.6223030090332031, -0.3590368926525116, 0.2195679396390915, 0.14774776995182037, -1.2669336795806885, 0.5590729117393494, ...
func (bdi *Info) CountBlocks() int { return int(C.spdk_bdev_get_num_blocks(bdi.ptr())) }
[ 0.8837504982948303, 0.5574445724487305, 0.6352742910385132, 0.7530041337013245, 0.18996037542819977, -0.09769434481859207, 1.0179166793823242, -0.4534410536289215, -0.492933988571167, 0.044318921864032745, -0.25823065638542175, 0.050247058272361755, -0.6681084036827087, 0.717615008354187, ...
func (bdi *Info) IsNvme() bool { return bool(C.spdk_bdev_io_type_supported(bdi.ptr(), C.SPDK_BDEV_IO_TYPE_NVME_ADMIN)) }
[ -0.03321002051234245, 0.9459400773048401, 0.454206258058548, 1.1837111711502075, 0.47345203161239624, -0.046282146126031876, -0.08982308208942413, -0.5787211656570435, -0.041067928075790405, 1.3208935260772705, 0.12890781462192535, 0.19401851296424866, -1.5098448991775513, 0.81106847524642...
func (bdi *Info) DevInfo() *Info { return bdi }
[ 0.2482432872056961, -0.378741055727005, 0.1430753469467163, 0.06447877734899521, 0.37233486771583557, 0.062276966869831085, 0.2443992793560028, -1.0764656066894531, -0.5061256289482117, -0.4753456115722656, -0.9533870220184326, 0.3428512513637543, -0.31073281168937683, 0.3241715729236603, ...
func (rule *AssignmentRule) Action(fs *token.FileSet, node ast.Node) { assignSpec, ok := node.(*ast.AssignStmt) if ok { for _, rh := range assignSpec.Rhs { switch ce := rh.(type) { case *ast.CallExpr: switch ident := ce.Fun.(type) { case *ast.Ident: switch decl := ident.Obj.Decl.(type) { ca...
[ -0.0974474847316742, -0.5107874870300293, 0.7218972444534302, -0.3496846556663513, 0.7124089598655701, 0.27063652873039246, 0.19182845950126648, -0.3482535779476166, -0.2574072778224945, 1.2296772003173828, 0.9469572901725769, 1.2625702619552612, -0.4732308089733124, 1.5471047163009644, ...
func (o *VStore) UnmarshalROOT(r *rbytes.RBuffer) error { if r.Err() != nil { return r.Err() } start := r.Pos() _, pos, bcnt := r.ReadVersion(o.Class()) if err := o.base.UnmarshalROOT(r); err != nil { return err } r.CheckByteCount(pos, bcnt, start, o.Class()) return r.Err() }
[ 0.9844809174537659, -0.4540084898471832, 0.654485285282135, -0.5805385708808899, -0.821256160736084, -0.3103140890598297, 0.4438140392303467, -0.4450208246707916, 0.313093900680542, 0.48404064774513245, -0.3031928837299347, 0.8052579760551453, -0.7842254638671875, 0.19065816700458527, 0....
func (ce *CryptEngine) getRecipientIdentities() ([]*uid.Message, error) { var uidMsgs []*uid.Message identities, err := ce.keyDB.GetPrivateIdentities() if err != nil { return nil, err } for _, identity := range identities { log.Debugf("identity=%s", identity) // TODO: get all UID messages for given identity ...
[ -1.319132924079895, -0.4425210952758789, 0.6110004186630249, -0.664863109588623, 0.0033782999962568283, 0.6211452484130859, -0.3356724679470062, 0.19235408306121826, 1.0168359279632568, -0.09857112169265747, -0.623055636882782, 0.25873976945877075, -0.6400387287139893, 0.9618869423866272, ...
func AddSkipAwaitTransformation(transformations []Transformation) []Transformation { transformations = append(transformations, func(obj map[string]interface{}, opts ...pulumi.ResourceOption) { metadata := obj["metadata"].(map[string]interface{}) if annotations, ok := metadata["annotations"].(map[string]interface{}...
[ -1.400516390800476, 0.3217596113681793, 0.6782612204551697, -0.659453272819519, 0.2947613298892975, 1.191267967224121, 0.25453028082847595, -0.21026699244976044, 0.9091938138008118, 0.36356544494628906, -0.5854002833366394, -0.3273010551929474, 0.7132077813148499, -0.5635637044906616, -0...
func yamlDecode(ctx *pulumi.Context, text string, opts ...pulumi.InvokeOption) ([]map[string]interface{}, error) { args := struct { Text string `pulumi:"text"` }{Text: text} var ret struct { Result []map[string]interface{} `pulumi:"result"` } if err := ctx.Invoke("kubernetes:yaml:decode", &args, &ret, opts......
[ 0.21650849282741547, -0.5307000875473022, 0.6966029405593872, 0.08090659230947495, -0.24750496447086334, -0.7786091566085815, -0.7408533692359924, 1.3028572797775269, 0.6646605134010315, 0.10508470237255096, -0.32664167881011963, 0.7276278734207153, -0.6345769166946411, -0.6990674734115601...
func (o *DeleteGitEventsByIDUsingDELETEReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewDeleteGitEventsByIDUsingDELETEOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil...
[ -0.07023657858371735, -0.7613876461982727, 0.6681341528892517, -0.1980106383562088, -0.3696118891239166, -1.559403657913208, -0.1369529664516449, -0.299832820892334, 0.8087507486343384, 0.5355355739593506, 0.5183106064796448, -0.4218197762966156, -1.2940782308578491, 0.09737382084131241, ...
func NewDeleteGitEventsByIDUsingDELETEOK() *DeleteGitEventsByIDUsingDELETEOK { return &DeleteGitEventsByIDUsingDELETEOK{} }
[ 0.07883084565401077, -0.215373694896698, 0.6061946749687195, 0.17061704397201538, -0.61234050989151, -0.24434305727481842, 0.10485931485891342, -0.5762820243835449, 0.010544748976826668, 0.6306843161582947, -0.2511409819126129, -0.5395026206970215, 0.10798262804746628, 0.8332453370094299, ...
func (o *DeleteGitEventsByIDUsingDELETEOK) IsSuccess() bool { return true }
[ 0.42632386088371277, -0.0368385948240757, 0.6784469485282898, 0.6139580011367798, -0.2668398916721344, -0.20088349282741547, -0.028041165322065353, 0.102281354367733, 0.40432074666023254, 1.1434656381607056, -0.7447625398635864, -0.3660450577735901, -0.48952603340148926, 0.6521822214126587...
func (o *DeleteGitEventsByIDUsingDELETEOK) IsRedirect() bool { return false }
[ 0.34708043932914734, 0.004383761435747147, 0.570487916469574, 0.7516866326332092, -0.4735414683818817, -0.14099642634391785, 0.3102917969226837, -0.2355421930551529, 1.3756426572799683, 0.43966129422187805, -0.1953953355550766, -0.15527403354644775, -0.9066611528396606, 0.6174658536911011,...
func (o *DeleteGitEventsByIDUsingDELETEOK) IsCode(code int) bool { return code == 200 }
[ -0.01453264057636261, -0.17991036176681519, 0.4960674047470093, 0.44615644216537476, -0.3808371126651764, -0.8473002910614014, -0.1987665593624115, 0.0883360207080841, 1.2236497402191162, 1.2499727010726929, -0.3350609838962555, -0.09712927043437958, -1.0266551971435547, 1.0515332221984863...
func NewDeleteGitEventsByIDUsingDELETEUnauthorized() *DeleteGitEventsByIDUsingDELETEUnauthorized { return &DeleteGitEventsByIDUsingDELETEUnauthorized{} }
[ -0.10533307492733002, -0.3265281915664673, 0.7702963352203369, 0.33693358302116394, -1.095041036605835, -0.34258559346199036, -0.48036104440689087, 0.15963275730609894, 0.28557223081588745, -0.7518778443336487, 0.14966852962970734, 0.7748575210571289, -0.22726652026176453, 0.79286944866180...
func (o *DeleteGitEventsByIDUsingDELETEUnauthorized) IsSuccess() bool { return false }
[ -0.04570072144269943, 0.24095368385314941, 0.6605267524719238, 0.9649385213851929, -0.3588244915008545, 0.20725201070308685, -0.1662125587463379, 0.5258469581604004, 0.5656605958938599, 0.25031107664108276, -0.42746418714523315, 0.9422638416290283, -0.48114705085754395, 0.30441582202911377...
func (o *DeleteGitEventsByIDUsingDELETEUnauthorized) IsRedirect() bool { return false }
[ 0.040293142199516296, 0.2295006811618805, 0.5652720928192139, 0.9633148312568665, -0.4089968800544739, 0.13298939168453217, 0.1776779443025589, 0.2503563165664673, 1.4163450002670288, -0.3371703028678894, 0.15824823081493378, 1.1304986476898193, -1.0850991010665894, 0.3645442724227905, 0...
func (o *DeleteGitEventsByIDUsingDELETEUnauthorized) IsCode(code int) bool { return code == 401 }
[ -0.4374559223651886, 0.025736115872859955, 0.6372680068016052, 0.5124215483665466, -0.3383881449699402, -0.47862952947616577, -0.43463119864463806, 0.62577223777771, 1.497912049293518, 0.28173813223838806, 0.03696342185139656, 1.2650389671325684, -1.1002860069274902, 0.5494711995124817, ...
func NewDeleteGitEventsByIDUsingDELETEForbidden() *DeleteGitEventsByIDUsingDELETEForbidden { return &DeleteGitEventsByIDUsingDELETEForbidden{} }
[ 0.9921467900276184, 0.17216746509075165, 0.9787390828132629, 0.7487637400627136, -0.711355447769165, -0.1918479949235916, 0.15233604609966278, -1.0412746667861938, 0.48951008915901184, -0.12238174676895142, 0.30607977509498596, 0.5292580723762512, -0.3774428069591522, 0.3435172438621521, ...
func (o *DeleteGitEventsByIDUsingDELETEForbidden) IsSuccess() bool { return false }
[ 0.9241626858711243, 0.9311676621437073, 0.8705244064331055, 1.0506092309951782, -0.1982499361038208, 0.09661109745502472, 0.25639835000038147, -0.4542697072029114, 0.5337834358215332, 0.5164256691932678, -0.258830726146698, 0.6293290257453918, -0.6856319904327393, 0.11751067638397217, 1....
func (o *DeleteGitEventsByIDUsingDELETEForbidden) IsRedirect() bool { return false }
[ 0.8094334602355957, 0.8830391764640808, 0.6527338027954102, 1.1438422203063965, -0.1706310510635376, 0.10871671140193939, 0.48857641220092773, -0.4960441589355469, 1.2029775381088257, -0.043754469603300095, 0.34937766194343567, 0.9271700978279114, -1.0998600721359253, 0.29765596985816956, ...
func (o *DeleteGitEventsByIDUsingDELETEForbidden) IsCode(code int) bool { return code == 403 }
[ 0.5975277423858643, 0.629932165145874, 0.7576489448547363, 0.534951388835907, 0.114309161901474, -0.5236450433731079, 0.18945269286632538, -0.3467935025691986, 1.2260704040527344, 0.7719970345497131, 0.4425623118877411, 0.9333985447883606, -1.2031983137130737, 0.5050568580627441, 1.26753...
func NewDeleteGitEventsByIDUsingDELETENotFound() *DeleteGitEventsByIDUsingDELETENotFound { return &DeleteGitEventsByIDUsingDELETENotFound{} }
[ 0.6180980801582336, -0.9092787504196167, 0.5703926086425781, 0.016663864254951477, -0.11154152452945709, 0.16032063961029053, 0.23767560720443726, -0.4848923087120056, 0.4703589081764221, 0.1159285232424736, -0.17996904253959656, 0.018907107412815094, -0.1352456957101822, 0.825482547283172...
func (o *DeleteGitEventsByIDUsingDELETENotFound) IsSuccess() bool { return false }
[ 0.3391578197479248, -0.37020939588546753, 0.5835666060447693, 0.5618195533752441, 0.24658842384815216, 0.17225034534931183, 0.21657311916351318, 0.028147535398602486, 0.6956481337547302, 0.6830278038978577, -0.5612868666648865, 0.2340909242630005, -0.3912629187107086, 0.7024263739585876, ...
func (o *DeleteGitEventsByIDUsingDELETENotFound) IsRedirect() bool { return false }
[ 0.10514263063669205, -0.39658355712890625, 0.4712684750556946, 0.5363617539405823, 0.2537115216255188, 0.33734798431396484, 0.5315533876419067, -0.27295368909835815, 1.5671063661575317, 0.02464972622692585, -0.04742410406470299, 0.42812320590019226, -0.8838258981704712, 0.9200601577758789,...
func (o *DeleteGitEventsByIDUsingDELETENotFound) IsCode(code int) bool { return code == 404 }
[ -0.051199786365032196, -0.3524154722690582, 0.5113313794136047, 0.2805898189544678, 0.5160311460494995, -0.1844937652349472, 0.18579618632793427, 0.14804749190807343, 1.4808675050735474, 0.7813109755516052, -0.10128980875015259, 0.4443788528442383, -1.2238082885742188, 1.0547114610671997, ...
func (o *DeleteGitEventsByIDUsingDELETEInternalServerError) IsSuccess() bool { return false }
[ -0.4133654236793518, -0.06411329656839371, 0.5831713676452637, 0.08968034386634827, -0.46345579624176025, 0.0746205672621727, 0.2044195532798767, -0.12477243691682816, 0.3914589583873749, 0.6297602653503418, -0.0889969989657402, 0.44563865661621094, -1.0753834247589111, 0.7136414647102356,...
func (o *DeleteGitEventsByIDUsingDELETEInternalServerError) IsRedirect() bool { return false }
[ -0.5698959231376648, -0.09108754247426987, 0.5364648103713989, 0.030244963243603706, -0.5473166108131409, 0.06173580139875412, 0.33573296666145325, -0.38203519582748413, 1.3176157474517822, 0.0017327922396361828, 0.3693085014820099, 0.6550000905990601, -1.5230060815811157, 0.74656796455383...
func (o *DeleteGitEventsByIDUsingDELETEInternalServerError) IsCode(code int) bool { return code == 500 }
[ -0.8507034182548523, -0.08103090524673462, 0.5558796525001526, -0.18740533292293549, -0.33657771348953247, -0.39235782623291016, 0.06780678778886795, 0.07883156090974808, 1.2600129842758179, 0.9821802377700806, 0.39518335461616516, 0.8618298768997192, -1.886146903038025, 1.385962963104248,...
func (s *ServiceDefaults) MatchesConsul(entry consulapi.ConfigEntry) bool { return true }
[ 0.036108873784542084, 0.14397941529750824, 0.2920399308204651, 0.4028836786746979, -0.12202206254005432, -0.44401663541793823, -1.0578389167785645, 0.44601207971572876, 0.293170303106308, -1.0252479314804077, -0.5745524764060974, -1.134047269821167, -0.8325027227401733, 0.7871431112289429,...
func fetchFullListBytes(pkgType string) ([]byte, error) { url := pkgmgmt.GetPackageListURL(pkgmgmt.GetDefaultPackageMirrorURL(), pkgType) packageList, err := pkgmgmt.GetPackageListings(url) if err != nil { return nil, err } sort.Sort(packageList) bytes, err := json.MarshalIndent(packageList, "", " ") if err ...
[ -0.51276695728302, 0.15025751292705536, 0.46237820386886597, -0.12524130940437317, -1.2788580656051636, -0.17166852951049805, -0.9712927341461182, -0.061572372913360596, 0.8272989392280579, 1.229251742362976, -1.325682520866394, 0.1748971939086914, -0.16006755828857422, 1.606016755104065, ...
func (ibc ImageBedCode) String() string { return imageBeds[ibc] }
[ -0.1682177484035492, -0.4117177128791809, 0.1585797220468521, 0.7098518013954163, 0.28289878368377686, 0.9305623173713684, 0.6373464465141296, -2.1960275173187256, -0.0035300618037581444, 0.5021499395370483, -0.2093045711517334, 0.6530470252037048, -1.006101369857788, 0.2353561520576477, ...
func bestSum(target int, numbers []int) []int { dp := make([][]int, target+1) for i := 1; i <= target; i++ { var smallestCombination []int for _, number := range numbers { candidate := i - number if candidate < 0 { continue } if candidate == 0 { dp[i] = []int{number} smallestCombination = ...
[ -0.14388398826122284, 0.07640400528907776, 0.9408711791038513, -0.08932846039533615, -0.04737434536218643, -0.5921655297279358, -0.022180834785103798, -0.4028284251689911, 0.5429571270942688, -0.14111512899398804, -0.2858567535877228, 0.5282588601112366, -0.21648353338241577, -0.7160529494...
func ReadBody(req *http.Request, p interface{}) error { body, err := ioutil.ReadAll(req.Body) if err != nil { return fmt.Errorf("read body error %v", err) } err = json.Unmarshal(body, &p) if err != nil { return fmt.Errorf("parsing body error %v", err) } return nil }
[ -1.0627473592758179, -0.36401882767677307, 1.149876594543457, 0.13222265243530273, 0.41930970549583435, 0.2781139016151428, -1.088714838027954, -0.41554200649261475, 0.18052934110164642, 0.5796394348144531, 0.6623606085777283, 0.2706540524959564, -0.32211944460868835, 0.25094661116600037, ...
func makeHandler(env env, fn func(http.ResponseWriter, *http.Request, env)) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { fn(w, r, env) } }
[ -0.1601182222366333, -0.6524635553359985, 0.3581711947917938, 0.045168280601501465, -0.25963544845581055, 0.8866559863090515, 0.306582510471344, 0.5606266856193542, -0.20466271042823792, -0.4662286937236786, 0.41432130336761475, -0.40568554401397705, 0.961149275302887, -1.077385425567627, ...
func (m Mail) SendMail() error { if mc.Host == "" { loadConfig() } mailTemplate, err := template.ParseFiles("views/mail.tpl") if err != nil { return err } mailContent := new(bytes.Buffer) err = mailTemplate.Execute(mailContent, m) if err != nil { return err } return smtp. SendMail(mc.Host+":"+mc.Port...
[ -0.6854398250579834, 0.882146418094635, 0.4356813430786133, 0.6288439035415649, -0.95673668384552, 0.7911898493766785, -0.1535407304763794, 0.6537600755691528, -0.4339636564254761, -0.4198209345340729, 0.19890639185905457, 0.4148336946964264, -0.7520819902420044, 0.7451862692832947, -0.4...
func RequestValidator() forwarder.ForwarderServer { return &requestValidator{} }
[ -0.990325927734375, 0.047540560364723206, 0.3705633580684662, -0.004658355377614498, -1.0936144590377808, 0.5617237091064453, -0.18907248973846436, 0.28073880076408386, 0.7811987400054932, -1.6359562873840332, 0.303819477558136, 1.0669593811035156, -0.43306708335876465, 0.15994496643543243...
func NewETC2_RGB_U8_NORM(name string) *Format { return &Format{Name: name, Format: &Format_Etc2RgbU8Norm{&FmtETC2_RGB_U8_NORM{}}} }
[ -0.6755609512329102, -1.1750664710998535, 0.598694384098053, -0.1675485521554947, -1.128071665763855, -0.7381244897842407, -0.7420060634613037, 0.17186206579208374, -0.05586675927042961, 0.03552660718560219, -0.4597315788269043, 0.33431750535964966, 0.28805455565452576, 0.04823460057377815...
func NewETC2_SRGB_U8_NORM(name string) *Format { return &Format{Name: name, Format: &Format_Etc2RgbU8Norm{&FmtETC2_RGB_U8_NORM{Srgb: true}}} }
[ -0.972459077835083, -0.38487356901168823, 0.6097207069396973, -0.11931854486465454, -1.6342840194702148, -0.6466379165649414, -1.082856297492981, 0.3450268805027008, 0.26089033484458923, 0.23370584845542908, -0.727811336517334, 0.12158485502004623, 0.16197535395622253, 0.2131507396697998, ...
func NewETC2_RGBA_U8_NORM(name string) *Format { return &Format{Name: name, Format: &Format_Etc2RgbaU8Norm{&FmtETC2_RGBA_U8_NORM{}}} }
[ -0.7112506628036499, -1.5104340314865112, 0.5378062725067139, -0.3794113099575043, -1.1165306568145752, -0.773603081703186, -0.35872650146484375, 0.1307314932346344, 0.5221909284591675, 0.06081381067633629, -0.3621130585670471, 0.5866614580154419, 0.2654117941856384, 0.4952096939086914, ...
func NewETC2_SRGBA_U8_NORM(name string) *Format { return &Format{Name: name, Format: &Format_Etc2RgbaU8Norm{&FmtETC2_RGBA_U8_NORM{Srgb: true}}} }
[ -0.9046319127082825, -0.8307920694351196, 0.5452189445495605, -0.4049157202243805, -1.4429489374160767, -0.713006854057312, -0.48625102639198303, 0.2874787747859955, 0.7008376121520996, 0.24451689422130585, -0.5872523188591003, 0.49721863865852356, 0.12851811945438385, 0.446381539106369, ...
func NewETC2_RGBA_U8U8U8U1_NORM(name string) *Format { return &Format{Name: name, Format: &Format_Etc2RgbaU8U8U8U1Norm{&FmtETC2_RGBA_U8U8U8U1_NORM{}}} }
[ -0.5642067790031433, -0.8501347899436951, 0.7038259506225586, -0.25913509726524353, -0.308499813079834, -0.4113665521144867, -0.30754587054252625, -0.1791476458311081, 0.2629712224006653, 0.2080572098493576, -0.5972973108291626, 0.9517127275466919, -0.21855318546295166, -0.4079366326332092...
func NewETC2_SRGBA_U8U8U8U1_NORM(name string) *Format { return &Format{Name: name, Format: &Format_Etc2RgbaU8U8U8U1Norm{&FmtETC2_RGBA_U8U8U8U1_NORM{Srgb: true}}} }
[ -0.8486681580543518, -0.28076526522636414, 0.7325713634490967, -0.27145564556121826, -0.5409629940986633, -0.40130943059921265, -0.49795904755592346, -0.14456391334533691, 0.3397369086742401, 0.4169996380805969, -0.8016714453697205, 0.8813411593437195, -0.38132137060165405, -0.284167826175...
func NewETC2_R_U11_NORM(name string) *Format { return &Format{Name: name, Format: &Format_Etc2RU11Norm{&FmtETC2_R_U11_NORM{}}} }
[ -0.5104507207870483, -1.2099475860595703, 0.7290772199630737, -0.3525656461715698, -0.8650455474853516, 0.13816794753074646, -0.5437394976615906, 0.9731671810150146, -0.16624699532985687, -0.04170424863696098, 0.11176864802837372, -0.5103835463523865, 0.7104150652885437, 0.1172128096222877...
func NewETC2_RG_U11_NORM(name string) *Format { return &Format{Name: name, Format: &Format_Etc2RgU11Norm{&FmtETC2_RG_U11_NORM{}}} }
[ -0.5805221796035767, -0.8370426893234253, 0.7014284133911133, -0.47913482785224915, -0.9266054034233093, -0.004930258262902498, -0.7352318167686462, 1.0000734329223633, -0.4354283809661865, 0.19478441774845123, 0.18163174390792847, -0.4388876259326935, 0.43671339750289917, 0.35974279046058...
func NewETC2_R_S11_NORM(name string) *Format { return &Format{Name: name, Format: &Format_Etc2RS11Norm{&FmtETC2_R_S11_NORM{}}} }
[ -0.30762147903442383, -1.5037370920181274, 0.6170768141746521, -0.06362336128950119, -1.087068796157837, -0.07438094168901443, -0.8366270065307617, 0.7146866917610168, 0.05603712052106857, -0.009861384518444538, -0.22586263716220856, -0.16688169538974762, 0.4360443651676178, 0.386911988258...
func NewETC2_RG_S11_NORM(name string) *Format { return &Format{Name: name, Format: &Format_Etc2RgS11Norm{&FmtETC2_RG_S11_NORM{}}} }
[ -0.20796748995780945, -1.1006090641021729, 0.5443127155303955, -0.2845354676246643, -1.117326259613037, -0.27722734212875366, -1.000765323638916, 0.7136501669883728, 0.025942698121070862, 0.20376423001289368, -0.04714006185531616, -0.08505140244960785, 0.2026456594467163, 0.533742129802703...
func (this *EmrJsonDoc) Get(key, defValue string) (value interface{}) { if v, ok := this.Data[key]; ok { value = v } else { value = defValue } return value }
[ -0.6510410308837891, 0.4506784975528717, 0.6970298290252686, 0.15481068193912506, 0.035863809287548065, -0.45435693860054016, -1.1298155784606934, -0.37257954478263855, -0.481937438249588, 0.31249570846557617, -0.06276357918977737, 1.1957054138183594, -0.12203867733478546, -0.1167072951793...
func (this *PatientCase) Load(filePath string) { this.Case = make(map[string]*EmrCase) f, err := os.Open(filePath) if err != nil { return } defer f.Close() bfRd := bufio.NewReader(f) for { line, err := bfRd.ReadBytes('\n') words := strings.Split(string(line), string('\t')) if len(words) == 4 { visitID...
[ -0.3465081751346588, -0.5360591411590576, 0.7137391567230225, -0.629486083984375, -0.37241899967193604, 0.15061205625534058, -0.12785503268241882, 0.17498748004436493, -0.4612252116203308, 1.0895133018493652, 0.14545978605747223, -0.30706533789634705, -0.11372128874063492, 0.21692977845668...
func ProfileFromUser(u User) Profile { return Profile{ ID: u.ID, Username: u.Username, Bio: u.Bio, Image: u.Image, Following: false, } }
[ 0.0720825046300888, 0.27243849635124207, 0.301031231880188, 1.025195837020874, -1.1314165592193604, 0.28604406118392944, 0.04009551182389259, -0.9841660261154175, 0.13901185989379883, -0.731095016002655, -1.2604457139968872, -0.4157644808292389, -0.16017600893974304, -0.136891707777977, ...
func (adb *AppDB) GetProfileByUsername(username string, whosasking uint) (*Profile, error) { var p Profile if err := adb.DB.QueryRow(qGetProfileByUsername, whosasking, username).Scan(&p.ID, &p.Username, &p.Bio, &p.Image, &p.Following); err != nil { return &p, err } return &p, nil }
[ 0.11918363720178604, 0.6258443593978882, 0.4770003855228424, 1.0999345779418945, -0.26008105278015137, -0.555329442024231, 0.5066209435462952, -0.7567706108093262, -0.024506866931915283, 0.2651349604129791, 0.01188032329082489, -0.9906335473060608, -0.9790339469909668, 0.07925613969564438,...
func (adb *AppDB) FollowUser(currentUserID, followUserID uint) error { stmt, err := adb.DB.Prepare(qFollowUser) if err != nil { return err } res, err := stmt.Exec(currentUserID, followUserID) if err != nil { return err } rows, err := res.RowsAffected() if err != nil { return err } if rows != 1 { retur...
[ -0.5416653156280518, 0.2606731057167053, 0.6873188614845276, 0.5750564932823181, -0.6473780274391174, 0.1359315663576126, 0.8675553202629089, -0.7151190042495728, -0.197478249669075, -0.012332625687122345, 0.07490856945514679, -0.10395634919404984, -0.3421262204647064, 1.0218381881713867, ...
func (adb *AppDB) UnfollowUser(currentUserID, followUserID uint) error { stmt, err := adb.DB.Prepare(qUnfollowUser) if err != nil { return err } res, err := stmt.Exec(currentUserID, followUserID) if err != nil { return err } rows, err := res.RowsAffected() if err != nil { return err } if rows != 1 { r...
[ -0.7067621350288391, 0.39824196696281433, 0.3885267674922943, 0.22529403865337372, -0.9729719758033752, -0.3253017067909241, 1.1587637662887573, 0.21455135941505432, -0.5632020831108093, 0.1373797059059143, 0.6554204821586609, 0.04704942926764488, -0.3794061839580536, 0.939300537109375, ...
func GetConfFromJSONFile(filename string) *Settings { confContent, err := ioutil.ReadFile(filename) utils.CheckFatalError(err) config := &Settings{} err = json.Unmarshal(confContent, config) utils.CheckFatalError(err) log.Println("Configuration loaded:") spew.Config.Indent = "\t" spew.Dump(*config) return con...
[ -0.33906811475753784, -0.17702552676200867, 0.44725555181503296, -0.5628964900970459, -0.8172262907028198, 0.04521099105477333, 0.009466924704611301, 0.31480008363723755, -0.9678564667701721, 0.9299477338790894, -0.7392213344573975, -0.5503135919570923, -0.23092122375965118, 0.029930705204...
func (bs *BucketSettings) SafeView() map[string]interface{} { return map[string]interface{}{ "numPartitions": bs.NumPartitions, "quotaBytes": bs.QuotaBytes, "memoryOnly": bs.MemoryOnly, "uuid": bs.UUID, } }
[ -0.25256574153900146, 0.23360124230384827, 0.2955425977706909, -1.0777448415756226, -1.4153387546539307, -0.1678052544593811, -0.2179838865995407, -0.2846905589103699, -0.4113732576370239, -0.8468865156173706, -0.16265328228473663, 0.688161313533783, -0.2886546850204468, -0.614345252513885...
func Credentials(serverURL string, caCerts [][]byte, fullCert tls.Certificate, tlsopts ...TLSOption) (grpc.DialOption, error) { uri, err := url.Parse(serverURL) if err != nil { return nil, err } cfg, err := tlsconfig.NewMutualTLS(caCerts, fullCert) if err != nil { return nil, err } cfg.ServerName = uri.Host...
[ -0.014519297517836094, 0.0356830433011055, 0.41622549295425415, 0.06584852188825607, -0.3831388056278229, 0.2113684117794037, -0.2076418101787567, 0.022033261135220528, 0.4250166416168213, 0.2926673889160156, -0.32290828227996826, -0.1216912716627121, -0.7071768641471863, -0.06969137489795...
func SkipVerify(cfg *tls.Config) { cfg.InsecureSkipVerify = true }
[ 0.07726722210645676, 0.4351571202278137, 0.33988186717033386, 0.9046195149421692, 0.15267881751060486, 1.1023035049438477, 0.005401124246418476, 0.40111175179481506, -0.6377332806587219, 0.030089955776929855, -1.3813858032226562, -0.034560613334178925, -0.6111159324645996, -0.1220183521509...
func AppendOutgoingRequestID() grpc.UnaryClientInterceptor { return func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { ctx = requestid.AppendToOutgoingContext(ctx) return invoker(ctx, method, req, reply, cc, opts...) } ...
[ -0.836344838142395, -0.06309568881988525, 0.6328246593475342, -0.8620938658714294, -0.6045345664024353, 0.41301384568214417, -0.772687554359436, -0.37279510498046875, 0.3965849280357361, -0.33766409754753113, 0.9326264262199402, 0.5266573429107666, -0.19132816791534424, 0.45567235350608826...
func NewSdns(cfg SdnsConfig) (s Sdns, err error) { if cfg.Port == 0 { err = errors.Errorf("a port must be specified") return } if cfg.Debug { s.logger = zerolog.New(zerolog.ConsoleWriter{Out: os.Stderr}) } else { s.logger = zerolog.New(os.Stderr) } err = s.Load(cfg) if err != nil { err = errors.Wrapf...
[ -0.5669827461242676, 0.617730975151062, 0.46586012840270996, -0.06532856822013855, -0.9618014693260193, -1.312740683555603, -0.13826130330562592, -0.4324198365211487, 1.313920259475708, -0.4026784598827362, -0.35548877716064453, 0.5021430253982544, 0.47177302837371826, 0.488165944814682, ...
func (s *Sdns) Load(cfg SdnsConfig) (err error) { s.exactDomains = make(map[string]*Domain) s.wildcardDomains = make(map[string]*Domain) if len(cfg.Domains) == 0 { return } for _, domain := range cfg.Domains { if domain.Name[0] == '*' { if domain.Name[1] != '.' { err = errors.Errorf("malformed domain ...
[ -1.0127586126327515, 0.6876667737960815, 0.59682297706604, -1.192047119140625, -0.4427323043346405, 0.07320969551801682, 0.09147018939256668, 0.1725817769765854, 0.771720290184021, -0.1194656565785408, -0.8561609387397766, 0.6391205787658691, 0.34701716899871826, 0.4217819571495056, 0.60...