text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func getLocations(c *gin.Context) {
//Reads minutes from querystring
var minutes string
minutes = c.DefaultQuery("minutes", "5")
min, err := strconv.ParseFloat(minutes, 64)
if err != nil {
//Sets the default values in case of erroneous input
min = DefaultMins
}
//Reads the distance flag from the querystring
... | [
-1.1959980726242065,
0.42807963490486145,
0.9374041557312012,
0.10898403823375702,
0.4651486575603485,
-0.304893434047699,
-0.29745641350746155,
-0.0722351148724556,
0.3891594111919403,
0.7823619842529297,
0.45445385575294495,
-0.3922063410282135,
-0.37773165106773376,
0.675163984298706,
... |
func persistMessageToRedis(message map[string]interface{}) error {
//Gets a connection from the Pool
if pool == nil {
//Pool not initialized (e.g. in tests). Create a new pool
pool = newPool(Config.Redis.Host)
}
conn := pool.Get()
defer conn.Close()
//Checks if there have been problems in connecting
if conn.... | [
-0.5741283893585205,
-0.272066205739975,
1.0295391082763672,
-0.6976000070571899,
0.8786754608154297,
0.5318362712860107,
-0.41893327236175537,
-0.2082034945487976,
-0.26044535636901855,
0.7445821166038513,
-0.1348894089460373,
-0.3434588313102722,
-1.0195890665054321,
0.6043181419372559,
... |
func handleMessage(m *nsq.Message) error {
//log.Printf("Message received: %+v", *m)
log.Printf("Message body: %v", string(m.Body))
//Extracts the timestamp in Unix format
timestamp := m.Timestamp / 1e9
//JSON is already validated by downstream service (Gateway). Unmarshal it in a generic map
var parsedMessage ma... | [
-0.14894990622997284,
1.1054081916809082,
0.9906467795372009,
-0.48328104615211487,
0.9951907992362976,
0.20640482008457184,
-0.42299941182136536,
-0.5651705265045166,
0.5135690569877625,
-0.14873605966567993,
0.4230971038341522,
-0.3380758464336395,
-0.6427304148674011,
0.9076694250106812... |
func poolNSQForMessages() {
cfg := nsq.NewConfig()
cfg.DialTimeout = 10 * time.Second
cfg.UserAgent = fmt.Sprintf("driver-location/%s go-nsq/%s", "0.1", nsq.VERSION)
cfg.MaxInFlight = Config.Nsq.MaxInflight
consumer, err := nsq.NewConsumer(Config.Nsq.Topic, Config.Nsq.ChannelName, cfg)
if err != nil {
log.Fatal... | [
-0.3322902321815491,
-0.09514547884464264,
0.5528462529182434,
-0.5224660038948059,
0.38594603538513184,
-0.17572173476219177,
0.11665188521146774,
-0.673119068145752,
-0.4466739594936371,
0.4128386378288269,
0.06973139941692352,
0.0742560401558876,
-0.22484150528907776,
0.9580754041671753... |
func setupRouter() *gin.Engine {
router := gin.Default()
router.GET("/drivers/:id/locations", getLocations)
return router
} | [
-0.7118059396743774,
-0.46841710805892944,
0.2781127393245697,
0.34883660078048706,
1.0834513902664185,
-0.45037731528282166,
0.066482312977314,
1.2265653610229492,
-0.13537469506263733,
-0.5487968921661377,
0.8760887980461121,
-0.8217736482620239,
0.09615977108478546,
0.9172471761703491,
... |
func routing() {
//Sets the routes
router := setupRouter()
//Starts the gateway
if Config.Port == 0 {
router.Run()
} else {
router.Run(":" + strconv.Itoa(Config.Port))
}
} | [
0.09677676856517792,
0.38822507858276367,
0.30427050590515137,
0.12399157136678696,
0.47941792011260986,
0.05418483540415764,
0.2687886953353882,
0.9117080569267273,
0.06941863149404526,
0.6086275577545166,
0.42026984691619873,
0.08459626138210297,
-0.40737637877464294,
0.9415422677993774,... |
func grow(s reflect.Value, extra int) (reflect.Value, int, int) {
i0 := s.Len()
i1 := i0 + extra
if i1 < i0 {
panic("reflect.Append: slice overflow")
}
m := s.Cap()
if i1 <= m {
return s.Slice(0, i1), i0, i1
}
if m == 0 {
m = extra
} else {
for m < i1 {
if i0 < 1024 {
m += m
} else {
m +=... | [
-0.4899975061416626,
0.23554176092147827,
0.6945281624794006,
-0.3775453269481659,
-0.945527195930481,
-0.30565983057022095,
0.2823030352592468,
-0.22103336453437805,
0.3049238920211792,
-0.3352176249027252,
-0.7317409515380859,
0.44730085134506226,
-0.16546429693698883,
-0.584811449050903... |
func calculateFuel(mass float64) float64{
return math.Floor(mass / 3) - 2
} | [
-0.21367110311985016,
0.3589266240596771,
0.33140310645103455,
0.5607754588127136,
-0.25136682391166687,
-0.17374341189861298,
-0.11420194059610367,
0.888609766960144,
-1.3956494331359863,
-0.6585691571235657,
-0.14753161370754242,
-0.6602325439453125,
-0.9299323558807373,
0.90658247470855... |
func filesDigest(fs afero.Fs, paths []string) []*PackageFilesDigest {
return mapPaths(fs, paths, pathToOperator)
} | [
-0.8629878759384155,
0.21109290421009064,
0.4133385121822357,
0.35777533054351807,
0.6150750517845154,
0.10933983325958252,
-0.2897123694419861,
0.34015676379203796,
-0.2321113497018814,
-0.5115757584571838,
0.590903103351593,
-0.975944459438324,
0.6906800270080566,
0.3932100534439087,
-... |
func mapPaths(fs afero.Fs, paths []string, f func(afero.Fs, string) (*PackageFilesDigest, error)) []*PackageFilesDigest {
ops := make([]*PackageFilesDigest, 0)
for _, path := range paths {
op, err := f(fs, path)
if err != nil {
fmt.Printf("WARNING: operator: %v is invalid", path)
continue
}
ops = append... | [
-0.8581308126449585,
0.608657717704773,
0.6582847833633423,
1.024728775024414,
-0.4709756076335907,
-0.16595253348350525,
-0.29121363162994385,
0.3473915457725525,
0.3609936237335205,
0.16330750286579132,
0.7840855121612549,
-1.5102306604385376,
0.6011300086975098,
-0.07248722016811371,
... |
func pathToOperator(fs afero.Fs, path string) (pfd *PackageFilesDigest, err error) {
fsreader, err := fs.Open(path)
if err != nil {
return nil, err
}
defer func() {
if ferr := fsreader.Close(); ferr != nil {
err = ferr
}
}()
digest, err := files.Sha256Sum(fsreader)
if err != nil {
return nil, err
}
... | [
-0.12720976769924164,
-0.44816842675209045,
0.5498607754707336,
-0.7709301710128784,
-0.7698684930801392,
-0.2496822327375412,
0.28587234020233154,
0.43897607922554016,
0.2244783490896225,
0.4348396360874176,
0.2690151631832123,
-1.3896962404251099,
-0.3995243012905121,
-0.6764756441116333... |
func (v *Equalizer) Err() error {
return v.Streamer.Err()
} | [
0.24365490674972534,
-0.09924818575382233,
0.03821377083659172,
0.09601389616727829,
-0.49148818850517273,
0.3108938932418823,
0.24114222824573517,
-0.07969366014003754,
-0.5083780884742737,
-0.48360756039619446,
0.7268998622894287,
0.4810042083263397,
-0.21874839067459106,
1.9966615438461... |
func NewFoundationDBClusterReconciler(podLifecycleManager podmanager.PodLifecycleManager) *FoundationDBClusterReconciler {
return &FoundationDBClusterReconciler{
PodLifecycleManager: podLifecycleManager,
PodClientProvider: newFdbPodClient,
}
} | [
0.18494217097759247,
-0.7792754173278809,
0.12230999022722244,
0.17895588278770447,
0.4980296492576599,
-0.2485969513654709,
0.24643225967884064,
0.06081961840391159,
-0.2649984359741211,
-0.702087938785553,
0.9688981771469116,
-0.7394256591796875,
-0.8836841583251953,
0.9204641580581665,
... |
func (r *FoundationDBClusterReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error) {
cluster := &fdbtypes.FoundationDBCluster{}
err := r.Get(ctx, request.NamespacedName, cluster)
if err != nil {
if k8serrors.IsNotFound(err) {
return ctrl.Result{}, nil
}
// Error reading the ... | [
-0.30809393525123596,
0.12377092987298965,
0.8927176594734192,
0.31642889976501465,
0.6919163465499878,
-0.3793356120586395,
-0.23234033584594727,
-0.01977337896823883,
-0.903374433517456,
-0.17759445309638977,
0.11668694764375687,
-0.035753943026065826,
-1.0742911100387573,
0.820626676082... |
func (r *FoundationDBClusterReconciler) SetupWithManager(mgr ctrl.Manager, maxConcurrentReconciles int, watchedObjects ...client.Object) error {
err := mgr.GetFieldIndexer().IndexField(ctx.Background(), &corev1.Pod{}, "metadata.name", func(o client.Object) []string {
return []string{o.(*corev1.Pod).Name}
})
if err... | [
-0.0356915146112442,
-0.17689752578735352,
0.6419616341590881,
-0.08438301086425781,
0.1367073506116867,
-0.7137788534164429,
0.6143844723701477,
-0.5534517765045166,
-0.6221122145652771,
-0.157554492354393,
0.593838095664978,
-0.1857261061668396,
-0.03153187409043312,
0.9351063966751099,
... |
func (r *FoundationDBClusterReconciler) getDatabaseClientProvider() DatabaseClientProvider {
if r.DatabaseClientProvider != nil {
return r.DatabaseClientProvider
}
panic("Cluster reconciler does not have a DatabaseClientProvider defined")
} | [
0.7769038677215576,
0.7934637665748596,
0.13184213638305664,
0.02361075021326542,
0.9062975645065308,
0.12980201840400696,
0.4162537455558777,
-0.27067822217941284,
-0.07922513037919998,
-0.07006228715181351,
-0.0605965182185173,
-0.31452468037605286,
-1.4586979150772095,
0.371214866638183... |
func (r *FoundationDBClusterReconciler) takeLock(cluster *fdbtypes.FoundationDBCluster, action string) (bool, error) {
log.Info("Taking lock on cluster", "namespace", cluster.Namespace, "cluster", cluster.Name, "action", action)
lockClient, err := r.getLockClient(cluster)
if err != nil {
return false, err
}
has... | [
-0.08807742595672607,
0.6313906311988831,
0.7215579748153687,
0.18139784038066864,
0.4147556722164154,
0.2159954160451889,
0.30330100655555725,
-0.05379582941532135,
0.09303172677755356,
0.3568757474422455,
0.09568208456039429,
0.13061051070690155,
-0.3625640273094177,
0.5365574359893799,
... |
func (r *FoundationDBClusterReconciler) clearPendingRemovalsFromSpec(context ctx.Context, cluster *fdbtypes.FoundationDBCluster) error {
modifiedCluster := cluster.DeepCopy()
modifiedCluster.Spec.PendingRemovals = nil
return r.Update(context, modifiedCluster)
} | [
0.6784677505493164,
-0.4110502600669861,
0.06772452592849731,
-0.6950256824493408,
0.633369505405426,
0.45775994658470154,
-0.054427169263362885,
0.05521756410598755,
-0.2878729999065399,
0.02519965171813965,
0.721542239189148,
0.07028158754110336,
0.1559411883354187,
0.7437795996665955,
... |
func sortLocalities(cluster *fdbtypes.FoundationDBCluster, processes []localityInfo) {
// Sort the processes for ID to ensure we have a stable input
sort.SliceStable(processes, func(i, j int) bool {
p1 := cluster.GetClassCandidatePriority(processes[i].Class)
p2 := cluster.GetClassCandidatePriority(processes[j].Cl... | [
-0.03180359676480293,
-1.03902268409729,
0.43243762850761414,
-0.7962710857391357,
0.09125108271837234,
0.32720330357551575,
-0.8881022930145264,
-0.13759100437164307,
-0.21749156713485718,
-0.40734410285949707,
0.37780123949050903,
0.6844742894172668,
-0.5246325731277466,
0.92891609668731... |
func localityInfoForProcess(process fdbtypes.FoundationDBStatusProcessInfo, mainContainerTLS bool) (localityInfo, error) {
addresses, err := fdbtypes.ParseProcessAddressesFromCmdline(process.CommandLine)
if err != nil {
return localityInfo{}, err
}
var addr fdbtypes.ProcessAddress
// Iterate the addresses and s... | [
0.9163790345191956,
-0.9844127297401428,
0.3924066126346588,
-1.2588530778884888,
-0.3511747717857361,
0.21813002228736877,
-0.3519572615623474,
0.32505977153778076,
0.05478450283408165,
-0.45232880115509033,
0.042648717761039734,
0.5482443571090698,
0.31191593408584595,
0.9903537034988403... |
func localityInfoFromSidecar(cluster *fdbtypes.FoundationDBCluster, client internal.FdbPodClient) (localityInfo, error) {
substitutions, err := client.GetVariableSubstitutions()
if err != nil {
return localityInfo{}, err
}
// This locality information is only used during the initial cluster file generation.
// ... | [
0.4882090091705322,
-0.6535065770149231,
0.33636119961738586,
-0.5978159308433533,
-0.34793195128440857,
-0.04279574006795883,
-0.029671579599380493,
-0.33121392130851746,
-0.881816565990448,
-0.6347452998161316,
-0.5828076601028442,
-0.16716258227825165,
-0.4651109278202057,
0.20377600193... |
func chooseDistributedProcesses(cluster *fdbtypes.FoundationDBCluster, processes []localityInfo, count int, constraint processSelectionConstraint) ([]localityInfo, error) {
chosen := make([]localityInfo, 0, count)
chosenIDs := make(map[string]bool, count)
fields := constraint.Fields
if len(fields) == 0 {
fields ... | [
0.4779347777366638,
-0.3694586157798767,
0.5309829711914062,
-0.7316299080848694,
-0.07502033561468124,
0.3596363663673401,
0.3222111165523529,
-0.0033546085469424725,
-0.08278217911720276,
-0.3937404453754425,
0.13069336116313934,
0.12287422269582748,
-0.3020123839378357,
0.37729662656784... |
func checkCoordinatorValidity(cluster *fdbtypes.FoundationDBCluster, status *fdbtypes.FoundationDBStatus, coordinatorStatus map[string]bool) (bool, bool, error) {
if len(coordinatorStatus) == 0 {
return false, false, errors.New("unable to get coordinator status")
}
curLog := log.WithValues("namespace", cluster.Na... | [
0.19758795201778412,
-1.1359362602233887,
0.7291310429573059,
-0.01090752612799406,
0.006143286358565092,
-0.014601049944758415,
0.10492797195911407,
0.7598409652709961,
-0.4494691491127014,
0.1680421531200409,
0.12057065218687057,
0.5179208517074585,
-0.7313183546066284,
0.676872670650482... |
func newFdbPodClient(cluster *fdbtypes.FoundationDBCluster, pod *corev1.Pod) (internal.FdbPodClient, error) {
return internal.NewFdbPodClient(cluster, pod)
} | [
-1.0213868618011475,
-0.15826275944709778,
0.1953645646572113,
0.4481361210346222,
-0.6228775978088379,
-0.21012933552265167,
0.1579262912273407,
-1.0598827600479126,
-0.7504940629005432,
-0.0503317192196846,
-0.761217474937439,
-0.13857422769069672,
-0.6050923466682434,
0.0049309646710753... |
func NewHTTPHandler(endpoints endpoint.Endpoints, options map[string][]kithttp.ServerOption) http.Handler {
m := mux.NewRouter()
m = m.PathPrefix("/v1/paymentsvc").Subrouter()
makeRechargeWalletHandler(m, endpoints, options["RechargeWallet"])
makeListTransactionsHandler(m, endpoints, options["ListTransactions"])
... | [
0.35276514291763306,
0.056825581938028336,
0.4452395737171173,
0.2463131695985794,
-0.0745626911520958,
0.18189637362957,
-0.6500545740127563,
-0.32407358288764954,
0.16664202511310577,
0.44470834732055664,
0.17413924634456635,
-0.672418475151062,
0.37888166308403015,
0.17435772716999054,
... |
func NewDiscoveryAdapter(factory DiscoveryFactory) CatalogFactory {
return &discoveryAdapterCatalogFactory{
DiscoveryFactory: factory,
}
} | [
-0.19964221119880676,
-0.7837115526199341,
0.11325661092996597,
0.9362583160400391,
-1.253735065460205,
-0.14533549547195435,
0.14145036041736603,
-0.004875050857663155,
0.6536760926246643,
-0.38862910866737366,
0.08808264881372452,
-0.2343943864107132,
1.2512177228927612,
0.59961211681365... |
func convertServiceInstances(instances []*api.ServiceInstance) []*ServiceInstance {
converted := make([]*ServiceInstance, len(instances))
for i, instance := range instances {
converted[i] = convertServiceInstance(instance)
}
return converted
} | [
-2.2925057411193848,
-0.6887273192405701,
0.2559422552585602,
-0.40462416410446167,
-0.5393921136856079,
0.6554813385009766,
-0.16345736384391785,
-0.12567171454429626,
0.059411320835351944,
0.7139337658882141,
-0.3650891184806824,
0.36759433150291443,
-0.9467477202415466,
1.12509596347808... |
func ExtractMetadataFromResponse(resp *http.Response) *Metadata {
if resp == nil {
return nil
}
meta := Metadata{
ContentType: resp.Header.Get("content-type"),
Etag: resp.Header.Get("etag"),
}
l, err := strconv.ParseInt(resp.Header.Get("content-length"), 10, 64)
if err == nil {
meta.Size = l
}
/... | [
0.18377789855003357,
-0.8778507113456726,
0.6199156641960144,
-0.12366783618927002,
-0.14766646921634674,
-0.41629907488822937,
-0.8743121027946472,
-0.10559139400720596,
0.3807010352611542,
0.25267213582992554,
-0.5325771570205688,
-0.41233816742897034,
0.261319637298584,
-0.4937605559825... |
func CalculateLength(path string) (int64, error) {
m, err := ExtractMetadataFromFile(path)
if err != nil {
return 0, err
}
return m.Duration, nil
} | [
0.023213306441903114,
0.33734673261642456,
0.5491779446601868,
0.17711618542671204,
-0.013308499939739704,
0.7514880299568176,
0.46988576650619507,
1.1157464981079102,
-0.32130298018455505,
1.2555426359176636,
-0.5152773261070251,
-0.34667524695396423,
-0.33626845479011536,
0.9085293412208... |
func FingerprintURI(parent, uri string) string {
return id.Checksum(parent + uri)
} | [
-0.09212858974933624,
0.11554335057735443,
0.36429235339164734,
0.5144814252853394,
-0.1726282238960266,
-0.04342750459909439,
-0.2064739465713501,
0.7370824217796326,
0.2598891854286194,
-0.20678594708442688,
0.06464724987745285,
-0.5194730758666992,
-1.3136128187179565,
-0.14861293137073... |
func FingerprintWithExt(parent, uri string) string {
id := id.Checksum(parent + uri)
parts := strings.Split(uri, ".")
if len(parts) == 0 {
return id
}
return fmt.Sprintf("%s/%s.%s", parent, id, parts[len(parts)-1])
} | [
0.6275741457939148,
0.13844338059425354,
0.7363527417182922,
0.5336992144584656,
-0.8712530136108398,
0.014017405919730663,
-0.5106540322303772,
-0.16360481083393097,
0.5730302333831787,
0.3841228485107422,
0.20606224238872528,
-0.5683364272117615,
-0.6953023672103882,
-0.32495611906051636... |
func LocalNamePart(uri string) string {
parts := strings.Split(uri, "/")
return parts[len(parts)-1:][0]
} | [
0.0804423987865448,
-0.6444512009620667,
0.36749476194381714,
-0.606929361820221,
-0.8210819959640503,
-0.09214099496603012,
-0.9138110876083374,
-0.46956807374954224,
-0.04317507892847061,
0.4550105035305023,
0.47275760769844055,
-0.40332531929016113,
-1.1151041984558105,
-0.5844922661781... |
func (mv *MultipleView) Close() {
mv.viewManager.removeAll()
gotoLifecycleStageDead(mv.root)
} | [
-0.44026321172714233,
-0.3864717185497284,
0.553729236125946,
0.27492934465408325,
-0.9867177605628967,
0.5574764013290405,
0.907590925693512,
0.31351524591445923,
0.29334086179733276,
-0.8474763035774231,
0.01277131401002407,
-0.012809854000806808,
0.14444124698638916,
1.7597436904907227,... |
func (mv *MultipleView) layout(t *theme.Theme) {
mv.root.Wrappee().Rect = mv.Rect
mv.root.Layout(t)
} | [
-0.15858624875545502,
-0.22084759175777435,
0.22991590201854706,
-0.2539072632789612,
-0.3972074091434479,
0.9999149441719055,
0.9260064959526062,
0.5277165770530701,
0.7207239270210266,
-0.8756299614906311,
0.09654112160205841,
-0.6169065833091736,
1.1162681579589844,
0.7345174551010132,
... |
func (mv *MultipleView) Print(s string) error {
mv.viewManager.currentView().Print(s)
return nil
} | [
0.3030577600002289,
-0.6382544636726379,
0.17670835554599762,
0.05536593124270439,
-0.7089700698852539,
0.3904655873775482,
0.17529986798763275,
0.16775304079055786,
0.20220325887203217,
-1.2475523948669434,
0.14207646250724792,
0.8117280602455139,
-0.3649759292602539,
0.8268422484397888,
... |
func walk(steps, face int, start point, xwards bool) {
for i := 0; i < steps; i++ {
if xwards {
start.x += face * 1
} else {
start.y += face * 1
}
p := point{x: start.x, y: start.y}
visited[p]++
if visited[p] > 1 && (twice == origo) { // only set twice if we haven't before
twice = p
}
}
} | [
-1.1512596607208252,
0.7764484882354736,
0.39078015089035034,
-0.06516183167695999,
0.07878855615854263,
0.017659224569797516,
1.0854344367980957,
-0.6682565212249756,
-0.5326383113861084,
-0.5073245167732239,
-0.7929355502128601,
-0.049336884170770645,
-0.004571503959596157,
0.59691488742... |
func newCoord(instruction string, xwards bool) {
steps, _ := strconv.Atoi(instruction[1:])
if xwards {
if string(instruction[0]) == "R" {
facing.x = facing.y
} else {
facing.x = -facing.y
}
walk(steps, facing.x, coord, xwards)
coord.x += facing.x * steps
} else {
if string(instruction[0]) == "R" {
... | [
-0.5731871128082275,
-0.03281416371464729,
0.4484094977378845,
-0.272899866104126,
-0.5017757415771484,
0.4223253130912781,
0.5195350646972656,
0.014258470386266708,
-0.40617308020591736,
0.15636517107486725,
-0.609021008014679,
-0.19754984974861145,
-0.28701719641685486,
0.522742211818695... |
func Run1(scanner *bufio.Scanner) string {
facing = point{x: 0, y: 1}
coord = point{x: 0, y: 0}
twice = point{x: 0, y: 0}
origo = point{x: 0, y: 0}
visited = make(map[point]int)
xwards := true // shouldn't be needed if we use n,s,e,w for facing
for scanner.Scan() {
line := scanner.Text()
instructions := str... | [
-1.0161688327789307,
-0.08245520293712616,
0.636585533618927,
0.34259864687919617,
-0.8845108151435852,
0.42372164130210876,
1.3983017206192017,
-0.35436564683914185,
-0.5378063321113586,
0.1763373166322708,
0.2693154215812683,
0.34043020009994507,
-0.6508184671401978,
0.3409450650215149,
... |
func (p *PdfiumImplementation) FPDF_SaveAsCopy(request *requests.FPDF_SaveAsCopy) (*responses.FPDF_SaveAsCopy, error) {
// These methods are basically the same. We switch between
// FPDF_SaveAsCopy and FPDF_SaveWithVersion in the implementation of FPDF_SaveWithVersion.
// Don't lock here, FPDF_SaveWithVersion does i... | [
-1.537309169769287,
-1.3341519832611084,
0.7397831082344055,
0.41721221804618835,
-0.413767546415329,
-0.9717710614204407,
0.5741218328475952,
-0.735503613948822,
-0.2566971480846405,
0.6674143075942993,
-0.3424537181854248,
-0.8755484819412231,
-0.20299769937992096,
-0.47129836678504944,
... |
func (p *PdfiumImplementation) FPDF_SaveWithVersion(request *requests.FPDF_SaveWithVersion) (*responses.FPDF_SaveWithVersion, error) {
p.Lock()
defer p.Unlock()
documentHandle, err := p.getDocumentHandle(request.Document)
if err != nil {
return nil, err
}
writer := C.FPDF_FILEWRITE{}
writer.version = 1
// ... | [
-1.0049386024475098,
-1.4384684562683105,
0.8669773936271667,
0.32573261857032776,
0.19567440450191498,
-0.7043817043304443,
0.6586955785751343,
-0.765984833240509,
-0.059998348355293274,
0.42042896151542664,
-0.36711767315864563,
-1.0568695068359375,
-0.7537813186645508,
-0.29614898562431... |
func (user *User) Retrieve() error {
var comments Comment
var question Question
var replies Reply
//for question
rows, err := db.Queryx("select id, content from questions where author = $1", user.Name)
if err != nil {
log.Fatalln("error getting question ", err)
}
for rows.Next() {
err := rows.Scan(&question... | [
0.5371680855751038,
-0.4300503730773926,
1.0048102140426636,
-0.6008681058883667,
0.5445705652236938,
0.08662328869104385,
0.36267051100730896,
-0.8795391917228699,
0.3808015286922455,
-0.44847699999809265,
-0.02707274630665779,
-0.30585139989852905,
-0.5054258108139038,
-0.144027829170227... |
func (question *Question) Create() {
db.QueryRow("insert into questions (author, content, user_id) values ($1, $2, $3) returning id", question.Author.Name, question.Content, question.UserID).Scan(&question.ID)
} | [
0.4743495285511017,
-0.18272341787815094,
0.18655888736248016,
0.7782045006752014,
0.4158598482608795,
0.8857828974723816,
-0.5967307686805725,
-0.640097439289093,
-1.18118417263031,
-0.2651992738246918,
-0.0670374408364296,
-1.1871932744979858,
-0.7384147644042969,
0.07782631367444992,
... |
func (t *TrackedTime) AfterLoad() {
t.Created = time.Unix(t.CreatedUnix, 0).In(setting.DefaultUILocation)
} | [
0.2729296088218689,
0.06442227214574814,
0.03641556575894356,
-0.764815628528595,
0.15730337798595428,
0.6889587044715881,
0.343781441450119,
-0.12503857910633087,
-0.7404439449310303,
-0.5976150631904602,
-0.8486160039901733,
-0.526945173740387,
0.400290846824646,
-0.25835472345352173,
... |
func (t *TrackedTime) LoadAttributes(ctx context.Context) (err error) {
// Load the issue
if t.Issue == nil {
t.Issue, err = GetIssueByID(ctx, t.IssueID)
if err != nil && !errors.Is(err, util.ErrNotExist) {
return err
}
}
// Now load the repo for the issue (which we may have just loaded)
if t.Issue != nil... | [
0.0029721695464104414,
0.443389356136322,
0.48250070214271545,
0.02455708757042885,
0.1267339289188385,
0.12281645834445953,
-0.7050663828849792,
0.33526596426963806,
0.18013304471969604,
0.28303349018096924,
0.03013870120048523,
-0.37753841280937195,
-0.7121015191078186,
0.464741587638855... |
func (tl TrackedTimeList) LoadAttributes(ctx context.Context) error {
for _, t := range tl {
if err := t.LoadAttributes(ctx); err != nil {
return err
}
}
return nil
} | [
-0.42544105648994446,
0.937526524066925,
0.18271693587303162,
0.12054713815450668,
0.1453641653060913,
0.5111205577850342,
0.02095864713191986,
0.25775259733200073,
0.03591418266296387,
0.6222141981124878,
-0.49522221088409424,
-0.7536900043487549,
-0.8365209698677063,
1.495350956916809,
... |
func (opts *FindTrackedTimesOptions) toCond() builder.Cond {
cond := builder.NewCond().And(builder.Eq{"tracked_time.deleted": false})
if opts.IssueID != 0 {
cond = cond.And(builder.Eq{"issue_id": opts.IssueID})
}
if opts.UserID != 0 {
cond = cond.And(builder.Eq{"user_id": opts.UserID})
}
if opts.RepositoryID ... | [
0.9826177358627319,
-0.21125270426273346,
0.5755141377449036,
-0.2669319808483124,
0.022586729377508163,
0.8513211607933044,
0.690911054611206,
0.18686145544052124,
-0.13101714849472046,
0.2200511395931244,
0.5235515832901001,
0.7502720952033997,
0.18629494309425354,
0.6334583759307861,
... |
func (opts *FindTrackedTimesOptions) toSession(e db.Engine) db.Engine {
sess := e
if opts.RepositoryID > 0 || opts.MilestoneID > 0 {
sess = e.Join("INNER", "issue", "issue.id = tracked_time.issue_id")
}
sess = sess.Where(opts.toCond())
if opts.Page != 0 {
sess = db.SetEnginePagination(sess, opts)
}
return... | [
-0.6090632677078247,
0.5969861745834351,
0.6828848123550415,
-0.28171980381011963,
0.43306636810302734,
-0.07222087681293488,
0.3295412063598633,
-0.8563334345817566,
0.9246974587440491,
1.0585784912109375,
0.4875488877296448,
-0.18884728848934174,
-0.1065693199634552,
0.15111708641052246,... |
func GetTrackedTimes(ctx context.Context, options *FindTrackedTimesOptions) (trackedTimes TrackedTimeList, err error) {
err = options.toSession(db.GetEngine(ctx)).Find(&trackedTimes)
return trackedTimes, err
} | [
-0.6801696419715881,
1.3725104331970215,
0.3512176275253296,
0.808007538318634,
0.3079431653022766,
0.1696971207857132,
0.4241749942302704,
-0.6923684477806091,
0.13785353302955627,
0.8057416081428528,
-0.7960634231567383,
0.1890326589345932,
-0.698945939540863,
0.781625509262085,
-0.759... |
func CountTrackedTimes(ctx context.Context, opts *FindTrackedTimesOptions) (int64, error) {
sess := db.GetEngine(ctx).Where(opts.toCond())
if opts.RepositoryID > 0 || opts.MilestoneID > 0 {
sess = sess.Join("INNER", "issue", "issue.id = tracked_time.issue_id")
}
return sess.Count(&TrackedTime{})
} | [
-0.12595096230506897,
0.8365882039070129,
0.5597852468490601,
0.3920897841453552,
-0.27206382155418396,
0.1596299558877945,
0.3272338807582855,
-0.12825489044189453,
-0.16406086087226868,
0.63564532995224,
-0.35004037618637085,
-0.1324336677789688,
-0.309868186712265,
0.8597638607025146,
... |
func GetTrackedSeconds(ctx context.Context, opts FindTrackedTimesOptions) (trackedSeconds int64, err error) {
return opts.toSession(db.GetEngine(ctx)).SumInt(&TrackedTime{}, "time")
} | [
-0.316210001707077,
0.9344319105148315,
0.6365942358970642,
0.615761935710907,
0.11068520694971085,
-0.101270891726017,
0.7100056409835815,
-0.9826952219009399,
0.004505988676100969,
-0.1908387541770935,
-0.6219770312309265,
-0.07748302072286606,
-0.506100058555603,
0.5672763586044312,
-... |
func AddTime(ctx context.Context, user *user_model.User, issue *Issue, amount int64, created time.Time) (*TrackedTime, error) {
ctx, committer, err := db.TxContext(ctx)
if err != nil {
return nil, err
}
defer committer.Close()
t, err := addTime(ctx, user, issue, amount, created)
if err != nil {
return nil, e... | [
0.28128722310066223,
0.23608967661857605,
0.9839298725128174,
0.18073305487632751,
-0.08998721837997437,
-0.031753554940223694,
-0.1999129205942154,
-0.8765300512313843,
-0.30553629994392395,
0.4504331648349762,
0.25298255681991577,
-0.9121648073196411,
-0.2004152536392212,
1.0951421260833... |
func TotalTimes(options *FindTrackedTimesOptions) (map[*user_model.User]int64, error) {
trackedTimes, err := GetTrackedTimes(db.DefaultContext, options)
if err != nil {
return nil, err
}
// Adding total time per user ID
totalTimesByUser := make(map[int64]int64)
for _, t := range trackedTimes {
totalTimesByUse... | [
-0.17413818836212158,
0.4911399781703949,
0.7830866575241089,
0.3332899212837219,
-0.39201754331588745,
0.21923787891864777,
0.6348174810409546,
-0.671094536781311,
-0.17591184377670288,
1.4048343896865845,
-0.5709108114242554,
-0.4126419425010681,
0.3020714521408081,
0.7663986086845398,
... |
func DeleteIssueUserTimes(issue *Issue, user *user_model.User) error {
ctx, committer, err := db.TxContext(db.DefaultContext)
if err != nil {
return err
}
defer committer.Close()
opts := FindTrackedTimesOptions{
IssueID: issue.ID,
UserID: user.ID,
}
removedTime, err := deleteTimes(ctx, opts)
if err != ... | [
0.14083534479141235,
0.5439954996109009,
0.6577848196029663,
-0.03332015499472618,
-0.5184414982795715,
-0.19203124940395355,
0.9713917374610901,
-0.35182589292526245,
-0.06668359786272049,
0.727398157119751,
-0.16041527688503265,
-0.5081955194473267,
0.3052194118499756,
0.918525755405426,... |
func DeleteTime(t *TrackedTime) error {
ctx, committer, err := db.TxContext(db.DefaultContext)
if err != nil {
return err
}
defer committer.Close()
if err := t.LoadAttributes(ctx); err != nil {
return err
}
if err := deleteTime(ctx, t); err != nil {
return err
}
if _, err := CreateComment(ctx, &Create... | [
0.07995433360338211,
-0.0367194302380085,
0.8748209476470947,
-0.3484041094779968,
0.25222936272621155,
0.13442692160606384,
0.4237845540046692,
-0.6846074461936951,
-0.38693004846572876,
0.4997340142726898,
0.25006574392318726,
-0.8269695043563843,
-0.18774928152561188,
1.294950246810913,... |
func GetTrackedTimeByID(id int64) (*TrackedTime, error) {
time := new(TrackedTime)
has, err := db.GetEngine(db.DefaultContext).ID(id).Get(time)
if err != nil {
return nil, err
} else if !has {
return nil, db.ErrNotExist{Resource: "tracked_time", ID: id}
}
return time, nil
} | [
-0.05088250711560249,
0.7424780130386353,
0.59139084815979,
0.3353275656700134,
0.10541021823883057,
-0.017429297789931297,
-0.11034438759088516,
-0.8995082974433899,
-0.20395304262638092,
1.231752872467041,
-1.2166938781738281,
-0.6831331849098206,
-0.7217196822166443,
1.139098882675171,
... |
func Zip() *Qux {
Foo()
Bar()
return &Qux{
AAA: "hello",
BBB: 777,
CCC: &Qux{AAA: "world"},
}
} | [
-0.936180055141449,
-0.8645013570785522,
0.26348942518234253,
-0.4881584048271179,
-0.5633596777915955,
0.1738368570804596,
-0.5024842023849487,
-0.8054794073104858,
0.7314223051071167,
-0.9304623007774353,
-0.6418415307998657,
0.4935672879219055,
0.308992475271225,
-0.3270312547683716,
... |
func RandString(n int) string {
letters := []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
length := len(letters)
b := make([]rune, n)
for i := range b {
b[i] = letters[rand.Intn(length)]
}
return string(b)
} | [
-0.7470136880874634,
0.7097142934799194,
0.1656416654586792,
-1.4157919883728027,
-0.10767877846956253,
0.694270133972168,
0.007873114198446274,
-1.1047440767288208,
0.4875534474849701,
0.4676993191242218,
-0.22187337279319763,
0.3231268525123596,
-0.6427708864212036,
-0.667165994644165,
... |
func RandID() string {
return fmt.Sprintf("%s-%s-%s-%s",
RandString(4),
RandString(2),
RandString(4),
RandString(4))
} | [
0.37858477234840393,
-0.33529898524284363,
0.5322563648223877,
-0.5655273795127869,
0.6364143490791321,
1.0394384860992432,
-0.7368141412734985,
-0.5096709728240967,
1.1294379234313965,
0.1738605797290802,
0.07376771420240402,
-0.026332831010222435,
-0.6778775453567505,
-0.3165373206138611... |
func Timestamp() int64 {
return time.Now().UnixNano() / int64(time.Millisecond)
} | [
0.7422332763671875,
1.0510092973709106,
0.5999206900596619,
0.49790361523628235,
-0.6995129585266113,
-0.1368957906961441,
0.3093098998069763,
0.25409218668937683,
0.06911396980285645,
0.10246745496988297,
0.22469092905521393,
-0.14799995720386505,
0.11994976550340652,
0.5454414486885071,
... |
func RandomPosition() mgl32.Vec3 {
return mgl32.Vec3{
rand.Float32(),
rand.Float32(),
0.0,
}
} | [
0.7502409219741821,
-0.09926862269639969,
0.5093721747398376,
-0.80753493309021,
-0.0633898675441742,
1.2961652278900146,
0.42289334535598755,
-0.3703799545764923,
0.9737903475761414,
-0.7773749828338623,
-0.11665112525224686,
-1.3313038349151611,
-0.594576895236969,
-0.2248256653547287,
... |
func RandomDirection() mgl32.Vec3 {
return mgl32.Vec3{
(rand.Float32() * 2) - 1,
(rand.Float32() * 2) - 1,
0.0,
}.Normalize()
} | [
0.4327237904071808,
-0.26944810152053833,
0.47289884090423584,
-0.05949312821030617,
0.0068580834195017815,
1.2920066118240356,
0.786609947681427,
-0.3944030702114105,
1.0208930969238281,
-1.328307867050171,
-0.0907140001654625,
0.10319038480520248,
-0.5285389423370361,
0.5280188918113708,... |
func (m *NetflowQoSReportTableRow) DataType() string {
return "qosReportTableRow"
} | [
1.6715549230575562,
1.0049060583114624,
-0.005237941164523363,
-0.3025892972946167,
0.6479450464248657,
-0.2297157198190689,
0.05603361502289772,
-0.26184552907943726,
1.0278096199035645,
-0.2970038056373596,
0.4423820674419403,
-0.7114432454109192,
0.10476657003164291,
0.7107717394828796,... |
func (m *NetflowQoSReportTableRow) SetDataType(val string) {
} | [
1.3267207145690918,
0.9700117111206055,
-0.02869049832224846,
-0.19864869117736816,
0.4157983064651489,
0.17380860447883606,
0.5890657901763916,
0.05764859914779663,
0.815914511680603,
-0.6464273929595947,
-0.31146830320358276,
-0.632070779800415,
-0.08274615556001663,
1.1622867584228516,
... |
func (m *NetflowQoSReportTableRow) UnmarshalJSON(raw []byte) error {
var data struct {
// received
// Read Only: true
Received float64 `json:"received,omitempty"`
// sent
// Read Only: true
Sent float64 `json:"sent,omitempty"`
// type
// Read Only: true
Type string `json:"type,omitempty"`
}
buf ... | [
-0.09338990598917007,
0.7808489799499512,
0.6049987077713013,
-1.3352197408676147,
-0.500199019908905,
-1.2923405170440674,
0.18121860921382904,
-0.8512426614761353,
-0.11633826047182083,
-0.3357349932193756,
-0.491728812456131,
0.020875580608844757,
0.19141031801700592,
0.6551784873008728... |
func (m NetflowQoSReportTableRow) MarshalJSON() ([]byte, error) {
var b1, b2, b3 []byte
var err error
b1, err = json.Marshal(struct {
// received
// Read Only: true
Received float64 `json:"received,omitempty"`
// sent
// Read Only: true
Sent float64 `json:"sent,omitempty"`
// type
// Read Only: tr... | [
0.6645358204841614,
0.5546778440475464,
0.16754674911499023,
-0.4398013949394226,
-0.025396404787898064,
-0.7134401202201843,
0.0662381500005722,
-0.8398313522338867,
0.13136322796344757,
0.00019331647490616888,
-0.11525487154722214,
0.12202828377485275,
0.09648747742176056,
0.985542714595... |
func (m *NetflowQoSReportTableRow) Validate(formats strfmt.Registry) error {
var res []error
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | [
0.7558397054672241,
0.8169485926628113,
-0.027700331062078476,
0.11097969114780426,
0.7094144821166992,
-0.7496634125709534,
0.36332830786705017,
-0.6293467283248901,
-0.4912119507789612,
-0.3710377514362335,
0.5380685925483704,
-0.8982300758361816,
-0.16840305924415588,
0.9315808415412903... |
func ServerOptions(options []http.ServerOption) http.ServerOption {
return func(server *http.Server) {
for _, option := range options {
option(server)
}
}
} | [
-0.9752992391586304,
-0.6225832104682922,
0.20947840809822083,
0.42426830530166626,
0.5152411460876465,
0.16885071992874146,
0.10229533910751343,
-0.4974744915962219,
0.32686495780944824,
0.5360062122344971,
-0.9998558759689331,
0.41998642683029175,
-0.5888588428497314,
0.971690833568573,
... |
func RunJSONSerializationTestForEventSubscription_STATUS_ARM(subject EventSubscription_STATUS_ARM) string {
// Serialize to JSON
bin, err := json.Marshal(subject)
if err != nil {
return err.Error()
}
// Deserialize back into memory
var actual EventSubscription_STATUS_ARM
err = json.Unmarshal(bin, &actual)
if... | [
0.12141437828540802,
-0.7230212092399597,
0.3858340382575989,
-0.7463096976280212,
-0.6168573498725891,
-0.05911566689610481,
0.0936196818947792,
-0.7451322078704834,
0.32916632294654846,
0.44505470991134644,
0.3001912534236908,
0.4214470386505127,
0.04039573669433594,
0.04698998108506203,... |
func EventSubscription_STATUS_ARMGenerator() gopter.Gen {
if eventSubscription_STATUS_ARMGenerator != nil {
return eventSubscription_STATUS_ARMGenerator
}
generators := make(map[string]gopter.Gen)
AddIndependentPropertyGeneratorsForEventSubscription_STATUS_ARM(generators)
eventSubscription_STATUS_ARMGenerator =... | [
0.5602601170539856,
-0.688134491443634,
0.31346431374549866,
0.21878305077552795,
-0.5643140077590942,
0.08559626340866089,
-0.5800974369049072,
0.5838281512260437,
0.04909699037671089,
0.05299298092722893,
0.14973528683185577,
0.19943799078464508,
0.4848892092704773,
0.3594772219657898,
... |
func AddIndependentPropertyGeneratorsForEventSubscription_STATUS_ARM(gens map[string]gopter.Gen) {
gens["Id"] = gen.PtrOf(gen.AlphaString())
gens["Name"] = gen.PtrOf(gen.AlphaString())
gens["Type"] = gen.PtrOf(gen.AlphaString())
} | [
-0.12192083150148392,
-0.5615828633308411,
0.4795784056186676,
-0.4684078097343445,
-0.5521382689476013,
0.32217326760292053,
-0.5209327340126038,
1.0137766599655151,
-0.821675181388855,
-0.0035804316867142916,
0.18235069513320923,
0.348093718290329,
0.12693282961845398,
0.5037991404533386... |
func AddRelatedPropertyGeneratorsForEventSubscription_STATUS_ARM(gens map[string]gopter.Gen) {
gens["Properties"] = gen.PtrOf(EventSubscriptionProperties_STATUS_ARMGenerator())
gens["SystemData"] = gen.PtrOf(SystemData_STATUS_ARMGenerator())
} | [
0.8370480537414551,
-0.3603047728538513,
0.19492962956428528,
0.005876317620277405,
-0.11528116464614868,
0.2702963948249817,
-0.33718347549438477,
0.15849506855010986,
-0.032179057598114014,
-0.2507140636444092,
0.31107062101364136,
0.20894932746887207,
0.26299506425857544,
0.821861982345... |
func RunJSONSerializationTestForEventSubscriptionProperties_STATUS_ARM(subject EventSubscriptionProperties_STATUS_ARM) string {
// Serialize to JSON
bin, err := json.Marshal(subject)
if err != nil {
return err.Error()
}
// Deserialize back into memory
var actual EventSubscriptionProperties_STATUS_ARM
err = js... | [
0.24661153554916382,
-0.8839486241340637,
0.30606865882873535,
-0.6986095905303955,
-0.7314572930335999,
0.22344473004341125,
-0.21427051723003387,
-0.3720203936100006,
-0.06405440717935562,
0.4333840608596802,
0.711338222026825,
0.5388831496238708,
-0.04139992222189903,
-0.191143780946731... |
func EventSubscriptionProperties_STATUS_ARMGenerator() gopter.Gen {
if eventSubscriptionProperties_STATUS_ARMGenerator != nil {
return eventSubscriptionProperties_STATUS_ARMGenerator
}
generators := make(map[string]gopter.Gen)
AddIndependentPropertyGeneratorsForEventSubscriptionProperties_STATUS_ARM(generators)
... | [
0.7056128978729248,
-1.0144293308258057,
0.3367961645126343,
0.11687634140253067,
-0.60201096534729,
0.39701059460639954,
-0.7711023092269897,
0.6913725137710571,
0.12221678346395493,
-0.03139878436923027,
0.36730194091796875,
0.06769147515296936,
0.3193003237247467,
-0.039688676595687866,... |
func AddIndependentPropertyGeneratorsForEventSubscriptionProperties_STATUS_ARM(gens map[string]gopter.Gen) {
gens["EventDeliverySchema"] = gen.PtrOf(gen.OneConstOf(EventSubscriptionProperties_EventDeliverySchema_STATUS_CloudEventSchemaV1_0, EventSubscriptionProperties_EventDeliverySchema_STATUS_CustomInputSchema, Even... | [
0.46084845066070557,
-0.7169157266616821,
0.7012823224067688,
-0.5693081617355347,
-0.39409276843070984,
0.5592515468597412,
-0.7338970899581909,
0.8289684057235718,
-0.3409867584705353,
0.009769590571522713,
0.2744065523147583,
0.37177783250808716,
0.3403509557247162,
0.44374698400497437,... |
func AddRelatedPropertyGeneratorsForEventSubscriptionProperties_STATUS_ARM(gens map[string]gopter.Gen) {
gens["DeadLetterDestination"] = gen.PtrOf(DeadLetterDestination_STATUS_ARMGenerator())
gens["Destination"] = gen.PtrOf(EventSubscriptionDestination_STATUS_ARMGenerator())
gens["Filter"] = gen.PtrOf(EventSubscript... | [
0.9070684909820557,
-0.4294453561306,
0.2992621064186096,
-0.20539501309394836,
-0.2718212902545929,
0.42679572105407715,
-0.26764413714408875,
0.05692223086953163,
0.18240055441856384,
-0.02213732898235321,
0.39485839009284973,
0.18749961256980896,
0.16890846192836761,
0.35846206545829773... |
func RunJSONSerializationTestForDeadLetterDestination_STATUS_ARM(subject DeadLetterDestination_STATUS_ARM) string {
// Serialize to JSON
bin, err := json.Marshal(subject)
if err != nil {
return err.Error()
}
// Deserialize back into memory
var actual DeadLetterDestination_STATUS_ARM
err = json.Unmarshal(bin, ... | [
-0.7751291394233704,
-0.5301571488380432,
0.3261854350566864,
-0.8271412253379822,
-0.7175478339195251,
0.467617928981781,
0.23567329347133636,
-0.8171785473823547,
0.4031464457511902,
0.6889054775238037,
0.06027449294924736,
0.36716288328170776,
0.14778152108192444,
-0.042949575930833817,... |
func DeadLetterDestination_STATUS_ARMGenerator() gopter.Gen {
if deadLetterDestination_STATUS_ARMGenerator != nil {
return deadLetterDestination_STATUS_ARMGenerator
}
generators := make(map[string]gopter.Gen)
AddRelatedPropertyGeneratorsForDeadLetterDestination_STATUS_ARM(generators)
// handle OneOf by choosin... | [
-1.0019828081130981,
0.015565847977995872,
0.36189913749694824,
-0.4325549602508545,
-0.766037106513977,
0.8932605981826782,
-0.1976083666086197,
0.6519762277603149,
-0.20207948982715607,
0.3035009801387787,
0.1487046480178833,
-0.3869684040546417,
0.6984859704971313,
0.2254485785961151,
... |
func AddRelatedPropertyGeneratorsForDeadLetterDestination_STATUS_ARM(gens map[string]gopter.Gen) {
gens["StorageBlob"] = StorageBlobDeadLetterDestination_STATUS_ARMGenerator().Map(func(it StorageBlobDeadLetterDestination_STATUS_ARM) *StorageBlobDeadLetterDestination_STATUS_ARM {
return &it
}) // generate one case f... | [
-0.2986214756965637,
-0.22663328051567078,
0.5064303874969482,
0.16002124547958374,
0.3537314236164093,
1.0576752424240112,
-0.02633713185787201,
0.06423655152320862,
-0.002004072302952409,
0.17838940024375916,
0.049844808876514435,
-0.25140589475631714,
0.3309178352355957,
0.2063795030117... |
func RunJSONSerializationTestForEventSubscriptionDestination_STATUS_ARM(subject EventSubscriptionDestination_STATUS_ARM) string {
// Serialize to JSON
bin, err := json.Marshal(subject)
if err != nil {
return err.Error()
}
// Deserialize back into memory
var actual EventSubscriptionDestination_STATUS_ARM
err =... | [
-0.1297939419746399,
-0.5181146860122681,
0.3071073889732361,
-0.8436258435249329,
-0.700779378414154,
0.21970656514167786,
-0.14593671262264252,
-0.4060036540031433,
0.21631155908107758,
0.39274561405181885,
0.4359648525714874,
0.5407027006149292,
0.5034820437431335,
-0.2287667989730835,
... |
func EventSubscriptionDestination_STATUS_ARMGenerator() gopter.Gen {
if eventSubscriptionDestination_STATUS_ARMGenerator != nil {
return eventSubscriptionDestination_STATUS_ARMGenerator
}
generators := make(map[string]gopter.Gen)
AddRelatedPropertyGeneratorsForEventSubscriptionDestination_STATUS_ARM(generators)
... | [
0.03986262157559395,
0.011853859759867191,
0.14900405704975128,
-0.154446080327034,
-0.720490038394928,
0.37048155069351196,
-0.7137138247489929,
0.8750948309898376,
-0.1654837429523468,
0.020173102617263794,
0.3030862808227539,
-0.01752808876335621,
1.0191645622253418,
-0.0836076587438583... |
func AddRelatedPropertyGeneratorsForEventSubscriptionDestination_STATUS_ARM(gens map[string]gopter.Gen) {
gens["AzureFunction"] = AzureFunctionEventSubscriptionDestination_STATUS_ARMGenerator().Map(func(it AzureFunctionEventSubscriptionDestination_STATUS_ARM) *AzureFunctionEventSubscriptionDestination_STATUS_ARM {
r... | [
0.49663010239601135,
-0.024803146719932556,
0.6493434906005859,
0.024742277339100838,
0.04255589842796326,
0.24955323338508606,
-0.21704554557800293,
0.05027315020561218,
0.3311334252357483,
-0.21362431347370148,
0.246328204870224,
-0.05698932707309723,
0.9242259860038757,
0.42535573244094... |
func RunJSONSerializationTestForEventSubscriptionFilter_STATUS_ARM(subject EventSubscriptionFilter_STATUS_ARM) string {
// Serialize to JSON
bin, err := json.Marshal(subject)
if err != nil {
return err.Error()
}
// Deserialize back into memory
var actual EventSubscriptionFilter_STATUS_ARM
err = json.Unmarshal... | [
-0.3730943500995636,
-0.45236510038375854,
0.29189059138298035,
-0.7663477659225464,
-0.6719378232955933,
-0.021771758794784546,
-0.02988552674651146,
-0.567885160446167,
0.06539023667573929,
0.5288494229316711,
0.2645343244075775,
0.865867555141449,
-0.03578271344304085,
0.036091983318328... |
func EventSubscriptionFilter_STATUS_ARMGenerator() gopter.Gen {
if eventSubscriptionFilter_STATUS_ARMGenerator != nil {
return eventSubscriptionFilter_STATUS_ARMGenerator
}
generators := make(map[string]gopter.Gen)
AddIndependentPropertyGeneratorsForEventSubscriptionFilter_STATUS_ARM(generators)
eventSubscripti... | [
0.12153637409210205,
-0.41353654861450195,
0.24441976845264435,
0.2089582234621048,
-0.6637892723083496,
0.03040369786322117,
-0.6988754272460938,
0.4405294358730316,
-0.11965473741292953,
0.06730609387159348,
0.10269526392221451,
0.5246673226356506,
0.2841520607471466,
0.38371261954307556... |
func AddIndependentPropertyGeneratorsForEventSubscriptionFilter_STATUS_ARM(gens map[string]gopter.Gen) {
gens["IncludedEventTypes"] = gen.SliceOf(gen.AlphaString())
gens["IsSubjectCaseSensitive"] = gen.PtrOf(gen.Bool())
gens["SubjectBeginsWith"] = gen.PtrOf(gen.AlphaString())
gens["SubjectEndsWith"] = gen.PtrOf(gen... | [
-0.32174837589263916,
-0.17165981233119965,
0.5442999005317688,
-0.43793293833732605,
-0.9253077507019043,
0.22016318142414093,
-0.38805076479911804,
0.8471160531044006,
-0.6752955913543701,
0.07611184567213058,
0.26128441095352173,
0.8099827766418457,
-0.2373073399066925,
0.57973909378051... |
func AddRelatedPropertyGeneratorsForEventSubscriptionFilter_STATUS_ARM(gens map[string]gopter.Gen) {
gens["AdvancedFilters"] = gen.SliceOf(AdvancedFilter_STATUS_ARMGenerator())
} | [
0.34933772683143616,
-0.21149300038814545,
0.134144127368927,
0.14178058505058289,
-0.4135173261165619,
0.00777658773586154,
-0.5943387150764465,
0.04888816177845001,
0.11225403845310211,
0.003931351471692324,
0.5823893547058105,
0.5516722202301025,
0.2928410470485687,
0.8408077955245972,
... |
func RunJSONSerializationTestForRetryPolicy_STATUS_ARM(subject RetryPolicy_STATUS_ARM) string {
// Serialize to JSON
bin, err := json.Marshal(subject)
if err != nil {
return err.Error()
}
// Deserialize back into memory
var actual RetryPolicy_STATUS_ARM
err = json.Unmarshal(bin, &actual)
if err != nil {
re... | [
0.48724886775016785,
-1.197309970855713,
0.23754581809043884,
-0.8796762228012085,
-0.20890194177627563,
0.8034065961837769,
0.11615090072154999,
-0.46589338779449463,
0.4498613774776459,
0.48819711804389954,
-0.24423205852508545,
0.4800769090652466,
-0.6186041831970215,
-0.343589127063751... |
func RetryPolicy_STATUS_ARMGenerator() gopter.Gen {
if retryPolicy_STATUS_ARMGenerator != nil {
return retryPolicy_STATUS_ARMGenerator
}
generators := make(map[string]gopter.Gen)
AddIndependentPropertyGeneratorsForRetryPolicy_STATUS_ARM(generators)
retryPolicy_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(Ret... | [
0.5680912137031555,
-0.6067266464233398,
0.14243368804454803,
0.34613677859306335,
-0.128398135304451,
1.5239858627319336,
-0.5319485068321228,
0.6620477437973022,
0.11972419172525406,
0.06594713032245636,
-0.35641273856163025,
0.2468690723180771,
-0.46878939867019653,
-0.31117844581604004... |
func AddIndependentPropertyGeneratorsForRetryPolicy_STATUS_ARM(gens map[string]gopter.Gen) {
gens["EventTimeToLiveInMinutes"] = gen.PtrOf(gen.Int())
gens["MaxDeliveryAttempts"] = gen.PtrOf(gen.Int())
} | [
0.38013437390327454,
-1.0585383176803589,
0.44092193245887756,
-0.5139205455780029,
-0.10406802594661713,
1.1625343561172485,
-0.0874662771821022,
1.419643521308899,
-0.5699453949928284,
0.06284501403570175,
-0.524583637714386,
-0.29934224486351013,
-0.42366817593574524,
0.2233826816082000... |
func RunJSONSerializationTestForAdvancedFilter_STATUS_ARM(subject AdvancedFilter_STATUS_ARM) string {
// Serialize to JSON
bin, err := json.Marshal(subject)
if err != nil {
return err.Error()
}
// Deserialize back into memory
var actual AdvancedFilter_STATUS_ARM
err = json.Unmarshal(bin, &actual)
if err != n... | [
-0.5455666184425354,
-0.8040438890457153,
0.37681302428245544,
-1.1170010566711426,
-0.6833857893943787,
0.10917528718709946,
0.07694283127784729,
-0.9552643895149231,
0.23886454105377197,
0.6111143827438354,
0.14720502495765686,
0.586054265499115,
-0.22574584186077118,
0.4616120457649231,... |
func AdvancedFilter_STATUS_ARMGenerator() gopter.Gen {
if advancedFilter_STATUS_ARMGenerator != nil {
return advancedFilter_STATUS_ARMGenerator
}
generators := make(map[string]gopter.Gen)
AddRelatedPropertyGeneratorsForAdvancedFilter_STATUS_ARM(generators)
// handle OneOf by choosing only one field to instanti... | [
-0.46134957671165466,
-0.22698324918746948,
0.23509027063846588,
-0.3458549678325653,
-0.6639519929885864,
0.25117984414100647,
-0.5387510061264038,
0.4401955008506775,
-0.3904886841773987,
-0.09125414490699768,
0.4454748332500458,
-0.09104409068822861,
0.06606001406908035,
0.9300720095634... |
func AddRelatedPropertyGeneratorsForAdvancedFilter_STATUS_ARM(gens map[string]gopter.Gen) {
gens["BoolEquals"] = BoolEqualsAdvancedFilter_STATUS_ARMGenerator().Map(func(it BoolEqualsAdvancedFilter_STATUS_ARM) *BoolEqualsAdvancedFilter_STATUS_ARM {
return &it
}) // generate one case for OneOf type
gens["NumberGreat... | [
-0.2431977391242981,
-0.8279505372047424,
0.5708107948303223,
-0.5149410963058472,
-0.1532311886548996,
0.2684422731399536,
0.3423231840133667,
-0.5761659741401672,
0.2280653566122055,
-0.10104580968618393,
0.004544567782431841,
0.04678234085440636,
-0.0643000602722168,
0.8893998861312866,... |
func RunJSONSerializationTestForAzureFunctionEventSubscriptionDestination_STATUS_ARM(subject AzureFunctionEventSubscriptionDestination_STATUS_ARM) string {
// Serialize to JSON
bin, err := json.Marshal(subject)
if err != nil {
return err.Error()
}
// Deserialize back into memory
var actual AzureFunctionEventSu... | [
-0.17589029669761658,
-0.23375986516475677,
0.3113427758216858,
-0.6460813283920288,
-0.5614466071128845,
0.23597726225852966,
-0.26857197284698486,
-0.2953850030899048,
-0.030008452013134956,
0.41648605465888977,
0.5701912045478821,
0.6160501837730408,
0.3673340380191803,
-0.2562258839607... |
func AzureFunctionEventSubscriptionDestination_STATUS_ARMGenerator() gopter.Gen {
if azureFunctionEventSubscriptionDestination_STATUS_ARMGenerator != nil {
return azureFunctionEventSubscriptionDestination_STATUS_ARMGenerator
}
generators := make(map[string]gopter.Gen)
AddIndependentPropertyGeneratorsForAzureFunc... | [
0.07207495719194412,
-0.24256570637226105,
0.3647861182689667,
-0.10359544306993484,
-0.5927505493164062,
0.24954542517662048,
-0.6827146410942078,
0.721320390701294,
-0.05456620454788208,
0.05338231846690178,
0.24741388857364655,
0.2920161187648773,
1.0363008975982666,
-0.1277581602334976... |
func AddIndependentPropertyGeneratorsForAzureFunctionEventSubscriptionDestination_STATUS_ARM(gens map[string]gopter.Gen) {
gens["EndpointType"] = gen.OneConstOf(AzureFunctionEventSubscriptionDestination_EndpointType_STATUS_AzureFunction)
} | [
-0.2376088947057724,
0.2318904846906662,
0.5033875703811646,
0.23817825317382812,
-0.20005463063716888,
0.8361847400665283,
-0.657450258731842,
1.2759469747543335,
-0.6358199715614319,
0.2377217710018158,
0.6276406645774841,
0.526755690574646,
1.023288607597351,
-0.12244217842817307,
0.5... |
func AddRelatedPropertyGeneratorsForAzureFunctionEventSubscriptionDestination_STATUS_ARM(gens map[string]gopter.Gen) {
gens["Properties"] = gen.PtrOf(AzureFunctionEventSubscriptionDestinationProperties_STATUS_ARMGenerator())
} | [
0.6534848809242249,
0.3002702593803406,
0.2624688148498535,
0.03590688481926918,
-0.23578748106956482,
0.5931102633476257,
-0.4226565957069397,
0.8025124669075012,
-0.037733711302280426,
0.08279156684875488,
0.6952989101409912,
0.49177777767181396,
1.0962414741516113,
-0.02839849703013897,... |
func RunJSONSerializationTestForEventHubEventSubscriptionDestination_STATUS_ARM(subject EventHubEventSubscriptionDestination_STATUS_ARM) string {
// Serialize to JSON
bin, err := json.Marshal(subject)
if err != nil {
return err.Error()
}
// Deserialize back into memory
var actual EventHubEventSubscriptionDesti... | [
0.2374943643808365,
-0.4890831410884857,
0.30190610885620117,
-0.6864647269248962,
-0.42438721656799316,
0.26021385192871094,
-0.25877586007118225,
0.09396348148584366,
0.2944912314414978,
0.30545860528945923,
0.24530601501464844,
0.6019341945648193,
0.37563300132751465,
0.0625500977039337... |
func EventHubEventSubscriptionDestination_STATUS_ARMGenerator() gopter.Gen {
if eventHubEventSubscriptionDestination_STATUS_ARMGenerator != nil {
return eventHubEventSubscriptionDestination_STATUS_ARMGenerator
}
generators := make(map[string]gopter.Gen)
AddIndependentPropertyGeneratorsForEventHubEventSubscriptio... | [
0.5603006482124329,
-0.3032146990299225,
0.4766489863395691,
-0.019361596554517746,
-0.32947227358818054,
0.40502357482910156,
-0.5899893641471863,
1.2346183061599731,
0.31492167711257935,
0.10584152489900589,
-0.20947793126106262,
0.3006505072116852,
1.0737828016281128,
0.4398673474788666... |
func AddIndependentPropertyGeneratorsForEventHubEventSubscriptionDestination_STATUS_ARM(gens map[string]gopter.Gen) {
gens["EndpointType"] = gen.OneConstOf(EventHubEventSubscriptionDestination_EndpointType_STATUS_EventHub)
} | [
-0.028960274532437325,
-0.14722080528736115,
0.5716344118118286,
0.07121886312961578,
-0.0023258186411112547,
1.0394980907440186,
-0.8125682473182678,
1.6244347095489502,
-0.15094736218452454,
0.2554999887943268,
0.09050243347883224,
0.11824728548526764,
0.853518545627594,
0.51341176033020... |
func AddRelatedPropertyGeneratorsForEventHubEventSubscriptionDestination_STATUS_ARM(gens map[string]gopter.Gen) {
gens["Properties"] = gen.PtrOf(EventHubEventSubscriptionDestinationProperties_STATUS_ARMGenerator())
} | [
0.7900943756103516,
-0.07664260268211365,
0.3691619038581848,
-0.10824181139469147,
-0.0406150184571743,
0.6953523755073547,
-0.5602965950965881,
1.0958541631698608,
0.35364317893981934,
-0.06244469806551933,
0.20478451251983643,
0.10705619305372238,
1.0612478256225586,
0.506108820438385,
... |
func RunJSONSerializationTestForHybridConnectionEventSubscriptionDestination_STATUS_ARM(subject HybridConnectionEventSubscriptionDestination_STATUS_ARM) string {
// Serialize to JSON
bin, err := json.Marshal(subject)
if err != nil {
return err.Error()
}
// Deserialize back into memory
var actual HybridConnecti... | [
-0.06918087601661682,
-0.7286778688430786,
0.3268667459487915,
-0.5983000993728638,
-0.04923378303647041,
0.3695441484451294,
-0.07057315111160278,
-0.18121682107448578,
-0.11867907643318176,
-0.00948234274983406,
-0.014959587715566158,
0.6899960041046143,
0.004066456574946642,
-0.21758848... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.