Results for “date difference”
Small, practical examples. Search by task or narrow things down below.
Return a value through a named output variable
Bash Scripts: A Bash nameref can update a caller-supplied variable without command substitution.
Bash Scripts✓ Tested
Select object properties
Create a smaller object with only the fields you need.
Select-Object✓ Tested
Serialize an object to JSON
Serialize a small anonymous C# object with System.Text.Json.
C#✓ Tested
Set an element attribute
Update an HTML link using jQuery attr.
jQuery✓ Tested
Split a string into words
Split text on whitespace, automatically treating repeated spaces, tabs, and line breaks as a single separator.
string✓ Tested
Split delimited text with positions
Retain original order with STRING_SPLIT ordinals.
STRING_SPLIT✓ Tested
Sum integer values
Sum a C# sequence using LINQ.
C#✓ Tested
Sum integer values
Reduce a Java integer stream to its sum.
Java✓ Tested
Test whether tracked working files changed
Git: A quiet diff returns status one for differences, so handle it in a conditional.
Git✓ Tested
Use an automatically removed temporary file
C: tmpfile creates a binary update stream whose file is removed when closed.
C✓ Tested
Use an optional fallback
Use Optional.orElse to provide a default for a missing Java value.
Java✓ Tested