Most voted "type-conversion" questions
Type Conversion is the method used to adapt one type of data to another so that it is possible to relate to a target type.
Learn more…239 questions
Sort by count of
-
0
votes1
answer194
viewsError when changing the type of a smalldatetime column to int
I’m trying to change the type of a column of my table, which is empty, from smalldatetime to integer. Error: Implicit conversion of data type from smalldatetime to int is not permitted. To execute…
-
0
votes0
answers72
viewsProblem with serial reading
Guys, I’m trying to read data from a serial port in c#, but along with the data is being returned too "junk", which makes it impossible to convert the string to integer. Is there any way to make me…
-
0
votes2
answers50
viewsUWP - Softwarebitmap for Stream
Eai personal, I’m using MediaFrameReader to capture the frames of a USB camera in a UWP application, the event return FrameArrived returns me an object of type Softwarebitmap, having this frame I…
-
0
votes1
answer1097
viewsErrorexception Array to string Conversion
Hello, I’m starting a test project of my knowledge, I’m having problem in the variable line $response = $validate->$data; before I created the Rules was working normal, I tried help on the…
-
0
votes0
answers101
viewsConvert integer to string in C
I have a problem with converting an integer to string in the scope of a function where the conversion return is given as null and I don’t know why. #include <stdio.h> char *getTexto(int num) {…
-
0
votes0
answers42
viewsInform two totals of different hours and have as output the amount of hours between the two informed
In this problem I cannot use any ready lib!!!!! So, in Python 3, I must do what is asked, however, I’m having difficulties to implement this, until then I tried to calculate the differences of the…
-
0
votes2
answers56
viewsWidening conversions and option Strict on
I’m learning about conversions and reading that article: Widening Conversions (I don’t know the term in English) The following conversions may lose precision: Integer to Single Long to Single or…
-
0
votes1
answer69
viewsHow to make strftime accept a Std::string?
I put together a small example of how I tried to do it, but the string is empty, not receiving the value. IMPORTANT I want to change only the strftime(). I tried to use, unsuccessfully…
-
0
votes1
answer50
views`<=': comparison of Integer with String failed (Argumenterror)
I want to know the age, then I made the following code: nascimento = "12/34/5678" dia = nascimento[0,2] mes = nascimento[3,2] ano = nascimento[6,4] dia.to_i mes.to_i ano.to_i age = 2020 - 2000 #ano…
-
0
votes1
answer150
viewsIgnore the header when inserting data from a csv file into a Java string array
Good night, I read a csv file and stored the information in a string array. The file from position 0 to 8 has string content, from position 9 to 29 has in its entire content. I need to compare if…
-
0
votes2
answers704
viewsError: Unsupported operand type(s)
I come from language C and I’m trying to sum up the values of a list. But after declaring I cannot use the function sum() and the other methods. Python tells me that I can only do operation on…
-
0
votes3
answers752
viewsHow to convert int variable to string without deleting zeros?
Need to perform in an activity the validation of characters typed by the user. My code: mes1 = int (input ('Digite o mês inicial:')) valida = len (str (mes1)) while valida != 2: print ('Valor…
-
0
votes1
answer82
viewsHow do I convert the php array values to the "uint" type of C#?
I need to take each value of the index of the array and convert it to return the same thing that returns in C# when we use the function (uint). <?php $arr = []; $codigo = intval(123456); $v =…
-
0
votes2
answers194
viewsHow to detect when the user enters something invalid or wants to terminate the program first?
I was doing an exercise in C++ that takes the smallest and the largest number typed by the user, I tried to leave something more automatic, where he goes typing until he doesn’t want more. So I’m…
-
0
votes0
answers16
viewsConvert Long Raw Data to BLOB ORACLE DB
My situation is as follows, I have 2 tables with different Owners, a stores the photos of the company’s employees in formed LONG RAW and on the other site I need to fetch these photos and present…
-
0
votes1
answer455
viewsProblem turning string into int: "error: no matching Function for call to stoi"
I’m writing a little show input a string of integer numbers as a string and as output an array with twice each of the numbers, also as a string. Despite the function atoi be indicated in that reply,…
-
0
votes2
answers210
viewsHow to convert a value to float and int in python?
Hello, I am trying to convert a received value from a graphical interface to int or float, to make a software that solves the second degree equations. layout = [ [sg.Text('Termo A:'),…
-
-1
votes1
answer305
viewsConvert . Dav to any other video extension
I’m trying for days to convert .Dav (File generated by dvrs[image recorders]). I’ve tried several variations with the ffmpeg and I cannot succeed. ffmpeg -i input.Dav -codec:v libx264 -Crf 23…
-
-1
votes1
answer1088
viewsHow to read a variable of type unsigned char by the fscanf function?
I am reading an array of a file where each element of this matrix varies from 0 to 255. For this reason I have stored the values within an array of unsigned char type, but am finding some problems…
-
-1
votes3
answers1432
viewsConvert Double to Integer
I would like that in the TextView where the value of "trees to restore" appears without a point or zeros. In the situation below appears "180.0000000" and should appear "180". Is he the type Double,…
-
-1
votes1
answer516
viewsCS0029 error in Visual Studio
I’m trying to make a very simple calculator, just to understand how the program works, and I came across the following problem: If I put 5+5 in the calculator it gives me the value of 55 as a…
-
-1
votes2
answers979
viewsConvert value to C#object
I am doing an integration where the system uses socket connection, I send and receive messages to reach an end, and the messages comes in this format: aplicacao="Teste" retorno="1" sequencial="191"…
-
-1
votes1
answer122
viewsProblem with excess Decimals!
Initially I was developing a python code that would help me better understand Nikola Tesla’s number theory(video). Explaining quickly, starting with 360, adding each separate value results in 9, for…
-
-1
votes1
answer112
viewsHow to deal with the null values of an array when converting from String to Double?
I need to display the top 10 contract termination clauses, which are in a vector, extracted from a CSV file. Here, when I refer to contract termination clauses, I mean monetary values (money), more…
-
-1
votes1
answer195
viewsCLOB Filter - Number+text
I have a system whose all fields of a document are Clobs, including combo box with measly "Yes" and "No". I am building a query, I need to filter a Clob field and the values are '0||Yes' and…
-
-1
votes1
answer53
viewsWhy when I inform "1.93" gives error when converting to integer?
print('Calculadora de IMC') peso = input('Insira o seu peso (em kg): ') altura = input('Insira sua altura (em metros): ') IMC = int(peso) / int(altura)**2 When I set the height value to "1.93" an…
-
-1
votes1
answer29
viewsconvert string to double Elasticsearch
Hello, folks are in need of a help with Elasticsearch. I’m trying to do a script conversion, from a string field, to double, but unfortunately, I’m not getting it. the last script I did was this:…
-
-1
votes1
answer90
viewsConvert int to str for loop
I would like the variable of input() retain its type int were only converted to string when exclusively entered with’s' digit so that I can exit the loop, without changing the while, there is some…
-
-1
votes1
answer194
viewsC# Double Type Precision Loss
Hello! I wrote a program in C# that converts the decimal separator from a comma string to a dot. For this, I used the Replace() method. The problem occurs when I try to convert the number (now with…
-
-1
votes1
answer40
viewsData conversion using Combobox
Hello, I’m having trouble dealing with an error in my program. I have two combobox inside a registration panel. When executing already appears the list of products and customers, but the code field…
-
-1
votes1
answer24
viewsModel does not recognize the Datetime format
Hello, I am creating a program to learn a little more about . NET C#, this project is a simple CRUD project. But I have a problem in my model, when I run the program to create a new record it is…
-
-2
votes3
answers218
viewsWhat makes the expression "'2 pigs' + '3 horses' == '5 animals'" return true in PHP?
I’ve asked a similar question here at Stackoverlow at: Why in PHP the expression "2 + '6 apples'" is 8? However, taking a look at some strange things curiosities that exist in PHP, I saw that the…
-
-2
votes2
answers1455
viewsError in Datetime.Tryparse
I have a problem with a conversion using the code below: string vcto = "29/01/2018"; DateTime data; Boolean resp = DateTime.TryParse(vcto, out data); if (resp == false) { MessageBox.Show("ERRO NA…
-
-2
votes2
answers116
viewsProblem to send values of type 11.50 to SQL Server database
I have a problem formatting values type R$ when sending to the data bank 11.50 in the data bank is type 1150. This condition is from the send button to the database has a database management class…
-
-2
votes1
answer889
viewsConvert string to json [Python]
I have a case where I have a json(is like clob) in the database and I want to use it to make a post request and everything by python, but I have a problem at the time of converting this string to…
-
-2
votes1
answer50
viewsCan you convert an array of strings to a double array without concatenating the decimal numbers in the conversion?
I would like that, somehow, after converting the string array to double, the values remain floating point. I put the input as, for example, 5.5 6.5 7.8 2.5 6.2, and during the conversion is not…
-
-3
votes2
answers6070
viewsConvert Jtextfield to integer and save to bd
I have a JTextField which is populated from the database as text, would like to save in another BD as int. Could someone please help me? My code: String sql = "INSERT INTO ass_cidade(id_cidade)…
-
-3
votes2
answers72
viewsPython does not advance and does not present an error after converting string to float, how to resolve?
I’m getting the string 24.120185722369005 from a MQTT(Hivemq) topic, but when converting to float, it ignores the rest of the function. def on_message(client, userdata, msg): temperatura =…
-
-5
votes1
answer3666
viewsHow to convert an entire string?
How do I convert a value of type string that needs to be stored in a variable that is of the type int? Here are some conversion codes which are most appropriate to use in this conversion? A.a =…