Posts by Maniero • 444,682 points
6,921 posts
-
4
votes2
answers113
viewsA: Generic types in Java method call
The term could be generic parameterization. This is the moment that is defined which generic terms will be used in the composition of the method, this is where generic parameters are being defined…
-
6
votes3
answers158
viewsA: Access a value on an if condition
Has, creating a variable, That’s exactly what this mechanism was created for. Some people create where they shouldn’t, that’s a case they should. Variables are used to store values for later use.…
-
3
votes2
answers342
viewsA: Use of the unassigned local variable of two strings in C#code
The error is exactly what is written, you did not initialize the variable and tried to use without a value in it, this would potentially give error, so compiling already prevents. So what should you…
-
3
votes1
answer64
viewsA: Does the programming language that follows only one paradigm have any advantage?
Having only one paradigm gives a sensational advantage, the language is simple. but there’s a downside, it gets too simple for most problems, so simple. But there’s a problem with all of this. Some…
-
2
votes2
answers65
viewsA: What term use 'date' or 'create_at'?
It doesn’t really have a clear context, but because you’re thinking about CreateAt I imagine that this is the context and then it should be used, after all the names should say exactly what they…
-
2
votes2
answers122
viewsA: When should I use generalization in case of use?
There’s some controversy about that. There is a "school" that thinks in one way and it is the most academic possible, in fact it is used in practically every example of book, blog, course or other…
-
2
votes2
answers528
viewsA: What does the error "Cannot implicitly convert "void" to "int" refer to?
The method WriteLine() has as return void, ie returns nothing, then has no value in the execution of it, and is trying to store a value in the variable, this is not possible, need to use a method…
-
1
votes1
answer392
viewsA: Error Dispose(bool)': no suitable method found to override C#
When you give a override means that this implementation will replace an existing one of the same method (same signature) that comes from the class or interface that this class is inheriting. But in…
-
12
votes1
answer1140
viewsQ: Why should I use Joda-Time or not?
The question comes mainly based on comment from one of our most active users today and who has already demonstrated extraordinary knowledge in time use, especially in Java. the java.time API would…
-
8
votes1
answer460
viewsA: What is " : " (two points) in C#?
In this context it is syntax error. Under no circumstances can the two points be used there in C#. In Java this syntax of for would be valid and would be equivalent to this in C#: foreach (int i in…
-
1
votes2
answers255
views -
2
votes2
answers186
viewsA: How does Java sync work?
In fact if it happens I shouldn’t use it this way. People have the belief that putting new threads everything gets fast, but often gets slower. See It’s always guaranteed that a multi-threaded…
-
3
votes1
answer116
viewsA: Are the new self-contained . NET executables really native?
No, at least in normal form. Files that look executable are not completely executable like this, they have a bytecode and not a ready-to-run code. It is encapsulated in the same file type as a…
-
4
votes1
answer125
viewsA: I need help on the if and Else structure
Can do yes: if m > 1: b = 'metros' d = 'equivalem' else: b = 'metro' d = 'equivale' If you’re going to use words in sequence, then you don’t even have to keep two variables: if m > 1: b =…
-
1
votes1
answer72
viewsA: I need to return in % the value of how many numbers are positive, the amount of zero and negative numbers, in this order, but my code is wrong
If the statement is correct, it is doing too much and the order of what it is verifying is wrong, as I think it is easy to observe this in the code. function calculos(valores) { return […
-
7
votes2
answers128
viewsA: If abstract classes and interfaces cannot be instantiated, what is happening here?
They alone cannot be instantiated, but this is not a blind rule that has been created, there is a reason: it cannot because the interface does not have an implementation and therefore could not be…
-
1
votes2
answers127
viewsA: Update variable values on repeat loop
If it does not give the expected result is not working and does not meet the requirement. I won’t talk about the various problems in this code, nor complain about the use of double for monetary…
-
9
votes3
answers189
viewsA: Global and local scope variable
I wouldn’t advise doing this, but with var you can do it. The let actually working with the statement in the right order, even was the reason it was created. The wrong was the var and if you want to…
-
2
votes1
answer102
viewsA: Circle area application: method shows that not all code paths return value
When you use a type as a return in signature of the method you have to return an object of that type in any situation that happens in the execution of the method. In general this error occurs when…
-
1
votes2
answers475
viewsA: Try/Catch: java.lang.Outofmemoryerror: Java heap space
It is not to treat this type of error, this is the most serious error that can happen with its application and it is intractable in it, this occurs by serious programming errors occurring even in…
-
1
votes2
answers834
viewsA: Find the highest vector value
There are errors there, but the code is too complex, it can be much simpler than this. And the statement is not good, what is the point of asking how far you should check? If you won’t check the…
-
2
votes1
answer90
viewsA: What are considered operators in the programming language?
No, but the opposite is true. Everything that is written in a code ends up forming a token, inclusive tokens are usually formed by others tokens, then an operator, as well as any other language…
-
1
votes1
answer97
viewsA: How does it work and why use the Command project standard?
And if you don’t know exactly what this action is, how do you solve it? You know that an action needs to be executed, but the object is to determine what it will be, it needs some mechanism to solve…
-
1
votes1
answer104
viewsA: How to use static property of a class in another class in PHP?
If you want performance and security I would review the idea of using PHP and OOP has nothing to do with it. You’re actually doing less OOP than you think. It’s common for people to say who they’re…
-
4
votes2
answers233
viewsA: Variable is not being found
You need to declare the variable outside the loop, this is called scope. When you declare the variable inside the block it only exists there; the while is out of the keys, right? Then it is already…
-
6
votes1
answer122
viewsA: How does Windows manage installation frameworks?
No, the . NET 5 is not installable, just like any .NET Core which in the background is the . NET 5 onwards. It generates a self-contained application with everything you need and so just copy on the…
-
17
votes1
answer201
viewsA: What does _ in C#mean?
It is a way to indicate that you do not want to use any value. It’s like a fictitious variable (but not a real one so you can’t use it), so you’re saying explicitly that you know that a value is…
-
5
votes2
answers177
viewsA: Why can’t you access a class attribute in the inherited class?
I see some problems in modeling, but I will focus on the question asked. What you call attributes is actually called field. Inheritance is occurring. People do not understand inheritance and…
-
4
votes1
answer143
viewsA: Variable changes value when calling function
The type of data you’re using is called type by reference, so you don’t have the object directly, you have an indirect to the object. The variable has a reference to the object and does not have…
-
2
votes1
answer60
viewsA: What is a prolyfill?
The term is new to me, but there seems to be a "canonical information" simple about her so I’ll answer up because I know it’s only to have useful content here. It’s basically the same as the…
terminologyanswered Maniero 444,682 -
6
votes2
answers887
views -
4
votes1
answer136
viewsA: Who regulates W3C or WHATWG web standards? Or neither?
Reading the Wikipedia it seems that WHATWG is a group that has been formed to make projects move faster by forcing the W3C to accept that this group exists and to start working together or in a way…
-
1
votes1
answer268
viewsA: Contador Javascript
I put the counters. But a function that is said to calculate average should not count approved, at least the name should change. The code ends up doing more than it should and can give errors in…
-
1
votes5
answers431
viewsA: Go to certain link depending on the page
There are several mistakes there, I do not know if it solves everything. Had an assignment operator = used in place of comparison ==. No need to === because you are sure of the types that are being…
-
1
votes1
answer113
viewsA: Problem with the use of float in vector C/C++
The statement is ambiguous so it is not a good problem to solve. He talks about entering 12 valid notes, then admits that among those 12 may have some invalid ones. But pretending you don’t have…
-
10
votes1
answer1792
viewsA: What’s the difference between "Big O", "Big Theta" and "Big Omega"?
This is a controversy already discussed before another question I answered and some people said I was wrong. And I was wrong, for academics. Yes, academics define this in a different way than how…
-
4
votes1
answer106
viewsA: Return Undefined
The function is not returning anything, it is printing something on the console, but why print something if you want this function to result in something to print? Then change: var nomeAluno =…
-
3
votes1
answer118
viewsA: Relational databases and relational object
In essence the relational object database is a relational database, so it works with related tabular data in the physical model to form objects. The difference is in the logical model that tries to…
-
1
votes1
answer52
viewsA: Incorrect visualization of items in POO code in C#
The code has several problems, especially if you are looking to learn about object orientation. This code mixes responsibilities (printing and controlling data, maybe even something else) and…
-
1
votes2
answers77
viewsA: If an A class is an implementation of an X interface, will the subclasses of A also be?
Yes, it will be, the inheritance makes the new class have all the characteristics of the mother class, its fields, its methods, and its explicitly stated types. A child class can have more than a…
-
1
votes1
answer1296
viewsA: How to check if a character is uppercase or lowercase in Pyhton?
As Python documentation the function would be isupper(). So that would be it: def contaMaiuscula(string): mai = 0 min = 0 for c in string: if c.isupper(): mai += 1 else: min += 1 return mai, min…
-
5
votes2
answers100
viewsA: Validate difference of 5 points for more or less
I imagine that there is even an error in this logic and what you want is to establish whether you are within a range, and this is always done by comparing the desired variable with the lowest…
javascriptanswered Maniero 444,682 -
2
votes2
answers41
viewsA: When I try to display the values of a vector some more zeroes appear
If you are going to add the elements in the array it makes no sense to initialize it with a size, doing so is creating elements with value without definition, these zeros that are printing (but…
-
1
votes1
answer137
viewsA: Separate print from two Python structures
aa = 0 a = 1 fim = int(input('Digite um termo: ')) for n in range (0, fim): s = (aa + a) print(s, end = ' → ') aa = a a = s print() s = 0 while s <= fim: if s % 2 == 0: print(s, end=' → ') s = s…
-
15
votes1
answer1894
viewsA: What is the real need for SSR (Server Side Rendering)?
TL;DR CSR: impairs the SEO harms the UX is inefficient in certain scenarios. Detailing My answer here is that it was disputed where I said that SEO screws you if you use JS heavily. According to the…
-
1
votes2
answers868
viewsA: Error: Incorrect decimal value: ' for column 'Value' at Row 1
I imagine the column Valor is a numeric type and therefore should be recorded as a number and not as text the way you are doing so you need to convert the data instead of recording directly. And you…
-
1
votes2
answers92
views -
8
votes1
answer2629
viewsQ: Why does it occur and how to resolve an error of "out of Bounds" or "out of range" or something?
I’ve seen errors and exceptions like "subscript out of range" or "index out of Bounds" or some combination of words like that. What that mistake means and how it usually is the way to correct them?…
-
9
votes1
answer2629
viewsA: Why does it occur and how to resolve an error of "out of Bounds" or "out of range" or something?
Programming error First of all, this is a programming error. It is important to say this because it is usually an exception in many languages and people are tempted to capture the exception and do…
-
2
votes1
answer823
viewsA: Is there a Java Scanner equivalent in Javascript?
Does not exist in the implementation of browsers. They are languages that implement these things in libraries and not in the language itself. Java is used primarily as a backend, console and GUI…
javascriptanswered Maniero 444,682