text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (e PreemptionEdges) UserIDOrErr() (*User, error) { if e.loadedTypes[0] { if e.UserID == nil { // The edge User_ID was loaded in eager-loading, // but was not found. return nil, &NotFoundError{label: user.Label} } return e.UserID, nil } return nil, &NotLoadedError{edge: "User_ID"} }
[ -0.05360373109579086, -0.5001301765441895, 0.47313132882118225, 0.03699781000614166, -0.2146831899881363, 0.685451865196228, 0.8111769556999207, 0.16937798261642456, 0.8901289701461792, 0.3629585802555084, 0.44653981924057007, -0.4286625385284424, -0.3048214614391327, 1.013489842414856, ...
func (e PreemptionEdges) PurposeIDOrErr() (*Purpose, error) { if e.loadedTypes[1] { if e.PurposeID == nil { // The edge PurposeID was loaded in eager-loading, // but was not found. return nil, &NotFoundError{label: purpose.Label} } return e.PurposeID, nil } return nil, &NotLoadedError{edge: "PurposeID...
[ -0.6631521582603455, -0.13277702033519745, 0.44605696201324463, -0.5282883048057556, 0.1517729014158249, -0.1170492023229599, 0.4012191891670227, 0.17125122249126434, 0.7777641415596008, 0.9699153304100037, 0.5627433657646179, -0.04750432074069977, -0.11651697754859924, 1.1493299007415771,...
func (e PreemptionEdges) RoomIDOrErr() (*Roominfo, error) { if e.loadedTypes[2] { if e.RoomID == nil { // The edge RoomID was loaded in eager-loading, // but was not found. return nil, &NotFoundError{label: roominfo.Label} } return e.RoomID, nil } return nil, &NotLoadedError{edge: "RoomID"} }
[ -0.6139523983001709, -0.7906987071037292, 0.5344213843345642, -0.026173625141382217, -0.34946611523628235, 0.7450566291809082, 0.2923699617385864, 0.19104717671871185, 0.5768783092498779, 0.37962254881858826, 0.39229562878608704, -0.17821836471557617, -0.3657546937465668, 1.541904807090759...
func (*Preemption) scanValues() []interface{} { return []interface{}{ &sql.NullInt64{}, // id &sql.NullTime{}, // PreemptTime &sql.NullString{}, // Phonenumber &sql.NullString{}, // Surrogateid &sql.NullString{}, // Surrogatephone } }
[ -0.9832271337509155, 0.7171463966369629, 0.39026159048080444, 0.4799381196498871, -0.21672210097312927, -0.1680973768234253, -0.7033833861351013, -0.23933617770671844, 0.4062210023403168, -0.6323060393333435, -0.18724891543388367, -0.14541840553283691, -0.27163466811180115, 1.7852029800415...
func (*Preemption) fkValues() []interface{} { return []interface{}{ &sql.NullInt64{}, // PurposeID &sql.NullInt64{}, // RoomID &sql.NullInt64{}, // USER_ID } }
[ -0.41347795724868774, 0.9645738005638123, 0.4131906032562256, 0.9509955048561096, 0.48813387751579285, -0.7095933556556702, 0.1378931701183319, 0.34897106885910034, 0.01952539198100567, -0.2240612953901291, -0.12145072221755981, -0.29139599204063416, -0.39873191714286804, 1.905890345573425...
func (pr *Preemption) assignValues(values ...interface{}) error { if m, n := len(values), len(preemption.Columns); m < n { return fmt.Errorf("mismatch number of scan values: %d != %d", m, n) } value, ok := values[0].(*sql.NullInt64) if !ok { return fmt.Errorf("unexpected type %T for field id", value) } pr.ID ...
[ -1.0588003396987915, 0.3754102885723114, 0.7341901063919067, 0.0014870326267555356, 0.4374598562717438, 0.11530568450689316, 0.23135662078857422, -0.14263081550598145, 0.40338703989982605, 0.308330237865448, 0.3850388824939728, -0.5569530129432678, 0.07941310852766037, 1.2315558195114136, ...
func (pr *Preemption) QueryUserID() *UserQuery { return (&PreemptionClient{config: pr.config}).QueryUserID(pr) }
[ 0.7504898905754089, 0.29650700092315674, 0.2383638620376587, 0.35547304153442383, -0.1516459435224533, 0.654840350151062, 0.9696961045265198, 0.7407417893409729, 0.36212125420570374, -0.4771464467048645, 0.2845723628997803, 0.6092392206192017, -0.7967365980148315, 0.8251954317092896, -1....
func (pr *Preemption) QueryPurposeID() *PurposeQuery { return (&PreemptionClient{config: pr.config}).QueryPurposeID(pr) }
[ 0.2258450984954834, 0.81194007396698, 0.5179486274719238, 0.09265977144241333, 0.43408557772636414, -0.08719385415315628, 0.27415451407432556, 0.6112530827522278, 0.4162159264087677, 0.3565062880516052, 0.39899811148643494, 0.6404052376747131, -0.6378356218338013, 0.7160691022872925, -0....
func (pr *Preemption) QueryRoomID() *RoominfoQuery { return (&PreemptionClient{config: pr.config}).QueryRoomID(pr) }
[ 0.39841726422309875, 0.10532208532094955, 0.2504642903804779, 0.2666586935520172, 0.06498932093381882, 0.39637038111686707, 0.3890334963798523, 0.37377336621284485, 0.4251469075679779, -0.22378912568092346, 0.31964385509490967, 0.6786568760871887, -0.8868281841278076, 1.5389405488967896, ...
func (pr *Preemption) Update() *PreemptionUpdateOne { return (&PreemptionClient{config: pr.config}).UpdateOne(pr) }
[ -0.3832211494445801, 0.11039606481790543, 0.2397294044494629, 0.1535215675830841, 0.4060952067375183, 0.49786972999572754, 0.450869619846344, 0.5502452254295349, 0.18561086058616638, 0.42331668734550476, -0.19647254049777985, -0.253858745098114, -1.6564414501190186, 0.2294899821281433, -...
func (pr *Preemption) Unwrap() *Preemption { tx, ok := pr.config.driver.(*txDriver) if !ok { panic("ent: Preemption is not a transactional entity") } pr.config.driver = tx.drv return pr }
[ -0.8722499012947083, 0.6768308877944946, 0.44967713952064514, -0.5212475061416626, 0.2282070517539978, -0.03334807977080345, 0.5016174912452698, 1.0256417989730835, 0.08388414233922958, 0.5905693769454956, 0.6513006687164307, 0.08382853865623474, 0.11673296988010406, -0.14930962026119232, ...
func (pr *Preemption) String() string { var builder strings.Builder builder.WriteString("Preemption(") builder.WriteString(fmt.Sprintf("id=%v", pr.ID)) builder.WriteString(", PreemptTime=") builder.WriteString(pr.PreemptTime.Format(time.ANSIC)) builder.WriteString(", Phonenumber=") builder.WriteString(pr.Phonenu...
[ -0.5161908864974976, -0.47369295358657837, 0.5339300632476807, -0.716729998588562, -0.027778353542089462, 0.9861370325088501, 0.24046534299850464, -0.6599550247192383, -0.19463887810707092, 0.263947993516922, -0.1520981788635254, 0.31596481800079346, -0.7212917804718018, -0.091430917382240...
func startQuiz(quizzArr [][]string, limit int) { reader := bufio.NewReader(os.Stdin) for i, q := range quizzArr { if i == limit { os.Exit(0) } fmt.Println("\n>> What is", q[0]) userAnswer, _ := reader.ReadString('\n') userAnswer = strings.TrimRight(userAnswer, "\n") if userAnswer == q[1] { fmt.Prin...
[ -0.07685588300228119, -1.2905343770980835, 0.840393602848053, 0.9504364132881165, -0.46474143862724304, 0.8694964647293091, 0.6193172335624695, -0.3466518521308899, 0.04439763352274895, 0.1621774584054947, 0.45551177859306335, 1.1875388622283936, -0.4996505379676819, -0.3128686845302582, ...
func getFlags() (timePtr *int, limitPtr *int) { limitPtr = flag.Int("limit", 10, "--limit 10 to specify limit") timePtr = flag.Int("time", 4, "--time 10 to specify run-time in seconds") flag.Parse() return }
[ 0.31922295689582825, 0.7636420130729675, 0.5904107093811035, -0.10981626063585281, 1.3820395469665527, -0.15271741151809692, -0.5575832724571228, 0.20881526172161102, -0.8137754201889038, 0.04176250472664833, -0.6237146854400635, 1.483458161354065, -0.7380537986755371, 0.5677024722099304, ...
func startTimer(timePtr *int) { fmt.Println("You have", *timePtr, "s for", *timePtr, " questions") time.Sleep(time.Duration(*timePtr) * time.Second) os.Exit(0) }
[ 0.7207286953926086, -0.8930221199989319, 0.3104732036590576, 0.42309653759002686, -0.5690699219703674, 1.0946588516235352, 0.29614439606666565, -0.04426431655883789, -0.5968799591064453, 0.25784459710121155, 0.1876954883337021, 0.5325363874435425, -0.35737791657447815, 0.9308496117591858, ...
func parseCsv(file string) ([][]string, error) { f, err := os.Open(file) defer f.Close() if err != nil { return nil, err } lines, err := csv.NewReader(f).ReadAll() if err != nil { return nil, err } return lines, nil }
[ 0.07724829763174057, -0.5323163270950317, 0.5673519372940063, 0.1362675428390503, -0.10461988300085068, 0.3479824364185333, 0.1559039205312729, 0.19142299890518188, -0.052173566073179245, 0.2218143194913864, 0.8167323470115662, 0.6821845769882202, 0.027893157675862312, 0.4747439920902252, ...
func initTestRepo() (datastore.Repo, dvid.VersionID) { if dtype == nil { var err error dtype, err = datastore.TypeServiceByName(TypeName) if err != nil { log.Fatalf("Can't get labelgraph type: %s\n", err) } } return tests.NewRepo() }
[ -0.04112377017736435, 0.47291669249534607, 0.44751882553100586, -0.6958425045013428, 0.25817111134529114, -0.5254270434379578, 0.5099055767059326, 0.05325695872306824, 0.1130291074514389, 0.2612041234970093, -0.5815208554267883, 0.717494547367096, -0.8002317547798157, -0.3819141685962677, ...
func TestNewLabelgraphDifferent(t *testing.T) { tests.UseStore() defer tests.CloseStore() repo, _ := initTestRepo() // Add data config := dvid.NewConfig() config.SetVersioned(true) dataservice1, err := repo.NewData(dtype, "lg1", config) if err != nil { t.Errorf("Error creating new labelgraph instance 1: %s\...
[ -0.2959480583667755, 0.45926743745803833, 0.5156697630882263, -0.4318741261959076, -0.03806881979107857, 1.4694876670837402, -0.4259383976459503, -0.8804439902305603, -0.31465789675712585, 0.2575676739215851, -0.7587023377418518, 0.8669788837432861, -0.46197056770324707, 0.0576822422444820...
func shiftASCII(s string, step int) string { if step == 0 { return s } shifted := make([]byte, len(s)) for i := 0; i < len(s); i++ { shifted[i] = byte(int(s[i]) + step) } return string(shifted) }
[ 0.4858507812023163, -0.2882455885410309, 0.4063417911529541, 0.17496514320373535, -0.8189475536346436, 0.11654919385910034, -0.808983564376831, -0.31460121273994446, -0.3661898076534271, 0.7719224691390991, -0.4011923670768738, 0.2953587472438812, -0.029997190460562706, 0.03359640017151832...
func HostInfo(endpoint string) (int, []byte) { buffer := getEndpointwithHost(endpoint) status, data := hq.Get(buffer.String()) return status, data }
[ -0.0021071576047688723, -0.5806400179862976, 0.6673169136047363, 0.3173278570175171, -0.036730315536260605, 0.21966661512851715, -0.7032466530799866, 0.47704988718032837, -1.1871693134307861, 0.21844059228897095, -1.2166446447372437, -0.20705820620059967, -0.27274206280708313, -0.594916105...
func HostDiskpoolInfo(endpoint string, disk string) (int, []byte) { buffer := getEndpointwithHost(endpoint) buffer.WriteString("/disk/") buffer.WriteString(disk) status, data := hq.Get(buffer.String()) return status, data }
[ -0.5852904319763184, -0.3631766736507416, 0.936975359916687, 0.16234658658504486, 0.2992251515388489, 0.11866696923971176, 0.08577968180179596, 0.2492978423833847, -1.673166036605835, -0.05226661637425423, -0.873592734336853, 0.06399478763341904, 0.07762614637613297, -0.11231429874897003, ...
func (ServiceBindingCredentialsV1) TableName() string { return "service_binding_credentials" }
[ 0.09613712877035141, -0.3325062394142151, 0.3047979772090912, 1.8878411054611206, -0.7570557594299316, 1.037542700767517, 0.19297730922698975, 0.6597269177436829, -0.30769234895706177, 0.39400285482406616, -0.19570066034793854, 0.8470005393028259, 0.3478507399559021, 0.3674499988555908, ...
func (ServiceInstanceDetailsV1) TableName() string { return "service_instance_details" }
[ 0.5384127497673035, 0.13149544596672058, 0.23233282566070557, 0.18905463814735413, -0.38935229182243347, 0.646173894405365, 0.294197142124176, 0.7282182574272156, -0.9925923347473145, 0.2954716682434082, 0.3232899606227875, 0.9589399695396423, 0.4410906732082367, 0.07215309888124466, -0....
func (ServiceInstanceDetailsV2) TableName() string { return "service_instance_details" }
[ 0.6107503771781921, -0.1827857941389084, 0.2887541949748993, 0.026857510209083557, -0.5440660119056702, 0.4151594638824463, 0.17274907231330872, 0.6525513529777527, -1.1622081995010376, 0.07702051103115082, 0.20764440298080444, 1.048754096031189, 0.5971035957336426, 0.13519732654094696, ...
func (ProvisionRequestDetailsV1) TableName() string { return "provision_request_details" }
[ -0.09647916257381439, -0.07217847555875778, 0.3397507071495056, 0.9212988615036011, -0.20775169134140015, 0.6312099099159241, -0.15468581020832062, 0.9293907284736633, -0.20517180860042572, 0.26624739170074463, 0.9851092100143433, 0.6327041983604431, 0.9018334746360779, -0.3162581622600555...
func (ProvisionRequestDetailsV2) TableName() string { return "provision_request_details" }
[ 0.00041108636651188135, -0.4150180220603943, 0.3882378339767456, 0.7414728403091431, -0.3071115016937256, 0.32470712065696716, -0.26907879114151, 0.8890033960342407, -0.4021870791912079, 0.03542713448405266, 0.8240018486976624, 0.7792719602584839, 1.139298439025879, -0.2659488618373871, ...
func (MigrationV1) TableName() string { return "migrations" }
[ -0.16347149014472961, 0.17828188836574554, 0.3125855028629303, 1.4941600561141968, -0.5017496347427368, 0.8612729907035828, 0.0046011474914848804, 0.6957919597625732, -0.43848860263824463, 0.8009229898452759, -0.32509955763816833, 0.939426600933075, 0.9380701780319214, 0.6772138476371765, ...
func (CloudOperationV1) TableName() string { return "cloud_operations" }
[ 0.3213246166706085, 0.7700226902961731, 0.5564077496528625, 1.709375262260437, -0.26247668266296387, 0.6075669527053833, 0.68537837266922, 0.616202712059021, -0.8483940958976746, 0.4490797817707062, -0.02012457139790058, -0.3974299132823944, 1.001150131225586, -0.36988580226898193, -0.08...
func (PlanDetailsV1) TableName() string { return "plan_details" }
[ 1.0580016374588013, 0.07228633016347885, 0.17380884289741516, 0.7257630825042725, -0.08022711426019669, 0.9393966197967529, 0.2919592261314392, 0.6948821544647217, -0.2631491422653198, 0.042426977306604385, -0.03142267465591431, 0.7585368156433105, 0.997930645942688, -0.1445193588733673, ...
func (TerraformDeploymentV1) TableName() string { return "terraform_deployments" }
[ -0.03626333922147751, -0.1625043898820877, 0.20745733380317688, 0.3411647081375122, 0.372834175825119, 0.5623675584793091, 0.2777528166770935, 1.0855395793914795, -0.8957571983337402, 1.565377950668335, 0.6396719217300415, -0.07709255814552307, 1.7324402332305908, 0.21642625331878662, -0...
func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { return &Client{transport: transport, formats: formats} }
[ -0.053929269313812256, -1.4649492502212524, -0.09012952446937561, -0.8262796401977539, -0.550800621509552, 0.6438911557197571, 0.3526709973812103, -0.1351967602968216, -0.9943568110466003, -0.7430494427680969, -0.3152836263179779, 0.610390305519104, 0.2375689148902893, 0.0706297904253006, ...
func (a *Client) PostRemoteAPIJURLAliasCreate(params *PostRemoteAPIJURLAliasCreateParams) (*PostRemoteAPIJURLAliasCreateOK, error) { // TODO: Validate the params before sending if params == nil { params = NewPostRemoteAPIJURLAliasCreateParams() } result, err := a.transport.Submit(&runtime.ClientOperation{ ID: ...
[ -0.5998970866203308, -0.5582056641578674, 0.6617511510848999, -0.8275109529495239, -0.8479862809181213, 1.062988042831421, -0.12873058021068573, -0.18119871616363525, -0.1953708529472351, 0.23728588223457336, -1.184156060218811, 0.19440250098705292, -0.7965624332427979, 0.5356504321098328,...
func (a *Client) PostRemoteAPIJURLAliasResolve(params *PostRemoteAPIJURLAliasResolveParams) (*PostRemoteAPIJURLAliasResolveOK, error) { // TODO: Validate the params before sending if params == nil { params = NewPostRemoteAPIJURLAliasResolveParams() } result, err := a.transport.Submit(&runtime.ClientOperation{ ...
[ -0.8155092597007751, -0.4200188219547272, 0.9050880074501038, -0.6306825876235962, -0.6537360548973083, 0.43288296461105347, -0.401868999004364, 0.2158288061618805, -0.35449230670928955, 0.24332202970981598, -1.4188578128814697, 0.0897534191608429, -0.9816794395446777, 0.4429864287376404, ...
func (a *Client) SetTransport(transport runtime.ClientTransport) { a.transport = transport }
[ 0.43289124965667725, -0.16396044194698334, 0.06502870470285416, 0.17467869818210602, -0.022012455388903618, 0.3327627182006836, 1.1535402536392212, -0.7375835180282593, 0.32833772897720337, -1.0833802223205566, -1.4707483053207397, 0.4919946491718292, -0.44076064229011536, 0.62663459777832...
func (m *IntString) UnmarshalJSON(data []byte) error { t, err := strconv.Unquote(string(data)) if err != nil { t = string(data) } i, err := strconv.Atoi(t) *m = IntString(i) return err }
[ -0.8167747259140015, -0.4263771176338196, 0.5316972136497498, -2.1379661560058594, -0.7992811799049377, -0.39971432089805603, -0.16503015160560608, -0.2450537383556366, -0.5151019096374512, 0.5619440674781799, -0.4126192629337311, -0.4897501766681671, -0.784742534160614, -0.558858692646026...
func (m Mapping) Get(entry string) Entry { return m[entry] }
[ -0.23614652454853058, -0.6937568187713623, -0.15727432072162628, -0.633085310459137, -0.1377474069595337, 0.40198853611946106, -0.6866127848625183, 0.2344735860824585, 0.1249445229768753, 0.17605924606323242, 0.536101222038269, 0.7909079790115356, 0.5387053489685059, -0.46368297934532166, ...
func (m *Mapping) Validate() error { logEntry := func(entry *Entry, path string) { isFriendly := entry.Immediate if isFriendly { log.Debug().Msg(fmt.Sprintf("Evaluating friendly redirect from path [%s] to [%s]", path, entry.Redirect)) } else { log.Debug().Msg(fmt.Sprintf("Evaluating direct redirect from pa...
[ -0.4126443564891815, 0.12979917228221893, 0.9213333129882812, 0.376181036233902, -0.3708457946777344, -0.34756389260292053, 0.45863115787506104, -0.5949857831001282, -0.11060190200805664, -0.33625659346580505, 0.970573902130127, -0.11492529511451721, 0.5078758001327515, 0.5020075440406799,...
func NewMappingsFile() *MappingsFile { return &MappingsFile{ Mappings: map[string]*Mapping{}, } }
[ 0.1354789435863495, -0.09978535026311874, -0.11448392271995544, 0.34966957569122314, -1.3011317253112793, -0.32463476061820984, -0.6486413478851318, 0.26720336079597473, -0.6186937093734741, -0.8227840065956116, -0.8020366430282593, -0.8019338250160217, -0.014296535402536392, 0.14894662797...
func (m *MappingsFile) Validate() error { if len(m.Mappings) == 0 { return errors.New("Mapping file is empty or has no entries, please provide some") } for host, entry := range m.Mappings { if host == "localhost" { return errors.New("Localhost is reserved, you cannot use this host") } if err := entry.Vali...
[ -0.19135898351669312, 0.3718920052051544, 0.49915486574172974, 0.4585314989089966, 0.31412291526794434, 0.6099463105201721, -0.07539345324039459, 1.0385085344314575, -1.2207646369934082, -0.24263343214988708, 0.9841828942298889, -0.5442116856575012, -0.4185512661933899, 1.0767419338226318,...
func (m *MappingsFile) GetRedirectURI(host string, path string) string { if mappingEntry, ok := m.Mappings[host]; ok { // look for specific if entry := mappingEntry.Get(path); entry.Redirect != "" { return entry.Redirect } // look for root TODO: might be better to sort later if entry := mappingEntry.Get(...
[ -0.7372296452522278, -0.4161110520362854, 1.0331937074661255, 0.05421566963195801, -0.5872987508773804, 0.0370442196726799, 0.3414384424686432, 0.772026538848877, -0.2138996422290802, -0.6254141926765442, 1.0411128997802734, 0.508710503578186, -0.578333854675293, 0.3637860119342804, -0.1...
func (m *MappingsFile) GetMappingEntry(host string, path string) (*Entry, error) { if mappingEntry, ok := m.Mappings[host]; ok { // look for specific if entry := mappingEntry.Get(path); entry.Redirect != "" { return &entry, nil } // look for root TODO: might be better to sort later if entry := mappingEnt...
[ 0.22483038902282715, -0.1472286731004715, 0.6384960412979126, 0.3653498888015747, -0.4895513355731964, 0.03363657370209694, -0.12773430347442627, 0.5692155957221985, -0.2010643184185028, 0.005789887625724077, 0.8901286125183105, 0.546237051486969, -0.1511809229850769, 0.6664413213729858, ...
func Parse(data []byte) (*MappingsFile, error) { mappingFile := NewMappingsFile() if err := yaml.Unmarshal([]byte(data), mappingFile); err != nil { return mappingFile, err } if err := mappingFile.Validate(); err != nil { return mappingFile, err } return mappingFile, nil }
[ 0.48214346170425415, 0.3625946640968323, 0.776552140712738, 0.21343743801116943, -0.9531080722808838, 0.26749783754348755, 0.15821386873722076, 0.7356162071228027, 0.15902844071388245, -1.0842697620391846, 0.17824025452136993, -0.7700706720352173, -0.3229376971721649, 0.09761915355920792, ...
func LoadMappingFile(file string) (*MappingsFile, error) { data, err := ioutil.ReadFile(file) if err != nil { msg := fmt.Sprintf("Could not find file: %s", file) return nil, errors.Errorf(msg) } log.Debug().Msg("Able to parse yaml file") return Parse(data) }
[ 0.6967043876647949, 0.22195568680763245, 0.7410209774971008, -0.5387527346611023, -1.32667076587677, 0.6879748702049255, 0.2029510736465454, 1.3870487213134766, -0.5440365076065063, -0.15482620894908905, -0.46782493591308594, -0.5696480870246887, -0.5608296990394592, 0.15673552453517914, ...
func NewImportPackageLocation(path string) *ImportPackageLocation { this := ImportPackageLocation{} this.Path = path return &this }
[ -0.9232363700866699, -0.6931860446929932, 0.3590357303619385, 0.16255196928977966, -0.7814505100250244, -0.3780205547809601, 0.9061471223831177, 0.19383656978607178, 0.49180230498313904, 0.7965713143348694, -0.6891908049583435, -0.8373379707336426, -0.5359159111976624, -0.38488227128982544...
func NewImportPackageLocationWithDefaults() *ImportPackageLocation { this := ImportPackageLocation{} return &this }
[ -0.4856962263584137, 0.015594790689647198, 0.1263776570558548, 0.10896752774715424, 0.6206327080726624, -0.46934986114501953, 0.18839648365974426, 0.12567724287509918, 0.38883405923843384, 0.2610865533351898, -0.8856572508811951, -2.119457721710205, -0.8431698679924011, -0.1568992882966995...
func (o *ImportPackageLocation) GetPath() string { if o == nil { var ret string return ret } return o.Path }
[ 0.5994496941566467, -0.05246366187930107, -0.31871312856674194, 0.8831628561019897, 0.45742130279541016, 0.8616353869438171, 1.144736886024475, -0.6915435194969177, 0.7799411416053772, -0.20834027230739594, 0.27464964985847473, -1.5186399221420288, -0.839750349521637, -0.5143179297447205, ...
func (o *ImportPackageLocation) GetPathOk() (*string, bool) { if o == nil { return nil, false } return &o.Path, true }
[ 0.4353832006454468, 0.14817151427268982, 0.5063607096672058, 0.5788166522979736, 0.19643284380435944, 0.6656854152679443, 1.0603358745574951, 0.8558546304702759, 0.11390352249145508, 0.6613765358924866, -1.2347133159637451, -1.1675204038619995, -0.19402733445167542, 0.07192394137382507, ...
func (o *ImportPackageLocation) SetPath(v string) { o.Path = v }
[ 0.0735294446349144, -0.12055663764476776, -0.3459574580192566, 0.05724085494875908, -0.4752887189388275, 0.61126309633255, 0.6094768047332764, -0.1618404984474182, 0.4015967845916748, 0.38148233294487, -0.6074000597000122, -0.8154206275939941, -0.4812285900115967, -0.36338961124420166, -...
func (o *ImportPackageLocation) GetLayerID() string { if o == nil || o.LayerID == nil { var ret string return ret } return *o.LayerID }
[ 1.0283077955245972, -0.22147630155086517, 0.3555595278739929, 1.1705602407455444, -0.17089247703552246, 0.6105531454086304, 0.7000694274902344, -0.7221160531044006, 1.4032577276229858, -0.3182488977909088, 0.0034688501618802547, -0.8032823801040649, -0.8067824840545654, 1.5906041860580444,...
func (o *ImportPackageLocation) GetLayerIDOk() (*string, bool) { if o == nil || o.LayerID == nil { return nil, false } return o.LayerID, true }
[ 0.7240048050880432, -0.11594153940677643, 0.46830952167510986, 0.7908071875572205, 0.6931678652763367, 0.8346893787384033, 0.673478901386261, 0.5658313035964966, 0.5049779415130615, -0.021395616233348846, -0.8004528284072876, -0.4218972325325012, -0.43716055154800415, 1.1354906558990479, ...
func (o *ImportPackageLocation) HasLayerID() bool { if o != nil && o.LayerID != nil { return true } return false }
[ 1.2879711389541626, -0.013656729832291603, 0.4671429693698883, 0.267650842666626, 0.24677912890911102, 0.3646254539489746, 0.05671565234661102, 0.4813467860221863, 0.44808530807495117, -0.18636083602905273, -0.4587082862854004, -0.5646617412567139, -0.2819776237010956, 1.7111424207687378, ...
func (o *ImportPackageLocation) SetLayerID(v string) { o.LayerID = &v }
[ 1.2189953327178955, -0.5141961574554443, 0.0024248692207038403, -0.04000433161854744, -1.1694830656051636, 0.6614091992378235, -0.34566381573677063, -0.5598414540290833, 0.6437961459159851, 0.3113592267036438, -0.07443846762180328, 0.672404944896698, -0.5109859108924866, 0.5723739266395569...
func adjustInstanceFromTemplateDisks(d *schema.ResourceData, config *transport_tpg.Config, it *compute.InstanceTemplate, zone *compute.Zone, project string, isFromRegionalTemplate bool) ([]*compute.AttachedDisk, error) { disks := []*compute.AttachedDisk{} if _, hasBootDisk := d.GetOk("boot_disk"); hasBootDisk { boo...
[ -0.5583871603012085, 0.19750119745731354, 0.6655137538909912, -0.22928868234157562, -0.26470282673835754, -0.41148462891578674, 0.3198164701461792, 0.3905065655708313, -0.0709071159362793, -0.26098382472991943, 0.6732578873634338, -0.34968167543411255, 0.06479964405298233, 1.14585447311401...
func GetPricingInfo() (*resty.Response, error) { log.Printf(os.Getenv("COINAPI_API_KEY")) resp, err := resty.R(). SetHeader("Content-Type", "application/json"). SetHeader("X-CoinAPI-Key", os.Getenv("COINAPI_API_KEY")). Get("https://rest.coinapi.io/v1/trades/latest") return resp, err }
[ -0.4868786334991455, 0.1734018623828888, 0.7296517491340637, 0.25474390387535095, -0.0435703881084919, -0.8016729354858398, -0.5277293920516968, -0.1884688287973404, -0.8944838047027588, 0.9803330898284912, -0.6634500026702881, 0.2753181755542755, -0.8329319357872009, 0.19501379132270813, ...
func (host *FirmwareSchema) ValidateSetting(name string, value intstr.IntOrString, schemas map[string]SettingSchema) error { schema, ok := schemas[name] if !ok { return SchemaSettingError{name: name, message: "it is not in the associated schema"} } return schema.Validate(name, value) }
[ -0.9333670139312744, 0.013992676511406898, 0.2117244005203247, 0.18321146070957184, -0.7234347462654114, -0.4454211890697479, -0.12830492854118347, -0.4698624610900879, 0.19544054567813873, 0.733776867389679, 0.1367693692445755, -0.7027666568756104, -0.9717802405357361, 0.5818799138069153,...
func (gc *GatewayConfig) TransformerReadinessProbe() error { return wait.ExponentialBackoff(wait.Backoff{ Steps: 5, Duration: 1 * time.Minute, Factor: 1.0, Jitter: 0.1, }, func() (bool, error) { _, err := http.Get(fmt.Sprintf("http://localhost:%s/readiness", gc.transformerPort)) if err != nil { ...
[ 0.3334087133407593, 0.04356943443417549, 0.6570578217506409, -1.8848305940628052, 0.019319549202919006, 0.1318497508764267, -0.5456722378730774, 0.6073814630508423, -0.5427466034889221, 1.26622474193573, -0.27077388763427734, -0.07247140258550644, -1.4330089092254639, 0.4014221429824829, ...
func (gc *GatewayConfig) DispatchEvent(gatewayEvent *GatewayEvent) error { payload, err := TransformerPayload(gatewayEvent.Payload, gatewayEvent.Src) if err != nil { gc.Log.Warn().Str("config-key", gatewayEvent.Src).Err(err).Msg("failed to transform request body.") return err } gc.Log.Info().Str("config-key", g...
[ 0.20240475237369537, 0.3110426366329193, 0.5543925762176514, -0.769908607006073, -0.11014275997877121, 0.34302622079849243, -0.13707736134529114, -0.3390790820121765, -0.5508413314819336, 0.6740696430206299, -0.8686467409133911, 0.6452625393867493, -0.10981965065002441, 1.366904377937317, ...
func (gc *GatewayConfig) StartGateway(configExecutor ConfigExecutor) error { err := gc.TransformerReadinessProbe() if err != nil { gc.Log.Panic().Err(err).Msg(ErrGatewayTransformerConnectionMsg) return err } _, err = gc.WatchGatewayEvents(context.Background()) if err != nil { gc.Log.Panic().Err(err).Msg(ErrG...
[ 0.3928424119949341, -0.09859076142311096, 0.5973376631736755, 0.10114417970180511, 0.17124898731708527, 0.09614073485136032, 0.5495197176933289, 0.676895797252655, -0.36934125423431396, 0.5335391163825989, 0.23584285378456116, 1.083229899406433, -0.8478448987007141, 1.6916391849517822, 1...
func NewAstExprMethodCallExpr3(a AstExprExpressionInterface, b string, c []*AstExprExpression) (*AstExprMethodCallExpr) { conv_a := javabind.NewGoToJavaCallable() conv_b := javabind.NewGoToJavaString() conv_c := javabind.NewGoToJavaList(javabind.NewGoToJavaCallable()) if err := conv_a.Convert(a); err != nil { pan...
[ 0.48140087723731995, -0.20192287862300873, 0.7285885810852051, 0.12478454411029816, -1.0855989456176758, -0.15322797000408173, -0.8933048844337463, 0.12816046178340912, -0.04459391534328461, 0.9456824660301208, -0.14642417430877686, 0.06089244410395622, -0.28594061732292175, 0.464101195335...
func NewAstExprMethodCallExpr4(a int, b int, c int, d int, e AstExprExpressionInterface, f []*AstTypeType, g string, h []*AstExprExpression) (*AstExprMethodCallExpr) { conv_e := javabind.NewGoToJavaCallable() conv_f := javabind.NewGoToJavaList(javabind.NewGoToJavaCallable()) conv_g := javabind.NewGoToJavaString() c...
[ 0.3865070939064026, -0.32417988777160645, 0.8626598119735718, 0.1768174022436142, -0.8493393659591675, -0.4493963122367859, -0.47725802659988403, 0.034306641668081284, -0.8496769070625305, 0.7368813157081604, -0.03463735431432724, -0.060590896755456924, -0.02981007657945156, 0.973971962928...
func initializeBoltClient() { service.DBClient = &dbclient.BoltClient{} service.DBClient.OpenBoltDb() service.DBClient.Seed() }
[ -0.09413708001375198, 0.7823266983032227, 0.4138343334197998, -0.23662126064300537, 0.8027986288070679, -0.48434463143348694, 0.06823388487100601, 0.004917481914162636, -0.7462502717971802, -0.7638196349143982, -0.7382256388664246, 1.4973937273025513, -1.2153663635253906, 0.132403090596199...
func RegisterModule(m module) { if modules == nil { modules = make(map[string]module) } modules[m.name] = m }
[ -0.9178846478462219, 0.8608426451683044, 0.21528944373130798, -0.2760867178440094, 1.1609481573104858, 0.7001041173934937, -0.7955756783485413, -0.15428180992603302, 0.6999370455741882, -0.11196421086788177, -0.7510619759559631, 0.7400292158126831, 0.10172136127948761, 0.6972613334655762, ...
func hookModule(mc ModuleConfig, mq *mq, debug LogPrintf) error { debug("Hooking module %s (%s -> %s)", mc.Name, mc.Sub, mc.Pub) m, ok := modules[mc.Name] if !ok { return fmt.Errorf("module %s not found", m) } // Derive the type of the subscription channel. This will panic if the runner doesn't have // an appr...
[ 0.2433786541223526, 0.011177171021699905, 0.5687181949615479, -0.3297188878059387, 0.45946305990219116, 0.10890023410320282, 0.07349863648414612, 0.0799645483493805, -0.16573026776313782, 0.6120702624320984, 0.4192809462547302, 1.2625657320022583, 0.14622367918491364, 0.7087326049804688, ...
func codeLabels(labels map[string]string, code string) map[string]string { out := make(map[string]string) for k, v := range labels { out[k] = v } out["code"] = code return out }
[ -1.1346354484558105, -0.2673156261444092, 0.4026457667350769, -1.0038827657699585, -0.9786981344223022, 0.6773152947425842, -1.5191353559494019, 0.33553245663642883, -0.47759175300598145, 0.8081092238426208, -0.06694296002388, -0.2653571665287018, -0.1703420728445053, 0.02995028719305992, ...
func (n *Notifier) SetCustomTimeouts(interval, send, total time.Duration) { n.intervalTimeout = interval n.sendTimeout = send n.totalTimeout = total }
[ 0.872137188911438, 0.3287193477153778, 0.009894820861518383, -0.5292814373970032, 0.1092880442738533, -0.0681084394454956, 0.22468815743923187, 0.14295484125614166, -0.3932511508464813, 0.4450579285621643, -1.3235026597976685, -0.05809212476015091, -0.036905668675899506, 0.0782071799039840...
func SkipUnlessFederated(c clientset.Interface) { federationNS := os.Getenv("FEDERATION_NAMESPACE") if federationNS == "" { federationNS = federationapi.FederationNamespaceSystem } _, err := c.Core().Namespaces().Get(federationNS, metav1.GetOptions{}) if err != nil { if apierrors.IsNotFound(err) { framewor...
[ 0.42721834778785706, 0.7392151951789856, 0.3882794976234436, -0.892602264881134, 0.22886429727077484, 0.3574714660644531, 0.45968812704086304, -1.268653154373169, 0.5035170912742615, -1.261705994606018, 0.39712706208229065, 0.45611056685447693, -0.2104666531085968, 1.1905646324157715, 0....
func WaitForFederationApiserverReady(c *federation_clientset.Clientset) error { return wait.PollImmediate(time.Second, 1*time.Minute, func() (bool, error) { _, err := c.Federation().Clusters().List(metav1.ListOptions{}) if err != nil { return false, nil } return true, nil }) }
[ -1.5049885511398315, -0.23078855872154236, 0.1753740757703781, -1.1692707538604736, 0.8088424801826477, -0.17333772778511047, 0.0843333899974823, -1.0174387693405151, 0.18627288937568665, 0.09619637578725815, -0.4084266126155853, 0.1820966750383377, -0.26559093594551086, 0.6989902257919312...
func GetValidDNSSubdomainName(name string) (string, error) { // "_" are not allowed. Replace them by "-". name = regexp.MustCompile("_").ReplaceAllLiteralString(name, "-") maxLength := validationutil.DNS1123SubdomainMaxLength if len(name) > maxLength { name = name[0 : maxLength-1] } // Verify that name now pass...
[ -0.7047199010848999, 0.9507713317871094, 0.8316686749458313, 0.054964836686849594, -1.8718552589416504, 0.40040695667266846, -0.5730929374694824, 0.08364180475473404, 0.7009825706481934, -0.8056198358535767, -1.3829268217086792, 1.2173042297363281, 0.36971792578697205, -0.4081479609012604,...
func NewHub() *Hub { return &Hub{ bridges: map[string]*bridgeInstance{}, bw: bridgeWatchers{ watchers: map[*bridgeWatcher]bool{}, }, dw: deviceWatchers{ watchers: map[*deviceWatcher]bool{}, }, } }
[ 0.44033634662628174, -0.02673211693763733, 0.3073011636734009, 0.9830614328384399, -0.19287315011024475, 1.1457141637802124, 0.5351267457008362, -0.34977760910987854, 0.8623843789100647, -0.8214958310127258, 0.7472524642944336, 0.49040836095809937, 0.2750052213668823, 0.06370847672224045, ...
func (h *Hub) Bridges() []*pb.Bridge { h.bridgesLock.RLock() defer h.bridgesLock.RUnlock() var ret []*pb.Bridge for _, b := range h.bridges { ret = append(ret, b.bridge) } return ret }
[ -0.6381990313529968, -0.3308393359184265, 0.20860829949378967, 1.6047283411026, 0.6825862526893616, 1.5598660707473755, -0.05408710613846779, -0.2891668379306793, 1.355637788772583, -1.1484172344207764, -0.00676795095205307, -0.04864192008972168, -1.851640224456787, 0.6395390033721924, -...
func (h *Hub) Devices() []*pb.Device { h.bridgesLock.RLock() defer h.bridgesLock.RUnlock() var ret []*pb.Device for _, b := range h.bridges { for _, d := range b.devices { ret = append(ret, d) } } return ret }
[ -0.7994529604911804, -0.16205094754695892, 0.36785170435905457, 1.4457287788391113, 0.8330674171447754, 1.1688936948776245, 1.2035049200057983, -0.2860015034675598, 0.7083425521850586, -0.8857661485671997, 0.24123387038707733, -0.04837584123015404, -1.1033064126968384, 1.272884726524353, ...
func (h *Hub) DevicesOnBridge(bridgeID string) ([]*pb.Device, error) { h.bridgesLock.RLock() defer h.bridgesLock.RUnlock() var ret []*pb.Device b, ok := h.bridges[bridgeID] if !ok { return nil, ErrBridgeNotRegistered } for _, d := range b.devices { ret = append(ret, d) } return ret, nil }
[ -0.3175963759422302, 0.15439419448375702, 0.46857479214668274, 0.9219915866851807, 0.9257213473320007, 0.14352154731750488, 0.4150472581386566, -0.6004977822303772, 0.8211785554885864, 0.08722507208585739, -0.48398610949516296, 0.006296238396316767, -1.3459349870681763, 2.025778293609619, ...
func (h *Hub) SetBridgeConfig(ctx context.Context, id string, config *pb.BridgeConfig) (*pb.Bridge, error) { var bi *bridgeInstance if b, ok := h.bridges[id]; ok { bi = b } if bi == nil { return nil, ErrBridgeNotRegistered } err := bi.bridgeHandle.SetBridgeConfig(ctx, config) if err != nil { return nil,...
[ -0.17204679548740387, 0.13588480651378632, 0.21832141280174255, 0.0687849223613739, 0.31874316930770874, 0.41581135988235474, 0.2141605019569397, 0.6657926440238953, 0.9365540146827698, 0.17057351768016815, -1.6057878732681274, 0.46610209345817566, -1.0392638444900513, 1.2322182655334473, ...
func (h *Hub) SetDeviceConfig(ctx context.Context, id string, config *pb.DeviceConfig) (*pb.Device, error) { h.bridgesLock.RLock() defer h.bridgesLock.RUnlock() var bi *bridgeInstance for _, b := range h.bridges { if _, ok := b.devices[id]; ok { bi = b break } } if bi == nil { return nil, ErrDeviceN...
[ -0.6294170618057251, 0.2775260806083679, 0.42101138830184937, 0.3075161874294281, -0.17003373801708221, 0.13139088451862335, 0.9018704891204834, -0.07112356275320053, 1.084998607635498, 0.04892396926879883, -1.2745639085769653, 0.1915101557970047, -0.44710394740104675, 0.9538541436195374, ...
func (h *Hub) SetDeviceState(ctx context.Context, id string, state *pb.DeviceState) (*pb.Device, error) { h.bridgesLock.RLock() defer h.bridgesLock.RUnlock() var bi *bridgeInstance for _, b := range h.bridges { if _, ok := b.devices[id]; ok { bi = b break } } if bi == nil { return nil, ErrDeviceNotR...
[ -0.783283531665802, 0.36094143986701965, 0.48343518376350403, 0.31541597843170166, 0.049633417278528214, 0.30735766887664795, 0.66205233335495, -0.2725802958011627, 1.0419844388961792, -0.2816731929779053, -0.6673456430435181, 0.136323019862175, -0.6936563849449158, 0.4074007570743561, 0...
func (h *Hub) AddBridge(b Bridge, refreshRate time.Duration) error { bi, err := h.addBridgeInstance(b) if err != nil { return err } // We have a floor on the refresh rate for performance considerations. if refreshRate < time.Second { refreshRate = time.Second } go bi.monitor(refreshRate) return nil }
[ -0.20921052992343903, 1.339092493057251, 0.7230286002159119, 1.4687724113464355, 0.48102128505706787, 0.6224752068519592, -0.5866031050682068, -0.7676165103912354, 0.9166319370269775, -0.7804750204086304, 0.580625057220459, -0.03596261516213417, -1.5942764282226562, 1.3735917806625366, 0...
func (h *Hub) AddAsyncBridge(b AsyncBridge) error { if _, err := h.addBridgeInstance(b); err != nil { return err } // We pass the hub back to the async bridge so it is able to notify the hub when things change. b.SetNotifier(h) return nil }
[ -0.1182008683681488, 0.43765759468078613, 0.7092440128326416, 0.5990585088729858, 0.6796090602874756, 0.45238399505615234, -0.5568683743476868, -0.09078752249479294, 0.6875610947608948, 0.27059805393218994, -0.27999600768089294, -0.12937523424625397, -1.0361461639404297, 1.131569743156433,...
func (h *Hub) RemoveBridge(id string) error { h.bridgesLock.Lock() defer h.bridgesLock.Unlock() if _, ok := h.bridges[id]; !ok { return ErrBridgeNotRegistered } bi := h.bridges[id] // We only want to write to this channel if we know someone will be listening to it. if bi.cancelRefresh != nil { bi.cancelRe...
[ -0.507128119468689, 0.25864189863204956, 0.4965914785861969, 0.3863120973110199, 0.5774650573730469, -0.10690972954034805, 0.0523068793118, 0.0001831197296269238, 0.9141649007797241, -0.21219360828399658, -0.4463251829147339, -0.24912694096565247, -1.7274515628814697, 0.7224209904670715, ...
func (h *Hub) BridgeUpdated(bridge *pb.Bridge) error { if bridge == nil { return ErrNilArgument } h.bridgesLock.Lock() defer h.bridgesLock.Unlock() if _, ok := h.bridges[bridge.Id]; ok { nb := proto.Clone(bridge).(*pb.Bridge) h.sendBridgeUpdate(pb.BridgeUpdate_CHANGED, nb) h.bridges[bridge.Id].bridge = n...
[ -0.22215433418750763, -0.27595779299736023, 0.5412401556968689, 0.7144566178321838, 0.49444419145584106, 0.8630925416946411, 0.3748568594455719, 0.2590034008026123, 1.046366810798645, 0.05355308577418327, -1.0394777059555054, 0.4244917929172516, -0.8829842805862427, 1.0755541324615479, 0...
func (h *Hub) DeviceAdded(bridgeID string, device *pb.Device) error { if device == nil { return ErrNilArgument } h.bridgesLock.RLock() defer h.bridgesLock.RUnlock() if bridge, ok := h.bridges[bridgeID]; ok { bridge.lock.Lock() defer bridge.lock.Unlock() if _, ok := bridge.devices[device.Id]; ok { ret...
[ -0.10952438414096832, 0.46145501732826233, 0.5782766938209534, 0.6369380950927734, 0.7436564564704895, 1.0573594570159912, 0.9319524168968201, -0.6177427172660828, 1.299385666847229, -0.564389169216156, -0.741366446018219, 0.6249958276748657, -0.11884989589452744, 1.0041581392288208, 0.7...
func (h *Hub) DeviceUpdated(bridgeID string, device *pb.Device) error { if device == nil { return ErrNilArgument } h.bridgesLock.RLock() defer h.bridgesLock.RUnlock() if bridge, ok := h.bridges[bridgeID]; ok { bridge.lock.Lock() defer bridge.lock.Unlock() if currDevice, ok := bridge.devices[device.Id]; ...
[ -0.24461041390895844, -0.08429760485887527, 0.5944503545761108, 0.7614076137542725, 0.16700737178325653, 0.675902247428894, 1.1965863704681396, -0.37859538197517395, 1.1682089567184448, -0.10312969237565994, -0.4903775155544281, 0.5336112380027771, -0.3095838725566864, 0.7422043681144714, ...
func (h *Hub) DeviceRemoved(bridgeID string, device *pb.Device) error { if device == nil { return ErrNilArgument } h.bridgesLock.RLock() defer h.bridgesLock.RUnlock() if bridge, ok := h.bridges[bridgeID]; ok { bridge.lock.Lock() defer bridge.lock.Unlock() if _, ok := bridge.devices[device.Id]; !ok { ...
[ -0.17007037997245789, 0.28812289237976074, 0.43835005164146423, 0.6894805431365967, 0.6212960481643677, 0.3444032073020935, 1.1860344409942627, 0.13785330951213837, 1.436583161354065, -0.5140740275382996, -0.6728765964508057, 0.2468412071466446, -0.47203466296195984, 1.0224858522415161, ...
func (h *Hub) sendDeviceUpdate(action pb.DeviceUpdate_Action, bridgeID string, device *pb.Device) { h.dw.Lock() defer h.dw.Unlock() log.Printf("Device changed: %+v\n", device) for watcher, active := range h.dw.watchers { if !active { continue } // We perform this in a separate goroutine in case the watc...
[ -0.5168360471725464, -0.18455207347869873, 0.4159024953842163, 0.6217816472053528, -0.05586184561252594, 0.427793949842453, 0.21606315672397614, -0.7356168031692505, 0.41221216320991516, 0.5672497749328613, -0.18149472773075104, 0.5654146075248718, -0.6001721620559692, 1.0372810363769531, ...
func (h *Hub) sendBridgeUpdate(action pb.BridgeUpdate_Action, bridge *pb.Bridge) { h.bw.Lock() defer h.bw.Unlock() for watcher, active := range h.bw.watchers { if !active { continue } // We perform this in a separate goroutine in case the watcher has not yet finished processing // a previously-received ...
[ -0.0945756584405899, -0.3564949929714203, 0.6375448107719421, 0.5199665427207947, 0.22704541683197021, 0.8375041484832764, 0.05549858883023262, -0.37907150387763977, 0.23115850985050201, 0.8246147036552429, -0.6367394924163818, 0.6209290027618408, -1.3388398885726929, 1.2921600341796875, ...
func CreateEmployee(db *sql.DB, name string, location string) (int64, error) { ctx := context.Background() var err error if db == nil { err = errors.New("CreateEmployee: db is null") return -1, err } // Check if database is alive. err = db.PingContext(ctx) if err != nil { return -1, err } tsql := "INS...
[ -0.5201102495193481, 0.07197833806276321, 0.7485207319259644, -0.5280711650848389, -0.32971447706222534, 0.4511634111404419, 0.12175993621349335, 0.4212307929992676, -0.5018160343170166, 0.874830424785614, -0.557196855545044, -0.6655856370925903, -1.8278335332870483, 0.0966872125864029, ...
func DeleteEmployee(db *sql.DB, name string, location string) (int64, error) { ctx := context.Background() // Check if database is alive. err := db.PingContext(ctx) if err != nil { return -1, err } tsql := fmt.Sprintf("DELETE FROM TestSchema.Employees WHERE Name = @Name AND Location = @Location;") // Execut...
[ -0.5986400246620178, 0.06177874654531479, 0.7568037509918213, -0.2512541115283966, -0.7373159527778625, 0.06851743161678314, -0.01826200634241104, 0.427053302526474, -0.7913312315940857, 0.9885894656181335, -0.16820794343948364, -0.42673611640930176, -1.6309871673583984, 0.2438846826553344...
func ReadEmployees(db *sql.DB, name string, location string) (int, error) { ctx := context.Background() var id = -1 // Check if database is alive. err := db.PingContext(ctx) if err != nil { return id, err } tsql := "SELECT Id, Name, Location FROM TestSchema.Employees WHERE Name = @Name AND Location = @Locat...
[ -0.26648327708244324, -0.4024568796157837, 0.7092259526252747, -0.8163366317749023, -0.6598300933837891, 0.011281177401542664, -0.13656674325466156, 0.5679331421852112, -0.7304109334945679, 0.6558188796043396, 0.07178370654582977, -0.2748018801212311, -1.65859854221344, -0.3083489537239074...
func UpdateEmployee(db *sql.DB, name string, location string) (int64, error) { ctx := context.Background() // Check if database is alive. err := db.PingContext(ctx) if err != nil { return -1, err } tsql := fmt.Sprintf("UPDATE TestSchema.Employees SET Location = @Location WHERE Name = @Name AND Location = @Loc...
[ -1.2717889547348022, -0.35361436009407043, 0.7263480424880981, -0.4425104558467865, -1.0733041763305664, 0.20069058239459991, 0.03954513370990753, 0.3817230761051178, -0.95346599817276, 1.3475185632705688, -0.3491722345352173, -0.436655730009079, -1.6271764039993286, -0.038116104900836945,...
func bigSorting(unsorted []string) []string { var res []string sort.Slice(unsorted, func(i, k int) bool { a, b := unsorted[i], unsorted[k] if diff := len(a) - len(b); diff != 0 { return diff < 0 } for i := 0; i < len(a); i++ { if a[i] < b[i] { return true } if a[i] > b[i] { return false ...
[ -0.688062310218811, 0.45975643396377563, 1.0020544528961182, -0.4972710609436035, -0.5370022058486938, 0.16038362681865692, -0.12049897015094757, -0.3004401922225952, -0.02885855734348297, 0.6755346059799194, -0.03548077121376991, 0.12094622105360031, 0.07570251077413559, 0.294038921594619...
func PrintPtrStructObject(obj interface{}) { v := reflect.ValueOf(obj).Elem() t := v.Type() for i := 0; i < v.NumField(); i++ { fieldName := v.Type().Field(i).Name fieldValue := v.FieldByName(fieldName) fmt.Println(aurora.BrightCyan(t.Field(i).Tag.Get("json")), ":", aurora.BrightGreen(fieldValue)) } }
[ -0.20562152564525604, -0.6914650797843933, 0.7920427322387695, -1.1887328624725342, -0.28736260533332825, 0.4765479266643524, 0.016537010669708252, -1.2395597696304321, 0.21593403816223145, 0.08584360033273697, -0.9711878895759583, 0.5650811791419983, 0.4274984896183014, 0.1015016362071037...
func PrintObject(obj interface{}, isFound bool, key, value string) { if !isFound { NoResult(obj, key, value) } else { PrintPtrStructObject(obj) } }
[ 0.11837483197450638, -0.09053497761487961, 0.44483569264411926, 0.24063533544540405, 0.09562886506319046, 0.5008179545402527, 0.5930256247520447, -0.49161744117736816, 0.3126194179058075, -0.08846495300531387, 0.0277294609695673, 0.20446202158927917, -0.3553476631641388, 0.1295617371797561...
func NoResult(obj interface{}, key, value string) { dataType := reflect.TypeOf(obj).Elem().Name() fmt.Println(aurora.Red("Searching " + dataType + "s for " + key + " with a value of " + value)) fmt.Println(aurora.Red("No results found")) }
[ -0.905928909778595, 0.6870563626289368, 0.30685508251190186, -0.4347734749317169, -0.05074920877814293, -0.08118198066949844, -0.03864658623933792, -1.0600064992904663, 0.09783226251602173, -0.41477954387664795, -0.09925268590450287, 0.6991756558418274, 0.02137860096991062, 0.9177836775779...
func PrintPtrStructObjectTags(obj interface{}) { v := reflect.ValueOf(obj).Elem() t := v.Type() for i := 0; i < v.NumField(); i++ { fmt.Println(aurora.BrightGreen(t.Field(i).Tag.Get("json"))) } }
[ 0.00498651247471571, -0.3191227614879608, 0.7970845103263855, -0.6173990368843079, 0.22580623626708984, 0.39174002408981323, -0.3082007169723511, -1.3245376348495483, -0.38242655992507935, 0.21881911158561707, -1.1138100624084473, 0.3077094256877899, 0.4059203565120697, 0.8663977980613708,...
func PrintSeparation() { fmt.Println("------------------------------------------------") }
[ 0.71696937084198, -0.952273428440094, 1.063948392868042, 0.13630248606204987, 0.14670430123806, 0.5103605389595032, -0.04535694792866707, 0.00836492981761694, -0.24530789256095886, -0.1607494056224823, -0.8108347058296204, 0.4872904419898987, -0.500507652759552, 0.32369232177734375, 0.74...
func (s UniqushSubscriber) Create() (response string, err error) { endpointUrl := fmt.Sprintf("%s/subscribe", s.UniqushService.UniqushClient.UniqushURL) formValues := url.Values{ "service": {s.UniqushService.Name}, "subscriber": {s.Name}, "pushservicetype": {fmt.Sprintf("%s", s.UniqushService.Pus...
[ -0.005206497851759195, 0.2178473174571991, 0.5448289513587952, -0.19169116020202637, 0.18164362013339996, -0.40246686339378357, -1.0569374561309814, -0.3551575839519501, -0.6360338926315308, -0.391528844833374, -0.047772366553545, -0.1727171540260315, -0.4718782901763916, 0.201175168156623...
func (s UniqushSubscriber) Push(message string) (response string, err error) { endpointUrl := fmt.Sprintf("%s/push", s.UniqushService.UniqushClient.UniqushURL) formValues := url.Values{ "service": {s.UniqushService.Name}, "subscriber": {s.Name}, "msg": {message}, } resp, err := http.PostForm(endpo...
[ -0.24699026346206665, 0.8588491082191467, 0.5895745754241943, -0.10912172496318817, -0.03557392582297325, -0.5684415102005005, -0.34124839305877686, -0.5010976195335388, 0.021693870425224304, 0.18081596493721008, -0.11899276822805405, 0.7088574171066284, -0.5737450122833252, 0.416698902845...
func BuildEntriesFromFile(filePath string, includeComments bool) ([]*Entry, []error) { bytes, err := ioutil.ReadFile(filePath) if err != nil { return nil, []error{err} } return BuildEntries(bytes, includeComments) }
[ 0.6029987335205078, -0.4456925094127655, 0.2897895276546478, 0.2843792736530304, -0.03773663565516472, 0.8432392477989197, 0.3799269199371338, 0.41271325945854187, -0.3791011869907379, 0.45555010437965393, 0.009601157158613205, 0.6561903357505798, -0.5923758745193481, 0.1456158608198166, ...
func BuildFromFile(filePath string) (*CodeOwners, []error) { entries, errors := BuildEntriesFromFile(filePath, false) if errors != nil { return nil, errors } index, err := createIndexFromEntries(entries) if err != nil { return nil, []error{err} } return index, nil }
[ -0.5280337333679199, -0.0064952983520925045, 0.22460126876831055, 0.4714880883693695, -0.319556325674057, 0.26182541251182556, 1.0931737422943115, -0.1822407841682434, -0.35612136125564575, -0.5181515216827393, 0.2125564068555832, 0.3193584382534027, -0.453458309173584, -0.2042382955551147...
func BuildIndex(input []byte) (*CodeOwners, []error) { entries, errors := BuildEntries(input, false) if errors != nil { return nil, errors } index, err := createIndexFromEntries(entries) if err != nil { return nil, []error{err} } return index, nil }
[ -0.8444773554801941, -0.16874846816062927, 0.41314443945884705, 0.7998453974723816, -0.25475308299064636, -0.13985981047153473, 0.9201385974884033, 0.6446247100830078, 0.2560265064239502, -0.4328163266181946, -0.35954293608665466, 0.42031052708625793, -0.5574167966842651, 0.086926318705081...
func (org *OrgCredentialIssuer) VerifyAuthentication(z *big.Int) ( *big.Int, *big.Int, *big.Int, *big.Int, *big.Int, *big.Int, error) { verified := org.SchnorrVerifier.Verify(z, nil) if verified { A, _ := org.DLog.Exponentiate(org.b, org.s2) aA, _ := org.DLog.Multiply(org.a, A) B, _ := org.DLog.Exponentiate(aA...
[ -0.9391077160835266, -0.09832929074764252, 0.5179365873336792, 1.0625684261322021, 0.028085142374038696, -0.29702886939048767, 0.9835805892944336, -0.2650456130504608, 0.9146013855934143, 0.33681654930114746, -1.4142892360687256, 0.22293035686016083, -0.36370816826820374, 0.030238742008805...