Results for “New-Item”
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
Open a link in a separate tab
Declare a separate browsing context with an explicit noopener relationship.
HTML✓ Tested
Prevent gaining privileges through exec
Docker / Compose: The no-new-privileges flag is visible in process status.
Docker / Compose✓ Tested
Read the first collection element
Python: Access index zero only after establishing that the collection is nonempty.
Python✓ Tested
Read the first collection element
C#: Access index zero only after establishing that the collection is nonempty.
C#✓ Tested
Read the first collection element
Java: Access index zero only after establishing that the collection is nonempty.
Java✓ Tested
Read the first collection element
JavaScript: Access index zero only after establishing that the collection is nonempty.
JavaScript✓ Tested
Read the first collection element
TypeScript: Access index zero only after establishing that the collection is nonempty.
TypeScript✓ Tested
Read the first collection element
C++: Access index zero only after establishing that the collection is nonempty.
C++✓ Tested
Read the first collection element
C: Access index zero only after establishing that the collection is nonempty.
C✓ Tested
Remove a trailing line ending
Use strcspn to terminate a C string at its first newline or carriage return.
C✓ Tested
Replace one collection element
Python: Update an existing element at a known valid index.
Python✓ Tested