text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (th *Theme) Fill(col string, w l.Widget) *Filler { return &Filler{th: th, col: col, w: w} }
[ 0.8606756329536438, 0.23658697307109833, 0.18404053151607513, -0.9522081613540649, -0.35484614968299866, 0.6376163363456726, -0.1353885978460312, -0.5540618896484375, -0.4761984050273895, -0.7666512727737427, -0.22096209228038788, -0.01456466969102621, 0.4578668773174286, 0.948318600654602...
func (a *App) VoiceReq(c *gin.Context) { ctx, cancel := context.WithTimeout(c, time.Second*60) defer cancel() msg := models.AppReq{} if err := c.BindJSON(&msg); err != nil { log.Errorf("app.go, ERROR UNMARSHALLING APP REQUEST: %v", err) c.JSON(http.StatusBadRequest, "Bad request") return } log.Infof("app.g...
[ -0.3167741596698761, 0.01799759827554226, 0.8250309228897095, 0.2209140658378601, 0.08187730610370636, -0.43217703700065613, -0.49440810084342957, -0.36648961901664734, 0.1583673655986786, 0.31224942207336426, 0.8607238531112671, 0.7512192130088806, -0.614288866519928, 0.4317428767681122, ...
func New(client *client.Client, properties ClientProperties) *Client { return &Client{ client: client, sid: properties.Sid, AccessTokens: access_tokens.New(client, access_tokens.ClientProperties{ ServiceSid: properties.Sid, }), Entities: entities.New(client, entities.ClientProperties{ ServiceSid: pro...
[ 1.1579833030700684, -0.679343581199646, 0.5226889252662659, -0.6234427094459534, -0.3610968589782715, -0.3235083222389221, 0.0413694903254509, -0.7824698686599731, -0.24026688933372498, 0.025086218491196632, 0.16692368686199188, 0.9130868315696716, 0.5717970728874207, 0.17488950490951538, ...
func mapCapabilities(config configuration) cap.Capabilities { caps := cap.Capabilities{ "features": cap.Cap{ "vault": cap.Cap{ "enabled": config.Cluster.Vault.Enabled, "managed": config.Cluster.Vault.Managed.Enabled, }, "monitoring": cap.Cap{ "enabled": config.Cluster.Monitoring.Enabled, }, ...
[ -0.25697818398475647, -1.1013487577438354, 0.654028058052063, 0.21242350339889526, -0.4188763201236725, 0.06803911924362183, -0.5391665101051331, 0.5078036785125732, 1.3159669637680054, 1.0647982358932495, -0.7843824028968811, -0.37515437602996826, 0.6237136721611023, -0.04907102882862091,...
func Constructor() MyStack { return MyStack{ Q: make([]int, 0), } }
[ -0.143998384475708, 0.602527379989624, 0.13316403329372406, 0.4980357885360718, -0.654809832572937, -0.3575287163257599, 0.7185013890266418, -0.22878782451152802, 0.13001544773578644, -0.7445271015167236, -1.3475762605667114, -0.4580758810043335, 0.0827283263206482, 0.7636561989784241, 1...
func (s *MyStack) Push(x int) { s.Q = append(s.Q, x) }
[ -0.4630243480205536, 0.9677932858467102, 0.16296803951263428, -0.3935079276561737, -1.1620372533798218, 0.45759838819503784, -0.3750547766685486, -1.1168423891067505, 0.4912269711494446, 0.01948261633515358, -1.6510323286056519, 0.519689679145813, -0.061428945511579514, 0.6149167418479919,...
func (s *MyStack) Pop() int { if s.Empty() { return -1 } n := len(s.Q) x := s.Q[n-1] s.Q = s.Q[:n-1] return x }
[ -0.6715627312660217, 0.904003381729126, 0.5560158491134644, -0.14548137784004211, -1.1876269578933716, -0.38469061255455017, 0.5029445886611938, 0.035547636449337006, -0.1735687404870987, 0.29770439863204956, -0.9130619764328003, -0.23966944217681885, -0.5967639684677124, -0.07355695962905...
func (s *MyStack) Top() int { if s.Empty() { return -1 } return s.Q[len(s.Q)-1] }
[ -1.1384251117706299, 0.5921904444694519, 0.578514814376831, 0.1999477595090866, -1.0243000984191895, -0.5227864980697632, 0.41104254126548767, 0.13583511114120483, -0.10436835139989853, 0.000750339066144079, -0.363558828830719, -0.06714404374361038, -0.7943423390388489, -0.1671516746282577...
func (s *MyStack) Empty() bool { return len(s.Q) <= 0 }
[ -0.6575894355773926, 0.12151484191417694, 0.337252676486969, -0.1565399467945099, -0.6259316205978394, 0.2427203208208084, -0.1593153029680252, -0.5389478802680969, -0.4794638752937317, 0.1924113631248474, -0.9332585334777832, -0.4212276041507721, -0.5875186324119568, 0.8306018114089966, ...
func waysToChange(n int) int { dp := make([]int, n+1) dp[0] = 1 coins := []int{1, 5, 10, 25} for _, coin := range coins { for i := coin; i <= n; i++ { dp[i] = (dp[i] + dp[i-coin]) % 1000000007 } } return dp[n] }
[ -0.3543679416179657, 1.616491436958313, 0.704269289970398, -0.6862651109695435, 0.4381999671459198, -0.7207154035568237, 0.8851764798164368, -0.3661767542362213, -0.1655750274658203, 0.3871700167655945, -0.591734766960144, 0.3966975808143616, -0.14112414419651031, 0.9405683875083923, 0.1...
func NewInMemoryLaptopStore() *InMemoryLaptopStore { return &InMemoryLaptopStore{ data: make(map[string]*pb.Laptop), } }
[ -0.1961958408355713, -0.937334418296814, 0.13097897171974182, -0.11955928802490234, -1.8867902755737305, 0.42176222801208496, -0.659329891204834, -0.04079519212245941, 0.915934681892395, -0.8271653652191162, -0.5098916292190552, -0.5088598728179932, -0.9069380760192871, -0.1076726540923118...
func (store *InMemoryLaptopStore) Save(laptop *pb.Laptop) error { store.mutex.Lock() defer store.mutex.Unlock() if store.data[laptop.Id] != nil { return ErrAlreadyExists } //deep copy other, err := deepCopy(laptop) if err != nil { return err } store.data[other.Id] = other return nil }
[ -1.2675979137420654, 0.20529842376708984, 0.518085777759552, -0.1080421507358551, -0.12092670053243637, 0.5908798575401306, 0.3006030321121216, -0.5282562375068665, 0.7839850783348083, -0.04172353446483612, -1.3407152891159058, -0.6324836015701294, -1.0224212408065796, -0.01494539435952901...
func (store *InMemoryLaptopStore) Find(id string) (*pb.Laptop, error) { store.mutex.RLock() defer store.mutex.RUnlock() laptop := store.data[id] if laptop == nil { return nil, nil } //deep copy return deepCopy(laptop) }
[ -0.6996589303016663, 0.04420480877161026, 0.4429174065589905, 0.3226260244846344, -0.9602349996566772, 0.414295494556427, -0.009976483881473541, -0.9684023261070251, 0.4782586097717285, -0.16161547601222992, -0.042007043957710266, -0.38781046867370605, -1.3499457836151123, 0.53371447324752...
func (store *InMemoryLaptopStore) Search(ctx context.Context, filter *pb.Filter, found func(laptop *pb.Laptop) error) error { store.mutex.RLock() defer store.mutex.RUnlock() for _, laptop := range store.data { // time.Sleep(1 * time.Second) log.Print("checking laptop id: ", laptop.GetId()) //check the contex...
[ -0.8763307929039001, 0.10448671877384186, 0.6573938131332397, 0.5779930949211121, -0.7210971117019653, 0.6715739369392395, 0.17781203985214233, -0.058995913714170456, 0.41668397188186646, -0.1661089062690735, 0.400351881980896, 0.3910226821899414, -0.5977584719657898, -0.06616611778736115,...
func DaemonSetIsReady(resource common.ComponentResource) (bool, error) { var daemonSet appsv1.DaemonSet if err := getObject(resource, &daemonSet, true); err != nil { return false, err } // if we have a name that is empty, we know we did not find the object if daemonSet.Name == "" { return false, nil } // e...
[ -1.2370436191558838, -0.26233193278312683, 0.5228087902069092, -0.3149232566356659, -0.6195493340492249, -1.0214171409606934, -0.7077946066856384, -0.3307740390300751, 0.43691733479499817, -0.28899526596069336, -0.23732058703899384, 0.2927442193031311, 0.3459928631782532, -0.21913845837116...
func (m *MovieResult) Get(url, from, id, accessToken string) (error) { //format url url = url + "/api/" + from + "/movie/" + id //call get request result, err := tools.GetRequest(url, accessToken) if err != nil { return err } //check if status code is 200 if result.StatusCode != 200 { return errors.New(st...
[ -1.1822694540023804, -0.5254391431808472, 0.9268679618835449, 0.07667919248342514, 0.23402956128120422, -0.47300583124160767, -1.3096274137496948, -0.0912165716290474, -0.6534502506256104, -0.1869587004184723, -0.45305994153022766, 1.492343783378601, -0.5352001190185547, -0.149269938468933...
func NewSecretFileServerConfig(certFile string, keyFile string) Config { return Config{ Mode: SecretFile, FileUtil: util.FileUtilImpl{}, ServiceIdentityCertFile: certFile, ServiceIdentityPrivateKeyFile: keyFile, } }
[ 0.17809216678142548, -0.30227425694465637, 0.4503701627254486, 0.7682724595069885, -0.39680227637290955, 0.3651224970817566, -0.445033997297287, 0.9314336776733398, -0.8824424147605896, 0.22734269499778748, -1.7974032163619995, 0.05022968724370003, -0.4461776614189148, 1.0829336643218994, ...
func (s *Server) tailOne(file, tag string, whence int) { defer s.registry.Remove(file) t, err := follower.New(file, follower.Config{ Reopen: true, Offset: 0, Whence: whence, }) if err != nil { log.Errorf("%s", err) return } if tag == "" { tag = path.Base(file) } for { select { case line, ok ...
[ 0.6536344289779663, 0.18489107489585876, 0.9171229004859924, -0.7969536781311035, 0.0930076539516449, 0.379019170999527, 0.8046557903289795, 0.8472809791564941, -0.7324013710021973, 0.3001691997051239, -0.9395390152931213, 0.36875712871551514, -0.1849672943353653, 0.7469034790992737, 0.4...
func (s *Server) tailFiles() { log.Debugf("Evaluating globs every %s", s.config.NewFileCheckInterval) firstPass := true for { if s.closing() { return } s.globFiles(firstPass) time.Sleep(s.config.NewFileCheckInterval) firstPass = false } }
[ 0.2801887094974518, -0.36786511540412903, 0.46325910091400146, -0.34397566318511963, 0.2259317934513092, 1.2355268001556396, 0.8845335245132446, -0.5136297941207886, -0.849658191204071, -0.38171032071113586, 0.15982936322689056, 0.6585032343864441, -1.654416799545288, 0.772720456123352, ...
func matchExps(value string, expressions []*regexp.Regexp) bool { for _, exp := range expressions { if exp.MatchString(value) { return true } } return false }
[ 0.3830246031284332, -0.33791711926460266, 0.3554540276527405, 0.22213543951511383, -0.5362101197242737, -0.2920810282230377, -0.33743518590927124, 0.6790385842323303, 0.45526501536369324, 0.26934242248535156, 0.6150822043418884, -0.9073627591133118, -0.6530472040176392, -0.4418898224830627...
func GenerateToken(id int, account string, role string) (token string, err error) { nowTime := time.Now() expireTime := nowTime.Add(3 * time.Hour) // token發放後多久過期 claims := Claims{ ID: id, Account: account, Role: role, StandardClaims: jwt.StandardClaims{ ExpiresA...
[ 0.19078120589256287, -0.21875645220279694, 0.8509527444839478, -0.08440474420785904, 0.04760557413101196, 0.5398189425468445, -0.17720328271389008, 0.46162188053131104, 0.12670239806175232, -0.22662970423698425, -1.0615767240524292, 0.6103891730308533, 0.3530598282814026, -0.41052171587944...
func (m *FriendServiceMock) GetFriends() ([]*entity.Friend, error) { if m.Err != nil { return []*entity.Friend{}, m.Err } return entitymock.Friends, nil }
[ -0.8911314606666565, 0.6679427623748779, 0.47283241152763367, 1.1101609468460083, 1.6408028602600098, 0.37722593545913696, 0.1420007199048996, -0.5692853331565857, 0.29207319021224976, -0.9648866653442383, 0.4646000266075134, 0.17937052249908447, -0.7136573791503906, 0.6526858806610107, ...
func (m *FriendServiceMock) CreateFriend(*entity.Friend) (*entity.Friend, error) { if m.Err != nil { return nil, m.Err } return entitymock.FriendAndrys, nil }
[ 0.2461465299129486, -0.2585238516330719, 0.529925525188446, 0.33192092180252075, 1.140601634979248, 0.9445427060127258, 0.1633421629667282, -0.28352248668670654, -0.16587385535240173, -0.5494429469108582, 0.5645118355751038, -0.8329467177391052, -0.5385128855705261, 0.9905189871788025, 1...
func (m *FriendServiceMock) UpdateFriend(*entity.Friend) (*entity.Friend, error) { if m.Err != nil { return nil, m.Err } return entitymock.FriendBudi, nil }
[ -0.31362131237983704, -0.5829218626022339, 0.6164750456809998, 1.037550449371338, 0.4994981288909912, 0.9417188763618469, 0.375532329082489, -0.20473922789096832, -0.2813973128795624, -0.2836589217185974, -0.09667397290468216, -0.23976247012615204, -0.9564727544784546, 0.4208572208881378, ...
func (m *FriendServiceMock) DeleteFriend(id int64) error { return m.Err }
[ -0.17991513013839722, 0.4539032578468323, 0.5192391872406006, 0.9759193062782288, 0.8397114872932434, 0.6141684651374817, 0.8612154126167297, -0.3201144337654114, 0.3454872965812683, -1.2725030183792114, -0.07693100720643997, 0.14956428110599518, -1.0143826007843018, 1.2627363204956055, ...
func (*SaveApplicationLogEventRequest) TypeID() uint32 { return SaveApplicationLogEventRequestTypeID }
[ 0.5250731110572815, -0.9033868312835693, 0.6125419735908508, 0.33159783482551575, 0.3588294982910156, 1.1474511623382568, 0.0738646611571312, -0.19027486443519592, 0.6083965301513672, 0.3665739893913269, -0.4960899353027344, 0.7085787057876587, -1.0546764135360718, 0.63725745677948, 0.74...
func (*SaveApplicationLogEventRequest) TypeName() string { return "saveApplicationLogEvent" }
[ -0.08029293268918991, -0.7823100686073303, 0.6105149388313293, 0.35334810614585876, 0.2798452079296112, 0.48243623971939087, -0.1081208810210228, 0.01499190554022789, 0.19605758786201477, 0.6881680488586426, -0.3973114788532257, 0.2099805325269699, -0.40017983317375183, -0.3181480765342712...
func (s *SaveApplicationLogEventRequest) TypeInfo() tdp.Type { typ := tdp.Type{ Name: "saveApplicationLogEvent", ID: SaveApplicationLogEventRequestTypeID, } if s == nil { typ.Null = true return typ } typ.Fields = []tdp.Field{ { Name: "Type", SchemaName: "type", }, { Name: "Chat...
[ 0.23400425910949707, -0.20868678390979767, 0.4804682433605194, -0.6702898144721985, 0.28221040964126587, 0.33767977356910706, 0.06783551722764969, -0.6050934791564941, -0.2709366977214813, 0.5770167708396912, -0.8894229531288147, -0.3484060764312744, -0.3245694935321808, 0.2799297571182251...
func (s *SaveApplicationLogEventRequest) GetType() (value string) { if s == nil { return } return s.Type }
[ 0.3683759868144989, 0.8952263593673706, -0.19444209337234497, 1.0534700155258179, 1.0215377807617188, 0.10113036632537842, 0.7172890305519104, -0.24936139583587646, 0.9534845948219299, -0.04673813655972481, 0.12929517030715942, -0.6549873352050781, -0.3209526240825653, 0.6190347075462341, ...
func (s *SaveApplicationLogEventRequest) GetChatID() (value int64) { if s == nil { return } return s.ChatID }
[ 1.3386245965957642, 0.3525030016899109, 0.292519748210907, 0.9246950149536133, 0.147706538438797, 1.1620341539382935, 0.5535560846328735, -0.29338541626930237, 0.7107054591178894, -0.11392735689878464, 0.13383081555366516, -0.2203626185655594, 0.32933130860328674, 0.5811020135879517, 0.4...
func (s *SaveApplicationLogEventRequest) GetData() (value JSONValueClass) { if s == nil { return } return s.Data }
[ -0.2045220583677292, 0.6329943537712097, 0.12169023603200912, 0.7405247092247009, 0.5767726302146912, 0.4092376232147217, 0.4361875653266907, -0.4179781973361969, 1.1066843271255493, -1.115375280380249, 0.01295396313071251, 0.10603761672973633, 0.6242069602012634, 0.6744157671928406, 0.3...
func (c *Client) SaveApplicationLogEvent(ctx context.Context, request *SaveApplicationLogEventRequest) error { var ok Ok if err := c.rpc.Invoke(ctx, request, &ok); err != nil { return err } return nil }
[ -0.5764926075935364, 0.07248622924089432, 0.4049484431743622, -0.040233366191387177, -0.1982780247926712, 0.7841184735298157, -0.20280702412128448, -0.6105468273162842, -0.18117696046829224, 0.8398171067237854, -1.024502158164978, 1.1900287866592407, -0.2974475026130676, 0.4269068837165832...
func (L *LState) L() *glua.LState { return L.gl }
[ 0.5250542163848877, -0.5369921922683716, 0.16898353397846222, -0.02300088480114937, -1.1053756475448608, 1.0807112455368042, 0.6925937533378601, -0.3093658685684204, 1.5967079401016235, -0.9530653357505798, -0.2357977032661438, -0.08331312984228134, 0.0706557109951973, -0.3271883428096771,...
func (L *LState) Close() { if L.pool == nil { L.cancelFunc() L.gl.Close() } else { L.pool.pushback(L) } }
[ 0.7999125719070435, 0.31269344687461853, 0.4932725429534912, -0.1794346272945404, -0.46481451392173767, 0.6834719777107239, 0.48495012521743774, -0.10434695333242416, 0.3403870463371277, -0.14210036396980286, 0.22133558988571167, -0.03753010183572769, -0.5173004865646362, 0.231425777077674...
func (L *LState) RegType(typename string, ins interface{}) { export.NewType(L.L(), typename, ins) }
[ -0.12129592895507812, 0.7074573040008545, 0.2786487340927124, 0.07097945362329483, 1.2725855112075806, -0.014667975716292858, -0.11229726672172546, -0.16337990760803223, 1.0154515504837036, 0.14923015236854553, -0.31387901306152344, 0.5510969161987305, -0.5688645839691162, -0.2957310378551...
func (L *LState) DoProFiles(argsFile string) error { return doProFiles(L, argsFile) }
[ 0.18267317116260529, 0.5373596549034119, 0.36521077156066895, 0.17577700316905975, 1.1041349172592163, 1.1096765995025635, 0.27399662137031555, -0.15051370859146118, -0.295419842004776, 0.9734604954719543, -0.3094964623451233, -0.36417001485824585, -0.3450895845890045, 0.4856876730918884, ...
func (L *LState) DoFile(script string) error { return doFile(L, script) }
[ 0.12111929804086685, -0.19546212255954742, 0.32497450709342957, 0.37347856163978577, 0.32153892517089844, 0.278977632522583, 0.1811652034521103, -0.24669457972049713, 0.1606414020061493, 0.8071469068527222, -0.368781715631485, -0.11025609076023102, 0.41985633969306946, 0.8461824059486389, ...
func (L *LState) RegHotfix(file string) { if L.hfMgr != nil { L.hfMgr.reg(file) } }
[ 0.06334555894136429, 0.17914050817489624, 0.2302180379629135, 0.12279979884624481, 1.1448779106140137, -0.025218259543180466, -0.17165696620941162, 1.061352252960205, -1.1010189056396484, -0.8637911081314087, -0.8137261867523193, 0.40700283646583557, -0.392292857170105, 1.6158548593521118,...
func (L *LState) Call(funcname string, args ...interface{}) (glua.LValue, error) { if L.hfMgr != nil { L.hfMgr.check(L) } return call(L.L(), funcname, args...) }
[ 0.036700546741485596, 0.33289453387260437, 0.3362385928630829, 0.01128251850605011, -0.4281092882156372, 0.17720693349838257, -0.74345862865448, -0.1656368523836136, -0.14340482652187347, -0.32934942841529846, 0.5295959711074829, -0.08708891272544861, -0.27313727140426636, 1.24835503101348...
func (L *LState) UnmarshalLTB(script string, val interface{}) (interface{}, error) { return unmarshalLTB(L.L(), script, val) }
[ 0.5907890200614929, -0.19380336999893188, 0.5924475789070129, 0.08192002773284912, -1.7251893281936646, -0.4525575637817383, -0.6814501881599426, 0.5320103764533997, 0.6549955010414124, 0.42666110396385193, -0.0881672278046608, -0.3394699990749359, 0.28309935331344604, 0.7957950830459595, ...
func UnmarshalLTB(script string, val interface{}) (interface{}, error) { gluaOpts := glua.Options{ CallStackSize: 64, RegistrySize: 64, } L := glua.NewState(gluaOpts) defer L.Close() return unmarshalLTB(L, script, val) }
[ 0.6983314156532288, 0.6812384724617004, 0.6426792144775391, 0.1339692622423172, -1.0808982849121094, -0.5842604041099548, 0.3977384567260742, 0.08274444192647934, 0.5998709797859192, 0.7573380470275879, 0.12224142253398895, 0.08146516978740692, 0.009862375445663929, 0.6517652869224548, 0...
func NewState(opts ...Option) *LState { do := &Options{ HotfixTime: DefaultHotfix, CallStackSize: DefaultCallStackSize, RegistrySize: DefaultRegistrySize, } for _, option := range opts { option.f(do) } return NewStateWithOpts(do) }
[ 0.5422880053520203, 0.6959382891654968, 0.38559335470199585, 0.49255985021591187, 0.22119997441768646, -0.4124446511268616, -0.18881821632385254, -0.3161896765232086, 0.7189610004425049, -0.5469304323196411, -0.3848661184310913, 0.08891391009092331, -0.24554140865802765, 0.6225918531417847...
func NewStateWithOpts(do *Options) *LState { gluaOpts := glua.Options{ CallStackSize: do.CallStackSize, RegistrySize: do.RegistrySize, } ctx, cancel := context.WithCancel(context.Background()) L := &LState{ ctx: ctx, cancelFunc: cancel, gl: glua.NewState(gluaOpts), opts: ...
[ 0.7823227643966675, -0.25263088941574097, 0.5111636519432068, -0.40005552768707275, -1.165310263633728, -0.17754113674163818, -0.10829899460077286, -0.716163158416748, 1.7093682289123535, -0.18837109208106995, 0.16527159512043, -0.11008284240961075, 0.012256988324224949, 0.3512164056301117...
func SetHotfixTime(dur int64) Option { return Option{func(do *Options) { do.HotfixTime = dur }} }
[ 0.3247046172618866, 0.05078303813934326, 0.5090571641921997, 0.4771985411643982, 0.03588888421654701, 0.197881817817688, 0.1503078192472458, -0.22434762120246887, 0.4554540812969208, -0.4254964590072632, -1.4441534280776978, -0.2837659418582916, 0.6473409533500671, 1.2199245691299438, -0...
func SetCallStackSize(size int) Option { return Option{func(do *Options) { do.CallStackSize = size }} }
[ 0.5409325361251831, 1.2175287008285522, 0.5116482377052307, 0.2908114492893219, -0.31773853302001953, -0.06746026128530502, 0.00562089029699564, -1.489235758781433, 1.1713011264801025, -1.1872297525405884, -1.0776783227920532, -0.11093667894601822, -0.35688185691833496, 1.177142858505249, ...
func SetRegistrySize(size int) Option { return Option{func(do *Options) { do.RegistrySize = size }} }
[ -0.30369800329208374, 1.468793511390686, 0.4047643840312958, -0.002227734075859189, 0.365213543176651, -0.3656160831451416, 1.470105528831482, 0.61167311668396, 0.8808107972145081, -0.40368685126304626, -1.1580487489700317, 0.5091885924339294, -0.3088624179363251, 0.713602602481842, -0.5...
func Asset(name string) ([]byte, error) { cannonicalName := strings.Replace(name, "\\", "/", -1) if f, ok := _bindata[cannonicalName]; ok { a, err := f() if err != nil { return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err) } return a.bytes, nil } return nil, fmt.Errorf("Asset %s not foun...
[ -0.7961482405662537, -1.2313158512115479, 0.6331650614738464, -0.6093901991844177, -1.546920895576477, -0.11101029813289642, 0.129714235663414, -1.3390333652496338, -1.135871410369873, 0.4855230152606964, 0.30901390314102173, 0.3249545693397522, -0.6009676456451416, -0.44264793395996094, ...
func MustAsset(name string) []byte { a, err := Asset(name) if err != nil { panic("asset: Asset(" + name + "): " + err.Error()) } return a }
[ -0.012778956443071365, 0.11985661834478378, 0.4091298282146454, -0.5268413424491882, -0.8276715278625488, 0.4719155430793762, -0.8186293840408325, -1.5736604928970337, 0.16388541460037231, 0.6357062458992004, -0.5354578495025635, 0.35693347454071045, 0.0057142809964716434, -0.0248885955661...
func AssetInfo(name string) (os.FileInfo, error) { cannonicalName := strings.Replace(name, "\\", "/", -1) if f, ok := _bindata[cannonicalName]; ok { a, err := f() if err != nil { return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err) } return a.info, nil } return nil, fmt.Errorf("Asset...
[ 0.371969997882843, -1.1052993535995483, 0.5630446076393127, -0.922572672367096, -1.356387734413147, 0.0033556853886693716, 0.6777529716491699, -0.8006685972213745, -1.2748286724090576, 0.3115358352661133, 0.2636086046695709, 0.26388120651245117, 0.0635773167014122, -0.3988074064254761, 0...
func AssetNames() []string { names := make([]string, 0, len(_bindata)) for name := range _bindata { names = append(names, name) } return names }
[ -0.7293784618377686, -0.8460342288017273, 0.7321816682815552, -0.39323121309280396, -0.48951536417007446, 0.7661203145980835, -0.5028699636459351, -0.8655748963356018, -0.4145073890686035, 0.8099913597106934, 0.16903363168239594, 1.163049578666687, -0.028152840211987495, 0.0342608317732811...
func RestoreAsset(dir, name string) error { data, err := Asset(name) if err != nil { return err } info, err := AssetInfo(name) if err != nil { return err } err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755)) if err != nil { return err } err = ioutil.WriteFile(_filePath(dir, name), d...
[ 0.3437124192714691, -0.3622540235519409, 0.6770355701446533, -1.2592030763626099, -0.006139514967799187, -0.04453148692846298, -0.0072639440186321735, -0.43950510025024414, -0.20619122684001923, -0.2510169744491577, 0.1784360408782959, 0.13568510115146637, -0.23627112805843353, -0.56985116...
func RestoreAssets(dir, name string) error { children, err := AssetDir(name) // File if err != nil { return RestoreAsset(dir, name) } // Dir for _, child := range children { err = RestoreAssets(dir, filepath.Join(name, child)) if err != nil { return err } } return nil }
[ 0.42261892557144165, 0.30020031332969666, 0.5813396573066711, -0.20641657710075378, -0.23828908801078796, -0.24414615333080292, 0.5739709138870239, -0.029911456629633904, 0.06188219040632248, -0.43923482298851013, 0.5113736987113953, 0.3275970220565796, -0.6125145554542542, 0.0351656526327...
func NewDouble(t godouble.T, configurators ...func(*awsdouble.AWSTestDouble)) *SSODouble { result := &SSODouble{} configurators = append([]func(configurator *awsdouble.AWSTestDouble){func(d *awsdouble.AWSTestDouble) { d.SetDefaultCall(result.defaultMethodCall) d.SetDefaultReturnValues(result.defaultReturnValues)...
[ -1.2946709394454956, 0.9717071056365967, 0.5886915326118469, 1.017688512802124, -0.3412858247756958, -0.19640661776065826, 0.43067294359207153, -0.6745245456695557, 0.2520563006401062, -0.19490762054920197, -1.5472379922866821, 0.17146730422973633, 0.7588043212890625, 0.6059123277664185, ...
func NewRole(f *RolePostForm, t time.Time) *Role { role := Role{ ID: f.ID, Name: f.Name, Password: f.Password, RegDate: t} return &role }
[ 0.06288905441761017, -0.2586243748664856, 0.6257593631744385, 0.40056169033050537, -0.0051140557043254375, -0.13217443227767944, -1.072003960609436, -0.4619458317756653, -0.5875512957572937, -0.4298648536205292, -0.13523030281066895, -0.31548744440078735, 0.005048652179539204, 0.2214583903...
func (n *NoOpAllocator) GetPoolQuota() types.PoolQuotaMap { return types.PoolQuotaMap{} }
[ -0.7137975692749023, -0.33825695514678955, 0.43303006887435913, -0.09176310151815414, -0.16771557927131653, -0.23228900134563446, 0.7511932849884033, -0.6131113171577454, 0.0653592124581337, -0.12882836163043976, -1.0591531991958618, 1.0323855876922607, 0.4939764440059662, 0.12056332081556...
func (n *NoOpAllocator) FirstPoolWithAvailableQuota(preferredPoolIDs []types.PoolID) (types.PoolID, int) { return types.PoolNotExists, 0 }
[ -0.773779034614563, -0.831184983253479, 0.2653619050979614, -0.2562512755393982, 0.14864325523376465, 0.6849063038825989, 0.47199228405952454, -0.3111259937286377, 0.6127854585647583, 0.2055085450410843, 0.07864530384540558, 0.29051798582077026, 0.25610098242759705, 0.9667003154754639, -...
func (n *NoOpAllocator) Allocate(poolID types.PoolID, ip net.IP) error { return errNotSupported }
[ -0.5560874342918396, 0.9352547526359558, 0.35543692111968994, 0.30441340804100037, -0.31672003865242004, 0.1594986468553543, -0.2308148294687271, -0.7277044057846069, 0.5229887366294861, -0.10408473759889603, 1.244683861732483, 0.07599238306283951, -0.5790513157844543, 0.3501795828342438, ...
func (n *NoOpAllocator) AllocateMany(poolID types.PoolID, num int) ([]net.IP, error) { return nil, errNotSupported }
[ -1.670733094215393, 0.5363690853118896, 0.5830874443054199, 0.4186987578868866, -0.043193306773900986, -0.46606728434562683, -0.8826004862785339, -0.9758849143981934, 0.6445609927177429, -0.026178987696766853, 0.6208233833312988, -0.7385938763618469, -0.3591846227645874, 0.0288572348654270...
func (n *NoOpAllocator) ReleaseMany(poolID types.PoolID, ips []net.IP) error { return nil }
[ -1.9295755624771118, 0.21854686737060547, 0.6200010180473328, -0.2615192234516144, -0.27573442459106445, -0.6892659068107605, -0.3486335575580597, -0.6317675709724426, 0.19758164882659912, 0.24588267505168915, -0.04154923930764198, -0.6981807351112366, -0.4096022844314575, 1.00585377216339...
func (n *NoOpAllocator) PoolExists(poolID types.PoolID) bool { return false }
[ -1.6265286207199097, -0.26132887601852417, 0.40902435779571533, -1.056654453277588, 0.9627843499183655, 0.3913879990577698, 0.048046309500932693, -0.5565845370292664, 1.1101328134536743, 0.43214887380599976, 0.1549936830997467, 0.40159913897514343, -0.17422905564308167, 0.5307269096374512,...
func (dfs *DistributedFilesystem) ListBackups(dirpath string) ([]dao.BackupFile, error) { backups := make([]dao.BackupFile, 0) if dirpath = strings.TrimSpace(dirpath); dirpath == "" { dirpath = utils.BackupDir(dfs.varpath) } else { dirpath = filepath.Clean(dirpath) } // Validate the path if fp, err := os.St...
[ -0.17463281750679016, 0.05846371129155159, 0.7208574414253235, 0.41423580050468445, -0.08557329326868057, -0.6934396028518677, 0.4972859025001526, 0.14108149707317352, 0.05622103437781334, 0.1290503442287445, 0.4454208314418793, -1.108436942100525, -0.16121633350849152, 0.16974502801895142...
func (dfs *DistributedFilesystem) Backup(dirpath string, last int) (string, error) { dfs.log("Starting backup") // get the full path of the backup name := time.Now().Format("backup-2006-01-02-150405") if dirpath = strings.TrimSpace(dirpath); dirpath == "" { dirpath = utils.BackupDir(dfs.varpath) } filename := ...
[ -0.7559551000595093, 1.196421504020691, 0.7262594103813171, -0.11832592636346817, -0.6144011616706848, -0.6407161355018616, 1.4847091436386108, -0.886489987373352, 0.6282065510749817, 0.5103724002838135, 0.648997962474823, -0.7257116436958313, 0.21623563766479492, -0.16629905998706818, 0...
func newRequest(host string, port int, b []byte, downloadpath string) string { conn, _ := net.Dial("tcp", fmt.Sprintf("%s:%d", host, port)) defer conn.Close() if b != nil { conn.Write(b) return "OK" } if downloadpath != "" { file, err := os.Create(downloadpath) defer file.Close() if err != nil { Logge...
[ 0.06971950829029083, -0.20617082715034485, 0.7844447493553162, 0.29820823669433594, 0.06091368570923805, 0.21127058565616608, -0.32162827253341675, -0.420269250869751, -0.28430140018463135, 0.692814290523529, 0.8066644668579102, -0.09644653648138046, -0.4840432405471802, -0.622498393058776...
func NewRoleAssignment(ctx *pulumi.Context, name string, args *RoleAssignmentArgs, opts ...pulumi.ResourceOption) (*RoleAssignment, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.PrincipalId == nil { return nil, errors.New("invalid value for required argume...
[ -0.7987645864486694, -0.2717468738555908, 0.41876220703125, -0.8259570598602295, 0.1993611752986908, 0.5675309300422668, -0.052644483745098114, 0.007847356610000134, 0.2507253587245941, 0.7079218626022339, -0.423974871635437, 0.11748486757278442, -0.6096941232681274, -0.19767554104328156, ...
func GetRoleAssignment(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RoleAssignmentState, opts ...pulumi.ResourceOption) (*RoleAssignment, error) { var resource RoleAssignment err := ctx.ReadResource("azure:marketplace/roleAssignment:RoleAssignment", name, id, state, &resource, opts...) if err != nil ...
[ -0.5664952993392944, -0.7812674045562744, 0.417196661233902, -0.7270103693008423, 0.14550207555294037, -0.20370766520500183, -0.2241048365831375, -0.14345397055149078, 1.0126192569732666, 0.39457759261131287, 0.3126755356788635, 1.0795265436172485, 0.019637977704405785, -1.1252596378326416...
func BetterLinearSearch(A []int, x int) (int, bool) { for i := range A { if A[i] == x { return i, true } } return 0, false }
[ 0.01222976204007864, -0.7732765078544617, 0.5688384771347046, -0.39819902181625366, -0.952071487903595, 0.012800867669284344, -0.7060570120811462, 0.48196902871131897, -0.11699189245700836, 0.22870972752571106, -1.0764960050582886, 0.5470389127731323, 0.37344640493392944, -0.27285990118980...
func (vm *VirtualMemory) InsertConstant(cte string, t types.CoreType) (Address, error) { if !vm.FindConstant(cte) { // new constant nextAvailable, next_err := vm.NextConst(t) if next_err != nil { // add constant return Address(-1), errors.New("Couldn't find next available address for new constant.") } vm...
[ -0.18381963670253754, 0.2663256525993347, 0.6736719608306885, -0.9287267327308655, -0.43756750226020813, 0.5128224492073059, 0.4513491988182068, 0.3464360535144806, -0.3340640664100647, 0.9331005215644836, -0.16253484785556793, -0.2962123155593872, -1.6350053548812866, -0.5635031461715698,...
func (vm *VirtualMemory) ConstantMap() map[string]int { return vm.constants_map }
[ 0.3136886954307556, -0.4825417101383209, 0.42360278964042664, 0.37149614095687866, -0.4534623324871063, 1.1263313293457031, 0.06706461310386658, 1.1045143604278564, 0.3573680818080902, 1.2049057483673096, 0.24868462979793549, 0.2509947121143341, -0.640697717666626, -0.35210657119750977, ...
func ExampleAssignmentsVMSSClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armguestconfiguration.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.F...
[ 0.5037246346473694, -0.497102826833725, 0.7584584355354309, -0.48353978991508484, -0.233878031373024, -0.3432830274105072, -0.21262453496456146, 0.18101096153259277, -0.4960223436355591, 0.42783504724502563, 0.0927218347787857, 0.6000741124153137, -0.45913103222846985, -0.828949511051178, ...
func ExampleAssignmentsVMSSClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armguestconfiguration.NewClientFactory("<subscription-id>", cred, nil) if err != nil { lo...
[ 0.8037959933280945, -0.6173989176750183, 0.824004590511322, -0.36437535285949707, -0.34460294246673584, -0.31811782717704773, 0.27761340141296387, 0.4171735346317291, -0.02438344992697239, 0.7989706993103027, -0.05131684988737106, 0.44213026762008667, -0.6025169491767883, -0.86165684461593...
func ExampleAssignmentsVMSSClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armguestconfiguration.NewClientFactory("<subscription-id>", cred, nil) if err != nil ...
[ 0.026798270642757416, -0.41393962502479553, 0.41528376936912537, -0.5376067161560059, -0.3896479904651642, -0.4228150248527527, -0.575068473815918, 0.2480335533618927, -0.32695797085762024, 0.9240224957466125, -0.021136783063411713, 0.021237118169665337, 0.049883145838975906, 0.69052213430...
func ExampleServiceClient_NewListAvailableSKUsByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdatabox.NewClientFactory("<subscription-id>", cred, nil) if er...
[ -0.11839510500431061, -0.0378476046025753, 0.5175411105155945, -0.07479027658700943, -0.8240599632263184, -0.3794030547142029, -0.1068088710308075, -0.32114657759666443, 0.23091623187065125, 0.3297291398048401, 0.5012762546539307, 0.5848508477210999, 0.4340730309486389, 0.9431797862052917,...
func ExampleServiceClient_ValidateAddress() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdatabox.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("...
[ 0.3003554046154022, -0.11940417438745499, 0.908016562461853, -0.10405921936035156, 0.006806300953030586, -0.6221253871917725, 0.1315009444952011, 0.03054150380194187, 0.6965329647064209, -0.4921460449695587, -0.20085382461547852, 1.740321397781372, 0.4055236577987671, -0.05193600803613663,...
func ExampleServiceClient_ValidateInputsByResourceGroup() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdatabox.NewClientFactory("<subscription-id>", cred, nil) if err != nil { ...
[ 0.3219955861568451, 0.14195695519447327, 0.5873006582260132, -0.5255736112594604, -0.6530045866966248, 0.3236260414123535, 0.4001888334751129, -0.6515582799911499, -0.10069718211889267, -0.7161604166030884, 0.29153957962989807, 0.9543734788894653, -0.11928188800811768, 0.6337449550628662, ...
func ExampleServiceClient_ValidateInputs() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdatabox.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("f...
[ 0.20558933913707733, 0.10894632339477539, 0.7232599258422852, -0.46194636821746826, -0.26532047986984253, 0.6167015433311462, 0.22468820214271545, -0.31713736057281494, 0.015538397245109081, -0.7565370202064514, 0.0025089778937399387, 1.2827041149139404, 0.16340799629688263, 0.215089932084...
func ExampleServiceClient_RegionConfiguration() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdatabox.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fata...
[ 0.27178728580474854, -0.2502425014972687, 0.6633376479148865, -0.4124748408794403, -0.4711844325065613, -0.7273972034454346, 0.022479424253106117, 0.10150984674692154, 0.2372465431690216, 0.30529290437698364, -0.4726388156414032, 1.1375374794006348, 0.4227396249771118, -0.07272984087467194...
func ExampleServiceClient_RegionConfigurationByResourceGroup() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdatabox.NewClientFactory("<subscription-id>", cred, nil) if err != n...
[ 0.1711074262857437, -0.19845299422740936, 0.5641487240791321, -0.3897519111633301, -0.6875157356262207, -0.7937154769897461, 0.10155996680259705, -0.2973197400569916, 0.04574364423751831, 0.3127264380455017, -0.09937310963869095, 0.8052172660827637, 0.33356136083602905, 0.17874309420585632...
func (m *BuildCache) Validate(formats strfmt.Registry) error { return nil }
[ 0.06377832591533661, 0.369181752204895, 0.36254337430000305, 0.554638147354126, 0.5719470977783203, 0.48728621006011963, 0.7767277359962463, 0.48417791724205017, -0.022039132192730904, -0.4383522570133209, 0.2576305568218231, -0.10284871608018875, -0.9444544911384583, 0.49857085943222046, ...
func confirm(out io.Writer, msg string) bool { fmt.Fprintf(out, "%s [Y/n] ", msg) s := bufio.NewScanner(os.Stdin) for { s.Scan() switch s.Text() { case "Y": return true case "n": return false default: fmt.Fprint(out, "Please answer Y or n: ") } } }
[ -0.059531018137931824, -0.11793413013219833, 0.7050554156303406, 0.06619822233915329, -0.8772721290588379, 0.2997113764286041, -0.046727824956178665, -0.18944425880908966, -1.1483489274978638, -0.18978452682495117, -0.07414929568767548, -0.1964951753616333, 0.19400061666965485, 0.898289620...
func Capitalize(str string) string { if len(str) <= 0 { return "" } if len(str) == 1 { return strings.ToUpper(str) } return strings.ToUpper(str[:1]) + strings.ToLower(str[1:]) }
[ 0.016723474487662315, 0.20530526340007782, 0.7499308586120605, 1.114740252494812, 0.30607596039772034, 0.017971981316804886, 0.017299963161349297, -0.08112261444330215, 0.2875433564186096, 0.3732980191707611, 0.775542140007019, 0.4330219626426697, -1.0002962350845337, 0.2886947691440582, ...
func (d *Delegate) ServicesForSpec(spec job.Job) (services []job.Service, err error) { // TODO: we need to fill these out manually, find a better fix spec.PipelineSpec.JobName = spec.Name.ValueOrZero() spec.PipelineSpec.JobID = spec.ID if spec.CronSpec == nil { return nil, errors.Errorf("services.Delegate expect...
[ 0.28793036937713623, -0.05048855021595955, 0.46904608607292175, -0.4661465287208557, -0.015718216076493263, 0.08180917054414749, -0.28938207030296326, 0.011197397485375404, 0.09315823018550873, -0.5189942717552185, 0.48611703515052795, 0.3900775611400604, 0.30145931243896484, 0.77312737703...
func New2(open OpenFunc, usable UsableFunc, values url.Values) (*Pool, error) { var maxOpen, maxIdle int = 10, 1 if s := values.Get(`maxOpen`); s != `` { if i, err := strconv.Atoi(s); err != nil { return nil, err } else { maxOpen = i } } if s := values.Get(`maxIdle`); s != `` { if i, err := strconv....
[ -1.091262698173523, -0.9392728209495544, 0.5156571865081787, -0.16288425028324127, -0.9171920418739319, -0.38809362053871155, 0.3796113133430481, 0.36442434787750244, -0.95780348777771, -0.3072124719619751, -0.43421462178230286, 0.4284943640232086, 0.5393775701522827, -0.10169319063425064,...
func CreateWorkDir(p *Parameters) { // Before we return, output the name we chose. if p.Verbose { defer func() { dir, err := filepath.Abs(p.WorkDir) CheckError(err) VerbosePrintf(p, "Storing intermediate files in %s", dir) }() } // If the user specified a directory, create it if necessary and return. ...
[ -0.44984084367752075, 0.08346807211637497, 0.6828954815864563, -0.1704876869916916, 0.5591477751731873, 0.23667442798614502, 0.8893532752990723, -0.5597442984580994, 0.30495062470436096, -0.4081970453262329, 0.0290352962911129, -0.30130887031555176, -1.0379416942596436, 0.8306731581687927,...
func CreateYosysScript(p *Parameters) { // Create a .ys file. yName := p.OutFileBase + ".ys" VerbosePrintf(p, "Writing a Yosys synthesis script to %s", yName) ys, err := os.Create(filepath.Join(p.WorkDir, yName)) CheckError(err) // Write some boilerplate text to it. fmt.Fprintln(ys, "### Design synthesis") fmt...
[ 0.23748770356178284, -0.1507265269756317, 0.438490629196167, -0.34951913356781006, 0.3634987771511078, -0.8144691586494446, 0.5239219665527344, -1.280989408493042, -0.3502011001110077, -0.4817931056022644, -0.6179527640342712, 0.679961085319519, 0.5261116027832031, 0.07749830931425095, -...
func RunCommand(p *Parameters, name string, arg ...string) { cmd := exec.Command(name, arg...) cmd.Stderr = os.Stderr VerbosePrintf(p, "Executing %s %s", name, strings.Join(arg, " ")) err := cmd.Run() CheckError(err) }
[ -0.25663140416145325, -0.5184667110443115, 0.6246946454048157, -0.20962339639663696, 0.33361154794692993, 1.0668998956680298, -0.8591544032096863, 0.6797714233398438, -0.5313325524330139, 0.03389362990856171, 0.2514802813529968, 1.3185309171676636, -0.22181370854377747, 0.5450395345687866,...
func (a *ASTNode) parseQMASMOutputLine(p *Parameters, haveVar bool, tys TypeInfo, ln string) { // Output a blank line between solutions. if len(ln) > 10 && ln[:10] == "Solution #" { fmt.Println("") return } // Extract a query variable and decimal value if both are // present. fields := strings.Fields(ln) if...
[ 0.31668078899383545, -0.6929707527160645, 0.667123019695282, -0.31579241156578064, -0.4066406488418579, -0.7839996814727783, 0.017858833074569702, -0.7944355010986328, -0.6481453776359558, -0.031985681504011154, 0.004252205602824688, -0.3074744641780853, 0.4160974621772766, 0.0717023536562...
func (a *ASTNode) parseQMASMOutput(p *Parameters, haveVar bool, tys TypeInfo) { // Open the QMASM output file. r, err := os.Open(p.OutFileBase + ".out") CheckError(err) rb := bufio.NewReader(r) // Discard lines until we find a solution. for { ln, err := rb.ReadString('\n') if err == io.EOF { notify.Fatal(...
[ 0.48520946502685547, -0.7516614198684692, 0.4840872883796692, -0.39982661604881287, 0.013887511566281319, -0.8571459650993347, 0.516975462436676, -0.8098428249359131, -0.927986741065979, 0.1987505406141281, 0.16148598492145538, -0.7655591368675232, 0.23528334498405457, 0.26692262291908264,...
func (a *ASTNode) showTail(fn string) error { r, err := os.Open(fn) if err != nil { return err } rb := bufio.NewReader(r) last := "" for { ln, err := rb.ReadString('\n') if err == io.EOF { break } if err != nil { return err } if ln != "" { last = ln } } if last != "" { fmt.Fprint(os.S...
[ 1.5482072830200195, -0.14771349728107452, 1.1031184196472168, -1.6906766891479492, -0.16240325570106506, -0.4779731035232544, 0.0006145304068922997, 0.4522637128829956, -0.3749942183494568, 0.2798902094364166, 0.395302414894104, 1.68461012840271, 0.9614171981811523, 0.7534193992614746, 0...
func (a *ASTNode) RunQMASM(p *Parameters, clVarTys map[*ASTNode]TypeInfo) { // Find the type of each query argument. cl := a.FindByType(QueryType)[0] tys := clVarTys[cl] // Write verbose output to a file in case the user wants to look at it // later. out, err := os.Create(p.OutFileBase + ".out") CheckError(err)...
[ -0.5505173802375793, -0.5067335367202759, 0.9028943181037903, -0.31795719265937805, -0.08497721701860428, -0.20745214819908142, 0.35743066668510437, -0.7724570035934448, -0.16885685920715332, -0.11520995944738388, 0.20372633635997772, 0.2382688820362091, -0.09842800348997116, 0.06175559014...
func Connect() (*gorm.DB, error) { db, err := gorm.Open(mysql.Open(config.DBURL), &gorm.Config{}) if err != nil { return nil, err } return db, nil }
[ -0.361333966255188, 0.4962933659553528, 0.4383305609226227, 0.5558452606201172, -0.3443276286125183, 0.6458797454833984, -0.47459036111831665, -0.033281099051237106, -0.8846946358680725, 0.4037107527256012, 0.056627143174409866, 0.1830819845199585, -1.253771185874939, 0.8673927783966064, ...
func TestCookieEchoRetransmission(t *testing.T) { lim := test.TimeOut(time.Second * 10) defer lim.Stop() loggerFactory := logging.NewDefaultLoggerFactory() log := loggerFactory.NewLogger("test") venv, err := buildVNetEnv(&vNetEnvConfig{ minDelay: 200 * time.Millisecond, loggerFactory: loggerFactory, l...
[ -0.32044717669487, -0.08213135600090027, 0.8451366424560547, -0.07091931253671646, 0.4257489740848541, -0.05463765934109688, 1.4360452890396118, -0.392092764377594, -0.2424324005842209, 0.10358250141143799, -0.05398346483707428, 0.6840537786483765, -0.02534523233771324, -0.0738209709525108...
func (client AppCollectionListResult) AppCollectionListResultPreparer() (*http.Request, error) { if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(client.Nex...
[ -0.34891366958618164, -0.07117245346307755, 0.23678183555603027, 0.04417484626173973, -0.010831438936293125, -0.5459099411964417, -0.7303087711334229, -0.9320452809333801, 0.3604792654514313, 0.05523224547505379, -0.6385253667831421, -1.1701698303222656, 0.35562363266944885, 0.726999938488...
func (client AppListResult) AppListResultPreparer() (*http.Request, error) { if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(client.NextLink))) }
[ -0.8349398970603943, -0.2330113649368286, 0.2955557405948639, -0.044781967997550964, -0.48179274797439575, -1.3751740455627441, -0.9868066906929016, -0.8343820571899414, 0.5094718337059021, -0.24815939366817474, -0.4610474705696106, -0.8666242957115173, -0.03211930766701698, 1.032745361328...
func (client CampaignsListResult) CampaignsListResultPreparer() (*http.Request, error) { if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(client.NextLink)))...
[ -0.9131982922554016, -0.206554114818573, 0.04672117531299591, -0.5980246663093567, -0.31102925539016724, -0.9848741888999939, -0.7121703028678894, -0.5766656398773193, 0.36828646063804626, 0.28730180859565735, -0.8238353729248047, -1.1874208450317383, -0.12126266211271286, 0.63795143365859...
func (client DevicesQueryResult) DevicesQueryResultPreparer() (*http.Request, error) { if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(client.NextLink))) ...
[ -1.0028316974639893, 0.45654013752937317, -0.0333004966378212, -0.6068150401115417, -0.3862607181072235, -0.7575877904891968, 0.040714289993047714, -1.3977744579315186, 0.4817635416984558, -0.3809095621109009, 0.21804820001125336, -0.6567175984382629, -0.04183175042271614, 0.51972955465316...
func (client ExportTaskListResult) ExportTaskListResultPreparer() (*http.Request, error) { if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(client.NextLink)...
[ -0.7419421076774597, 0.7998599410057068, 0.34658586978912354, -0.05084579065442085, -0.9486320614814758, -0.7680889368057251, -0.04251040518283844, -0.6553540825843811, 0.9391752481460571, 0.8160728216171265, -0.6942576169967651, -0.6492558121681213, -0.22116924822330475, 0.482561051845550...
func (client ImportTaskListResult) ImportTaskListResultPreparer() (*http.Request, error) { if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { return nil, nil } return autorest.Prepare(&http.Request{}, autorest.AsJSON(), autorest.AsGet(), autorest.WithBaseURL(to.String(client.NextLink)...
[ -0.6144179105758667, 0.5851200819015503, 0.5186300873756409, -0.005892200395464897, -0.7931098937988281, -0.3046691119670868, -0.07626798003911972, -0.4848572909832001, 0.5783377289772034, 0.8584358096122742, -1.1247913837432861, -0.8040608167648315, -0.46722468733787537, 0.277778953313827...
func (f Format) ValueForKey(key FormatKey) interface{} { switch key { case FormatItagKey: return f.Itag case FormatExtensionKey: return f.Extension case FormatResolutionKey: return f.Resolution case FormatVideoEncodingKey: return f.VideoEncoding case FormatAudioEncodingKey: return f.AudioEncoding case ...
[ -0.20311395823955536, -0.37305158376693726, 0.5577300786972046, 0.14073772728443146, -0.051824524998664856, -0.7242444157600403, -0.8945456147193909, -0.8394284248352051, 0.2362711876630783, 0.2675822675228119, 0.825144350528717, 0.6271899342536926, 0.492244690656662, 1.0858784914016724, ...
func (e *Entry) Section() string { const slash = "/" size := len(e.Request) // if size == 0 { return slash } indexSlash := 0 for i := 0; i < size; i++ { if e.Request[i:i+1] == slash { indexSlash++ //it meets the second slash, it can return the section if indexSlash == 2 { return e.Request[:i] ...
[ -0.2677578926086426, -0.31210023164749146, 0.8823367357254028, 0.8750006556510925, 0.00142049475107342, -0.17645227909088135, 0.8301049470901489, -0.37374648451805115, -0.3564337491989136, -0.0026782150380313396, 1.5060551166534424, 0.1982235610485077, 0.22161898016929626, 0.93612825870513...
func buildRepresentation(parts []*data.Word) data.MetricEntry { entry := data.MetricEntry{} entry.Details = make([]data.MetricDetail, 0, 5) // First, find the verb for index, word := range parts { if word.IsVerb == "1" && word.Value != "" { if word.Infinitive != "" { entry.Metric = word.Infinitive } els...
[ 0.28976404666900635, -0.2537843883037567, 0.4590381383895874, -0.13250410556793213, 0.36416807770729065, -0.7159258127212524, 0.12937650084495544, 0.07500794529914856, -0.11639890819787979, 0.5391926169395447, 0.697055995464325, 0.4888369143009186, -0.09126947820186615, 0.21741974353790283...