Join us in building a kind, collaborative learning community via our updatedCode of Conduct.

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
3answers
42 views

How to convert string containing variable content to JSON

I am already using JsonSerializer of Newtonesoft Package to convert strings to JSON format ,but it can't convert this string to JSON.{"isSuccess": true,"elapsed": 54,"results": {...
1
vote
4answers
103 views

Converting a struct of 4 integers to a float

I am new to programming and I am not strong in pointers and typecasting, so I need some help.I am using IAR Workbench and STM32L475.I am trying to convert 4 bytes in a struct to a float, after ...
1
vote
2answers
28 views

DerivedClass as value for ParentClass type variable

i am new to c# and im developing an rpg game enginei have my base class Item wich is parent for Weapon and Armour,weapon and armour classes have extra variables for stats, weapon slots, armour type,...
0
votes
0answers
21 views

Cannot convert Java Object to xml when the java class has 1 or more property as “Object” type. int, string properties transformation work fine

I am trying to parse data and write the data into multiple xml files, zip them and save them at a location.When I create a response object that does not have a property as a "Object" it works fine, ...
5
votes
0answers
80 views

Is it possible to get a performance advantage by using integers in R? [on hold]

In R, an advantage of using integers over doubles is object size.I'm somewhat surprized not to find such an advatage in performance.My naive expectation was that operating with less information ...
1
vote
1answer
18 views

converting character vector to unquoted names of objects

How can I pass a character vector naming existing objects to a function that only accepts unquoted names of existing objects?devtools::use_data(..., )?use_data: ... Unquoted names of existing ...
2
votes
1answer
44 views

List Comprehension from String to Integer Changes Output

I am working on Project Euler Problem 8 so please avoid going too far in your answer.Where is the problem in the code such that when I add the int conversion, the output changes and some groups are ...
0
votes
1answer
37 views

Writing numbers to JSON in scientific notation so that they don't get quotation marks around them

I have to store floating point numbers in JSON in scientific notation (just like the OP does in this question).The values I have to write into JSON are <number>s in my JavaScript (Angular/...
-1
votes
0answers
24 views

How can I convert a struct to a string [duplicate]

I receive a JSON through MQTT and I unmarshalled it into a struct. Now, I want to return a portion of that struct by converting it into a string.func ReturnVariables(payloadMsg []byte) (string, ...
1
vote
1answer
25 views

How to convert string into complex number in python?

I want to create a special calculator using python but for doing this I should know more about complex numbers. My calculator must get a string and output complex equation. Please help me.myinput="...
0
votes
1answer
38 views

Yii2: How to convert data type value of a JSON PHP array?

I am using Yii2 framework to create this JSON array:"data": [{"id": 201,"name": "John","age": "30"}]The age is a string and I need it to be an integer, that is, without ...
0
votes
1answer
32 views

Implementing a kotlin generic function that retrieves specific fields from a complex java object

I'm writing a Kotlin program that internally uses several functions of a java library (that i cannot modify).One of this functions (let's call it "feval"), when called, returns an object that has the ...
1
vote
1answer
32 views

Assigning from incompatible type

I'm getting a warningAssigning to 'id<ToolManagerDelegate> _Nullable' from incompatible type 'ViewState *__strong'on this lineviewState.toolManager.delegate=viewState;the delegate is ...
0
votes
2answers
25 views

How do I read input as integers without explicitly converting them?

I wrote a program to output some simple numbers and strings to the user after reading them from the user. In order to print and use math operators, I had to convert the datatypes multiple times in ...
-1
votes
2answers
37 views

how to convert from string to float in python?

I am trying to convert text from a csv file to a floating point number. But i keep getting the error: ValueError: could not convert string to float: year. I am getting the same error when trying to ...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,