FIND YOUR NEXT FEW LINES

Results for “C#”

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

3000 snippets foundClear filters
C#Dates & precise numbers

Find the length of a calendar month

C#: DaysInMonth applies the Gregorian leap-year rules.

C#✓ Tested
jQueryTraversal & selection

Find the nearest matching ancestor

Read a parent row attribute using jQuery closest.

jQuery✓ Tested
JavaDates & time zones

Find the next chosen weekday

Java: TemporalAdjusters.next excludes the starting day even if it already has that weekday.

Java✓ Tested
JavaScriptArray traversal & selection

Find the position of a matching item

JavaScript: findIndex returns -1 when the predicate matches nothing.

JavaScript✓ Tested
TypeScriptArray traversal & selection

Find the position of a matching item

TypeScript: findIndex returns -1 when the predicate matches nothing.

TypeScript✓ Tested
SQLSubqueries & ranked selection

Find the second-highest distinct value

SQL: Select the maximum below the overall maximum to skip ties at the top.

SQL✓ Tested
SQL ServerSubqueries & ranked selection

Find the second-highest distinct value

SQL Server: Select the maximum below the overall maximum to skip ties at the top.

SQL Server✓ Tested
PostgresSubqueries & ranked selection

Find the second-highest distinct value

Postgres: Select the maximum below the overall maximum to skip ties at the top.

Postgres✓ Tested
SQLiteSubqueries & ranked selection

Find the second-highest distinct value

SQLite: Select the maximum below the overall maximum to skip ties at the top.

SQLite✓ Tested
C#Collections & data structures

Find values common to two collections

C#: Intersect returns distinct values shared by the inputs.

C#✓ Tested
PythonMappings & sets

Find values missing from another collection

Python: Use a set difference to identify requested IDs absent from the available IDs.

Python✓ Tested
C#Collections & data structures

Find values missing from another collection

C#: Except removes duplicates as it calculates the set difference.

C#✓ Tested