_id stringlengths 2 7 | title stringclasses 1
value | partition stringclasses 3
values | text stringlengths 6 2.61k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
c9700 | train | // FeedBits ensures that at least nb bits exist in the bit buffer.
// If the underlying byteReader is a bufio.Reader, then this will fill the
// bit buffer with as many bits as possible, relying on Peek and Discard to
// properly advance the read offset. Otherwise, it will use ReadByte to fill the
// buffer with just t... | {
"resource": ""
} | ||
c9701 | train | // ReadBits reads nb bits in LSB order from the underlying reader. | {
"resource": ""
} | ||
c9702 | train | // ReadSymbol reads the next prefix symbol using the provided prefixDecoder. | {
"resource": ""
} | ||
c9703 | train | // ReadOffset reads an offset value using the provided rangesCodes indexed by
// the given symbol. | {
"resource": ""
} | ||
c9704 | train | // ReadPrefixCode reads the prefix definition from the stream and initializes
// the provided prefixDecoder. The value maxSyms is the alphabet size of the
// prefix code being generated. The actual number of representable symbols
// will be between 1 and maxSyms, inclusively. | {
"resource": ""
} | ||
c9705 | train | // readSimplePrefixCode reads the prefix code according to RFC section 3.4. | {
"resource": ""
} | ||
c9706 | train | // readComplexPrefixCode reads the prefix code according to RFC section 3.5. | {
"resource": ""
} | ||
c9707 | train | // Apply overwrites all checksum fields in d with the ones in cs. | {
"resource": ""
} | ||
c9708 | train | // Verify checks that all checksum fields in d matches those in cs. | {
"resource": ""
} | ||
c9709 | train | // Length computes the total bit-length using the Len and Cnt fields. | {
"resource": ""
} | ||
c9710 | train | // checkLengths reports whether the codes form a complete prefix tree. | {
"resource": ""
} | ||
c9711 | train | // checkPrefixes reports whether all codes have non-overlapping prefixes. | {
"resource": ""
} | ||
c9712 | train | // GeneratePrefixes assigns a prefix value to all codes according to the
// bit-lengths. This function is used by both compressors and decompressors.
//
// The input codes must have the Sym and Len fields populated and be
// sorted by symbol. The bit-lengths of each code must be properly allocated,
// such that it form... | {
"resource": ""
} | ||
c9713 | train | // readStreamHeader reads the Brotli stream header according to RFC section 9.1. | {
"resource": ""
} | ||
c9714 | train | // readBlockHeader reads a meta-block header according to RFC section 9.2. | {
"resource": ""
} | ||
c9715 | train | // readMetaData reads meta data according to RFC section 9.2. | {
"resource": ""
} | ||
c9716 | train | // readRawData reads raw data according to RFC section 9.2. | {
"resource": ""
} | ||
c9717 | train | // readContextMap reads the context map according to RFC section 7.3. | {
"resource": ""
} | ||
c9718 | train | // readBlockSwitch handles a block switch command according to RFC section 6. | {
"resource": ""
} | ||
c9719 | train | // setupTLSConfig builds the TLS configuration | {
"resource": ""
} | ||
c9720 | train | // GetConfigForClient implements the Config.GetClientCertificate callback | {
"resource": ""
} | ||
c9721 | train | // Decode searches the plugin by name, decodes the provided map into plugin. | {
"resource": ""
} | ||
c9722 | train | // DefineTimers defines `setTimeout`, `clearTimeout`, `setInterval`,
// `clearInterval` into global context. | {
"resource": ""
} | ||
c9723 | train | // New32WithSeed returns new 32-bit hasher set with explicit seed value | {
"resource": ""
} | ||
c9724 | train | // New64WithSeed returns a 64-bit hasher set with explicit seed value | {
"resource": ""
} | ||
c9725 | train | // New128WithSeed returns a 128-bit hasher set with explicit seed value | {
"resource": ""
} | ||
c9726 | train | //verifyNode walks down the tree until hitting a leaf, calculating the hash at each level
//and returning the resulting hash of Node n. | {
"resource": ""
} | ||
c9727 | train | //calculateNodeHash is a helper function that calculates the hash of the node. | {
"resource": ""
} | ||
c9728 | train | //NewTree creates a new Merkle Tree using the content cs. | {
"resource": ""
} | ||
c9729 | train | //buildWithContent is a helper function that for a given set of Contents, generates a
//corresponding tree and returns the root node, a list of leaf nodes, and a possible error.
//Returns an error if cs contains no Contents. | {
"resource": ""
} | ||
c9730 | train | //buildIntermediate is a helper function that for a given list of leaf nodes, constructs
//the intermediate and root levels of the tree. Returns the resulting root node of the tree. | {
"resource": ""
} | ||
c9731 | train | //RebuildTree is a helper function that will rebuild the tree reusing only the content that
//it holds in the leaves. | {
"resource": ""
} | ||
c9732 | train | //RebuildTreeWith replaces the content of the tree and does a complete rebuild; while the root of
//the tree will be replaced the MerkleTree completely survives this operation. Returns an error if the
//list of content cs contains no entries. | {
"resource": ""
} | ||
c9733 | train | //VerifyTree verify tree validates the hashes at each level of the tree and returns true if the
//resulting hash at the root of the tree matches the resulting root hash; returns false otherwise. | {
"resource": ""
} | ||
c9734 | train | //VerifyContent indicates whether a given content is in the tree and the hashes are valid for that content.
//Returns true if the expected Merkle Root is equivalent to the Merkle root calculated on the critical path
//for a given content. Returns true if valid and false otherwise. | {
"resource": ""
} | ||
c9735 | train | //String returns a string representation of the tree. Only leaf nodes are included
//in the output. | {
"resource": ""
} | ||
c9736 | train | // Load imports sql queries from any io.Reader. | {
"resource": ""
} | ||
c9737 | train | // LoadFromFile imports SQL queries from the file. | {
"resource": ""
} | ||
c9738 | train | // LoadFromString imports SQL queries from the string. | {
"resource": ""
} | ||
c9739 | train | // UseLocalCache causes Codec to cache items in local LRU cache. | {
"resource": ""
} | ||
c9740 | train | // Set caches the item. | {
"resource": ""
} | ||
c9741 | train | // Exists reports whether object for the given key exists. | {
"resource": ""
} | ||
c9742 | train | // Get gets the object for the given key. | {
"resource": ""
} | ||
c9743 | train | // Once gets the item.Object for the given item.Key from the cache or
// executes, caches, and returns the results of the given item.Func,
// making sure that only one execution is in-flight for a given item.Key
// at a time. If a duplicate comes in, the duplicate caller waits for the
// original to complete and receiv... | {
"resource": ""
} | ||
c9744 | train | // Stats returns cache statistics. | {
"resource": ""
} | ||
c9745 | train | // Prints pattern's SVG string without any argument | {
"resource": ""
} | ||
c9746 | train | // Generate returns pattern's SVG string | {
"resource": ""
} | ||
c9747 | train | // Base64String returns pattern's Base64 encoded string | {
"resource": ""
} | ||
c9748 | train | // URIimage returns pattern's uri image string | {
"resource": ""
} | ||
c9749 | train | // Hash returns SHA-1 encryption of a string | {
"resource": ""
} | ||
c9750 | train | // Map returns respective value of a number from a range to different range | {
"resource": ""
} | ||
c9751 | train | // HexVal returns decimal representation of a substring of a hexa decimal string | {
"resource": ""
} | ||
c9752 | train | // Merge merges two 'map' objects and returns the resultant object | {
"resource": ""
} | ||
c9753 | train | // Prints pattern's uri image string | {
"resource": ""
} | ||
c9754 | train | // New parses the arguments and returns an instance of Pattern struct that has linked
// methods to work further things | {
"resource": ""
} | ||
c9755 | train | // SvgStr returns string representing pattern's SVG string | {
"resource": ""
} | ||
c9756 | train | // generateBackground decides on background color for the pattern.
//
// It uses 'color' or 'baseColor' arguments for this task. | {
"resource": ""
} | ||
c9757 | train | // isPattern decides whether a pattern is a valid one or not | {
"resource": ""
} | ||
c9758 | train | // genaratePattern decides on type of pattern and build respective SVG object | {
"resource": ""
} | ||
c9759 | train | // geoChevrons build the chevrons SVG pattern | {
"resource": ""
} | ||
c9760 | train | // geoConcentricCircles build the concentric_circles SVG pattern | {
"resource": ""
} | ||
c9761 | train | // geoDiamonds build the diamonds SVG pattern | {
"resource": ""
} | ||
c9762 | train | // geoMosaicSquares build the mosaic_squares SVG pattern | {
"resource": ""
} | ||
c9763 | train | // geoNestedSquares build the nested_squares SVG pattern | {
"resource": ""
} | ||
c9764 | train | // geoOctagons build the octagons SVG pattern | {
"resource": ""
} | ||
c9765 | train | // geoOverlappingCircles build the overlapping_circles SVG pattern | {
"resource": ""
} | ||
c9766 | train | // geoOverlappingRings build the overlapping_rings SVG pattern | {
"resource": ""
} | ||
c9767 | train | // geoPlaid build the plaid SVG pattern | {
"resource": ""
} | ||
c9768 | train | // geoSineWaves build the sine_waves SVG pattern | {
"resource": ""
} | ||
c9769 | train | // geoSquares build the squares SVG pattern | {
"resource": ""
} | ||
c9770 | train | // geoTriangles build the triangles SVG pattern | {
"resource": ""
} | ||
c9771 | train | // BuildOctagon returns string representing an octagon shape | {
"resource": ""
} | ||
c9772 | train | // BuildTriangle returns string representing a triangle shape | {
"resource": ""
} | ||
c9773 | train | // BuildDiamond returns string representing a diamond shape | {
"resource": ""
} | ||
c9774 | train | // BuildRotatedTriangle returns string representing a rotated triangle shape | {
"resource": ""
} | ||
c9775 | train | // BuildHexagon returns string representing a hexagon shape | {
"resource": ""
} | ||
c9776 | train | // BuildChevron returns string representing a chevron shape | {
"resource": ""
} | ||
c9777 | train | // BuildPlus returns string representing an plus shape | {
"resource": ""
} | ||
c9778 | train | // DrawOuterMosaicTile returns string representing an outer mosaic tile shape | {
"resource": ""
} | ||
c9779 | train | // Str returns string representing whole SVG object | {
"resource": ""
} | ||
c9780 | train | // Rect adds a rectangle element to SVG object | {
"resource": ""
} | ||
c9781 | train | // Circle adds a circle element to SVG object | {
"resource": ""
} | ||
c9782 | train | // Path adds a path element to SVG object | {
"resource": ""
} | ||
c9783 | train | // Polyline adds a polyline element to SVG object | {
"resource": ""
} | ||
c9784 | train | // Group adds a group element to SVG object.
//
// It groups optionally provided elements together. | {
"resource": ""
} | ||
c9785 | train | // WriteArgs adds additional attributes to a SVG elements.
//
// It parses provides 'map' arguments to add attributes to SVG element. | {
"resource": ""
} | ||
c9786 | train | // Prints pattern's Base64 encoded string | {
"resource": ""
} | ||
c9787 | train | // Text returns the UTF-8 text content from the Response body. | {
"resource": ""
} | ||
c9788 | train | // adapterFor returns an Adapter for the given host.
// If it cannot find a specific named Adapter, it will return a the default Adapter.
// It will always return a valid Adapter. | {
"resource": ""
} | ||
c9789 | train | // NewResponse initializes a new whois response. | {
"resource": ""
} | ||
c9790 | train | // String returns a string representation of the response text.
// Returns an empty string if an error occurs. | {
"resource": ""
} | ||
c9791 | train | // Reader returns a new UTF-8 io.Reader for the response body. | {
"resource": ""
} | ||
c9792 | train | // Encoding returns an Encoding for the response body. | {
"resource": ""
} | ||
c9793 | train | // DetectContentType detects and sets the response content type and charset. | {
"resource": ""
} | ||
c9794 | train | // DetectCharset returns best guess for the reesponse body character set. | {
"resource": ""
} | ||
c9795 | train | // Checksum returns a hex-encoded SHA-1 checksum of the response Body. | {
"resource": ""
} | ||
c9796 | train | // Header returns a stringproto header representing the response. | {
"resource": ""
} | ||
c9797 | train | // ContentType returns an RFC 2045 compatible internet media type string. | {
"resource": ""
} | ||
c9798 | train | // WriteMIME writes a MIME-formatted representation of the response to an io.Writer. | {
"resource": ""
} | ||
c9799 | train | // ReadMIME reads a MIME-formatted representation of the response into a Response. | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.