FIND YOUR NEXT FEW LINES

Results for “new”

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

88 snippets foundClear filters
C#Data & dates

Read a JSON property

Parse a JSON document and dispose it after reading in C#.

C#✓ Tested
C#Files & paths

Read a text file

Load a small text file into a C# string.

C#✓ Tested
Bash ScriptsInput streams & redirection

Read null-delimited filenames into an array

Bash Scripts: A null delimiter preserves spaces and embedded newlines in filenames.

Bash Scripts✓ Tested
GitCommits & history

Read recent commit messages

View a compact history in newest-first order.

log✓ Tested
jQueryForm serialization & state

Refresh a cached data attribute deliberately

jQuery: After the first read, data caches a parsed value; removeData forces a new attribute read.

jQuery✓ Tested
C#Collections

Remove duplicate values

Use LINQ Distinct and OrderBy for a sorted C# result.

C#✓ Tested
Linux CommandsFiles & permissions

Rename a file with mv

Linux Commands: Rename a known file in the current directory and inspect its new contents.

Linux Commands✓ Tested
GitBranches & ancestry

Rename the current branch

Git: branch -m changes the local branch name without creating a new commit.

Git✓ Tested
Bash ScriptsFiles & reliability

Replace a text file with an atomic rename

Prepare new content beside the target before renaming it into place.

atomic write✓ Tested
C#Strings

Replace literal text

Replace every literal occurrence in a C# string.

C#✓ Tested
PythonStrings & dates

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
SQLSelect & filter

Select specific columns

Read only the fields a result needs.

SELECT✓ Tested