FIND YOUR NEXT FEW LINES

Results for “C”

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

3000 snippets foundClear filters
PostgresGetting Started

Read the smallest and largest values

Postgres: Use MIN and MAX without sorting and fetching every row.

Postgres✓ Tested
SQLiteGetting Started

Read the smallest and largest values

SQLite: Use MIN and MAX without sorting and fetching every row.

SQLite✓ Tested
SQLiteTables & writes

Read values from an inserted row

Use RETURNING to retrieve an automatically assigned row ID.

RETURNING✓ Tested
SQL ServerJSON & results

Read values generated by INSERT

Capture an IDENTITY value with OUTPUT.

OUTPUT✓ Tested
Bash ScriptsVariables & text

Remove a filename extension

Keep the path while removing its final extension.

filename✓ Tested
jQueryForm serialization & state

Remove an optional attribute entirely

jQuery: removeAttr removes the attribute instead of setting a string that might still activate it.

jQuery✓ Tested
GoStrings & text

Remove an optional prefix

Remove an optional prefix using a complete Go program with explicit sample inputs.

Go✓ Tested
PythonGetting Started

Repeat a fixed number of times

Python: Use a counted loop to print three numbered steps.

Python✓ Tested
JavaGetting Started

Repeat a fixed number of times

Java: Use a counted loop to print three numbered steps.

Java✓ Tested
JavaText validation & formatting

Repeat text a fixed number of times

Java: Use String.repeat with a nonnegative repetition count.

Java✓ Tested
HTMLGetting Started

Require a form field

HTML: Learn how to require a form field in a complete browser example.

HTML✓ Tested
AngularTemplate-driven forms

Require a minimum text length

Require a minimum text length with a standalone Angular component and explicit browser behavior.

Angular✓ Tested