Posts by Carlos Leandro Ferreira de Alm • 339 points
30 posts
-
0
votes1
answer41
viewsQ: Doubt when changing fields automatically subSelect
I would like to know how I do to change all fields of my sales chart. Modifying the full preco_field that will receive the quantity * preco_unitario. Remembering that I have 150 records in my sales…
-
0
votes1
answer185
viewsQ: Bring postgresql data field data saved as string
I would like to know if it is possible to convert this data at the time of select Looking for this data, brings wrong information: select * from vendas where data_venda between '01/03/2016' and…
postgresqlasked Carlos Leandro Ferreira de Alm 339 -
0
votes2
answers216
viewsQ: Sort the largest on request
Good evening, I’m using the following command: select cliente_id, desconto, pedidos_detalhes.pedido_id, cliente_tipo from pedidos_detalhes inner join pedidos on pedidos_detalhes.pedido_id =…
-
2
votes1
answer90
viewsQ: Doubt to bring mysql data
I have the following question. Consider that I have the following sales data: Two former states: São Paulo (Atibaia, São Paulo and Campinas) and Paraná (Londrina, Curitiba, Cascavel). | cidade |…
-
0
votes1
answer395
viewsQ: Perform an action when a button is first clicked and another otherwise
I would like to know how to make an if when the button is clicked. For example: private void btnEditarActionPerformed(java.awt.event.ActionEvent evt) { ProdutosDAO produtoDAO = new ProdutosDAO();…
-
0
votes0
answers217
viewsQ: Doubt when saving image in mysql database
Good evening, here’s the deal: I have a Jlabel = jlImage, where an image is loaded as shown by the btnCaminhoImagemActionPerformed method. But I want to use the save button to insert the image in…
javaasked Carlos Leandro Ferreira de Alm 339 -
0
votes1
answer345
viewsQ: Add number of a txt file
Here’s the thing, I’m using this method to read my txt file. public String lerArquivo2() throws FileNotFoundException, IOException { FileInputStream input = context.openFileInput("teste46a.txt");…
androidasked Carlos Leandro Ferreira de Alm 339 -
0
votes1
answer20
viewsQ: Doubt with Asp.Net project
Good afternoon guys, I am learning ASP.NET and the guy who is teaching online, started like this: File, New Web Site and selected the option ASP.NET Web Application and has the following folders…
-
2
votes2
answers87
viewsA: Pass typed value to another method
I figured it out, I’ll post it here, maybe it helps someone. I modified that class: public String pegarCpf(){ cpf = getCpf(); return cpf; } public int…
-
2
votes2
answers87
viewsQ: Pass typed value to another method
I’m having a doubt when passing a typed amount. I’m posting here because I stayed the whole afternoon yesterday and found nothing. In first class: public class CompararLogin { private String nome;…
-
0
votes3
answers62
viewsQ: Error giving a select in two tables
I’m trying to make a select on these two tables, but this bringing wrong data, I want to do the following, list the loan requests that have not yet been rented, ie if the codigo_socio within the…
mysqlasked Carlos Leandro Ferreira de Alm 339 -
0
votes1
answer86
viewsQ: Error copying data from one table to another
Good afternoon Guys, I’m making an application that makes a Dvs loan request, I managed to make the application to enter the reservation, now I need to make the dvd owner confirm the rental and copy…
-
-1
votes1
answer27
viewsQ: Select in items that have not been inserted
Next, I have table entries in case list of requests to rent a dvd The Tabelab will be inserted which dvd I will rent, so I need to select the list of dvds that were not rented in Table or just bring…
mysqlasked Carlos Leandro Ferreira de Alm 339 -
4
votes2
answers4187
viewsQ: Error while deleting FK
I have a table called: soliciting codemprestimo, dataemprestimo, horaemprestimo And another table called: loan, co-loan, loan, loan, loan, loan, loan) and used this command: INSERT INTO emprestados…
mysqlasked Carlos Leandro Ferreira de Alm 339 -
0
votes2
answers236
viewsA: Error bringing Time and Date
So I needed to create two more methods, here they are, now it worked: public String solicitarDataPedido(){ LocalDateTime pegarData = LocalDateTime.now(); LocalDate dataAtual =…
-
1
votes2
answers236
viewsQ: Error bringing Time and Date
I am registering in the Mysql database values such as time and date. Code JAVA: public String getDataPedido() { StringBuilder horaSistema = new StringBuilder(); GregorianCalendar pegarHora = new…
-
-1
votes1
answer335
viewsA: List by Mysql and Java foreign key
Now it’s like this in mine DAO: public List<Dvd> listarDvdsPorCodigoSocio( Dvd f) throws SQLException { StringBuilder sql = new StringBuilder(); sql.append("SELECT codigo, titulo, genero,…
-
0
votes1
answer335
viewsQ: List by Mysql and Java foreign key
I’m trying to select the dvds that the partner registered but I’m not getting, I wonder if someone can help me, the result of my code returns like this Result: 1 - null - null - null - null - null -…
-
0
votes0
answers44
viewsQ: How to separate the DAO layer from the data entered by the user?
I am trying to take this DAO layer and put it in another class to receive the data typed by the user. Someone could give a hand? That is, this piece of code would have to receive the data in another…
javaasked Carlos Leandro Ferreira de Alm 339 -
0
votes0
answers110
viewsQ: Doubt about data distribution between classes
I have a class called Socio who asks for his name, phone number... and I devised methods getters and setters. And another class called DadosDoUsuario who will ask for the information to fill out the…
-
0
votes2
answers320
viewsQ: How to create Exception
I am trying to make an exception but I am not getting it. I would like your help to solve this problem. I am since yesterday trying to validate a field but this difficult... Thanks already to all!…
javaasked Carlos Leandro Ferreira de Alm 339 -
2
votes1
answer333
viewsQ: Doubt validation of Cpf before inserting in the bank
In my class SocioDAO I have the method salvarSocio() which will be saved in the database. In my class DadosUsuario I have the information that needs to be recorded in the bank in case…
javaasked Carlos Leandro Ferreira de Alm 339 -
1
votes1
answer50
viewsQ: Doubt with the Tomcat
I started to learn JSF and installed the Tomcat, but when I start it appears this message: Port 8080 required by Tomcat v7.0 Server at localhost is already in use. The server may already be running…
tomcatasked Carlos Leandro Ferreira de Alm 339 -
-2
votes4
answers342
viewsA: What is the function of the " | " operator within the catch?
Good afternoon, I don’t have much experience, but I think you could put two catch... in SQL what do you want to do? It would be the connection? catch (IOException ex1) { logger.log(ex); throw ex; }…
-
1
votes1
answer241
viewsQ: I wonder how I use Swing
I am learning Java Eclipse and would like to know how to use Swing. Need to install? How it works?
-
0
votes1
answer36
viewsQ: Take Characters from Background
I would like to know how to take the background characters of the eclipse like this in the image!!!…
eclipseasked Carlos Leandro Ferreira de Alm 339 -
2
votes1
answer369
viewsQ: Error in CPF validation
I’m trying to do a validation on CPF and I’m finding problems. When I type in any number that is not in if, it inserts into the seat normally, but when I type numbers from inside the if I’d like him…
androidasked Carlos Leandro Ferreira de Alm 339 -
0
votes0
answers49
viewsQ: Doubt with CPF validation
Good afternoon, I’m trying to do a validation on Cpf and I’m finding problems... When I type in any number that is not in the if, it enters in the bank normally, but when I type numbers from within…
androidasked Carlos Leandro Ferreira de Alm 339 -
1
votes1
answer109
viewsQ: replication error
I’m trying to use a command on shell in Postgresql(Windows) with the following syntax: select pg_start_backup('nome do meu banco de dados', true); It responds to a record. Now, when I type the…
-
1
votes0
answers292
viewsQ: Replication in postgres 9.4
Good evening guys. I’m trying to do a replication on postgresql 9.4. I made the settings exactly the same as the files postgres.conf and pg_hba.conf in the master and in the slave, only when I drop…
postgresqlasked Carlos Leandro Ferreira de Alm 339