Results for “New-Item”
Small, practical examples. Search by task or narrow things down below.
Rename a file with mv
Linux Commands: Rename a known file in the current directory and inspect its new contents.
Linux Commands✓ Tested
Rename the current branch
Git: branch -m changes the local branch name without creating a new commit.
Git✓ Tested
Replace a text file with an atomic rename
Prepare new content beside the target before renaming it into place.
atomic write✓ Tested
Replace an array segment in place
JavaScript: splice returns removed items and inserts replacements at the chosen position.
JavaScript✓ Tested
Replace an array segment in place
TypeScript: splice returns removed items and inserts replacements at the chosen position.
TypeScript✓ Tested
Replace literal text
Replace every literal occurrence in a C# string.
C#✓ Tested
Replace text in a string
Replace every occurrence of a substring and keep the result in a new string. The original string is unchanged.
string✓ Tested
Represent a hierarchy with nested lists
HTML: Place the nested list inside its parent list item to preserve the hierarchy.
HTML✓ Tested
Rotate a nonempty array left by one element
C: Save the first item before shifting the remaining elements.
C✓ Tested
Select specific columns
Read only the fields a result needs.
SELECT✓ Tested
Serialize an object to JSON
Serialize a small anonymous C# object with System.Text.Json.
C#✓ Tested
Sort values with LINQ
Create an ascending sequence from C# integer values.
C#✓ Tested