FIND YOUR NEXT FEW LINES

Results for “temp”

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

159 snippets foundClear filters
AngularGetting Started

Calculate a value in a template

Calculate a value in a template with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularGetting Started

Choose template content with @switch

Choose template content with @switch with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
PythonFile operations & archives

Clean up a temporary directory automatically

Python: Use TemporaryDirectory as a context manager so cleanup also happens after exceptions.

Python✓ Tested
Bash ScriptsFiles & reliability

Clean up a temporary directory automatically

Use an EXIT trap so temporary files are removed when the script ends.

mktemp✓ Tested
HTMLNative disclosure & dialogs

Clone inert template content into the document

HTML: Template children stay out of the rendered document until their fragment is inserted.

HTML✓ Tested
JavaFile operations & binary data

Create and clean up a temporary file

Java: Create a unique file and remove it in finally even when the operation fails.

Java✓ Tested
GoFiles & paths

Create and clean up a temporary file

Create and clean up a temporary file using a complete Go program with explicit sample inputs.

Go✓ Tested
JavaFile operations & binary data

Delete a known temporary file if present

Java: deleteIfExists returns whether a file was removed and still reports other I/O errors.

Java✓ Tested
AngularEvents & DOM interaction

Focus an input through its template reference

Focus an input through its template reference with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
Docker / ComposeGetting Started

Give a read-only container temporary storage

Docker / Compose: Give a read-only container temporary storage using a locally available Ubuntu image.

Docker / Compose✓ Tested
AngularTemplate-driven forms

Handle a template-driven form submission

Handle a template-driven form submission with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
PowerShellStrings & literal text

Insert values into a multiline template

PowerShell: A double-quoted here-string expands variable references.

PowerShell✓ Tested