_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c5500
// SetLogger set logger
c5501
// Fatalf is wrapper function
c5502
// Start starts CVE dictionary HTTP Server.
c5503
// NewRedis return Redis driver
c5504
// InsertJvn insert items fetched from JVN.
c5505
// GetFetchedFeedMeta selects hash in metafile of the year
c5506
// UpsertFeedHash selects hash in metafile of the year
c5507
// UpToDate checks whether last fetched feed is up to date
c5508
// OutDated checks whether last fetched feed is out dated
c5509
// StatusForStdout returns a status of fetched feed
c5510
// Year returns year, whether xml or not of the feed
c5511
// ToTableWriterRow generate data for table writer
c5512
// FetchConvert Fetch CVE vulnerability information from NVD
c5513
// Register registers new database migration. Must be called // from a file with name like "1_initialize_db.go".
c5514
// RegisterTx is like Register, but migration will be run in a transaction.
c5515
// DiscoverSQLMigrations scan the dir for files with .sql extension // and adds discovered SQL migrations to the collection.
c5516
// Format formats stats result.
c5517
// WithHTTPStat is a wrapper of httptrace.WithClientTrace. It records the // time of each httptrace hooks.
c5518
// Start crawling the host.
c5519
// Checks if the given URL can be fetched based on robots.txt policies.
c5520
// Process the specified URL.
c5521
// Process the robots.txt URL.
c5522
// Get the robots.txt group for this crawler.
c5523
// Set the crawl delay between this request and the next.
c5524
// Request the specified URL and return the response.
c5525
// Send a response to the crawler.
c5526
// Process the response for a URL.
c5527
// Scrape the document's content to gather all links
c5528
// Log prints to the standard error by default, based on the requested log verbosity.
c5529
// ComputeDelay returns the delay specified in the Crawler's Options, unless a // crawl-delay is specified in the robots.txt file, which has precedence.
c5530
// Visit asks the worker to harvest the links in this page.
c5531
// NewCrawlerWithOptions returns a Crawler initialized with the // provided Options.
c5532
// Initialize the Crawler's internal fields before a crawling execution.
c5533
// Set the Enqueue channel on the extender, based on the naming convention.
c5534
// Launch a new worker goroutine for a given host.
c5535
// Check if the specified URL is from the same host as its source URL, or if // nil, from the same host as one of the seed URLs.
c5536
// Enqueue the URLs returned from the worker, as long as it complies with the // selection policies.
c5537
// This is the main loop of the crawler, waiting for responses from the workers // and processing these responses.
c5538
// Stop terminates the crawler.
c5539
// Error implements of the error interface for CrawlError.
c5540
// Create a new CrawlError based on a source error.
c5541
// Create a new CrawlError with the specified message.
c5542
// cloneForRedirect returns a new URLContext with the given // destination URL with the same sourceURL and normalizedSourceURL.
c5543
// NewOptions creates a new set of Options with default values // using the provided Extender. The RobotUserAgent option should // be set to the name of your crawler, it is used to find the matching // entry in the robots.txt file.
c5544
// Converts a string to CamelCase
c5545
// ToLowerCamel converts a string to lowerCamelCase
c5546
// combine Command and Run
c5547
// unmarshal shell output to decode json
c5548
// unmarshal command output into xml
c5549
// NewEncoder creates a new encoder to create a new wav file. // Don't forget to add Frames to the encoder before writing.
c5550
// AddLE serializes and adds the passed value using little endian
c5551
// AddBE serializes and adds the passed value using big endian
c5552
// WriteFrame writes a single frame of data to the underlying writer.
c5553
// DecodeCueChunk decodes the optional cue chunk and extracts cue points.
c5554
// NewDecoder creates a decoder for the passed wav reader. // Note that the reader doesn't get rewinded as the container is processed.
c5555
// Seek provides access to the cursor position in the PCM data
c5556
// Err returns the first non-EOF error that was encountered by the Decoder.
c5557
// EOF returns positively if the underlying reader reached the end of file.
c5558
// ReadMetadata parses the file for extra metadata such as the INFO list chunk. // The entire file will be read and should be rewinded if more data must be // accessed.
c5559
// Duration returns the time duration for the current audio container
c5560
// readHeaders is safe to call multiple times
c5561
// sampleDecodeFloat64Func returns a function that can be used to convert // a byte range into a float64 value based on the amount of bits used per sample.
c5562
// Diff returns a slice where each element describes // a difference between a and b.
c5563
// Fdiff writes to w a description of the differences between a and b.
c5564
// Pdiff prints to p a description of the differences between a and b. // It calls Printf once for each difference, with no trailing newline. // The standard library log.Logger is a Printfer.
c5565
// Ldiff prints to l a description of the differences between a and b. // It calls Logf once for each difference, with no trailing newline. // The standard library testing.T and testing.B are Logfers.
c5566
// keyEqual compares a and b for equality. // Both a and b must be valid map keys.
c5567
// TokenErrorf is a convenient wrapper around Errorf that uses the // position of the given token.
c5568
// ParseWithPosition is like Parse except that it overrides the source // row and column position of the first character in the string, which should // be 1-based. // // This can be used when HIL is embedded in another language and the outer // parser knows the row and column where the HIL expression started within // the overall source file.
c5569
// Peek returns the next token in the stream without consuming it. A // subsequent call to Read will return the same token.
c5570
// Read consumes the next token in the stream and returns it.
c5571
// Close ensures that the token stream has been exhausted, to prevent // the goroutine in the underlying scanner from leaking. // // It's not necessary to call this if the caller reads the token stream // to EOF, since that implicitly closes the scanner.
c5572
// parseInterpolationSeq parses either the top-level sequence of literals // and interpolation expressions or a similar sequence within a quoted // string inside an interpolation expression. The latter case is requested // by setting 'quoted' to true.
c5573
// parseStringToken takes a token of either LITERAL or STRING type and // returns the interpreted string, after processing any relevant // escape sequences.
c5574
// parseBinaryOps calls itself recursively to work through all of the // operator precedence groups, and then eventually calls ParseExpressionTerm // for each operand.
c5575
// Eval evaluates the given AST tree and returns its output value, the type // of the output, and any error that occurred.
c5576
// evalNode is a private function that returns an EvalNode for built-in // types as well as any other EvalNode implementations.
c5577
// NewLiteralNode returns a new literal node representing the given // literal Go value, which must correspond to one of the primitive types // supported by HIL. Lists and maps cannot currently be constructed via // this function. // // If an inappropriately-typed value is provided, this function will // return an error. The main intended use of this function is to produce // "synthetic" literals from constants in code, where the value type is // well known at compile time. To easily store these in global variables, // see also MustNewLiteralNode.
c5578
// MustNewLiteralNode wraps NewLiteralNode and panics if an error is // returned, thus allowing valid literal nodes to be easily assigned to // global variables.
c5579
// IsUnknown returns true either if the node's value is itself unknown // of if it is a collection containing any unknown elements, deeply.
c5580
// IsUnknown reports whether a variable is unknown or contains any value // that is unknown. This will recurse into lists and maps and so on.
c5581
// Walk will walk an arbitrary Go structure and parse any string as an // HIL program and call the callback cb to determine what to replace it // with. // // This function is very useful for arbitrary HIL program interpolation // across a complex configuration structure. Due to the heavy use of // reflection in this function, it is recommend to write many unit tests // with your typical configuration structures to hilp mitigate the risk // of panics.
c5582
// Scan returns a channel that recieves Tokens from the given input string. // // The scanner's job is just to partition the string into meaningful parts. // It doesn't do any transformation of the raw input string, so the caller // must deal with any further interpretation required, such as parsing INTEGER // tokens into real ints, or dealing with escape sequences in LITERAL or // STRING tokens. // // Strings in the returned tokens are slices from the original string. // // startPos should be set to ast.InitPos unless the caller knows that // this interpolation string is part of a larger file and knows the position // of the first character in that larger file.
c5583
// scanIdentifier returns the extent of the prefix of the string that // represents a valid identifier, along with the length of that prefix // in runes. // // Identifiers may contain utf8-encoded non-Latin letters, which will // cause the returned "rune length" to be shorter than the byte length // of the returned string.
c5584
// NewVariable creates a new Variable for the given value. This will // attempt to infer the correct type. If it can't, an error will be returned.
c5585
// String implements Stringer on Variable, displaying the type and value // of the Variable.
c5586
// NewAvx512 - initialize sha256 Avx512 implementation.
c5587
// Reset - reset sha digest to its initial values
c5588
// Write to digest
c5589
// Sum - Return sha256 sum in bytes
c5590
// Interface function to assembly ode
c5591
// NewAvx512Server - Create new object for parallel processing handling
c5592
// Process - Sole handler for reading from the input channel
c5593
// Do a reset for this calculation
c5594
// Invoke assembly and send results back
c5595
// Sum - return sha256 sum in bytes for a given sum id.
c5596
// Reset digest back to default
c5597
// New returns a new hash.Hash computing the SHA256 checksum.
c5598
// Sum256 - single caller sha256 helper
c5599
// Return sha256 sum in bytes