Posts by Marcos de Andrade • 497 points
19 posts
-
1
votes3
answers100
viewsA: Problems with array manipulation to find result
First of all, thank you to all who have collaborated, both with your knowledge and with your time, from the heart. DRT: The result of a set of absolute operations under subtractions depends on the…
-
3
votes3
answers100
viewsQ: Problems with array manipulation to find result
I was solving a problem that was basically: A prisoner was sentenced to perform a job where he was to break all the stones that were provided to him, but he could not use any tool for it. To…
-
5
votes1
answer12517
viewsA: Validation Telephone Field
If you want to validate a number, use a Regular Expression. The website of Mozilla presents a excellent article on the subject, and the website Regexr is great for validating regular expressions. In…
-
0
votes2
answers99
viewsA: System.Nullreferenceexception: 'Undefined object reference for an instance of an object. '
Should the panel3 and panel4 variables reference instances of the Calculator_panel object, reference elements belonging to the Calculator_panel or what other class? You have not declared the…
c#answered Marcos de Andrade 497 -
0
votes3
answers507
viewsA: Hide a div
If you are using Flexbox (bootstrap), assign an ID to the div that will disappear and assign the class col-12 (for mobile resolutions) and col-Md-6 (for resolutions larger than average) to the div…
-
1
votes3
answers253
viewsA: Search for word variations
You can normalize the word by making all the characters in your version without accent and in low box. You can use the System.Text namespace to perform character conversion: string s1 = new…
-
0
votes1
answer302
viewsA: Attribute declaration in a Java class
Well, let’s look at a fragment of the code: private Tabuleiro tabuleiro Private: Parameter visibility. Sets what you can access contents of the variable. In the case of, private defines that only…
javaanswered Marcos de Andrade 497 -
1
votes1
answer5564
viewsQ: CSS Grid Layout - How to horizontally center all elements across all the Grid Lines of a Sub-Grid?
I am working on a college project and we are using Grid Layout to design an e-commerce for animals. A doubt arose during the creation process regarding the centralization of the content of grids in…
-
0
votes1
answer77
viewsA: System.Nullreferenceexception was unhandled by user code
"Check to determine if the Object is null before Calling the method". The program itself answers your question. Your method tries to return a session without at least checking if there is an…
-
4
votes3
answers4373
viewsA: If H = 1 + ½ +1/3 + ¼ + ... + 1/N, make an algorithm to calculate H, where N is typed by the user
This algorithm is also a classic example of recursion. I find it interesting to leave here as an alternative way to end the example. Simplifying the algorithm (without checking for exceptions etc):…
javaanswered Marcos de Andrade 497 -
1
votes2
answers53
viewsA: I must stop the application when I run a test
You should do the tests Before to send the code to production. Ideally, there is an approval environment for testing, and if testing passes, then only then do you send the codes to the production…
javaanswered Marcos de Andrade 497 -
1
votes4
answers1009
viewsA: Image occupy entire column
I believe you can solve your problem by using the card-img class in Bootstrap, and adding the following code to your css: .card-img { width: 100%; height: auto; } It is interesting to read the…
-
3
votes2
answers204
viewsQ: Better structuring of object-oriented code
I came across a problem with code structuring and I needed some help. I made a diagram below with two different methods of structuring the same code (I couldn’t create the code yet) and wanted to…
-
0
votes1
answer76
viewsQ: Reusable elements in the CSS BEM Methodology
I am studying about the BEM methodology (right at the beginning, I assume), and I was in doubt about one aspect of it. I see that it aims to standardize the CSS declaration means of your page…
-
0
votes2
answers347
viewsA: Java Language - Undo and Redo functions
You have reported that the states of the photos with each modification are stored in an image array, correct? I believe that your work would be simplified if, instead of using a vector, you used a…
-
11
votes3
answers432
viewsA: CSS operators with @
The @ operators are used to establish some rules in the CSS. The most commonly used, in addition to @media which has already been described in your last question, are: @import: used to import a…
-
0
votes2
answers1312
viewsA: How to separate two li
In your example, there was no separation between the items in the list because the device resolution is too small and does not hold the number of items. It is a responsiveness problem. As you are…
-
4
votes3
answers11852
viewsA: Show a number in 2 decimal places
Javascript has a method toFixed() where you can determine with how many decimal places you want to show your value…
javascriptanswered Marcos de Andrade 497 -
1
votes3
answers927
viewsA: How to declare an attribute in interface?
In your case, what you’re looking for is a Abstract Class, not an interface. I think it is important to make a brief distinction between Interfaces and Abstract Classes, since you seem to have some…