Results for “UTF-8”
Small, practical examples. Search by task or narrow things down below.
List matching files
Enumerate immediate text files and sort their names in C#.
C#✓ Tested
List unordered pairs without duplicate reversals
Postgres: Join using an increasing key comparison to omit self-pairs and reversed duplicates.
Postgres✓ Tested
Look up a dictionary value
Use TryGetValue for a C# dictionary lookup with a fallback.
C#✓ Tested
Maintain a rolling sum in a circular window
Arduino / C: Subtract the overwritten sample before adding the next one.
Arduino / C✓ Tested
Make a pair of columns unique together
Postgres: A composite primary key permits repeated individual values while forbidding a duplicate combination.
Postgres✓ Tested
Map an input range to an output range
Scale an integer reading to a different interval.
map✓ Tested
Match a known text prefix
Postgres: A percent wildcard matches zero or more characters following the prefix.
Postgres✓ Tested
Match a text prefix
Postgres: Use a percent wildcard after a known prefix.
Postgres✓ Tested
Match one value from a short list
Postgres: Use IN for a set of allowed values.
Postgres✓ Tested
Measure a short delay with micros
Measure elapsed microseconds around a short operation.
micros✓ Tested
Measure a short text value
C#: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.
C#✓ Tested
Measure the length of ordinary text
Postgres: Use the engine’s text-length function; this ASCII example has no trailing spaces.
Postgres✓ Tested