Examples

Page 17 of 50

Browse code examples

rustSnippet

Join A Slice Into One String

Join a string slice into a separator-delimited String, convert numeric slices with map + to_string first, and see how empty and single-element slices behave.

sqlSnippet

GiST KNN Orders By Distance

GiST indexes answer nearest-neighbor queries directly: ORDER BY location <-> point returns rows from nearest to farthest without a sort step.

sqlSnippet

UNION Stops Recursive CTE Loops

Cycle-tainted hierarchy walks terminate when the recursive CTE uses UNION: duplicate rows are discarded, so a repeated node produces nothing new.

sqlSnippet

VALUES CTE Inline Lookup Join

Turn a small hand-written tuple list into an inline WITH ... AS (VALUES ...) CTE and LEFT JOIN against it, so unmatched parameters return zero rows.

goSnippet

Inspect Float Bits Float64bits

Split IEEE-754 doubles into sign, exponent, and mantissa fields with math.Float64bits, and see why bitwise comparison is the only reliable NaN identity test.

goSnippet

Hex Dump Rows With Offsets

Render arbitrary bytes as an offset-labeled hex dump with hex.EncodeToString and manual column math, the layout debuggers and protocol tools print.

goSnippet

DumpRequest Wire Level Preview

Preview the wire format of a request with httputil.DumpRequest so the request line, Host header, and body framing are visible without a packet capture.