Results for “struct”
Small, practical examples. Search by task or narrow things down below.
Combine text with a name
C++: Construct a greeting from a fixed prefix and a stored name.
C++✓ Tested
Combine text with a name
C: Construct a greeting from a fixed prefix and a stored name.
C✓ Tested
Count elements satisfying a predicate
C++: count_if counts matches without constructing a filtered collection.
C++✓ Tested
Create a compressed tar archive
Bundle a directory into a gzip-compressed tar archive, preserving the directory structure.
tar✓ Tested
Create an ordered list
Represent a sequence of steps using an HTML ordered list.
HTML✓ Tested
Declare document language and encoding
Set the HTML language, UTF-8 encoding and viewport for accessible responsive content.
HTML✓ Tested
Describe an object with an interface
Require named fields on a reusable object shape.
interface✓ Tested
Explain a sketch with comments
Arduino / C: Use single-line and block comments to document what a sketch does.
Arduino / C✓ Tested
Give an LED pin a constant name
Arduino / C: Use const to name the built-in LED pin and reuse it in output instructions.
Arduino / C✓ Tested
Pair terms and descriptions
Use a description list for a small HTML glossary.
HTML✓ Tested
Prepend items while preserving existing array values
Bash Scripts: Construct a new array with the new values before the quoted original expansion.
Bash Scripts✓ Tested
Round a decimal with an explicit rule
Java: Construct BigDecimal from text to avoid importing a binary floating-point approximation.
Java✓ Tested