FIND YOUR NEXT FEW LINES

Results for “value”

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

670 snippets foundClear filters
HTMLForm behavior

Identify the selected submit action

HTML: Each submit button can supply its own named value for the same form.

HTML✓ Tested
CDynamic memory & ownership

Initialize a byte buffer to zero

C: memset initializes each byte to the chosen unsigned-char value.

C✓ Tested
PostgresRows & writes

Inspect deleted rows

Return values from the rows a DELETE removes.

DELETE✓ Tested
JavaScriptObjects & JSON

Iterate over object entries

Read JavaScript property names and values using Object.entries.

JavaScript✓ Tested
JavaStrings

Join strings with a separator

Build a Java string from several values using String.join.

Java✓ Tested
C++Strings

Join strings with a separator

Use an output string stream to join C++ values without a trailing separator.

C++✓ Tested
PostgresWindows & text

Join text rows in a chosen order

Combine values using string_agg.

string_agg✓ Tested
Arduino / CArrays & embedded state

Keep a counter from wrapping at its maximum

Arduino / C: Increment only when the value is below its limit.

Arduino / C✓ Tested
CStructures & function interfaces

Keep function state between calls

C: A static local variable retains its stored value for the lifetime of the process.

C✓ Tested
PythonMappings & sets

Keep only the most recent items

Python: Use a bounded deque to discard the oldest item as new values arrive.

Python✓ Tested
Docker / ComposeExecution & file transfer

Load environment variables from a file

Docker / Compose: An env file supplies one KEY=value assignment per line.

Docker / Compose✓ Tested
Docker / ComposeCompose service options

Load service variables from an env file

Docker / Compose: env_file supplies runtime environment values.

Docker / Compose✓ Tested