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
-
1
votes4
answers25657
viewsHow to convert a char to an integer?
Convert a string for an integer with the function atoi() it’s easy, it’s not even? However, when I use the function atoi() to convert a character to an entire program that is running time simply…
-
1
votes1
answer193
viewsHow to access attributes of a JSON that has been converted with special characters?
I am consuming the API of microsoft translation, they work with the return in XML(Because it is, MICROSOFT returns XML in its API’S), I managed to run everything right, but as I hate working with…
-
1
votes3
answers1344
viewsConvert String to double in Java
I am reading data from an external file with CSV format. However this data is coming in CSV format String. There is a price field that I need to turn into double for handling purposes. Class…
-
1
votes1
answer68
viewsError in the conversion of numerical bases
Well I’m asking the question 1199 Conversion of Uri bases however in some cases my test passed, only when I put a number that the staff put in the forum gave error, the number was 0x80000000 the…
-
1
votes0
answers91
viewsHow to map a json string to another json string?
Is there any way to map a json string to another json string? The goal is to take the value of one json property and set it in another json property. Exe; I have the json. { "codigo":0,…
-
1
votes1
answer430
viewsType conversion error when saving to database
My project has a form frmAdicionarProduto to add products to the database containing TextBox and ComboBox: txtProduto txtQuantidade cmbTipo txtValorFornecedor txtValorFinal txtLucro I’m having…
-
1
votes1
answer1326
viewsConcatenate a string with number in Typescript
I’m trying to add a 0 in the formatting of my date/month, but I’m not able to concatenate 0 with a string. I tried something like: var dd = dataAtual.getDate(); if (dd < 10) { dd = '0' + dd } I…
-
1
votes1
answer1106
viewsConvert double to string keeping the same format
I need to convert a value of type double for string in C#, without this value being changed to scientific notation. my code is: double valor1 = 0.000024746578864525161; string resultado =…
-
1
votes1
answer61
views"Dynamic" data type is not the same as native data type
I’m trying to create a struct that has one of its attributes having its type of dynamic or varied data, I need ( when running the struct constructor) to be defined the data type of it, and it should…
-
1
votes2
answers144
viewsHow to treat an empty entry?
I have 4 text entries and a button: <Entry x:Name="Densidade" Keyboard="Numeric"/> <Entry x:Name="Volume" Keyboard="Numeric"/> <Entry x:Name="Area" Keyboard="Numeric"/> <Entry…
c# xamarin validation xamarin-forms type-conversionasked 5 years, 11 months ago Homero Kemmerich 27 -
1
votes2
answers73
viewsError in a function that returns an AND of two variables in python
I made a function in Python that in theory should return a and of each element of two variables, however the result is not being expected. The answer would be [0, 1, 0, 0, 1, 1, 0, 0], but is…
-
1
votes1
answer108
viewsHow to convert Enum to int by filling with zero on the left?
Ladies and gentlemen, I have a question here of converting a enum in a string, but I need the conversion to be filled with zero to keep 2 digits. Example public enum System { Unknown = 0, Mirror =…
-
1
votes1
answer42
viewsIs there the possibility of data loss while converting text data types to nvarchar(max)?
I have a legacy database in production with data stored with the type text but there was a need to convert them to nvarchar(max) and by chance I saw that this was already a recommendation from…
-
1
votes0
answers33
viewsConvert Dynamic to another type
I need to convert a Dynamic variable to another type in Runtime. The type I want to convert is stored in another variable (I don’t know what type at development time). There’s something like this?…
-
1
votes1
answer490
viewsConvert Varchar to Int
I need to perform a sub query in Query but the data types of the columns are different. I am using the structure below but it is in error : SELECT MIN(POPULACAO), nome_mun from cidades select…
-
1
votes1
answer59
viewsDatatype Conversion Query - Varchar to Float
When performing a query, I need a column of a given table to convert your Datatype for FLOAT. COLUMN CONFIGURATION Name: 16_remuneracao_sem_13 Datatype: VARCHAR(15) PERFORMING STANDARD CONSULTATION…
-
1
votes2
answers868
viewsError: Incorrect decimal value: ' for column 'Value' at Row 1
I’m having a problem inserting a die of a maskedTextBox in the Mysql database. Follow the error Incorrect decimal value: ' for column 'Value' at Row 1 The code is this: conexao.Open(); MySqlCommand…
-
1
votes0
answers17
viewsLine of a code for a program in C#
private void btnEditarProduct_Click(Object Sender, Eventargs and) { if (btnEditarProduct.Text == "EDIT") { txtName.Text = dtgProduct.Rows[dtgProdut.CurrentCell.Rowindex].…
-
1
votes3
answers229
viewsConvert the string "5.541.00" to int in C#
What is the correct way to convert a string with the text "5.541,88" to int? I’m trying to do it this way: int valor = int.Parse("5.541,88"); But I can’t because it returns the error: Input string…
-
1
votes1
answer35
viewsHow to make an internal calculation in Textbox?
I need to calculate a value entered in Textbox and this value I enter is multiplied by 9,81. So all the numbers I insert in this Textbox will be multiplied by 9,81 and you will have to show me the…
-
0
votes1
answer1064
viewsConvert Bitmap/Drawable to Drawable (int)
I need to convert a Bitmap or even a Drawable into a Drawable (int), because I’m using a Bootstrap for android that needs an object of this type, but as I’m downloading the image of a url and not…
-
0
votes1
answer41
viewsConversion of dates in the database
How to convert a date that is in format DDMMYYYY for YYYYMMDD? I am having problems to send this data to different SQL databases, considering that each one was elaborated in a way and are already…
-
0
votes1
answer49
viewsconvert from Date to number in Java
I have a field in the Mysql Date database and within a function modelPie.set(String, number) I want to bring this field but java says it cannot convert from Date for Number.…
-
0
votes1
answer602
viewsHow to convert RGBA pixels to characters?
having access to the pixels of any image through the SFML library, my goal is captured and convert them to characters by placing in a new matrix (image) and then display it. For that I checked the…
-
0
votes1
answer134
viewsImplicit type conversion error
Error 1 Cannot implicitly Convert type 'Cursocavancado.Client' to 'string' C: course Cursocavancado Cursocavancado Form1.Cs 47 31 Cursocavancado Follows the class namespace CursoCAvancado { public…
-
0
votes0
answers652
viewsInserting double type value into mysql database
I have a Windowsform with a value field and I need to enter its value in the database. I need some example of how to do this? File that queries //Cadastrar Gastos public void cadastroGasto(Gasto…
-
0
votes1
answer171
viewsError converting Bigint to integer using lambda
In the database the guy is BigInt and in C# I’m trying to convert to int and he can convert, but when it comes to instruction lambda, makes a mistake. long codpro =…
-
0
votes1
answer297
viewsHow to convert Datetime type to nvarchar?
I have a table with a column like nvarchar, and I pass the following parameter to the stored Procedure: cmd.Parameters.Add("@PointDate", SqlDbType.NVarChar).Value = DateTime.Now; as predicted, I’m…
-
0
votes1
answer237
viewsError while using Dateformat.Parse
I take the date and call the changeFormatDataTra private void makeJsonObjReq(){ showProgressDialog(); int id = ((AppController) this.getApplication()).getID(); JsonObjectRequest jsonObjReq = new…
-
0
votes1
answer1240
viewsHow to convert Time type to String?
I have a field horaConsulta and I can’t turn him into String DAO stmt.setTime(4, new java.sql.Time(consulta.getHoraConsulta().getTime())); Servlet Time horaConsulta =…
-
0
votes1
answer593
viewsJava cast and convert
How do I convert ValueCallback<Uri> for ValueCallback<Uri[]>?
-
0
votes1
answer175
viewsData conversion error
I cannot open my user control form. private void usuáriosToolStripMenuItem_Click(object sender, EventArgs e) { Usuarios USU = new Usuarios(); sNome_usu = Status_Label_Usuario.Text;…
-
0
votes1
answer68
viewsDo date conversion C#
I have a date "Wed, Nov 25" and would like to convert it to 2015-11-25 How could I do that?
-
0
votes3
answers1957
viewsCannot implicitly Convert type 'Object' to 'int'. An Explicit Conversion exists (are you Missing a cast?)
I’m trying to develop a code in my game but I’m making this mistake. ... case "cpsuser": Console.Write("Digite o apelido do usuário: "); string Nickname = Console.ReadLine(); Console.Write("Digite a…
-
0
votes1
answer124
viewsHow to add Jspinners values?
I want to make a simple program where the user puts a number on a JSpinner and, at the click of a button, will appear in another JSpinner, the value of the first summed by 2. However, I cannot sum…
-
0
votes3
answers1761
viewsHow to convert a String to Date on Swift
i receive the date as follows 2016-08-14T20:38:27.031-03:00 as string, I would like to pass to date on the standard dd/MM/yyyy, I have already searched the net some solutions however were not useful…
-
0
votes2
answers49
viewsKnowing the type of return of a given
I have a problem with the return type of a data in python. I was first trying : >>> type(record[0][keys[2]]) <class 'Bio.Entrez.Parser.StringElement'> I tried to check by if…
-
0
votes2
answers276
viewsAccepting null fields from a Texbox
When I click on "Save", the program does a check of Texbox with a deal that I did not let pass repeated numbers, the problem is that it error if any Textbox is blank. Below is the Code I made saving…
-
0
votes1
answer322
viewsConversion to date Postgresql
Hello, I am working with a database that has date information stored in a varchar(50) as in the following example: "2012 December 2 18:37". I need to do research based on time intervals. However, I…
-
0
votes3
answers902
viewsHow to convert text field with mask to double
I have a field in the html text type that has a coin mask. I have to save this value in a field of the kind double in the database, but I’m having trouble converting, where the value that would be…
-
0
votes1
answer112
viewsError while converting types
I am doing a job for the college that consists of creating an immovable array based on some rules that are provided by txt. The code gives error and do not know what is occurring. A detail that when…
-
0
votes0
answers69
viewsCalculate Values in Gaps in Form
Good afternoon! I’m having doubts about implementing an algorithm that can calculate the heat flow based on the formulas: q=ΔT/Rt ΔT=Temperatureinitial-Temperaturefinal Rt(Thermal…
-
0
votes1
answer459
viewsConvert Imageicon to Image or Imageicon to Bufferedimage
I’m having trouble finding ways to convert ImageIcon for Image or if possible ImageIcon for BufferedImage in order to be able to save it in the database. I did some research on the internet but the…
-
0
votes1
answer211
viewsCast in void pointer
The code below was working as expected, but changed the type of info in the structure Retangulo* for void* and tried to cast anyway but I continue with the following mistake: t.c: In function…
-
0
votes0
answers76
viewsHow to convert `data java.util.Date` to `java.sql.Date`?
The idea is to consult the data by dates in the database (Mysql): I have 2 fields JXDatePicker and I want the return of the data between the initial date and the final date. In Mysql, the field date…
-
0
votes1
answer858
viewsConvert to decimal without adding zeros - SQL Server
I am converting a number from varchar to decimal. This number already has the boxes after the comma, and when I convert it adds 2 more zeros. Example: 12.345,67 ---> 1234567,00 The code I’m using…
-
0
votes2
answers111
viewsType convection error
Trying to record in a sql table an image, its name and description and some foreign keys to allow me to search later. On execution I get error of string conversion for Int 32. But all fields in the…
-
0
votes0
answers102
viewsTurning a double variable into a factor
Hello, I’m trying to convert a variable of the type double in factor ppar$abor <- as.factor(ppar$abor) But I’m getting the following error: Error in `$<-.data.frame`(`*tmp*`, abor, value =…
-
0
votes2
answers170
viewsSwitch only enters "default"
When I read a number, converting it to Int32, my switch simply understands that it is a default and makes the code there described. static void Main(string[] args) { Jogador j = new Jogador();…
-
0
votes1
answer486
viewsInteger to String Conversion
I’m creating a cafeteria system. I created the login system and it’s working, when I went to create a page to create the logins, I’m having difficulties in converting the int for string - the…