Posts by Paulo Santos • 159 points
13 posts
-
0
votes1
answer814
viewsA: Bootstrap selectpicker class, does not recognize insertion of <option> via jquery (.html())
When you use the . html () you override including the select element, imagining that you are bringing with ajax the "options" of this select, use the append() function to add child elements in the…
-
3
votes3
answers1435
viewsA: How do I generate a random negative number?
Generate a positive number and multiply it by -1;
-
0
votes2
answers94
viewsA: Give replace to the chars of a string
String a = "Banana é uma ótima fruta"; a = a.replace("Banana","******"); a // "****** é uma ótima fruta" Use the method replace string.
javaanswered Paulo Santos 159 -
2
votes2
answers178
viewsA: Identify the right textarea to send when pressing Enter?
I’d do it this way: <form action="init/add_coment.php" method="post" id="enviaComent<?=$post['id']?>"> <textarea name="comentario" class="comentario-texto" placeholder="Escreva um…
-
2
votes3
answers596
viewsA: How to optimize SQL to filter results
So you don’t have this consultation explosion, one for each particular case, insert in your query the "if null" condition of the field, this will make you have only one select. $nome =…
-
1
votes1
answer46
viewsA: Java: Sending messages over the network repeatedly in another thread?
The first step is to capture the Exception that your code may be generating in this loop infinite that you did in this Thread. This code fires at full speed this message because there is no waiting…
-
0
votes1
answer457
viewsA: Edit Record Using Jpa
The command merge serves to make the entity manageable by your Entitymanager, but if you want to save the entity changes in the bank, you should call the method flush(), or even open and close a…
-
1
votes1
answer42
viewsA: Query in a given string
select * from nome_da_tabela where nome like '%vinicius%' The % symbol indicates that there can be anything, that is, any name that contains Vinicius before or after will be selected. To search all…
mysqlanswered Paulo Santos 159 -
-1
votes3
answers535
viewsA: how to perform calculations between 4 input, loading page or change value
//obtenho o valor dos campos var vtotal = $('#total_pedido').val(); var vfrete = $('#encargos').val(); var desconto= $('#desconto').val(); //efetuo o calculo que será exibido no ultimo input vtotal…
-
0
votes2
answers238
viewsA: Generalization of parameters in Java
If your goal is to create a binary tree, there must be a comparison factor between the values. Using the Object type, you can actually collect any Java object, however it is not any object that can…
-
0
votes3
answers874
viewsA: How to count number of clicks on increase fonts button in accessibility bar?
Create a map for sizes: var mapa = new Object(); mapa[fonte1] = tamanhoX; mapa[fonte2] = tamanhoY; function obterTamanho(fonte) { return mapa[fonte]; } if(obterTamanho(fonte)==null){ //inserir…
-
1
votes2
answers97
viewsA: Can I connect to a database using JS?
Javascript should be used solely and exclusively for the client side, more precisely in the browser sandbox. To communicate with the database inevitably you will need to work with some server side…
mysqlanswered Paulo Santos 159 -
2
votes0
answers666
viewsQ: Bluetooth and Android printer
Is there an api to send print orders through an android app? I’ve seen that Samsung included this bluetooth printing feature some time ago, but I can’t find anything about sending print orders…