Questions tagged as 'string'

1
answer

Assign string value with pre-defined size within the pointer

Need help with dynamic memory, I can not understand why I can not access nome of ptr in method adicionarSocio ? How can I change this field? Do I have to malloc of the name before even assigning it already having th...
asked by 15.02.2018 / 19:04
0
answers

Problems with java strings

I am doing a migration of data from a csv file to a H2 database. In this process I use the beanio to read the file and transform it into objects and then persist the objects in the base using jpa + hibernate. The problem is strange because wh...
asked by 01.02.2018 / 15:38
0
answers

Remove whitespace from a string and join it [closed]

I have a string of a Logical Expression Ex: ((T ∨ F → T) ∧ (T → F)) → (∼F → T) I need to remove the whitespace from the string and put them together as a result: ((T∨F→T)∧(T→F))→(∼F→T) How can I do this in Java? I tried to use re...
asked by 07.03.2018 / 02:16
1
answer

Paste string by format

I have an array with 1000 indexes with random text and random numbers, so I need to get in this text excerpts that are in particular formats containing pre-defined character quantities, such as a string as follows: 65 45 98 12 15 98 17 character...
asked by 12.01.2018 / 07:51
2
answers

How do I refer to a String using multiple values in Java (Android)?

I've done a chatbot / virtual assistant and I want it to answer the same thing for different words, example: if I write "Hello" or write "hello" it returns the same response: "hello how can I help". public void assistente(View view) { if (...
asked by 25.01.2018 / 19:07
1
answer

How to compress a string for sending in a JSON object field

Hello, I'm developing an API in java, which returns a JSON object. One of the final json fields is long text, of unknown size. The text may or may not contain special characters. I am sending the raw information in a string. But as the...
asked by 05.02.2018 / 15:31
0
answers

Implementation of an AFD to read multiple strings

I have to determine if the strings in the file belong to the AFD. I was able to do just for a string. The goal now is to read more than one string, but I could not do the implementation, it always ends up in a loop or any other error. What ti...
asked by 14.12.2017 / 11:59
2
answers

Accept only numeric input

nota = -1 while nota < 0 or nota > 10: nota = int(input("Informe a nota entre 0 e 10: ")) if nota < 0 or nota > 10: print("Valor inválido") I need to include in this validation code for, if the user types string (a,...
asked by 09.10.2017 / 21:28
0
answers

How do I save issues in an array of pointers

Good evening I come here to try to dispel a programming problem that occurs to me. In this solution, I have a file with several questions, each question being a question of one of the following 3 themes: GEO - Geography MAT - Mathematic...
asked by 12.11.2017 / 01:28
1
answer

What error? strtok C

I made the following code that receives a string of 3 numbers separated by space, then delimits them and allocates each number in an array position, in the end it prints the array, the code works however only without the 7th and 8th ° rows. I wo...
asked by 03.11.2017 / 22:33