FIND YOUR NEXT FEW LINES

Results for “Form behavior”

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

1212 snippets foundClear filters
JavaScriptFiles & async

Format an ISO date

Format a UTC JavaScript Date deterministically.

JavaScript✓ Tested
C++Numbers & algorithms

Format decimal output

Use fixed and setprecision to print two C++ decimal places.

C++✓ Tested
Arduino / CText & bounded buffers

Format several integers in a fixed buffer

Arduino / C: snprintf limits writes to the buffer size and includes a terminating null byte.

Arduino / C✓ Tested
JavaScriptUTC date operations

Format whole seconds as hours minutes and seconds

JavaScript: Use integer divisions and remainders for a nonnegative duration.

JavaScript✓ Tested
TypeScriptUTC date operations

Format whole seconds as hours minutes and seconds

TypeScript: Use integer divisions and remainders for a nonnegative duration.

TypeScript✓ Tested
jQueryEvents

Handle a form locally

Prevent default form navigation while displaying input with jQuery.

jQuery✓ Tested
PowerShellStructured formats & encodings

Handle a malformed JSON document

PowerShell: ConvertFrom-Json reports a terminating conversion error under the selected error preference.

PowerShell✓ Tested
C#JSON & binary formats

Handle malformed JSON

C#: Catch JsonException for malformed JSON without swallowing unrelated failures.

C#✓ Tested
PythonStructured data & serialization

Handle malformed JSON input

Python: Catch JSONDecodeError without hiding unrelated programming errors.

Python✓ Tested
JavaStream transformations

Join transformed stream values

Java: Use Collectors.joining after converting elements to strings.

Java✓ Tested
Docker / ComposeDockerfile patterns

Keep exec-form arguments literal

Docker / Compose: JSON exec form does not expand shell environment variables.

Docker / Compose✓ Tested
PythonStrings & dates

Parse and format a date

Convert a date string into a datetime object, then format it in a different, human-readable order.

date✓ Tested