_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c12800
train
// wrapper around sysctl KERN_PROCARGS2 // callbacks params are optional, // up to the caller as to which pieces of data they want
{ "resource": "" }
c12801
train
// XXX copied from zsyscall_darwin_amd64.go
{ "resource": "" }
c12802
train
// Initialize linux implementation of the eventListener interface
{ "resource": "" }
c12803
train
// Read events from the netlink socket
{ "resource": "" }
c12804
train
// Internal helper to check if pid && event is being watched
{ "resource": "" }
c12805
train
// Bind our netlink socket and // send a listen control message to the connector driver.
{ "resource": "" }
c12806
train
// Send an ignore control message to the connector driver // and close our netlink socket.
{ "resource": "" }
c12807
train
// Go version of apr_strfsize
{ "resource": "" }
c12808
train
// SymbolsByRune returns a map of lexer symbol names keyed by rune.
{ "resource": "" }
c12809
train
// NameOfReader attempts to retrieve the filename of a reader.
{ "resource": "" }
c12810
train
// ConsumeAll reads all tokens from a Lexer.
{ "resource": "" }
c12811
train
// RuneToken represents a rune as a Token.
{ "resource": "" }
c12812
train
// MakeSymbolTable builds a lookup table for checking token ID existence. // // For each symbolic name in "types", the returned map will contain the corresponding token ID as a key.
{ "resource": "" }
c12813
train
// Upgrade a Lexer to a PeekingLexer with arbitrary lookahead.
{ "resource": "" }
c12814
train
// Defer adds a function to be applied once a branch has been picked.
{ "resource": "" }
c12815
train
// Apply deferred functions.
{ "resource": "" }
c12816
train
// Branch accepts the branch as the correct branch.
{ "resource": "" }
c12817
train
// Branch starts a new lookahead branch.
{ "resource": "" }
c12818
train
// Stop returns true if parsing should terminate after the given "branch" failed to match.
{ "resource": "" }
c12819
train
// Lookahead returns a new rewinder usable for lookahead.
{ "resource": "" }
c12820
train
// LexWithScanner creates a Lexer from a user-provided scanner.Scanner. // // Useful if you need to customise the Scanner.
{ "resource": "" }
c12821
train
// Map is an Option that configures the Parser to apply a mapping function to each Token from the lexer. // // This can be useful to eg. upper-case all tokens of a certain type, or dequote strings. // // "symbols" specifies the token symbols that the Mapper will be applied to. If empty, all tokens will be mapped.
{ "resource": "" }
c12822
train
// Upper is an Option that upper-cases all tokens of the given type. Useful for case normalisation.
{ "resource": "" }
c12823
train
// Elide drops tokens of the specified types.
{ "resource": "" }
c12824
train
// ParseTerm returns nil if no term was found.
{ "resource": "" }
c12825
train
// Parse parses a set of EBNF productions from source src. // It returns a set of productions. Errors are reported // for incorrect syntax and if a production is declared // more than once; the filename is used only for error // positions. //
{ "resource": "" }
c12826
train
// Apply some optimizations to the EBNF.
{ "resource": "" }
c12827
train
// Validate the grammar against the lexer rules.
{ "resource": "" }
c12828
train
// Lex uses the parser's lexer to tokenise input.
{ "resource": "" }
c12829
train
// Lexer is an Option that sets the lexer to use with the given grammar.
{ "resource": "" }
c12830
train
// UseLookahead allows branch lookahead up to "n" tokens. // // If parsing cannot be disambiguated before "n" tokens of lookahead, parsing will fail. // // Note that increasing lookahead has a minor performance impact, but also // reduces the accuracy of error reporting.
{ "resource": "" }
c12831
train
// CaseInsensitive allows the specified token types to be matched case-insensitively.
{ "resource": "" }
c12832
train
// Recursively collect flattened indices for top-level fields and embedded fields.
{ "resource": "" }
c12833
train
// Takes a type and builds a tree of nodes out of it.
{ "resource": "" }
c12834
train
// A literal string. // // Note that for this to match, the tokeniser must be able to produce this string. For example, // if the tokeniser only produces individual characters but the literal is "hello", or vice versa.
{ "resource": "" }
c12835
train
// Begin a new token attempt.
{ "resource": "" }
c12836
train
// Buffer a rune without moving the cursor.
{ "resource": "" }
c12837
train
// Parse a BASIC program.
{ "resource": "" }
c12838
train
// Parse a repetition. Once a repetition is encountered it will always match, so grammars // should ensure that branches are differentiated prior to the repetition.
{ "resource": "" }
c12839
train
// Attempt to transform values to given type. // // This will dereference pointers, and attempt to parse strings into integer values, floats, etc.
{ "resource": "" }
c12840
train
// Errorf creats a new Error at the given position.
{ "resource": "" }
c12841
train
// Error complies with the error interface and reports the position of an error.
{ "resource": "" }
c12842
train
//Wrap return a Future that presents the wrapped value
{ "resource": "" }
c12843
train
//WhenAll receives function slice and returns a Future. //If all Futures are resolved, this Future will be resolved and return results slice. //Otherwise will rejected with results slice returned by all Futures //Legit types of act are same with Start function
{ "resource": "" }
c12844
train
//WhenAll receives Futures slice and returns a Future. //If all Futures are resolved, this Future will be resolved and return results slice. //If any Future is cancelled, this Future will be cancelled. //Otherwise will rejected with results slice returned by all Futures. //Legit types of act are same with Start functio...
{ "resource": "" }
c12845
train
//getPipe returns piped Future task function and pipe Promise by the status of current Promise.
{ "resource": "" }
c12846
train
//IsCancelled returns true if the promise is cancelled, otherwise false
{ "resource": "" }
c12847
train
//SetTimeout sets the future task will be cancelled //if future is not complete before time out
{ "resource": "" }
c12848
train
//GetChan returns a channel than can be used to receive result of Promise
{ "resource": "" }
c12849
train
//val uses Atomic load to return state value of the Future
{ "resource": "" }
c12850
train
//setResult sets the value and final status of Promise, it will only be executed for once
{ "resource": "" }
c12851
train
//handleOneCallback registers a callback function
{ "resource": "" }
c12852
train
//NewPromise is factory function for Promise
{ "resource": "" }
c12853
train
// Handle returns a Rule that invokes the receiver, then the given events.Handler
{ "resource": "" }
c12854
train
// HandleF is the functional equivalent of Handle
{ "resource": "" }
c12855
train
// HandleEvent implements events.Handler for Rule
{ "resource": "" }
c12856
train
// HandleEvent implements events.Handler for Rules
{ "resource": "" }
c12857
train
// Error implements error; returns the message of the first error in the list.
{ "resource": "" }
c12858
train
// Error2 aggregates the given error params, returning nil if both are nil. // Use Error2 to avoid the overhead of creating a slice when aggregating only 2 errors.
{ "resource": "" }
c12859
train
// IsErrorList returns true if err is a non-nil error list
{ "resource": "" }
c12860
train
// MinCyclePeriod is a functional option that determines the highest frequency of master change notifications
{ "resource": "" }
c12861
train
// Internal constructor function
{ "resource": "" }
c12862
train
// logPanic safely executes the given func, recovering from and logging a panic if one occurs.
{ "resource": "" }
c12863
train
// the first call to Detect will kickstart a connection to zookeeper. a nil change listener may // be spec'd, result of which is a detector that will still listen for master changes and record // leaderhip changes internally but no listener would be notified. Detect may be called more than // once, and each time the sp...
{ "resource": "" }
c12864
train
// buildEventHandler generates and returns a handler to process events received from the subscription.
{ "resource": "" }
c12865
train
// logAllEvents logs every observed event; this is somewhat expensive to do
{ "resource": "" }
c12866
train
// eventMetrics logs metrics for every processed API event
{ "resource": "" }
c12867
train
// callMetrics logs metrics for every outgoing Mesos call
{ "resource": "" }
c12868
train
// logCalls logs a specific message string when a particular call-type is observed
{ "resource": "" }
c12869
train
// build a new authenticatee implementation using the given callbacks and a new transport instance
{ "resource": "" }
c12870
train
// returns true when handlers are installed without error, otherwise terminates the // authentication process.
{ "resource": "" }
c12871
train
// UPIDBindingAddress determines the value of UPID.Host that will be used to build // a Transport. If a non-nil, non-wildcard bindingAddress is specified then it will be used // for both the UPID and Transport binding address. Otherwise hostname is resolved to an IP // address and the UPID.Host is set to that address a...
{ "resource": "" }
c12872
train
// NewMesosMessenger creates a new mesos messenger.
{ "resource": "" }
c12873
train
// Send puts a message into the outgoing queue, waiting to be sent. // With buffered channels, this will not block under moderate throughput. // When an error is generated, the error can be communicated by placing // a message on the incoming queue to be handled upstream.
{ "resource": "" }
c12874
train
// Start starts the messenger; expects to be called once and only once.
{ "resource": "" }
c12875
train
// Stop stops the messenger and clean up all the goroutines.
{ "resource": "" }
c12876
train
// getMessageName returns the name of the message in the mesos manner.
{ "resource": "" }
c12877
train
// NewRanges returns squashed Ranges from the given numbers.
{ "resource": "" }
c12878
train
// Size returns the sum of the Size of all Ranges.
{ "resource": "" }
c12879
train
// Squash merges overlapping and continuous Ranges. It assumes they're pre-sorted.
{ "resource": "" }
c12880
train
// Search performs a binary search for n returning the index of the Range it was // found at or -1 if not found.
{ "resource": "" }
c12881
train
// Partition partitions Ranges around n. It returns the partitioned Ranges // and a boolean indicating if n was found.
{ "resource": "" }
c12882
train
// Remove removes a range from already coalesced ranges. // The algorithms constructs a new vector of ranges which is then // Squash'ed into a Ranges instance.
{ "resource": "" }
c12883
train
// Compare assumes that both Ranges are already in sort-order. // Returns 0 if rs and right are equivalent, -1 if rs is a subset of right, or else 1
{ "resource": "" }
c12884
train
// Look up an authentication provider by name, returns non-nil and true if such // a provider is found.
{ "resource": "" }
c12885
train
// New returns a new Client with the given Opts applied. // Callers are expected to configure the URL, Do, and Codec options prior to // invoking Do.
{ "resource": "" }
c12886
train
// Apply this set of request options to the given HTTP request.
{ "resource": "" }
c12887
train
// With applies the given Opts to a Client and returns itself.
{ "resource": "" }
c12888
train
// Mesos returns a mesos.Client variant backed by this implementation. // Deprecated.
{ "resource": "" }
c12889
train
// buildRequest is a factory func that generates and returns an http.Request for the // given marshaler and request options.
{ "resource": "" }
c12890
train
// HandleResponse parses an HTTP response from a Mesos service endpoint, transforming the // raw HTTP response into a mesos.Response.
{ "resource": "" }
c12891
train
// Do is deprecated in favor of Send.
{ "resource": "" }
c12892
train
// ErrorMapper returns am Opt that overrides the existing error mapping behavior of the client.
{ "resource": "" }
c12893
train
// Endpoint returns an Opt that sets a Client's URL.
{ "resource": "" }
c12894
train
// WrapDoer returns an Opt that decorates a Client's DoFunc
{ "resource": "" }
c12895
train
// Do returns an Opt that sets a Client's DoFunc
{ "resource": "" }
c12896
train
// Codec returns an Opt that sets a Client's Codec.
{ "resource": "" }
c12897
train
// DefaultHeader returns an Opt that adds a header to an Client's headers.
{ "resource": "" }
c12898
train
// HandleResponse returns a functional config option to set the HTTP response handler of the client.
{ "resource": "" }
c12899
train
// RequestOptions returns an Opt that applies the given set of options to every Client request.
{ "resource": "" }