_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c8500
train
//Rotate rotate text or image // angle is angle in degrees. // x, y is rotation center
{ "resource": "" }
c8501
train
// UnitsToPoints converts the units to the documents unit type
{ "resource": "" }
c8502
train
// UnitsToPointsVar converts the units to the documents unit type for all variables passed in
{ "resource": "" }
c8503
train
// PointsToUnits converts the points to the documents unit type
{ "resource": "" }
c8504
train
//PointsToUnitsVar converts the points to the documents unit type for all variables passed in
{ "resource": "" }
c8505
train
// PointsToUnits converts the rectanlges width and height to Units. When this is called it is assumed the values of the rectangle are in Points
{ "resource": "" }
c8506
train
// UnitsToPoints converts the rectanlges width and height to Points. When this is called it is assumed the values of the rectangle are in Units
{ "resource": "" }
c8507
train
//ImgReactagleToWH Rectangle to W and H
{ "resource": "" }
c8508
train
// URL returns the stow url for this item
{ "resource": "" }
c8509
train
// Metadata returns additional item metadata fields that were set when the file was uploaded
{ "resource": "" }
c8510
train
// Open downloads the item
{ "resource": "" }
c8511
train
// ETag returns an etag for an item. In this implementation we use the file's last modified timestamp
{ "resource": "" }
c8512
train
// CreateContainer creates a new container with the given name while returning a // container instance with the given information.
{ "resource": "" }
c8513
train
// Containers returns a collection of containers based on the given prefix and cursor.
{ "resource": "" }
c8514
train
// Container utilizes the client to retrieve container information based on its // name.
{ "resource": "" }
c8515
train
// RemoveContainer attempts to remove a container. Nonempty containers cannot // be removed.
{ "resource": "" }
c8516
train
// Register adds a Location implementation, with two helper functions. // makefn should make a Location with the given Config. // kindmatchfn should inspect a URL and return whether it represents a Location // of this kind or not. Code can call KindByURL to get a kind string // for any given URL and all registered impl...
{ "resource": "" }
c8517
train
// Dial gets a new Location with the given kind and // configuration.
{ "resource": "" }
c8518
train
// Validate validates the config for a location
{ "resource": "" }
c8519
train
// KindByURL gets the kind represented by the given URL. // It consults all registered locations. // Error returned if no match is found.
{ "resource": "" }
c8520
train
// Config gets a string configuration value and a // bool indicating whether the value was present or not.
{ "resource": "" }
c8521
train
// Open opens the file for reading.
{ "resource": "" }
c8522
train
// URL returns a formatted string which follows the predefined format // that every S3 asset is given.
{ "resource": "" }
c8523
train
// Open retrieves specic information about an item based on the container name // and path of the file within the container. This response includes the body of // resource which is returned along with an error.
{ "resource": "" }
c8524
train
// Tags returns a map of tags on an Item
{ "resource": "" }
c8525
train
// ensureInfo checks the fields that may be empty when an item is PUT. // Verify if the fields are empty, get information on the item, fill in // the missing fields.
{ "resource": "" }
c8526
train
// Open is a method that returns an io.ReadCloser which represents the content // of the CloudStorage object.
{ "resource": "" }
c8527
train
// LastMod returns a time.Time object representing information on the date // of the last time the CloudStorage object was modified.
{ "resource": "" }
c8528
train
// Keys are returned as all lowercase, dashes are allowed
{ "resource": "" }
c8529
train
// Items returns a collection of CloudStorage objects based on a matching // prefix string and cursor information.
{ "resource": "" }
c8530
train
// Put creates or updates a CloudStorage object within the given container.
{ "resource": "" }
c8531
train
// prepUrl takes a MediaLink string and returns a url
{ "resource": "" }
c8532
train
// Containers lists all containers in the location
{ "resource": "" }
c8533
train
// Container returns a stow.Contaner given a container id. In this case, the 'id' // is really the bucket name
{ "resource": "" }
c8534
train
// ItemByURL returns a stow.Item given a b2 stow url
{ "resource": "" }
c8535
train
// RemoveContainer removes the specified bucket. In this case, the 'id' // is really the bucket name
{ "resource": "" }
c8536
train
// Items sends a request to retrieve a list of items that are prepended with // the prefix argument. The 'cursor' variable facilitates pagination.
{ "resource": "" }
c8537
train
// A request to retrieve a single item includes information that is more specific than // a PUT. Instead of doing a request within the PUT, make this method available so that the // request can be made by the field retrieval methods when necessary. This is the case for // fields that are left out, such as the object's ...
{ "resource": "" }
c8538
train
// The first letter of a dash separated key value is capitalized, so perform a ToLower on it. // This Key transformation of returning lowercase is consistent with other locations..
{ "resource": "" }
c8539
train
// flatdirs walks the entire tree returning a list of // os.FileInfo for all items encountered.
{ "resource": "" }
c8540
train
// determineChunkSize determines the chunk size for a multi-part upload.
{ "resource": "" }
c8541
train
// multipartUpload performs a multi-part upload by chunking the data, putting each chunk, then // assembling the chunks into a blob
{ "resource": "" }
c8542
train
// CreateContainer creates a new container, in this case an S3 bucket. // The bare minimum needed is a container name, but there are many other // options that can be provided.
{ "resource": "" }
c8543
train
// Containers returns a slice of the Container interface, a cursor, and an error. // This doesn't seem to exist yet in the API without doing a ton of manual work. // Get the list of buckets, query every single one to retrieve region info, and finally // return the list of containers that have a matching region against ...
{ "resource": "" }
c8544
train
// Walk walks all Items in the Container. // Returns the first error returned by the WalkFunc or // nil if no errors were returned. // The pageSize is the number of Items to get per request.
{ "resource": "" }
c8545
train
// WalkContainers walks all Containers in the Location. // Returns the first error returned by the WalkContainersFunc or // nil if no errors were returned. // The pageSize is the number of Containers to get per request.
{ "resource": "" }
c8546
train
// Item returns a stow.Item instance of a container based on the // name of the container
{ "resource": "" }
c8547
train
// Items retrieves a list of items that are prepended with // the prefix argument. The 'cursor' variable facilitates pagination.
{ "resource": "" }
c8548
train
// Put sends a request to upload content to the container. The arguments // received are the name of the item, a reader representing the // content, and the size of the file.
{ "resource": "" }
c8549
train
// Items retreives a list of items from b2. Since the b2 ListFileNames operation // does not natively support a prefix, we fake it ourselves
{ "resource": "" }
c8550
train
// Put uploads a file
{ "resource": "" }
c8551
train
// RemoveItem identifies the file by it's ID, then removes all versions of that file
{ "resource": "" }
c8552
train
// filesToContainers takes a list of files and turns it into a // stow.ContainerList.
{ "resource": "" }
c8553
train
// CreateContainer creates a new container, in this case a bucket.
{ "resource": "" }
c8554
train
// Containers returns a slice of the Container interface, a cursor, and an error.
{ "resource": "" }
c8555
train
// Register registers a new mock in the current mocks stack.
{ "resource": "" }
c8556
train
// Exists checks if the given Mock is already registered.
{ "resource": "" }
c8557
train
// Remove removes a registered mock by reference.
{ "resource": "" }
c8558
train
// Clean cleans the mocks store removing disabled or obsolete mocks.
{ "resource": "" }
c8559
train
// Add adds a new function matcher.
{ "resource": "" }
c8560
train
// Match matches the given http.Request with a mock request // returning true in case that the request matches, otherwise false.
{ "resource": "" }
c8561
train
// MatchMock is a helper function that matches the given http.Request // in the list of registered mocks, returning it if matches or error if it fails.
{ "resource": "" }
c8562
train
// NewRequest creates a new Request instance.
{ "resource": "" }
c8563
train
// URL defines the mock URL to match.
{ "resource": "" }
c8564
train
// SetURL defines the url.URL struct to be used for matching.
{ "resource": "" }
c8565
train
// method is a DRY shortcut used to declare the expected HTTP method and URL path.
{ "resource": "" }
c8566
train
// BodyString defines the body to match based on a given string.
{ "resource": "" }
c8567
train
// File defines the body to match based on the given file path string.
{ "resource": "" }
c8568
train
// Compression defines the request compression scheme, and enables automatic body decompression. // Supports only the "gzip" scheme so far.
{ "resource": "" }
c8569
train
// JSON defines the JSON body to match based on a given structure.
{ "resource": "" }
c8570
train
// BasicAuth defines a username and password for HTTP Basic Authentication
{ "resource": "" }
c8571
train
// MatchHeader defines a new key and value header to match.
{ "resource": "" }
c8572
train
// HeaderPresent defines that a header field must be present in the request.
{ "resource": "" }
c8573
train
// MatchHeaders defines a map of key-value headers to match.
{ "resource": "" }
c8574
train
// MatchParam defines a new key and value URL query param to match.
{ "resource": "" }
c8575
train
// MatchParams defines a map of URL query param key-value to match.
{ "resource": "" }
c8576
train
// ParamPresent matches if the given query param key is present in the URL.
{ "resource": "" }
c8577
train
// Times defines the number of times that the current HTTP mock should remain active.
{ "resource": "" }
c8578
train
// AddMatcher adds a new matcher function to match the request.
{ "resource": "" }
c8579
train
// SetMatcher sets a new matcher function to match the request.
{ "resource": "" }
c8580
train
// Map adds a new request mapper function to map http.Request before the matching process.
{ "resource": "" }
c8581
train
// EnableNetworking enables the use real networking for the current mock.
{ "resource": "" }
c8582
train
// Reply defines the Response status code and returns the mock Response DSL.
{ "resource": "" }
c8583
train
// ReplyError defines the Response simulated error.
{ "resource": "" }
c8584
train
// ReplyFunc allows the developer to define the mock response via a custom function.
{ "resource": "" }
c8585
train
// Responder builds a mock http.Response based on the given Response mock.
{ "resource": "" }
c8586
train
// createResponse creates a new http.Response with default fields.
{ "resource": "" }
c8587
train
// mergeHeaders copies the mock headers.
{ "resource": "" }
c8588
train
// createReadCloser creates an io.ReadCloser from a byte slice that is suitable for use as an // http response body.
{ "resource": "" }
c8589
train
// Starts a local HTTP server in background
{ "resource": "" }
c8590
train
// MatchMethod matches the HTTP method of the given request.
{ "resource": "" }
c8591
train
// MatchScheme matches the request URL protocol scheme.
{ "resource": "" }
c8592
train
// MatchHost matches the HTTP host header field of the given request.
{ "resource": "" }
c8593
train
// MatchPath matches the HTTP URL path of the given request.
{ "resource": "" }
c8594
train
// MatchHeaders matches the headers fields of the given request.
{ "resource": "" }
c8595
train
// MatchQueryParams matches the URL query params fields of the given request.
{ "resource": "" }
c8596
train
// MatchPathParams matches the URL path parameters of the given request.
{ "resource": "" }
c8597
train
// Status defines the desired HTTP status code to reply in the current response.
{ "resource": "" }
c8598
train
// SetHeader sets a new header field in the mock response.
{ "resource": "" }
c8599
train
// AddHeader adds a new header field in the mock response // with out removing an existent one.
{ "resource": "" }