FIND YOUR NEXT FEW LINES

Results for “C#”

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

3000 snippets foundClear filters
TypeScriptGetting Started

Divide using a fractional number

TypeScript: Use a floating-point operand to preserve the fractional part of a division.

TypeScript✓ Tested
C++Getting Started

Divide using a fractional number

C++: Use a floating-point operand to preserve the fractional part of a division.

C++✓ Tested
CGetting Started

Divide using a fractional number

C: Use a floating-point operand to preserve the fractional part of a division.

C✓ Tested
HTMLImages & embedded documents

Draw a basic rectangle on a labeled canvas

HTML: Canvas requires script to draw pixels; provide alternative content and an accessible label.

HTML✓ Tested
Docker / ComposeLimits & process security

Drop all optional Linux capabilities

Docker / Compose: The effective capability mask becomes zero after cap-drop ALL.

Docker / Compose✓ Tested
Docker / ComposeCompose service options

Drop capabilities for a Compose service

Docker / Compose: cap_drop ALL removes optional Linux capabilities.

Docker / Compose✓ Tested
Docker / ComposeGetting Started

Drop Linux capabilities for a simple command

Docker / Compose: Drop Linux capabilities for a simple command using a locally available Ubuntu image.

Docker / Compose✓ Tested
JavaScriptNumbers & numeric validation

Drop the fractional part toward zero

JavaScript: Math.trunc differs from floor for negative inputs.

JavaScript✓ Tested
TypeScriptNumbers & numeric validation

Drop the fractional part toward zero

TypeScript: Math.trunc differs from floor for negative inputs.

TypeScript✓ Tested
GoFunctions & types

Embed a struct for shared fields

Embed a struct for shared fields using a complete Go program with explicit sample inputs.

Go✓ Tested
AngularComponents & communication

Emit a typed object from a child

Emit a typed object from a child with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
Docker / ComposeCompose service options

Enable an init process for a service

Docker / Compose: init adds a small PID 1 process to forward signals and reap children.

Docker / Compose✓ Tested