_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c10100
train
// CompareAndSet atomically sets the value to the given updated value if the current value == expected value. // Returns true if the expectation was met
{ "resource": "" }
c10101
train
// DecrementAndGet atomically decrements current value by one and returns the result.
{ "resource": "" }
c10102
train
// Get atomically retrieves the current value.
{ "resource": "" }
c10103
train
// GetAndAdd atomically adds the given delta to the current value and returns the result.
{ "resource": "" }
c10104
train
// GetAndDecrement atomically decrements the current value by one and returns the result.
{ "resource": "" }
c10105
train
// GetAndSet atomically sets current value to the given value and returns the old value.
{ "resource": "" }
c10106
train
// IncrementAndGet atomically increments current value by one and returns the result.
{ "resource": "" }
c10107
train
// Set atomically sets current value to the given value.
{ "resource": "" }
c10108
train
// NewEqualFilter creates a new equality filter instance for query.
{ "resource": "" }
c10109
train
// NewRangeFilter creates a range filter for query. // Range arguments must be int64 values. // String ranges are not supported.
{ "resource": "" }
c10110
train
// NewContainsFilter creates a contains filter for query on collection index.
{ "resource": "" }
c10111
train
// NewContainsRangeFilter creates a contains filter for query on ranges of data in a collection index.
{ "resource": "" }
c10112
train
// NewGeoWithinRegionFilter creates a geospatial "within region" filter for query. // Argument must be a valid GeoJSON region.
{ "resource": "" }
c10113
train
// NewGeoWithinRegionForCollectionFilter creates a geospatial "within region" filter for query on collection index. // Argument must be a valid GeoJSON region.
{ "resource": "" }
c10114
train
// NewGeoRegionsContainingPointFilter creates a geospatial "containing point" filter for query. // Argument must be a valid GeoJSON point.
{ "resource": "" }
c10115
train
// NewGeoRegionsContainingPointForCollectionFilter creates a geospatial "containing point" filter for query on collection index. // Argument must be a valid GeoJSON point.
{ "resource": "" }
c10116
train
// Create a filter for query. // Range arguments must be longs or integers which can be cast to longs. // String ranges are not supported.
{ "resource": "" }
c10117
train
// On batch operations the key values are not returned from the server // So we reuse the Key on the batch Object
{ "resource": "" }
c10118
train
// Parses the given byte buffer and populate the result object. // Returns the number of bytes that were parsed from the given buffer.
{ "resource": "" }
c10119
train
/** * Write and twice read an expiration record. */
{ "resource": "" }
c10120
train
// Wait for asynchronous task to complete using default sleep interval.
{ "resource": "" }
c10121
train
// NewTransaction starts a new transaction. The resulting transaction object // can be mutated without incurring changes to the underlying Datastore until // the transaction is Committed.
{ "resource": "" }
c10122
train
// newImplicitTransaction creates a transaction marked as 'implicit'. // Implicit transactions are created by Datastore methods performing single operations.
{ "resource": "" }
c10123
train
// DiskUsage implements the PersistentDatastore interface. // It returns the sum of lsm and value log files sizes in bytes.
{ "resource": "" }
c10124
train
// Alias to commit
{ "resource": "" }
c10125
train
// update modifies the priority of an item and updates the heap accordingly
{ "resource": "" }
c10126
train
// get the priority of the heap's top item.
{ "resource": "" }
c10127
train
// Creates a closure function that is used as an http handler for browsers to // subscribe to events via longpolling. // Notice how we're wrapping LongpollManager.SubscriptionHandler in order to // add our own logic and validation.
{ "resource": "" }
c10128
train
// QueueEvent adds a new longpoll Event to the front of our buffer and removes // the oldest event from the back of the buffer if we're already at maximum // capacity.
{ "resource": "" }
c10129
train
// get web handler that has closure around sub chanel and clientTimeout channnel
{ "resource": "" }
c10130
train
// This should be fired off in its own goroutine
{ "resource": "" }
c10131
train
// Start the polling of the events on the URL defined in the client // Will send the events in the EventsChan of the client
{ "resource": "" }
c10132
train
// Call the longpoll server to get the events since a specific timestamp
{ "resource": "" }
c10133
train
// NewGenerator creates a new Generator from the specified configuration. If no // input is given, all the default values are used. This function is safe for // concurrent use.
{ "resource": "" }
c10134
train
// Generate generates a password with the given requirements. length is the // total number of characters in the password. numDigits is the number of digits // to include in the result. numSymbols is the number of symbols to include in // the result. noUpper excludes uppercase letters from the results. allowRepeat // a...
{ "resource": "" }
c10135
train
// MustGenerate is the same as Generate, but panics on error.
{ "resource": "" }
c10136
train
// Generate is the package shortcut for Generator.Generate.
{ "resource": "" }
c10137
train
// randomInsert randomly inserts the given value into the given string.
{ "resource": "" }
c10138
train
// randomElement extracts a random element from the given string.
{ "resource": "" }
c10139
train
// kick off a server for exposing scan metrics
{ "resource": "" }
c10140
train
// ShouldRetry implements custom logic for when a checkpont should retry
{ "resource": "" }
c10141
train
// start is a blocking operation which will loop and attempt to find new // shards on a regular cadence.
{ "resource": "" }
c10142
train
// findNewShards pulls the list of shards from the Kinesis API // and uses a local cache to determine if we are already processing // a particular shard.
{ "resource": "" }
c10143
train
// listShards pulls a list of shard IDs from the kinesis api
{ "resource": "" }
c10144
train
// WithMaxInterval sets the flush interval
{ "resource": "" }
c10145
train
// WithDynamoClient sets the dynamoDb client
{ "resource": "" }
c10146
train
// New returns a checkpoint that uses DynamoDB for underlying storage
{ "resource": "" }
c10147
train
// WithClient overrides the default client
{ "resource": "" }
c10148
train
// New creates a kinesis consumer with default settings. Use Option to override // any of the optional attributes.
{ "resource": "" }
c10149
train
// Scan launches a goroutine to process each of the shards in the stream. The ScanFunc // is passed through to each of the goroutines and called with each message pulled from // the stream.
{ "resource": "" }
c10150
train
// ScanShard loops over records on a specific shard, calls the callback func // for each record and checkpoints the progress of scan.
{ "resource": "" }
c10151
train
// New returns a checkpoint that uses Redis for underlying storage
{ "resource": "" }
c10152
train
// Get fetches the checkpoint for a particular Shard.
{ "resource": "" }
c10153
train
// key generates a unique Redis key for storage of Checkpoint.
{ "resource": "" }
c10154
train
// New returns a checkpoint that uses PostgresDB for underlying storage // Using connectionStr turn it more flexible to use specific db configs
{ "resource": "" }
c10155
train
// Shutdown the checkpoint. Save any in-flight data.
{ "resource": "" }
c10156
train
// NewNonTS creates and initializes a new non-threadsafe Set.
{ "resource": "" }
c10157
train
// IsEqual test whether s and t are the same in size and have the same items.
{ "resource": "" }
c10158
train
// String returns a string representation of s
{ "resource": "" }
c10159
train
// Intersection returns a new set which contains items that only exist in all given sets.
{ "resource": "" }
c10160
train
// SymmetricDifference returns a new set which s is the difference of items which are in // one of either, but not in both.
{ "resource": "" }
c10161
train
// StringSlice is a helper function that returns a slice of strings of s. If // the set contains mixed types of items only items of type string are returned.
{ "resource": "" }
c10162
train
// IntSlice is a helper function that returns a slice of ints of s. If // the set contains mixed types of items only items of type int are returned.
{ "resource": "" }
c10163
train
// RequestTeamInfo is a function that returns team information for a // given token.
{ "resource": "" }
c10164
train
// GroupCheck is an authorization function that checks, if the Token // was issued for an employee of a specified team. The given // TokenContainer must be valid. As side effect it sets "uid" and // "team" in the gin.Context to the "official" team.
{ "resource": "" }
c10165
train
// ScopeCheck does an OR check of scopes given from token of the // request to all provided scopes. If one of provided scopes is in the // Scopes of the token it grants access to the resource.
{ "resource": "" }
c10166
train
// // TokenContainer // // Validates that the AccessToken within TokenContainer is not expired and not empty.
{ "resource": "" }
c10167
train
// Setup the authorization path
{ "resource": "" }
c10168
train
// Create returns a file system that prefixes all paths and forwards to root.
{ "resource": "" }
c10169
train
// PrefixPath returns path with the prefix prefixed.
{ "resource": "" }
c10170
train
// OpenFile implements vfs.Filesystem.
{ "resource": "" }
c10171
train
// Remove implements vfs.Filesystem.
{ "resource": "" }
c10172
train
// Rename implements vfs.Filesystem.
{ "resource": "" }
c10173
train
// Mkdir implements vfs.Filesystem.
{ "resource": "" }
c10174
train
// Stat implements vfs.Filesystem.
{ "resource": "" }
c10175
train
// ReadDir implements vfs.Filesystem.
{ "resource": "" }
c10176
train
// NewMemFile creates a Buffer which byte slice is safe from concurrent access, // the file itself is not thread-safe. // // This means multiple files can work safely on the same byte slice, // but multiple go routines working on the same file may corrupt the internal pointer structure.
{ "resource": "" }
c10177
train
// Truncate changes the size of the file
{ "resource": "" }
c10178
train
// ReadFile reads the file named by filename and returns the contents. A // successful call returns err == nil, not err == EOF. Because ReadFile reads // the whole file, it does not treat an EOF from Read as an error to be // reported. // // This is a port of the stdlib ioutil.ReadFile function.
{ "resource": "" }
c10179
train
// Mkdir is disabled and returns ErrorReadOnly
{ "resource": "" }
c10180
train
// Create a new MemFS filesystem which entirely resides in memory
{ "resource": "" }
c10181
train
// Mkdir creates a new directory with given permissions
{ "resource": "" }
c10182
train
// Write is disabled and returns ErrorReadOnly
{ "resource": "" }
c10183
train
// Read is disabled and returns ErrorWroteOnly
{ "resource": "" }
c10184
train
// makeSlice allocates a slice of size n. If the allocation fails, it panics // with ErrTooLarge.
{ "resource": "" }
c10185
train
// OpenFile returns dummy error
{ "resource": "" }
c10186
train
// Mkdir returns dummy error
{ "resource": "" }
c10187
train
// Stat returns dummy error
{ "resource": "" }
c10188
train
// ReadDir returns dummy error
{ "resource": "" }
c10189
train
// Write returns dummy error
{ "resource": "" }
c10190
train
// ReadAt returns dummy error
{ "resource": "" }
c10191
train
// Seek returns dummy error
{ "resource": "" }
c10192
train
// OpenFile wraps os.OpenFile
{ "resource": "" }
c10193
train
// Mkdir wraps os.Mkdir
{ "resource": "" }
c10194
train
// Rename wraps os.Rename
{ "resource": "" }
c10195
train
// ReadDir wraps ioutil.ReadDir
{ "resource": "" }
c10196
train
// Create a new MountFS based on a root filesystem.
{ "resource": "" }
c10197
train
// findMount finds a valid mountpoint for the given path. // It returns the corresponding filesystem and the path inside of this filesystem.
{ "resource": "" }
c10198
train
// Remove removes a file or directory
{ "resource": "" }
c10199
train
// Rename renames a file. // Renames across filesystems are not allowed.
{ "resource": "" }