Skip to main content

Questions tagged [primitive-types]

Built-in types in any programming language that are defined in an axiomatic way and cannot be divided into other types in the language.

primitive-types
0 votes
0 answers
32 views

As a wrapper object in JavaScript, why can not use 'new' to create a BigInt in JavasScript? [duplicate]

There are 5 wrapper objects in JavaScript: Number, BigInt, String, Boolean, and Symbol.You can use 'new' to create a Number, String, Boolean, Symbol. But you can not use 'new' to create a BigInt. what ...
Leo qiao's user avatar
0 votes
1 answer
48 views

Use WCF of .NET Framework to serialize a class as a primitive

I am using Windows Communication Foundation classes to serialize and deserialize classes to and from JSON in files via the DataContractJsonSerializer class. I know there are better ways to serialize ...
bchase's user avatar
  • 61
0 votes
0 answers
256 views

How to highlight input text when the edit panel opens in Lightning Datatable?

I have a requirement to do the following in a Lightning data table: When edit panel opens, the text inside should be selected. Today the default behavior is that pointer is at the end of the text (...
Abhishek's user avatar
0 votes
0 answers
140 views

How to detect auto-boxing and auto-unboxing in Kotlin?

I'm working on a fairly low-level Kotlin JVM library that deals a lot with Bytes and ByteArrays. As I'm dealing with large volumes of data, keeping performance of individual operations high is ...
Martin Häusler's user avatar
-3 votes
1 answer
95 views

NULL as an eighth 'primitive' data type [closed]

A mindless query arising from Java's less known data type 'null'. Would somebody be able to clarify whether or not 'null' is a literal reserved by the Java language and thus the disparity between it ...
Jim W. Moch's user avatar
-2 votes
1 answer
56 views

What are rules in casting primitive types in expressions in Java? [duplicate]

I'm trying to figure out why some castings work and why others do not. Can you explain to me why some of these examples work and others don't? Setup: I'm using jshell. byte one = 1; one ==> 1 ...
Argos's user avatar
  • 59
1 vote
0 answers
77 views

PHP Dependency Injection resolving class with primitive dependencies

I think I'm doing something wrong when trying to write my own Dependency Injection Container. I'm looking at the laravel's one, and it states in a comment // If the class is null, it means the ...
Kristian Vasilev's user avatar
1 vote
1 answer
100 views

Given an unknown primitive type array in the form of an object, convert it to double array C#

I have searched previous questions here, but nothing quite answers exactly what I am looking for. I am retrieving an array of primitive type via reflection using PropertyInfo in the form of type ...
Lanet Rino's user avatar
1 vote
1 answer
383 views

How to maintain a consistent encryption key in MongoDB client-side field level encryption?

I am using MongoDB client-side field level encryption to encrypt and decrypt data. However, I noticed that every time I execute the program, the primitive binary key changes. This makes it difficult ...
Muhammed Jishin Jamal TCP's user avatar
0 votes
3 answers
650 views

Does C have a concept of primitive types and if so what are they?

For example java has 8 primitive types as documented by Oracle. boolean, byte, short, char, int, long, float, double C appears to have many, many types, but what if any are considered primitive ...
user avatar
0 votes
1 answer
2k views

How to create a Double value from a Float value in Swift

I can't believe that I can't figure this out myself and I also cant find an answer online, but... I'm working in Swift after a long break working on Dart and Java. I have a situation where I have ...
User45i6h45ih3455's user avatar
0 votes
1 answer
61 views

Is there a way to find all the attributes of a primitive in JavaScript?

In Python, for example, I can use dir(str) to find all the attributes and methods of the string data type. Is there something similar in Javascript? Just want additional info on JavaScript primitives....
Tal's user avatar
  • 21
4 votes
1 answer
341 views

why primitive types (eg. number) are assignable to object types(e.g. Number) but not vice versa?

TLDR version: Why does TypeScript allow the following let num: Number = new Number(1); num = 1; But does not allow this let num: number = 1; num = new Number(1) It is a well-known fact that JS has ...
adal's user avatar
  • 51
0 votes
2 answers
78 views

Does the `===` operator in Javascript have separate definitions for primitives vs non-primitives?

With the === operator in Javascript, if it operators on primitives, it returns false if either the values are different or the types are different. If it's operating on non-primitives, it returns ...
RNdev's user avatar
  • 1,111
0 votes
0 answers
64 views

Javascript: Why don't array methods return a new array?

I understand that the reason methods on strings return a new string is that strings are immutable, so the method can't modify the string you pass to it. With an array, if you pass it to a method, that ...
RNdev's user avatar
  • 1,111

15 30 50 per page
1
2 3 4 5
55