Posts by Renan Gomes • 19,011 points
435 posts
-
8
votes1
answer95
viewsQ: How not to ignore directories with the same name?
I have the following structure: nbproject public_html build index.min.html style.min.css index.html style.html build dist Man .gitignore to ignore the Netbeans configuration files is like this:…
-
5
votes4
answers9657
viewsA: How to open a <div> by clicking on a <a> link?
It is not necessary to use Javascript in most cases where it is necessary to do some kind of toggle in another element. Just one <input> type checkbox to make sure when to show or hide, then…
jqueryanswered Renan Gomes 19,011 -
5
votes1
answer1334
viewsQ: How to create a window without using the GUI builder?
I’m starting to study C# and just like in Java, Ides provide resources that make it possible to build Guis easily by dragging components. The netbeans has a powerful construction tool where it is…
-
4
votes2
answers2788
viewsA: How to make elements fit the text size?
The best solution is to use Flexbox, will save you a lot of trouble in calculating the internal positioning of the elements and make it yours HTML simpler. See browsers that support. You can create…
-
3
votes2
answers697
viewsA: Attribute "Multiple" of <select> tag does not work
It’s working normally, it turns out the user needs to keep the key Ctrl pressed while selecting items. It also works by holding down the mouse button while passing the cursor over the options. Test:…
-
3
votes2
answers3756
viewsA: How to save the path of an image in the Database?
Is not possible for security reasons. Quite simply: No website needs to know anything about the user’s file system. When a file is sent to a server only data is important. In Firefox you can still…
-
4
votes1
answer727
viewsA: Create data validation and page sequencing
Utilize Cardlayout that allows working with several JPanel within a Container. With this layout you can easily control the flow of panels using methods to change them: first(C) // Alterna para o…
-
10
votes4
answers8045
viewsA: Create button with icon next to
Based on model image: button { border: none; cursor: pointer; height: 32px; /* altura c/ base na imagem do AP */ position: relative; width: 140px /* largura c/ base na imagem do AP*/ } button span {…
cssanswered Renan Gomes 19,011 -
2
votes3
answers179
viewsA: CSS, center split line between left and right
There may be better proposals outspoken more elegant. An idea is basically to insert an element <span> among their <divs> .left and .right, something like a separator. *…
-
2
votes1
answer331
viewsA: CSS, firefox does not recognize Bree Serif font
Perhaps it is more interesting to use the Quick-use, as Google indicates. I do not put my hand on the fire but I believe that you will hardly have a loading problem by "Google be offline". The three…
-
7
votes3
answers1750
viewsA: Smooth element animation swing via CSS Transform
Using @keyframes along with the property animation to have control over the animation. Keyframes on the MDN Animations on MDN For this case, only with CSS, a possible solution would be:…
-
5
votes4
answers3497
viewsA: How to prevent the user to enter numbers for a given data?
You can create a unique method that takes as argument a String to be checked for numbers or not. For example: public boolean hasNumbers(final String string){ String numbers = "0123456789"; for(char…
-
2
votes3
answers1139
viewsA: How to use the preventDefault function in an event click in an iframe?
A CSS-only solution would be to use the property pointer-events in the <iframe>. You just need to watch out for which browsers support. iframe { pointer-events: none } <iframe…
-
3
votes1
answer62
viewsA: Apply limit function to all textareas
Currently, with HTML5 it is not necessary to use scripts to limit the amount of characters in a <textarea>, only the attribute can be used maxlength: <textarea…
-
5
votes1
answer422
viewsQ: Less should be compiled yet in development?
My doubt arose after read this question and its answers. Many Ides provide ways to compile LESS code still in development. In Netbeans, for example, it is possible to configure forever the code…
lessasked Renan Gomes 19,011 -
2
votes4
answers359
viewsA: margin:auto; how to apply in this case
In order for the placement of the child elements to be calculated in relation to the parent element, you need to use position:relative in your class .p_sects. Thus the margin: auto will work…
-
4
votes1
answer330
viewsQ: Can enumerations contain methods?
I don’t know if that’s the term, "abstract methods in a enum". My doubt arose after seeing this implementation in code review. Until then I had never seen this kind of thing in any tutorial or…
-
9
votes2
answers11183
viewsA: How to put an Submit input inside the input text?
Actually the button is not placed inside the <input>. One solution is basically to leave your input[type="text"] no edge and wrap the <form> with an element that will cause the…
-
2
votes1
answer3158
viewsA: Unknown error type name
In Bib. h it does not recognize this variable matriz because it was created in the first file. You would need to make a #include "main.c" of the first file or else create your struct inside the Bib…
canswered Renan Gomes 19,011 -
13
votes1
answer369
viewsQ: What tags can I use to document my code?
I’m looking for better ways to document my code in Netbeans. Besides the tags known and used in Javadoc something caught my attention and aroused my curiosity. When typing {@ some suggestions of…
-
4
votes2
answers1955
viewsQ: Why is the initial state of a required <input> invalid?
When I place one or more restrictions on one <input>, initially its state appears as invalid. As in the example below: input { border: 2px solid #ccc; padding: 8px; } input:invalid {…
-
3
votes1
answer2211
viewsQ: Does Localstorage have any storage limits?
I need to store a very large amount of words/phrases in the user’s browser, I would like to know if use localStorage is a good option. If yes, there is some restriction/limit on the amount of…
-
2
votes2
answers218
viewsQ: Is there a way to not fill HTML with directives?
Using the directive ng-click to catch an event by clicking one link would be something like: <a ng-click="call('home')" href="#" title="ir para homepage">Home</a> But this wouldn’t be…
-
15
votes3
answers17342
viewsQ: How to use more than one separation character in the split() method?
I’d like to break a String in various substrings, for this I am using the method split(). Turns out, I’m not sure which characters might be in the variable I use. Exemplifying: String words[] =…
-
1
votes1
answer141
viewsA: Exception released when using the Commons-email API
The problem is because the Commons-email is not an independent API as I thought, it is a more abstract layer of JavaMail API, i.e. it has dependencies. The exception thrown in my code happens by the…
-
0
votes1
answer141
viewsQ: Exception released when using the Commons-email API
I’m trying to use the API Commons-Email as an alternative to the known JavaMail to send emails in Java but a problem is occurring. The following is being launched Exception: Exception in thread…
-
2
votes1
answer909
viewsA: Switch from Jframe to Jdialog
In the code in question a IllegalArgumentException on line 50. This is because you are using an illegal constant for a JDialog in the following passage:…
-
8
votes2
answers390
viewsQ: Can Missing semicolons in CSS and Javascript influence how code works?
I always leave my css code and javascript minified but had never noticed the output generated. Well, I noticed that the last rule of a selector (in css) and the last function (in javascript) always…
-
7
votes1
answer1002
viewsQ: Semantically, which tag should I use for icons?
I have a navigation menu with some icons using @font-face. Each item in this menu has: the icon (with ::before); text, explaining the function of that link. .It turns out that when the page is…
-
18
votes2
answers929
viewsQ: Operator " | " in Java
I can’t find any material over the internet explaining the usefulness of the "|" operator in Java. I know there is "||" (or) used to test conditions. if(foo == 'a' || foo == 'b') But what about the…
-
1
votes4
answers787
viewsA: CSS transparency
Yes, instead of using the property opacity utilize linear-gradient. You can "merge" various values and search for the result of background who is in need. Using opacity, the child elements will also…
cssanswered Renan Gomes 19,011 -
1
votes1
answer381
viewsQ: Enable/disable an Actionbutton on a given page
I am developing an extension for Firefox browsers, soon arose the need to control the action button so that it is inactive until the user enters a particular page. Exemplifying, I will use as an…
-
3
votes1
answer1966
viewsQ: How to copy a text to the Clipboard using Zeroclipboard?
I found several articles saying that this type of action with Javascript is something "risky" and many browsers prevent this to be done. Yet, in the articles I read, they said that the only way to…
-
2
votes1
answer140
viewsQ: "repaint" in javascript, is there?
I’m developing a website and added the lionscroll plugin (to show that bar similar to Facebook, which disappears and appears, depending on the position of the cursor). Anyway, here’s the problem...…
javascriptasked Renan Gomes 19,011 -
4
votes1
answer2089
viewsQ: Edge effect of a Jbutton component
How do I create a smooth transition(Fade Effect) from the edge of a Jbutton by hovering the mouse? My code is like this: @Override public void mouseEntered(MouseEvent e) { Object temp =…