FIND YOUR NEXT FEW LINES

Results for “Set-Content”

Small, practical examples. Search by task or narrow things down below.

604 snippets foundClear filters
C#Dates & precise numbers

Convert Unix seconds to an offset-aware timestamp

C#: DateTimeOffset preserves the UTC offset explicitly.

C#✓ Tested
CSmall algorithms & bit operations

Count set bits in an unsigned integer

C: Clearing the lowest set bit on each iteration counts only one iteration per set bit.

C✓ Tested
PowerShellCommands & execution context

Discard incidental output from a setup command

PowerShell: Out-Null prevents setup objects from becoming part of a function or script’s useful result.

PowerShell✓ Tested
GoDates & times

Display an instant at a fixed offset

Display an instant at a fixed offset using a complete Go program with explicit sample inputs.

Go✓ Tested
Bash ScriptsParameter expansion

Distinguish unset variables from empty strings

Bash Scripts: Omitting the colon tests only whether a variable is unset; including it also treats an empty value as missing.

Bash Scripts✓ Tested
ReactCustom hooks

Encapsulate increment and reset operations

Encapsulate increment and reset operations with a small React component and explicit browser behavior.

React✓ Tested
PythonText validation & encoding

Escape text for HTML content

Python: Use html.escape before placing plain text in an HTML text or quoted attribute context.

Python✓ Tested
HTMLImages & embedded documents

Exclude a purely decorative image from accessible content

HTML: An empty alt indicates that this image adds no information beyond nearby content.

HTML✓ Tested
Bash ScriptsParameter expansion

Extract a substring by offset and length

Bash Scripts: Bash substring offsets start at zero for an ordinary string.

Bash Scripts✓ Tested
RustMaps & sets

Find common set members

Find common set members in a complete Rust program using the standard library.

Rust✓ Tested
JavaScriptObject behavior & collections

Find members absent from another set

JavaScript: Negate a membership test to calculate the set difference.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Find members absent from another set

TypeScript: Negate a membership test to calculate the set difference.

TypeScript✓ Tested