text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (w *WidgetImplement) Theme() *Theme {
return w.theme
} | [
-0.5340641140937805,
0.026194483041763306,
0.08869385719299316,
-0.15846052765846252,
-0.3139770030975342,
-0.048071883618831635,
0.5490658283233643,
-0.12403788417577744,
0.7033681869506836,
-0.515080988407135,
0.07435543090105057,
-0.12842965126037598,
-0.3886723220348358,
0.327016025781... |
func (w *WidgetImplement) SetTheme(theme *Theme) {
w.theme = theme
} | [
-0.6181309223175049,
0.8060723543167114,
0.051159873604774475,
0.1596098244190216,
-0.03131842240691185,
0.21890127658843994,
0.12125217169523239,
0.17853543162345886,
0.2620733082294464,
-0.12336944043636322,
-0.7094594836235046,
-0.00008811629959382117,
-0.36065593361854553,
1.1938874721... |
func (w *WidgetImplement) Position() (int, int) {
return w.x, w.y
} | [
-1.037720799446106,
-0.7081192135810852,
0.5515360832214355,
-0.8251049518585205,
0.11059999465942383,
-0.027248462662100792,
0.9143097996711731,
0.21479372680187225,
0.056143295019865036,
0.13010215759277344,
-1.2207844257354736,
-0.777876079082489,
0.05221707373857498,
0.8405858874320984... |
func (w *WidgetImplement) SetPosition(x, y int) {
w.x = x
w.y = y
} | [
-0.7505806684494019,
-0.21948926150798798,
0.27456891536712646,
-0.8967595100402832,
-0.31020644307136536,
0.1609497219324112,
0.01516710501164198,
-0.061507582664489746,
0.05786357820034027,
0.36418306827545166,
-1.125490665435791,
-0.7693220973014832,
0.3745032548904419,
0.61784952878952... |
func (w *WidgetImplement) AbsolutePosition() (int, int) {
if w.parent != nil {
x, y := w.parent.AbsolutePosition()
return x + w.x, y + w.y
}
return w.x, w.y
} | [
-0.23425136506557465,
-1.0940680503845215,
1.0026214122772217,
-0.6292223930358887,
-0.41102299094200134,
0.14535218477249146,
-0.035324838012456894,
0.23196397721767426,
-0.028805246576666832,
0.09835340082645416,
-0.6733002066612244,
-1.1596444845199585,
0.4750225841999054,
1.03084290027... |
func (w *WidgetImplement) IsPositionAbsolute() bool {
return false
} | [
-1.1400448083877563,
-1.122263789176941,
0.6569235920906067,
-0.3722092807292938,
-0.12669169902801514,
0.5048786997795105,
-0.059587471187114716,
0.07481874525547028,
-0.7104147672653198,
0.2228076159954071,
-0.6720738410949707,
-1.5374139547348022,
-0.31702399253845215,
0.563921093940734... |
func (w *WidgetImplement) Size() (int, int) {
return w.w, w.h
} | [
-0.7918443083763123,
0.027659647166728973,
0.5610738396644592,
-1.0241190195083618,
-0.6364381909370422,
0.2689768671989441,
0.957283079624176,
-0.04477899521589279,
-0.10426253080368042,
0.0013301947619765997,
-1.0276758670806885,
-0.24708911776542664,
-0.15238623321056366,
1.241947293281... |
func (wg *WidgetImplement) SetSize(w, h int) {
wg.w = w
wg.h = h
} | [
-0.5741363763809204,
0.5425169467926025,
0.2842961251735687,
-0.5805988907814026,
-0.5064380764961243,
0.21203823387622833,
0.3526763916015625,
0.34535732865333557,
-0.4767714738845825,
-0.13401047885417938,
-0.7546347379684448,
0.2386474609375,
-0.2541905641555786,
1.1692132949829102,
-... |
func (w *WidgetImplement) Width() int {
return w.w
} | [
-0.9621630311012268,
0.18292029201984406,
0.5824733376502991,
0.10451652854681015,
-0.13956470787525177,
0.35389620065689087,
1.3034257888793945,
0.0641755610704422,
0.3847854435443878,
-1.2270305156707764,
-0.5445659160614014,
-0.2256828099489212,
0.46737635135650635,
0.9332431554794312,
... |
func (wg *WidgetImplement) SetWidth(w int) {
wg.w = w
} | [
-0.23191961646080017,
0.4601132273674011,
0.4609604775905609,
-0.05206150934100151,
-0.3216264247894287,
0.6668111085891724,
1.1930112838745117,
0.21367964148521423,
0.2924830913543701,
-0.4724093973636627,
-0.4974774718284607,
0.18292514979839325,
0.2719683051109314,
1.2956300973892212,
... |
func (w *WidgetImplement) Height() int {
return w.h
} | [
-0.03608877211809158,
0.274067759513855,
0.47720637917518616,
0.020736562088131905,
-0.5037825703620911,
0.6268540620803833,
1.3795408010482788,
0.6599442362785339,
-0.33059144020080566,
-0.2303093522787094,
-1.0759665966033936,
-0.3792612552642822,
-0.058644648641347885,
0.590228438377380... |
func (w *WidgetImplement) SetHeight(h int) {
w.h = h
} | [
-0.2863019108772278,
0.9442633390426636,
0.34843793511390686,
0.3997803330421448,
-0.1567293107509613,
0.5072919130325317,
0.9794800877571106,
0.7872623801231384,
-0.2790835499763489,
-0.23132827877998352,
-1.3863581418991089,
-0.6814378499984741,
0.2670380175113678,
0.9532232284545898,
... |
func (w *WidgetImplement) FixedSize() (int, int) {
return w.fixedW, w.fixedH
} | [
0.12461595982313156,
-0.04835711419582367,
0.6018392443656921,
-0.18205802142620087,
-0.13942810893058777,
-0.21527284383773804,
0.899955689907074,
0.7963180541992188,
0.09486162662506104,
-0.6108096837997437,
-1.3110241889953613,
-0.09180239588022232,
-0.8876283168792725,
1.95345985889434... |
func (wg *WidgetImplement) SetFixedSize(w, h int) {
wg.fixedW = w
wg.fixedH = h
} | [
0.06583818048238754,
0.0349673368036747,
0.3101193904876709,
-0.2598329484462738,
-0.13181936740875244,
0.20675833523273468,
0.7771283984184265,
0.5983445048332214,
-0.33159327507019043,
-0.6597020626068115,
-1.2756801843643188,
0.35543227195739746,
-0.9523022174835205,
2.3676629066467285,... |
func (w *WidgetImplement) FixedWidth() int {
return w.fixedW
} | [
0.43028852343559265,
-0.1552363485097885,
0.3962337374687195,
0.2656051814556122,
-0.41946178674697876,
0.49250221252441406,
1.459230661392212,
0.8943977355957031,
0.21154873073101044,
-1.295096755027771,
-0.9308183193206787,
0.16928865015506744,
-0.5946536064147949,
1.2324128150939941,
... |
func (w *WidgetImplement) FixedHeight() int {
return w.fixedH
} | [
0.40160709619522095,
0.19994568824768066,
0.2808495759963989,
0.7227187156677246,
-0.48580777645111084,
0.5071744918823242,
1.3849961757659912,
0.6749088168144226,
-0.11602287739515305,
-0.4143388867378235,
-1.6824687719345093,
-0.5498602390289307,
-0.8730050921440125,
0.823334813117981,
... |
func (wg *WidgetImplement) SetFixedWidth(w int) {
wg.fixedW = w
} | [
-0.055011678487062454,
0.25865164399147034,
0.36390718817710876,
0.29408273100852966,
-0.37225306034088135,
0.5042659640312195,
1.5316306352615356,
0.25498074293136597,
0.09159307926893234,
-0.7591525316238403,
-1.1086052656173706,
-0.049090705811977386,
-0.5734072327613831,
2.252306461334... |
func (w *WidgetImplement) SetFixedHeight(h int) {
w.fixedH = h
} | [
-0.10853394865989685,
0.7233615517616272,
0.23860828578472137,
0.6492816805839539,
-0.06674046069383621,
0.6271315813064575,
1.2949312925338745,
0.3213537037372589,
-0.34085217118263245,
-0.2526291310787201,
-2.161388874053955,
-0.6227263808250427,
-0.7842133045196533,
1.6312485933303833,
... |
func (w *WidgetImplement) Clamp() [2]bool {
return w.clamp
} | [
-0.5741997361183167,
0.6743350625038147,
0.37801969051361084,
0.10417279601097107,
-0.07792696356773376,
0.30409616231918335,
-0.18048222362995148,
0.28011491894721985,
-0.07110916823148727,
0.5686434507369995,
-0.3405472934246063,
-0.775132417678833,
-0.6555110812187195,
0.883053839206695... |
func (w *WidgetImplement) SetClampWidth(clamp bool) {
w.clamp[0] = clamp
} | [
-0.38951605558395386,
0.32021045684814453,
0.5110395550727844,
0.29406967759132385,
-0.575476348400116,
-0.05751928687095642,
0.32247433066368103,
0.5469995737075806,
0.674941897392273,
0.7619255185127258,
-0.22500231862068176,
-0.6348311305046082,
-0.3696135878562927,
1.7479557991027832,
... |
func (w *WidgetImplement) SetClampHeight(clamp bool) {
w.clamp[1] = clamp
} | [
-0.5807715654373169,
0.23614005744457245,
0.37375468015670776,
0.7425615191459656,
-0.940085232257843,
0.730167806148529,
0.3627212941646576,
0.1707686483860016,
0.09310335665941238,
1.1563563346862793,
-0.9074772596359253,
-0.7050705552101135,
-0.4308910369873047,
0.7294794917106628,
-0... |
func (w *WidgetImplement) Visible() bool {
return w.visible
} | [
-0.14916305243968964,
-0.10783642530441284,
0.36520451307296753,
-0.647326648235321,
-0.8290152549743652,
0.45117926597595215,
0.41614198684692383,
0.8352265954017639,
-0.5893562436103821,
0.6606058478355408,
-1.241241216659546,
-0.16690611839294434,
0.1890244483947754,
0.7870698571205139,... |
func (w *WidgetImplement) SetVisible(v bool) {
w.visible = v
} | [
0.04068936035037041,
0.5226767659187317,
0.4293910562992096,
-0.11339936405420303,
-0.6953921914100647,
0.7687196731567383,
0.753258466720581,
0.7687907814979553,
-0.7314743995666504,
1.537279725074768,
-1.0709766149520874,
-0.5285335779190063,
0.016785692423582077,
0.3431636095046997,
-... |
func (w *WidgetImplement) VisibleRecursive() bool {
if w.parent != nil {
return w.Visible() && w.parent.VisibleRecursive()
}
return w.Visible()
} | [
0.026284227147698402,
0.5409517884254456,
0.6815011501312256,
0.027024852111935616,
-1.3130322694778442,
-0.3775622844696045,
0.4726892411708832,
-0.3297587037086487,
-0.5389154553413391,
0.040196869522333145,
-0.38795602321624756,
0.40257585048675537,
-0.04650472104549408,
1.2682976722717... |
func (w *WidgetImplement) ChildCount() int {
return len(w.children)
} | [
0.8443448543548584,
0.18477167189121246,
0.3165530562400818,
-0.9123724699020386,
-0.31587162613868713,
0.29983192682266235,
0.6530258059501648,
0.47299936413764954,
-0.5510439872741699,
-0.06119542941451073,
-1.3955299854278564,
-0.29365748167037964,
0.466329962015152,
0.7587313055992126,... |
func (w *WidgetImplement) Children() []Widget {
return w.children
} | [
-0.40461987257003784,
-0.262479305267334,
0.16296225786209106,
-0.3949378430843353,
-0.5982739925384521,
0.4842608869075775,
-0.11848028749227524,
0.32551831007003784,
0.09366371482610703,
-0.8344170451164246,
-1.0618170499801636,
0.2733227610588074,
0.27714866399765015,
1.0293463468551636... |
func (w *WidgetImplement) AddChild(self, child Widget) {
w.children = append(w.children, child)
child.SetParent(self)
} | [
-0.10754397511482239,
0.339938759803772,
0.44830623269081116,
-0.5452364683151245,
-0.20625345408916473,
1.0577584505081177,
-0.31094545125961304,
0.2067020982503891,
0.00989906582981348,
-0.8118798732757568,
-0.8759031891822815,
-0.3362286686897278,
0.4414847493171692,
0.44676750898361206... |
func (w *WidgetImplement) RemoveChildByIndex(index int) {
w.children[index].SetParent(nil)
// w.children, w.children[len(w.children)-1] = append(w.children[:i], w.children[i+1:]...), nil
// https://github.com/gopherjs/gopherjs/issues/358
// The following code is work around of the above issue
var newChildren []Wid... | [
-0.5919848084449768,
-0.07125243544578552,
0.5475811958312988,
-0.8285183906555176,
-0.5363208651542664,
-0.5216334462165833,
1.1140092611312866,
-0.18780381977558136,
-0.02072305604815483,
0.6223899722099304,
-1.3754745721817017,
-0.6871566772460938,
-1.0793765783309937,
0.009812079370021... |
func (wg *WidgetImplement) RemoveChild(w Widget) {
for i, child := range wg.children {
if w == child {
wg.RemoveChildByIndex(i)
return
}
}
} | [
-0.7378387451171875,
0.0010638225357979536,
0.3641698658466339,
-0.4039958119392395,
-0.5532189607620239,
0.0628051832318306,
0.6430380344390869,
0.18501195311546326,
-0.225178062915802,
0.1434391587972641,
-0.8835877180099487,
-1.023937702178955,
-0.11371879279613495,
0.38304102420806885,... |
func (w *WidgetImplement) FindWindow() IWindow {
parent := w.Parent()
if parent == nil {
panic("Widget:internal error (could not find parent window)")
}
return parent.FindWindow()
} | [
0.21918925642967224,
0.2815062999725342,
0.44689956307411194,
0.6142856478691101,
-0.9191411137580872,
0.14525489509105682,
0.8893423080444336,
-0.5128908753395081,
-0.11249901354312897,
-0.5586449503898621,
0.8632221817970276,
-0.15912890434265137,
-0.682006299495697,
1.8145906925201416,
... |
func (w *WidgetImplement) SetID(id string) {
w.id = id
} | [
0.14439895749092102,
-0.30861127376556396,
0.1423245221376419,
-0.2300260066986084,
-0.3458273410797119,
1.1177165508270264,
0.17555025219917297,
0.7883291244506836,
1.0882426500320435,
-0.07296918332576752,
-1.2814550399780273,
-0.08522933721542358,
-0.14448854327201843,
1.636052608489990... |
func (w *WidgetImplement) ID() string {
return w.id
} | [
0.42052146792411804,
-0.8066131472587585,
0.26230373978614807,
-0.5604197978973389,
-0.1988394409418106,
1.2839995622634888,
0.3809860348701477,
0.8399385809898376,
1.0140655040740967,
-0.134816974401474,
-0.9368696808815002,
-0.4821951389312744,
-0.17084160447120667,
1.2022405862808228,
... |
func (w *WidgetImplement) Enabled() bool {
return w.enabled
} | [
0.05834841728210449,
-0.1246250569820404,
0.30694299936294556,
-0.19568322598934174,
0.0787380188703537,
0.7846624255180359,
0.20660588145256042,
1.383591651916504,
0.19454427063465118,
-0.22503888607025146,
-1.462672233581543,
-0.35537511110305786,
-0.30624207854270935,
0.9280529022216797... |
func (w *WidgetImplement) SetEnabled(e bool) {
w.enabled = e
} | [
-0.11697708070278168,
0.7654232382774353,
0.34668222069740295,
0.387944757938385,
0.0618501640856266,
1.02670419216156,
0.4679771363735199,
1.7357059717178345,
-0.11618608981370926,
0.45510080456733704,
-1.4270445108413696,
-0.18614572286605835,
-0.256526917219162,
0.9560278654098511,
-0... |
func (w *WidgetImplement) Focused() bool {
return w.focused
} | [
-0.10805802047252655,
-0.2857913672924042,
0.31175291538238525,
-0.4805629253387451,
0.016196606680750847,
0.3795900344848633,
0.7752662301063538,
0.21630890667438507,
-0.13174733519554138,
-0.5247518420219421,
-1.2285984754562378,
-0.2772575914859772,
0.05242783576250076,
0.67838454246521... |
func (w *WidgetImplement) SetFocused(f bool) {
w.focused = f
} | [
0.4433639347553253,
0.15353018045425415,
0.22925564646720886,
-0.11838911473751068,
0.3622625172138214,
0.6885572671890259,
1.296451210975647,
0.3261326849460602,
-0.5789662599563599,
-0.718049943447113,
-0.9763138890266418,
-0.32424408197402954,
0.3826909065246582,
0.6256312727928162,
-... |
func (w *WidgetImplement) RequestFocus(self Widget) {
var widget Widget = self
var parent Widget = self.Parent()
for parent != nil {
widget = parent
parent = widget.Parent()
}
screen := widget.(*Screen)
screen.UpdateFocus(self)
} | [
-1.2800371646881104,
-0.10238379240036011,
0.5558845400810242,
0.15032336115837097,
0.5130811929702759,
-0.3143039047718048,
0.23097661137580872,
-0.8348336219787598,
0.1719200760126114,
-0.872940182685852,
0.2846357822418213,
0.7060816884040833,
-0.08388064056634903,
1.5234277248382568,
... |
func (w *WidgetImplement) Tooltip() string {
return w.tooltip
} | [
0.16905948519706726,
-0.17917069792747498,
0.1860983967781067,
-0.3506980538368225,
-0.14598269760608673,
0.19240118563175201,
0.5550889372825623,
-0.029072383418679237,
0.06258253008127213,
0.8145273327827454,
-0.07490236312150955,
-0.9507899284362793,
0.9001922011375427,
-0.7225191593170... |
func (w *WidgetImplement) SetTooltip(s string) {
w.tooltip = s
} | [
-0.19059139490127563,
-0.13828995823860168,
0.08552664518356323,
-0.1009138897061348,
-0.2017916887998581,
-0.008962622843682766,
0.3151950538158417,
0.012407088652253151,
-0.1357797235250473,
0.43381690979003906,
-0.7826419472694397,
-1.0237466096878052,
1.2048735618591309,
-0.07598914951... |
func (w *WidgetImplement) FontSize() int {
if w.fontSize > 0 {
return w.fontSize
}
return w.theme.StandardFontSize
} | [
0.08521444350481033,
0.4232574999332428,
0.4600731432437897,
-0.4224955439567566,
-0.7384028434753418,
-0.48646339774131775,
0.750950813293457,
0.6465673446655273,
0.21018922328948975,
-0.6702971458435059,
-0.15296028554439545,
-0.36651548743247986,
-0.4345729649066925,
0.9790093302726746,... |
func (w *WidgetImplement) SetFontSize(s int) {
w.fontSize = s
} | [
0.002565141301602125,
-0.01506049744784832,
0.10625804960727692,
-0.6389503479003906,
-0.8362119793891907,
-0.3864700198173523,
0.9672978520393372,
0.53128981590271,
0.5666226148605347,
-0.5474727153778076,
-1.0812816619873047,
-0.3345416784286499,
0.04937587305903435,
1.2688980102539062,
... |
func (w *WidgetImplement) HasFontSize() bool {
return w.fontSize > 0
} | [
0.2537728548049927,
-0.09904016554355621,
0.48040542006492615,
-0.6067630648612976,
-0.49040767550468445,
-1.1088637113571167,
0.14092034101486206,
0.7898145318031311,
0.23882125318050385,
-0.9163076281547546,
-1.024867057800293,
-0.5416802763938904,
0.1751052290201187,
1.496008276939392,
... |
func (w *WidgetImplement) Cursor() Cursor {
return w.cursor
} | [
0.2794189155101776,
-0.6097386479377747,
0.12756185233592987,
-0.3846140205860138,
-0.7561128735542297,
0.34620416164398193,
0.7059309482574463,
0.42360544204711914,
0.6804068684577942,
-0.575796902179718,
0.3230733573436737,
0.094326913356781,
0.01935703679919243,
0.9564692378044128,
0.... |
func (w *WidgetImplement) SetCursor(c Cursor) {
w.cursor = c
} | [
-0.06884010881185532,
-0.15284869074821472,
0.12420549988746643,
-0.38344278931617737,
-0.7508125901222229,
0.5964351892471313,
0.40964674949645996,
0.5963551998138428,
0.452361136674881,
-0.3550496995449066,
-0.5539942979812622,
0.1415395736694336,
0.4769230782985687,
1.863386869430542,
... |
func (w *WidgetImplement) Contains(x, y int) bool {
return w.x <= x && w.y <= y && x <= w.x+w.w && y <= w.y+w.h
} | [
-0.0797591358423233,
-0.6459513902664185,
0.6116567850112915,
-0.9368419647216797,
-0.9042951464653015,
0.6908822655677795,
-0.6010266542434692,
-1.2484272718429565,
0.17732897400856018,
-0.3593200147151947,
-0.5350694060325623,
0.6024507880210876,
-0.2311997413635254,
0.4158388674259186,
... |
func (w *WidgetImplement) FindWidget(self Widget, x, y int) Widget {
for _, child := range childrenReverseDepthOrder(self) {
if child.Contains(x-w.x, y-w.y) {
return child.FindWidget(child, x-w.x, y-w.y)
}
}
if self.Contains(x, y) {
return self
}
return nil
} | [
0.47323817014694214,
-0.28222039341926575,
0.7330847978591919,
-0.21393226087093353,
-0.5056953430175781,
0.01742841675877571,
0.05005909129977226,
-1.1921526193618774,
-0.4513552188873291,
-0.5200704336166382,
0.005977672524750233,
0.2569291889667511,
-0.7219493985176086,
0.66591477394104... |
func (w *WidgetImplement) MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, modifier glfw.ModifierKey) bool {
for _, child := range childrenReverseDepthOrder(self) {
if child.Contains(x-w.x, y-w.y) && child.MouseButtonEvent(child, x-w.x, y-w.y, button, down, modifier) {
return true
}
... | [
0.2273717224597931,
-0.3373948335647583,
0.7277077436447144,
0.14492273330688477,
0.046558331698179245,
0.2535790801048279,
-0.486093133687973,
0.20086556673049927,
-0.003864516271278262,
0.014201570302248001,
-0.6031746864318848,
0.5075531005859375,
-0.08643615990877151,
0.608420968055725... |
func (w *WidgetImplement) MouseMotionEvent(self Widget, x, y, relX, relY, button int, modifier glfw.ModifierKey) bool {
for _, child := range childrenReverseDepthOrder(self) {
contained := child.Contains(x-w.x, y-w.y)
prevContained := child.Contains(x-w.x-relX, y-w.y-relY)
if contained != prevContained {
chil... | [
0.495299369096756,
-0.471444696187973,
0.9206652045249939,
-0.32416442036628723,
-0.1244233250617981,
-0.2961471676826477,
0.2960788607597351,
0.19774770736694336,
0.03630254045128822,
0.10118276625871658,
-0.7049451470375061,
0.10605547577142715,
-0.2828301191329956,
0.24544672667980194,
... |
func (w *WidgetImplement) MouseDragEvent(self Widget, x, y, relX, relY int, button int, modifier glfw.ModifierKey) bool {
return false
} | [
-0.9430586099624634,
-0.36476606130599976,
0.6519228219985962,
-1.295362949371338,
0.15229329466819763,
0.8289088010787964,
-0.6474488973617554,
1.1336618661880493,
-0.35169097781181335,
-0.536611020565033,
-0.95883709192276,
-0.2620583772659302,
-0.37644875049591064,
0.6538329720497131,
... |
func (w *WidgetImplement) MouseEnterEvent(self Widget, x, y int, enter bool) bool {
w.mouseFocus = enter
return false
} | [
0.7237725853919983,
-0.4452647268772125,
0.460940957069397,
-0.646521806716919,
-0.2303979992866516,
0.8927478194236755,
-0.17711669206619263,
0.8282749056816101,
-0.007952800951898098,
0.3660101294517517,
-0.3079766035079956,
0.11871088296175003,
-0.46513423323631287,
0.15094655752182007,... |
func (w *WidgetImplement) ScrollEvent(self Widget, x, y, relX, relY int) bool {
for _, child := range childrenReverseDepthOrder(self) {
if child.Contains(x-w.x, y-w.y) && child.ScrollEvent(child, x-w.x, y-w.y, relX, relY) {
return true
}
}
return false
} | [
0.6031097769737244,
-0.2985582947731018,
0.9667451977729797,
-0.30430343747138977,
-0.23456677794456482,
0.14589130878448486,
0.1316983550786972,
-0.5262748599052429,
-0.3955681025981903,
-0.28555551171302795,
-0.9066948890686035,
0.15833866596221924,
-0.4390507638454437,
0.537634015083313... |
func (w *WidgetImplement) FocusEvent(self Widget, f bool) bool {
w.focused = f
return false
} | [
0.2377711534500122,
0.05219816416501999,
0.27257969975471497,
-0.10505633056163788,
-0.12746603786945343,
0.9210875034332275,
0.250166118144989,
0.591487467288971,
-0.2398613542318344,
-0.550406813621521,
-0.7374082207679749,
-0.1999637335538864,
0.08200553059577942,
0.7337691783905029,
... |
func (w *WidgetImplement) KeyboardEvent(self Widget, key glfw.Key, scanCode int, action glfw.Action, modifier glfw.ModifierKey) bool {
return false
} | [
-0.06372708827257156,
-0.02173866517841816,
0.2855953872203827,
0.08152622729539871,
-0.3864515721797943,
0.3293837904930115,
0.1271176040172577,
0.5811058878898621,
0.5109462738037109,
-0.3759281039237976,
-0.4398493468761444,
0.07252662628889084,
-0.7178055644035339,
1.0950024127960205,
... |
func (w *WidgetImplement) KeyboardCharacterEvent(self Widget, codePoint rune) bool {
return false
} | [
-0.65176922082901,
-0.9628674983978271,
0.2810354232788086,
-0.4469374716281891,
-0.657137393951416,
0.6505889892578125,
0.05394783243536949,
0.83810955286026,
-0.19338358938694,
-0.09391623735427856,
-1.2173521518707275,
0.5878307223320007,
-0.8215075731277466,
0.6743358969688416,
-0.56... |
func (w *WidgetImplement) IMEPreeditEvent(self Widget, text []rune, blocks []int, focusedBlock int) bool {
return false
} | [
-0.7369695901870728,
-0.09122645109891891,
0.4261215329170227,
-1.1402374505996704,
-0.23366861045360565,
-0.015850838273763657,
0.41590002179145813,
0.22610291838645935,
-0.1523401141166687,
0.8658859133720398,
-0.5458799004554749,
0.43188855051994324,
-1.9205204248428345,
0.1702918857336... |
func (w *WidgetImplement) IMEStatusEvent(self Widget) bool {
return false
} | [
-0.9750445485115051,
-0.6933223605155945,
0.43620991706848145,
-0.5253245830535889,
-0.523332417011261,
0.6574534773826599,
-0.15900862216949463,
0.6818289756774902,
0.4072711169719696,
0.09473095089197159,
-0.8908118009567261,
-0.32702240347862244,
-0.8315683603286743,
1.0140290260314941,... |
func (w *WidgetImplement) PreferredSize(self Widget, ctx *canvas.Context) (int, int) {
if w.layout != nil {
return w.layout.PreferredSize(self, ctx)
}
return w.w, w.h
} | [
0.028589366003870964,
0.41382017731666565,
0.4944339394569397,
-0.1862880438566208,
-0.33232954144477844,
-0.00463198684155941,
0.5067105293273926,
-0.04893612489104271,
0.7297055125236511,
-0.7929304838180542,
0.24919846653938293,
-0.6222423911094666,
0.0011369796702638268,
1.374071121215... |
func (w *WidgetImplement) OnPerformLayout(self Widget, ctx *canvas.Context) {
if w.layout != nil {
w.layout.OnPerformLayout(self, ctx)
} else {
for _, child := range w.children {
prefW, prefH := child.PreferredSize(child, ctx)
fixW, fixH := child.FixedSize()
w := toI(fixW > 0, fixW, prefW)
h := toI(fi... | [
0.4776224195957184,
0.27580633759498596,
0.6270673871040344,
-0.41939035058021545,
-0.5799888372421265,
-0.8198935389518738,
0.5508688688278198,
0.460659921169281,
0.27652832865715027,
-0.02951030619442463,
0.1181018278002739,
-1.0435035228729248,
0.22448782622814178,
1.3184401988983154,
... |
func (w *WidgetImplement) Draw(self Widget, ctx *canvas.Context) {
if debugFlag {
ctx.SetStrokeWidth(1.0)
ctx.BeginPath()
ctx.Rect(float32(w.x)-0.5, float32(w.y)-0.5, float32(w.w)+1.0, float32(w.h)+1.0)
ctx.SetStrokeColor(canvas.RGBA(255, 0, 0, 255))
ctx.Stroke()
}
if len(w.children) == 0 {
return
}
c... | [
-1.078460931777954,
0.2863628566265106,
0.9586008191108704,
-0.7212624549865723,
-0.40694892406463623,
0.8567668795585632,
0.5248187780380249,
-0.24789880216121674,
0.35062676668167114,
-0.2083352655172348,
0.051523126661777496,
-0.08970802277326584,
0.6322885751724243,
0.8540195822715759,... |
func main() {
if len(os.Args) < 3 {
fmt.Fprintln(os.Stderr, "Arguments required: <vid> <pid>")
os.Exit(1)
}
vid, err := strconv.ParseUint(strings.TrimPrefix(os.Args[1], "0x"), 16, 16)
if err != nil {
panic(err)
}
pid, err := strconv.ParseUint(strings.TrimPrefix(os.Args[2], "0x"), 16, 16)
if err != nil {
... | [
0.33098194003105164,
-0.5085471868515015,
1.1548789739608765,
0.5557613968849182,
0.11563589423894882,
0.3139166533946991,
0.3781135678291321,
0.10772349685430527,
-0.19057457149028778,
-0.05315960571169853,
0.21983221173286438,
1.1555616855621338,
-0.12141784280538559,
-0.5940000414848328... |
func UIDJoin(ids ...string) UID {
return UID(strings.Join(ids, UIDSeparator))
} | [
0.046293724328279495,
-0.7306567430496216,
0.3233993649482727,
0.26636046171188354,
-0.022499283775687218,
1.1618614196777344,
-0.7354150414466858,
0.7772979736328125,
0.3036428987979889,
-0.8150811791419983,
-0.0906127467751503,
0.016961732879281044,
-0.42730066180229187,
-0.1367284059524... |
func UIDSplit(id UID) []string {
return strings.Split(string(id), UIDSeparator)
} | [
-1.2030255794525146,
0.19387492537498474,
-0.1391306221485138,
-0.6423882246017456,
0.01904846727848053,
0.7501078248023987,
-0.6215043663978577,
0.44415733218193054,
1.499864101409912,
-0.026932861655950546,
-0.20234563946723938,
0.3168659508228302,
-0.17488551139831543,
-0.12719745934009... |
func (e *FilterError) Filter() Filter {
return e.f
} | [
-0.30928367376327515,
-0.23267151415348053,
0.1766992062330246,
0.17954836785793304,
-0.22215762734413147,
0.008388876914978027,
0.45867919921875,
0.19078688323497772,
-0.015374742448329926,
-0.8323756456375122,
0.5847970843315125,
0.8173196911811829,
0.6533982157707214,
-0.335746228694915... |
func NewFilter(filters ...Filter) Filter {
var filter Filter
for _, f := range filters {
filter = filter | f
}
return filter
} | [
-0.2281324416399002,
0.08804698288440704,
0.4745294749736786,
1.1796537637710571,
0.11056143045425415,
-0.09930474311113358,
-1.0890752077102661,
-0.04526730254292488,
-0.6795342564582825,
-0.918109655380249,
0.3437238037586212,
0.7430063486099243,
-0.24862417578697205,
0.6450611352920532,... |
func (f Filter) Contains(filter Filter) bool {
return f.filters(filter)
} | [
-0.3288749158382416,
-0.14899645745754242,
0.20434355735778809,
0.4953978359699249,
-0.7605890035629272,
-0.0025641201063990593,
-0.6475989818572998,
-0.35808420181274414,
-0.5526871681213379,
-0.7742094993591309,
0.21210631728172302,
0.9211944341659546,
0.2306257039308548,
0.8190181255340... |
func (f Filter) filters(filter Filter) bool {
return f&filter == filter
} | [
-0.6436968445777893,
-0.28261351585388184,
0.4229491949081421,
0.7795591354370117,
-0.7667703628540039,
0.005938481539487839,
-0.7874886393547058,
-0.4033304750919342,
0.3803388476371765,
-0.3399507999420166,
0.15469545125961304,
0.31074607372283936,
0.07785496860742569,
0.2357371151447296... |
func (f Filter) allow(ctx Context) (bool, Filter) {
var failed Filter
if ctx.Message == nil || ctx.Session == nil {
return false, failed
}
var (
contentLen = len(ctx.Message.Content)
guildIDLen = len(ctx.Message.GuildID)
)
if f.filters(MessagesSelf) {
switch {
case ctx.Message.Author == nil:
fallth... | [
-0.7239611744880676,
-0.3999229669570923,
0.6943598985671997,
0.003141462104395032,
-0.5875711441040039,
0.42689165472984314,
0.4406220316886902,
-0.5227431654930115,
-0.07155419886112213,
-0.23408761620521545,
0.2963844835758209,
0.8515557050704956,
-0.6715055704116821,
1.0473566055297852... |
func New() Queue {
c := make(chan uint16, size)
return Queue(c)
} | [
0.713629424571991,
-0.6061879396438599,
0.3355259299278259,
-0.4757941961288452,
-0.15049824118614197,
-0.8071643114089966,
-0.7970784306526184,
-0.7146238684654236,
-0.09449911117553711,
-0.8903944492340088,
-0.6132835745811462,
0.241224467754364,
0.592765212059021,
0.3954014480113983,
... |
func (q Queue) Put(v uint16) {
q <- v
} | [
0.38824158906936646,
0.793304979801178,
0.11366748809814453,
-1.284061074256897,
0.19878914952278137,
0.6778877973556519,
0.06151847541332245,
-0.6976380944252014,
-0.09270185232162476,
-0.15924325585365295,
-1.0334454774856567,
0.4014109969139099,
-0.4989287853240967,
0.4989660680294037,
... |
func (q Queue) Poll() uint16 {
return <-q
} | [
0.0452515073120594,
0.7745636105537415,
0.5881553292274475,
-0.4078000485897064,
-0.48696020245552063,
0.3470756411552429,
-0.4022005796432495,
-0.95860356092453,
0.48047664761543274,
-0.5834869742393494,
0.045786380767822266,
-0.4696381390094757,
-0.3946176767349243,
0.9651453495025635,
... |
func disabledTestArmPeBuildIDs(t *testing.T) {
testPeBuildIDFile(t, "pe-aa64.efi", "def")
} | [
0.5601253509521484,
-0.07594915479421616,
0.12680384516716003,
0.603594958782196,
0.6820581555366516,
1.3606079816818237,
1.0100007057189941,
0.7042419910430908,
0.4450140595436096,
0.10345550626516342,
-0.5370584726333618,
0.2569850981235504,
-0.8577724695205688,
0.2829369604587555,
-0.... |
func CreateIndexer(root string, nbuckets, seqLen int) (*Indexer, error) {
cfg, err := NewConfig(root, nbuckets, seqLen)
if err != nil {
return nil, err
}
return IndexerFromConfig(cfg)
} | [
0.3508920669555664,
-0.6560149192810059,
0.3911675810813904,
0.420269250869751,
-0.4796496331691742,
-0.19469602406024933,
-0.4281005859375,
-0.08592625707387924,
-0.41172412037849426,
0.16852502524852753,
-0.35461872816085815,
-0.7929608225822449,
-0.7462778687477112,
0.817381739616394,
... |
func openFromConfig(cfg *Config) (*Indexer, error) {
var err error
res := &Indexer{config: cfg}
// lock file
res.lock, err = lock.New(cfg.LockPath())
if err != nil {
return nil, err
}
err = res.lock.LockShared()
if err != nil {
return nil, err
}
// internal setup
res.shards = make([]shard.Indexer, cfg.Nu... | [
0.21274995803833008,
-0.15480613708496094,
0.7059772610664368,
-0.39741867780685425,
-0.3695546090602875,
-0.22526559233665466,
1.1501896381378174,
-0.3447665572166443,
-0.2416514903306961,
0.37728357315063477,
-0.3067825734615326,
-0.1477358192205429,
-0.6695307493209839,
0.46512964367866... |
func (x *Indexer) writeFiles() error {
docPath := x.config.FnamesPath()
f, e := os.OpenFile(docPath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0644)
if e != nil {
return e
}
defer f.Close()
return x.fnames.write(f)
} | [
-0.5781686305999756,
0.6708149909973145,
0.28534552454948425,
-0.3797934949398041,
0.6566635966300964,
0.20303797721862793,
1.0090162754058838,
0.3309161365032196,
-0.6660919189453125,
0.2630311846733093,
0.3209766745567322,
-0.7991222143173218,
-1.01755952835083,
-0.23875106871128082,
-... |
func (x *Indexer) Root() string {
return x.config.IndexRoot
} | [
-0.17504307627677917,
-0.16355443000793457,
0.03308025375008583,
0.7013136744499207,
-0.5538356304168701,
0.9913142919540405,
-0.2143034189939499,
-0.24365989863872528,
0.5881259441375732,
0.22748741507530212,
0.13176587224006653,
1.3354705572128296,
-0.34411072731018066,
-0.10478864610195... |
func (x *Indexer) readfiles() error {
docPath := x.config.FnamesPath()
f, e := os.OpenFile(docPath, os.O_RDONLY, 0644)
if e != nil {
return e
}
defer f.Close()
//r := bufio.NewReader(f)
fnames, err := readFnames(f)
x.fnames = fnames
return err
} | [
-0.42844700813293457,
0.775212824344635,
0.4229980409145355,
-0.31702712178230286,
-0.2813425064086914,
0.1648356169462204,
0.7426741719245911,
0.04042438045144081,
-0.7271031141281128,
-0.26224833726882935,
0.5296559929847717,
-0.3899150490760803,
-0.7717512845993042,
-0.41602885723114014... |
func (x *Indexer) Close() error {
defer x.lock.Close()
for i := 0; i < x.config.NumShatters; i++ {
x.shatter <- &shatterReq{shutdown: true}
// no more shatters running, each waits
// for all shards to complete before
// returning => shards are no longer busy.
}
for i := 0; i < x.config.NumShards; i++ {
cl... | [
-1.258639931678772,
0.24237696826457977,
0.8684419393539429,
-0.3332236707210541,
0.3701353073120117,
-0.011686648242175579,
0.7711800932884216,
-1.0165414810180664,
-0.676956295967102,
0.12887072563171387,
-0.224490687251091,
-0.4639088213443756,
-0.9454557299613953,
0.1922551542520523,
... |
func (x *Indexer) Add(doc *Doc) error {
did, err := x.doc2Id(doc)
if err != nil {
return err
}
doc.Path = ""
x.shatter <- &shatterReq{docid: did, offset: doc.Start, d: doc.Dat}
return nil
} | [
-0.9335314035415649,
0.3252948820590973,
0.5746974945068359,
0.009113725274801254,
0.059012364596128464,
0.817528486251831,
0.3897324800491333,
0.15244141221046448,
0.3507223129272461,
-0.2309940755367279,
-0.5021888017654419,
0.43768978118896484,
-0.5296847820281982,
0.4025859236717224,
... |
func NewUserHandlerImpl(userService service.UserService) *UserHandlersImpl {
return &UserHandlersImpl{userSvc: userService}
} | [
-0.5791755318641663,
-0.3949325978755951,
0.03856077790260315,
0.34540119767189026,
-2.166884422302246,
0.5600085258483887,
-0.1586953103542328,
0.1890353411436081,
0.3356558382511139,
0.3507460057735443,
-0.7742711901664734,
0.4866752028465271,
-0.5160122513771057,
-0.4180029630661011,
... |
func New(spec *AgentSpecification, syncerConf broker.SyncerConfig, syncerMetricNames AgentConfig) (*Controller, error) {
if errs := validations.IsDNS1123Label(spec.ClusterID); len(errs) > 0 {
return nil, errors.Errorf("%s is not a valid ClusterID %v", spec.ClusterID, errs)
}
agentController := &Controller{
clus... | [
0.8502780795097351,
-0.4277586042881012,
0.5075501799583435,
-0.10491674393415451,
-0.5076417326927185,
-0.8318915963172913,
0.4774596393108368,
-0.04108673334121704,
0.4513852894306183,
0.8053470849990845,
0.051235098391771317,
0.24858546257019043,
0.7932361364364624,
0.6465365886688232,
... |
func (r *Response) Header() http.Header {
return r.Writer.Header()
} | [
-0.19606080651283264,
-1.2802654504776,
0.18035177886486053,
0.7989062666893005,
-0.3546639084815979,
0.46151044964790344,
0.9456006288528442,
0.18733064830303192,
0.6391884684562683,
-1.2599775791168213,
0.4285639226436615,
-0.5265364646911621,
-0.07315371185541153,
-1.2936509847640991,
... |
func (r *Response) Write(b []byte) (int, error) {
return r.Writer.Write(b)
} | [
-1.019527792930603,
0.004820382688194513,
0.30271175503730774,
0.28867703676223755,
1.0095897912979126,
-0.6458312273025513,
1.2124738693237305,
0.3613114655017853,
0.4918939173221588,
-0.22162476181983948,
-0.9851069450378418,
-1.1115343570709229,
-1.123634696006775,
0.1780436635017395,
... |
func (r *Response) WriteHeader(status int) {
r.Status = status
r.Writer.WriteHeader(status)
} | [
-0.6970279216766357,
-1.433828592300415,
0.37577205896377563,
-0.19890578091144562,
0.19513073563575745,
0.13221894204616547,
0.5859918594360352,
0.9102810025215149,
0.30331721901893616,
-0.4555950462818146,
-0.6845098733901978,
-0.5440528392791748,
0.24457670748233795,
0.7332115769386292,... |
func (c *Context) Request() *http.Request {
return c.request
} | [
-0.721777617931366,
-0.3939953148365021,
0.14945170283317566,
0.5422788858413696,
0.5897993445396423,
0.5302306413650513,
0.6225212216377258,
-0.2916167974472046,
0.7638224959373474,
-1.195955514907837,
0.7653533816337585,
1.1565783023834229,
0.19192726910114288,
-0.5400585532188416,
0.4... |
func (c *Context) Response() *Response {
return c.response
} | [
0.6041752099990845,
-1.0577479600906372,
-0.13805875182151794,
0.6879110336303711,
-0.0938016027212143,
0.23540176451206207,
1.3271228075027466,
-0.3612384796142578,
1.6001464128494263,
-1.1238125562667847,
-0.40661752223968506,
0.010873734951019287,
-0.5506278276443481,
-0.784746050834655... |
func (c *Context) Render(status int, r Renderer) error {
r.Header(c.response.Header())
c.response.WriteHeader(status)
return r.Render(c.response)
} | [
-0.23467159271240234,
-1.2106211185455322,
0.4047161638736725,
0.09229796379804611,
-0.9769309759140015,
0.1732087880373001,
-0.8726100921630859,
0.03673100844025612,
0.34061938524246216,
-0.0847591757774353,
-0.31836986541748047,
-1.1243313550949097,
-0.6634660363197327,
-0.23169752955436... |
func (c *Context) String(status int, value string) error {
return c.Render(status, StringRenderer{String: value})
} | [
0.5693293809890747,
-0.5121082067489624,
0.022480372339487076,
-0.7724251747131348,
-1.2462198734283447,
0.4371826648712158,
-0.2637404799461365,
-0.45986267924308777,
0.04656976833939552,
-0.15256652235984802,
-0.6142200827598572,
0.0505807027220726,
0.2574000358581543,
0.0143539225682616... |
func (c *Context) JSON(status int, value interface{}) error {
return c.Render(status, JSONRenderer{Value: value})
} | [
-0.366934597492218,
-0.3902336657047272,
0.3675786554813385,
-0.5613307356834412,
-1.2376325130462646,
-0.09749802947044373,
-0.16961044073104858,
0.15660855174064636,
0.1411663442850113,
-0.16597312688827515,
-0.5448582768440247,
0.523147463798523,
0.6329665780067444,
0.8172656297683716,
... |
func (c *Context) XML(status int, value interface{}) error {
return c.Render(status, XMLRenderer{Value: value})
} | [
-0.08663605153560638,
0.25116977095603943,
0.2601325213909149,
0.23637647926807404,
-1.2715322971343994,
0.9790977239608765,
-1.1723864078521729,
1.1640865802764893,
1.191670536994934,
-0.9107288718223572,
0.6248509883880615,
-0.4079972803592682,
0.5779615640640259,
0.5192434191703796,
-... |
func (c *Context) Stream(status int, contentType string, reader io.Reader) error {
return c.Render(status, StreamRenderer{
ContentType: contentType,
Reader: reader,
})
} | [
-0.07928073406219482,
-0.1874038428068161,
0.02757151983678341,
-0.2752550542354584,
-0.9692778587341309,
0.23717817664146423,
-0.7491551637649536,
0.19416610896587372,
0.44157642126083374,
-0.8024163246154785,
0.6897008419036865,
0.6950902938842773,
0.05648840591311455,
0.7434734106063843... |
func NewRegistry() *Registry {
return &Registry{
modules: make([]bar.Module, 0),
}
} | [
0.08445671945810318,
0.21369722485542297,
-0.11028212308883667,
0.5536656975746155,
0.7260425090789795,
-0.14590984582901,
0.5542706251144409,
-0.41955649852752686,
0.08629398792982101,
-0.7024227976799011,
-0.26299116015434265,
0.7847827076911926,
-0.5326176881790161,
0.755140483379364,
... |
func (r *Registry) Add(modules ...bar.Module) *Registry {
if r.err != nil {
return r
}
for _, module := range modules {
if module != nil {
r.modules = append(r.modules, module)
}
}
return r
} | [
-0.7429110407829285,
0.5474616885185242,
0.2655806839466095,
0.09235144406557083,
1.7389724254608154,
0.9147152900695801,
-0.021029038354754448,
-0.23039746284484863,
0.32735681533813477,
0.2868891656398773,
0.36148589849472046,
0.18393783271312714,
-1.0890552997589111,
1.0110639333724976,... |
func (r *Registry) Err() error {
return r.err
} | [
-0.10075818747282028,
0.2854737639427185,
-0.4643533527851105,
0.899200439453125,
-0.21319080889225006,
1.0017240047454834,
0.4791472554206848,
0.721422016620636,
0.4166516661643982,
-0.6408471465110779,
0.493001788854599,
1.117858648300171,
-0.1448608934879303,
0.9826852679252625,
1.479... |
func (r *Registry) Modules() []bar.Module {
return r.modules
} | [
-0.6796477437019348,
0.1506028026342392,
-0.10775160044431686,
-0.2270464301109314,
1.3025637865066528,
1.3846192359924316,
0.3851170837879181,
-0.7832934856414795,
0.9239758253097534,
-0.6611130237579346,
-0.05828709900379181,
0.993607759475708,
-0.6362701654434204,
0.34739160537719727,
... |
func (sc *SwayConnection) GetActiveOutput() (*Output, error) {
var output *Output
o, err := sc.GetOutputs()
if err != nil {
return output, err
}
for i := range o {
if o[i].Focused {
output = o[i]
break
}
}
return output, nil
} | [
0.9912807941436768,
-1.3286250829696655,
0.6369710564613342,
0.5019802451133728,
-0.3559662699699402,
-1.505841612815857,
0.5594878196716309,
-0.6547845602035522,
-0.09190190583467484,
-0.1708877980709076,
0.3767579197883606,
0.2859077453613281,
-1.0630136728286743,
-0.3511480391025543,
... |
func (sc *SwayConnection) GetOutputs() ([]*Output, error) {
var outputs []*Output
os, err := sc.SendCommand(IPC_GET_OUTPUTS, "get_outputs")
if err != nil {
return outputs, err
}
if err := json.Unmarshal(os, &outputs); err != nil {
return outputs, err
}
return outputs, nil
} | [
-0.46969035267829895,
-0.008635017089545727,
0.7528602480888367,
0.49313053488731384,
0.11010932177305222,
-1.1299588680267334,
-0.02014666423201561,
-1.1031919717788696,
-0.6802244186401367,
0.13236688077449799,
0.03848680108785629,
0.5490420460700989,
-1.5048460960388184,
0.3423362970352... |
func (time Time) FormatCAP() string {
str := time.Format(TimeFormat)
return strings.Replace(str, "+00:00", "-00:00", 1)
} | [
-0.8674582242965698,
-1.0534617900848389,
0.6140793561935425,
0.2815591096878052,
-0.060034867376089096,
0.2919372618198395,
-0.8099221587181091,
-0.9325627684593201,
0.5864378809928894,
0.7502859830856323,
1.2301621437072754,
0.16025084257125854,
0.5259944796562195,
1.5807838439941406,
... |
func (time Time) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(time.FormatCAP(), start)
} | [
0.2176518738269806,
0.06776195019483566,
0.2677324712276459,
0.8364875912666321,
-0.8955239653587341,
0.38583609461784363,
-1.2213404178619385,
0.49838197231292725,
0.6808239817619324,
0.697564959526062,
-0.23694811761379242,
0.18641917407512665,
-0.050036389380693436,
1.2399476766586304,
... |
func ok(tb testing.TB, err error) {
if err != nil {
_, file, line, _ := runtime.Caller(1)
fmt.Printf("\033[31m%s:%d: unexpected error: %s\033[39m\n\n", filepath.Base(file), line, err.Error())
tb.FailNow()
}
} | [
0.9303194880485535,
-0.24737364053726196,
0.3249334394931793,
-0.023583050817251205,
-0.1713571697473526,
0.8187499642372131,
0.4898007810115814,
0.10770727694034576,
-0.5933234691619873,
0.8405354619026184,
0.156401589512825,
0.7572429776191711,
0.3956109881401062,
0.6145848035812378,
-... |
func equals(tb testing.TB, exp, act interface{}) {
if !reflect.DeepEqual(exp, act) {
_, file, line, _ := runtime.Caller(1)
fmt.Printf("\033[31m%s:%d:\n\n\texp: %#v\n\n\tgot: %#v\033[39m\n\n", filepath.Base(file), line, exp, act)
tb.FailNow()
}
} | [
-0.2863087058067322,
-1.006277084350586,
0.5397627949714661,
-0.8565453886985779,
0.6982909440994263,
0.7428604960441589,
0.3342337906360626,
-0.26099544763565063,
-0.418517529964447,
0.009128403849899769,
-0.06660177558660507,
1.3409725427627563,
-0.3515147864818573,
0.550495445728302,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.