text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (options *UpdateCacheLevelOptions) SetValue(value string) *UpdateCacheLevelOptions { options.Value = core.StringPtr(value) return options }
[ -0.029194878414273262, 0.3130272924900055, 0.3866683840751648, 0.4830155372619629, 0.004668870009481907, 0.8867829442024231, 0.14617326855659485, -0.2405484914779663, 1.202734351158142, 0.3293640613555908, 0.1112641766667366, -0.44058871269226074, -0.18347246944904327, 0.3014933466911316, ...
func (options *UpdateCacheLevelOptions) SetHeaders(param map[string]string) *UpdateCacheLevelOptions { options.Headers = param return options }
[ -0.6596459746360779, -0.08032315969467163, 0.5377424359321594, 0.3136870265007019, -0.08163005113601685, 0.6389583349227905, -0.28496938943862915, -0.18237794935703278, 0.5482015609741211, 0.31288230419158936, -0.06047796830534935, -0.48685577511787415, -0.3795746862888336, 0.0883297547698...
func (*CachingApiV1) NewUpdateDevelopmentModeOptions() *UpdateDevelopmentModeOptions { return &UpdateDevelopmentModeOptions{} }
[ -1.7378703355789185, -0.678462564945221, 0.33353543281555176, 1.4964746236801147, -0.7247835993766785, 0.820512056350708, 0.5233958959579468, -0.454795777797699, 0.06051618978381157, 0.7040039300918579, -0.9565555453300476, -0.12281671166419983, 0.2988480031490326, 0.4793325364589691, -0...
func (options *UpdateDevelopmentModeOptions) SetValue(value string) *UpdateDevelopmentModeOptions { options.Value = core.StringPtr(value) return options }
[ -0.6765409111976624, 0.4232594668865204, 0.4391724169254303, 0.5251513719558716, 0.5403749942779541, 1.320912480354309, 0.6405656933784485, -0.4612777531147003, 0.5689523816108704, 0.04061805456876755, -0.2463221400976181, -0.7685770988464355, 0.009770105592906475, 0.7596651911735535, -0...
func (options *UpdateDevelopmentModeOptions) SetHeaders(param map[string]string) *UpdateDevelopmentModeOptions { options.Headers = param return options }
[ -1.05482816696167, -0.21686559915542603, 0.500718355178833, 0.20782844722270966, 0.35367974638938904, 1.1115108728408813, 0.362265020608902, -0.5735825896263123, 0.043470777571201324, -0.051963526755571365, -0.16249631345272064, -0.7948622107505798, -0.08237060904502869, 0.3060975968837738...
func (*CachingApiV1) NewUpdateQueryStringSortOptions() *UpdateQueryStringSortOptions { return &UpdateQueryStringSortOptions{} }
[ -0.49222424626350403, -1.2777278423309326, 0.35913383960723877, 0.6248580813407898, -1.247598648071289, -0.3300192952156067, -0.2827035188674927, -1.0712881088256836, 0.07385966926813126, 0.6867825388908386, 0.06438649445772171, -0.49606603384017944, -0.9335691928863525, -0.452626317739486...
func (options *UpdateQueryStringSortOptions) SetValue(value string) *UpdateQueryStringSortOptions { options.Value = core.StringPtr(value) return options }
[ -0.10715192556381226, 0.002953809220343828, 0.30363407731056213, -0.3834536373615265, -0.01733502559363842, 0.45889341831207275, -0.00704595074057579, -0.9760769009590149, 0.7890825271606445, 0.24024628102779388, 0.44558367133140564, -0.7287395596504211, -0.9726612567901611, -0.25736892223...
func (options *UpdateQueryStringSortOptions) SetHeaders(param map[string]string) *UpdateQueryStringSortOptions { options.Headers = param return options }
[ -0.6531753540039062, -0.7115342020988464, 0.4421294033527374, -0.5459320545196533, -0.08658646792173386, 0.23379935324192047, -0.16078734397888184, -0.72811359167099, 0.2336074262857437, -0.01488556619733572, 0.366134911775589, -0.6909491419792175, -1.0669807195663452, -0.510003924369812, ...
func (*CachingApiV1) NewUpdateServeStaleContentOptions() *UpdateServeStaleContentOptions { return &UpdateServeStaleContentOptions{} }
[ -1.040885329246521, -1.0982829332351685, 0.30305737257003784, 0.6060706973075867, -0.7064191102981567, -0.5672658681869507, 0.2984027564525604, -0.38369667530059814, -0.07943826913833618, 0.37380558252334595, -0.8513826131820679, -0.07125253975391388, -0.18401587009429932, 0.00915389321744...
func (options *UpdateServeStaleContentOptions) SetValue(value string) *UpdateServeStaleContentOptions { options.Value = core.StringPtr(value) return options }
[ -0.09195709228515625, -0.2780241072177887, 0.3188031017780304, -0.04829486086964607, 0.605828046798706, 0.38126495480537415, 0.4508953094482422, -0.5897277593612671, 0.6643092036247253, 0.12250123172998428, -0.1984485238790512, -0.8521766662597656, -0.44824543595314026, 0.08819360285997391...
func (options *UpdateServeStaleContentOptions) SetHeaders(param map[string]string) *UpdateServeStaleContentOptions { options.Headers = param return options }
[ -0.6794312000274658, -0.6978294849395752, 0.3968718647956848, -0.3580646514892578, 0.6202017664909363, 0.15300631523132324, -0.14129860699176788, -0.4925747811794281, 0.029253805056214333, 0.1610957533121109, -0.3234429359436035, -0.7508423924446106, -0.7490667104721069, -0.086295850574970...
func UnmarshalBrowserTTLResponse(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BrowserTTLResponse) err = core.UnmarshalPrimitive(m, "success", &obj.Success) if err != nil { return } err = core.UnmarshalPrimitive(m, "errors", &obj.Errors) if err != nil { return } err = core.Unmar...
[ 0.005635521840304136, -0.878257691860199, 0.48334914445877075, -1.08335280418396, -0.5324271321296692, -1.1953999996185303, 0.2058570683002472, -0.47460445761680603, 0.2870576083660126, 0.6920750141143799, -0.5372065901756287, -0.5084798336029053, -0.1847892552614212, 0.30071741342544556, ...
func UnmarshalCacheLevelResponse(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(CacheLevelResponse) err = core.UnmarshalPrimitive(m, "success", &obj.Success) if err != nil { return } err = core.UnmarshalPrimitive(m, "errors", &obj.Errors) if err != nil { return } err = core.Unmar...
[ -0.2681261897087097, -0.2783939242362976, 0.3455604612827301, -0.4913722276687622, -0.941260576248169, -0.750126838684082, 0.4634819030761719, -0.07409439235925674, -0.01330873928964138, 0.671574592590332, -0.6827102303504944, -0.5266433954238892, -0.9290846586227417, 0.5237023234367371, ...
func UnmarshalDeveopmentModeResponse(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DeveopmentModeResponse) err = core.UnmarshalPrimitive(m, "success", &obj.Success) if err != nil { return } err = core.UnmarshalPrimitive(m, "errors", &obj.Errors) if err != nil { return } err = co...
[ -1.3904508352279663, -0.43502894043922424, 0.8853298425674438, -0.8815586566925049, 0.3267812430858612, -0.8612107038497925, 0.4246540665626526, -0.33774828910827637, 0.448845237493515, 0.7480056285858154, -0.7567194700241089, -1.1137179136276245, -0.28450825810432434, 0.5252746939659119, ...
func UnmarshalEnableQueryStringSortResponse(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(EnableQueryStringSortResponse) err = core.UnmarshalPrimitive(m, "success", &obj.Success) if err != nil { return } err = core.UnmarshalPrimitive(m, "errors", &obj.Errors) if err != nil { retur...
[ 0.5441904067993164, -0.7975371479988098, 0.6764851212501526, -1.2341187000274658, -0.6042947173118591, -0.5119844079017639, 0.23986338078975677, -0.8364230394363403, 0.003466078545898199, 1.020148515701294, -0.16435721516609192, -0.6332634091377258, -1.2845890522003174, -0.3239663541316986...
func UnmarshalPurgeAllResponse(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(PurgeAllResponse) err = core.UnmarshalPrimitive(m, "success", &obj.Success) if err != nil { return } err = core.UnmarshalPrimitive(m, "errors", &obj.Errors) if err != nil { return } err = core.Unmarshal...
[ 0.08180943876504898, -0.8361526727676392, 0.5754134654998779, -0.7873700261116028, -0.814839780330658, -0.7146724462509155, -0.04661838710308075, 0.0704941675066948, 0.5456634759902954, 0.27672427892684937, -0.21263720095157623, -0.7289625406265259, -0.7225843667984009, 0.4632415175437927,...
func UnmarshalServeStaleContentResponse(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ServeStaleContentResponse) err = core.UnmarshalPrimitive(m, "success", &obj.Success) if err != nil { return } err = core.UnmarshalPrimitive(m, "errors", &obj.Errors) if err != nil { return } er...
[ -0.9262003302574158, -0.34646156430244446, 0.5729426741600037, -1.1077698469161987, -0.3990366756916046, -0.8929080963134766, 0.9445191621780396, -0.13686837255954742, -0.4233764410018921, 0.7428749799728394, -0.6403812766075134, -0.5985215902328491, -0.4693589508533478, 0.0511663593351841...
func TGSetBot(botname string, botid int) { tgbotname = botname tgbotid = botid tgrunning = true }
[ 0.21873632073402405, 0.010483083315193653, 0.1882648468017578, -0.47651734948158264, -0.09931892156600952, 0.6224531531333923, -0.8095657229423523, 0.10414239764213562, -1.183056354522705, 0.8166287541389465, -1.368514895439148, 0.7294708490371704, -0.6221446394920349, 0.9498108625411987, ...
func TGGetBotName() (string, error) { if !tgrunning { return "", nil } return tgbotname, nil }
[ 0.2502481937408447, 0.5578969717025757, 0.2406177520751953, -0.018781116232275963, -0.7926861643791199, 0.518447756767273, -0.055711936205625534, -0.2137918472290039, -1.1257011890411377, 1.2658382654190063, -0.41077283024787903, -0.3797301650047302, -0.6304283142089844, 0.2426196634769439...
func TGGetBotID() (int, error) { if !tgrunning { return 0, nil } return tgbotid, nil }
[ 0.6513301134109497, 0.15393902361392975, 0.24671606719493866, 0.1674354374408722, 0.04131819307804108, 0.9997768998146057, 0.5842307806015015, 0.2152443826198578, -0.6225548982620239, 0.8952921628952026, -0.3436470031738281, 0.4634174704551697, -0.9250880479812622, 1.056731104850769, 1.0...
func TGRunning() (bool, error) { return tgrunning, nil }
[ -1.144076943397522, 1.0761288404464722, 0.2700595259666443, -0.19145366549491882, -0.0339895561337471, -0.14080649614334106, 0.05813691020011902, 0.4149477183818817, -1.2104214429855347, 0.49607449769973755, -0.5497426986694336, -0.7609316110610962, -1.0165388584136963, 0.4097202718257904,...
func (tgid TelegramID) GidV() (GoogleID, bool, error) { var gid GoogleID var verified bool row := db.QueryRow("SELECT gid, verified FROM telegram WHERE telegramID = ?", tgid) err := row.Scan(&gid, &verified) if err != nil && err == sql.ErrNoRows { return "", false, nil } if err != nil { Log.Notice(err) re...
[ -0.6784616112709045, 0.47253552079200745, 0.5555999875068665, -0.36189451813697815, -0.013892309740185738, 1.0737119913101196, 0.04184035584330559, 0.05653849616646767, -0.7232906818389893, 0.7384684681892395, -0.1036352887749672, 1.050291657447815, -0.6563360691070557, 1.3159886598587036,...
func (tgid TelegramID) Gid() (GoogleID, error) { gid, v, err := tgid.GidV() if err != nil { return "", err } if !v { return "", fmt.Errorf("Unverified") } return gid, nil }
[ 0.4460010826587677, 0.02496110461652279, 0.30495360493659973, -0.2622274160385132, 0.17204377055168152, 1.7449431419372559, 0.161100372672081, -0.303533136844635, -0.252261757850647, 0.5244432687759399, 0.8145075440406799, 1.3279600143432617, -0.6120613813400269, 1.1168251037597656, 1.07...
func (gid GoogleID) TelegramID() (TelegramID, error) { var tgid TelegramID row := db.QueryRow("SELECT telegramID FROM telegram WHERE gid = ?", gid) err := row.Scan(&tgid) if err != nil && err == sql.ErrNoRows { return 0, nil } if err != nil { Log.Notice(err) return 0, err } return tgid, nil }
[ 0.3272549510002136, 0.29208889603614807, 0.2412038892507553, -0.5829546451568604, -0.20298129320144653, 1.0065830945968628, -0.06446564197540283, -0.1817164272069931, -0.5915104150772095, 1.2132753133773804, -0.1791832447052002, 0.7941551804542542, -0.7795015573501587, 0.9251338243484497, ...
func (tgid TelegramID) InitAgent(name string, lockey LocKey) error { authtoken := GenerateName() gid, err := lockey.Gid() if err != nil && err == sql.ErrNoRows { err = fmt.Errorf("location Share Key (%s) is not recognized", lockey) Log.Notice(err) return err } if err != nil { Log.Notice(err) return err ...
[ -0.56734299659729, -0.7950977683067322, 0.8123893737792969, -0.3218527138233185, -0.22655418515205383, 0.18562187254428864, -0.020751474425196648, -0.10496644675731659, -0.4039608836174011, 0.8531856536865234, -0.9204197525978088, 0.2121923565864563, -0.3270299434661865, 0.7729318737983704...
func (tgid TelegramID) VerifyAgent(authtoken string) error { res, err := db.Exec("UPDATE telegram SET authtoken = NULL, verified = 1 WHERE telegramID = ? AND authtoken = ?", tgid, authtoken) if err != nil { Log.Notice(err) return err } i, err := res.RowsAffected() if err != nil { Log.Notice(err) return err...
[ -0.3246902525424957, -0.19766460359096527, 0.17668573558330536, 0.06261498481035233, 0.611490786075592, 0.03127112239599228, 0.049362339079380035, -0.5052120685577393, 0.23866958916187286, 0.11556874215602875, -1.2573943138122559, 0.9915997982025146, -0.37266382575035095, 0.888192892074585...
func (tgid TelegramID) String() string { return strconv.Itoa(int(tgid)) }
[ 0.03914255648851395, -0.7219440937042236, -0.009193303063511848, -1.3579920530319214, -0.5618316531181335, 1.0694925785064697, -0.1415756493806839, -1.1309086084365845, -0.4795144498348236, 0.5168262124061584, -0.3311404585838318, 0.5988062024116516, -0.1241903081536293, 0.4588804543018341...
func (m JwtMiddleware) Check(next http.Handler) http.Handler { fn := func(w http.ResponseWriter, r *http.Request) { c, err := r.Cookie("token") if err != nil { if errors.Is(err, http.ErrNoCookie) { // If the cookie is not set, return an unauthorized status w.WriteHeader(http.StatusUnauthorized) log....
[ -0.081520214676857, 0.1426391303539276, 0.6508127450942993, 0.20654414594173431, -0.7853559851646423, -0.4539511799812317, -0.15451160073280334, -0.6029790043830872, -0.13900552690029144, 0.3120170831680298, 0.5958043932914734, 0.7975359559059143, 0.0024560533929616213, 0.7008900046348572,...
func UpdateProfilePicture(w http.ResponseWriter, r *http.Request) { w.Header().Set("content-Type", "application/json") org_collection, member_collection := "organizations", "members" orgId := mux.Vars(r)["id"] member_Id := mux.Vars(r)["mem_id"] requestData := make(map[string]string) if err := utils.ParseJsonFro...
[ -0.8932693004608154, -0.33869698643684387, 1.0975255966186523, 0.3790946900844574, 0.04130421578884125, 0.5009448528289795, 0.26192808151245117, -0.42771387100219727, -0.23438434302806854, 1.0897694826126099, -0.799678385257721, 0.22474156320095062, -1.1027518510818481, 0.23110541701316833...
func UpdateMemberStatus(w http.ResponseWriter, r *http.Request) { w.Header().Set("content-type", "application/json") org_collection, member_collection := "organizations", "members" // Validate the user ID orgId := mux.Vars(r)["id"] member_Id := mux.Vars(r)["mem_id"] pMemId, err := primitive.ObjectIDFromHex(mem...
[ -0.6920007467269897, -1.021765112876892, 0.7923546433448792, 0.2590097486972809, -0.182595893740654, 0.3169950246810913, -0.4833225607872009, 0.0066801803186535835, -0.5264472961425781, 0.8250805735588074, -0.6014132499694824, 0.8351669311523438, -0.6890097856521606, 0.4585146903991699, ...
func DeleteMember(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") member_collection, org_collection := "members", "organizations" orgId := mux.Vars(r)["id"] memberId := mux.Vars(r)["mem_id"] pOrgId, err := primitive.ObjectIDFromHex(orgId) if err != nil { utils.GetE...
[ -0.244612455368042, -0.18222926557064056, 1.0517529249191284, 0.5235347151756287, 0.3302828371524811, 0.7409752011299133, 0.24786487221717834, -0.13583628833293915, 0.013875165022909641, 0.4025533199310303, -0.007035532034933567, 0.6071518659591675, -0.8496527671813965, 0.5603034496307373,...
func (b Bool) IfPresent(f func(bool)) Bool { if f != nil && b.IsPresent() { f(b.value) } return b }
[ 0.3255189061164856, -0.047081612050533295, 0.5179888010025024, 0.04692737013101578, 0.320814311504364, 0.44863495230674744, 0.1276107281446457, 0.7809503078460693, -0.4719530940055847, 0.5900202989578247, 0.12230511009693146, -0.2773859202861786, -0.15011583268642426, 0.34857410192489624, ...
func (s String) IfPresent(f func(string)) String { if f != nil && s.IsPresent() { f(s.value) } return s }
[ 0.8556279540061951, -0.5526018142700195, 0.5054687857627869, -0.6365324258804321, -0.17861510813236237, -0.25089794397354126, -0.2382114827632904, 0.5020787715911865, -0.0719524547457695, 0.3374935984611511, 0.7847723960876465, 0.07248624414205551, 0.8341699838638306, 0.04518727958202362, ...
func (i Int) IfPresent(f func(int)) Int { if f != nil && i.IsPresent() { f(i.value) } return i }
[ -0.22555838525295258, 0.0895611122250557, 0.5674863457679749, -0.6086041331291199, 0.1904538869857788, 0.13729135692119598, 0.5919234752655029, 0.4531960189342499, -0.1717970222234726, 0.39136239886283875, 0.01683364249765873, -0.19908608496189117, 0.01898319460451603, 0.38297000527381897,...
func (f Float64) IfPresent(c func(float64)) Float64 { if c != nil && f.IsPresent() { c(f.value) } return f }
[ 1.0651488304138184, 0.20829352736473083, 0.5491340160369873, -0.3385043740272522, 0.6013292074203491, 0.27841681241989136, 0.3885819613933563, 0.5608922243118286, -0.22445249557495117, 0.22168275713920593, 0.6156491041183472, -0.030448665842413902, 0.36322450637817383, 0.9746553301811218, ...
func (t Time) IfPresent(f func(time.Time)) Time { if f != nil && t.IsPresent() { f(t.value) } return t }
[ 0.13346152007579803, -0.11299080401659012, 0.8032299876213074, -0.426125168800354, 0.40017277002334595, 0.21073397994041443, -0.33289068937301636, 0.3562967777252197, -0.2629777491092682, 1.4561419486999512, 0.17519165575504303, -0.45625850558280945, 0.4446925222873688, 0.9837539792060852,...
func (d Duration) IfPresent(f func(time.Duration)) Duration { if f != nil && d.IsPresent() { f(d.value) } return d }
[ 0.15264303982257843, 0.35106661915779114, 0.6028721332550049, -0.1891612559556961, 0.12360876798629761, 0.3264440894126892, 0.003806003835052252, 0.49466824531555176, -0.0014169063651934266, 0.9071048498153687, 0.41757136583328247, -0.03984954208135605, 1.0524238348007202, 0.80089771747589...
func (m Mixed) IfPresent(f func(interface{})) Mixed { if f != nil && m.IsPresent() { f(m.mixed) } return m }
[ 0.22995789349079132, -0.6462166905403137, 0.5650227069854736, -0.06268153339624405, 0.2048540711402893, 0.6258934736251831, 0.3100244998931885, 0.6011127233505249, 0.3695578873157501, 0.008963417261838913, 0.2646677792072296, -0.5838834643363953, -0.055915940552949905, 0.9563486576080322, ...
func (e Error) IfPresent(f func(error)) Error { if f != nil && e.IsPresent() { f(e.value) } return e }
[ 0.034974392503499985, -0.32581132650375366, 0.5396279096603394, -0.3195948302745819, 0.18713964521884918, 0.24211424589157104, -0.13410724699497223, 0.6815187931060791, 0.2803507447242737, 0.7838682532310486, 0.6111489534378052, 0.18611204624176025, 0.5473843812942505, 0.4966641068458557, ...
func ParseURL(jsFileURL string, fileContents string) (string, error) { match := re.FindStringSubmatch(fileContents) if len(match) < 2 { return "", nil } rel := match[2] u, err := url.Parse(rel) if err != nil { return "", err } base, err := url.Parse(jsFileURL) if err != nil { return "", err } return b...
[ 0.38781657814979553, -0.5891624093055725, 0.7453594207763672, -0.289591521024704, -0.28170159459114075, -0.6182594895362854, 0.33468708395957947, 0.23931588232517242, -0.4839431643486023, 0.02638872340321541, 0.7950658202171326, -0.3899305462837219, -0.24869845807552338, -0.220815330743789...
func saturationVapourPressure(tC float64) float64 { // [Pa] // August-Roche-Magnus approximation (from pg.38 of Lu, N. and J.W. Godt, 2013. Hillslope Hydrology and Stability. Cambridge University Press. 437pp.) return 610.49 * math.Exp(17.625*tC/(tC+243.04)) // [Pa=N/m²] R²=1 for -30°C =< T =< 50°C }
[ 0.5248188972473145, -0.05428457260131836, 0.49647530913352966, -0.5209047198295593, -0.8306398987770081, 0.766305148601532, -0.3700506091117859, 0.5272155404090881, 0.07811571657657623, 1.445345163345337, 0.06244787201285362, -0.019222745671868324, -0.388083279132843, -0.27966344356536865,...
func (c *Client) DeleteSecret(ctx context.Context, params *DeleteSecretInput, optFns ...func(*Options)) (*DeleteSecretOutput, error) { if params == nil { params = &DeleteSecretInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteSecret", params, optFns, c.addOperationDeleteSecretMiddlewares) if err !...
[ -0.0732891857624054, 0.8696883320808411, 0.6875743865966797, 0.637480616569519, 0.5881540179252625, -0.7293227910995483, 0.7583702206611633, -1.3458598852157593, 0.6663745045661926, -0.5505654811859131, -0.9959011077880859, 1.2771077156066895, -0.4382798373699188, -0.5468761920928955, -0...
func NewServer(opts *config.Options, db *sql.DB, ring *secrets.DecoderRing) (*Server, error) { s := Server{ opts: opts, db: db, ring: ring, currentSync: &syncProgress{}, } pool, err := state.NewPool(s.newSession, 10) if err != nil { return nil, err } s.pool = pool http.HandleFu...
[ -0.7216538190841675, -0.2651136815547943, 0.6382637619972229, 0.2589234411716461, 0.3684188723564148, 0.08715581148862839, 0.6313048601150513, -0.4601634740829468, 0.13780230283737183, -0.13005121052265167, -0.18881329894065857, 0.5108126997947693, -0.008860673755407333, 0.561797022819519,...
func (s Server) Listen() error { log.WithField("address", s.opts.ListenAddress).Info("Now serving.") return http.ListenAndServeTLS(s.opts.ListenAddress, secrets.FilenameTLSCertificate, secrets.FilenameTLSKey, nil) }
[ 0.1558760702610016, -0.6331669688224792, 0.323091983795166, -0.33521389961242676, 0.220526322722435, 0.43386420607566833, -0.4302172362804413, 0.9773804545402527, 0.16965508460998535, 0.13494405150413513, -0.43633800745010376, 0.7409940958023071, 0.13739317655563354, 0.893271267414093, 0...
func (t Table) Equals(other core.DxfElement) bool { if otherTable, ok := other.(Table); ok { if len(t) != len(otherTable) { return false } for key, element := range t { if otherElement, ok := otherTable[key]; ok { if !element.Equals(otherElement) { return false } } else { return false ...
[ -1.5445646047592163, 0.4376503825187683, 0.6367245316505432, 0.3275812566280365, -0.0058199744671583176, -0.27059584856033325, -0.5949454307556152, -0.5711396932601929, -0.7208238840103149, 0.14031299948692322, -1.313726782798767, -0.06679155677556992, -0.02126908488571644, 0.2934461832046...
func (t TablesSection) Equals(other core.DxfElement) bool { if otherTable, ok := other.(*TablesSection); ok { return t.Layers.Equals(otherTable.Layers) && t.Styles.Equals(otherTable.Styles) && t.LineTypes.Equals(otherTable.LineTypes) } return false }
[ -1.1003508567810059, 0.08003707975149155, 0.5793618559837341, -0.13230085372924805, -0.3236382305622101, 0.3594725728034973, -0.4213447570800781, -1.5717120170593262, -0.9378847479820251, -0.010982894338667393, -0.9459977746009827, -0.3935773968696594, 0.7473636269569397, 0.991611659526825...
func NewTablesSection(tags core.TagSlice) (*TablesSection, error) { tables := new(TablesSection) tableParsers := map[string]func(slice core.TagSlice) error{ "LAYER": func(slice core.TagSlice) error { layerTables, err := NewLayerTable(slice) tables.Layers = layerTables return err }, "STYLE": func(slic...
[ -0.24603599309921265, -0.5534582734107971, 0.6100469827651978, 0.0866970419883728, -0.878767728805542, -0.13829681277275085, 0.16797533631324768, -1.071961760520935, -1.2251313924789429, 0.16941747069358826, -0.25962385535240173, -0.23930056393146515, 0.4060091972351074, 0.9401910901069641...
func (api *API) Start() error { validate = validator.New() validate.RegisterValidation("currency", validateCurrency) router := httprouter.New() router.POST("/buy", api.buyHandler) router.POST("/sell", api.sellHandler) api.server = &http.Server{Addr: fmt.Sprintf(":%s", api.Port), Handler: router} ln, err := ne...
[ -0.6753603219985962, -0.4202113151550293, 0.5830347537994385, -0.37997984886169434, 1.302994966506958, 0.06301175057888031, 0.3723454177379608, 0.37158286571502686, -0.8041527271270752, 0.41708624362945557, -0.5850843787193298, 1.4876240491867065, -0.013340901583433151, 0.12251964956521988...
func (Message_MessageType) EnumDescriptor() ([]byte, []int) { return file_message_proto_rawDescGZIP(), []int{0, 0} }
[ -0.1591290682554245, 0.045911721885204315, 0.5584605932235718, 0.08696743845939636, 0.6675955653190613, -0.5600423812866211, 0.24438117444515228, -0.47568243741989136, -0.17431814968585968, 0.009094727225601673, 0.06977412104606628, -0.1994970291852951, -0.2088954746723175, 2.1940119266510...
func (QuorumCertificate_CertType) EnumDescriptor() ([]byte, []int) { return file_message_proto_rawDescGZIP(), []int{13, 0} }
[ 0.9449132084846497, -0.17309071123600006, 0.2665480077266693, 0.21360407769680023, 0.3854956030845642, -0.9767159223556519, 0.06520915031433105, -0.9543085694313049, 0.5265886187553406, 0.6420679092407227, -0.013316167518496513, -0.6256481409072876, -1.3911052942276, 0.23500430583953857, ...
func (Transaction_Type) EnumDescriptor() ([]byte, []int) { return file_message_proto_rawDescGZIP(), []int{18, 0} }
[ 0.9586725831031799, 0.8182284235954285, 0.5801964402198792, -0.6714708805084229, 0.9981753826141357, -1.0440459251403809, 0.4100901186466217, -0.08244438469409943, 0.2385745346546173, 0.6759037971496582, 0.061628445982933044, -0.2687559127807617, -0.39295440912246704, 1.452102780342102, ...
func (*Message) Descriptor() ([]byte, []int) { return file_message_proto_rawDescGZIP(), []int{0} }
[ -0.6773880124092102, 0.8086156845092773, 0.5675655603408813, 0.1822696030139923, -0.022049536928534508, -0.17558307945728302, -0.008210995234549046, 0.3829813003540039, -0.7365354299545288, -0.8882496953010559, 0.1739746332168579, -0.010960958898067474, -0.09793754667043686, 1.433963775634...
func (*HelloPayload) Descriptor() ([]byte, []int) { return file_message_proto_rawDescGZIP(), []int{1} }
[ -0.17711278796195984, 0.4543619751930237, 0.49252617359161377, -0.32293233275413513, 0.127007395029068, 0.21548283100128174, 0.4526515603065491, 0.3373379707336426, -0.93281090259552, -0.8951869010925293, -0.8439503908157349, 0.7714764475822449, -0.22377300262451172, 0.49025759100914, 1....
func (*SynchronizePayload) Descriptor() ([]byte, []int) { return file_message_proto_rawDescGZIP(), []int{2} }
[ -0.14784236252307892, 0.5568646788597107, 0.5136315226554871, 0.12741386890411377, 0.9017789959907532, -0.6450626254081726, 0.9565838575363159, -0.11049345135688782, -0.07858976721763611, -0.17104767262935638, -1.2882355451583862, 0.5745320916175842, -0.04895278066396713, 0.149362295866012...
func (*ProposalPayload) Descriptor() ([]byte, []int) { return file_message_proto_rawDescGZIP(), []int{3} }
[ -0.11625727266073227, 0.7134081721305847, 0.38818714022636414, -0.12618283927440643, -0.42855700850486755, 0.03401307761669159, 0.044564224779605865, 0.7308635711669922, 0.12353670597076416, -0.3992772698402405, -0.024312317371368408, -0.19821986556053162, -0.22197604179382324, 0.177327334...
func (*VotePayload) Descriptor() ([]byte, []int) { return file_message_proto_rawDescGZIP(), []int{4} }
[ -0.2582777738571167, 0.41953179240226746, 0.3306416869163513, 0.17261075973510742, 0.39217597246170044, -0.04545746371150017, -0.2982368767261505, 0.23547200858592987, -0.20289699733257294, -0.20660004019737244, -0.444856733083725, 0.7413239479064941, -0.46314775943756104, 0.08226859569549...
func (*Signature) Descriptor() ([]byte, []int) { return file_message_proto_rawDescGZIP(), []int{5} }
[ -0.5600250363349915, 0.44857120513916016, 0.36869892477989197, 0.45178866386413574, 0.004624342545866966, -0.5940176248550415, 0.7404290437698364, 0.4956693649291992, -0.38768938183784485, -0.2912599444389343, -1.2558937072753906, -0.6209731101989746, -0.0028391589876264334, 0.889354884624...
func (*SignatureAggregate) Descriptor() ([]byte, []int) { return file_message_proto_rawDescGZIP(), []int{6} }
[ -0.29483267664909363, 1.0958850383758545, 0.6426461935043335, 0.36291593313217163, -0.12639650702476501, -0.810818612575531, 0.22339946031570435, 0.22769732773303986, -0.9327588677406311, -0.09749219566583633, -0.44301554560661316, -0.6519163250923157, -0.6481263041496277, 1.83046030998229...
func (*HeadersRequest) Descriptor() ([]byte, []int) { return file_message_proto_rawDescGZIP(), []int{7} }
[ -0.9655139446258545, 0.013054030947387218, 0.2928994596004486, -0.319775253534317, -0.4729507267475128, -1.1405030488967896, -0.4812101721763611, -0.11997577548027039, -0.18409347534179688, -0.9444011449813843, 0.15633487701416016, 0.03493756428360939, 0.10491368919610977, 0.65564572811126...
func (*HeadersResponse) Descriptor() ([]byte, []int) { return file_message_proto_rawDescGZIP(), []int{8} }
[ -0.45717859268188477, 0.008943143300712109, -0.06168551370501518, -0.3990139365196228, -0.39075204730033875, -1.2796664237976074, -0.11327289789915085, -0.3426207900047302, -0.1412714123725891, -0.27643316984176636, -0.5453152060508728, -0.564374566078186, -0.42047834396362305, -0.11986133...
func (*Headers) Descriptor() ([]byte, []int) { return file_message_proto_rawDescGZIP(), []int{9} }
[ -0.5679425001144409, 0.5584248304367065, 0.1630270928144455, -0.4954378008842468, -0.258504718542099, -0.6994538307189941, 0.03232070058584213, -0.2568129003047943, -0.42890167236328125, -0.570549488067627, 0.31892862915992737, 0.05062535032629967, -0.2139224410057068, 0.6151347756385803, ...
func (*BlockRequestPayload) Descriptor() ([]byte, []int) { return file_message_proto_rawDescGZIP(), []int{10} }
[ -0.5274648070335388, 0.14583498239517212, 0.35205167531967163, 0.38871002197265625, 0.04041571915149689, -0.21655642986297607, -0.319242000579834, -0.34060442447662354, -0.3570387661457062, -0.8866133093833923, 0.45192623138427734, 0.2262999713420868, -0.8365711569786072, -0.52385479211807...
func (*BlockResponsePayload) Descriptor() ([]byte, []int) { return file_message_proto_rawDescGZIP(), []int{11} }
[ 0.42381468415260315, 0.21623848378658295, 0.3972579836845398, 0.4814395308494568, 0.16015547513961792, -0.3474443554878235, 0.44113245606422424, -0.02459997870028019, 0.22455397248268127, -0.5842885971069336, -0.24704907834529877, -0.42217862606048584, -0.38677704334259033, -0.256426423788...
func (*QuorumCertificate) Descriptor() ([]byte, []int) { return file_message_proto_rawDescGZIP(), []int{13} }
[ 0.7213383913040161, 0.054227448999881744, 0.09424319118261337, -0.013507502153515816, -0.18323777616024017, -1.3652807474136353, 0.22623267769813538, -0.2048032283782959, -0.11979672312736511, 0.15044806897640228, -0.816442608833313, -0.23121163249015808, -1.6403453350067139, -0.0779360458...
func (*SynchronizeCertificate) Descriptor() ([]byte, []int) { return file_message_proto_rawDescGZIP(), []int{14} }
[ 0.10782097280025482, 0.2956503927707672, 0.5924358367919922, 0.5040106773376465, 0.8529751896858215, -0.836967945098877, 0.9906383752822876, -0.02811603993177414, -0.612493634223938, 0.3108631372451782, -1.4966083765029907, 0.3579883277416229, -0.23097775876522064, 0.3917732238769531, 0....
func (*Block) Descriptor() ([]byte, []int) { return file_message_proto_rawDescGZIP(), []int{15} }
[ -0.44647300243377686, 1.1529102325439453, 0.7005211114883423, -0.006858854554593563, 0.21858276426792145, 0.043396346271038055, 0.6681199669837952, 0.0984419509768486, -0.4170086681842804, -0.9132022261619568, -0.3498953580856323, 0.7182379961013794, -0.19666418433189392, 0.978009104728698...
func (*BlockHeader) Descriptor() ([]byte, []int) { return file_message_proto_rawDescGZIP(), []int{16} }
[ -0.3241565525531769, 0.4358043670654297, 0.5953509211540222, 0.5720212459564209, -0.0873376801609993, -0.029488302767276764, 0.5617019534111023, -0.2330484688282013, -0.8169169425964355, 0.3210536241531372, -0.33605241775512695, 0.4074825346469879, -0.7036962509155273, 0.6878573894500732, ...
func (*BlockData) Descriptor() ([]byte, []int) { return file_message_proto_rawDescGZIP(), []int{17} }
[ -0.3269283175468445, 0.7800374627113342, 0.5593879818916321, -0.06769343465566635, 0.35831135511398315, 0.677179753780365, 0.453163206577301, -0.060026202350854874, -1.0152581930160522, -0.02704024128615856, -0.3065266013145447, 0.7532219290733337, -0.36834660172462463, 0.6293637156486511,...
func (*Transaction) Descriptor() ([]byte, []int) { return file_message_proto_rawDescGZIP(), []int{18} }
[ -0.223586305975914, 0.8427510261535645, 0.4884370267391205, -0.2883012890815735, 0.6625529527664185, -0.4271581172943115, 0.36223945021629333, 0.24713434278964996, -0.19033268094062805, -0.08753218501806259, -1.1138213872909546, -0.6277928948402405, -0.17371386289596558, -0.075644589960575...
func NewBackup(dst *Conn, dstName string, src *Conn, srcName string) (*Backup, error) { if dst == nil || src == nil { return nil, errors.New("nil sqlite backup source or destination") } dname := C.CString(dstName) sname := C.CString(srcName) sb := C.sqlite3_backup_init(dst.db, dname, src.db, sname) C.free(unsa...
[ -0.5083745718002319, 0.39252087473869324, 0.783128559589386, 0.01590394601225853, -1.3467050790786743, -0.22876442968845367, -0.2819710671901703, -0.11728386580944061, 0.12847860157489777, 0.6079928278923035, 0.1503809094429016, -0.2291971743106842, 0.11764951050281525, -0.6982008218765259...
func (b *Backup) Step(npage int32) error { if b == nil { return errors.New("nil sqlite backup") } rv := C.sqlite3_backup_step(b.sb, C.int(npage)) if rv == C.SQLITE_OK || Errno(rv&0xFF) == ErrBusy || Errno(rv&0xFF) == ErrLocked { // TODO Trace busy/locked errors return nil } else if rv == C.SQLITE_DONE { retu...
[ -0.5958822965621948, 0.9181612730026245, 0.7269353866577148, -0.006626225542277098, 0.00648889783769846, -0.24805264174938202, 0.8461056351661682, -0.3921269178390503, 0.2463681399822235, 0.3093831241130829, -0.661174476146698, -0.6593310236930847, -0.656704843044281, 0.10261638462543488, ...
func (b *Backup) Status() BackupStatus { return BackupStatus{int(C.sqlite3_backup_remaining(b.sb)), int(C.sqlite3_backup_pagecount(b.sb))} }
[ -0.22119669616222382, -0.952923595905304, 0.23035144805908203, 0.22124718129634857, 0.06163961812853813, 0.018539786338806152, -0.05504114180803299, 0.536716639995575, 1.1959525346755981, 0.07225890457630157, -1.0205858945846558, -0.438340425491333, 0.04447899013757706, 0.7181475758552551,...
func (b *Backup) Run(npage int32, sleepNs time.Duration, c chan<- BackupStatus) error { var err error for { err = b.Step(npage) if err != nil { break } if c != nil { c <- b.Status() } if sleepNs > 0 { time.Sleep(sleepNs) } } if err != Done { _ = b.Close() } else { if c != nil { c <- b...
[ -0.7264193296432495, -0.21587106585502625, 1.0032390356063843, 0.38786977529525757, 0.058378733694553375, 0.39195358753204346, 0.49548470973968506, -0.06900715082883835, -0.15494151413440704, 0.03965943306684494, -0.7988901734352112, -0.6740838885307312, -0.5276444554328918, 1.141828417778...
func (b *Backup) Close() error { if b == nil { return errors.New("nil sqlite backup") } if b.sb == nil { return nil } rv := C.sqlite3_backup_finish(b.sb) // must be called only once b.sb = nil if rv != C.SQLITE_OK { return b.dst.error(rv, "backup finish failed") } return nil }
[ 0.17959728837013245, 0.7420321106910706, 0.8391830921173096, 0.7319594621658325, -0.5957465171813965, 0.33304181694984436, 0.1259085237979889, -0.5429161787033081, 0.012150495313107967, 0.26305118203163147, 0.30288583040237427, -0.38919851183891296, -0.94821697473526, 0.5930756330490112, ...
func (g *Group) CreateGroup(name string) (*Group, error) { return createGroup(g.id, name, C.H5P_DEFAULT, C.H5P_DEFAULT, C.H5P_DEFAULT) }
[ -0.03482227399945259, 0.7719053626060486, 0.15002405643463135, 0.4968014657497406, 0.16437233984470367, -0.2925795614719391, 0.08540373295545578, -1.1123074293136597, -0.5591887831687927, 0.05852463096380234, -0.9772334098815918, -0.8643530011177063, -0.6977586150169373, 0.459663987159729,...
func (g *Group) CreateDataset(name string, dtype *Datatype, dspace *Dataspace) (*Dataset, error) { return createDataset(g.id, name, dtype, dspace, P_DEFAULT) }
[ -0.20041264593601227, 0.5762063264846802, 0.2581304609775543, -0.23199960589408875, -0.3447318375110626, 0.10454627871513367, -0.6447195410728455, -0.4099326431751251, -0.48950156569480896, -0.42291298508644104, 0.25864630937576294, 0.24913156032562256, -0.4013916254043579, 0.1819830983877...
func (g *Group) CreateDatasetWith(name string, dtype *Datatype, dspace *Dataspace, dcpl *PropList) (*Dataset, error) { return createDataset(g.id, name, dtype, dspace, dcpl) }
[ -0.2192385345697403, -0.008031310513615608, 0.366756409406662, -0.4792517125606537, -1.2285667657852173, -0.12952062487602234, -0.9077939391136169, -0.6667112112045288, -0.25545889139175415, -0.3329313099384308, -0.21631553769111633, 0.4763942062854767, 0.31775355339050293, 0.5160343050956...
func (g *Group) CreateAttribute(name string, dtype *Datatype, dspace *Dataspace) (*Attribute, error) { return createAttribute(g.id, name, dtype, dspace, P_DEFAULT) }
[ -0.002351031405851245, 0.42287981510162354, 0.1452586054801941, 0.15093819797039032, 0.12807656824588776, 0.17675477266311646, -0.2925181984901428, -0.09849726408720016, -0.6671921610832214, 0.14116619527339935, 0.037550609558820724, -0.20228438079357147, -0.9089805483818054, 0.39456745982...
func (g *Group) CreateAttributeWith(name string, dtype *Datatype, dspace *Dataspace, acpl *PropList) (*Attribute, error) { return createAttribute(g.id, name, dtype, dspace, acpl) }
[ 0.3555995225906372, -0.4148625135421753, 0.2643144428730011, -0.2132030725479126, -0.4562082588672638, -0.03572288155555725, -0.5227034091949463, -0.17627739906311035, -0.28298166394233704, 0.3573988974094391, -0.1641143411397934, 0.1778492033481598, -0.08236999809741974, 0.601373851299285...
func (g *Group) Close() error { return h5err(C.H5Gclose(g.id)) }
[ -0.24069516360759735, 0.37276846170425415, 0.027553655207157135, -0.02292044647037983, -1.0101139545440674, 0.16490986943244934, 0.8526825904846191, -1.674606204032898, -1.702688455581665, -0.28064000606536865, 0.6584560871124268, 0.023666027933359146, -1.2990872859954834, 0.84452247619628...
func (g *Group) OpenGroup(name string) (*Group, error) { return openGroup(g.id, name, P_DEFAULT.id) }
[ -1.0205581188201904, 1.0476645231246948, 0.25009971857070923, 0.20260962843894958, -0.945696234703064, -0.5064738392829895, -0.14710140228271484, -0.19504311680793762, -0.3240971863269806, -0.32201313972473145, -0.3298662602901459, 0.058464013040065765, -0.8501086831092834, 0.2713007032871...
func (g *Group) OpenDataset(name string) (*Dataset, error) { return openDataset(g.id, name) }
[ -1.0404722690582275, 0.30089473724365234, 0.49368223547935486, -1.0506008863449097, -1.9141905307769775, -0.28017017245292664, -0.17423799633979797, -0.19458232820034027, 0.10071542859077454, -1.0447704792022705, 0.49972957372665405, 0.7698023319244385, -0.33439573645591736, -0.23532676696...
func (g *Group) OpenAttribute(name string) (*Attribute, error) { return openAttribute(g.id, name) }
[ -0.9602376818656921, -0.326459139585495, 0.3388304114341736, -0.794834554195404, -1.9235609769821167, -0.4833257496356964, 0.44370079040527344, 0.06495480984449387, 0.1128237321972847, -0.046212177723646164, 0.46444693207740784, 0.0030242623761296272, -0.8864536881446838, 0.018453149124979...
func (g *Group) OpenDatatype(name string, tapl_id int) (*Datatype, error) { return openDatatype(g.id, name, tapl_id) }
[ -0.815875232219696, 0.7342568039894104, 0.40664854645729065, -0.82496577501297, -1.447498083114624, -0.10244112461805344, 0.013834837824106216, -0.016213450580835342, -0.023120827972888947, -0.5384501218795776, -0.764498233795166, 0.11917233467102051, 0.9678175449371338, 0.2852018475532532...
func (g *Group) NumObjects() (uint, error) { return numObjects(g.id) }
[ -1.3265269994735718, 0.10270942002534866, 0.41389504075050354, -0.24059244990348816, -0.09512614458799362, -0.2932257354259491, 0.7288905382156372, -0.6580689549446106, -0.7690776586532593, -0.12340117990970612, -1.3257888555526733, -0.2800796926021576, -0.1604820340871811, 0.1877730637788...
func (g *Group) ObjectNameByIndex(idx uint) (string, error) { return objectNameByIndex(g.id, idx) }
[ -0.9105576872825623, -0.2524755895137787, 0.5197172164916992, -0.3946029841899872, -0.9883366227149963, -0.5119735598564148, 0.36180219054222107, -1.4128060340881348, -0.2918418049812317, 1.1570724248886108, -0.1456436812877655, -0.2917678654193878, 0.11616452783346176, -1.0643216371536255...
func (g *Group) CreateTable(name string, dtype *Datatype, chunkSize, compression int) (*Table, error) { return createTable(g.id, name, dtype, chunkSize, compression) }
[ 0.6977996826171875, 0.3528072237968445, 0.45504531264305115, 0.09164585173130035, -0.22841981053352356, -0.42002105712890625, 0.04622070491313934, -1.237978458404541, -1.3331085443496704, 0.3570769131183624, -0.42927220463752747, -0.2843059301376343, -0.6134434938430786, 0.1257070153951645...
func (g *Group) CreateTableFrom(name string, dtype interface{}, chunkSize, compression int) (*Table, error) { return createTableFrom(g.id, name, dtype, chunkSize, compression) }
[ 0.7437617778778076, 0.18633630871772766, 0.4568101167678833, 0.44877904653549194, -0.6420133709907532, -0.14406242966651917, -0.027208726853132248, -1.3861244916915894, -1.341254472732544, 0.19764286279678345, -0.27763229608535767, -0.2425289750099182, -0.012725580483675003, 0.171876594424...
func (g *Group) OpenTable(name string) (*Table, error) { return openTable(g.id, name) }
[ -0.5025994777679443, 0.3250638246536255, 0.4566148817539215, 0.20307761430740356, -1.4438800811767578, -0.4425942003726959, 0.23772595822811127, -0.5769948959350586, -0.8533531427383423, 0.06354629993438721, -0.1720641553401947, -0.06977994740009308, -0.2877168357372284, 0.0961502343416214...
func TestIPAddress_Instance_Delete(t *testing.T) { client, instance, _, teardown, err := setupInstanceWithoutDisks(t, "fixtures/TestIPAddress_Instance_Delete") defer teardown() if err != nil { t.Error(err) } ip, err := client.AddInstanceIPAddress(context.TODO(), instance.ID, true) if err != nil { t.Fatalf("f...
[ -0.38431859016418457, -0.10822246223688126, 0.5387815833091736, -0.6085935235023499, 0.5141258239746094, -0.1824023425579071, 0.5580679178237915, 0.5001897811889648, 0.6670066118240356, -0.42036038637161255, -0.6320165395736694, 0.35491666197776794, -0.24098899960517883, -0.558409094810485...
func main() { // check if numbers.log file is > 1MB delete it var numsize int64 fileStat, err := os.Stat("numbers.log") if err != nil { log.Fatal(err) } numsize = fileStat.Size() if numsize > 1000000 { e := os.Remove("numbers.log") if e != nil { log.Fatal(e) ...
[ 0.31554585695266724, 0.11256963759660721, 1.2210725545883179, -0.009234610944986343, 0.017751330509781837, 0.39870983362197876, 1.0218204259872437, -0.04167450591921806, 0.04598419368267059, 0.0017213079845532775, -0.509907603263855, -0.18595443665981293, 0.42170557379722595, 0.41293027997...
func (kv *RaftKV) Kill() { kv.rf.Kill() // Your code here, if desired. }
[ 0.005346902646124363, -0.5462419390678406, 0.4200303256511688, 2.601745843887329, 0.10356178879737854, 0.19263485074043274, 0.0697065070271492, 0.660498321056366, -0.1607535481452942, 0.10961823910474777, -0.19829469919204712, 0.37342754006385803, -0.23244689404964447, 0.4878041446208954, ...
func StartKVServer(servers []*labrpc.ClientEnd, me int, persister *raft.Persister, maxraftstate int) *RaftKV { // call gob.Register on structures you want // Go's RPC library to marshall/unmarshall. gob.Register(Op{}) kv := new(RaftKV) kv.me = me kv.maxraftstate = maxraftstate // Your initialization code here....
[ 0.23529058694839478, 0.21619270741939545, 0.6409881114959717, 0.8143402934074402, -0.05711749196052551, -0.005950607359409332, 0.025158561766147614, 0.1520906239748001, 0.15353786945343018, -0.40400612354278564, -0.31827017664909363, 0.37167227268218994, -0.6407757997512817, 0.491331309080...
func OpenUSB() (Connection, error) { port, err := usbserial.Open(dexcomVendor, dexcomProduct) if err != nil { return nil, err } return &usbConn{port: port}, nil }
[ -0.6783447265625, 0.39451950788497925, 0.6450644731521606, 0.5681378245353699, -0.5086325407028198, -0.23299382627010345, 0.3763447701931, 0.7445040345191956, 1.2906498908996582, -0.5182455778121948, 0.016460752114653587, 0.36368900537490845, -0.33139458298683167, -0.666544497013092, 0.6...
func New(data url.Values) *Form { return &Form{ data, errors(map[string][]string{}), } }
[ -0.2527390122413635, -0.4888547956943512, 0.18833330273628235, -0.6875615119934082, -0.42584285140037537, -0.06677588075399399, -0.7925283908843994, 0.1734723150730133, -0.5266338586807251, -1.6532955169677734, -0.7927626967430115, 0.22583197057247162, 1.1987324953079224, 0.444308698177337...
func (f *Form) Has(field string, r *http.Request) bool { x := r.Form.Get(field) if x == "" { return false } return true }
[ -0.6019035577774048, 0.21741534769535065, 0.42610496282577515, -0.6769865155220032, 0.6299676895141602, 0.6066733002662659, -1.5829136371612549, 0.26943859457969666, -0.8271295428276062, -1.3360906839370728, -0.5734109878540039, -0.22745348513126373, -0.0817614495754242, 0.8190513253211975...
func (f *Form) Required(fields ...string) { for _, field := range fields { value := f.Get(field) if strings.TrimSpace(value) == "" { f.Errors.Add(field, "This field cannot be blank") } } }
[ -0.7027089595794678, 0.6584123969078064, 0.3738440275192261, -0.4172517955303192, 0.8460071682929993, 0.8383564949035645, -0.6450158357620239, 0.39561736583709717, -0.6817588806152344, -0.38976699113845825, -0.6886009573936462, 0.0429987758398056, 0.2016877830028534, 0.9230827689170837, ...
func (f *Form) IsEmail(field string) { if !govalidator.IsEmail(f.Get(field)) { f.Errors.Add(field, "Invalid email address") } }
[ -0.4614102840423584, 0.33075231313705444, 0.27965766191482544, 0.38453567028045654, -0.07156066596508026, 0.9050031900405884, -0.1367611438035965, 0.8378073573112488, 0.2947009205818176, 0.3728553056716919, -0.27393317222595215, 0.5314709544181824, -0.07316439598798752, -0.1416961252689361...
func (f *Form) MinLength(field string, d int) { value := f.Get(field) if value == "" { return } if utf8.RuneCountInString(value) < d { f.Errors.Add(field, fmt.Sprintf("This field is too short (minimum is %d characters)", d)) } }
[ 0.6006521582603455, 0.36573854088783264, 0.2067306488752365, -0.858975350856781, -0.5611602067947388, 0.7029435634613037, -0.3687105178833008, -0.2430884689092636, 0.3529336452484131, -0.11928483098745346, 0.5595670342445374, 0.5520742535591125, 0.09443351626396179, 0.18710629642009735, ...
func (f *Form) Valid() bool { return len(f.Errors) == 0 }
[ -0.38035234808921814, -0.6987584829330444, 0.4147087335586548, -0.37333714962005615, 0.07110118865966797, 0.774127185344696, -0.5638709664344788, 0.8234161138534546, -0.6261491775512695, -0.9641649127006531, -0.3662216067314148, -0.3093346357345581, 0.17662636935710907, -0.2405302524566650...