Top "Type-conversion" questions

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

Decimal to Double conversion in Swift 3

I'm migrating a project from Swift 2.2 to Swift 3, and I'm trying to get rid of old Cocoa data types when …

ios swift migration type-conversion swift3
Is there any generic Parse() function that will convert a string to any type using parse?

I want to convert a string to a generic type like int or date or long based on the generic …

c# string parsing type-conversion
“Convert” Option[x] to x in Scala

I working with play for scala (2.1) and I need to convert an "Option[Long]" value to "Long". I know how …

scala casting playframework type-conversion options
Convert Pandas series containing string to boolean

I have a DataFrame named df as Order Number Status 1 1668 Undelivered 2 19771 Undelivered 3 100032108 Undelivered 4 2229 Delivered 5 00056 Undelivered I would like to convert …

python pandas boolean type-conversion series
Does it make sense to use "as" instead of a cast even if there is no null check?

In development blogs, online code examples and (recently) even a book, I keep stumbling about code like this: var y = …

c# casting type-conversion
CString to LPCTSTR conversion

I have a CString variable that i a need to convert to LPCTSTR(const char*) .I need this conversion so …

c++ type-conversion cstring
SQL Server string to varbinary conversion

Ok, the problem is that there's a merger or join that needs to be done on 2 tables. One has file …

sql string type-conversion varbinary
Convert Java Map to Scala Map

I have a java map: java.util.Map<SomeObject, java.util.Collection<OtherObject>> and I would …

java scala type-conversion scala-collections scala-java-interop
Convert io.BytesIO to io.StringIO to parse HTML page

I'm trying to parse a HTML page I retrieved through pyCurl but the pyCurl WRITEFUNCTION is returning the page as …

html beautifulsoup pycurl stringio type-conversion
What's the point of .slice(0) here?

I was studying the jQuery source when I found this (v1.5 line 2295): namespace = new RegExp("(^|\\.)" + jQuery.map( namespaces.slice(0).sort(), …

javascript jquery type-conversion slice