FIND YOUR NEXT FEW LINES

Results for “type checking”

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

226 snippets foundClear filters
SQL ServerGetting Started

Create a table and insert its first row

SQL Server: Define column types and a primary key, then insert one row using an explicit column list.

SQL Server✓ Tested
PostgresGetting Started

Create a table and insert its first row

Postgres: Define column types and a primary key, then insert one row using an explicit column list.

Postgres✓ Tested
SQLiteGetting Started

Create a table and insert its first row

SQLite: Define column types and a primary key, then insert one row using an explicit column list.

SQLite✓ Tested
CDynamic memory & ownership

Create an independent copy of a byte buffer

C: Allocate the exact byte length and copy only after checking the result.

C✓ Tested
CBinary formats & structured parsing

Decode a 16-bit big-endian integer

C: Promote bytes to an unsigned integer type before combining shifted values.

C✓ Tested
TypeScriptTypes & functions

Describe an object with an interface

Require named fields on a reusable object shape.

interface✓ Tested
C#JSON & binary formats

Deserialize a JSON object into a dictionary

C#: Specify the value type expected from a known JSON shape.

C#✓ Tested
jQueryHTTP requests

Fetch a plain-text resource

jQuery: An explicit text data type keeps the response as a string.

jQuery✓ Tested
TypeScriptCollections & records

Filter and transform an array

Keep active objects and extract their names.

filter✓ Tested
Linux CommandsFinding & selecting files

Find empty regular files

Linux Commands: Use the empty predicate with a file type constraint.

Linux Commands✓ Tested
TypeScriptTypes & functions

Give an optional property a default

Handle missing object fields with nullish coalescing.

optional✓ Tested
PythonMappings & sets

Group records by a field

Python: Accumulate related values with defaultdict without checking whether each group exists.

Python✓ Tested