Results for “Containers & compound values”
Small, practical examples. Search by task or narrow things down below.
Give an existing image another tag
Docker / Compose: Tagging adds a reference without copying the image layers.
Docker / Compose✓ Tested
Group records by a field
Python: Accumulate related values with defaultdict without checking whether each group exists.
Python✓ Tested
Group records into map entries
JavaScript: Initialize an array for a missing Map key before appending its values.
JavaScript✓ Tested
Group records into map entries
TypeScript: Initialize an array for a missing Map key before appending its values.
TypeScript✓ Tested
Handle three possible outcomes
Python: Check high, normal and low values with an ordered conditional chain.
Python✓ Tested
Handle three possible outcomes
C#: Check high, normal and low values with an ordered conditional chain.
C#✓ Tested
Handle three possible outcomes
Java: Check high, normal and low values with an ordered conditional chain.
Java✓ Tested
Handle three possible outcomes
JavaScript: Check high, normal and low values with an ordered conditional chain.
JavaScript✓ Tested
Handle three possible outcomes
TypeScript: Check high, normal and low values with an ordered conditional chain.
TypeScript✓ Tested
Handle three possible outcomes
C++: Check high, normal and low values with an ordered conditional chain.
C++✓ Tested
Handle three possible outcomes
C: Check high, normal and low values with an ordered conditional chain.
C✓ Tested
Hello World: Blink
Arduino / C: Blink the built-in LED slowly and then quickly, repeating both rates in loop().
Arduino / C✓ Tested