Questions tagged as 'string'

2
answers

Problems converting integer to string (stringstream) c ++

#include <iostream> #include <string.h> #include <sstream> using namespace std; int main(int argc, char *argv[]){ int n, aux; string hexa=""; stringstream hexa_aux; cin >> n; while(n != 0){ a...
asked by 10.08.2017 / 02:13
1
answer

String Encoding - Haskell

The following code encodes a string of characters, replacing the sequence with! na, where n is the number of times the character a is repeated. Note that it only compresses sequences larger than 3. comprime :: String -> String comprime "" =...
asked by 21.07.2017 / 04:29
2
answers

How to remove accents and other graphic signals from a String in Java?

How to remove accents and other graphic signals from a String in Java? Ex .: String s = "maçã"; String semAcento = ???; // resultado: "maca"     
asked by 11.12.2013 / 17:36
2
answers

Problem inserting double value in MySQL

query += txtServidor.Text + "',";<br> query += double.Parse(txtVencimento.Text) + ",";<br> query += int.Parse(txtBanco.Text) + ",'";<br> INSERT INTO tbl_associados VALUES(10,'testando','001.318.555-55','categoria','ativo',...
asked by 30.03.2015 / 14:58
0
answers

Calculate values in unfilled spaces in Form

Good afternoon! I'm hesitant to implement an algorithm that can calculate the heat flow based on the formulas: q = ΔT / Rt ΔT = Initial temperature-Final temperature Rt (thermal resistance) = L (Thickness) / K (retentivity) * A (area-m²...
asked by 25.06.2017 / 19:23
1
answer

Apply data from a txt to ArrayList

I need tips on how to create (where to start, which functions to use, etc.). A generic project that receives a .txt file, reads the data and stores the words in ArrayList<> . I have already created a structure for: L...
asked by 31.08.2017 / 16:12
2
answers

What is the difference between assigning and comparing string variables with function or with assignment and comparison operator?

I came across the following questions: What is the difference between the expressions strcpy (s, t) e s = t ? What is the difference between the expressions if (strcmp (s, t) < 0) e if (s < t)  ? I tried to compile...
asked by 11.08.2015 / 00:44
1
answer

SPLIT_STRING in several 'paragraphs'

I'm trying to pick up this type of table: In which I have a daily import for a dbo, I have now had difficulty doing the split_string of the comments, doing the respective cross with the ID. The idea is to have as many rows as (Additiona...
asked by 09.06.2017 / 00:17
1
answer

Difference in string size with FontMetrics.charWidth and FontMetrics.stringWidth

I can not understand the following code: String text = "C JEA NAV/NAP GRV NAV/ELT NAV SOLA PVC EXP PRETO "; int posString = FONT_METRICS.stringWidth(text); int posChar = 0; for (int i = 0; i < text.length(); i++) { Character charac...
asked by 08.06.2017 / 20:31
1
answer

String Handling - javaFX Application

I'm having a problem reading a file and need to remove the accents from the string, but the function is not working in my JavaFX application. Function: public static String remove(String str) { return Normalizer.normalize(str, Normalize...
asked by 09.06.2017 / 19:33