_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c12200
train
// AddFlag adds the flag represented by VerifyFlag to the specified pflag.FlagSet. Returns the pointer to the value that // can be used to retrieve the value.
{ "resource": "" }
c12201
train
// ConfigVersion unmarshals the provided bytes as YAML and returns the value of the top-level "version" key. The value // of this key must be a string. If the input is valid YAML but does not contain a "version" key, returns the empty // string. Returns an error if the input is not valid YAML or cannot be unmarshaled a...
{ "resource": "" }
c12202
train
// Move the file or directory at src to dst. Conceptually, this is equivalent to executing "mv src dst". dst must not // already exist and the path up to it must already exist. Uses os.Rename to execute the move, which means that there // may be platform-specific restrictions such as not being able to move the director...
{ "resource": "" }
c12203
train
// CopyDir recursively copies the src directory to the path specified by dst. dst must not already exist and the path up // to it must already exist.
{ "resource": "" }
c12204
train
// SyncDirAdditive copies all of the files and directories in src that are not in dst. Directories that are present in // both are handled recursively. Basically a recursive merge with source preservation.
{ "resource": "" }
c12205
train
// verifyDstPathSafe verifies that the provided destination path does not exist, but that the path to its parent does.
{ "resource": "" }
c12206
train
// Download downloads the provided package to the specified path. The parent directory of the path must exist. If the // destination file already exists, it is overwritten. The download progress is written to the provided writer.
{ "resource": "" }
c12207
train
// ListProjectPaths lists all of the paths in the provided project directory that matches the provided include matcher // and does not match the provided exclude matcher. The paths are relative to the current working directory.
{ "resource": "" }
c12208
train
// AllPaths returns a map that contains all of the paths in the provided directory. The paths are relative to the // directory. The boolean key is true if the path is a directory, false otherwise.
{ "resource": "" }
c12209
train
// Computes the SHA-256 hash for the content of the provided reader, which must be a plugin TGZ.
{ "resource": "" }
c12210
train
// ProjectDir returns the project directory for the global configuration. Returns an error if the wrapper path was not // specified.
{ "resource": "" }
c12211
train
// Get the index of precision p from the sparse representation.
{ "resource": "" }
c12212
train
// Merge tmpSet and sparseList in the sparse representation. // Converts to normal if the sparse list is too large
{ "resource": "" }
c12213
train
// NewPlus returns a new initialized HyperLogLogPlus that uses the HyperLogLog++ // algorithm.
{ "resource": "" }
c12214
train
// Clear sets HyperLogLogPlus h back to its initial state.
{ "resource": "" }
c12215
train
// Converts HyperLogLogPlus h to the normal representation from the sparse // representation.
{ "resource": "" }
c12216
train
// Add adds a new item to HyperLogLogPlus h.
{ "resource": "" }
c12217
train
// Merge takes another HyperLogLogPlus and combines it with HyperLogLogPlus h.
{ "resource": "" }
c12218
train
// Merges tmpSet if it exceeds the threshold
{ "resource": "" }
c12219
train
// Estimates the bias using empirically determined values.
{ "resource": "" }
c12220
train
// Encode HyperLogLogPlus into a gob
{ "resource": "" }
c12221
train
// Decode gob into a HyperLogLogPlus structure
{ "resource": "" }
c12222
train
// Extract bits from uint32 using LSB 0 numbering, including lo.
{ "resource": "" }
c12223
train
// Extract bits from uint64 using LSB 0 numbering, including lo.
{ "resource": "" }
c12224
train
// New returns a new initialized HyperLogLog.
{ "resource": "" }
c12225
train
// Add adds a new item to HyperLogLog h.
{ "resource": "" }
c12226
train
// Merge takes another HyperLogLog and combines it with HyperLogLog h.
{ "resource": "" }
c12227
train
// Encode HyperLogLog into a gob
{ "resource": "" }
c12228
train
// Decode gob into a HyperLogLog structure
{ "resource": "" }
c12229
train
// String returns the hash' name.
{ "resource": "" }
c12230
train
// ToHash returns the hash whose name is s. It returns zero if there is no // such hash. It is case sensitive.
{ "resource": "" }
c12231
train
// NewStreamLexerSize returns a new StreamLexer for a given io.Reader and estimated required buffer size. // If the io.Reader implements Bytes, that buffer is used instead.
{ "resource": "" }
c12232
train
// Err returns the error returned from io.Reader. It may still return valid bytes for a while though.
{ "resource": "" }
c12233
train
// Shift returns the bytes of the current selection and collapses the position to the end of the selection. // It also returns the number of bytes we moved since the last call to Shift. This can be used in calls to Free.
{ "resource": "" }
c12234
train
// ShiftLen returns the number of bytes moved since the last call to ShiftLen. This can be used in calls to Free because it takes into account multiple Shifts or Skips.
{ "resource": "" }
c12235
train
// NewLexerBytes returns a new Lexer for a given io.Reader, and uses ioutil.ReadAll to read it into a byte slice. // If the io.Reader implements Bytes, that is used instead. // It will append a NULL at the end of the buffer.
{ "resource": "" }
c12236
train
// NewLexerBytes returns a new Lexer for a given byte slice, and appends NULL at the end. // To avoid reallocation, make sure the capacity has room for one more byte.
{ "resource": "" }
c12237
train
// Restore restores the replaced byte past the end of the buffer by NULL.
{ "resource": "" }
c12238
train
// Peek returns the ith byte relative to the end position. // Peek returns 0 when an error has occurred, Err returns the error.
{ "resource": "" }
c12239
train
// Shift returns the bytes of the current selection and collapses the position to the end of the selection.
{ "resource": "" }
c12240
train
// Dimension parses a byte-slice and returns the length of the number and its unit.
{ "resource": "" }
c12241
train
// Mediatype parses a given mediatype and splits the mimetype from the parameters. // It works similar to mime.ParseMediaType but is faster.
{ "resource": "" }
c12242
train
// DataURI parses the given data URI and returns the mediatype, data and ok.
{ "resource": "" }
c12243
train
// NewParser returns a new CSS parser from an io.Reader. isInline specifies whether this is an inline style attribute.
{ "resource": "" }
c12244
train
// Err returns the error encountered during parsing, this is often io.EOF but also other errors can be returned.
{ "resource": "" }
c12245
train
// Write writes bytes from the given byte slice and returns the number of bytes written and an error if occurred. When err != nil, n == 0.
{ "resource": "" }
c12246
train
// IsIdent returns true if the bytes are a valid identifier.
{ "resource": "" }
c12247
train
// IsURLUnquoted returns true if the bytes are a valid unquoted URL.
{ "resource": "" }
c12248
train
// EscapeAttrVal returns the escape attribute value bytes without quotes.
{ "resource": "" }
c12249
train
// EscapeCDATAVal returns the escaped text bytes.
{ "resource": "" }
c12250
train
// Copy returns a copy of the given byte slice.
{ "resource": "" }
c12251
train
// ToLower converts all characters in the byte slice from A-Z to a-z.
{ "resource": "" }
c12252
train
// IsAllWhitespace returns true when the entire byte slice consists of space, \n, \r, \t, \f.
{ "resource": "" }
c12253
train
// TrimWhitespace removes any leading and trailing whitespace characters.
{ "resource": "" }
c12254
train
// AppendPrice will append an int64 formatted as a price, where the int64 is the price in cents. // It does not display whether a price is negative or not.
{ "resource": "" }
c12255
train
// Err returns the error encountered during lexing, this is often io.EOF but also other errors can be returned.
{ "resource": "" }
c12256
train
// shiftXml parses the content of a svg or math tag according to the XML 1.1 specifications, including the tag itself. // So far we have already parsed `<svg` or `<math`.
{ "resource": "" }
c12257
train
// Position returns the line and column number for a certain position in a file. It is useful for recovering the position in a file that caused an error. // It only treates \n, \r, and \r\n as newlines, which might be different from some languages also recognizing \f, \u2028, and \u2029 to be newlines.
{ "resource": "" }
c12258
train
// Read reads bytes into the given byte slice and returns the number of bytes read and an error if occurred.
{ "resource": "" }
c12259
train
// Int parses a byte-slice and returns the integer it represents. // If an invalid character is encountered, it will stop there.
{ "resource": "" }
c12260
train
// Float parses a byte-slice and returns the float it represents. // If an invalid character is encountered, it will stop there.
{ "resource": "" }
c12261
train
// NewError creates a new error
{ "resource": "" }
c12262
train
// NewErrorLexer creates a new error from an active Lexer.
{ "resource": "" }
c12263
train
// Positions re-parses the file to determine the line, column, and context of the error. // Context is the entire line at which the error occurred.
{ "resource": "" }
c12264
train
// Error returns the error string, containing the context and line + column number.
{ "resource": "" }
c12265
train
// consumeBracket consumes any bracket token.
{ "resource": "" }
c12266
train
// consumeNumeric consumes NumberToken, PercentageToken or DimensionToken.
{ "resource": "" }
c12267
train
// consumeString consumes a string and may return BadStringToken when a newline is encountered.
{ "resource": "" }
c12268
train
// consumeRemnantsBadUrl consumes bytes of a BadUrlToken so that normal tokenization may continue.
{ "resource": "" }
c12269
train
// consumeIdentlike consumes IdentToken, FunctionToken or UrlToken.
{ "resource": "" }
c12270
train
// String returns the string representation of a State.
{ "resource": "" }
c12271
train
// NewParser returns a new Parser for a given io.Reader.
{ "resource": "" }
c12272
train
// Err returns the error encountered during tokenization, this is often io.EOF but also other errors can be returned.
{ "resource": "" }
c12273
train
// EscapeAttrVal returns the escaped attribute value bytes without quotes.
{ "resource": "" }
c12274
train
// NewKeymap creates a new Keymap struct
{ "resource": "" }
c12275
train
// LookupAction returns the appropriate action for the given termbox event
{ "resource": "" }
c12276
train
// ApplyKeybinding applies all of the custom key bindings on top of // the default key bindings
{ "resource": "" }
c12277
train
// LineAt returns the line at index `i`. Note that the i-th element // in this filtered buffer may actually correspond to a totally // different line number in the source buffer.
{ "resource": "" }
c12278
train
// EventToString returns human readable name for a given termbox.Event
{ "resource": "" }
c12279
train
// NewExternalCmd creates a new filter that uses an external // command to filter the input
{ "resource": "" }
c12280
train
// NewHub creates a new Hub struct
{ "resource": "" }
c12281
train
// low-level utility
{ "resource": "" }
c12282
train
// SendQuery sends the query string to be processed by the Filter
{ "resource": "" }
c12283
train
// SendDraw sends a request to redraw the terminal display
{ "resource": "" }
c12284
train
// SendStatusMsgAndClear sends a string to be displayed in the status message, // as well as a delay until the message should be cleared
{ "resource": "" }
c12285
train
// SendPaging sends a request to move the cursor around
{ "resource": "" }
c12286
train
// Flush calls termbox.Flush
{ "resource": "" }
c12287
train
// PollEvent returns a channel that you can listen to for // termbox's events. The actual polling is done in a // separate gouroutine
{ "resource": "" }
c12288
train
// SetCell writes to the terminal
{ "resource": "" }
c12289
train
// Size returns the dimensions of the current terminal
{ "resource": "" }
c12290
train
// Runes returns a channel that gives you the list of runes in the query
{ "resource": "" }
c12291
train
// Execute fulfills the Action interface for AfterFunc
{ "resource": "" }
c12292
train
// Register fulfills the Action interface for AfterFunc. Registers `a` // into the global action registry by the name `name`, and maps to // default keys via `defaultKeys`
{ "resource": "" }
c12293
train
// RegisterKeySequence satisfies the Action interface for AfterFunc. // Registers the action to be mapped against a key sequence
{ "resource": "" }
c12294
train
// This is an exception to the rule. This does not get registered // anywhere. You just call it directly
{ "resource": "" }
c12295
train
// IsEndMark is an utility function that checks if the given error // object is an EndMark
{ "resource": "" }
c12296
train
// Send sends the data `v` through this channel
{ "resource": "" }
c12297
train
// SendEndMark sends an end mark
{ "resource": "" }
c12298
train
// SetSource sets the source. // If called during `Run`, this method will block.
{ "resource": "" }
c12299
train
// Add adds new Acceptor that work on data that goes through the Pipeline. // If called during `Run`, this method will block.
{ "resource": "" }