_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c31400
train
// values returns a url.Values representation of StickerConfig.
{ "resource": "" }
c31401
train
// values returns a url.Values representation of VideoConfig.
{ "resource": "" }
c31402
train
// values returns a url.Values representation of VideoNoteConfig.
{ "resource": "" }
c31403
train
// values returns a url.Values representation of LocationConfig.
{ "resource": "" }
c31404
train
// values returns a url.Values representation of ChatActionConfig.
{ "resource": "" }
c31405
train
// SetLogger specifies the logger that the package should use.
{ "resource": "" }
c31406
train
// compares 'back_buffer' with 'front_buffer' and prepares all changes in the form of // 'diff_msg's in the 'diff_buf'
{ "resource": "" }
c31407
train
// Changes cell's parameters in the internal back buffer at the specified // position.
{ "resource": "" }
c31408
train
// Draws the EditBox in the given location, 'h' is not used at the moment
{ "resource": "" }
c31409
train
// Adjusts line visual offset to a proper value depending on width
{ "resource": "" }
c31410
train
// Wait for an event and return it. This is a blocking function call.
{ "resource": "" }
c31411
train
// Clears the internal back buffer.
{ "resource": "" }
c31412
train
// Sync comes handy when something causes desync between termbox's understanding // of a terminal buffer and the reality. Such as a third party process. Sync // forces a complete resync between the termbox and a terminal, it may not be // visually pretty though.
{ "resource": "" }
c31413
train
// incRequestsTotal increases the counter for this request method atomically by // one. The method must be one of GET, HEAD, POST, PATCH, DELETE.
{ "resource": "" }
c31414
train
// incErrorsTotal increases the counter for this error atomically by one.
{ "resource": "" }
c31415
train
// incBytesReceived increases the number of received bytes atomically be the // specified number.
{ "resource": "" }
c31416
train
// Load retrieves the map of the counter pointers atomically
{ "resource": "" }
c31417
train
// Returns the string prefix used to store keys in etcd3
{ "resource": "" }
c31418
train
// New creates a new limited store with the given size as the maximum storage // size. The wrapped data store needs to implement the TerminaterDataStore // interface, in order to provide the required Terminate method.
{ "resource": "" }
c31419
train
// Ensure enough space is available to store an upload of the specified size. // It will terminate uploads until enough space is freed.
{ "resource": "" }
c31420
train
// newLock contructs a new Lockfile instance.
{ "resource": "" }
c31421
train
// binPath returns the path to the .bin storing the binary data.
{ "resource": "" }
c31422
train
// infoPath returns the path to the .info file storing the file's info.
{ "resource": "" }
c31423
train
// writeInfo updates the entire information. Everything will be overwritten.
{ "resource": "" }
c31424
train
// New constructs a new locker using the provided client.
{ "resource": "" }
c31425
train
// Middleware checks various aspects of the request and ensures that it // conforms with the spec. Also handles method overriding for clients which // cannot make PATCH AND DELETE requests. If you are using the tusd handlers // directly you will need to wrap at least the POST and PATCH endpoints in // this middleware.
{ "resource": "" }
c31426
train
// HeadFile returns the length and offset for the HEAD request
{ "resource": "" }
c31427
train
// writeChunk reads the body from the requests r and appends it to the upload // with the corresponding id. Afterwards, it will set the necessary response // headers but will not send the response.
{ "resource": "" }
c31428
train
// GetFile handles requests to download a file using a GET request. This is not // part of the specification.
{ "resource": "" }
c31429
train
// DelFile terminates an upload permanently.
{ "resource": "" }
c31430
train
// Send the error in the response body. The status code will be looked up in // ErrStatusCodes. If none is found 500 Internal Error will be used.
{ "resource": "" }
c31431
train
// sendResp writes the header to w with the specified status code.
{ "resource": "" }
c31432
train
// Make an absolute URLs to the given upload id. If the base path is absolute // it will be prepended else the host and protocol from the request is used.
{ "resource": "" }
c31433
train
// sendProgressMessage will send a notification over the UploadProgress channel // every second, indicating how much data has been transfered to the server. // It will stop sending these instances once the returned channel has been // closed. The returned reader should be used to read the request body.
{ "resource": "" }
c31434
train
// The get sum of all sizes for a list of upload ids while checking whether // all of these uploads are finished yet. This is used to calculate the size // of a final resource.
{ "resource": "" }
c31435
train
// Verify that the Upload-Length and Upload-Defer-Length headers are acceptable for creating a // new upload
{ "resource": "" }
c31436
train
// extractIDFromPath pulls the last segment from the url provided
{ "resource": "" }
c31437
train
// NewGCSService returns a GCSSerivce object given a GCloud service account file path.
{ "resource": "" }
c31438
train
// GetObjectSize returns the byte length of the specified GCS object.
{ "resource": "" }
c31439
train
// DeleteObjectWithPrefix will delete objects who match the provided filter parameters.
{ "resource": "" }
c31440
train
// Compose takes a bucket name, a list of initial source names, and a destination string to compose multiple GCS objects together
{ "resource": "" }
c31441
train
// ComposeObjects composes multiple GCS objects in to a single object. // Since GCS limits composition to a max of 32 objects, additional logic // has been added to chunk objects in to groups of 32 and then recursively // compose those objects together.
{ "resource": "" }
c31442
train
// ReadObject reads a GCSObjectParams, returning a GCSReader object if successful, and an error otherwise
{ "resource": "" }
c31443
train
// SetObjectMetadata reads a GCSObjectParams and a map of metedata, returning a nil on sucess and an error otherwise
{ "resource": "" }
c31444
train
// DeleteObject deletes the object defined by GCSObjectParams
{ "resource": "" }
c31445
train
// Write object writes the file set out by the GCSObjectParams
{ "resource": "" }
c31446
train
// ComposeFrom composes multiple object types together,
{ "resource": "" }
c31447
train
// UnlockUpload releases a lock. If no such lock exists, no error will be returned.
{ "resource": "" }
c31448
train
// New constructs a new GCS storage backend using the supplied GCS bucket name // and service object.
{ "resource": "" }
c31449
train
// This method may be used if a different prefix is required for multi-tenant etcd clusters
{ "resource": "" }
c31450
train
// newStoreComposerFromDataStore creates a new store composer and attempts to // extract the extensions for the provided store. This is intended to be used // for transitioning from data stores to composers.
{ "resource": "" }
c31451
train
// Capabilities returns a string representing the provided extensions in a // human-readable format meant for debugging.
{ "resource": "" }
c31452
train
// New constructs a new storage using the supplied bucket and service object.
{ "resource": "" }
c31453
train
// isAwsError tests whether an error object is an instance of the AWS error // specified by its code.
{ "resource": "" }
c31454
train
// Acquires a lock from etcd3
{ "resource": "" }
c31455
train
// DecodeHookExec executes the given decode hook. This should be used // since it'll naturally degrade to the older backwards compatible DecodeHookFunc // that took reflect.Kind instead of reflect.Type.
{ "resource": "" }
c31456
train
// ComposeDecodeHookFunc creates a single DecodeHookFunc that // automatically composes multiple DecodeHookFuncs. // // The composed funcs are called in order, with the result of the // previous transformation.
{ "resource": "" }
c31457
train
// StringToTimeDurationHookFunc returns a DecodeHookFunc that converts // strings to time.Duration.
{ "resource": "" }
c31458
train
// StringToIPHookFunc returns a DecodeHookFunc that converts // strings to net.IP
{ "resource": "" }
c31459
train
// StringToIPNetHookFunc returns a DecodeHookFunc that converts // strings to net.IPNet
{ "resource": "" }
c31460
train
// StringToTimeHookFunc returns a DecodeHookFunc that converts // strings to time.Time.
{ "resource": "" }
c31461
train
// WeaklyTypedHook is a DecodeHookFunc which adds support for weak typing to // the decoder. // // Note that this is significantly different from the WeaklyTypedInput option // of the DecoderConfig.
{ "resource": "" }
c31462
train
// Decode takes an input structure and uses reflection to translate it to // the output structure. output must be a pointer to a map or struct.
{ "resource": "" }
c31463
train
// NewDecoder returns a new decoder for the given configuration. Once // a decoder has been returned, the same configuration must not be used // again.
{ "resource": "" }
c31464
train
// WrappedErrors implements the errwrap.Wrapper interface to make this // return value more useful with the errwrap and go-multierror libraries.
{ "resource": "" }
c31465
train
// rateLimit uses the cs.limiter to make sure that any client that hasn't // previously successfully challenged us is rate limited. It also keeps track of // clients that haven't successfully challenged, and it returns true if such a // client should be considered a spammer.
{ "resource": "" }
c31466
train
// NewClient returns a Client. keyRing and keyId are the GPG key ring and key ID // used to fulfill the challenge. challengeIP is the address that client proves // that it owns, by answering the challenge the server sends at this address.
{ "resource": "" }
c31467
train
// Handler returns the client's handler, that should be registered with an HTTPS // server for the returned prefix, for the client to be able to receive the // challenge.
{ "resource": "" }
c31468
train
// listenSelfCheck tests whether the client is ready to receive a challenge, // i.e. that the caller has registered the client's handler with a server.
{ "resource": "" }
c31469
train
// New returns a proxycache blob storage that reads from cache, // then origin, populating cache as needed, up to a total of maxBytes.
{ "resource": "" }
c31470
train
// must hold sto.mu. // Reports whether an item was removed.
{ "resource": "" }
c31471
train
// New returns a new Query as a javascript object, of nil if parentDir is not a // valid blobRef.
{ "resource": "" }
c31472
train
// Get asynchronously sends the query, if one is not already in flight, or being // processed. It runs q.UpdateSearchSession once the results have been received and // merged with q.Blobs and q.Meta. It runs q.TriggerRender to refresh the DOM with // the new results in the search session.
{ "resource": "" }
c31473
train
// newKVDB returns an unusable KeyValue, with a database, but no tables yet. It // should be followed by Wipe or finalize.
{ "resource": "" }
c31474
train
// Wipe resets the KeyValue by dropping and recreating the database tables.
{ "resource": "" }
c31475
train
// finalize should be called on a keyValue initialized with newKVDB.
{ "resource": "" }
c31476
train
// CreateDB creates the named database if it does not already exist.
{ "resource": "" }
c31477
train
// Close overrides KeyValue.Close because we need to remove the DB from the pool // when closing.
{ "resource": "" }
c31478
train
// emailOnTimeout runs fn in a goroutine. If fn is not done after d, // a message about fnName is logged, and an e-mail about it is sent.
{ "resource": "" }
c31479
train
// u32 converts n to an uint32, or panics if n is out of range
{ "resource": "" }
c31480
train
// length -1 means entire file
{ "resource": "" }
c31481
train
// AddFlags registers the "server" and "secret-keyring" string flags.
{ "resource": "" }
c31482
train
// lazy config parsing when there's a known client already. // The client c may be nil.
{ "resource": "" }
c31483
train
// convertToMultiServers takes an old style single-server client configuration and maps it to new a multi-servers configuration that is returned.
{ "resource": "" }
c31484
train
// printConfigChangeHelp checks if conf contains obsolete keys, // and prints additional help in this case.
{ "resource": "" }
c31485
train
// getServer returns the server's URL found either as a command-line flag, // or as the default server in the config file.
{ "resource": "" }
c31486
train
// SetupAuth sets the client's authMode. It tries from the environment first if we're on android or in dev mode, and then from the client configuration.
{ "resource": "" }
c31487
train
// serverAuth returns the auth scheme for server from the config, or the empty string if the server was not found in the config.
{ "resource": "" }
c31488
train
// SetupAuthFromString configures the clients authentication mode from // an explicit auth string.
{ "resource": "" }
c31489
train
// serverTrustedCerts returns the trusted certs for server from the config.
{ "resource": "" }
c31490
train
// newIgnoreChecker uses ignoredFiles to build and return a func that returns whether the file path argument should be ignored. See IsIgnoredFile for the ignore rules.
{ "resource": "" }
c31491
train
// hasDirPrefix reports whether the path has the provided directory prefix. // Both should be absolute paths.
{ "resource": "" }
c31492
train
// hasComponent returns whether the pathComponent is a path component of // fullpath. i.e it is a part of fullpath that fits exactly between two path // separators.
{ "resource": "" }
c31493
train
// genAll creates all the zips and tarballs, and returns their filenames.
{ "resource": "" }
c31494
train
// getVersions uses the freshly built perkeepd binary to get the Perkeep and Go // versions used to build the release.
{ "resource": "" }
c31495
train
// zipSource builds the zip archive that contains the source code of Perkeep.
{ "resource": "" }
c31496
train
// returns commiters names mapped by e-mail, uniqued first by e-mail, then by name. // When uniquing, higher count of commits wins.
{ "resource": "" }
c31497
train
// ProjectTokenSource returns an OAuth2 TokenSource for the given Google Project ID.
{ "resource": "" }
c31498
train
// SHA256Prefix computes the SHA-256 digest of data and returns // its first twenty lowercase hex digits.
{ "resource": "" }
c31499
train
// SHA1Prefix computes the SHA-1 digest of data and returns // its first twenty lowercase hex digits.
{ "resource": "" }