FIND YOUR NEXT FEW LINES

Results for “C#”

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

3000 snippets foundClear filters
Docker / ComposeCompose service options

Override the image entrypoint in Compose

Docker / Compose: entrypoint and command combine as executable and arguments.

Docker / Compose✓ Tested
Docker / ComposeExecution & file transfer

Override the process working directory

Docker / Compose: The workdir option sets the directory for the container command.

Docker / Compose✓ Tested
RustTesting & reusable patterns

Own a heap-allocated value with Box

Own a heap-allocated value with Box in a complete Rust program using the standard library.

Rust✓ Tested
C++Ownership & optional values

Own one dynamically allocated value with unique_ptr

C++: make_unique allocates a value whose lifetime is tied to its owning smart pointer.

C++✓ Tested
PythonStructured data & serialization

Pack and unpack a network-order integer

Python: Use an explicit byte order so the binary format is independent of the host architecture.

Python✓ Tested
Arduino / CBinary values & packets

Pack two small values into one byte

Arduino / C: Mask each four-bit value before combining it.

Arduino / C✓ Tested
JavaScriptStrings

Pad a numeric label

Convert a number to text and pad it to a fixed width.

JavaScript✓ Tested
C#Text validation & encoding

Pad a numeric label to a fixed width

C#: Use a numeric format specifier to add leading zeroes.

C#✓ Tested
AngularLists & control flow

Page through a collection

Page through a collection with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
JavaScriptArray traversal & selection

Pair corresponding array items by position

JavaScript: Validate equal lengths before zipping when missing counterparts would be an error.

JavaScript✓ Tested
TypeScriptArray traversal & selection

Pair corresponding array items by position

TypeScript: Validate equal lengths before zipping when missing counterparts would be an error.

TypeScript✓ Tested
C#LINQ transformations

Pair corresponding collection elements

C#: Zip stops at the shorter sequence, so validate lengths separately if mismatches are an error.

C#✓ Tested