Category "types"

React Three Fiber OBJLoader conflicts witth @types/three

I am following the official React Three Fiber Docs here. I am trying to load .obj files into my scene, using this article: react-three-fiber docs: loading obj m

How do I idiomatically convert a bool to an Option or Result in Rust?

It seems there is no way of such one-line conversion using std. I do not like this kind of verbosity: match my_bool { true => Ok(()), false => Err

How can I define a type for a css color in TypeScript?

I have the following example code snippet: type Color = string; interface Props { color: Color; text: string; } function Badge(props: Props) { re

Entity Framework : Value cannot be null. Parameter name: type

When I execute update-database command, it shows this error message System.ArgumentNullException: Value cannot be null. Parameter name: type at Sy

Typescript input onchange event.target.value

In my react and typescript app, I use: onChange={(e) => data.motto = (e.target as any).value} How do I correctly define the typings for the class, so I woul

How to use spark with large decimal numbers?

My database has numeric value, which is up to 256-bit unsigned integer. However, spark's decimalType has a limit of Decimal(38,18). When I try to do calculatio

In Python, how would you check if a number is one of the integer types?

In Python, how could you check if the type of a number is an integer without checking each integer type, i.e., 'int', 'numpy.int32', or 'numpy.int64'? I though

SQLAlchemy implicit type conversion and Date validation

Let's assume this model class: class Person(db.Model): __tablename__ = "person" date_of_birth = db.Column(db.Date) With person being an instance of Pe

Where is the NoneType located in Python 3.x?

In Python 3, I would like to check whether value is either string or None. One way to do this is assert type(value) in { str, NoneType } But where is NoneTy

Twig - How to check if variable is a number / integer

How to check if variable is a number, integer or float? I can't find anything about this. Making project in Symfony 3.

How to concatenate columns in a Postgres SELECT?

I have two string columns a and b in a table foo. select a, b from foo returns values a and b. However, concatenation of a and b does not work. I tried : sel

Property Type Does Not Exist - MongoDB WithId<Document>

Using: ts-node: 10.7.0 MongoDB: 4.4.1 GraphQL: 16.3 I am trying to get a response back from a mongo db request. The request is successfully coming back, but typ

Convert python int into int16_t type

I know that python int can be converted into an c int type using ctypes.But how do I convert a python int into an int16_t type? I have tried: import ctypes as

Convert python int into int16_t type

I know that python int can be converted into an c int type using ctypes.But how do I convert a python int into an int16_t type? I have tried: import ctypes as

Why is Boolean's size in vba 2 Bytes?

In my apprenticeship we started doing now vba at school. When our teacher handed us out the data type summary, I was kind of confused. ..... Boolean -> 2

Possible to enforce type hints?

Is there any advantage to using the 'type hint' notation in python? import sys def parse(arg_line: int) -> str: print (arg_line) # passing a string, retu

YAML equivalent of array of objects in JSON

I have a JSON array of objects that I'm trying to convert to YAML. {"AAPL": [ { "shares": -75.088, "date": "11/27/2015" }, { "shares": 75.08

Class cannot find another class in the same namespace

I have a C# WebApp that we are doing for a client. I have two classes in the project, defined (in separate files) as such... A general utility library: name

Does a constructor has a "type" in C++ since it is a special member function

I recently learnt that constructors do not have names in C++ and some other things about them. I am also aware that a function has a type in C++ called a functi

How to docstring kwargs and their expected types

What is the conventional way to express in a docstring the expected types of keyword arguments? Or is this out of principle something I should not be doing at