text
stringlengths
11
6.3k
embedding
listlengths
768
768
func AddRefactoring(shortName string, newRefac refactoring.Refactoring) error { if r, ok := refactorings[shortName]; ok { return fmt.Errorf("The short name \"%s\" is already "+ "associated with a refactoring (%s)", shortName, r.Description().Name) } refactorings[shortName] = newRefac refactoringsInOrder ...
[ 0.0005870918976143003, 0.4563281238079071, 0.6091420650482178, -0.05283806100487709, 0.09235512465238571, -0.4528927505016327, -0.22842693328857422, -0.058856550604104996, 0.4824756979942322, 0.047166500240564346, -0.3974340260028839, 0.7346659302711487, -0.11781197041273117, 1.05263292789...
func ClearRefactorings() { refactorings = map[string]refactoring.Refactoring{} refactoringsInOrder = []string{} }
[ -0.5206334590911865, 0.4661104083061218, 0.38970646262168884, 0.014567411504685879, -0.06308923661708832, -0.5417700409889221, -0.1260189414024353, -0.2786028981208801, 0.10643802583217621, 0.7407454252243042, 0.21671508252620697, 1.2528507709503174, -0.35602980852127075, 0.652002394199371...
func DataHome() string { return "" }
[ 1.2525016069412231, 0.33413049578666687, 0.33932214975357056, 0.030723702162504196, 0.12227541208267212, 1.0004825592041016, -0.014303859323263168, 0.11269427090883255, 0.061918944120407104, -0.37483593821525574, -0.5603225827217102, 0.778449296951294, -0.40368887782096863, -0.282566666603...
func DataDirs() []string { return []string{} }
[ -0.6329713463783264, -0.1917039006948471, 0.35965460538864136, -0.26813024282455444, -0.5383867025375366, 0.45817843079566956, -0.8556599617004395, 0.37356075644493103, 1.0899678468704224, -0.8891563415527344, -0.9491333365440369, 0.9209619164466858, -0.24305622279644012, 0.777201950550079...
func ConfigDirs() []string { return []string{} }
[ -1.0835554599761963, -0.1270635426044464, 0.3110448122024536, 0.8791744112968445, -0.6970011591911316, 0.09607630968093872, 0.08047032356262207, 0.5495086908340454, 0.5035620331764221, -0.16024868190288544, -0.68055260181427, -0.02648002840578556, -0.972944438457489, 0.9556276202201843, ...
func CacheHome() string { return "" }
[ 0.8719376921653748, 0.000703960657119751, 0.373062402009964, 1.2244995832443237, -0.43442654609680176, 1.0111780166625977, 0.34163594245910645, -0.33526355028152466, -0.24126075208187103, 0.3277682363986969, 0.061009034514427185, 0.19995616376399994, -0.6498581171035767, -0.1964111328125, ...
func NewMessageSecurityStateCollectionResponse()(*MessageSecurityStateCollectionResponse) { m := &MessageSecurityStateCollectionResponse{ BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), } return m }
[ 0.601189374923706, -0.693906843662262, -0.02026287466287613, 0.3531143069267273, -0.055516812950372696, -0.6459147930145264, 0.8756876587867737, -1.0348598957061768, 0.6401033997535706, -0.12965735793113708, -0.9518205523490906, -1.068058967590332, -0.07150924205780029, 0.45938071608543396...
func CreateMessageSecurityStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewMessageSecurityStateCollectionResponse(), nil }
[ 1.0255638360977173, -0.26000097393989563, 0.19408178329467773, -0.17814654111862183, -0.43711236119270325, 0.289345920085907, 0.6197604537010193, -0.4746337831020355, 0.3811485767364502, -0.32666757702827454, -0.28931382298469543, -0.5364146828651428, -0.0319676510989666, 0.802764475345611...
func (m *MessageSecurityStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() res["value"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7...
[ 0.1720212996006012, 0.1893334537744522, 0.36764371395111084, -0.5008301734924316, 0.7409900426864624, -0.15135625004768372, 0.8174412846565247, 0.15161709487438202, -0.29122811555862427, -1.0760692358016968, -1.0963401794433594, -0.40158799290657043, -1.2225042581558228, -0.244800388813018...
func (m *MessageSecurityStateCollectionResponse) GetValue()([]MessageSecurityStateable) { return m.value }
[ 0.6334421634674072, -0.19964668154716492, 0.2613755166530609, 1.4399577379226685, 1.6185635328292847, 0.15445928275585175, 0.7920398116111755, -1.1073769330978394, 1.2686762809753418, -0.025660594925284386, -0.6488451361656189, -0.9131224751472473, -0.560011088848114, -0.15283611416816711,...
func (m *MessageSecurityStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { err := m.BaseCollectionPaginationCountResponse.Serialize(writer) if err != nil { return err } if m.GetValue() != nil { cast :=...
[ 0.2861296832561493, -0.27396807074546814, 0.4625958502292633, -0.5303948521614075, 0.9169468879699707, -0.24940963089466095, 1.6762416362762451, -0.7815386056900024, 0.31873270869255066, -0.21164390444755554, -0.5767403841018677, -0.5470460057258606, -0.9895057082176208, 0.0888894572854042...
func (m *MessageSecurityStateCollectionResponse) SetValue(value []MessageSecurityStateable)() { m.value = value }
[ 0.29901549220085144, 0.20135796070098877, 0.12324338406324387, 1.6350177526474, 1.2318778038024902, 0.3785550594329834, 0.825522780418396, -0.8207429051399231, 0.6877824664115906, 0.11051912605762482, -0.9645213484764099, -1.248089075088501, -0.3914259970188141, 0.31874608993530273, 0.04...
func queryDB(clnt client.Client, db string, cmd string) (res []client.Result, err error) { q := client.Query{ Command: cmd, Database: db, } if response, err := clnt.Query(q); err == nil { if response.Error() != nil { return res, response.Error() } res = response.Results } else { return res, err } ...
[ -0.1079326868057251, 0.6560233235359192, 0.46321097016334534, 1.1440253257751465, 0.7965965867042542, 0.2669670879840851, -0.1616191416978836, -0.34055501222610474, 0.05319872125983238, -0.25221243500709534, 0.6264052987098694, 0.10665397346019745, -1.2330697774887085, 0.5682452917098999, ...
func GetAttributesForFunction(fn *fv1.Function) []attribute.KeyValue { if fn == nil { return []attribute.KeyValue{} } attrs := []attribute.KeyValue{ {Key: "function-name", Value: attribute.StringValue(fn.Name)}, {Key: "function-namespace", Value: attribute.StringValue(fn.Namespace)}, } if fn.Spec.Environment...
[ -0.4133956730365753, -0.039883505553007126, 0.39573103189468384, -0.26830679178237915, 0.16699586808681488, -0.5375465154647827, -1.2780184745788574, 0.3941080868244171, -0.6840842366218567, 0.010003880597651005, 0.31964701414108276, 0.6145424246788025, 1.0370101928710938, 1.36387395858764...
func (url URL) Get() string { if url.ExpandedURL != "" { return url.ExpandedURL } return url.ShortURL }
[ -0.06884583085775375, 0.23905976116657257, 0.457637220621109, -0.13893991708755493, -0.3192858099937439, 0.16113042831420898, -0.6695522665977478, 0.4476776421070099, 0.6210634708404541, -0.6848019361495972, 0.4930061399936676, 0.23933102190494537, 0.1961662918329239, 0.23550856113433838, ...
func (tweet Tweet) GetDate() time.Time { timestamp, err := time.Parse(time.RubyDate, tweet.Date) if err != nil { return time.Now().UTC() } return timestamp }
[ 0.5153168439865112, 0.2495337724685669, 0.7432985901832581, 0.43541446328163147, 1.257391095161438, 0.19872644543647766, -0.9603573083877563, 0.053977321833372116, -0.08119456470012665, 0.42866480350494385, -0.11134548485279083, -0.313810795545578, -0.791422963142395, 0.653883159160614, ...
func (tweet Tweet) GetURLs() []string { urls := make([]string, len(tweet.Entities.URLs)) for i, url := range tweet.Entities.URLs { urls[i] = url.Get() } return urls }
[ -0.00047094744513742626, -0.0928897112607956, 0.16216705739498138, -0.08854331076145172, 1.1049391031265259, 0.0815272182226181, -1.20473313331604, 0.026972325518727303, 0.2935250699520111, 0.21722443401813507, -0.020175164565443993, 0.20384034514427185, 0.164824441075325, 0.98720967769622...
func handleRequests() { myRouter := mux.NewRouter().StrictSlash(true) fmt.Printf("Handling requests on 4000...\n") logWriter("We are now handling requests") //Serve our User Crud API myRouter.HandleFunc("/addUser", addUser).Methods("POST") //Add a User myRouter.HandleFunc("/deleteUser", deleteUser).M...
[ 0.12077949941158295, -0.07624074071645737, 0.7292886972427368, 0.16565237939357758, 0.7448366284370422, 0.013633803464472294, -0.025140861049294472, -0.16725347936153412, 0.0703037679195404, -0.8349229693412781, -0.10501981526613235, 0.39847683906555176, 0.02740366943180561, 0.823737978935...
func loadInMicroServiceURL() { //Check to see if ENV Creds are available first _, ok := os.LookupEnv("CRUD_URL") if !ok { message := "This ENV Variable is not present: " + "CRUD_URL" panic(message) } _, ok2 := os.LookupEnv("TEXT_API") if !ok2 { message := "This ENV Variable is not present: " + "TEXT_API" ...
[ 0.06674348562955856, -0.5035495162010193, 0.6979999542236328, 0.05744357407093048, -0.11699406057596207, 0.1770317703485489, -0.21631436049938202, 0.5898081660270691, -1.2816145420074463, 0.4964129626750946, 0.26893550157546997, 0.5762589573860168, -0.8511646389961243, 0.4410937428474426, ...
func available(w http.ResponseWriter, r *http.Request) { //Declare data to return type ReturnMessage struct { TheErr []string `json:"TheErr"` ResultMsg []string `json:"ResultMsg"` SuccOrFail int `json:"SuccOrFail"` } theReturnMessage := ReturnMessage{ TheErr: []string{""}, ResultMsg: []stri...
[ -1.084934115409851, -0.8073441386222839, 0.5604739785194397, -0.38042908906936646, -0.1657666712999344, 0.3002494275569916, 0.157281756401062, 0.6804196834564209, -0.4782463312149048, 0.8156670331954956, 0.8870280385017395, 0.7556559443473816, -0.7074664235115051, 0.5885303020477295, 0.3...
func (m *IntentsDeviceManagementIntentItemRequestBuilder) Assign()(*IntentsItemAssignRequestBuilder) { return NewIntentsItemAssignRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) }
[ -1.5781238079071045, -0.7382893562316895, 0.3733901083469391, 0.4526482820510864, -0.10531684756278992, 0.30750414729118347, 0.19370903074741364, 0.2302909642457962, 0.7448157668113708, -0.6320586800575256, 0.7455297112464905, 0.4241067171096802, -0.6012746095657349, -0.18131643533706665, ...
func (m *IntentsDeviceManagementIntentItemRequestBuilder) Assignments()(*IntentsItemAssignmentsRequestBuilder) { return NewIntentsItemAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) }
[ -1.5127772092819214, 0.1780882030725479, 0.49428531527519226, 0.1974770575761795, 0.02603517472743988, -0.12364369630813599, -0.08113345503807068, 0.2166154384613037, 0.9794060587882996, -0.6636492013931274, 1.0913887023925781, -0.08765414357185364, -0.6058802008628845, -0.7137576341629028...
func (m *IntentsDeviceManagementIntentItemRequestBuilder) Categories()(*IntentsItemCategoriesRequestBuilder) { return NewIntentsItemCategoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) }
[ -1.0281527042388916, 0.35481926798820496, 0.3677803874015808, -0.33530038595199585, -0.051617834717035294, -0.019962860271334648, -0.1494768112897873, -0.1940876543521881, 1.2543588876724243, -1.5815120935440063, 1.3938615322113037, 0.18075022101402283, -0.3399239182472229, -0.821907341480...
func (m *IntentsDeviceManagementIntentItemRequestBuilder) CompareWithTemplateId(templateId *string)(*IntentsItemCompareWithTemplateIdRequestBuilder) { return NewIntentsItemCompareWithTemplateIdRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter, templateId) }
[ -1.1630955934524536, -0.5180596113204956, 0.5358477830886841, -0.31975963711738586, -0.8473315238952637, -0.32840752601623535, 0.17279912531375885, -0.48098620772361755, 1.2905464172363281, 0.03805218264460564, 0.016344459727406502, 0.08067259192466736, -0.7532538175582886, 0.4163337051868...
func NewIntentsDeviceManagementIntentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*IntentsDeviceManagementIntentItemRequestBuilder) { m := &IntentsDeviceManagementIntentItemRequestBuilder{ BaseRe...
[ -1.0557771921157837, -0.6233133673667908, 0.3586081862449646, -0.42514699697494507, -0.42882680892944336, 0.6309006214141846, 0.686291515827179, -0.18314343690872192, 0.15633635222911835, -1.0036488771438599, 0.8387979865074158, 0.54532790184021, -0.8509042263031006, -0.4276547133922577, ...
func NewIntentsDeviceManagementIntentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*IntentsDeviceManagementIntentItemRequestBuilder) { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl return NewInt...
[ -1.234304666519165, -0.5974788665771484, 0.10641048103570938, 0.6307125091552734, -0.26079609990119934, 0.6098659634590149, 0.21949954330921173, 0.2882751226425171, 0.7356517314910889, -1.2043828964233398, 0.7035898566246033, 0.10140177607536316, -0.5628255605697632, -0.5589500069618225, ...
func (m *IntentsDeviceManagementIntentItemRequestBuilder) CreateCopy()(*IntentsItemCreateCopyRequestBuilder) { return NewIntentsItemCreateCopyRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) }
[ -1.235987901687622, -0.2507261335849762, 0.5824258327484131, 0.7912985682487488, -0.31973332166671753, 0.6242886781692505, 0.6837788820266724, -0.5104690194129944, 0.9165999889373779, -0.1928572952747345, 0.9440307021141052, -0.06418595463037491, -0.5046347379684448, -0.8304604887962341, ...
func (m *IntentsDeviceManagementIntentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *IntentsDeviceManagementIntentItemRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { return err } ...
[ -0.5443190336227417, -0.41907140612602234, 0.7207654118537903, -0.029915854334831238, -0.27905747294425964, 0.3692340850830078, 0.623611330986023, -0.22673535346984863, 0.9920470714569092, 0.28353753685951233, 0.9348729252815247, 0.5202687382698059, -0.4976668953895569, -0.5038771033287048...
func (m *IntentsDeviceManagementIntentItemRequestBuilder) DeviceSettingStateSummaries()(*IntentsItemDeviceSettingStateSummariesRequestBuilder) { return NewIntentsItemDeviceSettingStateSummariesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) }
[ -1.7240245342254639, 1.2958037853240967, 0.12248469144105911, -0.43617546558380127, -0.6012097001075745, 0.20375749468803406, 0.2934603691101074, -0.6475637555122375, 1.2920118570327759, 0.27328479290008545, 0.33382439613342285, 0.38483643531799316, 0.39018428325653076, -0.7226132154464722...
func (m *IntentsDeviceManagementIntentItemRequestBuilder) DeviceStates()(*IntentsItemDeviceStatesRequestBuilder) { return NewIntentsItemDeviceStatesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) }
[ -1.3382341861724854, 0.14303699135780334, 0.33416908979415894, -0.08876572549343109, -0.45252546668052673, -0.09214503318071365, 0.4832267761230469, -0.2782856523990631, 1.623913049697876, -0.8064820170402527, 0.8527688384056091, 0.3635466992855072, -0.75236576795578, -0.8614333868026733, ...
func (m *IntentsDeviceManagementIntentItemRequestBuilder) DeviceStateSummary()(*IntentsItemDeviceStateSummaryRequestBuilder) { return NewIntentsItemDeviceStateSummaryRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) }
[ -1.5786099433898926, 0.8701055645942688, 0.42595943808555603, -0.2483161985874176, -0.6508934497833252, -0.12150127440690994, 0.3024636507034302, -0.05613686889410019, 1.6719073057174683, -0.16467082500457764, 0.5458838939666748, 0.5348940491676331, 0.15023231506347656, -1.0479846000671387...
func (m *IntentsDeviceManagementIntentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *IntentsDeviceManagementIntentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DeviceManagementIntentable, error) { requestInfo, err := m.ToGetRequestIn...
[ -0.884015679359436, -0.30862605571746826, 0.8110666871070862, -0.5749450922012329, -0.1598282903432846, 0.4496570825576782, 0.5446044206619263, -0.3139570355415344, 0.3129577338695526, -0.24662670493125916, 0.6973802447319031, 0.9205606579780579, -0.4220496416091919, -0.3889315724372864, ...
func (m *IntentsDeviceManagementIntentItemRequestBuilder) GetCustomizedSettings()(*IntentsItemGetCustomizedSettingsRequestBuilder) { return NewIntentsItemGetCustomizedSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) }
[ -0.4459187984466553, 1.0485892295837402, 0.37575095891952515, 0.4383300542831421, -0.3995259702205658, -0.49288487434387207, 0.16335003077983856, -0.5886605978012085, 0.8213896155357361, -0.05248212814331055, 0.30682605504989624, 1.0228602886199951, -0.696624219417572, -0.4069802463054657,...
func (m *IntentsDeviceManagementIntentItemRequestBuilder) MigrateToTemplate()(*IntentsItemMigrateToTemplateRequestBuilder) { return NewIntentsItemMigrateToTemplateRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) }
[ -1.5349841117858887, 0.6769807934761047, 0.6538724899291992, -0.04243921488523483, -0.04819844663143158, -0.3148503601551056, 0.059280961751937866, -0.6801260113716125, 0.565094530582428, 0.24856162071228027, -0.11140505224466324, 0.00939667597413063, -0.582012414932251, -0.339287281036376...
func (m *IntentsDeviceManagementIntentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DeviceManagementIntentable, requestConfiguration *IntentsDeviceManagementIntentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde1169...
[ -0.855718731880188, -0.7005263566970825, 0.7577819228172302, -0.6621242761611938, -0.9644098281860352, 0.918138861656189, 0.5537087917327881, -0.06430413573980331, 0.8344132304191589, -0.019985463470220566, 0.6701802015304565, 0.8158014416694641, 0.06950227916240692, -0.279341459274292, ...
func (m *IntentsDeviceManagementIntentItemRequestBuilder) Settings()(*IntentsItemSettingsRequestBuilder) { return NewIntentsItemSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) }
[ -1.2172510623931885, 0.2304527908563614, 0.33651819825172424, 0.3094164729118347, 0.006469935178756714, -0.19147074222564697, 0.24445490539073944, -0.09177061170339584, 1.4403821229934692, -0.44879549741744995, 0.8444851636886597, 0.38094350695610046, -0.5646352171897888, -1.01927256584167...
func (m *IntentsDeviceManagementIntentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *IntentsDeviceManagementIntentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2...
[ -0.6552700400352478, -0.7273507714271545, 0.8086869120597839, -1.0045783519744873, -0.3925262689590454, 0.3715483546257019, 0.17511533200740814, -0.29045408964157104, 0.8507446646690369, -0.10215520858764648, 0.7096828818321228, 0.44978588819503784, -0.2626594603061676, -0.595842182636261,...
func (m *IntentsDeviceManagementIntentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *IntentsDeviceManagementIntentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187...
[ -1.2205283641815186, -0.5230364799499512, 0.8035643100738525, -0.7534849643707275, -0.07189570367336273, 0.08890149742364883, 0.01904771849513054, -0.5899581909179688, 0.6857110261917114, -0.3019457161426544, 0.5128533244132996, 0.5460903644561768, -0.43211784958839417, -0.4448628127574920...
func (m *IntentsDeviceManagementIntentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DeviceManagementIntentable, requestConfiguration *IntentsDeviceManagementIntentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee26337...
[ -1.1452158689498901, -0.770796537399292, 0.9036052823066711, -0.9249524474143982, -0.5689384937286377, 0.45339328050613403, 0.4836452901363373, -0.7484937906265259, 0.2459162026643753, -0.017725888639688492, 0.8551450967788696, 0.24970416724681854, -0.40614160895347595, -0.7135230898857117...
func (m *IntentsDeviceManagementIntentItemRequestBuilder) UpdateSettings()(*IntentsItemUpdateSettingsRequestBuilder) { return NewIntentsItemUpdateSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) }
[ -1.7934653759002686, 0.5258546471595764, 0.40002089738845825, 0.7325053215026855, -0.559946596622467, -0.317268967628479, 0.13112227618694305, -0.36234596371650696, 0.48468345403671265, 0.37188372015953064, 0.8982535004615784, 0.33634594082832336, -0.9906275272369385, -0.8578823804855347, ...
func (m *IntentsDeviceManagementIntentItemRequestBuilder) UserStates()(*IntentsItemUserStatesRequestBuilder) { return NewIntentsItemUserStatesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) }
[ -0.6152727603912354, 0.1356673687696457, 0.309781551361084, 0.6164941787719727, -0.9716079235076904, -0.009831801056861877, 0.5154818892478943, -0.27687177062034607, 1.5194200277328491, -0.5158481597900391, 0.6467858552932739, -0.014664373360574245, -0.5069846510887146, -1.2168534994125366...
func (m *IntentsDeviceManagementIntentItemRequestBuilder) UserStateSummary()(*IntentsItemUserStateSummaryRequestBuilder) { return NewIntentsItemUserStateSummaryRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) }
[ -0.756902277469635, 0.5697094798088074, 0.45117294788360596, 0.3240760862827301, -0.9706899523735046, 0.017190851271152496, 0.05483847111463547, -0.14575594663619995, 1.6400655508041382, 0.07208950817584991, 0.1226079985499382, 0.1622951626777649, 0.5129013061523438, -1.0458340644836426, ...
func NewAuthenticationCombinationConfiguration()(*AuthenticationCombinationConfiguration) { m := &AuthenticationCombinationConfiguration{ Entity: *NewEntity(), } return m }
[ -1.100091814994812, -0.0961833968758583, -0.028786564245820045, 0.47890132665634155, -0.06565240770578384, -0.3964189291000366, 0.5683947801589966, -0.05605180189013481, 0.2620232105255127, -0.042336802929639816, -0.7836506962776184, -0.377239465713501, -0.04117295891046524, 0.143908768892...
func CreateAuthenticationCombinationConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { if parseNode != nil { mappingValueNode, err := parseNode.GetChil...
[ -0.09766209870576859, -0.299630343914032, 0.4575400948524475, 0.36973926424980164, -0.8909451365470886, -0.17201463878154755, 0.30997151136398315, 0.07878241688013077, 0.3943102955818176, -0.1327604353427887, 0.31721657514572144, -0.1279965490102768, 0.3479919731616974, 0.06239964440464973...
func (m *AuthenticationCombinationConfiguration) GetAppliesToCombinations()([]AuthenticationMethodModes) { val, err := m.GetBackingStore().Get("appliesToCombinations") if err != nil { panic(err) } if val != nil { return val.([]AuthenticationMethodModes) } return nil }
[ -0.3646174967288971, 0.7536534070968628, 0.2852134704589844, 0.6987395882606506, 0.4816831052303314, -0.47233352065086365, 0.028742754831910133, -0.35408246517181396, 0.8036745190620422, -0.5449744462966919, -0.31351491808891296, -0.5560391545295715, -0.1113794595003128, -0.019562372937798...
func (m *AuthenticationCombinationConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := m.Entity.GetFieldDeserializers() res["appliesToCombinations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be14...
[ -0.9802775979042053, 0.7639382481575012, 0.24668602645397186, -0.15686547756195068, 0.40078938007354736, -0.5528439283370972, 0.2909231185913086, 0.3134048581123352, -0.23943869769573212, -0.573196291923523, -0.6490689516067505, -0.40567001700401306, -1.093540072441101, -0.1179059445858001...
func (m *AuthenticationCombinationConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { err := m.Entity.Serialize(writer) if err != nil { return err } if m.GetAppliesToCombinations() != nil { err = writer.WriteColl...
[ -0.8287241458892822, 0.686917781829834, 0.2140539139509201, 0.0671980008482933, 0.7249748706817627, -0.4401741325855255, 0.937426745891571, 0.471569687128067, 0.3118084669113159, 0.18261192739009857, -0.03864683955907822, -0.534598171710968, -0.5223956108093262, 0.30602309107780457, 0.44...
func (m *AuthenticationCombinationConfiguration) SetAppliesToCombinations(value []AuthenticationMethodModes)() { err := m.GetBackingStore().Set("appliesToCombinations", value) if err != nil { panic(err) } }
[ -0.555063784122467, 0.7517735362052917, 0.2110065370798111, 0.1629364788532257, 0.1548171043395996, -0.29094240069389343, 0.2918081283569336, -0.35107728838920593, 0.4220636785030365, -0.6841105818748474, -0.45598945021629333, -1.2934621572494507, 0.08019014447927475, 0.12009050697088242, ...
func (s *SalesItemPricesEndpoint) List(ctx context.Context, division int, all bool, o *api.ListOptions) ([]*SalesItemPrices, error) { var entities []*SalesItemPrices u, _ := s.client.ResolvePathWithDivision("/api/v1/{division}/logistics/SalesItemPrices", division) // #nosec api.AddListOptionsToURL(u, o) if all { ...
[ -0.4459722638130188, -0.4798325002193451, 0.8904107213020325, 0.5969301462173462, 0.15356425940990448, -0.39250752329826355, -0.20212434232234955, -0.014098301529884338, 0.28975778818130493, 0.6915729641914368, -0.1589154452085495, -0.3247368037700653, 0.08035746961832047, -0.0584418661892...
func (s *SalesItemPricesEndpoint) Get(ctx context.Context, division int, id *types.GUID) (*SalesItemPrices, error) { b, _ := s.client.ResolvePathWithDivision("/api/v1/{division}/logistics/SalesItemPrices", division) // #nosec u, err := api.AddOdataKeyToURL(b, id) if err != nil { return nil, err } e := &SalesIte...
[ -0.9748713374137878, 0.42557212710380554, 0.6423194408416748, 0.23800237476825714, 0.13398556411266327, -0.3353137671947479, -0.5620013475418091, -0.744037389755249, 0.21308894455432892, 0.24293409287929535, 0.22294625639915466, 0.37800607085227966, -0.023816030472517014, -0.22139360010623...
func (s *SalesItemPricesEndpoint) New() *SalesItemPrices { return &SalesItemPrices{} }
[ -0.216397225856781, -0.6843603849411011, 0.04769561439752579, 0.5946439504623413, -0.6848606467247009, -0.5445193648338318, 0.06327038258314133, -0.3795981705188751, -0.00012306733697187155, 1.1205549240112305, -0.15723860263824463, -0.6610418558120728, 0.611650288105011, -0.73702895641326...
func (s *SalesItemPricesEndpoint) Create(ctx context.Context, division int, entity *SalesItemPrices) (*SalesItemPrices, error) { u, _ := s.client.ResolvePathWithDivision("/api/v1/{division}/logistics/SalesItemPrices", division) // #nosec e := &SalesItemPrices{} _, _, err := s.client.NewRequestAndDo(ctx, "POST", u.St...
[ -0.8943604230880737, 0.20114602148532867, 0.5566220283508301, 0.8262691497802734, 0.3182005286216736, 0.2930850386619568, -0.06759423017501831, -0.6584811210632324, -0.15319181978702545, 0.4071425795555115, -0.009670828469097614, -0.791381299495697, 0.01574171707034111, 0.08078894764184952...
func (s *SalesItemPricesEndpoint) Update(ctx context.Context, division int, entity *SalesItemPrices) (*SalesItemPrices, error) { b, _ := s.client.ResolvePathWithDivision("/api/v1/{division}/logistics/SalesItemPrices", division) // #nosec u, err := api.AddOdataKeyToURL(b, entity.GetPrimary()) if err != nil { return...
[ -1.144784927368164, -0.31438472867012024, 0.4490814805030823, 0.40005379915237427, -0.38382306694984436, 0.12713974714279175, -0.09098707884550095, -0.3304101526737213, 0.41368722915649414, 0.5713824033737183, -0.025041038170456886, -0.394364595413208, -0.05994623154401779, -0.479027301073...
func (s *SalesItemPricesEndpoint) Delete(ctx context.Context, division int, id *types.GUID) error { b, _ := s.client.ResolvePathWithDivision("/api/v1/{division}/logistics/SalesItemPrices", division) // #nosec u, err := api.AddOdataKeyToURL(b, id) if err != nil { return err } _, r, requestError := s.client.NewRe...
[ -0.29026293754577637, 0.31922587752342224, 0.7193643450737, 0.44575709104537964, 0.056692011654376984, -0.1533496081829071, -0.28807732462882996, -0.48759788274765015, 0.30187851190567017, 0.6129993200302124, 0.41613829135894775, -0.001158441649749875, -0.1793636679649353, -0.1615237593650...
func RunContext(h http.Handler, ctx context.Context) { srv := createServer(h) go gracefullyShutDownOnSignal(srv, ctx) if err := srv.ListenAndServe(); err != http.ErrServerClosed { log.Fatalf("Unable to to start server: %v", err) } }
[ -0.7172732353210449, 0.08257725834846497, 0.664826512336731, 0.007272733375430107, 0.07581419497728348, 0.7611507177352905, -0.3658602833747864, -0.05540190637111664, 0.5090446472167969, -0.20895688235759735, -0.4187413454055786, 0.2861614227294922, -0.5899618268013, 0.771033763885498, 0...
func Run(h http.Handler) { srv := createServer(h) go gracefullyShutDownOnSignal(srv, context.Background()) if err := srv.ListenAndServe(); err != http.ErrServerClosed { log.Fatalf("Unable to to start server: %v", err) } }
[ -0.39579352736473083, -0.20658940076828003, 0.571255624294281, 0.40221938490867615, 0.14437972009181976, 1.1922978162765503, 0.41871514916419983, 0.30555233359336853, 0.060926783829927444, -0.2227969914674759, -0.8877723217010498, -0.22285285592079163, -0.6724600195884705, 1.21219468116760...
func hyperbola(x, y, u float64) (float64, float64) { s := math.Sinh(u) c := math.Sinh(u) return c*x + s*y, s*x + c*y }
[ 1.3027575016021729, 0.22275128960609436, 0.592693567276001, 1.0536588430404663, 0.33486294746398926, 0.2728135287761688, -0.5149531960487366, 0.4297060966491699, -0.3359275758266449, -0.5833533406257629, -0.8225166201591492, 0.2709919512271881, -0.2703666687011719, -0.16717402637004852, ...
func master(task Task, name string, y, x, p interface{}, userargs []string, cmdout, cmderr io.Writer, jobout, joberr bool) error { n := reflect.ValueOf(x).Len() // Open port for server. l := listenRetry("tcp", addrStr) defer l.Close() // Start server. todo := make(chan int) go func(n int) { // Thread-safely ...
[ 0.12635917961597443, 0.26727914810180664, 0.9798411130905151, 0.26784464716911316, -0.8551909923553467, -0.6883065700531006, 0.39461103081703186, -0.28333550691604614, -0.6102759838104248, -0.3172076940536499, -0.29980671405792236, 0.19567468762397766, 0.22394609451293945, 0.14733871817588...
func serve(l net.Listener, task Task, name string, y, x, p interface{}, todo <-chan int, dsts <-chan interface{}, errs chan<- error) { for { conn, err := l.Accept() // The listener will be closed when qsub exits. if err != nil { // TODO: Prevent this from printing an error when expected. log.Println("accep...
[ 0.06208346411585808, 0.2833893895149231, 0.6280924081802368, 0.012313810177147388, -0.10316735506057739, 0.36608418822288513, -0.4483681321144104, -0.37502285838127136, -1.1859337091445923, -0.11491163074970245, -0.667186975479126, -0.0030438080430030823, 0.40480318665504456, 0.39494982361...
func handleClose(conn net.Conn, y, x, p interface{}, todo <-chan int, dsts <-chan interface{}) error { handleErr := handle(conn, y, x, p, todo, dsts) closeErr := conn.Close() if handleErr != nil { return handleErr } if closeErr != nil { return closeErr } return nil }
[ 0.22922798991203308, 0.11939817667007446, 0.7374176383018494, 0.7337981462478638, 0.22764530777931213, 0.04311510920524597, -0.5267170667648315, -0.14774104952812195, -0.42333149909973145, -0.6216698288917542, 0.5279356837272644, -0.8005691170692444, -0.5486797094345093, -0.262760549783706...
func handle(rw io.ReadWriter, y, x, p interface{}, todo <-chan int, dsts <-chan interface{}) error { // Read request. req := new(request) if err := json.NewDecoder(rw).Decode(req); err != nil { return fmt.Errorf("receive request: %v", err) } switch req.Type { default: // Error occurred in protocol, not user ...
[ -0.7541704177856445, 0.08873758465051651, 1.0247979164123535, -0.15362273156642914, -0.07887682318687439, -0.2711743116378784, 0.35695332288742065, -0.9094874858856201, -0.07516138255596161, 0.13838964700698853, -0.10417769104242325, 0.7282168865203857, -0.03395358845591545, -0.53167766332...
func (manager *Manager) getIdentityLabels(securityIdentity uint32) (labels.Labels, error) { identityCtx, cancel := context.WithTimeout(context.Background(), option.Config.KVstoreConnectivityTimeout) defer cancel() if err := manager.identityAllocator.WaitForInitialGlobalIdentities(identityCtx); err != nil { return ...
[ -1.0107959508895874, 0.004774866625666618, 0.7937327027320862, 0.15631979703903198, 0.5712134838104248, 0.4576014578342438, -0.07726553827524185, -0.9903606176376343, 1.0755951404571533, 0.9349938631057739, -0.49046051502227783, -0.48851579427719116, -1.4893168210983276, 0.3564696013927459...
func (manager *Manager) processEvents(ctx context.Context, cacheStatus k8s.CacheStatus) { var globalSync, policySync bool maybeTriggerReconcile := func() { if !globalSync || !policySync { return } manager.Lock() defer manager.Unlock() if manager.allCachesSynced { return } manager.allCachesSynce...
[ 0.2587105333805084, 0.2655109465122223, 0.7005481123924255, 0.17909714579582214, 0.14229658246040344, -0.012816143222153187, -0.1130814179778099, 0.16269417107105255, 0.8247854113578796, 0.6802939772605896, 0.14410027861595154, 0.042274463921785355, -0.1416046917438507, 0.9333997964859009,...
func (manager *Manager) processCiliumEndpoints(ctx context.Context, wg *sync.WaitGroup) { wg.Add(1) go func() { defer wg.Done() retryQueue := manager.endpointEventsQueue go func() { <-ctx.Done() retryQueue.ShutDown() }() for { item, shutdown := retryQueue.Get() if shutdown { break } ...
[ 0.4789128601551056, -0.6458984017372131, 0.7291169166564941, 0.10943157225847244, 0.6431707143783569, -0.8166451454162598, -0.3170181214809418, 0.8021520972251892, 0.8828246593475342, 0.8885422945022583, 0.28104454278945923, -0.41739293932914734, -0.896714448928833, 0.40006136894226074, ...
func (manager *Manager) onAddEgressPolicy(policy *Policy) error { logger := log.WithField(logfields.CiliumEgressGatewayPolicyName, policy.Name) config, err := ParseCEGP(policy) if err != nil { logger.WithError(err).Warn("Failed to parse CiliumEgressGatewayPolicy") return err } manager.Lock() defer manager.U...
[ 0.3112245798110962, -0.19660140573978424, 0.5138041973114014, -0.6112710237503052, 0.3266136050224304, 0.18259137868881226, -0.31201171875, 0.2981865406036377, 0.7720509767532349, 0.6384689211845398, -0.5908516049385071, -0.7180150747299194, -0.16788350045681, 0.9631011486053467, -0.4882...
func (manager *Manager) onDeleteEgressPolicy(policy *Policy) { configID := ParseCEGPConfigID(policy) manager.Lock() defer manager.Unlock() logger := log.WithField(logfields.CiliumEgressGatewayPolicyName, configID.Name) if manager.policyConfigs[configID] == nil { logger.Warn("Can't delete CiliumEgressGatewayPo...
[ 0.9027352929115295, -0.4112551808357239, 0.24212267994880676, -0.24968084692955017, 0.1228564903140068, 0.0442533977329731, -0.035552386194467545, 0.8780109286308289, 1.105298638343811, 0.9026881456375122, -0.2434450387954712, -0.01859315298497677, -0.30725952982902527, 0.9559288024902344,...
func (manager *Manager) OnUpdateEndpoint(endpoint *k8sTypes.CiliumEndpoint) { id := types.NamespacedName{ Name: endpoint.GetName(), Namespace: endpoint.GetNamespace(), } manager.pendingEndpointEventsLock.Lock() manager.pendingEndpointEvents[id] = endpoint manager.pendingEndpointEventsLock.Unlock() mana...
[ -0.4560393691062927, -1.4310543537139893, 0.501071035861969, 0.2039814442396164, -0.4602774679660797, -0.19956587255001068, -1.1088374853134155, 0.6539514660835266, 0.9783080816268921, 1.3921226263046265, -0.714614748954773, -0.07629245519638062, -0.20144668221473694, 0.7911209464073181, ...
func (manager *Manager) OnDeleteEndpoint(endpoint *k8sTypes.CiliumEndpoint) { id := types.NamespacedName{ Name: endpoint.GetName(), Namespace: endpoint.GetNamespace(), } manager.pendingEndpointEventsLock.Lock() delete(manager.pendingEndpointEvents, id) manager.pendingEndpointEventsLock.Unlock() manager...
[ 0.6295491456985474, -1.2373324632644653, 0.33719560503959656, 0.24774986505508423, 0.07912155985832214, -0.6404122114181519, -0.9750459790229797, 0.8263162970542908, 1.1576658487319946, 0.9919782876968384, -0.3815505802631378, 0.1781913936138153, -0.17195019125938416, 0.9513904452323914, ...
func (manager *Manager) OnUpdateNode(node nodeTypes.Node) { manager.Lock() defer manager.Unlock() manager.nodeDataStore[node.Name] = node manager.onChangeNodeLocked(eventUpdateNode) }
[ -0.8019954562187195, -0.1860479861497879, 0.46611711382865906, -0.7328481674194336, -1.1556007862091064, -0.16694970428943634, -1.0991324186325073, 0.012785522267222404, 0.5924931168556213, 1.1872605085372925, -0.9086915254592896, 0.6979648470878601, 0.015534408390522003, 0.271656244993209...
func (manager *Manager) OnDeleteNode(node nodeTypes.Node) { manager.Lock() defer manager.Unlock() delete(manager.nodeDataStore, node.Name) manager.onChangeNodeLocked(eventDeleteNode) }
[ 0.2312709391117096, 0.09708902984857559, 0.26514315605163574, -0.5950568318367004, -0.5370980501174927, -0.3547038733959198, -1.0695269107818604, -0.07126527279615402, 0.6354330778121948, 0.8412089943885803, -0.36631709337234497, 0.5454121828079224, 0.09914523363113403, 0.5149264931678772,...
func (manager *Manager) policyMatches(sourceIP net.IP, f func(net.IP, *net.IPNet, bool, *gatewayConfig) bool) bool { for _, policy := range manager.policyConfigsBySourceIP[sourceIP.String()] { for _, ep := range policy.matchedEndpoints { for _, endpointIP := range ep.ips { if !endpointIP.Equal(sourceIP) { ...
[ 0.2923790216445923, 0.01437467336654663, 0.49167388677597046, -0.1856442093849182, -1.0364084243774414, 0.8254453539848328, -0.4232891798019409, 1.037013053894043, 0.34329953789711, 0.513833224773407, -0.18886035680770874, -0.9685612320899963, -0.41449177265167236, -0.10149670392274857, ...
func (manager *Manager) policyMatchesMinusExcludedCIDRs(sourceIP net.IP, f func(net.IP, *net.IPNet, *gatewayConfig) bool) bool { for _, policy := range manager.policyConfigsBySourceIP[sourceIP.String()] { cidrs := policy.destinationMinusExcludedCIDRs() for _, ep := range policy.matchedEndpoints { for _, endpoi...
[ 0.24325698614120483, 0.7340178489685059, 0.4640025496482849, -0.13491912186145782, -1.6085805892944336, 0.6406324505805969, -0.34156760573387146, 0.5853090286254883, 0.525488018989563, 0.6106969118118286, -0.4218597412109375, -0.8022134900093079, -0.8773581385612488, -0.054068468511104584,...
func (manager *Manager) removeUnusedEgressRules() { egressPolicies := map[egressmap.EgressPolicyKey4]egressmap.EgressPolicyVal4{} manager.policyMap.IterateWithCallback( func(key *egressmap.EgressPolicyKey4, val *egressmap.EgressPolicyVal4) { egressPolicies[*key] = *val }) nextPolicyKey: for policyKey, policy...
[ -0.021959125995635986, 0.5318092107772827, 0.7643371224403381, -0.9197294116020203, -0.4540195167064667, 0.460542768239975, 0.22666962444782257, 0.7986237406730652, 0.30450040102005005, 1.118345856666565, -0.003480968764051795, -0.4273245930671692, -1.2173713445663452, 0.715644359588623, ...
func (manager *Manager) reconcileLocked() { if !manager.allCachesSynced { return } switch { // on eventK8sSyncDone we need to update all caches unconditionally as // we don't know which k8s events/resources were received during the // initial k8s sync case manager.eventBitmapIsSet(eventUpdateEndpoint, eventDe...
[ 0.1399085521697998, -0.3814975917339325, 0.7320270538330078, 0.019336912781000137, 0.7050097584724426, -0.35870957374572754, 0.04442830756306648, 0.42889219522476196, 0.8487274646759033, 0.23555691540241241, 0.16298305988311768, -0.46801695227622986, -0.7629715204238892, 0.7303817272186279...
func Shutdown(options RunOptions) error { err := compose.KillContainers(compose.CommandOptions{ DockerComposeDir: options.DockerComposeDir, DockerComposeFileName: options.DockerComposeFileName, Writer: options.Writer, Env: []string{ fmt.Sprintf("COMPOSE_PROJECT_NAME=%s", options.DockerCo...
[ -0.05488668009638786, -0.5567525029182434, 0.6403312087059021, 0.7998068332672119, 0.6157726645469666, 0.8140222430229187, 1.0419710874557495, 0.18153956532478333, 0.371515691280365, 0.6090884804725647, 0.9314337968826294, 0.3720828890800476, -0.28322872519493103, 0.026011310517787933, 0...
func startHost(api libmachine.API, mc config.ClusterConfig, n config.Node) (*host.Host, bool) { exists, err := api.Exists(mc.Name) if err != nil { exit.WithError("Failed to check if machine exists", err) } host, err := machine.StartHost(api, mc, n) if err != nil { exit.WithError("Unable to start VM. Please in...
[ -0.14376531541347504, 0.16256658732891083, 0.5902509689331055, 0.4288146495819092, -0.05307304114103317, 0.44242194294929504, -0.6455413699150085, 0.504391074180603, -0.6650302410125732, 0.766403317451477, 0.3450845777988434, -0.11916406452655792, -0.7224932909011841, 0.111989326775074, ...
func validateNetwork(h *host.Host, r command.Runner) string { ip, err := h.Driver.GetIP() if err != nil { exit.WithError("Unable to get VM IP address", err) } optSeen := false warnedOnce := false for _, k := range proxy.EnvVars { if v := os.Getenv(k); v != "" { if !optSeen { out.T(out.Internet, "Found...
[ -0.38120830059051514, 0.489768385887146, 0.8687003254890442, 0.39853888750076294, 0.44855836033821106, -0.27662184834480286, 0.12548929452896118, -0.26133933663368225, -0.20328588783740997, 0.2332468032836914, 1.1165629625320435, -0.343580037355423, -0.8788198828697205, 0.9149900078773499,...
func SpawnPlayer(rwc io.ReadWriteCloser, user *User) { log.Printf("Spawning player %s (%v)", user.Username, user.IP) user.rwc = rwc user.Scanner = bufio.NewScanner(rwc) // TODO: Persistence loc := Start() p := &Player{ name: user.Username, // TODO: make this a template Desc: fmt.Sprintf("You see %v here."...
[ -0.162995383143425, -0.8043590188026428, 0.5864275693893433, 0.8900004625320435, -0.03500716760754585, 0.6752848625183105, 0.5494876503944397, -0.559669017791748, 0.40310025215148926, -0.12325116246938705, -0.4164309501647949, 0.16288073360919952, -0.5087183117866516, 0.2196618616580963, ...
func (p *Player) Writef(format string, args ...interface{}) { p.Write([]byte(fmt.Sprintf(format, args...))) }
[ -0.8870448470115662, -0.503211259841919, 0.44122010469436646, 0.3390870690345764, 1.347855806350708, 0.04744711145758629, 0.08530837297439575, -0.15897947549819946, -0.429043173789978, -0.8200256824493408, 0.001763972220942378, -0.14111965894699097, -0.040694575756788254, 0.842908740043640...
func (p *Player) Execute(t *template.Template, data interface{}) { p.writer.Write([]byte("\n")) if err := t.Execute(p.writer, data); err != nil { log.Printf("ERROR: problem writing template to user: %s", err) } }
[ -0.49817949533462524, -0.47821474075317383, 0.43293410539627075, 0.06569229811429977, 0.3785340189933777, 0.12544451653957367, -0.39856764674186707, -0.23392319679260254, -0.5990769267082214, 0.7651249170303345, -0.6230706572532654, -0.6924868822097778, -0.6705164909362793, -0.514700829982...
func (p *Player) Write(b []byte) (int, error) { p.Lock() defer p.Unlock() p.writer.Write([]byte("\n")) p.writer.Write(b) p.prompt() return len(b), nil }
[ -1.6770597696304321, 0.13327687978744507, 0.70777827501297, 0.564755380153656, 0.4291495084762573, -0.061782170087099075, 0.6825780868530273, 0.5735132098197937, 0.09052132070064545, 0.09771654009819031, -1.1747299432754517, -0.4258475601673126, -1.228611946105957, 0.10182715952396393, 0...
func (p *Player) Id() util.Id { return p.id }
[ 0.04065392538905144, -1.0208717584609985, 0.21084661781787872, 0.3869677484035492, 0.6079203486442566, 1.350149154663086, 0.3894365429878235, 0.03705627843737602, 1.3940260410308838, -0.2219884842634201, 0.04082189127802849, 0.33306241035461426, -0.7649036645889282, 0.2359236776828766, 0...
func (p *Player) Name() string { return p.name }
[ -1.1690404415130615, -0.8574503660202026, 0.37640735507011414, 0.1869562417268753, -0.8060775995254517, 0.519424319267273, 0.03764113038778305, -0.7456572651863098, 0.013027219101786613, 1.3750232458114624, -0.4542064070701599, 0.15919721126556396, -0.5923501253128052, -0.17253068089485168...
func (p *Player) String() string { return fmt.Sprintf("%v [%v]", p.name, p.id) }
[ -0.5343688726425171, -1.5462180376052856, 0.14349788427352905, -1.0065926313400269, -0.26931753754615784, 1.0109308958053589, -0.35202401876449585, -1.2536674737930298, -0.24552135169506073, 0.5829114317893982, -0.5016785860061646, 0.7368442416191101, -0.6863487958908081, -0.73680788278579...
func (p *Player) Move(loc *Location) { if loc.Id() != p.loc.Id() { locks := []lock.IdLocker{p, loc, p.loc} lock.All(locks) defer lock.UnlockAll(locks) p.loc.RemovePlayer(p) p.loc = loc loc.AddPlayer(p) } }
[ -0.5119314193725586, -0.8527407646179199, 0.8777956366539001, -0.06959664076566696, 0.4437609612941742, 0.4547598958015442, 0.8236047029495239, 0.3745790421962738, 0.7112991809844971, 0.7224828600883484, -0.5774362683296204, -0.2905592620372772, -0.7226850390434265, -0.8049861192703247, ...
func (p *Player) Location() *Location { return p.loc }
[ -0.4970260560512543, -1.3702139854431152, 0.30270034074783325, 0.2345820516347885, 0.03350617364048958, 0.42199912667274475, 1.853501558303833, -0.32482221722602844, 0.29358571767807007, -0.3436451852321625, 0.33353927731513977, 0.5188770294189453, 0.1662423461675644, -0.8561018109321594, ...
func (p *Player) exit(err error) { p.Lock() defer p.Unlock() if err != nil { log.Printf("EXIT: Removing user %v from world. Error: %v", p, err) } else { log.Printf("EXIT: Removing user %v from world.", p) } RemovePlayer(p) }
[ 0.32652097940444946, -0.01598873920738697, 0.4574749171733856, 0.588808536529541, -0.28205394744873047, 0.9290634393692017, 0.5810530781745911, 0.23932427167892456, 0.26945847272872925, 1.036167025566101, 0.21191591024398804, 0.375282883644104, -0.9120234251022339, 0.6594299674034119, 1....
func (p *Player) Gender() gender.Gender { return p.gender }
[ -0.7051420211791992, 0.02446407452225685, 0.3464965224266052, 1.058394432067871, 0.5687239170074463, 1.1025103330612183, -0.19902057945728302, -0.2591134011745453, -0.17497248947620392, -0.7654255628585815, -0.9561778903007507, 1.0991706848144531, -0.09053585678339005, 0.884470522403717, ...
func (p *Player) readLoop() { for p.Scan() { p.handleCmd(p.Text()) } err := p.Err() if err != nil { log.Printf("Error reading from user %v: %v", p.Name, err) } p.exit(err) }
[ -0.3111431896686554, -0.6903594732284546, 0.7843542695045471, 0.8740376234054565, -0.2585076093673706, 1.122164011001587, 0.3625689446926117, -0.7586021423339844, -0.3185844421386719, -0.3005819022655487, 1.0390948057174683, -0.24529871344566345, -0.2646825909614563, -0.16927653551101685, ...
func (p *Player) prompt() { // TODO: standard/custom prompts p.writer.Write([]byte(">")) }
[ -0.6189925670623779, -0.08850973099470139, 0.370074063539505, -0.05730956420302391, 0.7902154326438904, 0.5731278657913208, 0.8777278661727905, -0.17486748099327087, 0.39606600999832153, -0.6632339954376221, -0.2071543186903, 0.34671932458877563, 0.1767762154340744, -0.16818532347679138, ...
func (p *Player) timeout() { p.Writef("You have timed out... good bye!") p.exit(TimeoutError) }
[ 0.37677380442619324, -0.44450750946998596, 0.24886341392993927, 0.1452762633562088, 0.20509612560272217, 1.4050418138504028, 0.2661435306072235, 0.901249885559082, -0.1743859052658081, 1.3333038091659546, 0.17239820957183838, 0.9138177037239075, -0.3177759647369385, -0.39099422097206116, ...
func (p *Player) HandleCommand(cmd *Command) bool { // TODO: implement player commands switch cmd.Action() { case "quit": p.handleQuit() return true } return false }
[ -0.5222648978233337, -0.12056225538253784, 0.6864758729934692, 0.4140511155128479, 0.26961180567741394, 1.2313913106918335, 0.19450891017913818, -0.4328647255897522, 0.8892322182655334, -0.37158262729644775, -0.09324540197849274, -0.6805053949356079, -0.466251015663147, 0.41244539618492126...
func (p *Player) handleQuit() { answer, err := p.Query([]byte("Are you sure you want to quit? (y/n) ")) if err != nil { return } tokens := tokenize(answer) switch tokens[0] { case "y", "yes": RemovePlayer(p) default: p.prompt() } }
[ 0.009108618833124638, 0.22035689651966095, 0.5359451770782471, 0.2822348475456238, 0.3205788731575012, -0.012314635328948498, -0.2920348644256592, -0.5936610102653503, -0.008698678575456142, 0.022276271134614944, -0.2459070086479187, -0.2548937201499939, -0.6578996777534485, -0.34122020006...
func (p *Player) handleCmd(s string) { cmd := NewCommand(p, tokenize(s)) if !p.HandleCommand(cmd) { p.loc.HandleCommand(cmd) } p.prompt() }
[ 0.176825612783432, -0.7724179625511169, 0.6348064541816711, 0.21780234575271606, 0.13465218245983124, 0.4764901101589203, 0.22049959003925323, -0.02111365646123886, 0.642693817615509, -1.810640573501587, 0.4695379436016083, -0.6824178695678711, 0.10642057657241821, 0.06295380741357803, 0...
func tokenize(s string) []string { return strings.Split(strings.TrimSpace(s), " ") }
[ -0.4112054109573364, 0.36098697781562805, 0.33032938838005066, -0.015449244529008865, 0.2727862298488617, -1.1084694862365723, -0.8750386834144592, 0.6202995181083679, 0.7664489150047302, 0.13640034198760986, -1.0205949544906616, 1.065258502960205, -0.4134756624698639, -0.2290327399969101,...
func (p *Player) Query(q []byte) (answer string, err error) { p.Lock() defer p.Unlock() defer func() { if err != nil { p.exit(err) } }() return util.Query(p.rwc, q) }
[ -0.1596285104751587, -0.4941162168979645, 0.5642695426940918, -0.09749948233366013, -1.0506573915481567, 0.1576586663722992, -0.01814098283648491, -0.8715789914131165, 1.1737483739852905, 0.3234264850616455, 0.69871985912323, 0.04631230980157852, -1.3526461124420166, -0.10515342652797699, ...
func ToBytes(val interface{}) ([]byte, error) { switch val.(type) { case string: return []byte(val.(string)), nil case []byte: b := make([]byte, len(val.([]byte))) copy(b, val.([]byte)) return b, nil default: return json.Marshal(val) } }
[ -0.10424250364303589, 0.6015462875366211, 0.949340283870697, -0.43487462401390076, -0.15687470138072968, -0.9439226984977722, -0.8720448017120361, -1.2877686023712158, 0.9095609188079834, 0.39738425612449646, -0.7632091045379639, 1.1645386219024658, -0.05597537010908127, 0.5101215243339539...
func (w *watchQueue) Enqueue(key string, kvp *kvdb.KVPair, err error) { w.m.Lock() w.updates = append(w.updates, &watchUpdate{key: key, kvp: kvp, err: err}) w.cv.Signal() w.m.Unlock() }
[ 0.4758208990097046, -0.1236099973320961, 0.6127011179924011, 0.7429625988006592, -0.04795537516474724, 0.28439968824386597, -1.1725654602050781, 0.06339751183986664, -0.5412394404411316, 0.7735630869865417, 0.1646948754787445, 1.129150152206421, -0.8604409098625183, 0.44334882497787476, ...
func (e *ExpectedClose) String() string { msg := "ExpectedClose => expecting database Close" if e.err != nil { msg += fmt.Sprintf(", which should return error: %s", e.err) } return msg }
[ -0.3566240966320038, -0.41786718368530273, 0.48557668924331665, -0.21450568735599518, -0.3670802116394043, 0.7659340500831604, 0.3617118299007416, -0.3447817862033844, -0.012463065795600414, 0.6726257801055908, 1.1339167356491089, 0.5364149808883667, -0.9298213124275208, 0.3466547727584839...
func (e *ExpectedBegin) String() string { msg := "ExpectedBegin => expecting database transaction Begin" if e.err != nil { msg += fmt.Sprintf(", which should return error: %s", e.err) } return msg }
[ 0.3681306838989258, -0.15490396320819855, 0.4807521402835846, -0.4589908719062805, -0.6221919655799866, 0.4315181076526642, 0.5690028667449951, 0.11916843056678772, 0.20042037963867188, 1.1165568828582764, 0.7118518352508545, 1.019742488861084, -0.9230354428291321, 0.06994490325450897, 0...