text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (o *JourneyJourneyResultsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
valuesAccessibilityPreference := o.AccessibilityPreference
joinedAccessibilityPreference := swag.JoinByFormat(valuesAccessibil... | [
-1.0772093534469604,
-0.0749194473028183,
0.9790494441986084,
-0.4292798340320587,
0.11858008056879044,
0.43148520588874817,
0.9991886615753174,
-0.13807271420955658,
-0.3582029640674591,
0.32341453433036804,
0.37634167075157166,
-0.061474595218896866,
-0.24412034451961517,
0.9501114487648... |
func Random(_, _ int, _ float64) float64 { return rand.Float64() } | [
-0.008957361802458763,
0.7634973526000977,
0.21420453488826752,
1.0974738597869873,
0.04139142856001854,
0.07772081345319748,
0.7365608215332031,
-0.16278104484081268,
-0.4513282775878906,
-0.8700493574142456,
0.9924273490905762,
0.3099847435951233,
-0.23254172503948212,
0.7323746681213379... |
func Ones(_, _ int, _ float64) float64 { return 1 } | [
-1.3017584085464478,
0.882843017578125,
0.3844592869281769,
0.2885444164276123,
0.8724780678749084,
-0.46836990118026733,
0.6897430419921875,
-0.3089522123336792,
-0.5727604627609253,
-0.45454245805740356,
-0.8082055449485779,
-0.269134521484375,
0.31724557280540466,
0.7505432963371277,
... |
func Value(v float64) Mapper {
return func(_, _ int, _ float64) float64 { return v }
} | [
-0.5629404783248901,
0.368368923664093,
0.2809789180755615,
0.09614388644695282,
-0.1030789315700531,
0.09709300845861435,
0.41961872577667236,
-1.0639969110488892,
1.007428765296936,
-0.33856162428855896,
0.005705195013433695,
-0.17970924079418182,
0.8151424527168274,
0.8489534854888916,
... |
func Square(_, _ int, v float64) float64 {
return v * v
} | [
-0.33131512999534607,
-0.4244665503501892,
0.24822208285331726,
0.0990891233086586,
0.2995951473712921,
-1.118003010749817,
0.44091156125068665,
-0.720947265625,
0.22533297538757324,
0.24831154942512512,
-0.3362489342689514,
0.3236157298088074,
0.1035679429769516,
0.3406411111354828,
-0.... |
func (m *Manager) StoreDailyRegions(dailyRegions []*models.DailyRegion) error {
var rowsInserted int64
// Insert the records
for _, dailyRegion := range dailyRegions {
response := m.dbConn.Set("gorm:insert_option", "ON CONFLICT DO NOTHING").Create(dailyRegion)
if response.Error != nil {
switch response.Error... | [
-1.051215410232544,
0.6404280662536621,
0.43285343050956726,
-0.2352202981710434,
1.1651135683059692,
0.2179308980703354,
0.7412676811218262,
-0.935385525226593,
-0.01753035932779312,
-0.11693952977657318,
-0.25694000720977783,
-1.78457510471344,
-1.0723297595977783,
0.684183657169342,
0... |
func (m *Manager) StoreDailyRegionsBlob(dailyRegions []*models.DailyRegion) error {
// Insert the records
response := m.dbConn.Create(dailyRegions)
if response.Error != nil {
m.logger.WithError(response.Error).WithField("records_inserted", response.RowsAffected).Warn("Error inserting rows")
return response.Erro... | [
-0.8684981465339661,
0.34364232420921326,
0.5274635553359985,
-0.12122463434934616,
0.8046911954879761,
0.6569865345954895,
0.36435627937316895,
-0.4748634099960327,
-0.16825741529464722,
-0.017435148358345032,
-0.5616057515144348,
-1.6344295740127563,
-1.235895037651062,
0.589322865009307... |
func main() {
var err error
// Get the location of the config file (relative to the binary)
configLocation := flag.String(
"config",
DEFAULT_CONFIG_LOCATION,
"location of toml config file")
flag.Parse()
// Load the config file (config needs to be toml)
config, err = toml.LoadFile(*configLocation)
if err... | [
0.9486989378929138,
-0.004607595037668943,
0.9557585120201111,
0.5049710273742676,
0.6771351099014282,
0.7052339315414429,
0.4799126982688904,
1.0793148279190063,
-1.1238003969192505,
0.03130487725138664,
0.16973763704299927,
0.5184016227722168,
-0.1252998411655426,
0.06372485309839249,
... |
func getHook(w http.ResponseWriter, req *http.Request) {
// Get the JSON and put it into a hook struct
decoder := json.NewDecoder(req.Body)
var h github.PostReceiveHook
err := decoder.Decode(&h)
if err != nil {
fmt.Println("ERROR: ", err.Error())
fmt.Fprint(w, "No JSON... what? ("+err.Error()+")")
return
... | [
0.373599112033844,
0.19637447595596313,
0.7467736601829529,
-0.03069264627993107,
1.4985629320144653,
-0.11946073174476624,
-0.37361353635787964,
0.47086426615715027,
-0.26099658012390137,
-0.18311157822608948,
0.9746114611625671,
0.7713601589202881,
-0.37480783462524414,
0.126137748360633... |
func runCommands(branch string) {
c := config.Get("commands." + branch)
if c == nil {
fmt.Println("No commands to run")
return
}
commands := c.([]interface{})
log := ""
for i, c := range commands {
co := c.(string)
split := strings.Split(co, " ")
cmd := split[0]
var out []byte
var err error
... | [
-0.42218223214149475,
-0.03945372998714447,
0.8011732697486877,
0.2775487005710602,
0.37527722120285034,
-0.2578430473804474,
0.30249741673469543,
0.1306503862142563,
-0.8040310144424438,
-0.5573665499687195,
-0.049954142421483994,
0.25549373030662537,
-0.8127994537353516,
0.57967287302017... |
func LookupScopeAssignment(ctx *pulumi.Context, args *LookupScopeAssignmentArgs, opts ...pulumi.InvokeOption) (*LookupScopeAssignmentResult, error) {
var rv LookupScopeAssignmentResult
err := ctx.Invoke("azure-native:managednetwork:getScopeAssignment", args, &rv, opts...)
if err != nil {
return nil, err
}
return... | [
-1.1011338233947754,
0.01861698552966118,
0.7626068592071533,
-0.4459332525730133,
-0.09730534255504608,
-0.5361357927322388,
-0.13426096737384796,
-0.8745914697647095,
0.9717844724655151,
0.4763404428958893,
0.8347306251525879,
0.9849202036857605,
-0.4831918478012085,
-0.8839633464813232,... |
func (s *StateQuery) CheckStore(ctx context.Context) (bool, context.Context) {
s.initOnce.Do(func() {
s.runner = statequery.QueryRunner{
Query: s.Query,
CacheName: s.CacheName,
DataType: s.DataType,
}
})
devs, err := s.runner.Run()
if err != nil {
return false, ctx
}
if len(devs) > 0 {
ctx... | [
-1.0970784425735474,
0.6062337160110474,
0.61687833070755,
0.7377665042877197,
-0.18578709661960602,
0.301276832818985,
0.749561607837677,
-0.3829229176044464,
0.9372637271881104,
0.27623045444488525,
0.01898098923265934,
0.31081295013427734,
-0.017186621204018593,
0.8551958203315735,
-0... |
func Shrey2(x int, y int) int {
return x
} | [
0.6290819048881531,
-0.7397153973579407,
0.5643907189369202,
-0.3306436538696289,
-0.5281127095222473,
0.0145900072529912,
-0.755121111869812,
-1.1304945945739746,
-0.34956297278404236,
-0.37433984875679016,
-0.6435320377349854,
1.1330045461654663,
0.2989947497844696,
0.25710493326187134,
... |
func (s *Stream) WriteData(data []byte, fin bool) error {
s.waitWriteReply()
var flags spdy.DataFlags
if fin {
flags = spdy.DataFlagFin
s.finishLock.Lock()
if s.finished {
s.finishLock.Unlock()
return ErrWriteClosedStream
}
s.finished = true
s.finishLock.Unlock()
}
dataFrame := &spdy.DataFrame{... | [
-1.0429956912994385,
0.06341081857681274,
0.5286699533462524,
0.13398544490337372,
0.5123736262321472,
-0.11108088493347168,
0.501446545124054,
0.21955400705337524,
0.009488782845437527,
-1.0363558530807495,
0.23990221321582794,
0.030007049441337585,
-1.297256350517273,
0.6909357905387878,... |
func (s *Stream) Write(data []byte) (n int, err error) {
err = s.WriteData(data, false)
if err == nil {
n = len(data)
}
return
} | [
-1.0733400583267212,
0.5730937719345093,
0.2856391668319702,
0.060174811631441116,
0.15902571380138397,
-0.41401568055152893,
0.7411349415779114,
0.4379124939441681,
0.500442385673523,
-0.22111663222312927,
-1.7377063035964966,
0.13474266231060028,
-0.8121286630630493,
1.5545564889907837,
... |
func (s *Stream) Read(p []byte) (n int, err error) {
if s.unread == nil {
select {
case <-s.closeChan:
return 0, io.EOF
case read, ok := <-s.dataChan:
if !ok {
return 0, io.EOF
}
s.unread = read
}
}
n = copy(p, s.unread)
if n < len(s.unread) {
s.unread = s.unread[n:]
} else {
s.unread =... | [
-0.4793349504470825,
-0.10218634456396103,
0.7066240906715393,
-0.48157474398612976,
-0.6618162989616394,
0.19320349395275116,
0.26047614216804504,
-0.2825160324573517,
0.1287095546722412,
-0.4652372896671295,
0.12305912375450134,
0.731094479560852,
-0.5824280381202698,
0.5176512002944946,... |
func (s *Stream) ReadData() ([]byte, error) {
debugMessage("(%p) Reading data from %d", s, s.streamId)
if s.unread != nil {
return nil, ErrUnreadPartialData
}
select {
case <-s.closeChan:
return nil, io.EOF
case read, ok := <-s.dataChan:
if !ok {
return nil, io.EOF
}
return read, nil
}
} | [
0.24076253175735474,
-0.3116374611854553,
0.612226128578186,
-0.15495465695858002,
-0.25583305954933167,
0.5835968852043152,
-0.1052650436758995,
-0.801231324672699,
0.1749039739370346,
-1.2300710678100586,
1.0859285593032837,
0.9516925811767578,
-0.2504979372024536,
0.10580422729253769,
... |
func (s *Stream) Wait() error {
return s.WaitTimeout(time.Duration(0))
} | [
0.45231011509895325,
-0.2920176088809967,
0.2676791548728943,
-0.2012854665517807,
1.0252923965454102,
-0.05935794487595558,
0.3364339768886566,
0.11516618728637695,
-0.3666354715824127,
-0.7920841574668884,
-0.47673964500427246,
1.1402478218078613,
-0.08418560028076172,
0.7999930381774902... |
func (s *Stream) WaitTimeout(timeout time.Duration) error {
var timeoutChan <-chan time.Time
if timeout > time.Duration(0) {
timeoutChan = time.After(timeout)
}
select {
case err := <-s.startChan:
if err != nil {
return err
}
break
case <-timeoutChan:
return ErrTimeout
}
return nil
} | [
0.5989116430282593,
-0.2148468792438507,
0.7096658945083618,
-0.35223183035850525,
-0.023466944694519043,
-0.4024311900138855,
-0.06290576606988907,
-0.23181335628032684,
0.07690572738647461,
0.1994602382183075,
-0.4255748689174652,
0.5736640691757202,
-0.06495162844657898,
0.5429354906082... |
func (s *Stream) Close() error {
select {
case <-s.closeChan:
// Stream is now fully closed
s.conn.removeStream(s)
default:
break
}
return s.WriteData([]byte{}, true)
} | [
0.05034583434462547,
-0.47700443863868713,
0.5618017315864563,
0.07363277673721313,
-0.6324127912521362,
-0.597498893737793,
0.43165892362594604,
-0.6726182103157043,
0.00013191517791710794,
-0.7442557215690613,
-0.3972132205963135,
0.03196171298623085,
-1.3305323123931885,
0.5149391889572... |
func (s *Stream) Reset() error {
s.conn.removeStream(s)
return s.resetStream()
} | [
-0.18087267875671387,
0.17939849197864532,
0.14668771624565125,
0.643073558807373,
-0.10797054320573807,
-1.2539633512496948,
0.37366580963134766,
-0.20224502682685852,
-0.45655685663223267,
0.1093875989317894,
-0.6007077693939209,
1.1530065536499023,
-0.9487019181251526,
0.142753019928932... |
func (s *Stream) CreateSubStream(headers http.Header, fin bool) (*Stream, error) {
return s.conn.CreateStream(headers, s, fin)
} | [
0.39059168100357056,
0.3498196601867676,
0.2765888571739197,
0.9442208409309387,
-0.19515176117420197,
-0.5356878042221069,
-0.8310033082962036,
0.16561883687973022,
-0.11432290077209473,
-1.1761305332183838,
-1.2014046907424927,
-0.1596701592206955,
-0.9611260294914246,
0.4001626968383789... |
func (s *Stream) SetPriority(priority uint8) {
s.priority = priority
} | [
0.19816550612449646,
0.24708227813243866,
0.14299824833869934,
1.0366542339324951,
0.5659458637237549,
-0.8802151083946228,
0.24274420738220215,
-0.15682469308376312,
1.2938799858093262,
-0.8262326121330261,
-1.3146541118621826,
0.3873518705368042,
-1.1855113506317139,
1.6203527450561523,
... |
func (s *Stream) SendHeader(headers http.Header, fin bool) error {
return s.conn.sendHeaders(headers, s, fin)
} | [
-0.9190230369567871,
0.38013264536857605,
0.30616727471351624,
1.0493613481521606,
-0.4103304147720337,
-0.18393152952194214,
-0.48115435242652893,
-0.3013868033885956,
-0.35446760058403015,
-0.018973035737872124,
0.09288660436868668,
0.13456423580646515,
-1.1958268880844116,
0.29110589623... |
func (s *Stream) SendReply(headers http.Header, fin bool) error {
if s.replyCond == nil {
return errors.New("cannot reply on initiated stream")
}
s.replyCond.L.Lock()
defer s.replyCond.L.Unlock()
if s.replied {
return nil
}
err := s.conn.sendReply(headers, s, fin)
if err != nil {
return err
}
s.replie... | [
-0.36909911036491394,
-0.10339313745498657,
0.9103619456291199,
0.7031018137931824,
-0.5058403015136719,
-0.41959136724472046,
-0.44560399651527405,
-0.26066726446151733,
0.6047340035438538,
-0.25643667578697205,
0.009281570091843605,
0.793082594871521,
-1.4662396907806396,
0.6228600144386... |
func (s *Stream) Refuse() error {
if s.replied {
return nil
}
s.replied = true
return s.conn.sendReset(spdy.RefusedStream, s)
} | [
-0.5320835709571838,
0.4992908537387848,
0.5087481737136841,
-0.49599725008010864,
0.2562900483608246,
-0.587233304977417,
0.32770389318466187,
-0.8156229853630066,
-0.1460481882095337,
-1.499427318572998,
-0.7202596068382263,
0.7321256995201111,
-1.814302921295166,
0.7969998121261597,
-... |
func (s *Stream) Cancel() error {
return s.conn.sendReset(spdy.Cancel, s)
} | [
0.6802899837493896,
-0.07818862050771713,
0.3820229470729828,
0.8472458124160767,
-0.5229511260986328,
-0.44435915350914,
0.30510926246643066,
0.12675781548023224,
-0.30535921454429626,
-0.09004577249288559,
-0.46593114733695984,
0.7062919735908508,
-0.5649142861366272,
0.6179563999176025,... |
func (s *Stream) ReceiveHeader() (http.Header, error) {
select {
case <-s.closeChan:
break
case header, ok := <-s.headerChan:
if !ok {
return nil, fmt.Errorf("header chan closed")
}
return header, nil
}
return nil, fmt.Errorf("stream closed")
} | [
-0.48794862627983093,
-0.9971103072166443,
0.9308858513832092,
-0.3407209813594818,
-0.49336618185043335,
0.01687726192176342,
-0.003499177750200033,
-0.8646489381790161,
0.19475090503692627,
-0.4347093105316162,
0.3872663676738739,
0.3608372211456299,
-1.1494061946868896,
0.05066674202680... |
func (s *Stream) Parent() *Stream {
return s.parent
} | [
1.09356689453125,
-0.18922890722751617,
0.2043778896331787,
0.3009575605392456,
-0.9517544507980347,
-0.295982301235199,
1.6286200284957886,
-1.0657083988189697,
-0.009200341068208218,
-1.3665204048156738,
0.21126776933670044,
0.8875182867050171,
-0.6332012414932251,
0.6190290451049805,
... |
func (s *Stream) Headers() http.Header {
return s.headers
} | [
-0.4436788260936737,
-0.6683235168457031,
0.10780114680528641,
0.2397020012140274,
-0.3649899959564209,
0.03239988908171654,
-0.12725196778774261,
-1.149412989616394,
0.1897861808538437,
-1.1632925271987915,
0.06483623385429382,
0.9606760144233704,
-0.7693056464195251,
-0.10860767215490341... |
func (s *Stream) String() string {
return fmt.Sprintf("stream:%d", s.streamId)
} | [
0.5545265674591064,
-0.8287339210510254,
0.13525357842445374,
-0.2920255661010742,
-0.32964712381362915,
0.6090985536575317,
0.3193550705909729,
-1.0957211256027222,
0.08987671136856079,
-0.29346203804016113,
-0.601741373538971,
1.1427901983261108,
-0.035819217562675476,
0.4294634461402893... |
func (s *Stream) Identifier() uint32 {
return uint32(s.streamId)
} | [
0.1339205801486969,
0.027769146487116814,
0.3673328161239624,
-0.3382759392261505,
-0.6688071489334106,
0.7902292609214783,
1.2917025089263916,
0.0940668061375618,
1.1398261785507202,
-1.0683708190917969,
-1.181416392326355,
0.6732485294342041,
-0.3891228139400482,
1.046541690826416,
0.1... |
func (s *Stream) IsFinished() bool {
return s.finished
} | [
-0.12256135791540146,
-0.20388130843639374,
0.22854995727539062,
0.16253165900707245,
0.0861620306968689,
-0.40771499276161194,
-0.11084871739149094,
-0.17280881106853485,
0.07373141497373581,
0.0031054073479026556,
-1.771281123161316,
1.2026437520980835,
-0.7438508868217468,
0.83264392614... |
func (s *Stream) SetDeadline(t time.Time) error {
return s.conn.conn.SetDeadline(t)
} | [
-0.20719417929649353,
-0.20054657757282257,
0.4712409973144531,
0.5303544402122498,
0.8391454815864563,
0.07683038711547852,
-0.7469789385795593,
-0.3190396726131439,
-1.2030317783355713,
0.12186120450496674,
-1.2695060968399048,
-0.0683731809258461,
-0.15947319567203522,
1.118067622184753... |
func (r MedicinalProductAuthorization) MarshalJSON() ([]byte, error) {
return json.Marshal(struct {
OtherMedicinalProductAuthorization
ResourceType string `json:"resourceType"`
}{
OtherMedicinalProductAuthorization: OtherMedicinalProductAuthorization(r),
ResourceType: "MedicinalProductAu... | [
-0.14593662321567535,
-0.3613300323486328,
0.2658371925354004,
0.14318548142910004,
-0.8932292461395264,
-0.31121546030044556,
-0.18961361050605774,
0.0824449360370636,
1.0759856700897217,
0.47054755687713623,
0.8642249703407288,
1.0406193733215332,
-0.3521878719329834,
-0.3869679272174835... |
func UnmarshalMedicinalProductAuthorization(b []byte) (MedicinalProductAuthorization, error) {
var medicinalProductAuthorization MedicinalProductAuthorization
if err := json.Unmarshal(b, &medicinalProductAuthorization); err != nil {
return medicinalProductAuthorization, err
}
return medicinalProductAuthorization,... | [
-0.4173233211040497,
-0.24610252678394318,
0.6274340748786926,
-0.2106667309999466,
-1.5015394687652588,
-0.5988770723342896,
-0.24516154825687408,
0.6887163519859314,
0.4323822259902954,
0.8019115924835205,
0.9499297738075256,
0.7148492932319641,
-0.543177604675293,
-1.4440654516220093,
... |
func ObjectFromUnstructured(u *unstructured.Unstructured) Object {
gvk := u.GroupVersionKind()
if isClaim(gvk) {
return NewClaim(u)
} else if isManaged(gvk) {
return NewManaged(u)
} else if isPortableClass(gvk) {
return NewPortableClass(u)
} else if isNonPortableClass(gvk) {
return NewNonPortableClass(u)
... | [
-0.4060746431350708,
-0.9329916834831238,
0.6481306552886963,
0.2691989541053772,
-0.44793474674224854,
0.5192388296127319,
-0.07594247162342072,
-0.49462905526161194,
0.50836181640625,
-0.8726601004600525,
-0.44450536370277405,
0.7701435685157776,
0.225739523768425,
-0.3276824355125427,
... |
func (r *AzureSqlFirewallRuleReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
For(&v1beta1.AzureSqlFirewallRule{}).
Complete(r)
} | [
0.6965926885604858,
0.5177659392356873,
0.435669869184494,
-0.5007351636886597,
0.5155614614486694,
-0.7499480247497559,
0.8467541933059692,
-0.11248977482318878,
-0.3610886335372925,
-0.0854293629527092,
0.15989729762077332,
-1.2005736827850342,
-0.005507740192115307,
1.7146998643875122,
... |
func sanityCheck() {
log.Info("Running a sanity check")
sanityCheckDockerSockExists()
checkMachineHostname()
checkMachineName()
} | [
-0.3447103500366211,
0.6140977144241333,
0.26162105798721313,
0.5959440469741821,
0.8444905281066895,
0.7507022023200989,
0.5373166799545288,
0.27743175625801086,
0.13908162713050842,
-0.9633683562278748,
0.44465726613998413,
1.2512552738189697,
0.04480259492993355,
0.9148291945457458,
0... |
func New(width core.Px, frequencyRange core.FrequencyRange, vfoFrequency core.Frequency) *Panorama {
result := Panorama{
width: width,
frequencyRange: frequencyRange,
dbRange: core.DBRange{From: -105, To: 10},
resolution: map[core.ViewMode]core.HzPerPx{
core.ViewFixed: calcResolution(freq... | [
0.2798103392124176,
-0.03714335709810257,
0.6170095205307007,
-0.21557043492794037,
-0.7525995969772339,
-0.389098584651947,
0.24750813841819763,
-0.5879813432693481,
1.2626073360443115,
-0.2846270203590393,
-0.17944838106632233,
-0.33681321144104004,
-0.16971701383590698,
0.52173405885696... |
func NewFullSpectrum(width core.Px, frequencyRange core.FrequencyRange, vfoFrequency core.Frequency) *Panorama {
result := New(width, frequencyRange, vfoFrequency)
result.fullRangeMode = true
return result
} | [
0.7718797326087952,
-0.2914617359638214,
0.5418993830680847,
-0.16261248290538788,
-1.2202657461166382,
-0.6396992802619934,
-0.22095078229904175,
-0.6087349653244019,
0.9251148700714111,
-0.43140870332717896,
-0.06657995283603668,
0.08584257960319519,
-0.2856062650680542,
0.50177025794982... |
func (p Panorama) FrequencyRange() core.FrequencyRange {
return p.frequencyRange
} | [
0.4758245348930359,
0.20205585658550262,
-0.052078068256378174,
0.5776468515396118,
0.11118060350418091,
-0.41562914848327637,
0.30234187841415405,
-0.31440606713294983,
0.37883466482162476,
-1.3732843399047852,
0.6322944164276123,
-0.0012781284749507904,
-1.1413378715515137,
0.14806042611... |
func (p Panorama) VFO() (vfo core.VFO, band bandplan.Band) {
return p.vfo, p.band
} | [
0.7552637457847595,
-1.0044151544570923,
0.48168155550956726,
-0.0796470120549202,
0.1775808036327362,
1.0084879398345947,
0.060261938720941544,
-1.582842469215393,
0.632890522480011,
-0.25162026286125183,
-0.2690940499305725,
0.7886842489242554,
-0.20746180415153503,
-0.2819285988807678,
... |
func (p *Panorama) ToggleSignalDetection() {
p.signalDetectionActive = !p.signalDetectionActive
} | [
0.6136290431022644,
-0.8954334855079651,
0.3253321051597595,
0.6975886225700378,
0.1820167601108551,
0.7996367812156677,
0.7841651439666748,
-0.028727218508720398,
1.1708834171295166,
0.2682379484176636,
-1.2765984535217285,
-0.3113711476325989,
-0.5969663858413696,
0.1889265477657318,
-... |
func (p *Panorama) SignalDetectionActive() bool {
return p.signalDetectionActive
} | [
0.47090232372283936,
-0.649241030216217,
0.38676202297210693,
1.0330982208251953,
-0.15906737744808197,
1.1302591562271118,
0.6019062399864197,
-0.4868611991405487,
0.5024571418762207,
-0.17471127212047577,
-1.4101706743240356,
-0.33670178055763245,
-0.39263278245925903,
-0.743327379226684... |
func (p *Panorama) ToggleViewMode() {
if p.viewMode == core.ViewFixed {
p.viewMode = core.ViewCentered
} else {
p.viewMode = core.ViewFixed
}
p.updateFrequencyRange()
} | [
-0.13438774645328522,
0.18952105939388275,
0.5155558586120605,
-0.0626707449555397,
0.3530076742172241,
1.1109769344329834,
0.5991260409355164,
0.24606569111347198,
0.8869001865386963,
-0.694791316986084,
0.05234183371067047,
-0.4177449643611908,
-0.6007028222084045,
0.19908662140369415,
... |
func (p *Panorama) ViewMode() core.ViewMode {
return p.viewMode
} | [
-0.025136755779385567,
-0.22636055946350098,
0.15519341826438904,
0.09684199094772339,
-0.4536930024623871,
1.4325768947601318,
0.06108814477920532,
-0.21040362119674683,
1.0985567569732666,
-1.1871769428253174,
-0.05128749832510948,
0.3925860822200775,
-0.9017971754074097,
-0.094409719109... |
func (p *Panorama) ZoomToBand() {
if p.band.Width() == 0 {
return
}
p.zoomTo(p.band.Expanded(1000))
} | [
0.2905334234237671,
0.7922168374061584,
0.4104987680912018,
0.5709260702133179,
0.24340619146823883,
1.1947115659713745,
-0.02636760286986828,
-1.1769155263900757,
1.141445517539978,
-0.6089714765548706,
0.08514731377363205,
0.45690110325813293,
-0.07270686328411102,
0.3634975552558899,
... |
func (p *Panorama) ResetZoom() {
switch p.viewMode {
case core.ViewFixed:
p.resolution[p.viewMode] = defaultFixedResolution
case core.ViewCentered:
p.resolution[p.viewMode] = defaultCenteredResolution
}
p.updateFrequencyRange()
} | [
0.15145714581012726,
0.38352641463279724,
0.33742228150367737,
1.1953754425048828,
0.6303450465202332,
0.008864667266607285,
1.124550223350525,
0.059664759784936905,
0.471340149641037,
-0.691838800907135,
-0.49178749322891235,
0.5807111859321594,
-0.17630881071090698,
-0.45617446303367615,... |
func (p *Panorama) ShiftFrequencyRange(ratio core.Frct) {
Δf := p.frequencyRange.Width() * core.Frequency(ratio)
if p.viewMode == core.ViewFixed {
p.frequencyRange.Shift(Δf)
}
} | [
-0.32582613825798035,
0.8219866156578064,
0.4083576500415802,
0.545002281665802,
-0.4866601824760437,
0.6494435667991638,
0.5685572028160095,
-0.5218037962913513,
0.1725517213344574,
-0.7743165493011475,
0.8637356758117676,
-0.7329354286193848,
-0.6312629580497742,
0.7081390023231506,
1.... |
func (p Panorama) Data() core.Panorama {
if p.fullRangeMode {
return p.fullRangeData()
}
return p.data()
} | [
-0.38017550110816956,
-0.3898695409297943,
0.17170758545398712,
0.47297486662864685,
-0.29461589455604553,
1.6915273666381836,
-0.025363197550177574,
-0.7090731263160706,
1.094762921333313,
-0.6898205280303955,
-0.26126155257225037,
0.2661967873573303,
-0.19366373121738434,
0.1193682029843... |
func (*Consumer) Descriptor() ([]byte, []int) {
return file_pub_proto_rawDescGZIP(), []int{0}
} | [
-0.5571476221084595,
0.14430996775627136,
0.3729168474674225,
0.24295109510421753,
-0.20917390286922455,
-0.12860944867134094,
0.6856754422187805,
0.4155145287513733,
-0.7869687676429749,
-0.049220312386751175,
-0.41518139839172363,
0.2936185896396637,
0.16970188915729523,
1.08792722225189... |
func (e *Endpoints) OAuth2() oauth2.Endpoint {
return oauth2.Endpoint{
AuthURL: e.Authorization,
TokenURL: e.Token,
}
} | [
0.20537413656711578,
-1.119202971458435,
0.10380715876817703,
0.4793305993080139,
-0.5050355195999146,
-0.2644067704677582,
-0.9400349259376526,
-0.12499644607305527,
-0.1307690441608429,
-0.4538671672344208,
0.6947872042655945,
1.3826806545257568,
0.8716955184936523,
-0.2580716907978058,
... |
func (c *Config) Endpoints() (*Endpoints, error) {
var err error
if c.endpoints == nil {
err = c.discovery()
}
return c.endpoints, err
} | [
0.021614866331219673,
0.6126372218132019,
0.1895207166671753,
0.7630643248558044,
0.7598419189453125,
-0.44631627202033997,
-0.16676895320415497,
0.18983212113380432,
0.363698273897171,
-0.25425246357917786,
0.08040104061365128,
0.009086856618523598,
-0.4846765398979187,
0.1354787647724151... |
func NewConfig(ctx context.Context, issuer string) (*Config, error) {
c := &Config{
Issuer: issuer,
Ctx: ctx,
}
err := c.discovery()
return c, err
} | [
1.0272024869918823,
0.09348206222057343,
0.23527707159519196,
0.9176042079925537,
-0.514656662940979,
-0.3042779266834259,
-0.23687312006950378,
0.27860164642333984,
0.7180877923965454,
-0.5336609482765198,
0.08614762872457504,
0.18251056969165802,
0.7862949967384338,
0.2598201036453247,
... |
func (e ServicePointEdges) FromOrErr() ([]*Bookborrow, error) {
if e.loadedTypes[0] {
return e.From, nil
}
return nil, &NotLoadedError{edge: "from"}
} | [
-0.5950558185577393,
-0.6210001707077026,
0.36133873462677,
0.7117024064064026,
0.1343749314546585,
0.4383386969566345,
-0.26014962792396545,
-0.6432362198829651,
0.4935349225997925,
0.9148865342140198,
0.9002887010574341,
0.7890092134475708,
-0.752718985080719,
-0.20106522738933563,
-0.... |
func (e ServicePointEdges) ServicepointOrErr() ([]*Booking, error) {
if e.loadedTypes[1] {
return e.Servicepoint, nil
}
return nil, &NotLoadedError{edge: "servicepoint"}
} | [
-0.9579648375511169,
-0.3246302902698517,
0.43870654702186584,
0.6968602538108826,
-0.18613624572753906,
0.6095892786979675,
-0.30980372428894043,
-0.32322484254837036,
0.23675432801246643,
1.4938266277313232,
1.0014541149139404,
0.7089967131614685,
-1.0116336345672607,
-0.2872536778450012... |
func (*ServicePoint) scanValues() []interface{} {
return []interface{}{
&sql.NullInt64{}, // id
&sql.NullString{}, // COUNTER_NUMBER
}
} | [
-0.4464634656906128,
0.36870718002319336,
0.3357084095478058,
0.7128408551216125,
-0.18722862005233765,
-0.13848035037517548,
-1.0567235946655273,
-0.5264669060707092,
0.27067819237709045,
-1.0080273151397705,
-0.2748158276081085,
-0.028920214623212814,
-0.5636318325996399,
0.9133237004280... |
func (sp *ServicePoint) assignValues(values ...interface{}) error {
if m, n := len(values), len(servicepoint.Columns); m < n {
return fmt.Errorf("mismatch number of scan values: %d != %d", m, n)
}
value, ok := values[0].(*sql.NullInt64)
if !ok {
return fmt.Errorf("unexpected type %T for field id", value)
}
sp... | [
-0.2505771219730377,
0.07370973378419876,
0.6452940106391907,
0.4917718470096588,
0.407466858625412,
0.35224008560180664,
0.037239644676446915,
-0.011982630006968975,
-0.07213614135980606,
-0.5956899523735046,
0.23330965638160706,
-0.8120606541633606,
-0.5433914065361023,
0.860727667808532... |
func (sp *ServicePoint) QueryFrom() *BookborrowQuery {
return (&ServicePointClient{config: sp.config}).QueryFrom(sp)
} | [
1.2812505960464478,
-0.37398192286491394,
0.28580883145332336,
1.2830665111541748,
-0.4689269959926605,
0.3630870580673218,
0.45730406045913696,
-0.1971173733472824,
0.025447677820920944,
-0.01675001159310341,
0.7896208167076111,
0.5909615159034729,
-0.8350738883018494,
-0.4924746453762054... |
func (sp *ServicePoint) QueryServicepoint() *BookingQuery {
return (&ServicePointClient{config: sp.config}).QueryServicepoint(sp)
} | [
0.5365723967552185,
-0.20105242729187012,
0.4699009358882904,
1.7310765981674194,
-1.0733622312545776,
0.592318058013916,
0.05555351451039314,
-0.16808751225471497,
-0.527491569519043,
0.12404520064592361,
0.6350738406181335,
0.312558650970459,
-1.2120740413665771,
-0.18710775673389435,
... |
func (sp *ServicePoint) Update() *ServicePointUpdateOne {
return (&ServicePointClient{config: sp.config}).UpdateOne(sp)
} | [
0.35766997933387756,
-0.4395984411239624,
0.0629255473613739,
0.9258438944816589,
-0.3156528174877167,
0.5353304147720337,
-0.2845746874809265,
0.08695429563522339,
0.19219130277633667,
0.8600714802742004,
-0.24277929961681366,
-0.2724294662475586,
-1.8647867441177368,
-0.670192539691925,
... |
func (sp *ServicePoint) Unwrap() *ServicePoint {
tx, ok := sp.config.driver.(*txDriver)
if !ok {
panic("ent: ServicePoint is not a transactional entity")
}
sp.config.driver = tx.drv
return sp
} | [
-0.0373561717569828,
0.29110661149024963,
0.29878151416778564,
0.017450103536248207,
-0.371801495552063,
-0.11618292331695557,
-0.009828885085880756,
0.3778417408466339,
0.32531291246414185,
0.8919766545295715,
0.8539429903030396,
0.2448040097951889,
-0.05503447353839874,
-0.87898713350296... |
func (sp *ServicePoint) String() string {
var builder strings.Builder
builder.WriteString("ServicePoint(")
builder.WriteString(fmt.Sprintf("id=%v", sp.ID))
builder.WriteString(", COUNTER_NUMBER=")
builder.WriteString(sp.COUNTERNUMBER)
builder.WriteByte(')')
return builder.String()
} | [
0.46761995553970337,
-0.9243873357772827,
0.2886209189891815,
-0.4020996689796448,
-0.49719488620758057,
0.9263277053833008,
0.3436761200428009,
-0.766632080078125,
-0.22853662073612213,
0.21292515099048615,
-0.04853342846035957,
0.3978537619113922,
-1.243592381477356,
-0.5676456689834595,... |
func ContainsFinalizer(metadata metav1.ObjectMeta, finalizer string) bool {
for _, f := range metadata.Finalizers {
if f == finalizer {
return true
}
}
return false
} | [
-0.5570009350776672,
-1.028852105140686,
0.41383281350135803,
0.1636941134929657,
-0.8454691767692566,
-0.11716672033071518,
-0.35902225971221924,
-0.33141106367111206,
-0.009306583553552628,
-0.24191610515117645,
-0.2019609659910202,
-0.025390183553099632,
-0.15606975555419922,
0.53672403... |
func GetBoundAndReleasedPVs(obj runtime.Object, c client.Client) ([]corev1.PersistentVolume, []corev1.PersistentVolume, error) {
accessor, err := meta.Accessor(obj)
if err != nil {
return nil, nil, fmt.Errorf("could not get object metadata accessor from obj: %+v", obj)
}
name := accessor.GetName()
namespace := ... | [
-0.5912930965423584,
-1.7405943870544434,
0.8334431052207947,
0.05126696452498436,
-0.5056619644165039,
0.09031780809164047,
-1.0933334827423096,
-0.4534466862678528,
0.929524838924408,
0.6346874237060547,
0.4817817509174347,
0.5991074442863464,
-0.38590627908706665,
1.0163315534591675,
... |
func New(rawConn net.Conn) *Conn {
if _, ok := rawConn.(*Conn); ok {
return rawConn.(*Conn)
}
return &Conn{
Conn: rawConn,
isClosed: atomic.NewBool(false),
createdAt: time.Now(),
}
} | [
-0.3974633812904358,
-0.8109642267227173,
0.35260486602783203,
0.49203822016716003,
-0.09212802350521088,
-0.4864744544029236,
-0.6581270694732666,
0.3203006386756897,
-0.3290432393550873,
-0.7463055849075317,
-0.29883188009262085,
-0.20901642739772797,
0.9256284832954407,
0.38761609792709... |
func (c *Conn) SetReadTimeout(timeout time.Duration) {
c.readTimeout = timeout
} | [
0.8404779434204102,
-0.4324810802936554,
0.22913791239261627,
-0.3992440700531006,
0.4220992922782898,
0.6840009689331055,
-1.2320204973220825,
0.46081218123435974,
-0.5924577116966248,
0.1321093589067459,
-0.16119655966758728,
0.11995769292116165,
-0.2698690593242645,
-0.15759094059467316... |
func (c *Conn) SetWriteTimeout(timeout time.Duration) {
c.writeTimeout = timeout
} | [
0.17956183850765228,
-0.5735999941825867,
0.15869301557540894,
-0.09717974811792374,
1.3627911806106567,
-0.14359460771083832,
-0.32429927587509155,
0.974639356136322,
-0.8333337903022766,
0.5699276328086853,
-0.4648672938346863,
0.029366234317421913,
-0.4056348502635956,
0.409115463495254... |
func (c *Conn) SetStats(stats *Stats) {
c.Stats = stats
} | [
0.29504117369651794,
0.23534362018108368,
-0.061460964381694794,
0.385702520608902,
0.18568827211856842,
0.19185377657413483,
-0.8369265794754028,
-0.04009364917874336,
0.4191700518131256,
-1.0161598920822144,
-0.8200728297233582,
0.3324427604675293,
-0.38848555088043213,
0.227281659841537... |
func (c *Conn) Read(b []byte) (int, error) {
if c.readTimeout > 0 {
if err := c.Conn.SetReadDeadline(time.Now().Add(c.readTimeout)); err != nil {
return 0, err
}
}
n, err := c.Conn.Read(b)
if err == nil && c.Stats != nil {
c.Stats.ReadTotal.Add(uint64(n))
}
c.incBytesIn(n)
return n, err
} | [
-0.3485504388809204,
0.12232037633657455,
0.8509098887443542,
0.22963552176952362,
-0.39999625086784363,
-0.12450827658176422,
0.28183820843696594,
0.22086745500564575,
-0.06580466032028198,
-0.28257375955581665,
0.12107934057712555,
-0.06723401695489883,
-0.7186027765274048,
0.56352263689... |
func (c *Conn) Write(b []byte) (int, error) {
if c.writeTimeout > 0 {
if err := c.Conn.SetWriteDeadline(time.Now().Add(c.writeTimeout)); err != nil {
return 0, err
}
}
n, err := c.Conn.Write(b)
if err == nil && c.Stats != nil {
c.Stats.WriteTotal.Add(uint64(n))
}
c.incBytesOut(n)
return n, err
} | [
-1.0538933277130127,
0.5113705992698669,
0.6502713561058044,
0.4344866871833801,
0.12843115627765656,
-0.4368577301502228,
0.6583094596862793,
0.612718939781189,
-0.2088368833065033,
0.29539936780929565,
-0.45093512535095215,
-0.5179987549781799,
-0.8074970245361328,
0.6949435472488403,
... |
func (c *Conn) Close() error {
if !c.isClosed.CAS(false, true) {
return nil
}
if c.Stats != nil {
c.Stats.Duration.Record(uint64(time.Since(c.createdAt) / time.Second))
if c.recordDurationHook != nil {
c.recordDurationHook()
}
}
return c.Conn.Close()
} | [
0.40054771304130554,
0.8256450891494751,
0.5786323547363281,
0.6998780965805054,
0.20234818756580353,
0.3658377230167389,
0.3128730356693268,
-0.5380949378013611,
-0.6089044809341431,
-0.4947296679019928,
0.7940881252288818,
0.21690283715724945,
-0.018230481073260307,
1.099168062210083,
... |
func (c *Conn) CloseWrite() error {
if closer, ok := c.Conn.(interface {
CloseWrite() error
}); ok {
return closer.CloseWrite()
}
return nil
} | [
-0.5432105660438538,
0.34762999415397644,
0.39353781938552856,
1.3404678106307983,
0.49622228741645813,
-0.15798714756965637,
0.32263296842575073,
-0.988520622253418,
-0.5163090229034424,
0.09457322955131531,
0.9496800899505615,
-0.6635636687278748,
-0.9140292406082153,
0.8066297173500061,... |
func (c *Conn) CloseRead() error {
if closer, ok := c.Conn.(interface {
CloseRead() error
}); ok {
return closer.CloseRead()
}
return nil
} | [
-0.1613532453775406,
-0.7583234310150146,
0.70560622215271,
0.47027137875556946,
-1.0027903318405151,
0.43080297112464905,
-0.05587119609117508,
-1.0115351676940918,
0.059971895068883896,
-0.9775075912475586,
1.2128170728683472,
0.15162821114063263,
-0.6120150685310364,
-0.0489626973867416... |
func (c *connCounter) SetInBytesCounter(u *atomic.Uint64) {
if u == nil {
return
}
c.inBytesCounter = u
} | [
0.24150559306144714,
-0.36923062801361084,
0.3319922685623169,
-0.6861011981964111,
-0.707683801651001,
0.2373107671737671,
-0.28615838289260864,
0.3597870469093323,
-0.3676586151123047,
-0.9691567420959473,
-0.7543631196022034,
0.18735921382904053,
-0.7006360292434692,
1.638127326965332,
... |
func (c *connCounter) SetOutBytesCounter(u *atomic.Uint64) {
if u == nil {
return
}
c.outBytesCounter = u
} | [
-0.1346205621957779,
-0.0875646248459816,
0.3546914756298065,
-0.6787402629852295,
-1.0936734676361084,
0.6006477475166321,
0.0904569998383522,
0.5569756627082825,
-0.38974136114120483,
-0.700006365776062,
-0.5107622146606445,
0.2564893066883087,
-0.16454769670963287,
1.4518496990203857,
... |
func ListingValidate(u uint) (map[string]interface{}, bool) {
if seller := GetSeller(u); seller == nil {
r := utils.Message(false, "There is no seller account")
return r, false
}
r := utils.Message(true, "Lising is validated")
return r, true
} | [
-1.1334198713302612,
-0.5395423173904419,
0.673771858215332,
0.3338555097579956,
-0.38466814160346985,
0.010174700990319252,
0.24020664393901825,
1.1018315553665161,
0.4221682846546173,
-0.1067245826125145,
0.15592116117477417,
-0.26927638053894043,
-0.4166257679462433,
0.4709273874759674,... |
func FlattenMembers(m []Member) []Member {
embedded := []Member{}
normal := []Member{}
type nameInfo struct {
top bool
i int
}
names := map[string]nameInfo{}
for i := range m {
if m[i].Embedded && m[i].Type.Kind == Struct {
embedded = append(embedded, m[i])
} else {
normal = append(nor... | [
-0.2654776871204376,
-0.4693918824195862,
0.8516586422920227,
0.30384233593940735,
-0.5910981297492981,
0.6528817415237427,
0.11145539581775665,
-0.38962578773498535,
-0.07941175252199173,
0.3826155960559845,
-0.09685112535953522,
-0.030705327168107033,
-1.5653200149536133,
0.5636464357376... |
func NewElementName(name string) *Element {
return &Element{name: name}
} | [
-0.5739318132400513,
-0.635373592376709,
-0.10475953668355942,
0.6590913534164429,
-1.9438719749450684,
0.07542473822832108,
-0.5445333123207092,
0.480017751455307,
0.4706801772117615,
0.6810491681098938,
-0.814933717250824,
-0.06284081190824509,
-0.24674808979034424,
0.028265444561839104,... |
func NewElementNamespace(name, namespace string) *Element {
return &Element{
name: name,
attrs: attributeSet([]Attribute{{"xmlns", namespace}}),
}
} | [
-0.6455743312835693,
-0.5491299033164978,
-0.1303272545337677,
0.05610683932900429,
-1.3643702268600464,
-0.09690885245800018,
-1.5178334712982178,
-0.279335618019104,
1.1538305282592773,
0.3294743597507477,
-0.7239807844161987,
0.045334506779909134,
0.30835819244384766,
0.5651599168777466... |
func NewElementFromElement(elem XElement) *Element {
e := &Element{}
e.copyFrom(elem)
return e
} | [
0.5938176512718201,
0.12247943878173828,
0.08889876306056976,
1.106521487236023,
-0.9361692667007446,
0.8693382143974304,
-0.6504150032997131,
-0.7413835525512695,
0.6993926763534546,
-0.1330530345439911,
-0.5629847049713135,
0.5711246132850647,
-0.23596690595149994,
-0.8586558103561401,
... |
func NewElementFromBytes(buf *bytes.Buffer) (*Element, error) {
e := &Element{}
if err := e.FromBytes(buf); err != nil {
return nil, err
}
return e, nil
} | [
0.5136517882347107,
-0.899276077747345,
-0.30688413977622986,
0.021626047790050507,
-0.4344531297683716,
0.4663047790527344,
-0.030797164887189865,
-0.17812682688236237,
0.6729294657707214,
-0.3574179410934448,
-0.7386024594306946,
0.09216554462909698,
-0.34127911925315857,
0.2471694946289... |
func (e *Element) Name() string {
return e.name
} | [
-0.7794301509857178,
-0.3183082640171051,
0.17179705202579498,
0.3872438371181488,
-0.5309072136878967,
0.6028512716293335,
0.15638895332813263,
-0.02676747925579548,
0.18060123920440674,
0.8355181813240051,
-0.4203474819660187,
-0.13762249052524567,
0.26613491773605347,
0.503533661365509,... |
func (e *Element) Attributes() AttributeSet {
return e.attrs
} | [
-0.30239996314048767,
0.10093241184949875,
0.11826816946268082,
-0.4546060562133789,
-0.03424903377890587,
-0.07061055302619934,
-0.39864182472229004,
-0.06868928670883179,
0.8745326995849609,
-1.00540292263031,
0.9060589075088501,
0.5778898596763611,
0.13656635582447052,
0.004778307862579... |
func (e *Element) Elements() ElementSet {
return e.elements
} | [
-0.5456550717353821,
-0.08839219063520432,
0.2948935031890869,
-0.6867249011993408,
0.04664735868573189,
0.40817680954933167,
-0.10279273986816406,
-0.41115841269493103,
1.1726106405258179,
-1.0635454654693604,
0.20719587802886963,
0.47193029522895813,
-0.1223253533244133,
0.46246242523193... |
func (e *Element) Text() string {
return e.text
} | [
-0.26209506392478943,
0.1551000326871872,
-0.09486488997936249,
0.6506124138832092,
0.18545860052108765,
0.6396101713180542,
0.35909131169319153,
-0.23947042226791382,
1.0796602964401245,
0.4052574038505554,
-0.4015265703201294,
-0.012881001457571983,
-0.068763367831707,
-0.167915374040603... |
func (e *Element) ID() string {
return e.attrs.Get("id")
} | [
0.3820323944091797,
-0.36029747128486633,
0.2751867175102234,
1.2176897525787354,
0.4913037419319153,
1.4005110263824463,
-0.010974764823913574,
0.4870378375053406,
1.3118559122085571,
-0.031085418537259102,
-0.06298492103815079,
-0.41298308968544006,
0.13760194182395935,
0.440825045108795... |
func (e *Element) Namespace() string {
return e.attrs.Get("xmlns")
} | [
0.22365586459636688,
0.3911069631576538,
0.16218703985214233,
0.6830685138702393,
0.18521837890148163,
0.13510194420814514,
-0.47337502241134644,
-0.5616572499275208,
1.7082620859146118,
-0.5196579694747925,
0.2070671170949936,
0.24141348898410797,
0.6202974319458008,
0.16226008534431458,
... |
func (e *Element) Language() string {
return e.attrs.Get("xml:lang")
} | [
0.023333290591835976,
0.10582539439201355,
0.11857941746711731,
0.6527897715568542,
-0.02158365398645401,
0.6302931904792786,
0.511140763759613,
0.18053041398525238,
0.6525065898895264,
-0.09556756913661957,
0.2783277630805969,
-0.5822599530220032,
0.5796253085136414,
0.42018288373947144,
... |
func (e *Element) Version() string {
return e.attrs.Get("version")
} | [
-0.557428777217865,
-0.6466501951217651,
0.029790829867124557,
1.0770269632339478,
0.5208711624145508,
0.8918328881263733,
0.9407432675361633,
0.5791056752204895,
0.19748182594776154,
0.7260223031044006,
-0.5582056045532227,
-0.8507133722305298,
0.10211653262376785,
0.394793301820755,
0.... |
func (e *Element) From() string {
return e.attrs.Get("from")
} | [
0.2596954107284546,
-0.054788023233413696,
0.49695274233818054,
0.5147459506988525,
-0.1669442355632782,
1.1973148584365845,
0.30929672718048096,
0.27086788415908813,
0.31001096963882446,
-0.1571003943681717,
0.37850484251976013,
0.0803319439291954,
1.0593030452728271,
-0.07063670456409454... |
func (e *Element) To() string {
return e.attrs.Get("to")
} | [
-0.8536937236785889,
0.6121986508369446,
0.49709680676460266,
-0.422116219997406,
0.5347561836242676,
0.29433077573776245,
0.5510749816894531,
0.5125700831413269,
0.10284766554832458,
-0.027673589065670967,
-0.30302008986473083,
0.253778874874115,
0.6730456948280334,
-0.6892889738082886,
... |
func (e *Element) Type() string {
return e.attrs.Get("type")
} | [
-0.3382178843021393,
0.5166564583778381,
0.2577502727508545,
0.7640724182128906,
0.6179640889167786,
0.3978688716888428,
0.7642769813537598,
-0.10320352017879486,
0.5405179858207703,
0.283232718706131,
0.2243889719247818,
0.03252168744802475,
-0.06294023990631104,
0.4172811210155487,
1.2... |
func (e *Element) IsStanza() bool {
switch e.Name() {
case "iq", "presence", "message":
return true
}
return false
} | [
-0.6722795963287354,
-0.01987690106034279,
0.48595330119132996,
1.4746102094650269,
0.36651375889778137,
-0.08409937471151352,
0.2821962535381317,
-0.09426343441009521,
0.13864247500896454,
-0.1595696359872818,
-0.46902844309806824,
-0.0038080213125795126,
-0.18748538196086884,
1.093365311... |
func (e *Element) String() string {
buf := bufPool.Get()
defer bufPool.Put(buf)
_ = e.ToXML(buf, true)
return buf.String()
} | [
0.1601191908121109,
-0.4253576099872589,
-0.03503601253032684,
-0.2318594604730606,
-0.24725674092769623,
0.6016419529914856,
0.8876403570175171,
-1.0496636629104614,
0.04011981561779976,
-0.4199768006801605,
-0.3777399957180023,
0.41111060976982117,
-0.23334425687789917,
0.001965015428140... |
func (e *Element) ToXML(w io.Writer, includeClosing bool) error {
if _, err := io.WriteString(w, "<"); err != nil {
return err
}
if _, err := io.WriteString(w, e.name); err != nil {
return err
}
// serialize attributes
for _, attr := range e.attrs {
if len(attr.Value) == 0 {
continue
}
if _, err := ... | [
-0.12029067426919937,
0.15611882507801056,
1.0797864198684692,
0.025911834090948105,
-1.0022562742233276,
0.456319659948349,
0.5798422694206238,
0.49432867765426636,
0.36648327112197876,
0.40959709882736206,
0.323363333940506,
-0.30785927176475525,
0.1780676394701004,
0.6193965077400208,
... |
func (e *Element) FromBytes(buf *bytes.Buffer) error {
dec := gob.NewDecoder(buf)
if err := dec.Decode(&e.name); err != nil {
return err
}
if err := dec.Decode(&e.text); err != nil {
return err
}
if err := e.attrs.FromBytes(buf); err != nil {
return err
}
return e.elements.FromBytes(buf)
} | [
0.5758771300315857,
-0.2675151526927948,
0.3556777536869049,
-0.38395270705223083,
-0.5671464204788208,
0.3561845123767853,
-0.7367597818374634,
0.7597634196281433,
0.39955824613571167,
-0.21810424327850342,
-0.5638854503631592,
-0.037668000906705856,
-0.03055437095463276,
0.23959045112133... |
func (e *Element) ToBytes(buf *bytes.Buffer) error {
enc := gob.NewEncoder(buf)
if err := enc.Encode(&e.name); err != nil {
return err
}
if err := enc.Encode(&e.text); err != nil {
return err
}
if err := e.attrs.ToBytes(buf); err != nil {
return err
}
return e.elements.ToBytes(buf)
} | [
0.4869813323020935,
0.17390936613082886,
0.5743670463562012,
-0.6441313624382019,
0.1245683878660202,
-0.39071452617645264,
-0.7692015767097473,
-0.08373977988958359,
0.16847354173660278,
0.42236003279685974,
-0.963208019733429,
0.07284529507160187,
-0.47560057044029236,
0.7408931255340576... |
func NewStanzaFromElement(elem XElement) (Stanza, error) {
fromJID, err := jid.NewWithString(elem.From(), false)
if err != nil {
return nil, err
}
toJID, err := jid.NewWithString(elem.To(), false)
if err != nil {
return nil, err
}
switch elem.Name() {
case IQName:
return NewIQFromElement(elem, fromJID, to... | [
0.3371178209781647,
-0.5720959901809692,
0.48630058765411377,
0.44672977924346924,
-1.2743343114852905,
-0.25752362608909607,
0.006821358110755682,
-0.7428750991821289,
0.03221295028924942,
0.022389395162463188,
-0.543594479560852,
-0.46994665265083313,
0.2054927796125412,
0.04336626455187... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.