FIND YOUR NEXT FEW LINES

Results for “event”

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

69 snippets foundClear filters
C++Tasks & synchronization

Increment a shared counter safely

C++: Atomic increments prevent lost updates when two threads change the same counter.

C++✓ Tested
Bash ScriptsFunction scope & composition

Keep a function variable local

Bash Scripts: Local prevents an ordinary function assignment from replacing a caller variable.

Bash Scripts✓ Tested
jQueryEvents

Mirror input text

Update a result as the user types using a jQuery input event.

jQuery✓ Tested
C#Text validation & encoding

Quote a literal search term for a regex

C#: Regex.Escape prevents metacharacters in a literal term from changing the pattern.

C#✓ Tested
HTMLAccessible structure

Remove an inactive section from keyboard navigation

HTML: Inert prevents interaction and accessibility exposure for an inactive subtree.

HTML✓ Tested
JavaRecords & reliable control flow

Represent a finite set of states

Java: Use an enum to prevent arbitrary strings from representing application states.

Java✓ Tested
PowerShellFunctions & parameter validation

Return a collection as one pipeline object

PowerShell: The unary comma prevents the returned array from being enumerated at this boundary.

PowerShell✓ Tested
HTMLNative disclosure & dialogs

Show the current value of a range input

HTML: Mirror range input events into a labeled output for a native slider.

HTML✓ Tested
PowerShellStrings & literal text

Use a literal value in a regular expression

PowerShell: Regex.Escape prevents a literal dot or other metacharacter from changing the match.

PowerShell✓ Tested