_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c179100
test
// isErrFieldMismatch returns whether err is a datastore.ErrFieldMismatch. // // The blobstore stores blob metadata in the datastore. When loading that // metadata, it may contain fields that we don't care about. datastore.Get will // return datastore.ErrFieldMismatch in that case, so we ignore that specific // error.
{ "resource": "" }
c179101
test
// Stat returns the BlobInfo for a provided blobKey. If no blob was found for // that key, Stat returns datastore.ErrNoSuchEntity.
{ "resource": "" }
c179102
test
// Send sets the headers on response to instruct App Engine to send a blob as // the response body. This is more efficient than reading and writing it out // manually and isn't subject to normal response size limits.
{ "resource": "" }
c179103
test
// UploadURL creates an upload URL for the form that the user will // fill out, passing the application path to load when the POST of the // form is completed. These URLs expire and should not be reused. The // opts parameter may be nil.
{ "resource": "" }
c179104
test
// Delete deletes a blob.
{ "resource": "" }
c179105
test
// DeleteMulti deletes multiple blobs.
{ "resource": "" }
c179106
test
// NewReader returns a reader for a blob. It always succeeds; if the blob does // not exist then an error will be reported upon first read.
{ "resource": "" }
c179107
test
// Handle arranges for f to be called for incoming XMPP messages. // Only messages of type "chat" or "normal" will be handled.
{ "resource": "" }
c179108
test
// Send sends a message. // If any failures occur with specific recipients, the error will be an appengine.MultiError.
{ "resource": "" }
c179109
test
// Invite sends an invitation. If the from address is an empty string // the default (yourapp@appspot.com/bot) will be used.
{ "resource": "" }
c179110
test
// Send sends a presence update.
{ "resource": "" }
c179111
test
// GetPresence retrieves a user's presence. // If the from address is an empty string the default // (yourapp@appspot.com/bot) will be used. // Possible return values are "", "away", "dnd", "chat", "xa". // ErrPresenceUnavailable is returned if the presence is unavailable.
{ "resource": "" }
c179112
test
// GetPresenceMulti retrieves multiple users' presence. // If the from address is an empty string the default // (yourapp@appspot.com/bot) will be used. // Possible return values are "", "away", "dnd", "chat", "xa". // If any presence is unavailable, an appengine.MultiError is returned
{ "resource": "" }
c179113
test
// Namespaces returns all the datastore namespaces.
{ "resource": "" }
c179114
test
// Kinds returns the names of all the kinds in the current namespace.
{ "resource": "" }
c179115
test
// RunInTransaction runs f in a transaction. It calls f with a transaction // context tc that f should use for all App Engine operations. // // If f returns nil, RunInTransaction attempts to commit the transaction, // returning nil if it succeeds. If the commit fails due to a conflicting // transaction, RunInTransactio...
{ "resource": "" }
c179116
test
// imports returns true if f imports path.
{ "resource": "" }
c179117
test
// importSpec returns the import spec if f imports path, // or nil otherwise.
{ "resource": "" }
c179118
test
// declImports reports whether gen contains an import of path.
{ "resource": "" }
c179119
test
// isPkgDot returns true if t is the expression "pkg.name" // where pkg is an imported identifier.
{ "resource": "" }
c179120
test
// isTopName returns true if n is a top-level unresolved identifier with the given name.
{ "resource": "" }
c179121
test
// isName returns true if n is an identifier with the given name.
{ "resource": "" }
c179122
test
// isCall returns true if t is a call to pkg.name.
{ "resource": "" }
c179123
test
// refersTo returns true if n is a reference to the same object as x.
{ "resource": "" }
c179124
test
// isEmptyString returns true if n is an empty string literal.
{ "resource": "" }
c179125
test
// countUses returns the number of uses of the identifier x in scope.
{ "resource": "" }
c179126
test
// assignsTo returns true if any of the code in scope assigns to or takes the address of x.
{ "resource": "" }
c179127
test
// newPkgDot returns an ast.Expr referring to "pkg.name" at position pos.
{ "resource": "" }
c179128
test
// renameTop renames all references to the top-level name old. // It returns true if it makes any changes.
{ "resource": "" }
c179129
test
// matchLen returns the length of the longest prefix shared by x and y.
{ "resource": "" }
c179130
test
// deleteImport deletes the import path from the file f, if present.
{ "resource": "" }
c179131
test
// rewriteImport rewrites any import of path oldPath to path newPath.
{ "resource": "" }
c179132
test
// DefaultTicket returns a ticket used for background context or dev_appserver.
{ "resource": "" }
c179133
test
// flushLog attempts to flush any pending logs to the appserver. // It should not be called concurrently.
{ "resource": "" }
c179134
test
// withDeadline is like context.WithDeadline, except it ignores the zero deadline.
{ "resource": "" }
c179135
test
// KeepAlive signals that the connection is still in use. // It may be called to prevent the socket being closed due to inactivity.
{ "resource": "" }
c179136
test
// applyTransaction applies the transaction t to message pb // by using the relevant setter passed to RegisterTransactionSetter.
{ "resource": "" }
c179137
test
// analyze checks the app for building with the given build tags and returns hasMain, // app files, and a map of full directory import names to original import names.
{ "resource": "" }
c179138
test
// buildContext returns the context for building the source.
{ "resource": "" }
c179139
test
// synthesizeMain generates a new main func and writes it to the tarball.
{ "resource": "" }
c179140
test
// findInGopath searches the gopath for the named import directory.
{ "resource": "" }
c179141
test
// copyTree copies srcDir to tar file dstDir, ignoring skipFiles.
{ "resource": "" }
c179142
test
// copyFile copies src to tar file dst.
{ "resource": "" }
c179143
test
// checkMain verifies that there is a single "main" function. // It also returns a list of all Go source files in the app.
{ "resource": "" }
c179144
test
// isMain returns whether the given function declaration is a main function. // Such a function must be called "main", not have a receiver, and have no arguments or return types.
{ "resource": "" }
c179145
test
// readFile reads and parses the Go source code file and returns whether it has a main function.
{ "resource": "" }
c179146
test
// initField is similar to reflect's Value.FieldByIndex, in that it // returns the nested struct field corresponding to index, but it // initialises any nil pointers encountered when traversing the structure.
{ "resource": "" }
c179147
test
// validIndexNameOrDocID is the Go equivalent of Python's // _ValidateVisiblePrintableAsciiNotReserved.
{ "resource": "" }
c179148
test
// Open opens the index with the given name. The index is created if it does // not already exist. // // The name is a human-readable ASCII string. It must contain no whitespace // characters and not start with "!".
{ "resource": "" }
c179149
test
// Get loads the document with the given ID into dst. // // The ID is a human-readable ASCII string. It must be non-empty, contain no // whitespace characters and not start with "!". // // dst must be a non-nil struct pointer or implement the FieldLoadSaver // interface. // // ErrFieldMismatch is returned when a field ...
{ "resource": "" }
c179150
test
// DeleteMulti deletes multiple documents from the index. // // The returned error may be an instance of appengine.MultiError, in which case // it will be the same size as srcs and the individual errors inside will // correspond with the items in srcs.
{ "resource": "" }
c179151
test
// fetchMore retrieves more results, if there are no errors or pending results.
{ "resource": "" }
c179152
test
// Facets returns the facets found within the search results, if any facets // were requested in the SearchOptions.
{ "resource": "" }
c179153
test
// DefaultBucketName returns the name of this application's // default Google Cloud Storage bucket.
{ "resource": "" }
c179154
test
// valid returns whether the key is valid.
{ "resource": "" }
c179155
test
// Equal returns whether two keys are equal.
{ "resource": "" }
c179156
test
// root returns the furthest ancestor of a key, which may be itself.
{ "resource": "" }
c179157
test
// marshal marshals the key's string representation to the buffer.
{ "resource": "" }
c179158
test
// String returns a string representation of the key.
{ "resource": "" }
c179159
test
// Encode returns an opaque representation of the key // suitable for use in HTML and URLs. // This is compatible with the Python and Java runtimes.
{ "resource": "" }
c179160
test
// DecodeKey decodes a key from the opaque representation returned by Encode.
{ "resource": "" }
c179161
test
// NewIncompleteKey creates a new incomplete key. // kind cannot be empty.
{ "resource": "" }
c179162
test
// NewKey creates a new key. // kind cannot be empty. // Either one or both of stringID and intID must be zero. If both are zero, // the key returned is incomplete. // parent must either be a complete key or nil.
{ "resource": "" }
c179163
test
// AllocateIDs returns a range of n integer IDs with the given kind and parent // combination. kind cannot be empty; parent may be nil. The IDs in the range // returned will not be used by the datastore's automatic ID sequence generator // and may be used with NewKey without conflict. // // The range is inclusive at th...
{ "resource": "" }
c179164
test
// IsOverQuota reports whether err represents an API call failure // due to insufficient available quota.
{ "resource": "" }
c179165
test
// This is only for classic App Engine adapters.
{ "resource": "" }
c179166
test
// Send sends an email message.
{ "resource": "" }
c179167
test
// SendToAdmins sends an email message to the application's administrators.
{ "resource": "" }
c179168
test
// Failures counts the number of failed tests in this report
{ "resource": "" }
c179169
test
// Read field key.
{ "resource": "" }
c179170
test
// Error if typ doesn't match rt.
{ "resource": "" }
c179171
test
// Read typ3 byte.
{ "resource": "" }
c179172
test
// Copy into PrefixBytes
{ "resource": "" }
c179173
test
// A heuristic to guess the size of a registered type and return it as a string. // If the size is not fixed it returns "variable".
{ "resource": "" }
c179174
test
// Find all conflicting prefixes for concrete types // that "implement" the interface. "Implement" in quotes because // we only consider the pointer, for extra safety.
{ "resource": "" }
c179175
test
// Ensure that prefix-conflicting implementing concrete types // are all registered in the priority list. // Returns an error if a disamb conflict is found.
{ "resource": "" }
c179176
test
// constructConcreteType creates the concrete value as // well as the corresponding settable value for it. // Return irvSet which should be set on caller's interface rv.
{ "resource": "" }
c179177
test
// MarshalBinaryLengthPrefixedWriter writes the bytes as would be returned from // MarshalBinaryLengthPrefixed to the writer w.
{ "resource": "" }
c179178
test
// MarshalBinaryBare encodes the object o according to the Amino spec. // MarshalBinaryBare doesn't prefix the byte-length of the encoding, // so the caller must handle framing.
{ "resource": "" }
c179179
test
// Like UnmarshalBinaryBare, but will first decode the byte-length prefix. // UnmarshalBinaryLengthPrefixed will panic if ptr is a nil-pointer. // Returns an error if not all of bz is consumed.
{ "resource": "" }
c179180
test
// UnmarshalBinaryBare will panic if ptr is a nil-pointer.
{ "resource": "" }
c179181
test
// MustMarshalJSON panics if an error occurs. Besides tha behaves exactly like MarshalJSON.
{ "resource": "" }
c179182
test
// MustUnmarshalJSON panics if an error occurs. Besides tha behaves exactly like UnmarshalJSON.
{ "resource": "" }
c179183
test
// MarshalJSONIndent calls json.Indent on the output of cdc.MarshalJSON // using the given prefix and indent string.
{ "resource": "" }
c179184
test
// newDataReader creates a new DataReader reading from 'r'.
{ "resource": "" }
c179185
test
// Read reads the TELNET escaped data from the wrapped io.Reader, and "un-escapes" it into 'data'.
{ "resource": "" }
c179186
test
// ListenAndServeTLS acts identically to ListenAndServe, except that it // uses the TELNET protocol over TLS. // // From a TELNET protocol point-of-view, it allows for 'secured telnet', also known as TELNETS, // which by default listens to port 992.
{ "resource": "" }
c179187
test
// Produce makes ProducerFunc fit the Producer interface.
{ "resource": "" }
c179188
test
// PromoteHandlerFunc turns a HandlerFunc into a Handler.
{ "resource": "" }
c179189
test
// Serve accepts an incoming TELNET or TELNETS client connection on the net.Listener `listener`.
{ "resource": "" }
c179190
test
// Serve accepts an incoming TELNET client connection on the net.Listener `listener`.
{ "resource": "" }
c179191
test
// Fail prints usage information to stderr and exits with non-zero status
{ "resource": "" }
c179192
test
// WriteUsage writes usage information to the given writer
{ "resource": "" }
c179193
test
// WriteHelp writes the usage string followed by the full help string for each option
{ "resource": "" }
c179194
test
// MustParse processes command line arguments and exits upon failure
{ "resource": "" }
c179195
test
// Parse processes command line arguments and stores them in dest
{ "resource": "" }
c179196
test
// walkFields calls a function for each field of a struct, recursively expanding struct fields.
{ "resource": "" }
c179197
test
// Parse processes the given command line option, storing the results in the field // of the structs from which NewParser was constructed
{ "resource": "" }
c179198
test
// parse a value as the appropriate type and store it in the struct
{ "resource": "" }
c179199
test
// canParse returns true if the type can be parsed from a string
{ "resource": "" }