Top "Type-conversion" questions

Type conversion is the way of implicitly or explicitly changing an entity of one data type into another.

Conversion constructor vs. conversion operator: precedence

Reading some questions here on SO about conversion operators and constructors got me thinking about the interaction between them, namely …

c++ constructor operators type-conversion conversion-operator
How to combine Option values in Scala?

I want to be able to apply an operation f: (T,T) => T to Option[T] values in Scala. …

scala type-conversion scalaz
Swift: How to convert String to UInt?

According to Swift - Converting String to Int, there's a String method toInt(). But, there's no toUInt() method. So, how …

string swift type-conversion uint
Convert Scala Set into Java (java.util.Set)?

I have a Set in Scala (I can choose any implementation as I am creating the Set. The Java library …

scala type-conversion scala-collections scala-2.8 scala-java-interop
Java conditional operator ?: result type

I'm a bit puzzled about the conditional operator. Consider the following two lines: Float f1 = false? 1.0f: null; Float f2 = …

java nullpointerexception type-conversion conditional-operator
Convert numbers to strings in a cell array in MATLAB

I have a cell array with numbers and string data. I need to convert the numbers to strings so that …

string matlab type-conversion cell-array
Convert chrono::duration to string or C string

I'm trying to make a table (a 9 by 11 array) that stores the amount of time taken by a function by …

c++ string type-conversion chrono
MySQL automatically cast/convert a string to a number?

Does MySQL automatically casting\converting the string to numeric value? How does that conversion works? '1234'=1234 ? '1abc' = 1 ? 'text' = 1 ? …

mysql type-conversion casing
Flow: Create a flow type by extending another type

type someType = { keyOne: string, keyTwo: string, }; type someOtherType = { keyOne: string, keyTwo: string, keyThree: string, }; Both of these types are objects …

javascript casting type-conversion flowtype
Passing common types between Java and (Rhino) Javascript

I'm unclear on the rules for how types are converted between Javascript and Java when using (Mozilla) Rhino. There's some …

java javascript type-conversion rhino