Results for “run”
Small, practical examples. Search by task or narrow things down below.
Read a variant only when it holds the expected type
C++: get_if returns a null pointer rather than throwing for another active alternative.
C++✓ Tested
Read a whole text file
Load text as one string instead of one item per line.
Get-Content✓ Tested
Read an annotated tag’s message
Git: for-each-ref can inspect annotation contents without including a commit diff.
Git✓ Tested
Read an HTTP query parameter
Read an HTTP query parameter using a complete Go program with explicit sample inputs.
Go✓ Tested
Read an image’s default command
Docker / Compose: Config.Cmd contains the command arguments stored in the image.
Docker / Compose✓ Tested
Read an ISO week date
Linux Commands: Use ISO week year, week number, and weekday directives together.
Linux Commands✓ Tested
Read an ISO week number
Python: Use isocalendar because ISO week years can differ from calendar years near January.
Python✓ Tested
Read an ISO week year and week number
Java: Use ISO week fields together because a week can belong to the previous calendar year.
Java✓ Tested
Read an ISO-style weekday number
JavaScript: Convert Sunday from zero to seven when using Monday-through-Sunday numbering.
JavaScript✓ Tested
Read an ISO-style weekday number
TypeScript: Convert Sunday from zero to seven when using Monday-through-Sunday numbering.
TypeScript✓ Tested
Read an object’s own enumerable values
JavaScript: Object.values provides values without their corresponding keys.
JavaScript✓ Tested
Read an object’s own enumerable values
TypeScript: Object.values provides values without their corresponding keys.
TypeScript✓ Tested