Results for “form”
Small, practical examples. Search by task or narrow things down below.
Control a radio-button group
Control a radio-button group with a small React component and explicit browser behavior.
React✓ Tested
Convert ASCII text to lowercase safely
C: Cast to unsigned char before calling ctype functions on a possibly signed char.
C✓ Tested
Convert between hexadecimal text and bytes
PowerShell: Use the .NET hexadecimal helpers instead of parsing byte pairs manually.
PowerShell✓ Tested
Convert bytes to Base64 and back
C#: Encode text to UTF-8 before converting it to a Base64 representation.
C#✓ Tested
Convert tab stops to spaces
Linux Commands: Use expand with a fixed tab width when preparing plain-text alignment.
Linux Commands✓ Tested
Count Unicode code points
Java: Use codePointCount when supplementary characters should count as one rather than two UTF-16 units.
Java✓ Tested
Create a reusable one-to-many lookup
C#: ToLookup groups values by key and returns an empty sequence for an unknown key.
C#✓ Tested
Decode a 16-bit big-endian integer
C: Promote bytes to an unsigned integer type before combining shifted values.
C✓ Tested
Decode a validated pair of hexadecimal digits
C: Convert each nibble and reject a nonhexadecimal character before combining them.
C✓ Tested
Decode hexadecimal bytes
C#: FromHexString and ToHexString handle binary data without manually parsing pairs of characters.
C#✓ Tested
Defer the value used by a result panel
Defer the value used by a result panel with a small React component and explicit browser behavior.
React✓ Tested
Delete a cached data entry
jQuery: removeData removes the jQuery cache value for the selected key.
jQuery✓ Tested