_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c173600
validation
// Length returns the number of elements in the List.
{ "resource": "" }
c173601
validation
// Remove retreives a value from this List and shifts all other values.
{ "resource": "" }
c173602
validation
// Set updates the value stored at a given position in the List.
{ "resource": "" }
c173603
validation
// String generates a textual representation of the List for the sake of debugging.
{ "resource": "" }
c173604
validation
// Swap switches the values that are stored at positions `x` and `y`
{ "resource": "" }
c173605
validation
// MarshalText implements the TextMarshaler interface.
{ "resource": "" }
c173606
validation
// UnmarshalText implements the TextUnmarshaler interface.
{ "resource": "" }
c173607
validation
// repl replaces % directives with right time
{ "resource": "" }
c173608
validation
// logName returns a new log file name containing tag, with start time t, and // the name for the symlink for tag.
{ "resource": "" }
c173609
validation
// Monotonic returns a time duration from some fixed point in the past.
{ "resource": "" }
c173610
validation
// set sets the value of the severity.
{ "resource": "" }
c173611
validation
// Set is part of the flag.Value interface.
{ "resource": "" }
c173612
validation
// set sets the value of the Level.
{ "resource": "" }
c173613
validation
// match reports whether the file matches the pattern. It uses a string // comparison if the pattern contains no metacharacters.
{ "resource": "" }
c173614
validation
// match reports whether the file path matches the regexp.
{ "resource": "" }
c173615
validation
// match reports whether the specified file and line matches the trace location. // The argument file name is the full path, not the basename specified in the flag.
{ "resource": "" }
c173616
validation
// NewLogger creates a new logger. // name is a non-empty string that appears in the names of log files // to distinguish between separate instances of the logger writing to the // same directory. // skip is the number of stack frames to skip in order to reach the // call point to be logged. 0 will log the caller of th...
{ "resource": "" }
c173617
validation
// logDir if non-empty, write log files to this directory.
{ "resource": "" }
c173618
validation
// SetLogToStderr sets the flag that, if true, logs to standard error instead of files
{ "resource": "" }
c173619
validation
// SetAlsoLogToStderr sets the flag that, if true, logs to standard error as well as files
{ "resource": "" }
c173620
validation
// setVState sets a consistent state for V logging. A nil value for // modules or filepaths will result in that filter not being changed. // l.mu is held.
{ "resource": "" }
c173621
validation
// putBuffer returns a buffer to the free list.
{ "resource": "" }
c173622
validation
// output writes the data to the log files and releases the buffer.
{ "resource": "" }
c173623
validation
// timeoutFlush calls Flush and returns when it completes or after timeout // elapses, whichever happens first. This is needed because the hooks invoked // by Flush may deadlock when glog.Fatal is called from a hook that holds // a lock.
{ "resource": "" }
c173624
validation
// stacks is a wrapper for runtime.Stack that attempts to recover the data for all goroutines.
{ "resource": "" }
c173625
validation
// exit is called if there is trouble creating or writing log files. // It flushes the logs and exits the program; there's no point in hanging around. // l.mu is held.
{ "resource": "" }
c173626
validation
// rotateFile closes the syncBuffer's file and starts a new one.
{ "resource": "" }
c173627
validation
// createFiles creates all the log files for severity from sev down to infoLog. // l.mu is held.
{ "resource": "" }
c173628
validation
// lockAndFlushAll is like flushAll but locks l.mu first.
{ "resource": "" }
c173629
validation
// flushAll flushes all the logs and attempts to "sync" their data to disk. // l.mu is held.
{ "resource": "" }
c173630
validation
// Add a new operation to the bundle. The operation will be invoked with a // context that will be cancelled if any other operation fails or has already // failed.
{ "resource": "" }
c173631
validation
// Wait for all previously-added operations to complete. Return nil if all // operations succeeded. Otherwise return the first error. // // Add must not be called concurrently with or after Join.
{ "resource": "" }
c173632
validation
// Create a bundle whose operations are fed a context inheriting from the given // parent context, which must be non-nil. The bundle must eventually be joined // with Join.
{ "resource": "" }
c173633
validation
// Expand until there are no more expansions to do
{ "resource": "" }
c173634
validation
// CacheFunc accepts two parameters // first is the http.HandlerFunc which you want to cache its result // the second is, optional, the cache Entry's expiration duration // if the expiration <=2 seconds then expiration is taken by the "cache-control's maxage" header // returns an http.HandlerFunc, which you can use as ...
{ "resource": "" }
c173635
validation
// CacheFasthttp accepts two parameters // first is the fasthttp.RequestHandler which you want to cache its result // the second is, optional, the cache Entry's expiration duration // if the expiration <=2 seconds then expiration is taken by the "cache-control's maxage" header // returns a fhttp.Handler with a ServeHTT...
{ "resource": "" }
c173636
validation
// CacheFasthttpFunc accepts two parameters // first is the fasthttp.RequestHandler which you want to cache its result // the second is, optional, the cache Entry's expiration duration // if the expiration <=2 seconds then expiration is taken by the "cache-control's maxage" header // returns a fasthttp.RequestHandler, ...
{ "resource": "" }
c173637
validation
// ContentType returns a valid content type
{ "resource": "" }
c173638
validation
// ServeHTTP serves the cache Service to the outside world, // it is used only when you want to achieve something like horizontal scaling // it parses the request and tries to return the response with the cached body of the requested cache key // server-side function
{ "resource": "" }
c173639
validation
// the actual work is done on the handler.go // here we just provide a helper for the main package to create // an http.Server and serve a cache remote service, without any user touches // New returns a http.Server which hosts // the server-side handler for the remote cache service. // // it doesn't listens to the serv...
{ "resource": "" }
c173640
validation
// AcquireResponseRecorder returns a ResponseRecorder
{ "resource": "" }
c173641
validation
// ReleaseResponseRecorder releases a ResponseRecorder which has been previously received by AcquireResponseRecorder
{ "resource": "" }
c173642
validation
// Rule sets the ruleset for this handler. // // returns itself.
{ "resource": "" }
c173643
validation
// NoCache called when a particular handler is not valid for cache. // If this function called inside a handler then the handler is not cached.
{ "resource": "" }
c173644
validation
// ClientOAuth instantiates ClientOAuthAuthentication with the client OAuth tokens
{ "resource": "" }
c173645
validation
// Client OAuth authentication requires us to attach an unexpired OAuth token to // the request header
{ "resource": "" }
c173646
validation
// ApiKeyAuth instantiates ApiKeyAuthentication with the API key & secret
{ "resource": "" }
c173647
validation
// API Key + Secret authentication requires a request header of the HMAC SHA-256 // signature of the "message" as well as an incrementing nonce and the API key
{ "resource": "" }
c173648
validation
// ServiceOAuth instantiates ServiceOAuthAuthentication with the coinbase certificate file
{ "resource": "" }
c173649
validation
// Service OAuth authentication requires no additional headers to be sent. The // Coinbase Public Certificate is set as a TLS config in the http.Client
{ "resource": "" }
c173650
validation
// OAuthService Instantiates OAuth Struct in order to send service related OAuth requests
{ "resource": "" }
c173651
validation
// CreateAuthorizeUrl create the Authorize Url used to redirect users for // coinbase app authorization. The scope parameter includes the specific // permissions one wants to ask from the user
{ "resource": "" }
c173652
validation
// RefreshTokens refreshes a users existing OAuth tokens
{ "resource": "" }
c173653
validation
// NewTokens generates new tokens for an OAuth user
{ "resource": "" }
c173654
validation
// NewTokensRequest generates new tokens for OAuth user given an http request // containing the query parameter 'code'
{ "resource": "" }
c173655
validation
// Request sends a request with params marshaled into a JSON payload in the body // The response value is marshaled from JSON into the specified holder struct
{ "resource": "" }
c173656
validation
// CreateRequest formats a request with all the necessary headers
{ "resource": "" }
c173657
validation
// executeRequest takes a prepared http.Request and returns the body of the response // If the response is not of HTTP Code 200, an error is returned
{ "resource": "" }
c173658
validation
// simulateRequest simulates a request by returning a sample JSON from file
{ "resource": "" }
c173659
validation
// ApiKeyClient instantiates the client with ApiKey Authentication
{ "resource": "" }
c173660
validation
// OAuthClient instantiates the client with OAuth Authentication
{ "resource": "" }
c173661
validation
// Get sends a GET request and marshals response data into holder
{ "resource": "" }
c173662
validation
// GetBalance returns current balance in BTC
{ "resource": "" }
c173663
validation
// GetAllAddresses returns bitcoin addresses associated with client account
{ "resource": "" }
c173664
validation
// GenerateReceiveAddress generates and returns a new bitcoin receive address
{ "resource": "" }
c173665
validation
// SendMoney to either a bitcoin or email address
{ "resource": "" }
c173666
validation
// RequestMoney from either a bitcoin or email address
{ "resource": "" }
c173667
validation
// ResendRequest resends a transaction request referenced by id
{ "resource": "" }
c173668
validation
// CancelRequest cancels a transaction request referenced by id
{ "resource": "" }
c173669
validation
// CompleteRequest completes a money request referenced by id
{ "resource": "" }
c173670
validation
// CreateButton gets a new payment button including EmbedHtml as a field on button struct
{ "resource": "" }
c173671
validation
// CreateOrderFromButtonCode creates an order for a given button code
{ "resource": "" }
c173672
validation
// CreateUser creates a new user given an email and password
{ "resource": "" }
c173673
validation
// Buy an amount of BTC and bypass rate limits by setting agreeBtcAmountVaries to true
{ "resource": "" }
c173674
validation
// GetContacts gets a users contacts
{ "resource": "" }
c173675
validation
// GetCurrencies gets all currency names and ISO's
{ "resource": "" }
c173676
validation
// GetExchangeRates gets the current exchange rates
{ "resource": "" }
c173677
validation
// GetExchangeRate gets the exchange rate between two specified currencies
{ "resource": "" }
c173678
validation
// GetTransactions gets transactions associated with an account
{ "resource": "" }
c173679
validation
// GetOrders gets orders associated with an account
{ "resource": "" }
c173680
validation
// GetTransfers get transfers associated with an account
{ "resource": "" }
c173681
validation
// GetBuyPrice gets the current BTC buy price
{ "resource": "" }
c173682
validation
// GetSellPrice gets the current BTC sell price
{ "resource": "" }
c173683
validation
// GetTransaction gets a particular transaction referenced by id
{ "resource": "" }
c173684
validation
// GetOrder gets a particular order referenced by id
{ "resource": "" }
c173685
validation
// GetUser gets the user associated with the authentication
{ "resource": "" }
c173686
validation
// NewSerialDispatcher creates a new PrallelDispatcher with the given handlers
{ "resource": "" }
c173687
validation
// AppendHandlers implements `Dispatcher.AppendHandlers`
{ "resource": "" }
c173688
validation
// DispatchOptional implements `Dispatcher.DispatchOptional`
{ "resource": "" }
c173689
validation
// NewParallelDispatcher creates a new PrallelDispatcher with the given handlers
{ "resource": "" }
c173690
validation
// ReleaseMsg releases a buffer
{ "resource": "" }
c173691
validation
// ReleaseBuffer puts the given byte array back into the appropriate // global buffer pool based on its capacity.
{ "resource": "" }
c173692
validation
// close is the internal close function, called by ContextCloser.Close
{ "resource": "" }
c173693
validation
// Write writes data, net.Conn style
{ "resource": "" }
c173694
validation
// Accept waits for and returns the next connection to the listener.
{ "resource": "" }
c173695
validation
// AddDialer adds a sub-dialer usable by this dialer. // Dialers added first will be selected first, based on the address.
{ "resource": "" }
c173696
validation
// returns dialer that can dial the given address
{ "resource": "" }
c173697
validation
// rawConnDial dials the underlying net.Conn + manet.Conns
{ "resource": "" }
c173698
validation
// MultiaddrProtocolsMatch returns whether two multiaddrs match in protocol stacks.
{ "resource": "" }
c173699
validation
// MultiaddrNetMatch returns the first Multiaddr found to match network.
{ "resource": "" }