Posts by Marcelo T. Cortes • 804 points
39 posts
-
0
votes0
answers23
viewsQ: How to prevent a carousel from slipping when it reaches the last item?
I’m making a carousel from scratch, it contains 7 items, the problem is when it gets to the last item I can still click to the next one, I want every time I get to the last item the carousel stop.…
-
2
votes1
answer73
viewsQ: Resize submenu when overflowing page
My Category submenu, overflows the page when resized. How do I make the submenu go left when this happens? The problem As soon as I want it to happen, the submenu was thrown to the left because it…
-
0
votes3
answers136
viewsA: Delay before showing a div
Caique’s answer is valid, you can also use Transition working with colors, so your Hover is more pleasant and does not appear to the user in an "aggressive way". .main_container:hover…
-
1
votes0
answers51
viewsQ: React-Native init proxy-related error
I’m not able to configure my first app, it’s something related to proxy, but I have no idea how to solve this I’ve researched everything that is place someone knows how to solve?…
-
1
votes3
answers219
viewsQ: Add number in array and list it
What’s the simplest way to do it with array a kind of bank where I deposit a value in a array and show the same after. My difficulty is in modifying the array, where the initial value would be 0 and…
-
1
votes2
answers703
viewsQ: How to make a welcome screen in PHP?
I want to create a welcome page for the user who has logged on to the site. My difficulty is in creating the query as I do and showing the user name through an echo? login.php form <?php…
-
0
votes1
answer583
viewsA: C++ While iterator skipping Cin.getline reading
The solution is very simple, just put cin.ignore(); before the if. see function Read the article: C++: Using Cin.ignore() I’ve even had this same problem in the past I can use "Cin" and "getline" in…
-
1
votes1
answer361
viewsQ: How to give include a php file without conflicting with the css of the two files?
I want to put on my page a button that has bootstrap and its own css, this button is in the login.php file. But when I go to give the login.php include in my index.php file it generates a "conflict"…
-
2
votes1
answer4581
viewsA: How to open external URL in modal bootstrap?
<a data-toggle="modal" class="btn" href="http://www.bing.com" data-target="#myModal">click me</a> <div class="modal hide fade" id="myModal" tabindex="-1" role="dialog"…
-
3
votes1
answer4709
viewsQ: Modal is not giving scroll
CSS: .modalDialog { position: fixed; font-family: Arial, Helvetica, sans-serif; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, 0.8); z-index: 99999; opacity:0; -webkit-transition:…
-
0
votes1
answer204
viewsQ: How do I make a rollback or "undo" button in my application?
Is there any way to recover deleted data from Database? I’m making an application where I have the buttons to add, edit and delete and now I’m thinking about doing another to undo a delete. How can…
-
2
votes1
answer5641
viewsQ: How to close a modal only by buttons?
The title is already very explanatory. But I would like to know how I close a modal only by the close button and the "x" of the window, not allowing the user to click on the black background around…
-
1
votes1
answer3986
viewsQ: How to put three points in a word if the text overflows the page?
I would like to know how to put three points in the last word that exceeds the page limit. This image is like the current text. And that image is how I want you to get the three dots Here is the…
-
1
votes4
answers10528
viewsQ: Contact form with AJAX without refresh
How to create a form with ajax that when pressing the send button it does not redirect you to another page but rather a message just below "Data sent". Follow an example of code I’m studying, but…
-
1
votes2
answers1024
viewsQ: How to find the size of a character array?
#include <iostream> #include <string> #include <locale.h> #include <stdio.h> using std::cout; using std::cin; using std::endl; using std::string; int main(){…
-
1
votes1
answer276
viewsQ: Problem printing the contents of a vector
How to make a score accumulator for each answer. package modulo02; import java.util.Scanner; public class vetorGabarito { public static void main(String[] args) { int pontuacao = 0, n, i, j = 0;…
-
5
votes2
answers4626
viewsQ: How to compare the content of two vectors?
public class VetorTurma { public static void main(String[] args) { int pontuacao = 0,nota,c; String nome; Scanner sc = new Scanner(System.in); double gabaritoVetor[] = new double[10]; double…
-
3
votes2
answers3704
viewsQ: How does the equals method work?
I stopped in an exercise of a book I’m reading and in this shows an example of overloading the method equals, I even understood the concept that he compares the reference between two objects, but in…
-
10
votes2
answers1800
viewsQ: Can I use "Cin" and "getline" in the same code?
I was fixing the white space problem with the getline only that I came across this problem where the question "Type the employee name:" is skipped, how to solve this? Is it because I’m using cin and…
c++asked Marcelo T. Cortes 804 -
2
votes2
answers2008
viewsQ: "No value specified for Parameter 1" when executing Preparedstatement
I’m testing a insert here and the following error appears to me: Exception in thread "main" java.sql.Sqlexception: No value specified for Parameter 1 Dao package modelo; import java.sql.Connection;…
-
6
votes2
answers15301
viewsQ: Date formatting with Calendar dd/MM/yyyy
I’m having trouble formatting the date to the dd/MM/yyyy format Como aparece: Sat Feb 26 11:38:28 BRT 2015 Como eu quero que apareça: 04-07-2015 Here’s how I show it on the screen…
-
0
votes1
answer238
viewsQ: Error inserting JDBC data
I’m having the following problem, I want to enter the data from my expense table but some error happens with my Foreign key, which may be ? background: Cannot add or update a Child Row: a Foreign…
-
1
votes1
answer40
viewsQ: Problem to sum values in JDBC
The console presents me the following error: FUNCTION worksoviagemd.SUM does not exist. Check the 'Function Name Parsing and Resolution' Section in the Reference Manual Can only be sql in my…
-
0
votes1
answer864
viewsQ: How to Make a Control Class for JDBC Crud
How do I make a control class for a list method of my crud? The method of my dao class will return all the data set that have the same city. But this mistake happens in my main class: Method of…
-
0
votes1
answer4099
viewsA: How to list data from a Mysql database using the Java List (jdbc) method?
Solution of my problem: I had to set my Conexaomysql before Preparedstatement so it gave error. Now compiled :-) ConexaoMySQL.conectar(); PreparedStatement stmt = ConexaoMySQL.getConexao()…
-
0
votes1
answer4099
viewsQ: How to list data from a Mysql database using the Java List (jdbc) method?
I’m having trouble trying to list the data. Exception in thread "main" java.lang.Nullpointerexception at modelo.Dao.getLista(Dao.java:111) at principal.Main.listarViagem(Main.java:161) at…
-
0
votes1
answer134
viewsQ: How to set a jcombobox in a Preparedstatement?
How do I make a jcombobox in this method? The Combobox would be the type the user is supposed to choose, I tried to make one but it didn’t work out very well. And this method is in my main class and…
-
0
votes1
answer683
viewsQ: Problem reading property file
I created a propertie file for the database to read this file from there but the console presents me the following error: Erronull\properties\conexao.propertie (O sistema não pode encontrar o…
-
1
votes2
answers6796
viewsQ: Mysql error 1215: Cannot add foreign key constraint
How do I fix this mistake? I know one of the reasons for this is that the columns need to have the same size and specification. But I’ve tried everything and it’s not working. CREATE…
-
1
votes2
answers2111
viewsA: How do I connect a database to a JAVA application
I don’t know how familiar you are with JDBC but this is a class that makes a connection to the mysql database, which is your case. Remember that you need a connection jar too...again do not know…
-
4
votes1
answer617
viewsQ: How to set a char in a Preparedstatement?
My typical variable is a char how to set this in Preparedstatement ? PreparedStatement ps = conexao.prepareStatement(sql); ps.setString(1, veiculo.getTipoCombustivel());…
-
0
votes0
answers270
viewsQ: (Business rule) - Update balance
I am developing a business rule in which the user when typing the number and agency from the bank account, he has two options: 1-Credit: The user will type char 'c' through Jtextfield credit…
-
0
votes2
answers120
viewsQ: (Business rule) -Repeated registration
How do I make this business rule that prevents the user from registering an account with the same number and agency ? Main class public class Main { public static void main(String[] args) { menu();…
-
4
votes1
answer2475
viewsQ: How to popular a Jtable using a . txt file?
I wonder how do I make to popular one JTable using a pre-existing text file. I have a query table and I want the user when placing the account number, it shows the data on Jtable and also how I can…
-
1
votes1
answer123
viewsQ: Problem returning a method’s value
I am studying the book of Deitel Java how to program and I came across an exercise that asks to make a wage increase of 10%, my doubt is in the method of adjustment, my goal is to show on the…
javaasked Marcelo T. Cortes 804 -
1
votes2
answers582
viewsQ: How to create a function that returns the lowest expiration date between batches of a given product?
How I create a function that returns the shortest expiration date between batches of a particular product? Dry my SQL code: create database Exemplo; use Exemplo; create table produto (codProduto…
-
0
votes3
answers1715
viewsQ: Create a Trigger that runs whenever a product is deleted
How to create a Trigger that is executed whenever a product is deleted, performing the delete action in all batches related to the deleted product. Here’s my SQL code: create database provafinal;…
-
2
votes1
answer783
viewsQ: How to put an image in Jcombobox?
When the user selects the option, an image appears on the side.
-
3
votes2
answers1867
viewsQ: How to pass an array to a Jtexfield?
I’m doing a college paper where we have to do a kind of screen login, however, with array and not Arraylist. My question is how I pass on the information from JTexfield to the array? That one array…