FIND YOUR NEXT FEW LINES

Results for “test”

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

985 snippets foundClear filters
JavaFiles & paths

Create nested directories

Create missing parent directories with Java Files.createDirectories.

Java✓ Tested
PythonFiles & paths

Create nested folders

Create a folder and any missing parent folders in one call. Running the code again is safe when the folder already exists.

directory✓ Tested
Linux CommandsFiles & permissions

Create private files with a restrictive umask

Linux Commands: Apply umask in a subshell so the surrounding shell is unaffected.

Linux Commands✓ Tested
ReactComponents & props

Customize a renderer through a function prop

Customize a renderer through a function prop with a small React component and explicit browser behavior.

React✓ Tested
Arduino / CTiming & control

Debounce a button with a stable-time check

Accept an input change only after it stays stable for 30 ms.

debounce✓ Tested
Docker / ComposeCompose applications

Declare a named volume in Compose

Mount persistent storage at a service path.

Compose✓ Tested
HTMLDocument structure

Declare document language and encoding

Set the HTML language, UTF-8 encoding and viewport for accessible responsive content.

HTML✓ Tested
GitTags & repository configuration

Declare LF normalization for a file type

Git: A gitattributes rule records text normalization expectations for matching paths.

Git✓ Tested
ReactPerformance & rendering

Defer the value used by a result panel

Defer the value used by a result panel with a small React component and explicit browser behavior.

React✓ Tested
PowerShellGetting Started

Define a function with a parameter

PowerShell: Define a function with a parameter using PowerShell 7.

PowerShell✓ Tested
PowerShellFunctions & control

Define a function with a typed parameter

Accept a name and return a greeting.

function✓ Tested
ReactCustom hooks

Delay publishing a rapidly changing value

Delay publishing a rapidly changing value with a small React component and explicit browser behavior.

React✓ Tested