text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (o *ShareMedicalRecordNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(404)
} | [
0.1276513934135437,
-1.1186336278915405,
0.1708689033985138,
0.15931768715381622,
1.3605165481567383,
-0.06286172568798065,
0.9450557827949524,
-0.20864897966384888,
-0.12443584203720093,
0.5308347940444946,
0.44367629289627075,
-0.039471335709095,
-1.1310417652130127,
-0.246626079082489,
... |
func (o *ShareMedicalRecordInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(500)
} | [
-0.14234530925750732,
-0.6950926184654236,
0.2505412697792053,
0.07331108301877975,
0.562544047832489,
-0.17002764344215393,
1.1243730783462524,
0.09312565624713898,
0.13103240728378296,
0.3461957275867462,
0.7319827079772949,
0.4075450897216797,
-1.5715758800506592,
0.03579547256231308,
... |
func (tb *testingBackend) Get(c context.Context, configSet config.Set, path string, p backend.Params) (*config.Config, error) {
if len(tb.items) == 0 {
return nil, config.ErrNoConfig
}
return tb.cloneItems()[0], nil
} | [
-0.3897579610347748,
0.32642462849617004,
0.4344719350337982,
-0.15438741445541382,
0.8422510623931885,
-0.25037941336631775,
-0.4559032618999481,
-0.10442151874303818,
-0.6450080871582031,
0.8194347023963928,
0.0860506072640419,
0.7752171158790588,
-0.919122576713562,
-0.48303839564323425... |
func (tb *testingBackend) GetAll(c context.Context, t backend.GetAllTarget, path string, p backend.Params) (
[]*config.Config, error) {
return tb.cloneItems(), nil
} | [
0.06763822585344315,
0.06045602262020111,
0.49961069226264954,
0.9398366808891296,
0.9506573677062988,
0.2930787205696106,
-0.6085140705108643,
0.27690181136131287,
0.03164847567677498,
0.5450574159622192,
-0.05834737420082092,
1.0680886507034302,
-0.6043239831924438,
-0.3333640694618225,
... |
func NewAdminInfo() *AdminInfo {
this := AdminInfo{}
return &this
} | [
0.7104957103729248,
-0.6765248775482178,
-0.02619832195341587,
-0.06368981301784515,
-1.1533310413360596,
0.1804337352514267,
-0.5916895270347595,
-1.0070489645004272,
-0.680570662021637,
-0.27801451086997986,
-1.1524479389190674,
0.9645380973815918,
-0.3233892023563385,
0.5665075778961182... |
func NewAdminInfoWithDefaults() *AdminInfo {
this := AdminInfo{}
return &this
} | [
0.3690091371536255,
0.09354173392057419,
-0.0704227164387703,
0.10385837405920029,
0.02277068793773651,
0.18821381032466888,
-0.9255955219268799,
-1.0721213817596436,
-0.4971044361591339,
-0.6682920455932617,
-1.1746572256088257,
-0.24189598858356476,
-0.7125236392021179,
0.768046438694000... |
func (o *AdminInfo) GetBusinessUnit() BusinessUnit {
if o == nil || o.BusinessUnit == nil {
var ret BusinessUnit
return ret
}
return *o.BusinessUnit
} | [
-0.06444928795099258,
0.38005319237709045,
0.4885953962802887,
0.028225237503647804,
-0.5619375705718994,
0.47917208075523376,
0.7739906907081604,
-0.16121037304401398,
0.27418890595436096,
-1.4612375497817993,
-0.6618310809135437,
0.4027637839317322,
-1.4465621709823608,
0.066823288798332... |
func (o *AdminInfo) GetBusinessUnitOk() (*BusinessUnit, bool) {
if o == nil || o.BusinessUnit == nil {
return nil, false
}
return o.BusinessUnit, true
} | [
-1.194610357284546,
0.4831677973270416,
0.8615789413452148,
0.44342342019081116,
0.05570566654205322,
-0.12545035779476166,
0.7363765835762024,
0.9093611240386963,
-0.4114208519458771,
-1.1603879928588867,
-1.5596680641174316,
0.8047129511833191,
-0.3325488567352295,
-0.029032383114099503,... |
func (o *AdminInfo) HasBusinessUnit() bool {
if o != nil && o.BusinessUnit != nil {
return true
}
return false
} | [
0.14898961782455444,
0.320782333612442,
0.3451785445213318,
-0.4253632426261902,
0.4850279688835144,
-0.12394706159830093,
0.029815852642059326,
0.3322416841983795,
-0.4566342830657959,
-1.6132551431655884,
-1.401902675628662,
0.08461654186248779,
-1.029494047164917,
0.3611498773097992,
... |
func (o *AdminInfo) SetBusinessUnit(v BusinessUnit) {
o.BusinessUnit = &v
} | [
0.20226265490055084,
0.061885394155979156,
0.11361818015575409,
-0.7526847124099731,
-0.39290452003479004,
0.4802229404449463,
-0.4079507291316986,
-0.9738695621490479,
-0.46463921666145325,
-0.7498776316642761,
-0.7767729759216309,
2.0310256481170654,
-1.2260944843292236,
-0.3071153163909... |
func (o *AdminInfo) GetCountry() string {
if o == nil || o.Country == nil {
var ret string
return ret
}
return *o.Country
} | [
0.8283149003982544,
0.30495473742485046,
0.055895477533340454,
0.840509295463562,
0.1559152454137802,
0.2993629574775696,
1.0437867641448975,
-0.4985992908477783,
0.5209411382675171,
-0.42432910203933716,
0.17972788214683533,
-1.1021313667297363,
-0.6799837946891785,
0.7175211906433105,
... |
func (o *AdminInfo) GetCountryOk() (*string, bool) {
if o == nil || o.Country == nil {
return nil, false
}
return o.Country, true
} | [
0.31277230381965637,
-0.1528153270483017,
0.24004575610160828,
0.6154959201812744,
-0.3385251462459564,
0.6451516151428223,
1.1920194625854492,
0.5439481139183044,
-0.09356406331062317,
0.2879924178123474,
-1.0460201501846313,
-0.6972603797912598,
-0.0005214523407630622,
0.8221661448478699... |
func (o *AdminInfo) HasCountry() bool {
if o != nil && o.Country != nil {
return true
}
return false
} | [
0.999803364276886,
0.23155032098293304,
0.02396388165652752,
0.5892074108123779,
0.7661758661270142,
0.31175699830055237,
0.5382403135299683,
0.2109452188014984,
0.15412546694278717,
-0.8518443703651428,
-0.33552244305610657,
-0.3992592692375183,
-0.21758292615413666,
0.5094045400619507,
... |
func (o *AdminInfo) SetCountry(v string) {
o.Country = &v
} | [
0.9439700841903687,
0.034394342452287674,
-0.3283737301826477,
0.21161912381649017,
-0.6024212837219238,
0.41744109988212585,
-0.17786356806755066,
-1.069994330406189,
-0.2720746397972107,
0.08179966360330582,
-0.1577860414981842,
1.676601529121399,
-0.675610363483429,
-0.20704077184200287... |
func (o *AdminInfo) GetSupportVendorIds() []string {
if o == nil || o.SupportVendorIds == nil {
var ret []string
return ret
}
return *o.SupportVendorIds
} | [
-0.287138432264328,
0.23984110355377197,
0.4117060899734497,
1.0759985446929932,
-0.8219921588897705,
-0.3779643774032593,
-0.19684380292892456,
0.5687582492828369,
0.8575677275657654,
0.49792611598968506,
-0.6618804931640625,
-0.30938977003097534,
-1.0760239362716675,
0.9739776849746704,
... |
func (o *AdminInfo) GetSupportVendorIdsOk() (*[]string, bool) {
if o == nil || o.SupportVendorIds == nil {
return nil, false
}
return o.SupportVendorIds, true
} | [
-0.08739496767520905,
-0.0398072823882103,
0.34035971760749817,
0.4594467282295227,
-0.787455677986145,
-0.6518946886062622,
0.35832422971725464,
0.8250241875648499,
-0.09838556498289108,
1.1809043884277344,
-0.9750374555587769,
-0.19239160418510437,
-0.111858069896698,
0.360703706741333,
... |
func (o *AdminInfo) HasSupportVendorIds() bool {
if o != nil && o.SupportVendorIds != nil {
return true
}
return false
} | [
-0.13062044978141785,
0.8452709913253784,
0.3018580377101898,
0.39873069524765015,
-0.33524730801582336,
-1.0403550863265991,
-0.354438841342926,
0.8876321911811829,
-0.04544529318809509,
0.852963387966156,
-1.0333760976791382,
-0.6308481693267822,
-0.25573018193244934,
1.26150643825531,
... |
func (o *AdminInfo) SetSupportVendorIds(v []string) {
o.SupportVendorIds = &v
} | [
-0.369986355304718,
0.2554652988910675,
-0.1176421269774437,
0.5498189330101013,
-0.5071563720703125,
-0.03035677969455719,
-0.6567485928535461,
-0.13190163671970367,
0.16652622818946838,
1.0813095569610596,
-0.18516865372657776,
0.35567209124565125,
-0.8541327118873596,
0.6913365721702576... |
func (o *AdminInfo) GetVendor() Vendor {
if o == nil || o.Vendor == nil {
var ret Vendor
return ret
}
return *o.Vendor
} | [
0.3014819622039795,
0.7731972336769104,
0.3246522843837738,
1.2696315050125122,
-0.9621033072471619,
-0.12856996059417725,
1.1177804470062256,
-0.18321427702903748,
0.8273563385009766,
-0.927307665348053,
-0.3429974317550659,
-0.6977607011795044,
-0.9457129240036011,
1.2385108470916748,
... |
func (o *AdminInfo) GetVendorOk() (*Vendor, bool) {
if o == nil || o.Vendor == nil {
return nil, false
}
return o.Vendor, true
} | [
-0.11331436783075333,
0.4811646044254303,
0.6291942596435547,
1.3726743459701538,
-0.08858627825975418,
0.07184348255395889,
1.2213290929794312,
0.8977264761924744,
0.5453574657440186,
0.3180912137031555,
-0.9663695096969604,
-0.3880699872970581,
-0.04110051319003105,
0.9243606328964233,
... |
func (o *AdminInfo) HasVendor() bool {
if o != nil && o.Vendor != nil {
return true
}
return false
} | [
0.5454007387161255,
0.5615290999412537,
0.4012181758880615,
0.583253800868988,
-0.049752842634916306,
-0.38232049345970154,
0.4661905765533447,
1.0638598203659058,
0.028540944680571556,
-0.9494191408157349,
-0.6978965997695923,
-0.6668615341186523,
-0.482717901468277,
1.2279032468795776,
... |
func (o *AdminInfo) SetVendor(v Vendor) {
o.Vendor = &v
} | [
0.47150060534477234,
0.4537007808685303,
-0.1002785861492157,
0.36572304368019104,
-1.0260608196258545,
-0.08494850248098373,
-0.7418884634971619,
-1.1638039350509644,
-0.012331618927419186,
-0.0403132289648056,
-0.2976059019565582,
1.2564208507537842,
-0.46738311648368835,
0.8037825822830... |
func (session *Session) Valid() (valid bool, err error) {
err = Db.QueryRow("SELECT id, uuid, email, user_id, created_at FROM sessions WHERE uuid=?", session.Uuid).
Scan(&session.Id, &session.Uuid, &session.Email, &session.UserId, &session.CreatedAt)
if err != nil {
valid = false
return
}
if session.Id != 0 {... | [
-0.5615110993385315,
-0.47032782435417175,
0.6341963410377502,
0.3645053505897522,
-0.31118321418762207,
0.00945580005645752,
-0.44743093848228455,
0.0008264225325547159,
-0.12260420620441437,
0.35172390937805176,
0.09499291330575943,
-0.15264277160167694,
-0.11041924357414246,
-0.63859534... |
func (session *Session) DeleteByUUID() (err error) {
stmt, err := Db.Prepare("DELETE FROM sessions WHERE uuid=?")
if err != nil {
return
}
defer stmt.Close()
_, err = stmt.Exec(session.Uuid)
return
} | [
-0.03778557851910591,
-0.20443055033683777,
0.31567806005477905,
-0.17362065613269806,
-0.16400311887264252,
-0.7888420224189758,
0.6500254273414612,
-0.06575804203748703,
0.0542055107653141,
1.5513582229614258,
-0.5402297377586365,
-0.7053285837173462,
-0.6191748976707458,
-0.294276535511... |
func (session *Session) User() (user User, err error) {
user = User{}
err = Db.QueryRow("SELECT id, uuid, name, email, created_at FROM users WHERE id=?", session.UserId).
Scan(&user.Id, &user.Uuid, &user.Name, &user.Email, &user.CreatedAt)
return
} | [
-1.2059710025787354,
-0.11793841421604156,
0.4336889982223511,
0.740022599697113,
-0.28125330805778503,
-0.8969791531562805,
0.2958482503890991,
-1.1180082559585571,
0.47231873869895935,
-0.6157526969909668,
-0.8077908158302307,
0.12340039014816284,
0.8351435661315918,
-0.48066189885139465... |
func SessionDeleteAll() (err error) {
_, err = Db.Exec("DELETE FROM sessions")
return
} | [
0.6073024868965149,
-1.1299277544021606,
0.5183177590370178,
1.2995786666870117,
0.6103744506835938,
-0.032080188393592834,
0.2728908061981201,
-0.6806747317314148,
1.2780816555023193,
0.6046590209007263,
0.30568164587020874,
0.2595292329788208,
0.1277637630701065,
0.4297603368759155,
0.... |
func SessionCheck(writer http.ResponseWriter, request *http.Request) (sess Session, err error) {
cookie, err := request.Cookie("_cookie")
if err == nil {
sess = Session{Uuid: cookie.Value}
if ok, _ := sess.Valid(); ok {
err = errors.New("invalid session")
}
}
return
} | [
-1.0044852495193481,
-0.27959969639778137,
0.6712751984596252,
0.7454199194908142,
-0.38369035720825195,
-0.11204027384519577,
0.5915462970733643,
-0.4734939932823181,
0.7944244742393494,
0.7025434374809265,
0.7734191417694092,
-0.06039348989725113,
0.24315010011196136,
-0.7317153215408325... |
func Provider() *schema.Provider {
return &schema.Provider{
ResourcesMap: map[string]*schema.Resource{
"cassandra_keyspace": resourceCassandraKeyspace(),
"cassandra_role": resourceCassandraRole(),
"cassandra_grant": resourceCassandraGrant(),
},
ConfigureContextFunc: configureProvider,
Schema: m... | [
-0.11479447036981583,
0.09485603868961334,
0.6641597747802734,
-0.0758773609995842,
-0.5907728672027588,
-0.33885136246681213,
0.650814950466156,
0.28265243768692017,
0.5306414365768433,
0.15290966629981995,
-0.16985271871089935,
-0.058928631246089935,
0.6732081174850464,
0.256159186363220... |
func IndexGet(ctx *iris.Context) {
var Send ProductoModel.SProducto
NameUsrLoged, MenuPrincipal, MenuUsr, errSes := Session.GetDataSession(ctx) //Retorna los datos de la session
Send.SSesion.Name = NameUsrLoged
Send.SSesion.MenuPrincipal = template.HTML(MenuPrincipal)
Send.SSesion.MenuUsr = template.HTML(MenuUsr)... | [
-0.5875476002693176,
-0.04580102860927582,
0.7789077162742615,
0.48267191648483276,
0.004822916351258755,
-0.03433358669281006,
0.36275362968444824,
0.4744355082511902,
0.04334123060107231,
0.24648748338222504,
-0.21818691492080688,
0.9999606013298035,
0.02406039461493492,
-0.6227028965950... |
func IndexPost(ctx *iris.Context) {
var Send ProductoModel.SProducto
NameUsrLoged, MenuPrincipal, MenuUsr, errSes := Session.GetDataSession(ctx) //Retorna los datos de la session
Send.SSesion.Name = NameUsrLoged
Send.SSesion.MenuPrincipal = template.HTML(MenuPrincipal)
Send.SSesion.MenuUsr = template.HTML(MenuUsr... | [
-0.2943977415561676,
0.12189462035894394,
0.8076987266540527,
0.623196542263031,
0.08079355210065842,
-0.1714216023683548,
0.2957023084163666,
-0.17798252403736115,
-0.1133463904261589,
0.44802752137184143,
-0.20107200741767883,
0.9479978084564209,
-0.3605956733226776,
-0.3791884183883667,... |
func AltaGet(ctx *iris.Context) {
var Send ProductoModel.SProducto
NameUsrLoged, MenuPrincipal, MenuUsr, errSes := Session.GetDataSession(ctx) //Retorna los datos de la session
Send.SSesion.Name = NameUsrLoged
Send.SSesion.MenuPrincipal = template.HTML(MenuPrincipal)
Send.SSesion.MenuUsr = template.HTML(MenuUsr)
... | [
-0.42687392234802246,
-0.10771188884973526,
0.5885674357414246,
0.1314275562763214,
0.19398315250873566,
0.3016354441642761,
-0.7214270830154419,
-0.06278526037931442,
0.16926756501197815,
0.5066999197006226,
0.24983623623847961,
1.0817720890045166,
0.39358043670654297,
0.06953194737434387... |
func DetalleGet(ctx *iris.Context) {
var SProducto ProductoModel.SProducto
NameUsrLoged, MenuPrincipal, MenuUsr, errSes := Session.GetDataSession(ctx) //Retorna los datos de la session
SProducto.SSesion.Name = NameUsrLoged
SProducto.SSesion.MenuPrincipal = template.HTML(MenuPrincipal)
SProducto.SSesion.MenuUsr = ... | [
0.32322457432746887,
-0.2434144765138626,
0.8512424230575562,
0.6681031584739685,
0.04424053430557251,
0.30070820450782776,
-0.15416191518306732,
0.34406235814094543,
0.26007118821144104,
0.42875388264656067,
-0.281874418258667,
0.3603448271751404,
0.21826007962226868,
0.3366377353668213,
... |
func DetallePost(ctx *iris.Context) {
var Send ProductoModel.SProducto
NameUsrLoged, MenuPrincipal, MenuUsr, errSes := Session.GetDataSession(ctx) //Retorna los datos de la session
Send.SSesion.Name = NameUsrLoged
Send.SSesion.MenuPrincipal = template.HTML(MenuPrincipal)
Send.SSesion.MenuUsr = template.HTML(MenuUs... | [
0.8394820094108582,
0.294598251581192,
0.7223793864250183,
0.9685056805610657,
-0.5451330542564392,
0.5336249470710754,
-0.30499374866485596,
0.262539803981781,
0.5198230147361755,
-0.0027997372671961784,
-0.8637665510177612,
0.38591960072517395,
-0.3255855143070221,
0.0789036750793457,
... |
func creaHTMLEtiquetas(etiquetas []string) string {
htmle := ``
for i := 0; i < len(etiquetas); i++ {
htmle += `<tr>
<td><input type="hidden" class="form-control" value=""><input type="text" class="form-control" name="Etiquetas" value="` + etiquetas[i] + `" readonly></td>
<td><button type="button" class="bt... | [
-0.10235124081373215,
0.22263914346694946,
0.6939967274665833,
-0.27648428082466125,
-0.09315887838602066,
0.3986777067184448,
-0.215111643075943,
-0.6689028739929199,
-0.40262317657470703,
0.6269550919532776,
0.4760117530822754,
-0.01012690644711256,
1.079105019569397,
0.533098578453064,
... |
func creaHTMLCodigos(codigos, codigosval []string) string {
htmlcodigos := ``
for i := 0; i < len(codigos); i++ {
htmlcodigos += `<tr><td><input type="hidden" class="form-control" value=""><input type="text" class="form-control" name="Codigos" value="` + codigos[i] + `" readonly></td>
<td><input type="text" cl... | [
-0.22873364388942719,
0.7235028743743896,
0.7221254706382751,
0.10852467268705368,
-0.3827624022960663,
0.3977757692337036,
-0.5635720491409302,
-0.3371690809726715,
-1.0094550848007202,
0.2093539535999298,
0.19117070734500885,
0.34980735182762146,
0.4652367830276489,
0.8727609515190125,
... |
func ConsultarProductos(ctx *iris.Context) {
cadenaBusqueda = ctx.FormValue("nombreProducto")
Send := SDataProducto{}
if cadenaBusqueda != "" {
docs, err := ProductoModel.BusquedaElastic(cadenaBusqueda)
if err != nil {
Send.SEstado = false
Send.SMsj = "Ocurrieron errores: " + err.Error()
}
if docs.Hit... | [
-0.333739697933197,
0.6006317734718323,
0.977057695388794,
0.4540245831012726,
-0.07770874351263046,
-0.3474099040031433,
0.38063183426856995,
-0.5972442626953125,
-0.6219452619552612,
0.26844462752342224,
-0.0763203501701355,
1.008928656578064,
-0.020302273333072662,
-0.15494994819164276,... |
func GeneraTabla(productos []ProductoModel.ProductoMgo) string {
tabla := ``
for _, producto := range productos {
if bson.IsObjectIdHex(producto.ID.Hex()) {
htmlProducto := `<tr id="filaProducto` + producto.ID.Hex() + `">`
htmlProducto += `<td><label>` + producto.Nombre + `</td>`
htmlProducto += `<td>`
... | [
0.09172143787145615,
0.42267531156539917,
1.169257402420044,
1.195829153060913,
0.22952179610729218,
0.4527643024921417,
-0.3085409998893738,
-0.5015157461166382,
-0.9747655987739563,
0.4388454258441925,
0.1327107548713684,
0.03497340902686119,
0.629559338092804,
0.1382514238357544,
0.22... |
func MuestraIndexPorGrupo(ctx *iris.Context) {
var Send ProductoModel.SProducto
var Cabecera, Cuerpo string
grupo := ctx.FormValue("Grupox")
if grupo != "" {
gru, _ := strconv.Atoi(grupo)
limitePorPagina = gru
}
cadenaBusqueda = ctx.FormValue("searchbox")
if cadenaBusqueda != "" {
docs := ProductoModel.Bu... | [
-0.691484808921814,
0.33449360728263855,
0.9461904764175415,
0.1319957822561264,
-0.04709112271666527,
-0.48082947731018066,
0.43112608790397644,
0.07890331745147705,
0.1409764140844345,
0.2912813127040863,
0.10078404098749161,
1.060426950454712,
-0.12939782440662384,
-0.01806340180337429,... |
func ConsultarProductosConImpuestosDeAlmacen(ctx *iris.Context) {
cadenaBusqueda = ctx.FormValue("nombreProducto")
almacen := ctx.FormValue("Almacen")
Send := ProductoModel.SDataProducto{}
if cadenaBusqueda != "" {
docs, err := ProductoModel.BusquedaElastic(cadenaBusqueda)
if err != nil {
Send.SEstado = fal... | [
0.24042850732803345,
0.5804704427719116,
0.8584516048431396,
0.22855180501937866,
0.014016829431056976,
0.08563387393951416,
-0.019205991178750992,
0.05971008539199829,
-0.6872122287750244,
0.45680156350135803,
-0.0274952445179224,
0.5766171216964722,
-0.4584261178970337,
-0.37386226654052... |
func main() {
a1 := &ListNode{Val: 1}
a2 := &ListNode{Val: 2}
a3 := &ListNode{Val: 4}
a1.Next = a2
a2.Next = a3
b1 := &ListNode{Val: 1}
b2 := &ListNode{Val: 3}
b3 := &ListNode{Val: 4}
b1.Next = b2
b2.Next = b3
c1 := mergeTwoLists(a1, b1)
fmt.Println("================")
for c1 != nil {
fmt.Println(c... | [
-0.06167713925242424,
0.13939440250396729,
0.9570764303207397,
0.01697910763323307,
0.08664746582508087,
0.7129469513893127,
-0.16486163437366486,
-0.12143366783857346,
-0.12680025398731232,
-0.1298508197069168,
-0.8381804823875427,
-0.14839185774326324,
-0.07350281625986099,
0.20010839402... |
func (m *User) Validate() error {
if m == nil {
return nil
}
// no validation rules for UserId
// no validation rules for Email
return nil
} | [
0.4221203029155731,
0.6378718614578247,
0.046752285212278366,
0.7603053450584412,
0.6773125529289246,
0.5555209517478943,
0.2622070908546448,
-0.03232840448617935,
-0.33276402950286865,
-0.8305571675300598,
0.23655205965042114,
-0.28991207480430603,
-0.6889439821243286,
1.108893632888794,
... |
func (e UserValidationError) Field() string { return e.field } | [
-0.46381235122680664,
-0.32144516706466675,
0.048818543553352356,
0.2519727945327759,
-0.19290322065353394,
1.663978934288025,
0.09399916231632233,
0.498514860868454,
0.607077956199646,
-0.28114593029022217,
0.24664878845214844,
-0.2325892299413681,
0.5238973498344421,
-0.11206302046775818... |
func (e UserValidationError) Reason() string { return e.reason } | [
0.2584370970726013,
-0.1473311334848404,
-0.16222181916236877,
0.7614392042160034,
-0.2231694608926773,
1.2743829488754272,
0.3244972229003906,
0.7511880397796631,
1.3924129009246826,
-0.17801138758659363,
0.41786471009254456,
1.0127462148666382,
0.26710957288742065,
-0.06234662979841232,
... |
func (e UserValidationError) Cause() error { return e.cause } | [
-0.004308365751057863,
-0.4943823218345642,
0.15379594266414642,
0.46287935972213745,
-0.16483864188194275,
0.7197582125663757,
0.32578492164611816,
0.948138415813446,
0.3986932635307312,
-0.46133682131767273,
0.8388654589653015,
0.47763821482658386,
-0.030513161793351173,
0.15806765854358... |
func (e UserValidationError) Key() bool { return e.key } | [
-0.9086467027664185,
-0.08046720176935196,
0.23802874982357025,
0.7376915812492371,
-0.3143008053302765,
1.6043552160263062,
-0.011654623784124851,
0.5904322862625122,
-0.2881997227668762,
0.6344231367111206,
0.0007066212128847837,
-0.22273938357830048,
-0.5786584615707397,
-0.156633466482... |
func (m *GetUserRequest) Validate() error {
if m == nil {
return nil
}
if l := utf8.RuneCountInString(m.GetUserId()); l < 1 || l > 20 {
return GetUserRequestValidationError{
field: "UserId",
reason: "value length must be between 1 and 20 runes, inclusive",
}
}
return nil
} | [
0.3259654939174652,
0.45923495292663574,
0.5346871614456177,
-0.42165353894233704,
0.026278994977474213,
-0.17738597095012665,
0.4031013250350952,
-0.48645102977752686,
-0.1464289128780365,
0.046788014471530914,
0.45356523990631104,
0.40344375371932983,
-0.9034361243247986,
0.8551428914070... |
func (e GetUserRequestValidationError) Field() string { return e.field } | [
-0.48569461703300476,
-0.1647798717021942,
0.22134006023406982,
0.11731159687042236,
0.15750552713871002,
1.608802318572998,
0.010062409564852715,
0.12599974870681763,
0.5005874633789062,
-0.38035616278648376,
0.6440773010253906,
0.11993978917598724,
0.5014734268188477,
-0.1314978450536728... |
func (e GetUserRequestValidationError) Reason() string { return e.reason } | [
0.3383300304412842,
-0.2603127062320709,
-0.04103151708841324,
0.5597452521324158,
-0.019818872213363647,
1.1542407274246216,
0.2593024671077728,
0.3747182786464691,
1.2705951929092407,
-0.32928428053855896,
0.8102537989616394,
1.3469194173812866,
0.25051018595695496,
0.19989942014217377,
... |
func (e GetUserRequestValidationError) Cause() error { return e.cause } | [
0.024875996634364128,
-0.5293760895729065,
0.35950812697410583,
0.3567845821380615,
0.051455866545438766,
0.6442346572875977,
0.10689186304807663,
0.5974031686782837,
0.3242414593696594,
-0.6184545159339905,
1.2497124671936035,
0.9158471822738647,
0.13973945379257202,
0.1947993040084839,
... |
func (e GetUserRequestValidationError) Key() bool { return e.key } | [
-0.9593381285667419,
0.03990192711353302,
0.28341445326805115,
0.665538489818573,
0.03041505254805088,
1.5998797416687012,
-0.21103812754154205,
0.39826685190200806,
-0.35456928610801697,
0.5194368362426758,
0.2504284083843231,
0.09632980078458786,
-0.45280763506889343,
-0.0795727074146270... |
func (m *GetUserResponse) Validate() error {
if m == nil {
return nil
}
if v, ok := interface{}(m.GetUser()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return GetUserResponseValidationError{
field: "User",
reason: "embedded message failed validation",
cause: err,... | [
1.094985842704773,
-0.2040809988975525,
0.46251022815704346,
0.14446865022182465,
0.4334816634654999,
-0.3277718722820282,
0.8469145894050598,
-0.48467832803726196,
0.6719924211502075,
-0.12284966558218002,
0.17844170331954956,
-0.17074663937091827,
-1.409549355506897,
-0.4432048499584198,... |
func (e GetUserResponseValidationError) Field() string { return e.field } | [
0.007658741436898708,
-0.5973213315010071,
0.15045005083084106,
-0.12394850701093674,
0.17915160953998566,
1.3905137777328491,
0.2532312572002411,
0.16716836392879486,
1.0203747749328613,
-0.6563473343849182,
0.24615703523159027,
-0.09696020185947418,
0.5282024145126343,
-0.467254042625427... |
func (e GetUserResponseValidationError) Reason() string { return e.reason } | [
0.7991360425949097,
-0.565605640411377,
-0.05452220141887665,
0.3632531762123108,
-0.011727924458682537,
0.9782993793487549,
0.4484378397464752,
0.42172354459762573,
1.7056766748428345,
-0.6071734428405762,
0.42752960324287415,
1.1307073831558228,
0.33827948570251465,
-0.25084561109542847,... |
func (e GetUserResponseValidationError) Cause() error { return e.cause } | [
0.7342999577522278,
-0.9421703815460205,
0.2658784091472626,
-0.08734769374132156,
0.24080859124660492,
0.3366066813468933,
0.46641847491264343,
0.5787069797515869,
0.8545653820037842,
-0.9826355576515198,
0.8665484189987183,
0.6478038430213928,
0.14051015675067902,
-0.30561739206314087,
... |
func (e GetUserResponseValidationError) Key() bool { return e.key } | [
-0.4609203636646271,
-0.3565209209918976,
0.24422776699066162,
0.3759028911590576,
0.0595608726143837,
1.3470185995101929,
0.09664535522460938,
0.26826733350753784,
0.20328643918037415,
0.36265483498573303,
-0.07889106124639511,
-0.023229770362377167,
-0.4708162248134613,
-0.40165010094642... |
func (m *GetUsersRequest) Validate() error {
if m == nil {
return nil
}
return nil
} | [
0.004695112816989422,
1.0039371252059937,
0.34880363941192627,
-0.09148553013801575,
0.7948092222213745,
0.0991409495472908,
-0.30767151713371277,
-0.4114323854446411,
0.011713065207004547,
-0.4524618685245514,
1.3874835968017578,
0.36650246381759644,
-0.8401944041252136,
1.126973390579223... |
func (e GetUsersRequestValidationError) Field() string { return e.field } | [
-0.6322859525680542,
-0.20480114221572876,
0.23210348188877106,
0.08721017837524414,
0.05549328029155731,
1.5665236711502075,
0.14432308077812195,
0.2652348577976227,
0.526390016078949,
-0.29053211212158203,
0.6715768575668335,
0.28787872195243835,
0.49056243896484375,
0.16280314326286316,... |
func (e GetUsersRequestValidationError) Reason() string { return e.reason } | [
0.21096961200237274,
-0.2437554895877838,
-0.024734867736697197,
0.5298214554786682,
-0.05492652952671051,
1.098567008972168,
0.28933185338974,
0.4753280580043793,
1.3080092668533325,
-0.15585929155349731,
0.8140819072723389,
1.5119423866271973,
0.24164077639579773,
0.4121735990047455,
1... |
func (e GetUsersRequestValidationError) Cause() error { return e.cause } | [
-0.11862403899431229,
-0.5142931938171387,
0.3046796917915344,
0.3162851929664612,
-0.00938401184976101,
0.5914251804351807,
0.23525923490524292,
0.6564886569976807,
0.3073786795139313,
-0.4376623034477234,
1.199981451034546,
1.1194422245025635,
0.05140472948551178,
0.4893741011619568,
0... |
func (e GetUsersRequestValidationError) Key() bool { return e.key } | [
-1.0760928392410278,
0.021313518285751343,
0.22099752724170685,
0.6228795051574707,
-0.08416140079498291,
1.5821713209152222,
-0.10535363107919693,
0.4579993784427643,
-0.29216423630714417,
0.6078954339027405,
0.32045212388038635,
0.30681881308555603,
-0.5347350835800171,
0.151478484272956... |
func (m *GetUsersResponse) Validate() error {
if m == nil {
return nil
}
for idx, item := range m.GetUsers() {
_, _ = idx, item
if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return GetUsersResponseValidationError{
field: fmt.Sprintf("Use... | [
0.47409626841545105,
-0.08270057290792465,
0.22411152720451355,
-0.2707114517688751,
0.6810123920440674,
-0.4820560812950134,
0.6726021766662598,
-0.4319811165332794,
0.24470101296901703,
0.24165259301662445,
0.5037984848022461,
-0.12621992826461792,
-1.4102495908737183,
0.4424905180931091... |
func (e GetUsersResponseValidationError) Field() string { return e.field } | [
-0.1103910580277443,
-0.5463258624076843,
0.15774129331111908,
-0.26583772897720337,
0.10805525630712509,
1.324254035949707,
0.30987951159477234,
0.2796017825603485,
0.9925446510314941,
-0.45645806193351746,
0.3458617031574249,
-0.01726604625582695,
0.4309401214122772,
-0.1145733892917633,... |
func (e GetUsersResponseValidationError) Reason() string { return e.reason } | [
0.7050302028656006,
-0.46769949793815613,
-0.01973363757133484,
0.2929677963256836,
-0.039823148399591446,
0.940112829208374,
0.4423529803752899,
0.5289376378059387,
1.6964781284332275,
-0.3474510908126831,
0.5117324590682983,
1.2361468076705933,
0.24712640047073364,
0.04910355061292648,
... |
func (e GetUsersResponseValidationError) Cause() error { return e.cause } | [
0.5744249224662781,
-0.8169596791267395,
0.22714285552501678,
-0.09299401193857193,
0.16456268727779388,
0.3255171775817871,
0.48505234718322754,
0.6683869361877441,
0.789837658405304,
-0.6651602983474731,
0.895587682723999,
0.7296933531761169,
-0.009900514967739582,
0.12278269231319427,
... |
func (e GetUsersResponseValidationError) Key() bool { return e.key } | [
-0.6017553806304932,
-0.30763566493988037,
0.18223924934864044,
0.28821855783462524,
-0.01841723918914795,
1.3100175857543945,
0.11802559345960617,
0.32134753465652466,
0.21520674228668213,
0.5173065662384033,
0.037090349942445755,
0.12229395657777786,
-0.6164935231208801,
-0.0999927669763... |
func (m *CreateUserRequest) Validate() error {
if m == nil {
return nil
}
// no validation rules for Email
return nil
} | [
0.1798870712518692,
0.6280385255813599,
0.04734097048640251,
0.1885211169719696,
0.493865966796875,
0.568438708782196,
-0.04185672849416733,
-0.13616503775119781,
-0.7025326490402222,
0.14562955498695374,
0.7078598141670227,
-0.2967154085636139,
-1.1611524820327759,
0.7835369110107422,
0... |
func (e CreateUserRequestValidationError) Field() string { return e.field } | [
-0.5029114484786987,
-0.11652378737926483,
0.11223586648702621,
0.1889195740222931,
0.14637839794158936,
1.8707926273345947,
-0.04207231104373932,
-0.11388368904590607,
0.1835612654685974,
-0.4369039237499237,
0.3335742652416229,
-0.09186500310897827,
0.4491102695465088,
0.0044788820669054... |
func (e CreateUserRequestValidationError) Reason() string { return e.reason } | [
0.3465847969055176,
-0.19945523142814636,
-0.1678967922925949,
0.5894170999526978,
0.06339367479085922,
1.468930959701538,
0.1981600970029831,
0.07795646786689758,
0.9326467514038086,
-0.3420512080192566,
0.5969403982162476,
1.0544958114624023,
0.13973431289196014,
0.33090740442276,
1.21... |
func (e CreateUserRequestValidationError) Cause() error { return e.cause } | [
-0.08179238438606262,
-0.5259348154067993,
0.14568574726581573,
0.316543310880661,
0.12334656715393066,
0.9399330019950867,
-0.010665476322174072,
0.3662252426147461,
0.031054293736815453,
-0.5788030624389648,
0.9376869201660156,
0.4897468090057373,
0.0014140631537884474,
0.340544700622558... |
func (e CreateUserRequestValidationError) Key() bool { return e.key } | [
-1.007080316543579,
0.10373789817094803,
0.20577052235603333,
0.667932391166687,
0.022203683853149414,
1.7972948551177979,
-0.16670836508274078,
0.0812961682677269,
-0.6095762252807617,
0.473637193441391,
0.06352932751178741,
-0.1880510151386261,
-0.6170715093612671,
0.10218672454357147,
... |
func (m *CreateUserResponse) Validate() error {
if m == nil {
return nil
}
// no validation rules for UserId
return nil
} | [
0.7122220993041992,
-0.21110904216766357,
-0.3671865463256836,
-0.15471291542053223,
0.7021872401237488,
0.06051096320152283,
0.21433058381080627,
-0.5136305689811707,
0.1240231990814209,
0.15407508611679077,
-0.14253489673137665,
-1.0980892181396484,
-1.3951514959335327,
0.635952353477478... |
func (e CreateUserResponseValidationError) Field() string { return e.field } | [
-0.02252703346312046,
-0.47112396359443665,
0.028267549350857735,
-0.002231597900390625,
0.10325691103935242,
1.6296535730361938,
0.25159481167793274,
-0.06419213861227036,
0.7146057486534119,
-0.6911248564720154,
-0.09143666923046112,
-0.2372163087129593,
0.5215205550193787,
-0.2895938456... |
func (e CreateUserResponseValidationError) Reason() string { return e.reason } | [
0.8026189804077148,
-0.4241074323654175,
-0.1781768500804901,
0.43977755308151245,
0.015541831031441689,
1.2837649583816528,
0.4481090307235718,
0.16456004977226257,
1.398848533630371,
-0.5741711854934692,
0.21890035271644592,
0.920357346534729,
0.2664127051830292,
-0.0891178771853447,
1... |
func (e CreateUserResponseValidationError) Cause() error { return e.cause } | [
0.64177006483078,
-0.8139684796333313,
0.06517236679792404,
-0.048730578273534775,
0.2144404947757721,
0.6164220571517944,
0.4074993133544922,
0.41710472106933594,
0.5619625449180603,
-0.8807283639907837,
0.5688115358352661,
0.3087557256221771,
0.011629955843091011,
-0.12602321803569794,
... |
func (e CreateUserResponseValidationError) Key() bool { return e.key } | [
-0.5206093788146973,
-0.2312946766614914,
0.1572551727294922,
0.4278266727924347,
-0.010600202716886997,
1.5383704900741577,
0.16604343056678772,
-0.005105110350996256,
-0.03753579780459404,
0.3234659433364868,
-0.2593567967414856,
-0.26935678720474243,
-0.5893563628196716,
-0.205490559339... |
func Get(app, provider, pArn string, duration int64) (*aws.Credentials, error) {
// Get provider config
p, err := config.GetOktaProvider(provider)
if err != nil {
return nil, fmt.Errorf("reading provider config: %v", err)
}
// Get app config
a, err := config.GetOktaApp(app)
if err != nil {
return nil, fmt.E... | [
0.0596262589097023,
-0.03442029282450676,
0.5997776389122009,
0.34097281098365784,
-0.02321414276957512,
-0.22873574495315552,
-0.6065167188644409,
-0.5527767539024353,
0.3188546895980835,
0.5830134749412537,
0.024213949218392372,
1.5916595458984375,
-0.0163330789655447,
-0.087499804794788... |
func RenameFile(src string, dest string) {
err := os.Rename(src, dest)
if err != nil {
fmt.Println(err)
return
}
} | [
0.2827603220939636,
-0.3726166784763336,
0.6359360814094543,
-0.12906207144260406,
0.3315333425998688,
1.0014817714691162,
-0.14186520874500275,
0.558702290058136,
-1.4582043886184692,
0.2837017774581909,
0.5418143272399902,
0.6684407591819763,
0.42028000950813293,
0.1438145935535431,
-0... |
func RemoveFiles(src string) {
files, err := filepath.Glob(src)
if err != nil {
panic(err)
}
for _, f := range files {
if err := os.Remove(f); err != nil {
panic(err)
}
}
} | [
0.43235066533088684,
1.033206820487976,
0.3984631299972534,
-0.6145355701446533,
0.09017609804868698,
0.2833525538444519,
0.7721459269523621,
0.6661959290504456,
-0.34356534481048584,
0.5177385807037354,
0.22056692838668823,
-0.02672291360795498,
-0.9376243352890015,
0.6048826575279236,
... |
func CheckFileExist(file string) bool {
_, err := os.Stat(file)
if err != nil {
return false
}
return true
} | [
0.36783918738365173,
-0.24726779758930206,
0.7333046793937683,
0.07342342287302017,
1.4211692810058594,
1.7456912994384766,
-0.19077380001544952,
0.7210766673088074,
-1.1638597249984741,
0.7739449739456177,
0.22168266773223877,
-0.9972133636474609,
0.14159515500068665,
1.014729380607605,
... |
func CreateDirIfNotExist(dir string) {
if _, err := os.Stat(dir); os.IsNotExist(err) {
log.Printf("Creating directory for helm: %v", dir)
err = os.MkdirAll(dir, 0755)
if err != nil {
fmt.Printf("Unable to create directory for helm: %v", dir)
panic(err)
}
}
} | [
-0.029381347820162773,
0.07842977344989777,
0.5437837243080139,
0.04666414111852646,
0.9956440329551697,
0.6506808400154114,
0.553203284740448,
-1.0661039352416992,
-0.28055378794670105,
-0.25734832882881165,
0.026424484327435493,
0.00723246717825532,
0.00005188977957004681,
0.825109481811... |
func WriteLines(lines []string, path string) (err error) {
var (
file *os.File
)
if file, err = os.Create(path); err != nil {
return err
}
defer file.Close()
for _, item := range lines {
_, err := file.WriteString(strings.TrimSpace(item) + "\n")
if err != nil {
fmt.Println(err)
break
}
}
retu... | [
0.2994017004966736,
-0.5516924262046814,
0.4759404957294464,
-0.43044513463974,
1.274993896484375,
0.8747259378433228,
-0.33140841126441956,
0.43976539373397827,
-0.11002452671527863,
0.09321083128452301,
0.5232667326927185,
-0.4564613401889801,
0.16429516673088074,
0.3459528684616089,
-... |
func ReadLines(path string) (lines []string, err error) {
var (
file *os.File
part []byte
prefix bool
)
if file, err = os.Open(path); err != nil {
return
}
defer file.Close()
reader := bufio.NewReader(file)
buffer := bytes.NewBuffer(make([]byte, 0))
for {
if part, prefix, err = reader.ReadLine();... | [
0.439161092042923,
-0.41660967469215393,
0.6585984230041504,
-0.5931498408317566,
-0.21567586064338684,
0.3307625353336334,
-0.719240665435791,
-0.13474708795547485,
0.059057485312223434,
0.4726838171482086,
1.053754210472107,
-0.19450300931930542,
-0.04635682702064514,
0.11669331789016724... |
func IsDirEmpty(name string) bool {
exist := false
f, err := os.Open(name)
if err != nil {
log.Fatal(err)
}
defer f.Close()
_, err = f.Readdirnames(1) // Or f.Readdir(1)
if err == io.EOF {
exist = true
}
return exist // Either not empty or error, suits both cases
} | [
-1.4103972911834717,
-0.30478212237358093,
1.0886776447296143,
0.2226332575082779,
0.18784375488758087,
0.38726407289505005,
0.572141170501709,
-0.2928134799003601,
0.3961354196071625,
0.24537469446659088,
-0.13225805759429932,
0.12940573692321777,
0.03974489867687225,
0.6593124270439148,
... |
func CheckDirHasHelmBin(dir, prefix string) bool {
exist := false
files, err := ioutil.ReadDir(dir)
if err != nil {
log.Fatal(err)
//return exist, err
}
res := []string{}
for _, f := range files {
if !f.IsDir() && strings.HasPrefix(f.Name(), prefix) {
res = append(res, filepath.Join(dir, f.Name()))
... | [
-0.013479236513376236,
-0.5128878951072693,
1.0936704874038696,
0.9063882231712341,
0.49402832984924316,
0.507199764251709,
-0.09786038845777512,
0.5014350414276123,
-0.14953072369098663,
0.0405520536005497,
-0.28908637166023254,
0.32212379574775696,
-0.3160977363586426,
0.8250123858451843... |
func CheckDirExist(dir string) bool {
if _, err := os.Stat(dir); os.IsNotExist(err) {
return false
}
return true
} | [
-0.9596996903419495,
0.18428589403629303,
0.6416913270950317,
0.22007590532302856,
1.2244449853897095,
0.9628989696502686,
-0.1716807782649994,
0.1763160526752472,
-0.31131207942962646,
0.2584073543548584,
-0.2544189989566803,
-0.14581382274627686,
-0.5525391697883606,
1.1692701578140259,
... |
func Path(value string) string {
return filepath.Dir(value)
} | [
-0.11183333396911621,
-0.275170236825943,
0.10330791771411896,
0.16054514050483704,
-0.9504411816596985,
1.4007574319839478,
1.2340867519378662,
-1.4011999368667603,
0.2773961126804352,
0.026092231273651123,
0.2481643408536911,
-0.3946116864681244,
0.7653515338897705,
0.4178667962551117,
... |
func NewMaterialPolynomial(c ...float64) Material {
return MaterialPolynomial{factors: c}
} | [
0.32217878103256226,
-0.9897047877311707,
0.10760566592216492,
-0.19606506824493408,
-1.5486565828323364,
0.2621917128562927,
-1.6193804740905762,
-0.19880087673664093,
0.07129088789224625,
-0.22261619567871094,
-0.5274457931518555,
0.5065224170684814,
0.07719729095697403,
-0.4153874814510... |
func (m MaterialPolynomial) ConductivityAvg(F2, F1 float64) float64 {
K := make([]float64, len(m.factors))
for i := range m.factors {
K[i] = m.factors[i]
}
for i := 0; i < len(m.factors); i++ {
K[i] *= (pow.En(F2, i+1) - pow.En(F1, i+1)) / float64(i+1)
}
Ksum := 0.0
for i := range K {
Ksum += K[i]
}
Ksum... | [
-0.15220442414283752,
0.010373166762292385,
0.8425577282905579,
-0.6127191781997681,
-0.05905507877469063,
0.14691920578479767,
-0.12100248783826828,
0.0765584260225296,
-0.8821353912353516,
1.5123944282531738,
0.1606796532869339,
0.7447808384895325,
-0.6842545866966248,
0.3683502376079559... |
func NewMaterialExp(a, b float64) Material {
return MaterialExp{a: a, b: b}
} | [
0.9653152227401733,
-0.8314567804336548,
0.23477701842784882,
0.31389129161834717,
-1.112234354019165,
0.07596200704574585,
-1.3100216388702393,
-0.0591229572892189,
0.77726149559021,
0.4633583426475525,
0.3878454267978668,
0.4873902499675751,
-0.5045643448829651,
-0.19341424107551575,
0... |
func (m MaterialExp) ConductivityAvg(F1, F2 float64) float64 {
return 1.0 / (F2 - F1) * (math.Exp(m.a+m.b*F2) - math.Exp(m.a+m.b*F1)) / m.b
} | [
-0.020332321524620056,
-0.10059572011232376,
0.7417688965797424,
-0.4334147870540619,
-0.009912382811307907,
0.5416043400764465,
0.31002798676490784,
-0.05834178254008293,
-0.6938410997390747,
1.4494404792785645,
0.6406559348106384,
0.4609018862247467,
-0.5102682709693909,
0.46479237079620... |
func NewMaterialType3(
a1, b1, TL float64,
a2, b2, TU float64,
a3, b3 float64,
) Material {
return MaterialType3{
a1: a1, b1: b1, TL: TL,
a2: a2, b2: b2, TU: TU,
a3: a3, b3: b3,
}
} | [
-0.07567041367292404,
0.012568795122206211,
0.3540901839733124,
0.08268145471811295,
-0.345165878534317,
0.10899341851472855,
-1.1818816661834717,
-0.3835046589374542,
0.4744505286216736,
0.3017052710056305,
-0.2165936976671219,
-0.3607276678085327,
-0.6594395637512207,
-0.0181887689977884... |
func (m MaterialType3) ConductivityAvg(F1, F2 float64) float64 {
Kf := func(F float64) float64 {
if F <= m.TL {
return m.a1 + m.b1*F
}
if F <= m.TU {
return m.a2 + m.b2*F
}
return m.a3 + m.b3*F
}
var (
amount = 100
K float64
dF = (F2 - F1) / float64(amount-1)
)
Ki := make([]float64,... | [
-0.42810362577438354,
0.5315716862678528,
0.8258175849914551,
-0.43717941641807556,
-0.1831994354724884,
0.2857331335544586,
0.3983907997608185,
-0.21737457811832428,
-0.9515020847320557,
1.3317526578903198,
0.12317921966314316,
0.49162983894348145,
-0.1837223917245865,
0.6285794377326965,... |
func (r *RetryChainReader) HeaderByNumberWithRetry(blockNumber uint64, maxAttempts int,
baseWaitMs int) (*types.Header, error) {
blockNum := big.NewInt(0)
blockNum.SetUint64(blockNumber)
attempt := 1
var header *types.Header
var err error
for {
header, err = r.HeaderByNumber(context.Background(), blockNum)
... | [
0.046512845903635025,
-0.40967586636543274,
0.5495935082435608,
0.23184333741664886,
-0.27957290410995483,
-0.9341033697128296,
-0.30502286553382874,
-0.844646155834198,
-0.2588792145252228,
0.13833454251289368,
0.20917239785194397,
-0.22594963014125824,
-0.5242530107498169,
-0.61785948276... |
func ExtractAndValidatePagingInfo(req *http.Request, defaults PagingDefaults) (db.PagingInfo, error) {
var paging db.PagingInfo
qs := req.URL.Query()
// extract recordsPerPage
recordsPerPage, err := strconv.Atoi(qs.Get("recordsPerPage"))
if err != nil {
recordsPerPage = defaults.RecordsPerPage
}
if recordsPe... | [
-0.8367334008216858,
-0.03251660242676735,
0.850753664970398,
0.2711237967014313,
-0.44920992851257324,
-0.46439290046691895,
-0.021638184785842896,
-0.14713932573795319,
0.10629189014434814,
0.5390223264694214,
0.5263947248458862,
-1.299987554550171,
0.04748106002807617,
0.643858134746551... |
func GetConfigFile(folder string) *os.File {
f, _ := os.Open(filepath.Join(folder, "config.json"))
return f
} | [
-0.6333982944488525,
0.30899256467819214,
0.32414698600769043,
-0.34274840354919434,
-0.10064445436000824,
0.21570344269275665,
0.5203222036361694,
0.5345918536186218,
-1.8501287698745728,
0.8913655877113342,
-0.710856020450592,
-0.20142237842082977,
0.04887158051133156,
0.7119408845901489... |
func NewDomain(
c *Configuration,
folder string,
configFile *os.File) (*Domain, error) {
var err error
// Read the configuration file into the domain data structure.
var d Domain
defer configFile.Close()
jsonParser := json.NewDecoder(configFile)
jsonParser.Decode(&d)
// Add some additional parameters.
d.Co... | [
-0.6057181358337402,
-0.13938218355178833,
0.35736849904060364,
-0.061735425144433975,
-0.590641975402832,
0.3729605972766876,
-0.039001014083623886,
0.5833183526992798,
-0.7731152176856995,
-0.364908367395401,
-0.19562935829162598,
0.9012162089347839,
-0.14706195890903473,
0.7241928577423... |
func (d *Domain) SetHandler(fn func(
d *Domain,
w http.ResponseWriter,
r *http.Request)) {
d.handler = fn
} | [
-0.8217819929122925,
0.35086145997047424,
0.2638087868690491,
0.4939791262149811,
-0.33939048647880554,
0.6223757266998291,
0.6960747838020325,
0.9525244832038879,
-0.33492377400398254,
-1.6376688480377197,
0.0641743540763855,
0.35244545340538025,
1.6173255443572998,
0.489350825548172,
0... |
func (d *Domain) LookupHTML(p string) *template.Template {
if d.templates == nil {
return nil
}
// Try to find the template that relates to the file path.
t := d.templates.Lookup(filepath.Base(p))
// If no template can be found try finding one for the category of the
// domain.
if t == nil {
t = d.template... | [
-0.0869176983833313,
1.0450468063354492,
0.522250235080719,
0.1414923071861267,
-0.16504710912704468,
0.047969937324523926,
0.5979373455047607,
0.16094277799129486,
0.07101201266050339,
0.2166942059993744,
0.9870590567588806,
-0.28780224919319153,
0.27851834893226624,
-0.0658358559012413,
... |
func (d *Domain) CallSWANStorageURL(
r *http.Request,
action string,
addParams func(url.Values) error) ([]byte, *SWANError) {
return d.CallSWANURL(action, func(q url.Values) error {
swift.SetHomeNodeHeaders(r, &q)
if addParams != nil {
return addParams(q)
}
return nil
})
} | [
-0.6905619502067566,
0.8067667484283447,
0.5424299836158752,
0.5294911861419678,
0.11382593959569931,
0.1973617672920227,
-0.2786768674850464,
-0.7579602003097534,
0.08739817142486572,
0.26454609632492065,
-0.01937062293291092,
0.6862459182739258,
0.5824481844902039,
0.8094380497932434,
... |
func (d *Domain) CallSWANURL(
action string,
addParams func(url.Values) error) ([]byte, *SWANError) {
if d.SWANAccessNode == "" {
return nil, &SWANError{fmt.Errorf(
"Verify '%s' config.json for missing SWANAccessNode",
d.Host), nil}
}
if d.SWANAccessKey == "" {
return nil, &SWANError{fmt.Errorf(
"Veri... | [
-1.0859829187393188,
0.871359646320343,
0.9467727541923523,
-0.03389468416571617,
-0.4296964406967163,
-0.06140061095356941,
-0.337126225233078,
-0.917593240737915,
-0.17325562238693237,
0.9576230049133301,
-0.22515681385993958,
1.4353281259536743,
-0.5245369076728821,
0.7545745372772217,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.