Results for “ps”
Small, practical examples. Search by task or narrow things down below.
Update several classifications in one statement
Postgres: A CASE expression computes the new value for each row covered by the update predicate.
Postgres✓ Tested
Use a counted loop
PowerShell: Use a counted loop using PowerShell 7.
PowerShell✓ Tested
Use a fallback for a missing hashtable entry
PowerShell: Test the key explicitly so legitimate false or zero values are preserved.
PowerShell✓ Tested
Use a literal value in a regular expression
PowerShell: Regex.Escape prevents a literal dot or other metacharacter from changing the match.
PowerShell✓ Tested
Visually distinguish a disabled control
CSS: The disabled pseudo-class follows the control’s actual disabled state.
CSS✓ Tested
Wait for a container to exit
Docker / Compose: wait blocks until the container stops and prints its exit code.
Docker / Compose✓ Tested
Wait for shared state with a condition variable
C++: Use a predicate so spurious wakeups cannot allow the worker to continue before the state is ready.
C++✓ Tested
Write a multiline string without expanding variables
PowerShell: A single-quoted here-string preserves dollar signs literally.
PowerShell✓ Tested
Write object records to a CSV file
PowerShell: Export-Csv uses property names as headers and quotes values when needed.
PowerShell✓ Tested
Write UTF-8 text to a file
Save a string without adding an extra newline.
Set-Content✓ Tested