FIND YOUR NEXT FEW LINES

Results for “pre”

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

429 snippets foundClear filters
JavaDates & time zones

Parse a date with an explicit input pattern

Java: Use DateTimeFormatter for a non-ISO date representation.

Java✓ Tested
C++Numeric parsing & calculations

Parse a hexadecimal integer with from_chars

C++: An explicit radix controls digit interpretation without a locale dependency.

C++✓ Tested
Bash ScriptsText parsing & arithmetic

Parse digits with leading zeroes as decimal

Bash Scripts: The 10# prefix avoids Bash treating a leading zero as an octal notation.

Bash Scripts✓ Tested
Arduino / CGetting Started

Print a label beside a number

Arduino / C: Combine Serial.print and Serial.println to put text and a value on one line.

Arduino / C✓ Tested
Linux CommandsTransforming text

Print a selected range of lines

Linux Commands: Use sed -n with a line address to suppress other output.

Linux Commands✓ Tested
PythonStructured data & serialization

Produce compact deterministic JSON

Python: Sort dictionary keys and remove separator whitespace for a reproducible representation.

Python✓ Tested
CBinary formats & structured parsing

Quote a CSV field and double embedded quotes

C: A quoted CSV field represents a quote character by repeating it.

C✓ Tested
C#Text validation & encoding

Quote a literal search term for a regex

C#: Regex.Escape prevents metacharacters in a literal term from changing the pattern.

C#✓ Tested
Arduino / CGetting Started

Read a button in the Serial Monitor

Arduino / C: Use a pull-up input and if/else to report three button readings.

Arduino / C✓ Tested
Arduino / CDigital input & output

Read a button with the internal pull-up

Treat a grounded input as a pressed button.

INPUT_PULLUP✓ Tested
SQLSubqueries & ranked selection

Read a page after a known unique key

SQL: A keyset predicate avoids scanning and discarding an increasing offset on a suitable index.

SQL✓ Tested
SQL ServerSubqueries & ranked selection

Read a page after a known unique key

SQL Server: A keyset predicate avoids scanning and discarding an increasing offset on a suitable index.

SQL Server✓ Tested