_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c181400
test
//Validate a password against the given requirements //Returns a boolean indicating whether the password meets the requirements. //The second argument is a string explaining why it doesn't meet the requirements, //if it doesn't. It is empty if the requirements are met.
{ "resource": "" }
c181401
test
//Generate password requirements from an existing password.
{ "resource": "" }
c181402
test
//Make sure password strength requirements make sense
{ "resource": "" }
c181403
test
//Generate a password given requirements
{ "resource": "" }
c181404
test
//Generate one password that meets the given requirements
{ "resource": "" }
c181405
test
//Generate n passwords that meet the given requirements
{ "resource": "" }
c181406
test
//append digits to string
{ "resource": "" }
c181407
test
//add punctuation characters to start and end of string
{ "resource": "" }
c181408
test
// this init function is deprecated, but I'm keeping it // around just in case it proves useful in the future.
{ "resource": "" }
c181409
test
// Param defines a parameter with the specified name.
{ "resource": "" }
c181410
test
// Parse parses parameter definitions from the map.
{ "resource": "" }
c181411
test
// Unmarshal parses the JSON payload from the command // arguments and unmarshal into a value pointed to by v.
{ "resource": "" }
c181412
test
// GetDefaultHTTPClient returns a httpClient with configured timeout
{ "resource": "" }
c181413
test
// DeviceInfo returns information about a particular device
{ "resource": "" }
c181414
test
// DevicePresence returns data about presence of a data
{ "resource": "" }
c181415
test
// NotificationStatus returns status of a particular notification
{ "resource": "" }
c181416
test
// DeleteNotification deletes a created notification
{ "resource": "" }
c181417
test
// NotifyDevice sends notification data to devices
{ "resource": "" }
c181418
test
// Simple assert call for unit and functional tests
{ "resource": "" }
c181419
test
// We could use Fallocate, but some test CI systems // do not support it, like Travis-ci.org.
{ "resource": "" }
c181420
test
// AddError appends an error to a list of general errors.
{ "resource": "" }
c181421
test
// AddFieldError appends an error to a list of field specific errors.
{ "resource": "" }
c181422
test
// HasErrors returns weather FormErrors instance contains at leas one error.
{ "resource": "" }
c181423
test
// NewError initializes FormErrors with one general error.
{ "resource": "" }
c181424
test
// NewFieldError initializes FormErrors with one field error.
{ "resource": "" }
c181425
test
// ChainHandlers executes each function from the arguments with handler // from the next function to construct a chan fo callers.
{ "resource": "" }
c181426
test
// FinalHandler is a helper function to wrap the last http.Handler element // in the ChainHandlers function.
{ "resource": "" }
c181427
test
// Hash returns a part of a MD5 sum of a file.
{ "resource": "" }
c181428
test
// IsHash checks is provided string a valid hash.
{ "resource": "" }
c181429
test
// WithBaseDir sets the directory in which template files // are stored.
{ "resource": "" }
c181430
test
// WithFileFindFunc sets the function that will return the // file path on disk based on filename provided from files // defind using WithTemplateFromFile or WithTemplateFromFiles.
{ "resource": "" }
c181431
test
// WithTemplateFromFiles adds a template parsed from files.
{ "resource": "" }
c181432
test
// WithTemplatesFromFiles adds a map of templates parsed from files.
{ "resource": "" }
c181433
test
// WithTemplateFromStrings adds a template parsed from string.
{ "resource": "" }
c181434
test
// WithTemplatesFromStrings adds a map of templates parsed from strings.
{ "resource": "" }
c181435
test
// WithFunction adds a function to templates.
{ "resource": "" }
c181436
test
// WithFunctions adds function map to templates.
{ "resource": "" }
c181437
test
// WithDelims sets the delimiters used in templates.
{ "resource": "" }
c181438
test
// New creates a new instance of Templates and parses // provided files and strings.
{ "resource": "" }
c181439
test
// RespondWithStatus executes a template with provided data into buffer, // then writes the the status and body to the response writer. // A panic will be raised if the template does not exist or fails to execute.
{ "resource": "" }
c181440
test
// RespondTemplate executes a named template with provided data into buffer, // then writes the the body to the response writer. // A panic will be raised if the template does not exist or fails to execute.
{ "resource": "" }
c181441
test
// Respond executes template with provided data into buffer, // then writes the the body to the response writer. // A panic will be raised if the template does not exist or fails to execute.
{ "resource": "" }
c181442
test
// RenderTemplate executes a named template and returns the string.
{ "resource": "" }
c181443
test
// New creates a new instance of Server.
{ "resource": "" }
c181444
test
// ServeUDP serves requests over UDP connection.
{ "resource": "" }
c181445
test
// Shutdown calls h2quic.Server.Close method.
{ "resource": "" }
c181446
test
// QuicHeadersHandler should be used as a middleware to set // quic related headers to TCP server that suggest alternative svc.
{ "resource": "" }
c181447
test
// GetRequestIPs returns all possible IPs found in HTTP request.
{ "resource": "" }
c181448
test
// DomainRedirectHandler responds with redirect url based on // domain and httpsPort, othervise it executes the handler.
{ "resource": "" }
c181449
test
// New creates a new instance of Servers with applied options.
{ "resource": "" }
c181450
test
// Add adds a new server instance by a custom name and with // address to listen to.
{ "resource": "" }
c181451
test
// TCPAddr returns a TCP address of the listener that a server // with a specific name is using. If there are more servers // with the same name, the address of the first started server // is returned.
{ "resource": "" }
c181452
test
// UDPAddr returns a UDP address of the listener that a server // with a specific name is using. If there are more servers // with the same name, the address of the first started server // is returned.
{ "resource": "" }
c181453
test
// Close stops all servers, by calling Close method on each of them.
{ "resource": "" }
c181454
test
// Shutdown gracefully stops all servers, by calling Shutdown method on each of them.
{ "resource": "" }
c181455
test
// Accept accepts TCP connection, sets keep alive and checks if a client // requested an encrypted connection.
{ "resource": "" }
c181456
test
// NewStaticFilesHandler serves a file under specified filesystem if it // can be opened, otherwise it serves HTTP from a specified handler.
{ "resource": "" }
c181457
test
// ServeHTTP serves an HTTP response for a request.
{ "resource": "" }
c181458
test
// MarshalJSON implements of json.Marshaler interface. // It marshals string representations of time.Duration.
{ "resource": "" }
c181459
test
// UnmarshalJSON implements json.Unamrshaler interface. // It parses time.Duration as strings.
{ "resource": "" }
c181460
test
// MarshalYAML implements of yaml.Marshaler interface. // It marshals string representations of time.Duration.
{ "resource": "" }
c181461
test
// UnmarshalYAML implements yaml.Unamrshaler interface. // It parses time.Duration as strings.
{ "resource": "" }
c181462
test
// NewHandler returns a handler that logs HTTP requests. // It logs information about remote address, X-Forwarded-For or X-Real-Ip, // HTTP method, request URI, HTTP protocol, HTTP response status, total bytes // written to http.ResponseWriter, response duration, HTTP referrer and // HTTP client user agent.
{ "resource": "" }
c181463
test
// WithPanicResponse sets a fixed body and its content type HTTP header // that will be returned as HTTP response on panic event. // If WithPanicResponseHandler is defined, this options are ignored.
{ "resource": "" }
c181464
test
// WithPanicResponseHandler sets http.Handler that will be executed on // panic event. It is useful when the response has dynamic content. // If the content is static it is better to use WithPanicResponse option // instead. This option has a precedence upon WithPanicResponse.
{ "resource": "" }
c181465
test
// New creates a new Handler from the handler that is wrapped and // protected with recover function.
{ "resource": "" }
c181466
test
// ServeHTTP implements http.Handler interface.
{ "resource": "" }
c181467
test
// NewContextFunc creates a new function that can be used to store // and access arbitrary data by keys.
{ "resource": "" }
c181468
test
// NewMapErrorRegistry creates a new instance of MapErrorRegistry.
{ "resource": "" }
c181469
test
// AddError adds a new error with a code to the registry. // It there already is an error or handler with the same code, // ErrErrorAlreadyRegistered will be returned.
{ "resource": "" }
c181470
test
// AddMessageError adds a new Error isntance with a code and message // to the registry. // It there already is an error or handler with the same code, // ErrErrorAlreadyRegistered will be returned.
{ "resource": "" }
c181471
test
// MustAddError calls AddError and panics in case of an error.
{ "resource": "" }
c181472
test
// MustAddMessageError calls AddMessageError and panics in case of an error.
{ "resource": "" }
c181473
test
// AddHandler adds a new error handler with a code to the registry. // It there already is an error or handler with the same code, // ErrErrorAlreadyRegistered will be returned.
{ "resource": "" }
c181474
test
// MustAddHandler calls AddHandler and panics in case of an error.
{ "resource": "" }
c181475
test
// Handler returns a handler that is registered under the provided code.
{ "resource": "" }
c181476
test
// New returns a new instance of Client with default values.
{ "resource": "" }
c181477
test
// Request makes a HTTP request based on Client configuration and // arguments provided.
{ "resource": "" }
c181478
test
// JSONContext provides the same functionality as JSON with Context instance passing to http.Request.
{ "resource": "" }
c181479
test
// StreamContext provides the same functionality as Stream with Context instance passing to http.Request.
{ "resource": "" }
c181480
test
// Stream makes a HTTP request and returns request body as io.ReadCloser, // to be able to read long running responses. Returned io.ReadCloser must be // closed at the end of read. To reuse HTTP connection, make sure that the // whole data is read before closing the reader.
{ "resource": "" }
c181481
test
// JSONUnmarshal decodes data into v and returns json.SyntaxError and // json.UnmarshalTypeError formated with additional information.
{ "resource": "" }
c181482
test
// ServeTCP executes http.Server.Serve method. // If the provided listener is net.TCPListener, keep alive // will be enabled. If server is configured with TLS, // a tls.Listener will be created with provided listener.
{ "resource": "" }
c181483
test
// ServeTCP serves request on TCP listener.
{ "resource": "" }
c181484
test
// Shutdown executes grpc.Server.GracefulStop method.
{ "resource": "" }
c181485
test
// HandleMethods uses a corresponding Handler based on HTTP request method. // If Handler is not found, a method not allowed HTTP response is returned // with specified body and Content-Type header.
{ "resource": "" }
c181486
test
// NewSetHeadersHandler sets provied headers on HTTP response.
{ "resource": "" }
c181487
test
// New initializes a new instance of Server.
{ "resource": "" }
c181488
test
// HashedPath returns a URL path with hash injected into the filename.
{ "resource": "" }
c181489
test
// New creates a new instance of Handler. // The first argument is the handler that will be executed // when maintenance mode is off.
{ "resource": "" }
c181490
test
// HTMLHandler is a HTTP middleware that should be used // alongide HTML pages.
{ "resource": "" }
c181491
test
// Status returns whether the maintenance mode is enabled.
{ "resource": "" }
c181492
test
// StatusHandler can be used in JSON-encoded HTTP API // to check the status of maintenance.
{ "resource": "" }
c181493
test
// OnHandler can be used in JSON-encoded HTTP API to enable maintenance. // It returns HTTP Status Created if the maintenance is enabled. // If the maintenance is already enabled, it returns HTTP Status OK.
{ "resource": "" }
c181494
test
// OffHandler can be used in JSON-encoded HTTP API to disable maintenance.
{ "resource": "" }
c181495
test
// MarshalJSON calls json.RawMessage method of the same name. Required since // PostIRCMessageRequest is of type json.RawMessage...
{ "resource": "" }
c181496
test
// MarshalJSON calls json.RawMessage method of the same name. Required since // PostArtifactRequest is of type json.RawMessage...
{ "resource": "" }
c181497
test
// MarshalJSON calls json.RawMessage method of the same name. Required since // PostArtifactResponse is of type json.RawMessage...
{ "resource": "" }
c181498
test
// MarshalJSON calls json.RawMessage method of the same name. Required since // HookChangedMessage is of type json.RawMessage...
{ "resource": "" }
c181499
test
// MarshalJSON calls json.RawMessage method of the same name. Required since // TriggerHookRequest is of type json.RawMessage...
{ "resource": "" }