FIND YOUR NEXT FEW LINES

Results for “k”

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

1871 snippets foundClear filters
ReactGetting Started

Control a text input

Control a text input with a small React component and explicit browser behavior.

React✓ Tested
Arduino / CDigital input & output

Control an LED from a button

Translate an active-low button input into an LED output.

button✓ Tested
CSSType & reading flow

Control tab width in preformatted content

CSS: Tab-size defines the interval of tab stops in a preformatted block.

CSS✓ Tested
Bash ScriptsVariables & text

Convert a string to lowercase

Normalize a text value using Bash expansion.

lowercase✓ Tested
Arduino / CSensor calculations

Convert a supplied ADC count to volts

Arduino / C: Scale a ten-bit ADC count using an explicit reference voltage.

Arduino / C✓ Tested
Bash ScriptsParameter expansion

Convert a variable to uppercase

Bash Scripts: Double caret transforms matching lowercase characters in Bash 4 or later.

Bash Scripts✓ Tested
PowerShellHashtables & object records

Convert an object’s properties into a hashtable

PowerShell: Enumerate PSObject.Properties when the set of property names is known only at runtime.

PowerShell✓ Tested
Arduino / CSensor calculations

Convert Celsius to Fahrenheit

Arduino / C: Use floating-point constants to avoid integer division.

Arduino / C✓ Tested
Arduino / CSerial protocols

Convert received ASCII letters to uppercase

Arduino / C: ctype functions should receive an unsigned character value.

Arduino / C✓ Tested
SQL ServerSelect & page

Convert text without raising a conversion error

Return NULL when a numeric conversion fails.

TRY_CONVERT✓ Tested
GoDates & times

Convert Unix seconds to UTC

Convert Unix seconds to UTC using a complete Go program with explicit sample inputs.

Go✓ Tested
Linux CommandsFiles & permissions

Copy a directory while preserving attributes

Linux Commands: Use cp -a for a recursive local copy that preserves links and ordinary file attributes.

Linux Commands✓ Tested