FIND YOUR NEXT FEW LINES

Results for “item”

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

127 snippets foundClear filters
CGetting Started

Find what remains after division

C: Use the remainder operator to count items left after forming complete groups.

C✓ Tested
C#LINQ transformations

Flatten nested collections with SelectMany

C#: Concatenate the items from several sequences into one sequence.

C#✓ Tested
PythonIteration & sequences

Flatten one level of nested lists

Python: Use a nested comprehension when each input item is itself an iterable.

Python✓ Tested
PythonStrings & dates

Join strings with a separator

Combine a list of strings into one readable string with a separator between each item.

string✓ Tested
PowerShellFile operations & integrity

Move a file into another directory

PowerShell: Move-Item transfers an existing file to the chosen destination directory.

PowerShell✓ Tested
C++Containers & compound values

Process a first-in first-out queue

C++: Queue exposes its front item separately from the operation that removes it.

C++✓ Tested
PowerShellFile operations & integrity

Read a file size in bytes

PowerShell: The Length property of a file item reports its logical byte size.

PowerShell✓ Tested
PowerShellFiles & paths

Read a whole text file

Load text as one string instead of one item per line.

Get-Content✓ Tested
jQueryDOM & classes

Remove matching elements

Remove selected list items from the DOM with jQuery.

jQuery✓ Tested
PowerShellFile operations & integrity

Rename a file in its current directory

PowerShell: Rename-Item changes the name without moving the item to another directory.

PowerShell✓ Tested
JavaScriptArray restructuring

Replace an array segment in place

JavaScript: splice returns removed items and inserts replacements at the chosen position.

JavaScript✓ Tested
TypeScriptArray restructuring

Replace an array segment in place

TypeScript: splice returns removed items and inserts replacements at the chosen position.

TypeScript✓ Tested