Results for “C++”
Small, practical examples. Search by task or narrow things down below.
List files by extension
Enumerate regular files and return their names in order.
Get-ChildItem✓ Tested
List newly added staged files only
Git: Filter the cached diff by added status while leaving modified files out.
Git✓ Tested
List only staged filenames
Git: The cached diff compares the index with HEAD rather than comparing working files with the index.
Git✓ Tested
Load environment variables from a file
Docker / Compose: An env file supplies one KEY=value assignment per line.
Docker / Compose✓ Tested
Look up a map key
Use find to read a C++ map without inserting a missing key.
C++✓ Tested
Map an input range to an output range
Scale an integer reading to a different interval.
map✓ Tested
Map items to multiple output values
JavaScript: flatMap combines mapping and a one-level flattening operation.
JavaScript✓ Tested
Map items to multiple output values
TypeScript: flatMap combines mapping and a one-level flattening operation.
TypeScript✓ Tested
Mark a nonurgent state update as a transition
Mark a nonurgent state update as a transition with a small React component and explicit browser behavior.
React✓ Tested
Mark the language of a phrase inside a page
HTML: An element-level lang attribute identifies a language change within the document.
HTML✓ Tested
Measure a duration between instants
Measure a duration between instants using a complete Go program with explicit sample inputs.
Go✓ Tested
Measure a node after the first render
Measure a node after the first render with a standalone Angular component and explicit browser behavior.
Angular✓ Tested