Posts by Bernardo Lopes • 892 points
58 posts
-
0
votes1
answer237
viewsA: How could I generate an xml in java?
Download this library http://repo1.maven.org/maven2/com/thoughtworks/xstream/xstream/1.4.11.1/xstream-1.4.11.jar. And add the jar to the project public class ManipuladorXml { public boolean…
javaanswered Bernardo Lopes 892 -
1
votes1
answer37
viewsA: ERROR: Function to insert word in string
if (c > 0 && c < tamanho) { nova = ("Erro: posicao invalida."); } no if above occurs the check of the position is correct , if the position is correct, this code snippet is executed.…
javaanswered Bernardo Lopes 892 -
0
votes2
answers472
viewsA: Error checking that fields are empty!
Take this whole chunk where you’re setting the product attributes and put it into Else. The error occurs when trying to convert an empty field to Double, since it has no value in Editext no if check…
-
0
votes2
answers37
viewsA: Return a list of all strings in the file containing the searched string
def arquivo_ler(search): quantidade = 0 arq = open('lista.txt', 'r') texto = arq.readlines() #ler cada linha do arquivo for linha in texto : palavras = linha.split(' ') palavras_f = [] #ler cada…
python-3.xanswered Bernardo Lopes 892 -
0
votes1
answer29
viewsA: Error saving data to Database
private static final String TABELA_PRODUTOS = "produtos"; in the above row was created the TABELA_PRODUTOS variable with the value "products" probably the created table was "products", but Voce is…
-
0
votes1
answer70
viewsA: Sort listview by the amount of Ikes in Firebase
Before passing the list to adpter. You can sort it using the amount of Likes as criteria. This example shows how to implement Comparable, used to sort a List Object. Collections.Sort(myLista), odena…
androidanswered Bernardo Lopes 892 -
0
votes1
answer148
viewsA: Problem when showing Alertdialog
You can use DialogFragment. To call, just use: BlankFragment.show("testando",getSupportFragmentManager()); In the method item parameter show(), can pass data if you need. public class BlankFragment…
-
0
votes4
answers327
viewsA: Doubt about how to generate random numbers
You can create an integer Arraylist and fill in the values of the ranges. Then you can use the Random class to draw an Arraylit Dice and then remove this Arraylist Dice, so the numbers will not…
javaanswered Bernardo Lopes 892