Posts by Andrew Ribeiro • 1,718 points
81 posts
-
1
votes1
answer31
viewsA: Show and hide only the desired widget
Imagine that each state change demonstrates how your entire component will be displayed. If you follow this reasoning you will reach the following conclusion: "If I have a component (Home) that has…
reactanswered Andrew Ribeiro 1,718 -
0
votes1
answer343
viewsA: How to change the style of a component without creating another component with Styled Components
In fact, when you create a Styled-Component, you create a new COMPONENT and not a new classecss or a new style object. Therefore, you need to use this component directly. Instead of: <Grid…
-
0
votes2
answers86
viewsA: problems with this in Reactjs
Antony, Strange error occur saying the context this is undefined. I needed to see the full code. However, I made a sandbox implementing exactly what you want to achieve, you can give a analyzed and…
-
2
votes2
answers201
viewsA: React Switch Route Default
You can use the component Redirect. Gets something like this: <Switch> <Route exact path='/dashboard' component={Dashboard} default /> <Route exact path='/profile' component={Profile}…
-
1
votes3
answers91
viewsA: Someone can explain to me the following situation:
The Javascript differs string of numbers yes. But he’s doing an automatic job that you’re missing. The moment you do: x < pessoa.idade Javascript knows the operator of < makes more sense…
-
1
votes1
answer307
viewsA: Why can’t a div stand next to each other?
One div always stays below the other regardless of width? By default, yes! This is due to the fact that the default display of div is block. The block renders an entire line, as the friend @hugocsl…
-
1
votes2
answers96
viewsA: How to manipulate data in HTML?
Only with HTML will not scroll you manipulate data this way. What you can do is a very simple script: <script> var atual = new Date(); var dia = atual.getDate().toString(); var mes =…
-
1
votes1
answer779
viewsA: Bootstrap HTML boot Collapse how to disable one when opening another
What you want is called Accordion. There’s a very interesting example in own website Look at this example I made for you, adapting your code: The secret is to add an attribute called data-parent in…
-
1
votes2
answers231
viewsA: Animation zoomIn is flashing with mouseenter
As I had commented, this error was happening by the following: When the class zoomIn is added, it changes the properties of the element like scale, that goes from 0 to 1. That’s what makes animation…
-
3
votes2
answers78
viewsA: PHP set path to a file
With $GLOBALS it might solve your problem. $GLOBALS is a PHP super global variable which is used to access global variables from Anywhere in the PHP script (also from Within functions or methods).…
phpanswered Andrew Ribeiro 1,718 -
2
votes1
answer57
viewsA: Hide a HTML5 and CSS button when on Smartphone
If you are using bootstrap4, you can use the class d-none (means None display) As this set of classes accept prefixes, you can add the class d-sm-block to switch to display block when the screen is…
-
1
votes2
answers232
viewsA: Pull element that has a specific attribute with javascript
Come on. To understand why all Ivs are being affected, just understand this line of your code: var item = $('.coloritem'); If you give a console.log(item); will notice an Array of items, why this…
-
1
votes1
answer3142
viewsA: JSP - java.lang.Illegalargumentexception: Parameter value [11] Did not match expected type [java.lang.Integer (n/a)]
In the database, the field ID is like another format that is not String, (sweep or longtext). Your user is being passed off as String. The solution would be, either you change the method argument to…
-
0
votes1
answer734
viewsA: Send selected option value by parameter
Good morning buddy, before I help you, let’s consider some changes. Are you wearing a link to make a request, in case: <a…
-
1
votes1
answer82
viewsA: How do I work with object as attribute in registering another object using JSP?
Friend, The process is very simple. First, you will make a call to the bank to display all available tasks. You can save these tasks in a select, for example, where the value is the id of the same.…
-
0
votes1
answer153
viewsA: If the user accesses the home before logging in he must be redirected to the index using jsp
There are several ways to do this. USING FILTERS You can create a filter by implementing the interface javax.servlet.Filter: @WebFilter(filterName = "MyFilter", urlPatterns = {"/principal.jsp"},…
-
24
votes1
answer5948
viewsA: What is Long Polling?
Long Polling is a technique that simulates server downtime to keep an HTTP connection open. This technique was created from the need for real-time communication with a server web. Context With the…
-
0
votes1
answer574
viewsA: error in full Legend
You have correctly imported the specific locale? According to the documentation: How to use other locales You will need to load the locale Javascript data file in order to use it. These files are…
-
0
votes1
answer119
viewsA: Doubt about Filter - JSP
The code seems a little confusing with what you want to do. From what I understand... You want a filter in the /* URL pattern only there are some /* functions that do not require login. If this is…
-
0
votes1
answer248
viewsA: How to receive my array on the JSP page
Good evening Rafael, To get access to this Collection in JSP will depend on how you are making the JSP pro call. If using the method request.getRequestDispachter().forward(req,resp) then you can get…
-
2
votes1
answer815
viewsA: Load data from a method list to Servlet
I’ll try to help you. To solve your problem, let’s unblock into small problems: Identify what you want to return Identify which format you will return Create the logic for return Handle in…
-
1
votes1
answer1276
viewsA: Turbineing the bootstrap Carousel
You didn’t specify how you used the $.find(). I did it here and it all worked out. First you need to hear an event like slid.bs.carousel and not the type slide.bs.carousel. Why? According to the…
-
1
votes1
answer227
viewsA: Function mouseout on icon
You can use to add a "listener" to the event type mouseover, when listening to this event, you add a input where you want it. Likewise, you should remove the inputwhen user takes mouse from input,…
-
1
votes1
answer328
viewsA: Problem in web.xml
If you have not created a Maven project, you should include the JSTL manually. To do this, simply access the JSTL On Maven, choose the version and click on Download JAR. Repository JSTL MAVEN. Then…
-
0
votes2
answers118
viewsA: Select in Hibernate does not return extended class
The two classes will have the annotation Entity. However, the parent class must have a annotation extra indicating what will be the inheritance strategy used. For example, you may want that for each…
-
0
votes1
answer139
viewsA: Servlet recover Object
According to your description, you must be sending this object via AJAX. var obj = {nome: 'Carlos', telefone: '929999999'} $.ajax("url", { data: obj, method: "POST" success:function(data){…
-
1
votes1
answer25
viewsA: Help with JS code
Very simple. Using your logic, you can put a return after var postMiniatura = post.link[k].href;. That way, you will quit the JS function and not run what there is after the else.…
javascriptanswered Andrew Ribeiro 1,718 -
1
votes1
answer600
viewsA: Insert various data into a mysql column
You’ll need an associative table. Since a product needs to relate to many suppliers and a supplier can have many products. In this associative table you can have one the columns ID, ID_PROD,…
-
0
votes1
answer367
viewsQ: Optimization Inserts Hibernate when there is relationship @Manytomany
Imagine the relationships: User has Many Permissions Permission has Many Users We can create a relationship of N para N as follows: User class. public class User { /*Many attributes here*/ private…
-
0
votes1
answer106
viewsA: Implemetar Script
There is no possibility of programming the integral solution for you, but you can give yourself a north, hence you can already have a notion of what is the necessary way to achieve this goal. Let’s…
-
0
votes1
answer355
viewsA: How to do diagonally using after and skew?
You can achieve this by using the css property instead transform. div.skew { background-color: #2d2d2d; height: 100px; width: 150%; margin-bottom: 10px; transform: rotate(358deg) scale(1) skew(0deg)…
-
2
votes2
answers613
viewsA: Adding data tags to the jquery button
An alternative without using the attr would be the very data() jquery. According to the documentation: Store arbitrary data Associated with the Matched Elements or Return the value at the named data…
-
0
votes3
answers792
viewsA: Add class after the page is loaded
Try $(document).ready() instead of $(window).load().
-
1
votes1
answer1414
viewsA: Upload does not reach PHP via AJAX with . serialize()
The method serialize() does not work for the functionality you want. According to the documentation: The . serialize() method creates a text string in standard URL-encoded Notation. It can Act on a…
-
2
votes3
answers481
viewsA: Doubt with float
What comes after the . is the precision of the decimal points. What comes before the . is the width of digites your program will leave to display the value. For example, the instruction:…
-
1
votes1
answer700
viewsA: Javascript validation does not work
Have a look at your code, there must be something else affected this behavior. Another thing, there is no need to change visibility and display. Only the display is sufficient. Look at this code I…
-
2
votes2
answers2419
viewsA: Primary key in associative table(Many for many)
In theory, your thinking is totally correct. In practice, only partially. What you see in practice (which is somewhat disappointing) are developers ignoring the creation of the key composed of…
-
3
votes1
answer4468
viewsA: Working with fullcalendar jQuery
You came to see the renderEvent? I made a very simple example code to show the insertion of a new event. Hence editing and deleting you can follow the same logic. Feel free to use the code however…
-
1
votes1
answer2531
viewsA: How do I get user id in a session?
Celina, you already have the user ID saved in the session. You see, when you put: sessaoUsuario.setAttribute("usuario",usuarioAutenticado); Hence, from this, you can recover the user ID at any time,…
-
1
votes1
answer148
viewsA: Use request.getattribute("key"))
Good Afternoon André Nascimento, To retrieve the list in the attribute request.getAttribute(); there are two ways. Using scriptlets Using the JSTL framework Using Scriptlets Your code will look…
servletanswered Andrew Ribeiro 1,718 -
1
votes1
answer1942
viewsA: how to format variable with jquery Mask
In his div, try to separate the content you want to put static text mask. Something like that: <div id="#v_pg"> PAGA R$ <span class="valor_pago"></span> </div> Finally, you…
-
3
votes2
answers383
viewsA: Jquery Focus() in Firefox
First of all, good morning, Kaique. From what I researched here there is a workaround for that Issue. Try waiting for the next "tick" to run Focus. setTimeout(function() { $(this).focus(); }, 0);…
-
0
votes1
answer28
viewsA: Simpledateformatt write with empty field
Your problem is not time to save in the bank. A Exception java.text.ParseException: Unparseable date: "" concerns the parse you try to make of a String empty. It is very simple to resolve this, just…
-
0
votes2
answers635
viewsA: Doubt - insert html mask
As @Marcoviniciussoaresdalalba quoted, with attribute pattern the user should still put the . or the ,. To really put a mask on, use the library Jquery Mask Plugin of Igor Escobar. With it, you can…
-
0
votes1
answer135
viewsA: reCaptcha - submitted form is validated?
If the user does not correctly mark the reCaptcha box, the return will not be an empty string, the way you are comparing. But an empty array. Therefore, you should check as follows: var v =…
-
1
votes2
answers2062
viewsA: Pass values from a table to a modal dialog (JSP)
To solve this problem you can adopt several alternatives, among them: Generate a unique identifier for each <td> Reclaim the fields <td> in order according to <tr> Parent. I’ll…
-
1
votes1
answer1392
viewsA: How to use redirect methods with Java Servlets
Although your approach is working, it’s way out of the box. An alternative and more interesting way would be to fix the alert on your page JSP and only display it if it passes on condition that the…
-
2
votes3
answers704
viewsA: You can use two columns of the same table in a WHERE
Have you answered your own question. would have some way where at the time the select run I take the value of a specific column and already apply direct mo WHERE? "At the time you select to rotate…
-
2
votes1
answer148
viewsA: Jquery, Initiating with Function
Without delay, your teacher must have made a mistake in saying that your code wouldn’t work. What you did was use something that is very common in JavaScript pure that is to create a Function…
-
1
votes1
answer1192
viewsA: Get a certain part of html from another javascript page
Good evening Gezer, you need to know the transponders that you want to pick up inside the html returned by $.load(). Note that the html returned by $.load() will be charged in the div…
javascriptanswered Andrew Ribeiro 1,718