text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (ncr *NamespacedConfigMapReflector) Handle(ctx context.Context, name string) error { tracer := trace.FromContext(ctx) // Retrieve the local and remote objects (only not found errors can occur). klog.V(4).Infof("Handling reflection of local ConfigMap %q (remote: %q)", ncr.LocalRef(name), ncr.RemoteRef(name)) ...
[ -0.19952097535133362, -0.1889100968837738, 0.7604624629020691, -0.8656771183013916, 0.849452555179596, -0.24438261985778809, 0.8124440908432007, -0.5706819295883179, 0.39178919792175293, 0.07578140497207642, -0.06641396880149841, 0.3788042962551117, -0.5087609887123108, 0.5792335867881775,...
func (ncr *NamespacedConfigMapReflector) List() ([]interface{}, error) { return virtualkubelet.List[virtualkubelet.Lister[*corev1.ConfigMap], *corev1.ConfigMap]( ncr.localConfigMaps, ncr.remoteConfigMaps, ) }
[ -1.041388988494873, -0.9283879399299622, 0.17439596354961395, -0.373801589012146, 0.7763285636901855, -0.6431562900543213, -0.6679326891899109, 0.19017371535301208, 0.6915901303291321, -0.07719094306230545, -0.3827857971191406, 0.04438351094722748, -0.36473289132118225, 1.0520509481430054,...
func compareByte(x, y byte) (r Result) { switch { case x == y: return equalResult // Identity case unicode.ToUpper(rune(x)) == unicode.ToUpper(rune(y)): return similarResult // Modified default: return differentResult // UniqueX or UniqueY } }
[ -0.5651415586471558, -0.44176697731018066, 0.4561155438423157, -0.06033768877387047, 0.2256920337677002, 0.1562272310256958, -0.6861860156059265, -0.7640181183815002, 0.18146322667598724, 0.4390724301338196, 0.0815536305308342, -0.1902661919593811, -1.2681396007537842, -0.33992794156074524...
func Respond(c *gin.Context, err *Error) { //logger.Errorf("Respond Error: %d", err, err.Status) if err.Status == http.StatusMultipleChoices { c.Redirect(err.Status, err.Message) } c.JSON(err.Status, err) }
[ -0.8582777976989746, -0.9464877843856812, 0.6551617383956909, 0.9603745937347412, 0.150968536734581, 0.7303712368011475, -0.09425181150436401, 0.5188375115394592, 0.9674601554870605, 0.15889011323451996, 0.3535222113132477, -0.2506032884120941, 0.6964621543884277, 0.7621898055076599, 0.1...
func GetEmptyRenderCore() *RenderCore { return &RenderCore{BE: emptyBackEnd{}} }
[ -0.10709556937217712, 0.43116793036460876, 0.33902496099472046, -0.10896147042512894, 0.12509334087371826, 0.15051382780075073, -0.5635925531387329, 0.13950695097446442, -0.24128299951553345, -0.090785451233387, -0.25871968269348145, 0.40133896470069885, -1.6008719205856323, 0.228356972336...
func GetEmptyBackend() BackEnd { return emptyBackEnd{} }
[ 0.02529916539788246, -0.2533007562160492, 0.41854143142700195, 0.41282448172569275, 0.3068458139896393, 0.0811498835682869, -0.5338146090507507, -0.36553511023521423, -0.0732935220003128, -0.25265082716941833, -1.215182900428772, 0.8133754730224609, -0.47277194261550903, -0.143301174044609...
func (e emptyBackEnd) GetElement(i *Element) interface{} { return "not nil!" }
[ 0.296836256980896, 0.7464674115180969, 0.33937257528305054, 0.3632519841194153, 0.9947887659072876, -0.22682073712348938, 0.6410922408103943, -0.11844146251678467, 0.8867217898368835, 0.2263946831226349, -0.24872291088104248, 0.5289744138717651, -0.8494021892547607, 0.10886438935995102, ...
func (e emptyBackEnd) GetGasEl(g *Gas) interface{} { return "not nil!" }
[ 0.008002792485058308, 0.2854253649711609, 0.4629143178462982, 0.5319373607635498, 0.5888354778289795, -0.6075565218925476, 0.24734866619110107, -0.5546426773071289, -0.19496959447860718, -0.28198638558387756, 0.02059866301715374, 0.9281917810440063, -0.7742801904678345, 0.3065623641014099,...
func (f Frag) HTML(ctx context.Context) (HTML, error) { return nil, errHTMLOnPrimitive("Frag") }
[ -0.349899560213089, 0.33630314469337463, 0.14070644974708557, 0.5947424173355103, -0.04133429378271103, -0.12623725831508636, -0.23802146315574646, 0.20213879644870758, -0.3477744460105896, -0.7224003672599792, 0.7659236192703247, -0.06351514905691147, 0.22413119673728943, 0.16964459419250...
func (s String) HTML(ctx context.Context) (HTML, error) { return Unsafe(html.EscapeString(string(s))), nil }
[ 0.286104291677475, -0.04018116369843483, -0.02751212939620018, 0.43772271275520325, -0.815794050693512, 0.008326389826834202, -0.45786622166633606, -0.1578788459300995, 0.05941559001803398, 0.034880418330430984, 0.7085443735122681, 0.9431904554367065, 0.7105153203010559, -1.531177997589111...
func (u Unsafe) HTML(ctx context.Context) (HTML, error) { return nil, errHTMLOnPrimitive("Unsafe") }
[ -0.285848468542099, 0.44834014773368835, 0.08774232119321823, 0.8692895174026489, -0.19359520077705383, 1.050577163696289, -0.38777482509613037, -0.20690833032131195, -0.4663175344467163, 0.21303053200244904, 0.5747845768928528, 0.5039153099060059, 0.3194423019886017, -0.1764642298221588, ...
func (u UnsafeBytes) HTML(ctx context.Context) (HTML, error) { return nil, errHTMLOnPrimitive("UnsafeBytes") }
[ -0.011420133523643017, 0.6776239275932312, 0.186518594622612, 0.3794817328453064, -0.22346751391887665, 1.0884429216384888, -0.1607222855091095, -0.13000275194644928, -0.20429940521717072, 0.022188251838088036, 0.22564266622066498, 0.7167953252792358, -0.11653123795986176, -0.0726701170206...
func (n *Node) HTML(ctx context.Context) (HTML, error) { return nil, errHTMLOnPrimitive("Node") }
[ -0.4967738687992096, 0.7774425148963928, 0.013410201296210289, 0.2829786241054535, -0.04543553665280342, 0.32333382964134216, -0.5379990339279175, -0.292234867811203, -0.4050174653530121, -0.26807960867881775, 0.819892406463623, 0.4572868347167969, 0.6207555532455444, 0.5274186134338379, ...
func (n *Node) Write(ctx context.Context, w io.Writer) (int, error) { written := 0 i := 0 var err error i, err = fmt.Fprint(w, "<", n.Tag) written += i if err != nil { return written, err } i, err = n.Attributes.Write(w, "") written += i if err != nil { return written, err } i, err = fmt.Fprint(w, ">...
[ -1.245155930519104, 0.5303565859794617, 0.7618988752365112, -0.8472334742546082, 0.4002473056316376, -0.3135870099067688, 0.9727658033370972, -0.034442685544490814, -0.8013082146644592, -0.357562392950058, -0.09531392902135849, -0.0741066187620163, -0.07541166245937347, 1.0098249912261963,...
func (n *ReflectNode) HTML(ctx context.Context) (HTML, error) { return nil, errHTMLOnPrimitive("ReflectNode") }
[ -0.5744545459747314, 0.7102881669998169, 0.18246759474277496, -0.07120374590158463, -0.0014799166237935424, 0.38216444849967957, -0.16183340549468994, -0.15295369923114777, -0.02476787008345127, -0.19291628897190094, 0.48363614082336426, 0.9805833101272583, 0.18989351391792297, 0.581298232...
func (n *ReflectNode) Write(ctx context.Context, w io.Writer) (int, error) { written := 0 i := 0 var err error i, err = fmt.Fprint(w, "<", n.Tag) written += i if err != nil { return written, err } i, err = n.writeAttributes(w) written += i if err != nil { return written, err } i, err = fmt.Fprint(w, ...
[ -1.25246000289917, 0.4456080496311188, 0.7287423610687256, -1.0711033344268799, 0.4319309592247009, -0.21781334280967712, 1.1967641115188599, -0.1621323674917221, -0.6985902786254883, -0.33018985390663147, -0.21096733212471008, 0.18211035430431366, -0.29114019870758057, 1.0636590719223022,...
func (n *ReflectNode) writeAttributes(w io.Writer) (int, error) { value := reflect.ValueOf(n.Node).Elem() typeOf := value.Type() written := 0 tmp := 0 var err error for i := 0; i < typeOf.NumField(); i++ { field := typeOf.Field(i) switch field.Tag.Get("h") { case "attr": tmp, err = writeKeyValue( w, ...
[ -1.3962223529815674, 0.1174086406826973, 0.6151114106178284, -0.8138948678970337, 0.23796914517879486, -0.46039631962776184, 0.8307520151138306, 0.29612746834754944, -0.8554595708847046, -0.17670665681362152, 0.03652764484286308, -0.13237813115119934, -0.2286483645439148, 0.964287877082824...
func (n *ReflectNode) writeInner(ctx context.Context, w io.Writer) (int, error) { value := reflect.ValueOf(n.Node).Elem() typeOf := value.Type() written := 0 tmp := 0 var err error for i := 0; i < typeOf.NumField(); i++ { field := typeOf.Field(i) if field.Tag.Get("h") != "inner" { continue } fieldValu...
[ -1.5210435390472412, 0.32856065034866333, 0.6880528330802917, -0.9059447646141052, 0.49082544445991516, -0.23148895800113678, 1.0902893543243408, -0.0870569571852684, -0.7891870737075806, -0.8290469646453857, -0.10385916382074356, 0.05429605022072792, -0.7657400369644165, 1.291240096092224...
func VMSupportsCS8(frame *rtda.Frame) { stack := frame.OperandStack() stack.PushBoolean(false) // todo sync/atomic }
[ -0.23890835046768188, 0.6452539563179016, 0.39554986357688904, 0.11153975129127502, -0.16762803494930267, -0.11273149400949478, 0.17312471568584442, -0.22609388828277588, 1.0245522260665894, 0.8992692828178406, -0.9035842418670654, -0.05749291554093361, -0.5598005056381226, 0.1750658452510...
func init() { registry.Add("tapo", NewTapoFromConfig) }
[ -0.09798671305179596, 0.7045959234237671, 0.2964344322681427, -0.08227332681417465, 0.6686933636665344, 0.650957465171814, 0.21950452029705048, 0.8075900077819824, 0.04678924381732941, -0.49163818359375, -1.280388355255127, 0.08166706562042236, 1.2089018821716309, -0.16770488023757935, 0...
func NewTapoFromConfig(other map[string]interface{}) (api.Meter, error) { var cc struct { URI string User string Password string } if err := util.DecodeOther(other, &cc); err != nil { return nil, err } if cc.User == "" || cc.Password == "" { return nil, api.ErrMissingCredentials } return ta...
[ 0.025878634303808212, -0.9498864412307739, 0.5341969728469849, 0.5415397882461548, -1.3820972442626953, -0.05026175081729889, -0.84376060962677, -0.5412311553955078, 0.06637222319841385, -0.02860204689204693, 0.1718553900718689, -0.7723488807678223, 0.38472795486450195, 0.4327905774116516,...
func TestIndex_badpath(t *testing.T) { templateString := "" testTempl := template.Must(template.New("test").Parse(templateString)) done := make(chan struct{}) defer close(done) logger := log.New(ioutil.Discard, "", 0) ts := httptest.NewServer(Index(logger, "not-a-folder", done, testTempl)) defer ts.Close() r...
[ -0.3419535458087921, 0.05287754535675049, 0.5846477746963501, 0.3101644814014435, 0.5007922053337097, 0.41664114594459534, 0.6919150352478027, 0.04647567868232727, 0.13195347785949707, -0.4431094825267792, 0.06804460287094116, 0.27120357751846313, -1.0086047649383545, 0.459646999835968, ...
func TestIndex_badtemplate(t *testing.T) { templateString := "{{ .ValueNotPresent }}" testTempl := template.Must(template.New("test").Parse(templateString)) done := make(chan struct{}) defer close(done) logger := log.New(ioutil.Discard, "", 0) ts := httptest.NewServer(Index(logger, "testdata", done, testTempl))...
[ -0.3754352331161499, -0.1066841259598732, 0.5616421699523926, -0.30133965611457825, 0.36714980006217957, 0.5132013559341431, 0.1253751516342163, 0.3679931163787842, -0.11096464097499847, 0.11300931870937347, -0.15349657833576202, 0.1831938624382019, -0.7676684260368347, 0.2751089036464691,...
func (m *CDatabase) Connect() { session, err := mgo.Dial(m.Server) if err != nil { log.Fatal(err) } db = session.DB(m.Database) }
[ -0.6302081346511841, 0.20767159759998322, 0.419324666261673, 0.3432018458843231, -0.6457741260528564, 0.6331844329833984, -0.3655760884284973, -0.29136034846305847, -0.8831698298454285, 0.7758594155311584, -0.2821696698665619, 0.1111372858285904, -0.5816355347633362, 0.5248934030532837, ...
func (m *CDatabase) FindAll() ([]Cluster, error) { var clusters []Cluster err := db.C(COLLECTION).Find(bson.M{}).All(&clusters) return clusters, err }
[ 0.26993411779403687, 0.3823544681072235, 0.23785048723220825, 1.1267712116241455, 0.7979211211204529, 0.8237046599388123, 0.16351284086704254, -0.13522940874099731, -0.2828156650066376, 0.22666046023368835, 0.014233334921300411, 0.4765132963657379, -1.2115157842636108, 1.0007247924804688, ...
func (m *CDatabase) FindById(id string) (Cluster, error) { var cluster Cluster err := db.C(COLLECTION).FindId(bson.ObjectIdHex(id)).One(&cluster) return cluster, err }
[ 0.4767272472381592, 0.1994745284318924, 0.16331638395786285, -0.0766628086566925, 0.0657346323132515, 0.31556662917137146, 0.7904220819473267, -0.8812476992607117, 0.16850857436656952, 0.328369140625, -0.5810726881027222, 0.18407168984413147, -1.4682581424713135, 0.3988494873046875, 0.18...
func (m *CDatabase) Insert(cluster Cluster) error { err := db.C(COLLECTION).Insert(&cluster) return err }
[ -0.8173930644989014, 1.535254716873169, 0.05705063417553902, -0.10574415326118469, 0.49943405389785767, 1.1136224269866943, 0.603786289691925, 0.37883517146110535, -0.6164485216140747, 0.10660239309072495, -1.175071358680725, -0.14027251303195953, -1.9207653999328613, 0.32343754172325134, ...
func (m *CDatabase) Delete(cluster Cluster) error { err := db.C(COLLECTION).Remove(&cluster) return err }
[ 0.1542462259531021, 1.049222707748413, 0.08808669447898865, 0.5779536366462708, 0.42214658856391907, 0.9127197265625, 0.20489250123500824, 0.29017019271850586, 0.028348706662654877, 0.561768651008606, -0.5506842732429504, 0.2508440911769867, -1.6658622026443481, 0.21289272606372833, 0.45...
func (m *CDatabase) Update(cluster Cluster) error { err := db.C(COLLECTION).UpdateId(cluster.ID, &cluster) return err }
[ -0.7563124299049377, 0.1835888773202896, -0.011506089940667152, 0.11556319147348404, -0.05692159757018089, 0.9607718586921692, 0.20464091002941132, 0.055356815457344055, -0.07488211989402771, 0.5507489442825317, -0.6621443033218384, 0.3479310870170593, -1.3542282581329346, 0.28578668832778...
func (httpServer *HttpServer) handleGetRewardAmount(params interface{}, closeChan <-chan struct{}) (interface{}, *rpcservice.RPCError) { arrayParams := common.InterfaceSlice(params) if arrayParams == nil || len(arrayParams) != 1 { return nil, rpcservice.NewRPCError(rpcservice.RPCInvalidParamsError, errors.New("para...
[ 0.19309590756893158, 0.20711757242679596, 1.0953625440597534, -0.05909551680088043, 0.4939519762992859, -0.49828749895095825, 0.8013342618942261, -0.3335531949996948, 0.7119957208633423, 0.4781314730644226, 0.018313966691493988, 1.0798839330673218, -1.3360844850540161, 0.5931516885757446, ...
func (httpServer *HttpServer) handleListRewardAmount(params interface{}, closeChan <-chan struct{}) (interface{}, *rpcservice.RPCError) { result := httpServer.databaseService.ListRewardAmount() return result, nil }
[ -0.21390078961849213, -0.37750351428985596, 0.5754005908966064, -0.5400540828704834, 0.44802430272102356, -0.15555134415626526, 0.14055824279785156, 0.22340498864650726, 0.5983094573020935, 0.3772177994251251, -0.9248484373092651, 0.6171473860740662, -0.928726315498352, 1.2392956018447876,...
func setupTests() (*clusterHandler, *fakeclient.Client) { xdsC := fakeclient.NewClient() ch := newClusterHandler(&cdsBalancer{xdsClient: xdsC}) return ch, xdsC }
[ 0.35030314326286316, 0.2772176265716553, 0.3325364589691162, -1.0708192586898804, 0.5327497720718384, 0.22750651836395264, 0.6313798427581787, -0.5892757773399353, -0.12408827245235443, -0.3179204761981964, -0.3591075539588928, 0.3168072998523712, -0.7252390384674072, -0.2943461835384369, ...
func (s) TestSuccessCaseLeafNode(t *testing.T) { tests := []struct { name string clusterName string clusterUpdate xdsresource.ClusterUpdate lbPolicy *xdsresource.ClusterLBPolicyRingHash }{ { name: "test-update-root-cluster-EDS-success", clusterName: edsService, clusterUpdate:...
[ 0.966560423374176, 0.17387908697128296, 0.5835279822349548, -0.36814936995506287, 0.16970574855804443, -0.21646785736083984, 0.22422558069229126, -0.32426297664642334, 0.19326309859752655, 0.2565916180610657, -0.10847374051809311, 1.4101879596710205, 0.41001081466674805, -0.603058040142059...
func (s) TestSuccessCaseLeafNodeThenNewUpdate(t *testing.T) { tests := []struct { name string clusterName string clusterUpdate xdsresource.ClusterUpdate newClusterUpdate xdsresource.ClusterUpdate }{ {name: "test-update-root-cluster-then-new-update-EDS-success", clusterName: edsService...
[ 0.26613375544548035, -0.07134338468313217, 0.7682781219482422, -0.3300839364528656, -0.09986912459135056, -0.09218506515026093, -0.3494613468647003, -0.811864972114563, 0.09418907016515732, -0.008792486973106861, 0.03817000985145569, 0.7810953259468079, 0.03865491598844528, -0.003969431389...
func (s) TestUpdateRootClusterAggregateSuccess(t *testing.T) { ch, fakeClient := setupTests() ch.updateRootCluster(aggregateClusterService) ctx, ctxCancel := context.WithTimeout(context.Background(), defaultTestTimeout) defer ctxCancel() gotCluster, err := fakeClient.WaitForWatchCluster(ctx) if err != nil { t....
[ 0.8789675235748291, 0.12028629332780838, 0.84621661901474, -0.011544384062290192, 0.6881837248802185, 0.2267148345708847, 0.5694299340248108, -0.5818279385566711, 0.041366346180438995, -0.28112760186195374, -0.12683415412902832, 0.8065397143363953, -0.26515308022499084, -0.0763133093714714...
func (s) TestUpdateRootClusterAggregateThenChangeChild(t *testing.T) { // This initial code is the same as the test for the aggregate success case, // except without validations. This will get this test to the point where it // can change one of the children. ch, fakeClient := setupTests() ch.updateRootCluster(agg...
[ 0.3513411283493042, -0.08492191880941391, 0.872014582157135, -0.07349740713834763, 0.6501367092132568, -0.4814240634441376, -0.014626064337790012, -1.1259795427322388, 0.4300681948661804, -0.3222009539604187, -0.2704927325248718, 0.5747742652893066, -0.7473945021629333, 0.33304673433303833...
func (s) TestUpdateRootClusterAggregateThenChangeRootToEDS(t *testing.T) { // This initial code is the same as the test for the aggregate success case, // except without validations. This will get this test to the point where it // can update the root cluster to one of type EDS. ch, fakeClient := setupTests() ch.u...
[ 0.6759272813796997, -0.11963152885437012, 0.9411025643348694, 0.08996560424566269, 0.5094788074493408, -0.3496835231781006, 0.1310996413230896, -0.5002152919769287, 0.5363174676895142, -0.12042971700429916, 0.557614803314209, 0.9977694153785706, -0.30882856249809265, 0.3233051896095276, ...
func (s) TestSwitchClusterNodeBetweenLeafAndAggregated(t *testing.T) { // Getting the test to the point where there's a root cluster which is a eds // leaf. ch, fakeClient := setupTests() ch.updateRootCluster(edsService2) ctx, ctxCancel := context.WithTimeout(context.Background(), defaultTestTimeout) defer ctxCan...
[ 0.40781155228614807, 0.22404740750789642, 0.9195296168327332, -0.3847232758998871, 1.054243803024292, -0.0711774230003357, 0.48549094796180725, -0.531624972820282, 0.07296133786439896, -0.565491259098053, 0.210174098610878, 1.1114857196807861, 0.33526208996772766, -0.1280049830675125, -0...
func (s) TestExceedsMaxStackDepth(t *testing.T) { ch, fakeClient := setupTests() ch.updateRootCluster("cluster0") ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) defer cancel() _, err := fakeClient.WaitForWatchCluster(ctx) if err != nil { t.Fatalf("xdsClient.WatchCDS failed with err...
[ 0.5786434412002563, 1.6082707643508911, 0.7333968281745911, 0.007927026599645615, 0.7351060509681702, -0.049398381263017654, 0.6217633485794067, -0.6255425810813904, -0.34150972962379456, -0.5449227690696716, -0.2715822160243988, 0.6883534789085388, -0.3845611810684204, 0.20738089084625244...
func (s) TestDiamondDependency(t *testing.T) { ch, fakeClient := setupTests() ch.updateRootCluster("clusterA") ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) defer cancel() _, err := fakeClient.WaitForWatchCluster(ctx) if err != nil { t.Fatalf("xdsClient.WatchCDS failed with error:...
[ 0.6493445038795471, -0.07941983640193939, 0.9022782444953918, -0.5256249904632568, 0.8174695372581482, 0.13577696681022644, 1.0648216009140015, -0.40306776762008667, 0.37264150381088257, -0.8115141987800598, -0.5683570504188538, 0.48510003089904785, -0.2680310606956482, 0.467286080121994, ...
func (s) TestIgnoreDups(t *testing.T) { ch, fakeClient := setupTests() ch.updateRootCluster("clusterA") ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) defer cancel() _, err := fakeClient.WaitForWatchCluster(ctx) if err != nil { t.Fatalf("xdsClient.WatchCDS failed with error: %v", e...
[ 0.7284008860588074, 0.7080214023590088, 0.9554122090339661, -0.08508357405662537, 0.9532318115234375, 0.11191870272159576, 1.2926965951919556, -0.2909862697124481, -0.0613245889544487, -0.6996372938156128, -0.16011524200439453, 0.21544167399406433, 0.006723116151988506, 0.5851265788078308,...
func (s) TestNodeChildOfItself(t *testing.T) { ch, fakeClient := setupTests() ch.updateRootCluster("clusterA") ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) defer cancel() _, err := fakeClient.WaitForWatchCluster(ctx) if err != nil { t.Fatalf("xdsClient.WatchCDS failed with error:...
[ 0.6136241555213928, -0.21069717407226562, 0.7632212042808533, -0.37561240792274475, 0.9809391498565674, -0.0711384266614914, 1.6419694423675537, -0.8493781089782715, 0.3267541229724884, -0.7254263162612915, -0.8935615420341492, 0.7343733906745911, -0.06225074455142021, 0.2426770180463791, ...
func AddGame(g *Game) (err error) { d := db.Create(g) return d.Error }
[ -1.0808321237564087, 1.0880733728408813, 0.7742822766304016, 0.6225094795227051, 0.86024409532547, 1.2652539014816284, -1.0799933671951294, -0.4728946089744568, -0.7279355525970459, 0.5943341255187988, 0.24333538115024567, -1.12405526638031, -1.3759468793869019, 0.9205909967422485, 0.352...
func GetGameByMintue(mintue int64) (v *Game, err error) { v = &Game{GameMintue: mintue} db.Where("GameMintue = ?", "mintue").First(&v) return v, db.Error }
[ -0.22958387434482574, 0.3621627986431122, 0.6591984629631042, 0.19182302057743073, -0.28209125995635986, 0.1827978938817978, -1.1990138292312622, -1.5317997932434082, -0.7888503670692444, 0.8851100206375122, 0.8066964149475098, -0.6549802422523499, -1.2104332447052002, 0.11693291366100311,...
func New() *Client { return &Client{repeat: false} }
[ -0.39617764949798584, -0.7971417903900146, -0.07579301297664642, -0.23736006021499634, -1.12282133102417, 0.20759549736976624, 0.7706073522567749, -0.41443121433258057, -1.0593771934509277, -0.4047912061214447, -0.8065160512924194, 0.5244435667991638, -0.14218313992023468, -0.7770770788192...
func (c *Client) Set(key string) error { if key == "REPEAT" { c.repeat = true } return nil }
[ -0.872727632522583, 0.8713108897209167, 0.20587092638015747, -0.2111724615097046, -0.2683298587799072, 0.6653332710266113, -0.020890742540359497, -0.7952554225921631, -0.6728428602218628, 1.060097098350525, -1.0350651741027832, 0.6013102531433105, -0.869800865650177, 0.22617107629776, -0...
func (c *Client) Option(string) error { return nil }
[ 0.06752990186214447, 0.023499688133597374, 0.23921304941177368, 0.4867890179157257, 0.30000731348991394, 0.4688047468662262, 0.831829309463501, -0.5029693841934204, 0.40710675716400146, -0.016375022009015083, -0.5741358399391174, -0.03701165318489075, -0.5782628059387207, -0.15897315740585...
func (c *Client) GetPIN() (string, error) { pw, err := termio.AskForPassword(context.TODO(), "your PIN", c.repeat) if err != nil { return "", fmt.Errorf("failed to ask for PIN: %w", err) } return pw, nil }
[ -0.39288297295570374, 0.6361039280891418, 0.6286354064941406, 0.8120967149734497, -0.13273203372955322, 0.6761663556098938, 0.44670990109443665, -0.5828474164009094, -0.08342910557985306, -0.25132137537002563, 0.12498580664396286, 0.769145667552948, -0.6766627430915833, -0.3526277244091034...
func LoadConfig() *Service { cfg := &Service{} cfg.readConfigFileFromDisk(nodesFileName) return cfg }
[ 0.6195877194404602, 0.080080047249794, 0.24116924405097961, -0.1746797114610672, -0.5373184084892273, -0.37095004320144653, -0.2252483069896698, 0.08310986310243607, -1.29354727268219, -0.03241797536611557, 0.35559260845184326, 0.3582612872123718, -0.5670429468154907, 0.5760940909385681, ...
func Create(rows, cols int) (grid Grid) { grid = make([][]*Point, rows) for i := range grid { grid[i] = make([]*Point, cols) } for row := 0; row < rows; row++ { for col := 0; col < cols; col++ { point := Point{row, col} grid[row][col] = &point } } return }
[ 0.16276957094669342, 0.8322200179100037, 0.3944835066795349, 0.11215972900390625, 0.14073890447616577, 0.17639978229999542, -0.8311898112297058, -0.5841662287712097, -0.6204934120178223, 0.6794858574867249, 0.5266258120536804, -0.014528747648000717, 0.10106474906206131, 0.46857261657714844...
func (m Db) Get(i int) architecture.Person { return m[i] }
[ -1.2237207889556885, 0.09309447556734085, 0.2955227494239807, -0.5675532221794128, 0.07380915433168411, 0.18016991019248962, -0.006162391044199467, -0.07043406367301941, -0.3186071217060089, -0.3679257929325104, -0.6414573192596436, 0.029237134382128716, -0.23219168186187744, -0.7127398252...
func (m Db) Post(i int, p architecture.Person) { m[i] = p }
[ -0.6904229521751404, 0.23241619765758514, 0.30712777376174927, -0.14069627225399017, -0.5321169495582581, 1.0427507162094116, -0.10024994611740112, 0.3401484489440918, -0.45049232244491577, -0.4955800473690033, -1.1344377994537354, -0.9109605550765991, -0.7757962942123413, -0.2871183753013...
func atoi(s string) int { d, _ := strconv.Atoi(s) return d }
[ 0.029829533770680428, -0.8715465068817139, 0.19701257348060608, -0.9579064249992371, -1.4416000843048096, -0.5907065272331238, 0.2072267383337021, 0.4301634132862091, -1.2447028160095215, 0.4239129424095154, -0.8853154182434082, 0.36620596051216125, 0.6039894819259644, -1.2619783878326416,...
func (r *queryResolver) Node(ctx context.Context, id int) (ent.Noder, error) { return ent.FromContext(ctx).Noder(ctx, id) }
[ -0.9787407517433167, 0.13744255900382996, 0.17371082305908203, -0.850024938583374, 0.014484422281384468, -0.25445786118507385, -1.156893253326416, -0.3345654606819153, 0.832878589630127, -0.3954998254776001, 0.18909341096878052, -0.2109738439321518, 0.14268186688423157, 0.22782190144062042...
func (r *queryResolver) Nodes(ctx context.Context, ids []int) ([]ent.Noder, error) { return ent.FromContext(ctx).Noders(ctx, ids) }
[ -1.4317823648452759, 0.13564233481884003, 0.04089832305908203, -1.1189954280853271, 0.7808835506439209, -0.4622456729412079, -0.9822712540626526, -0.22200854122638702, 0.27122554183006287, 0.0794101282954216, 0.1324879229068756, -0.1488930881023407, -0.11286918073892593, -0.165881037712097...
func (r *queryResolver) GithubAssets(ctx context.Context, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.GithubAssetOrder, where *ent.GithubAssetWhereInput) (*ent.GithubAssetConnection, error) { return ent.FromContext(ctx).GithubAsset.Query().Paginate( ctx, after, first, b...
[ -0.5302610993385315, 0.1035819873213768, 0.5689116716384888, -0.532058596611023, -0.4266781508922577, -0.14910174906253815, 0.03902683034539223, -0.8010702729225159, -0.13887883722782135, -0.16792945563793182, -0.28166478872299194, -0.10437726229429245, -0.5351585149765015, -0.539010822772...
func (r *queryResolver) GithubEvents(ctx context.Context, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.GithubEventOrder, where *ent.GithubEventWhereInput) (*ent.GithubEventConnection, error) { return ent.FromContext(ctx).GithubEvent.Query().Paginate( ctx, after, first, b...
[ 0.04954501986503601, -0.03359074145555496, 0.5349669456481934, -0.3117622435092926, 0.03669644892215729, -0.5963976383209229, 0.027331629768013954, 0.4053398668766022, -0.09087862819433212, 0.09962855279445648, -0.34279704093933105, 0.48367875814437866, -0.7698111534118652, -0.169299349188...
func (r *queryResolver) GithubGists(ctx context.Context, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.GithubGistOrder, where *ent.GithubGistWhereInput) (*ent.GithubGistConnection, error) { return ent.FromContext(ctx).GithubGist.Query().Paginate( ctx, after, first, before...
[ -0.6174332499504089, 0.7377353310585022, 0.4260043203830719, -0.569826602935791, -0.09078685939311981, -0.1879006028175354, -0.1821913868188858, 0.3403126895427704, -0.265394389629364, 0.22506128251552582, -0.3094916343688965, 0.7409238815307617, -1.0898257493972778, 0.010989013127982616, ...
func (r *queryResolver) GithubReleases(ctx context.Context, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.GithubReleaseOrder, where *ent.GithubReleaseWhereInput) (*ent.GithubReleaseConnection, error) { return ent.FromContext(ctx).GithubRelease.Query().Paginate( ctx, after...
[ -0.4668581485748291, -0.3073580861091614, 0.3516455888748169, -0.7454159259796143, -0.10544047504663467, -0.5659265518188477, -0.9543594717979431, 0.08396901190280914, -0.25740984082221985, 0.29675188660621643, -0.2640707790851593, 0.22856606543064117, -0.6378549337387085, -0.0728120356798...
func (r *queryResolver) GithubRepositories(ctx context.Context, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.GithubRepositoryOrder, where *ent.GithubRepositoryWhereInput) (*ent.GithubRepositoryConnection, error) { return ent.FromContext(ctx).GithubRepository.Query().Pagina...
[ -0.7357981204986572, 0.21196791529655457, 0.3810819089412689, -0.7165683507919312, -0.06424417346715927, -0.7680447697639465, -0.549382209777832, 0.30068281292915344, -0.1178051233291626, -0.024663716554641724, -0.12292386591434479, -0.24063673615455627, -0.9130399823188782, 0.239791736006...
func (r *queryResolver) Labels(ctx context.Context, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.LabelOrder, where *ent.LabelWhereInput) (*ent.LabelConnection, error) { return ent.FromContext(ctx).Label.Query().Paginate( ctx, after, first, before, last, ent.WithLabelOr...
[ -0.8668760657310486, -0.5186635255813599, 0.5484539270401001, -1.1220753192901611, -0.10869599878787994, -0.5292903780937195, -1.057700276374817, -0.3738924264907837, -0.47090041637420654, 0.0117533253505826, 0.6573392152786255, -0.8088158965110779, -0.24715924263000488, -0.326461702585220...
func (r *queryResolver) Posts(ctx context.Context, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.PostOrder, where *ent.PostWhereInput) (*ent.PostConnection, error) { conn, err := ent.FromContext(ctx).Post.Query().Paginate( ctx, after, first, before, last, ent.WithPostOr...
[ -0.30927228927612305, 0.4925171136856079, 0.6421366930007935, -0.29647934436798096, 0.16581615805625916, -0.8113207221031189, -0.6658999919891357, -0.03861074522137642, -0.6986060738563538, -0.7354384064674377, 0.5443170666694641, -0.6835947036743164, -0.7687838077545166, 0.151462823152542...
func (r *queryResolver) Users(ctx context.Context, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.UserOrder, where *ent.UserWhereInput) (*ent.UserConnection, error) { return ent.FromContext(ctx).User.Query().Paginate( ctx, after, first, before, last, ent.WithUserOrder(or...
[ -1.2776225805282593, -0.25930988788604736, 0.5670689940452576, -0.3787064254283905, -0.3979514241218567, -0.9866461157798767, -0.2045183777809143, -0.42388394474983215, -0.4900549352169037, -0.2369532585144043, 0.23520345985889435, -0.2320312112569809, 0.07160725444555283, -0.2403395622968...
func (r *Resolver) Query() gqlhandler.QueryResolver { return &queryResolver{r} }
[ 0.8590191006660461, -0.5392197370529175, -0.01586172543466091, 0.15361404418945312, -0.35635167360305786, 0.23565606772899628, -0.558141827583313, -0.05785302072763443, 0.5139787197113037, -1.4223005771636963, 0.1906701624393463, -0.6317273378372192, -0.15328028798103333, -0.10537400841712...
func newDontHaveTimeoutMgr(pc PeerConnection, onDontHaveTimeout func([]cid.Cid)) *dontHaveTimeoutMgr { return newDontHaveTimeoutMgrWithParams(pc, onDontHaveTimeout, dontHaveTimeout, latencyMultiplier, maxExpectedWantProcessTime) }
[ -0.41453981399536133, -0.25203418731689453, 0.2705216109752655, -0.11848576366901398, 0.3501790761947632, 0.25684571266174316, -0.6850627660751343, -0.14589618146419525, -0.5031951069831848, 0.8688280582427979, 0.18928983807563782, -0.644298791885376, -0.6475754976272583, 0.686186194419860...
func newDontHaveTimeoutMgrWithParams(pc PeerConnection, onDontHaveTimeout func([]cid.Cid), defaultTimeout time.Duration, latencyMultiplier int, maxExpectedWantProcessTime time.Duration) *dontHaveTimeoutMgr { ctx, shutdown := context.WithCancel(context.Background()) mqp := &dontHaveTimeoutMgr{ ctx: ...
[ -0.13003069162368774, -0.34196096658706665, 0.6206880211830139, -0.4438023269176483, 0.2610444724559784, 0.14565271139144897, -0.8610109686851501, -0.1082935631275177, -0.3891918957233429, 0.8306804895401001, 0.30966904759407043, -0.4482039511203766, -0.7812969088554382, 0.919620931148529,...
func (dhtm *dontHaveTimeoutMgr) Shutdown() { dhtm.shutdown() dhtm.lk.Lock() defer dhtm.lk.Unlock() // Clear any pending check for timeouts if dhtm.checkForTimeoutsTimer != nil { dhtm.checkForTimeoutsTimer.Stop() } }
[ -0.4794984757900238, 0.06251614540815353, 0.40855351090431213, -0.09633534401655197, 0.8651629686355591, 0.6358881592750549, 0.3467486500740051, 0.25052303075790405, -0.03402446210384369, 0.49329718947410583, 0.6916623711585999, -0.009237870573997498, -0.3293180763721466, 1.200527071952819...
func (dhtm *dontHaveTimeoutMgr) Start() { dhtm.lk.Lock() defer dhtm.lk.Unlock() // Make sure the dont have timeout manager hasn't already been started if dhtm.started { return } dhtm.started = true // If we already have a measure of latency to the peer, use it to // calculate a reasonable timeout latency :...
[ 0.010543652810156345, 0.2900972068309784, 0.4628410041332245, -0.1920762062072754, 0.320455402135849, 0.03861641511321068, -0.6373592019081116, 0.9772466421127319, -0.33012619614601135, 0.29530075192451477, 0.0148708401247859, -0.060812827199697495, -0.5083345174789429, 1.1967006921768188,...
func (dhtm *dontHaveTimeoutMgr) measureLatency() { // Wait up to defaultTimeout for a response to the ping ctx, cancel := context.WithTimeout(dhtm.ctx, dhtm.defaultTimeout) defer cancel() // Ping the peer res := dhtm.peerConn.Ping(ctx) if res.Error != nil { // If there was an error, we'll just leave the timeou...
[ -0.4426255226135254, 0.4263435900211334, 0.4505584239959717, -0.8637953400611877, 0.4785458743572235, -0.6086062788963318, -0.6923757195472717, 0.7149395942687988, -0.32192933559417725, 0.4949891269207001, -0.018947310745716095, -0.6227437257766724, -0.6302973628044128, 0.7199375033378601,...
func (dhtm *dontHaveTimeoutMgr) checkForTimeouts() { if len(dhtm.wantQueue) == 0 { return } // Figure out which of the blocks that were wanted were not received // within the timeout expired := make([]cid.Cid, 0, len(dhtm.activeWants)) for len(dhtm.wantQueue) > 0 { pw := dhtm.wantQueue[0] // If the want i...
[ 0.3876711428165436, -0.3993205428123474, 0.6485506892204285, -0.5907245874404907, -0.3240025043487549, -0.5383771657943726, -0.22850249707698822, 0.3187750279903412, -0.5805680751800537, -0.1528024971485138, 0.3072913885116577, 0.173646479845047, -0.5827860832214355, 1.3688409328460693, ...
func (dhtm *dontHaveTimeoutMgr) AddPending(ks []cid.Cid) { if len(ks) == 0 { return } start := time.Now() dhtm.lk.Lock() defer dhtm.lk.Unlock() queueWasEmpty := len(dhtm.activeWants) == 0 // Record the start time for each key for _, c := range ks { if _, ok := dhtm.activeWants[c]; !ok { pw := pending...
[ -1.185795545578003, -0.5506530404090881, 0.7863188982009888, 0.06746171414852142, -0.005684696137905121, 0.19238875806331635, -0.6585668921470642, 0.30824506282806396, -0.5344673991203308, 0.6529797911643982, 0.4740491807460785, -0.411539763212204, -0.26172614097595215, 1.2800025939941406,...
func (dhtm *dontHaveTimeoutMgr) CancelPending(ks []cid.Cid) { dhtm.lk.Lock() defer dhtm.lk.Unlock() // Mark the wants as cancelled for _, c := range ks { if pw, ok := dhtm.activeWants[c]; ok { pw.active = false delete(dhtm.activeWants, c) } } }
[ -0.17123118042945862, -1.2577284574508667, 0.27623680233955383, 0.12850090861320496, -0.5410276651382446, 0.6904060244560242, -0.2815054953098297, 0.6639465093612671, -0.7584601044654846, 0.5139667987823486, 0.19989609718322754, -0.016743287444114685, -0.5246686935424805, 0.659894526004791...
func (dhtm *dontHaveTimeoutMgr) fireTimeout(pending []cid.Cid) { // Make sure the timeout manager has not been shut down if dhtm.ctx.Err() != nil { return } // Fire the timeout dhtm.onDontHaveTimeout(pending) }
[ 0.1664413958787918, 0.0931415930390358, 0.15635371208190918, 0.39492711424827576, 0.5039703845977783, 0.4223310053348541, -0.4113682210445404, 0.7657812833786011, -0.17555299401283264, 0.6467986702919006, -0.21892455220222473, -0.24619002640247345, -0.36880382895469666, 1.252375602722168, ...
func (dhtm *dontHaveTimeoutMgr) calculateTimeoutFromLatency(latency time.Duration) time.Duration { // The maximum expected time for a response is // the expected time to process the want + (latency * multiplier) // The multiplier is to provide some padding for variable latency. return dhtm.maxExpectedWantProcessTim...
[ 0.10024148225784302, 0.06008920446038246, 0.4999684989452362, -0.8485080599784851, -0.4471299946308136, -0.19102375209331512, -0.6831448674201965, 0.0898895412683487, 0.5177522897720337, 0.3807123899459839, -0.25273680686950684, -0.8804834485054016, -0.15148508548736572, 0.638681173324585,...
func (c *TasksConfig) Combine(configs ...TasksConfig) { if c.DefaultTasks.Tasks == nil { c.DefaultTasks.Tasks = make(map[string]SingleDefaultTaskConfig) } for _, cfg := range configs { // DefaultTask resolvers are appended c.DefaultTasks.DefaultResolvers = append(c.DefaultTasks.DefaultResolvers, cfg.DefaultTa...
[ -0.3727448582649231, 0.3369368314743042, 0.48463332653045654, 0.7656205296516418, 1.0889664888381958, -0.386019229888916, 0.5946508646011353, 0.06446964293718338, -0.11962009221315384, 0.5848862528800964, -0.7004228830337524, -0.7803177833557129, -0.108368881046772, 0.435977041721344, -0...
func RunningInUserNS() bool { return false }
[ -1.6005996465682983, -0.5131272077560425, 0.4082735478878021, 0.9669302701950073, -0.9631774425506592, 1.6111652851104736, 0.36520543694496155, 0.9394882917404175, -0.8506114482879639, -0.973212718963623, -0.4037802517414093, 0.19304221868515015, -1.6414498090744019, -1.085935115814209, ...
func New_kafka_producer(brokers []string) (sarama.SyncProducer, error) { if len(brokers) == 0 { err := errors.New("Invalid broker information provided") log.Error(err) return nil, err } log.Infof("RequestProcessor: new_kafka_producer: start") config := sarama.NewConfig() config.Producer.RequiredAcks = sarama...
[ 0.0801105871796608, -0.4142754375934601, 0.7129223942756653, 1.1332159042358398, -1.2467851638793945, -0.576801598072052, 0.038696762174367905, 0.3672521710395813, 0.508258581161499, 1.1012086868286133, 0.20219017565250397, 0.007256504148244858, -0.7670329213142395, -0.3125493824481964, ...
func New_kafka_consumer(brokers []string) (sarama.Consumer, error) { if len(brokers) == 0 { err := errors.New("Invalid broker information provided") log.Error(err) return nil, err } log.Infof("RequestProcessor: new_kafka_consumer: start") config := sarama.NewConfig() log.Infof("Consumer Config: %v\n", config...
[ 0.4332103431224823, -0.9536116719245911, 0.7447558045387268, 0.9468380808830261, -1.0752736330032349, -0.5513387322425842, 0.40311312675476074, 0.18301580846309662, -0.18172387778759003, 1.2401601076126099, 0.3102089464664459, 0.3188617527484894, -0.35527482628822327, 0.08983010798692703, ...
func GetDeploymentCondition(status apps_v1.DeploymentStatus, condType apps_v1.DeploymentConditionType) *apps_v1.DeploymentCondition { for i := range status.Conditions { c := status.Conditions[i] if c.Type == condType { return &c } } return nil }
[ 0.38942867517471313, -1.1074399948120117, 0.3429909348487854, 0.16388960182666779, -0.48128676414489746, 0.022245673462748528, -0.15069851279258728, -0.0551261305809021, -0.2013692408800125, 1.061271071434021, 0.7965466380119324, 0.8319652676582336, 0.28004851937294006, 0.8657965064048767,...
func Setup(w, h int, spritesheet, title string) error { width = w height = h var err error //load spritesheet first so we can infer tileSize image, err := sdl.LoadBMP(spritesheet) if err != nil { return errors.New("Failed to load image: " + fmt.Sprint(sdl.GetError())) } defer image.Free() image.SetColorKey...
[ 0.0016662589041516185, 0.7161769866943359, 1.158181071281433, -0.18792614340782166, 0.23600438237190247, 0.02918056771159172, 0.4193100929260254, -0.35451430082321167, 0.002384049817919731, 0.16127675771713257, 0.08863422274589539, 0.40146976709365845, -0.15855541825294495, 0.8364350795745...
func makeRect(x, y, w, h int) sdl.Rect { return sdl.Rect{int32(x), int32(y), int32(w), int32(h)} }
[ 0.3574671149253845, 0.9005659818649292, 0.48005807399749756, -1.0484240055084229, -1.3458061218261719, 0.7946589589118958, -0.7521796822547913, -0.971295952796936, -0.23767589032649994, -0.6237781643867493, 0.15284720063209534, -0.04080074653029442, 0.32014620304107666, -1.0709906816482544...
func DrawBorder(x, y, z, w, h int, title string, focused bool) { bc := BorderColour1 if !focused { bc = BorderColour2 } for i := 0; i < w; i++ { ChangeGridPoint(x+i, y-1, z, 0xc4, bc, 0xFF000000) ChangeGridPoint(x+i, y+h, z, 0xc4, bc, 0xFF000000) } for i := 0; i < h; i++ { ChangeGridPoint(x-1, y+i, z, 0xb...
[ 0.336842805147171, 0.2490326166152954, 0.927791178226471, -0.1391971856355667, -0.035459164530038834, 0.49748849868774414, -0.3979035019874573, -0.6571246385574341, 0.28148722648620605, -0.09091122448444366, -0.5455282330513, 0.9887245297431946, -0.8416580557823181, 0.5250386595726013, 0...
func Clear(rect ...int) { offX, offY, w, h := 0, 0, width, height if len(rect) == 4 { offX, offY, w, h = rect[0], rect[1], rect[2], rect[3] } for i := 0; i < w*h; i++ { x := offX + i%w y := offY + i/w grid[y*width+x].Clear() } }
[ -0.41718778014183044, 0.8695790767669678, 0.7035724520683289, -0.01372728031128645, -0.26835256814956665, 0.828795313835144, -0.040138665586709976, -1.7464118003845215, 0.052284710109233856, 0.012203375808894634, 0.2523384988307953, -0.4807223677635193, 0.294785737991333, 0.156290367245674...
func (c *User) HasID() bool { return c.ID > 0 }
[ 0.796013593673706, -0.10398083925247192, 0.4495665431022644, 1.205620527267456, 0.37448737025260925, 0.9730458855628967, -0.5836368203163147, 0.4745557904243469, 0.6364888548851013, -0.8790900707244873, -0.24839672446250916, -0.5164070129394531, -0.8607444763183594, 0.867328405380249, -0...
func (c Users) IsEmpty() bool { return len(c) == 0 }
[ -1.229645013809204, 0.17951366305351257, 0.1873854100704193, 0.4440414607524872, 1.2715237140655518, 0.5225247740745544, -0.09798216074705124, 0.2399214208126068, 0.046568043529987335, 0.03310738131403923, -0.384368896484375, 0.7405464053153992, -0.8506907224655151, 0.2618202567100525, -...
func NewOracleDatabaseStateStore(logger logger.Logger) state.Store { dba := newOracleDatabaseAccess(logger) s := newOracleDatabaseStateStore(logger, dba) s.BulkStore = state.NewDefaultBulkStore(s) return s }
[ 0.3100736737251282, 0.5334937572479248, 0.23041920363903046, -1.238152027130127, -0.09673038870096207, -0.6893609166145325, -0.055024899542331696, 0.06784137338399887, 1.4887804985046387, -0.0754174068570137, -0.32714876532554626, 0.026588141918182373, -0.1538071185350418, -0.9372122883796...
func newOracleDatabaseStateStore(logger logger.Logger, dba dbAccess) *OracleDatabase { return &OracleDatabase{ features: []state.Feature{ state.FeatureETag, state.FeatureTransactional, state.FeatureTTL, }, logger: logger, dbaccess: dba, } }
[ -0.015386544167995453, 0.38116636872291565, 0.11967542767524719, -1.1610314846038818, -0.4386814534664154, -0.4695846140384674, -0.07260386645793915, 0.09807082265615463, 1.458566427230835, 0.31519225239753723, -0.5239648818969727, -0.3982146084308624, -0.15628507733345032, -0.987893760204...
func (o *OracleDatabase) Init(ctx context.Context, metadata state.Metadata) error { return o.dbaccess.Init(ctx, metadata) }
[ -0.5895733833312988, 0.7207005620002747, 0.2516685426235199, -0.7010654211044312, 0.09629429131746292, 0.8030927777290344, -0.3815075755119324, 0.22191296517848969, 0.5299275517463684, 0.9254054427146912, 0.3677874803543091, 0.9286041259765625, 0.5615526437759399, -0.25819894671440125, 0...
func (o *OracleDatabase) Features() []state.Feature { return o.features }
[ -0.5211665034294128, 0.24683749675750732, 0.2013493776321411, -0.15099865198135376, 1.4113162755966187, -0.21276789903640747, -0.263902485370636, 0.5813260078430176, 1.6558928489685059, -0.15430572628974915, -1.1530799865722656, 0.6760370135307312, 0.04000941663980484, -0.01822477579116821...
func (o *OracleDatabase) Delete(ctx context.Context, req *state.DeleteRequest) error { return o.dbaccess.Delete(ctx, req) }
[ -0.4590601921081543, 0.8608206510543823, 0.2697742283344269, 0.16855229437351227, 0.987448513507843, 0.39081892371177673, 0.20268358290195465, 0.0907960832118988, 1.835431456565857, 0.77777099609375, 0.4780512750148773, 0.6015022993087769, -0.3642672300338745, 0.32053858041763306, 0.2827...
func (o *OracleDatabase) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error) { return o.dbaccess.Get(ctx, req) }
[ -1.0627163648605347, 0.7620700001716614, 0.38513949513435364, -0.4724181890487671, 1.0222398042678833, -0.17447255551815033, -0.2664748430252075, -0.28525659441947937, 1.2383826971054077, 0.5474955439567566, 0.830939531326294, 0.9926784038543701, -0.1072656661272049, -0.05383843183517456, ...
func (o *OracleDatabase) Set(ctx context.Context, req *state.SetRequest) error { return o.dbaccess.Set(ctx, req) }
[ -1.3520292043685913, 0.6093382239341736, 0.20320668816566467, -0.3738161623477936, 0.7525933384895325, 0.41760551929473877, 0.01949506253004074, -0.5014306306838989, 0.9658340811729431, 0.9211327433586121, 0.2417934685945511, 0.6884739995002747, 0.17277474701404572, 0.36222007870674133, ...
func (o *OracleDatabase) Multi(ctx context.Context, request *state.TransactionalStateRequest) error { return o.dbaccess.ExecuteMulti(ctx, request.Operations) }
[ -1.7008768320083618, 1.1984801292419434, 0.5491763353347778, 0.6546270847320557, 0.5002290606498718, -0.10951349139213562, -0.12281038612127304, -0.4655250012874603, 0.7398489713668823, 0.2816406488418579, 0.47093507647514343, -1.3845700025558472, 0.8136707544326782, 0.0757104828953743, ...
func (o *OracleDatabase) getDB() *sql.DB { return o.dbaccess.(*oracleDatabaseAccess).db }
[ 0.40041276812553406, 0.8538036346435547, 0.4630175530910492, 0.8983115553855896, 0.1964723914861679, 0.39009127020835876, 0.9114285707473755, -0.5401009321212769, 1.3374223709106445, -0.20378899574279785, 1.251529574394226, 0.9582189917564392, 0.4385259747505188, 0.26757195591926575, 1.4...
func fetch(url string, ch chan<- string) { start := time.Now() if !strings.HasPrefix(url, "http://") { url = "http://" + url } resp, err := http.Get(url) if err != nil { ch <- fmt.Sprint(err) return } nbytes, err := io.Copy(ioutil.Discard, resp.Body) resp.Body.Close() if err != nil { ch <- fmt.Sprin...
[ 0.35246241092681885, -0.6093832850456238, 0.6557030081748962, -0.9946568608283997, -0.5060939192771912, 0.49939894676208496, -1.0690709352493286, 0.10703131556510925, -0.011487478390336037, 0.24278101325035095, -0.24631720781326294, 1.2932422161102295, 0.842802882194519, 1.33828866481781, ...
func fetchall(urls []string) { ch := make(chan string) for _, url := range urls { go fetch(url, ch) } for range urls { fmt.Println(<-ch) } }
[ 0.6791150569915771, -0.06447219103574753, 0.41467854380607605, 0.1368994414806366, 0.03731765225529671, 0.6620124578475952, -0.4677483141422272, -0.47226396203041077, -0.28220927715301514, -0.033035945147275925, -0.0065932851284742355, 1.1683108806610107, 0.15245236456394196, 1.36839461326...
func (lq *LocationQuery) Where(ps ...predicate.Location) *LocationQuery { lq.predicates = append(lq.predicates, ps...) return lq }
[ 0.15224331617355347, -0.7980470061302185, 0.31114763021469116, -0.4033346474170685, -0.05724025517702103, 1.1693960428237915, -0.37590453028678894, 0.5336032509803772, -0.5729461312294006, -0.5415428876876831, 0.5436006188392639, 0.5940521955490112, 0.35219278931617737, 0.00141743524000048...
func (lq *LocationQuery) Limit(limit int) *LocationQuery { lq.limit = &limit return lq }
[ -0.3492245078086853, -0.18884596228599548, 0.43619856238365173, -0.29964178800582886, -0.15460650622844696, 1.0251997709274292, 0.30195483565330505, 1.1061187982559204, 0.99531090259552, -0.740715742111206, 0.3818238377571106, 0.2477257251739502, -0.3499220609664917, -0.5203414559364319, ...
func (lq *LocationQuery) Offset(offset int) *LocationQuery { lq.offset = &offset return lq }
[ -0.03776412457227707, -0.5411540865898132, 0.2259092628955841, -0.6322129368782043, -1.0984313488006592, 2.13081955909729, 0.6490792036056519, 1.464101791381836, 0.8625232577323914, -0.6019094586372375, 0.09542392939329147, 0.40362682938575745, 0.17014288902282715, 0.13653096556663513, -...
func (lq *LocationQuery) Order(o ...Order) *LocationQuery { lq.order = append(lq.order, o...) return lq }
[ -0.4760950803756714, -0.39028239250183105, 0.4708537459373474, 0.7719752192497253, 0.5434598922729492, 1.052519679069519, -0.9448408484458923, 0.32104483246803284, 0.2191360890865326, -0.2418564260005951, -0.15523506700992584, -0.01513696275651455, 0.6395702362060547, 0.600563645362854, ...