FIND YOUR NEXT FEW LINES

Results for “cr”

Small, practical examples. Search by task or narrow things down below.

1833 snippets foundClear filters
GoDates & times

Format a UTC timestamp

Format a UTC timestamp using a complete Go program with explicit sample inputs.

Go✓ Tested
Linux CommandsDates & process utilities

Format a zero-padded numeric label

Linux Commands: Use printf formatting instead of concatenating a variable number of zeroes.

Linux Commands✓ Tested
RustParsing & byte data

Format an integer as padded hexadecimal

Format an integer as padded hexadecimal in a complete Rust program using the standard library.

Rust✓ Tested
ReactComponents & props

Forward input props to a reusable field

Forward input props to a reusable field with a small React component and explicit browser behavior.

React✓ Tested
SQL ServerTransactions & tables

Generate a bounded sequence recursively

Use a recursive CTE with a recursion limit.

recursive CTE✓ Tested
PostgresDates & series

Generate a sequence of numbers

Create rows without a stored table.

generate_series✓ Tested
Linux CommandsDates & process utilities

Generate a stepped sequence

Linux Commands: Use seq when a command pipeline needs a numeric sequence.

Linux Commands✓ Tested
Arduino / CDigital signals & interrupts

Generate and measure a short output pulse

Arduino / C: delayMicroseconds can create a short blocking pulse on an output pin.

Arduino / C✓ Tested
SQLiteQueries & text

Generate numbers with a recursive CTE

Build a bounded sequence using SQL recursion.

recursive CTE✓ Tested
PostgresRows & writes

Get the latest row in each group

Select one ordered row per key with DISTINCT ON.

DISTINCT ON✓ Tested
HTMLGetting Started

Give a date a machine-readable value

HTML: Learn how to give a date a machine-readable value in a complete browser example.

HTML✓ Tested
Bash ScriptsFunctions & arguments

Give a function an optional argument

Let callers omit a value while keeping nounset enabled.

optional argument✓ Tested