FIND YOUR NEXT FEW LINES

Results for “dot”

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

131 snippets foundClear filters
GitMerging & replaying changes

List paths changed on a feature branch since its merge base

Git: A three-dot diff compares the branch tip with the common ancestor.

Git✓ Tested
C#Collections

Look up a dictionary value

Use TryGetValue for a C# dictionary lookup with a fallback.

C#✓ Tested
C#Getting Started

Measure a short text value

C#: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.

C#✓ Tested
C#JSON & binary formats

Measure the byte length of UTF-8 text

C#: Character count and encoded byte count can differ for non-ASCII text.

C#✓ Tested
C#File operations & paths

Move a file to a new filename

C#: File.Move changes the file path without loading its contents.

C#✓ Tested
C#Getting Started

Name a value that stays fixed

C#: Use a constant declaration or the language’s constant naming convention for a fixed limit.

C#✓ Tested
C#Types & reliable control flow

Narrow an object using a type pattern

C#: A successful is pattern introduces a strongly typed local variable.

C#✓ Tested
Linux CommandsFinding & selecting files

Normalize a path without requiring it to exist

Linux Commands: Use GNU realpath -m and relative-to to normalize dot segments.

Linux Commands✓ Tested
C++Filesystem operations

Normalize a path without touching the filesystem

C++: lexically_normal removes redundant dot components using path syntax alone.

C++✓ Tested
C#Text validation & encoding

Normalize canonically equivalent Unicode strings

C#: Normalize to NFC before an ordinal comparison of equivalent character sequences.

C#✓ Tested
JavaFile operations & binary data

Normalize relative path components

Java: Path.normalize removes redundant dot components without accessing the filesystem.

Java✓ Tested
C#Asynchronous work & URI handling

Observe cancellation through a token

C#: A cancellation token is cooperative; operations must check it or accept it as an argument.

C#✓ Tested