Skip to main content

Questions tagged [type-conversion]

Type conversion is the way of implicitly or explicitly changing an entity of one data type into another. This is done to take advantage of certain features of type hierarchies or type representations.

0 votes
1 answer
9 views

Hexa Conversion to ASCII Character Encoding in XSLT

How do we convert below hexa input to ASCII character encoding in XSLT? The hexa inputs are always a fixed 8 hexadecimal digits. Can you please help, Thank You XML <input> <hex>...
Ram Adabala's user avatar
0 votes
1 answer
52 views

How to convert Long datatype to Hex format in XSLT and Perform Long Parsing in XSLT. XSLT to be used in DataPower

Below is my .Net VB code. How do we implement below code in XSLT (XSLT to be used in DataPower). Since we do not have Long datatype in XSLT, we're having tough time to implement below .Net code in ...
Ram Adabala's user avatar
1 vote
1 answer
24 views

.NET c#: Convert string (ej. "Mar 26, 2021 at 7:17 PM") to DateTime object

I am trying to create a DateTime object from strings like Dec 1, 2020 at 11:03 AM Mar 26, 2021 at 7:17 PM Oct 21, 2020 at 3:07 PM I am using this but it throws error: string format = "MMM d, ...
patsy2k's user avatar
  • 551
-4 votes
2 answers
53 views

$false.length -eq 1. Why does it equal 5 when it's the value of an argument of a script?

We have: $false.length 1 And: $var = $false $var.length 1 But: param ([string]$var = $false) $var.length 5 Why is that the case?
Ooker's user avatar
  • 2,625
0 votes
0 answers
56 views

More than one operator “=” error while compiling with CUDA 12.2 [closed]

I am trying to build Spconv library with CUDA 12.2 and GCC 9 (for some reasons I can't use GCC version > 10) There is a problem related to implicit conversions: [build] /usr/include/c++/9/bits/...
Ars ML's user avatar
  • 145
-2 votes
2 answers
92 views

Custom integer-like datatype with support for static casts without warnings

I'm writing my own little utility library, and I've opted to do something which I don't really see often (and there might be a reason) - I'm trying to implement a 'perfect' wrapper around C++ integer ...
Goubermouche's user avatar
0 votes
1 answer
82 views

Type conversion in user defined class in c++

I made a matrix class in c++ namespace LinAlg { template <typename T> class Matrix { public: Matrix(); Matrix(const uint64_t &rows, const uint64_t &cols); template <typename P&...
Vedant Yadav's user avatar
0 votes
1 answer
32 views

How to convert strings of different units to floats of the same?

I have a panda's dataframe with strings, but I want floats. The units on the strings are different though. One column might be in mm with a few in cm. The next column might be g with a few in kg, and ...
Joseph Summerhays's user avatar
-1 votes
3 answers
110 views

C segfault question: if one of two inputs is null, return the other

I have a function that takes two strings and returns another string (if you must know, its my implementation of strjoin). Now, I want to make it so that if one of the input strings is NULL, it will ...
Cab the Kid's user avatar
-1 votes
0 answers
21 views

Figma converted to React from Function12 not working; my problem or Function12's?

Disclaimer; I'm a beginner, can be considered completely clueless on whatever I'm doing. I exported my Figma design into Function12, trying to convert it into React (but for now, it's purely CSS) and ...
ccsru's user avatar
  • 1
0 votes
2 answers
38 views

Extract(year from column) yields year with one decimal in SQL, why?

I used this to extract year from datetime: select extract(year from orders.OrderDate) It gave me year with one decimal. e.g. 2019.0 Why is this? Any feedback would be appreciated! I also tried: YEAR(...
lu yan's user avatar
  • 1
0 votes
3 answers
95 views

Convert a complex string representation of a list (containing tuples, which look like function calls) into a list

I am trying to create a fixture for unit testing. I retrieve data from an API and need data that looks like what I get from the API without making the call to the API. I need to create a number of ...
Ted M.'s user avatar
  • 380
1 vote
1 answer
34 views

Conversion failed when converting the varchar value '1.1' to data type int

I have two columns, one of data type Smallint and the other int. I am trying to concatenate the two columns and a '.' to produce one final value but I keep getting the error: Conversion failed when ...
GBM's user avatar
  • 139
-1 votes
0 answers
38 views

Getting error of lossy conversion from int to byte in Java [duplicate]

I was trying to multiply 2 bytes, but it is not working and is giving the error of lossy conversion from int to byte. Here is my program: multiplication of 2 bytes class Program{ public static void ...
Fadeela's user avatar
1 vote
2 answers
64 views

Is it possible to override a Point2D object from a superclass to a Point2D.Float?

I have defined a class called Entity with a Point2D object in it called pos. The class is a superclass and it's not specified if pos should be a Point2D.Float or a Point2D.Double, that's left for the ...
Gabriel Vinagre Coppens's user avatar

15 30 50 per page
1
2 3 4 5
917