Results for “value”
Small, practical examples. Search by task or narrow things down below.
Identify the selected submit action
HTML: Each submit button can supply its own named value for the same form.
HTML✓ Tested
Initialize a byte buffer to zero
C: memset initializes each byte to the chosen unsigned-char value.
C✓ Tested
Inspect deleted rows
Return values from the rows a DELETE removes.
DELETE✓ Tested
Iterate over object entries
Read JavaScript property names and values using Object.entries.
JavaScript✓ Tested
Join strings with a separator
Build a Java string from several values using String.join.
Java✓ Tested
Join strings with a separator
Use an output string stream to join C++ values without a trailing separator.
C++✓ Tested
Join text rows in a chosen order
Combine values using string_agg.
string_agg✓ Tested
Keep a counter from wrapping at its maximum
Arduino / C: Increment only when the value is below its limit.
Arduino / C✓ Tested
Keep function state between calls
C: A static local variable retains its stored value for the lifetime of the process.
C✓ Tested
Keep only the most recent items
Python: Use a bounded deque to discard the oldest item as new values arrive.
Python✓ Tested
Load environment variables from a file
Docker / Compose: An env file supplies one KEY=value assignment per line.
Docker / Compose✓ Tested
Load service variables from an env file
Docker / Compose: env_file supplies runtime environment values.
Docker / Compose✓ Tested