text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (policy *ticketPolicy) OnSetQueueClient() { }
[ 0.6320874691009521, -1.5195473432540894, 0.2519805431365967, -0.13681702315807343, 0.42149263620376587, 0.02818044275045395, 0.2764175534248352, -0.16750779747962952, 0.18114684522151947, 0.13508164882659912, -0.717918336391449, 0.9930562376976013, -0.3609669506549835, -0.22361230850219727...
func (policy *ticketPolicy) OnAddBlockTx(block *types.BlockDetail, tx *types.Transaction, index int32, dbbatch db.Batch) *types.WalletTxDetail { receipt := block.Receipts[index] amount, _ := tx.Amount() wtxdetail := &types.WalletTxDetail{ Tx: tx, Height: block.Block.Height, Index: int64(index)...
[ 0.22105872631072998, 0.028139209374785423, 0.997550904750824, -1.1171951293945312, -0.4890596866607666, 0.13730651140213013, -0.36156609654426575, -0.6471638679504395, 0.191043883562088, 0.6528685092926025, -0.181296706199646, 0.5904573798179626, -0.21543395519256592, 0.43312424421310425, ...
func (policy *ticketPolicy) OnDeleteBlockTx(block *types.BlockDetail, tx *types.Transaction, index int32, dbbatch db.Batch) *types.WalletTxDetail { receipt := block.Receipts[index] amount, _ := tx.Amount() wtxdetail := &types.WalletTxDetail{ Tx: tx, Height: block.Block.Height, Index: int64(ind...
[ 0.3067995309829712, -0.2997472584247589, 0.8630828261375427, -1.1191577911376953, -0.9931906461715698, 0.04546186327934265, -0.31034547090530396, -0.3495635688304901, 0.4406800866127014, 0.9107385277748108, -0.009654602967202663, 0.5299545526504517, -0.33906349539756775, 0.3711381256580353...
func (policy *ticketPolicy) OnWalletLocked() { // 钱包锁住时,不允许挖矿 atomic.CompareAndSwapInt32(&policy.isTicketLocked, 0, 1) FlushTicket(policy.getAPI()) }
[ -0.6443008780479431, -0.3533113896846771, 0.7081013321876526, -0.10153532773256302, -0.22812744975090027, 0.25472837686538696, 0.3826330006122589, -1.0058330297470093, 0.4944092929363251, 0.23353193700313568, -0.40762192010879517, 0.3125760853290558, -1.195752739906311, 0.2619951069355011,...
func (policy *ticketPolicy) OnWalletUnlocked(param *types.WalletUnLock) { if param.WalletOrTicket { atomic.CompareAndSwapInt32(&policy.isTicketLocked, 1, 0) if param.Timeout != 0 { policy.resetTimeout(param.Timeout) } } // 钱包解锁时,需要刷新,通知挖矿 FlushTicket(policy.getAPI()) }
[ -1.0810226202011108, -0.3455427885055542, 0.6019407510757446, -0.36553725600242615, -0.2376326620578766, -0.17900758981704712, 0.40296146273612976, -0.08757840096950531, 0.4875202178955078, 0.4304347038269043, -0.3292505443096161, 0.148318812251091, -1.250461220741272, 0.2720988392829895, ...
func (policy *ticketPolicy) OnCreateNewAccount(acc *types.Account) { }
[ 0.4869522154331207, -1.069563627243042, 0.17614194750785828, 0.7504065632820129, -0.2186911702156067, 0.5385223627090454, 0.7963134050369263, -0.6205503344535828, 0.05859988182783127, 0.030915457755327225, -0.7256076335906982, 0.2245427519083023, 0.291341632604599, 0.7713834643363953, -0...
func (policy *ticketPolicy) OnAddBlockFinish(block *types.BlockDetail) { if policy.needFlush { // 新增区块,由于ticket具有锁定期,所以这里不需要刷新 //policy.flushTicket() } policy.needFlush = false }
[ 0.16540324687957764, -0.07655908167362213, 0.9073314666748047, 0.09336251765489578, -0.018091680482029915, 0.9304853677749634, -0.3082801103591919, -0.47884801030158997, -0.7183042168617249, -0.02340072952210903, -0.7295705676078796, 0.4392799139022827, -0.7608698010444641, 1.3657485246658...
func (policy *ticketPolicy) OnDeleteBlockFinish(block *types.BlockDetail) { if policy.needFlush { FlushTicket(policy.getAPI()) } policy.needFlush = false }
[ 0.27843305468559265, -0.03596676141023636, 0.456063449382782, -0.3286859691143036, -0.4078168570995331, 0.4613058567047119, -0.29109805822372437, -0.05190519243478775, -0.3823927342891693, 0.5626890659332275, -0.6312708258628845, 0.35341259837150574, -0.6719177961349487, 1.577256441116333,...
func (this *WebController) List() { //新闻线索模块 week, _ := this.GetInt("week") //获取时间周期 //以下为算出每个周期的开始时间,人工录入的新闻都是按时间戳筛选的,接口的数据可直接调用week字段 var st int64 local := time.Now().Local().Format("2006-01-02") today, _ := time.Parse("2006-01-02 15:04:05", local + " 00:00:00") now := time.Now().Unix() p := this.FormToP("tab...
[ -0.4219966232776642, -0.18354660272598267, 0.8923355937004089, -0.11499359458684921, -0.3602989912033081, 0.4467974901199341, 0.3849865198135376, -0.0005969215999357402, -0.349845826625824, -0.04669942706823349, -0.4064669907093048, -0.22101527452468872, 0.6375519633293152, 1.1090172529220...
func (this *WebController) Topic() { //选题总览 p := P{} p["news_class"] = 1 p["dh"] = topic_dh p["old"] = 0 total := D(News).Find(p).Count() list := *D(News).Find(p).Sort("-date").Limit(100).All() if len(list) == 0 { p := P{} p["news_class"] = 1 p["dh"] = topic_dh p["old"] = 1 list = *D(News).Find(p).Sor...
[ -0.8637900948524475, 0.6047467589378357, 0.7603081464767456, 0.19683514535427094, 0.11082273721694946, 0.5168337225914001, 0.9643895030021667, -0.05780564248561859, -0.28258150815963745, 0.15399670600891113, 0.3952333927154541, -0.3431823253631592, 0.7303339838981628, 0.7168086767196655, ...
func (this *WebController) Operative() { //新媒体运营 week, _ := this.GetInt("week") client := *D(News).Find(P{"news_class": 10, "dh": trace_dh, "origin": 1, "week": week}).Sort("-ct").One() //客户端 web := *D(News).Find(P{"news_class": 10, "dh": trace_dh, "origin": 2, "week": week}).Sort("-ct").One() //网站 wx := *D(N...
[ -0.45361435413360596, 0.0344298854470253, 1.0283492803573608, -0.8552089929580688, 0.07932465523481369, 0.1039285659790039, 0.4690578579902649, -0.39879846572875977, -0.18830935657024384, 0.3626597225666046, -0.6478468179702759, -0.13016292452812195, 0.21383236348628998, 0.3011788725852966...
func (this *WebController) Track() { //CRT新媒体追踪 var total int index := 1 var works, auths = P{}, P{} week, _ := this.GetInt("week") work_count := *D(Total).Find(P{"week": week, "dh": track_dh}).One() //获取作品总数 total = ToInt(work_count["work_count"]) works_reprint := *D(News).Find(P{"dh": track_dh, "news_class": ...
[ 0.049416445195674896, 0.9434913396835327, 0.8762301802635193, -1.0369229316711426, 0.4636639356613159, 0.5071579217910767, 1.5496032238006592, -0.03636755421757698, -0.43496179580688477, -0.3355478048324585, -0.17837224900722504, -0.017722830176353455, 0.2694120407104492, 0.609685003757476...
func SimulateMsgUpdateClassMetadata(ak ecocredit.AccountKeeper, bk ecocredit.BankKeeper, qryClient types.QueryServer) simtypes.Operation { return func( r *rand.Rand, app *baseapp.BaseApp, sdkCtx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { c...
[ -0.3218834400177002, 0.42506977915763855, 1.0928537845611572, -0.8034492135047913, 0.18177881836891174, 0.49622276425361633, 0.21563734114170074, -0.7416407465934753, 0.4844243824481964, 1.288496971130371, -0.27609947323799133, 0.7629719376564026, -0.6420232653617859, -0.2767333984375, -...
func IsConsideredCyberspaceByDefault(levelID int) bool { return (levelID == 10) || (levelID > 13) }
[ 1.1086546182632446, -0.5256297588348389, 0.2877223491668701, -0.01723537966609001, 0.9371459484100342, -0.03506997600197792, 0.38857221603393555, 0.3788713216781616, 0.46613097190856934, -0.3457149863243103, -0.757080614566803, -0.560831606388092, -1.2965680360794067, 2.217538595199585, ...
func (blockChain *BlockChain) Initial() { blockChain.Chain = make(map[int32][]Block) blockChain.Length = 0 }
[ 0.02134658955037594, -0.2489648163318634, 0.2272147238254547, -0.8545951843261719, 1.292488694190979, 0.247298464179039, -0.44818630814552307, 0.44106370210647583, -0.5291193127632141, -0.0900484248995781, -1.0061607360839844, 1.36516273021698, -0.4652276039123535, 0.7197183966636658, 0....
func (blockChain *BlockChain) Get(height int32) []Block { return blockChain.Chain[height] }
[ -0.3422253429889679, -0.3102324604988098, 0.5416381359100342, 0.5669553279876709, 0.5059885382652283, -0.2831302285194397, -1.1161912679672241, -1.4118938446044922, -0.5989020466804504, 0.2542531192302704, -1.1336873769760132, 1.772878646850586, -1.0690761804580688, 0.025393212214112282, ...
func (blockChain *BlockChain) Insert(block Block) { if block.Header.Height > blockChain.Length { blockChain.Length = block.Header.Height } heightBlocks := blockChain.Chain[block.Header.Height] if heightBlocks == nil { // return empty block if heght is zero heightBlocks = []Block{} } for _, heightBlock := rang...
[ 0.22926273941993713, 0.8507665991783142, 0.9592591524124146, 0.22635231912136078, -0.07207098603248596, -0.02142062596976757, -0.2274131327867508, -0.4085223376750946, -0.22843539714813232, 0.39068174362182617, -1.510343313217163, -0.47776666283607483, -1.4542315006256104, 0.45634585618972...
func (blockChain *BlockChain) EncodeToJSON() (string, error) { jsonBytes, err := json.Marshal(blockChain) return string(jsonBytes), err }
[ -0.04410334303975105, -0.23267312347888947, 0.5258182883262634, -0.3592948019504547, -0.3260959982872009, -0.39985743165016174, -0.5021687746047974, -0.5559712052345276, 0.5916486382484436, 1.2258648872375488, 0.06388544291257858, 0.8706105351448059, -1.1052603721618652, -0.153349950909614...
func (blockChain *BlockChain) DecodeFromJSON(jsonString string) error { return json.Unmarshal([]byte(jsonString), blockChain) }
[ 0.39335593581199646, -0.8749185800552368, 0.3365323543548584, -0.577383279800415, -0.2570730447769165, 0.07478717714548111, -0.6980263590812683, -0.7393677830696106, 0.46684205532073975, 0.3477609157562256, -0.7787115573883057, 0.11386766284704208, -0.8099749088287354, 0.09220485389232635,...
func (blockChain *BlockChain) UnmarshalJSON(data []byte) error { blocks := make([]Block, 0) err := json.Unmarshal(data, &blocks) if err != nil { return err } blockChain.Initial() for _, block := range blocks { blockChain.Insert(block) // update blockChain by insertion } return nil }
[ -0.1838589906692505, 0.34078294038772583, 0.7380465865135193, -1.0974076986312866, 0.49446550011634827, -0.18325009942054749, 0.21941986680030823, -0.2045704573392868, -0.23437738418579102, 1.0415315628051758, -1.2185479402542114, -0.03369756415486336, -1.0195913314819336, 0.32611757516860...
func (blockChain *BlockChain) MarshalJSON() ([]byte, error) { blocks := make([]Block, 0) for _, v := range blockChain.Chain { blocks = append(blocks, v...) } return json.Marshal(blocks) }
[ 0.19465182721614838, -0.31154775619506836, 0.36240333318710327, 0.18528079986572266, 0.5152086615562439, -0.8677647113800049, -0.49039095640182495, -0.4400383532047272, 0.08613670617341995, 0.5777061581611633, -0.8718222975730896, 1.095542073249817, -0.8299596309661865, 0.6752913594245911,...
func TestBlockChain(t *testing.T) { jsonBlockChain := "[{\"hash\": \"3ff3b4efe9177f705550231079c2459ba54a22d340a517e84ec5261a0d74ca48\", \"timeStamp\": 1234567890, \"height\": 1, \"parentHash\": \"genesis\", \"size\": 1174, \"mpt\": {\"hello\": \"world\", \"charles\": \"ge\"}}, {\"hash\": \"24cf2c336f02ccd526a03683b52...
[ 0.4953954219818115, -0.3899620771408081, 1.055014967918396, -0.7326544523239136, 0.8084311485290527, 0.20719605684280396, -0.0017914442578330636, -0.6305170059204102, -0.13229568302631378, -0.20921175181865692, -1.6030099391937256, -0.027190526947379112, -0.28471171855926514, 0.04101397469...
func (g *LGraph) Transpose() Graph { if !g.directed { return g.Clone() } ng := NewGraph(g.directed, LISTGRAPH) for _, n := range g.nodes { ng.AddNode(n.value) } for _, n := range g.nodes { for _, e := range n.edges { if e.start == n { ng.AddEdge(e.end.value, e.start.value, e.weight) } } } retu...
[ 0.49710822105407715, 0.6935462951660156, 0.7673996686935425, -0.6153213381767273, -0.2388783097267151, -0.25551167130470276, -0.17575214803218842, -0.3598073720932007, 0.04751384258270264, 0.6122092008590698, -0.2771800458431244, -0.7270932793617249, -0.6774073839187622, -0.171304151415824...
func (g *LGraph) Weight(sv, ev interface{}) (int, error) { if err := g.checkExist(sv); err != nil { return -1, err } if err := g.checkExist(ev); err != nil { return -1, err } e := g.Edge(sv, ev) if e == nil { return -1, errors.New("Nil edge") } return e.weight, nil }
[ -0.2602463364601135, 0.3192954361438751, 1.1691200733184814, 0.6333019733428955, -0.33532315492630005, -0.0885467529296875, 1.0836807489395142, 0.5144729018211365, -0.002850310178473592, 1.064491629600525, 0.09042921662330627, -0.4801332354545593, -0.28763291239738464, 0.3486766219139099, ...
func (g *LGraph) Node(v interface{}) *Node { for _, n := range g.nodes { if n.value == v { return n } } return nil }
[ -0.8477216958999634, 0.03062768094241619, 0.2532562017440796, 0.07106079906225204, -0.23326772451400757, -0.5210717916488647, 0.26218733191490173, -0.16859085857868195, 0.7484630942344666, 0.5154719948768616, 0.062096111476421356, 0.6319255828857422, 0.0006777180824428797, 0.20580329000949...
func (g *LGraph) Edge(sv, ev interface{}) *Edge { var n1, n2 *Node switch sv.(type) { case *Node: n1 = sv.(*Node) n2 = ev.(*Node) default: n1 = g.Node(sv) n2 = g.Node(ev) } for _, n := range g.nodes { if n == n1 { for _, e := range n.edges { if g.directed { if e.end == n2 { return e ...
[ 0.11753175407648087, 0.2886846661567688, 0.8318145275115967, 1.2883987426757812, -0.005386099684983492, 0.25351446866989136, 0.16126425564289093, 0.08881742507219315, -0.14813731610774994, 0.2148873209953308, 0.7284632325172424, 0.7501316070556641, -0.4179791212081909, 0.09156087040901184,...
func (g *LGraph) checkExist(v interface{}) error { if g.Node(v) == nil { msg := fmt.Sprintf("ERROR: %v does not exist in graph", v) fmt.Println(msg) return errors.New(msg) } return nil }
[ 0.034127362072467804, -0.1731816530227661, 0.6288361549377441, 0.02041737176477909, 0.769290566444397, 0.4189133048057556, -0.04690912738442421, 0.22358420491218567, 0.14351917803287506, 1.7772423028945923, 0.6199232339859009, 0.5799335837364197, -0.6011300086975098, 0.8960729837417603, ...
func (g *LGraph) String() string { ret := "\n\n" for _, n := range g.nodes { ret += fmt.Sprintf("%-12v: \t", n.value) for _, e := range n.edges { if g.directed { if e.start == n { ret += fmt.Sprintf("%v --(%d)--> %v ", e.start.value, e.weight, e.end.value) } } else { ret += fmt.Sprintf("%v ...
[ 0.612567663192749, -1.0443005561828613, 0.6744065284729004, -0.7056384086608887, -0.5212922096252441, 0.8074263334274292, -0.03360086679458618, -0.786508321762085, -0.9122375249862671, 0.3475676476955414, 0.026690585538744926, 0.6468838453292847, 0.05115806311368942, -0.2860802412033081, ...
func (engine *OrcEngine) initOperationWorker() { tick := time.Tick(time.Duration(RefreshInterval) * time.Second) portsTick := time.Tick(5 * time.Minute) for { select { case op := <-engine.opsChan: op.Do(engine) case <-engine.refreshAllChan: engine.refreshAllPodGroups() case <-tick: engine.refreshAll...
[ -0.4325571358203888, 0.14385394752025604, 0.6943733096122742, -0.22977639734745026, -0.07650410383939743, -0.3341086208820343, 0.6069672107696533, -1.3896719217300415, -0.6850518584251404, 0.04912857338786125, -0.3767032027244568, -0.7522296905517578, -0.5246750712394714, 0.468303292989730...
func (engine *OrcEngine) checkDependsRemoveResult(name string, depCtrl *dependsController) { tick := time.Tick(5 * time.Second) for _ = range tick { switch depCtrl.RemoveStatus() { case 1: log.Infof("<OrcEngine> DependsCtrl %s is safely removed", name) engine.Lock() delete(engine.rmDepCtrls, name) eng...
[ -0.2009447067975998, 0.15862035751342773, 0.6791286468505859, -0.41817447543144226, -0.15428699553012848, -0.47644999623298645, 0.53486567735672, -0.5721330046653748, 0.14473381638526917, 0.5045607089996338, -0.7577412128448486, -0.40147665143013, -0.7964444756507874, 0.723865270614624, ...
func (engine *OrcEngine) checkPodGroupRemoveResult(name string, pgCtrl *podGroupController) { timeout := time.After(60 * time.Second) tick := time.Tick(5 * time.Second) for { select { case <-tick: if pgCtrl.IsRemoved() { log.Infof("<OrcEngine> PodGroup %s is safely removed", name) engine.Lock() de...
[ -0.5739046931266785, 0.32982105016708374, 0.4780600070953369, -0.08984144032001495, -0.5428562760353088, -0.8792386651039124, -0.45954856276512146, -1.095901370048523, -0.4989139437675476, 0.43065837025642395, 0.2581295371055603, -0.047238029539585114, -1.7743686437606812, 0.27232488989830...
func operatings(store storage.Store) []string { operatingPrefixKey := kLainDeploydRootKey + "/" + kLainPgOpingKey results := make([]string, 0) if keys, err := store.KeysByPrefix(operatingPrefixKey); err != nil { log.Warnf("[Store] Failed to fetch operating pod groups %s, %s", operatingPrefixKey, err) } else { f...
[ -1.8116508722305298, 0.28669440746307373, 0.5820428133010864, -0.06666556000709534, -0.3812762200832367, -0.11918885260820389, -0.7324169874191284, -0.6415571570396423, -0.2954910099506378, 1.3403300046920776, 1.0580525398254395, -0.05806818976998329, -0.28264886140823364, -0.0578760169446...
func canIWin0(maxChoosableInteger int, desiredTotal int) bool { if desiredTotal <= 0 { return true } if (1 + maxChoosableInteger) * maxChoosableInteger / 2 < desiredTotal { return false } nums := make([]int, maxChoosableInteger) for i := 1; i <= maxChoosableInteger; i++ { nums[i-1] = i } return pla...
[ -1.0350757837295532, -0.033801399171352386, 0.658619225025177, 1.0331156253814697, -0.6659356355667114, 0.1569179743528366, 0.9256129264831543, 0.1131429672241211, 0.07130717486143112, -0.27187684178352356, -0.34557342529296875, 0.47960197925567627, -0.6849108934402466, 0.24904587864875793...
func NewDB(db *sql.DB, dialect Dialect, logger Logger) *DB { return NewDBFromInterface(db, dialect, logger) }
[ 0.4190850853919983, 0.2347334921360016, 0.1866217851638794, 1.0440504550933838, -0.8617246747016907, -0.21802149713039398, -0.34376072883605957, -0.5401901006698608, 1.5840634107589722, -0.8518669009208679, 0.8611571788787842, -0.03179553523659706, 0.5491135120391846, 0.31877225637435913, ...
func NewDBFromInterface(db DBInterface, dialect Dialect, logger Logger) *DB { return &DB{ Querier: newQuerier(context.Background(), db, "", dialect, logger), db: db, } }
[ 0.04576905071735382, -0.031184924766421318, -0.019144173711538315, 0.017506303265690804, -0.6799874901771545, 0.2908482253551483, -0.42434680461883545, -1.0303252935409546, 1.0166560411453247, -0.42550763487815857, 0.3269181549549103, -0.47343572974205017, -0.6813513040542603, 0.6922826170...
func (db *DB) DBInterface() DBInterface { return db.db }
[ 0.09417781978845596, -0.12210824340581894, -0.1434258222579956, -0.09084375947713852, -0.046609848737716675, 0.8073599338531494, 0.06442917138338089, -0.2042112797498703, 0.5674600005149841, -0.670893669128418, -0.15417028963565826, -0.5991649031639099, -1.2781809568405151, 1.0119863748550...
func (db *DB) Begin() (*TX, error) { return db.BeginTx(db.Querier.ctx, nil) }
[ 0.04290090873837471, 0.6954582929611206, 0.1435970962047577, -0.045900482684373856, -0.45041555166244507, -0.2562851905822754, -0.22705428302288055, -0.568618655204773, 0.02110365405678749, -0.8145275712013245, 0.09546630829572678, 0.16772259771823883, -0.032415829598903656, 0.480686515569...
func (db *DB) BeginTx(ctx context.Context, opts *sql.TxOptions) (*TX, error) { db.logBefore("BEGIN", nil) start := time.Now() tx, err := db.db.BeginTx(ctx, opts) db.logAfter("BEGIN", nil, time.Since(start), err) if err != nil { return nil, err } return newTX(ctx, tx, db.Dialect, db.Logger), nil }
[ 0.08052625507116318, 0.6802521347999573, 0.5752248167991638, 0.05821928009390831, -0.5119588971138, -0.2624157965183258, -0.145161971449852, -0.32003074884414673, 0.7749219536781311, 0.014029488898813725, -0.02113138511776924, 0.1011209711432457, -0.047174327075481415, -0.0902293473482132,...
func (db *DB) InTransaction(f func(t *TX) error) error { return db.InTransactionContext(db.Querier.ctx, nil, f) }
[ -0.48843035101890564, 0.5434284210205078, 0.5304299592971802, -0.08499570935964584, -0.29896554350852966, -0.20251791179180145, 0.5830274224281311, 0.38422054052352905, -0.19809049367904663, 0.38814443349838257, -0.23434500396251678, -0.4455280900001526, -0.1671724021434784, -0.53667938709...
func (db *DB) InTransactionContext(ctx context.Context, opts *sql.TxOptions, f func(t *TX) error) error { tx, err := db.BeginTx(ctx, opts) if err != nil { return err } var committed bool defer func() { if !committed { // always return f() or Commit() error, not possible Rollback() error _ = tx.Rollback(...
[ -0.2591133713722229, 0.4964412450790405, 1.0336614847183228, -0.16645608842372894, -0.8652744889259338, -0.25310322642326355, 0.6796446442604065, 0.4196307063102722, -0.14030437171459198, 1.2703672647476196, 1.0050805807113647, -0.4720968008041382, -0.3029095232486725, -0.8199953436851501,...
func NewIterator(reader *bufio.Reader) (*Iterator, error) { iterator := &Iterator{ reader: reader, } // Read the header iterator.err = iterator.readHeader() if iterator.err != nil { return nil, iterator.err } return iterator, nil }
[ -0.02120327018201351, -1.3973877429962158, 0.353900671005249, -0.44985657930374146, -1.3961918354034424, -0.6169277429580688, -0.4195539057254791, 0.12745988368988037, -0.2515524625778198, 0.3254567086696625, 0.7632042765617371, -0.11281605064868927, -0.2075294405221939, -0.407568126916885...
func NewIteratorWithHeader(header *store.SegmentHeader, reader *bufio.Reader, data []byte) (*Iterator, error) { // Allocate iterator iterator := &Iterator{ reader: reader, } // Set the header and skip needing to physically read it iterator.logID = int64(header.LogID) iterator.timestamp = int64(header.Timestamp...
[ -0.040484294295310974, -1.4674235582351685, 0.43183451890945435, -0.20522205531597137, -1.0710121393203735, -0.7364647388458252, -0.7886216044425964, -0.31155097484588623, -0.20318180322647095, 0.40036165714263916, 0.6159915328025818, 0.005409991834312677, -0.21541613340377808, -0.71355825...
func (it *Iterator) readHeader() error { var size int var hlen uint64 size, hlen, it.err = ReadUvarint(it.reader) if it.err != nil { return it.err } hdr := make([]byte, hlen) _, it.err = it.reader.Read(hdr) if it.err != nil { return it.err } // Parse header header := store.SegmentHeader{} it.err = he...
[ -0.6287984848022461, -0.6781117916107178, 0.9384440183639526, -0.09948723018169403, -0.09533601254224777, 0.1541699320077896, -0.025883803144097328, 0.19832323491573334, -0.73851078748703, -0.021792683750391006, 0.535398006439209, 0.2507183253765106, -0.28951916098594666, -0.44593319296836...
func (it *Iterator) Next() (*Entry, error) { var length uint64 var size int var entry = &it.entry var reader = it.reader // Discard unread from previous Entry if entry.remaining > 0 { // Skip to next entry _, it.err = reader.Discard(entry.remaining) if it.err != nil { return nil, it.err } } entry....
[ -0.08168797194957733, -0.08428502082824707, 0.7098482251167297, -0.3387560248374939, -0.5059658885002136, -0.43103575706481934, -0.2625997066497803, -0.20326979458332062, 0.14896371960639954, 0.34876346588134766, 0.4365338981151581, 0.558585524559021, 0.14253279566764832, 0.217681899666786...
func ReadUvarint(r io.ByteReader) (int, uint64, error) { var x uint64 var s uint for i := 0; ; i++ { b, err := r.ReadByte() if err != nil { return i + 1, x, err } if b < 0x80 { if i > 9 || i == 9 && b > 1 { return i + 1, x, ErrOverflow } return i + 1, x | uint64(b)<<s, nil } x |= uint64(b...
[ -0.5561213493347168, -0.06777156889438629, 0.7460669279098511, -0.02437724359333515, -0.7846932411193848, -0.045292679220438004, 0.6773679852485657, 0.15584492683410645, -0.0580499991774559, 0.16630800068378448, 0.17673419415950775, 0.08215852081775665, -0.10697727650403976, 0.068268097937...
func ReadVarint(r io.ByteReader) (int, int64, error) { l, ux, err := ReadUvarint(r) // ok to continue in presence of error x := int64(ux >> 1) if ux&1 != 0 { x = ^x } return l, x, err }
[ -0.31224963068962097, -0.5197814106941223, 0.5232165455818176, 0.6950057148933411, -0.9413309097290039, 0.1522160917520523, -0.06902008503675461, 0.26772668957710266, 0.042955365031957626, 0.40827837586402893, 0.1385451853275299, -0.29846712946891785, -0.42698934674263, -0.1170800551772117...
func Varint(buf []byte) (int64, int) { ux, n := Uvarint(buf) // ok to continue in presence of error x := int64(ux >> 1) if ux&1 != 0 { x = ^x } return x, n }
[ 0.15049616992473602, -0.6899917125701904, 0.3260839283466339, 0.351396381855011, -0.7062406539916992, -0.34694772958755493, -0.11218930780887604, 0.060455575585365295, 0.39625799655914307, -0.38061124086380005, -0.44608476758003235, 0.27215856313705444, -0.652212381362915, -0.1787466704845...
func (o *PlannerTaskDetails) GetDescription() string { if o == nil || o.Description == nil { var ret string return ret } return *o.Description }
[ 0.9635521769523621, 0.51768958568573, 0.19859838485717773, 1.0335413217544556, 0.027586456388235092, -0.2646577060222626, 0.8149423003196716, -0.3713960647583008, 1.0705488920211792, -0.15496227145195007, 0.10518957674503326, -1.5214996337890625, -0.39177072048187256, 0.9984373450279236, ...
func (o *PlannerTaskDetails) GetDescriptionOk() (string, bool) { if o == nil || o.Description == nil { var ret string return ret, false } return *o.Description, true }
[ 0.23178155720233917, 0.25748708844184875, 0.41768133640289307, 0.7221865653991699, -0.2928920090198517, 0.3689560890197754, 0.8119139671325684, 0.14048734307289124, -0.12870191037654877, 0.7992991805076599, -0.24810616672039032, -1.6042979955673218, 0.07985620200634003, 1.2361117601394653,...
func (o *PlannerTaskDetails) HasDescription() bool { if o != nil && o.Description != nil { return true } return false }
[ 0.7492300868034363, 0.579421877861023, 0.14423158764839172, 0.40723779797554016, 0.432070791721344, -0.32079681754112244, 0.3312348425388336, 0.653285562992096, 0.46700578927993774, -0.12256456911563873, -0.44756582379341125, -0.9373643398284912, 0.17395183444023132, 0.8530523180961609, ...
func (o *PlannerTaskDetails) SetDescription(v string) { o.Description = &v }
[ 0.7114020586013794, 0.20347550511360168, -0.29379037022590637, 0.22724638879299164, -0.7182279825210571, 0.16156262159347534, 0.08556783944368362, -0.4370899200439453, -0.12179055064916611, 0.2942101061344147, 0.2680759131908417, 0.8340674042701721, 0.13837730884552002, -0.3210446536540985...
func (o *PlannerTaskDetails) SetDescriptionExplicitNull(b bool) { o.Description = nil o.isExplicitNullDescription = b }
[ 0.3941042125225067, -0.2123185396194458, 0.40178418159484863, -0.09868252277374268, -0.2631145715713501, 0.5787681341171265, 0.13943004608154297, 0.9900103807449341, 0.3470572829246521, 0.5878657102584839, -0.353374719619751, -0.1839890480041504, 0.911884069442749, 0.7986239194869995, 0....
func (o *PlannerTaskDetails) GetPreviewType() AnyOfmicrosoftGraphPlannerPreviewType { if o == nil || o.PreviewType == nil { var ret AnyOfmicrosoftGraphPlannerPreviewType return ret } return *o.PreviewType }
[ 0.5204100608825684, 0.3480462431907654, 0.33985549211502075, 1.2317216396331787, -0.6440479755401611, -0.3860168159008026, 0.12164740264415741, -0.2901996672153473, 0.9502522349357605, -0.7564484477043152, -0.12733341753482819, -1.2391917705535889, -0.5428645610809326, 1.4447811841964722, ...
func (o *PlannerTaskDetails) GetPreviewTypeOk() (AnyOfmicrosoftGraphPlannerPreviewType, bool) { if o == nil || o.PreviewType == nil { var ret AnyOfmicrosoftGraphPlannerPreviewType return ret, false } return *o.PreviewType, true }
[ -0.1547331064939499, 0.11137814819812775, 0.3882133662700653, 0.8990974426269531, -0.986155092716217, 0.03880966454744339, 0.47461798787117004, 0.0739361122250557, 0.39099276065826416, 0.7117161750793457, -0.8947227597236633, -1.5030338764190674, 0.07815196365118027, 1.5812116861343384, ...
func (o *PlannerTaskDetails) HasPreviewType() bool { if o != nil && o.PreviewType != nil { return true } return false }
[ 0.24525034427642822, 0.9295523166656494, 0.34592777490615845, 0.3089684247970581, -0.32465144991874695, -0.48329389095306396, -0.6110763549804688, 0.26001664996147156, 0.6935070157051086, -0.15913929045200348, -1.2024402618408203, -1.5742313861846924, 0.664436936378479, 1.9890638589859009,...
func (o *PlannerTaskDetails) SetPreviewType(v AnyOfmicrosoftGraphPlannerPreviewType) { o.PreviewType = &v }
[ 0.46859779953956604, -0.034760721027851105, -0.04014803469181061, 0.9498435854911804, -1.0176094770431519, 0.07241097837686539, -0.5008618235588074, -0.8042788505554199, 0.10666690766811371, -0.316053569316864, 0.17070692777633667, -0.4601200222969055, 0.14306870102882385, 1.00355339050292...
func (o *PlannerTaskDetails) SetPreviewTypeExplicitNull(b bool) { o.PreviewType = nil o.isExplicitNullPreviewType = b }
[ 0.4240506887435913, -0.4767783582210541, 0.33509063720703125, 0.0915619358420372, -1.2095524072647095, 0.5055931210517883, -0.19999009370803833, 0.9566251635551453, 0.6417095065116882, 0.7348262071609497, -0.6325796842575073, -0.24401342868804932, 1.025475263595581, 1.3929463624954224, 0...
func (o *PlannerTaskDetails) GetReferences() AnyOfobject { if o == nil || o.References == nil { var ret AnyOfobject return ret } return *o.References }
[ -0.21066710352897644, 0.4867902398109436, 0.2729501724243164, 0.923869788646698, 0.9331462383270264, -0.7838391661643982, 0.566771388053894, -1.3481963872909546, 0.6260246634483337, -0.9636371731758118, 0.42147940397262573, -1.2228987216949463, -1.299864411354065, 0.7376013994216919, 0.3...
func (o *PlannerTaskDetails) GetReferencesOk() (AnyOfobject, bool) { if o == nil || o.References == nil { var ret AnyOfobject return ret, false } return *o.References, true }
[ -0.27621641755104065, 1.0742558240890503, 0.32810235023498535, 0.8803908228874207, 0.9540297389030457, -0.7642684578895569, 0.8298176527023315, -0.6326063871383667, 0.19099847972393036, -0.7935132384300232, -0.1691552996635437, -0.7092540860176086, -0.7585634589195251, 0.8211244344711304, ...
func (o *PlannerTaskDetails) HasReferences() bool { if o != nil && o.References != nil { return true } return false }
[ -0.0016567906131967902, 0.9739360809326172, 0.07196718454360962, -0.5061862468719482, 1.3801608085632324, -0.26264700293540955, 0.18541653454303741, -0.14795856177806854, -0.2737826406955719, -1.3490618467330933, -0.05406437814235687, -0.7024616003036499, -0.9868952631950378, 0.37626773118...
func (o *PlannerTaskDetails) SetReferences(v AnyOfobject) { o.References = &v }
[ -0.6479814052581787, 0.2818693518638611, -0.05388503894209862, 0.19190828502178192, 0.2180611938238144, 0.03881058841943741, -0.22310316562652588, -1.8427468538284302, -0.43163207173347473, -0.7866924405097961, 0.31891506910324097, 0.3569413125514984, -0.7756084203720093, 0.055577255785465...
func (o *PlannerTaskDetails) SetReferencesExplicitNull(b bool) { o.References = nil o.isExplicitNullReferences = b }
[ 0.052322156727313995, -0.30480319261550903, 0.4504339098930359, -0.6350739002227783, 0.10315437614917755, 0.24025021493434906, 0.2521347999572754, 0.3387297987937927, 0.5390539765357971, 0.11847742646932602, -0.4395572543144226, 0.09031182527542114, 0.3605421185493469, 0.2884144186973572, ...
func (o *PlannerTaskDetails) GetChecklist() AnyOfobject { if o == nil || o.Checklist == nil { var ret AnyOfobject return ret } return *o.Checklist }
[ -0.3786126971244812, 0.11721839755773544, 0.3842533826828003, 1.5136884450912476, 0.7337961196899414, -0.31408724188804626, 0.8975709676742554, -0.0800880640745163, 0.650956928730011, 0.021980391815304756, -0.5126981139183044, -1.4120572805404663, -0.6166178584098816, 0.7855936288833618, ...
func (o *PlannerTaskDetails) GetChecklistOk() (AnyOfobject, bool) { if o == nil || o.Checklist == nil { var ret AnyOfobject return ret, false } return *o.Checklist, true }
[ -0.4016512334346771, -0.24765734374523163, 0.24261115491390228, 1.3472118377685547, 0.32834771275520325, 0.024069759994745255, 0.7361791729927063, 0.6378753185272217, -0.260886013507843, 0.889904260635376, -1.7101328372955322, -1.47456693649292, -0.40421611070632935, 1.1170533895492554, ...
func (o *PlannerTaskDetails) HasChecklist() bool { if o != nil && o.Checklist != nil { return true } return false }
[ -0.10749164968729019, 0.40745681524276733, 0.2359856367111206, 0.8006203174591064, 0.978875458240509, 0.16423991322517395, 0.1058477982878685, 1.2331538200378418, -0.3372367024421692, -0.007851398549973965, -1.5124831199645996, -0.9876728653907776, -0.05752749368548393, 0.8378737568855286,...
func (o *PlannerTaskDetails) SetChecklist(v AnyOfobject) { o.Checklist = &v }
[ -0.16100551187992096, -0.11229925602674484, 0.011173423379659653, 0.9763200283050537, 0.4201340973377228, 0.24792110919952393, 0.19210989773273468, -0.7008984088897705, -0.13556668162345886, 0.15663300454616547, -0.46287646889686584, -0.1927114874124527, 0.3282144367694855, 0.3122893273830...
func (o *PlannerTaskDetails) SetChecklistExplicitNull(b bool) { o.Checklist = nil o.isExplicitNullChecklist = b }
[ -0.034622181206941605, -0.23356695473194122, 0.3585257828235626, 0.42430800199508667, -0.19707876443862915, 0.44357240200042725, 0.10493394732475281, 1.8332209587097168, 0.29307475686073303, 0.9570330381393433, -1.294927954673767, -0.40639036893844604, 0.5816530585289001, 0.915885210037231...
func (o PlannerTaskDetails) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Description == nil { if o.isExplicitNullDescription { toSerialize["description"] = o.Description } } else { toSerialize["description"] = o.Description } if o.PreviewType == nil { if o.isExplicitNullP...
[ 0.30953076481819153, -0.06366730481386185, 0.5707913041114807, -0.7429269552230835, -0.5841529965400696, -0.033650629222393036, 0.5091450810432434, 0.21474087238311768, 0.5234854221343994, -0.06401596963405609, -1.0067559480667114, 0.7213306427001953, 0.5875805020332336, 0.1479701399803161...
func (fn WeaviateActionsPropertiesCreateHandlerFunc) Handle(params WeaviateActionsPropertiesCreateParams, principal interface{}) middleware.Responder { return fn(params, principal) }
[ 0.1637551337480545, -1.1208237409591675, 0.5166566371917725, 0.06934534758329391, 0.4647305905818939, 0.44943341612815857, 0.67268967628479, -0.0200201403349638, -0.13783328235149384, -0.7415749430656433, 0.7048717737197876, -0.37548863887786865, 0.21600830554962158, -0.4484448730945587, ...
func NewWeaviateActionsPropertiesCreate(ctx *middleware.Context, handler WeaviateActionsPropertiesCreateHandler) *WeaviateActionsPropertiesCreate { return &WeaviateActionsPropertiesCreate{Context: ctx, Handler: handler} }
[ 0.1852971464395523, -1.6175312995910645, 0.257820188999176, -0.16679629683494568, 0.7525099515914917, -0.41132041811943054, 0.4828089773654938, -0.3722575008869171, -0.48333659768104553, -0.3302665054798126, 0.21520346403121948, -0.3538571298122406, 0.9827814698219299, -0.11845622211694717...
func (b *BlockObjects) UnmarshalJSON(data []byte) error { var raw []json.RawMessage err := json.Unmarshal(data, &raw) if err != nil { return err } for _, r := range raw { var obj map[string]interface{} err := json.Unmarshal(r, &obj) if err != nil { return err } blockObjectType := getBlockObjectTyp...
[ -0.5668074488639832, -0.3326054811477661, 1.108934998512268, -0.2632036805152893, -0.42047902941703796, -0.1324910670518875, 0.4637613594532013, -0.7261050343513489, -0.5381205081939697, 0.8940311670303345, -0.6163802146911621, 0.4698542654514313, -0.5694710612297058, 0.7455804347991943, ...
func getBlockObjectType(obj map[string]interface{}) string { if t, ok := obj["type"].(string); ok { return t } if _, ok := obj["confirm"].(string); ok { return "confirm" } if _, ok := obj["options"].(string); ok { return "option_group" } if _, ok := obj["text"].(string); ok { if _, ok := obj["value"].(st...
[ -0.3562261760234833, -0.010625702328979969, 1.0660167932510376, 0.5128629207611084, 0.2342081516981125, -0.32126930356025696, -0.26301097869873047, -1.2678459882736206, -0.5792282223701477, 1.3527638912200928, -0.3517286479473114, 0.003472917713224888, -0.32923194766044617, -0.011761282570...
func (s TextBlockObject) validateType() MessageObjectType { return MessageObjectType(s.Type) }
[ 0.5817155241966248, -0.7396087050437927, 0.3382064998149872, 0.5136402249336243, 0.6008570790290833, -0.35712116956710815, 0.7636246681213379, -1.3364487886428833, 0.2742471694946289, -0.0514608733355999, -0.11922620981931686, 0.22930026054382324, -0.8832072615623474, 0.8528008460998535, ...
func (s TextBlockObject) MixedElementType() MixedElementType { return MixedElementText }
[ 0.1518644541501999, -0.952886164188385, 0.36761006712913513, 0.6987739205360413, -0.6790058016777039, 1.1323622465133667, -0.16501322388648987, -0.05995852127671242, 1.7216483354568481, -0.17113164067268372, -0.3441076874732971, -0.3459203541278839, -1.2095588445663452, 1.3338794708251953,...
func (s TextBlockObject) Validate() error { if s.Type != "plain_text" && s.Type != "mrkdwn" { return errors.New("type must be either of plain_text or mrkdwn") } // https://github.com/slack-go/slack/issues/881 if s.Type == "mrkdwn" && s.Emoji { return errors.New("emoji cannot be true in mrkdown") } return ni...
[ 0.24441970884799957, -0.18363438546657562, 0.5752612948417664, 0.13436302542686462, -0.3399643898010254, 0.10615933686494827, -0.16326706111431122, -0.4495701193809509, -0.6241564154624939, 0.09949584305286407, -0.28025883436203003, 0.26777464151382446, -1.1433519124984741, 0.9404552578926...
func NewTextBlockObject(elementType, text string, emoji, verbatim bool) *TextBlockObject { return &TextBlockObject{ Type: elementType, Text: text, Emoji: emoji, Verbatim: verbatim, } }
[ 0.5813786387443542, 0.009988777339458466, 0.4641733467578888, 0.9591845273971558, -0.9928975105285645, -0.14943654835224152, -0.7696797251701355, -0.1495789885520935, -0.8925172686576843, 0.42849013209342957, -0.6505237221717834, 0.5289707779884338, -0.6154868602752686, -0.0469347387552261...
func (t TextBlockObject) BlockType() MessageBlockType { if t.Type == "mrkdwn" { return MarkdownType } return PlainTextType }
[ 0.617945671081543, -0.241191104054451, 0.559837281703949, 0.6188350319862366, -0.03364855796098709, 0.06312472373247147, 0.04311647638678551, -0.762907862663269, 0.4957066476345062, 0.5900060534477234, 0.70490962266922, 0.34108707308769226, -1.0697306394577026, 0.9889345169067383, -0.294...
func (s ConfirmationBlockObject) validateType() MessageObjectType { return motConfirmation }
[ 0.7770251035690308, -0.5027686953544617, 0.4008696675300598, 1.4557466506958008, 0.6981565356254578, 0.17136317491531372, 0.8245598077774048, -1.1550647020339966, -0.1379556506872177, -0.00393082108348608, -0.053262319415807724, 0.45750224590301514, -0.7195962071418762, 1.4984146356582642,...
func (s *ConfirmationBlockObject) WithStyle(style Style) *ConfirmationBlockObject { s.Style = style return s }
[ 0.8741676211357117, -0.007473391480743885, 0.08510524034500122, 1.3792741298675537, -0.42938870191574097, -0.3676490783691406, 0.2434009462594986, -0.2905094027519226, -0.02431001514196396, 0.013876830227673054, -0.33666959404945374, -0.22863531112670898, -0.060999903827905655, 0.765837490...
func NewConfirmationBlockObject(title, text, confirm, deny *TextBlockObject) *ConfirmationBlockObject { return &ConfirmationBlockObject{ Title: title, Text: text, Confirm: confirm, Deny: deny, } }
[ 0.8068192005157471, -0.8681783676147461, 0.4707958698272705, 1.3894376754760742, -1.1048433780670166, 0.42992374300956726, -0.6839513182640076, -0.7016122937202454, -1.3506405353546143, -0.31792017817497253, -0.7053086161613464, 0.5503188967704773, -0.1848580241203308, 1.0731003284454346, ...
func NewOptionBlockObject(value string, text, description *TextBlockObject) *OptionBlockObject { return &OptionBlockObject{ Text: text, Value: value, Description: description, } }
[ 0.49185246229171753, -0.749122142791748, 0.4284857511520386, 0.3162219524383545, -1.3603252172470093, 0.010239007882773876, -0.9024364352226257, -0.40989598631858826, -0.6345979571342468, 0.13323885202407837, -1.0227351188659668, 1.021576166152954, -0.3035542368888855, 0.19996953010559082,...
func (s OptionBlockObject) validateType() MessageObjectType { return motOption }
[ 0.02927163988351822, -0.44875380396842957, 0.45325538516044617, 1.133026123046875, 1.001395344734192, -0.07875119149684906, 1.0668518543243408, -1.3120498657226562, 0.8901774883270264, 0.31086671352386475, -0.04021947830915451, 0.19625672698020935, -0.8720178008079529, 0.47593387961387634,...
func (s OptionGroupBlockObject) validateType() MessageObjectType { return motOptionGroup }
[ -0.3688918650150299, 0.043551255017519, 0.2916696071624756, 0.9515588283538818, 0.7008022665977478, -0.2006884068250656, 0.8850254416465759, -1.4388961791992188, 0.2843210697174072, 0.27026572823524475, 0.41763901710510254, 0.2617931365966797, -1.1932365894317627, 0.8664407134056091, 0.7...
func NewOptionGroupBlockElement(label *TextBlockObject, options ...*OptionBlockObject) *OptionGroupBlockObject { return &OptionGroupBlockObject{ Label: label, Options: options, } }
[ -0.28097283840179443, -0.21166592836380005, 0.346108078956604, 0.9903025031089783, -0.6328272819519043, 0.3842253088951111, -0.2965504825115204, -0.8581222891807556, -1.0718945264816284, 0.5044024586677551, -0.2234628051519394, 0.35290345549583435, -1.1532411575317383, -0.24254414439201355...
func runHandle(fn func() error) { if err := fn(); err != nil { log.Errorf("An error occurred when processing a VM update: %v\n", err) } }
[ 0.5345292687416077, 0.09706155210733414, 0.641512393951416, -0.1498667597770691, 0.559197723865509, 0.38213005661964417, 0.05523128807544708, 0.5840092301368713, -0.7234509587287903, -0.6002382636070251, 0.7773044109344482, 0.32205039262771606, -0.5215615630149841, -0.5489737391471863, 0...
func create(vm *api.VM) error { log.Infof("Creating VM %q with name %q...", vm.GetUID(), vm.GetName()) if err := ensureOCIImages(vm); err != nil { return err } vmCreated.Inc() // Allocate and populate the overlay file return dmlegacy.AllocateAndPopulateOverlay(vm) }
[ -0.1332521289587021, 1.327911615371704, 0.39705199003219604, 0.509840726852417, 0.7765275239944458, 0.18160957098007202, 0.07533056288957596, -0.952073335647583, 0.22096982598304749, 0.1747802048921585, 0.4630606770515442, -0.8946609497070312, 0.0009219874045811594, 0.9664016962051392, 0...
func ensureOCIImages(vm *api.VM) error { // Check if a image with this name already exists, or import it image, err := operations.FindOrImportImage(c, vm.Spec.Image.OCI) if err != nil { return err } // Populate relevant data from the Image on the VM object vm.SetImage(image) // Check if a kernel with this na...
[ 0.551049530506134, 0.30083611607551575, 0.5423377752304077, 0.41875892877578735, 1.4180599451065063, -0.3490760028362274, 0.05531962588429451, -0.5773442387580872, 0.4082617163658142, 1.0830588340759277, -0.15257471799850464, -0.7660451531410217, -0.14250093698501587, 0.7961134314537048, ...
func currentState(vm *api.VM) bool { _, err := providers.Runtime.InspectContainer(vm.PrefixedID()) return err == nil }
[ -0.1869562715291977, -0.027164142578840256, 0.4404860734939575, 0.090503990650177, 0.14788590371608734, -0.04654650762677193, -0.44623246788978577, -0.2417951226234436, 0.4844721853733063, 0.6762830018997192, 0.07225027680397034, 0.607766330242157, -0.5448257923126221, 0.9570743441581726, ...
func CalculatePermissions(g *GuildState, guildRoles []discordgo.Role, overwrites []discordgo.PermissionOverwrite, memberID int64, roles []int64) (perms int64) { perms = CalculateBasePermissions(g.ID, g.OwnerID, guildRoles, memberID, roles) perms = ApplyChannelPermissions(perms, g.ID, overwrites, memberID, roles) ret...
[ 0.15015429258346558, 0.3995211124420166, 0.6589345932006836, -0.13669507205486298, -0.15811322629451752, -1.2748136520385742, 0.0012296814238652587, -0.22383980453014374, -0.15267962217330933, 0.3249724209308624, 0.1742829829454422, -0.12194742262363434, -1.2709496021270752, 0.466560095548...
func CalculateBasePermissions(guildID int64, ownerID int64, guildRoles []discordgo.Role, memberID int64, roles []int64) (perms int64) { if ownerID == memberID { return AllPermissions } // everyone role first for _, role := range guildRoles { if role.ID == guildID { perms |= int64(role.Permissions) break ...
[ 0.4929530620574951, -0.08897771686315536, 0.9805567264556885, 0.2543567419052124, -0.07795708626508713, -0.5416500568389893, -0.49945953488349915, -0.4722931385040283, -0.13150309026241302, 0.5302959680557251, 0.21988150477409363, 0.30650976300239563, -1.5253959894180298, 0.887246787548065...
func ApplyChannelPermissions(perms int64, guildID int64, overwrites []discordgo.PermissionOverwrite, memberID int64, roles []int64) int64 { if len(overwrites) == 0 { return perms } // If user is admin or owner, overrides dont apply if perms == AllPermissions { return perms } // Apply chanel overwrites // ...
[ -0.054530125111341476, -0.28961893916130066, 0.7932653427124023, -0.3406152129173279, -0.12525643408298492, -0.628137469291687, -0.25950300693511963, 0.014841587282717228, 0.43995994329452515, -0.08264641463756561, 0.7961312532424927, 0.5178124308586121, -1.1322269439697266, 0.691553711891...
func (c *Config) GetXDebugConfigLocaton() string { return c.projectConfig.GetXDebugConfigLocaton() }
[ 0.0006424364983104169, 0.22229711711406708, 0.4344235360622406, -0.19312195479869843, -0.42506536841392517, 0.43428415060043335, 0.025197377428412437, 0.5728116035461426, 0.09208125621080399, 0.7157471179962158, -1.2395588159561157, 0.45085853338241577, 0.26286426186561584, 0.2852985262870...
func (c *Config) GetXDebugCliIniPath() string { return c.projectConfig.GetXDebugCliIniPath() }
[ 0.6928086876869202, 0.21753636002540588, 0.2559109628200531, 0.5478946566581726, -0.07877971231937408, 0.5716848969459534, 0.33458930253982544, -0.20624220371246338, -0.30843421816825867, -0.04846823960542679, -0.6131085753440857, -0.24417582154273987, -1.0099241733551025, -0.2363553345203...
func (c *Config) GetXDebugFpmIniPath() string { return c.projectConfig.GetXDebugFpmIniPath() }
[ -0.41139259934425354, 0.5009839534759521, 0.37422820925712585, 0.8914481401443481, -0.20197038352489471, 0.2920569181442261, 0.1118781790137291, -0.45963501930236816, 0.032215796411037445, -0.6836544275283813, -0.09432658553123474, -0.47508010268211365, -0.8964029550552368, 0.4423546493053...
func (c *Config) SaveXDebugConifgLocaton(path string) (err error) { c.projectConfig.XDebugLocation = path return c.saveProjectFile() }
[ 0.08991657197475433, 0.26245298981666565, 0.322531521320343, -0.012702928856015205, 0.01889079436659813, 0.45523905754089355, 0.5426012873649597, -0.10555193573236465, 0.1439666897058487, 0.8333861827850342, -2.2662975788116455, -0.3623291254043579, -0.6349755525588989, 0.4374729096889496,...
func (c *Config) SaveDockerCliXdebugIniFilePath(path string) (err error) { c.projectConfig.XDebugCliIniPath = path return c.saveProjectFile() }
[ 0.1943160593509674, 0.21285951137542725, 0.2553229033946991, 0.5034076571464539, 0.4821890592575073, 0.5731855630874634, 0.595295786857605, -0.692477285861969, -0.5510792136192322, 0.3326142430305481, -1.7224247455596924, -0.31034910678863525, -1.5637847185134888, 0.32645469903945923, -0...
func (c *Config) SaveDockerFpmXdebugIniFilePath(path string) (err error) { c.projectConfig.XDebugFpmIniPath = path return c.saveProjectFile() }
[ -0.3851800262928009, 0.41463494300842285, 0.3491082787513733, 0.8291910290718079, 0.37680181860923767, 0.34670987725257874, 0.5065255761146545, -0.9465619921684265, -0.708296000957489, -0.13714070618152618, -1.2239022254943848, -0.5829539895057678, -1.6340713500976562, 0.7347946166992188, ...
func roundUp(v uint64) uint64 { v-- v |= v >> 1 v |= v >> 2 v |= v >> 4 v |= v >> 8 v |= v >> 16 v |= v >> 32 v++ return v }
[ -0.588399350643158, 0.8009535670280457, 0.8420333862304688, -0.35685670375823975, 0.014047360979020596, -0.4522372782230377, 0.8362079858779907, 0.044854216277599335, 0.78983074426651, 0.31475234031677246, -0.28079044818878174, 0.23092857003211975, 0.006879516877233982, -0.2483059763908386...
func NewReadiness(application string, logger *zap.Logger) *Readiness { return &Readiness{ applicationName: application, logger: logger.With(zap.String("system", "readiness")), } }
[ 0.47006022930145264, -1.5566773414611816, 0.13156746327877045, -0.2003379613161087, -0.4112301170825958, 0.08426730334758759, -0.5825395584106445, -0.04360053688287735, 0.4150611460208893, 0.2265043556690216, -0.14420196413993835, 0.3987399935722351, -0.5838031768798828, 0.6761004328727722...
func (r *Readiness) Start() { r.channel = make(chan ReadinessMessage) r.transitionCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: r.applicationName + "_readiness_transitions_total", Help: "Total number of readiness transitions.", }, []string{"state"}) prometheus.MustRegister(r.transitio...
[ 0.33067721128463745, -0.012108172290027142, 0.3715396821498871, -0.994720995426178, 0.8289767503738403, 0.33976659178733826, 0.4435744285583496, 0.3919007480144501, -0.32831263542175293, 0.2740243971347809, -0.30905410647392273, 0.9026041030883789, 0.07867781817913055, 0.8026342988014221, ...