Posts by Maniero • 444,682 points
6,921 posts
-
3
votes2
answers171
views -
2
votes1
answer1598
viewsA: Modeling for shared address table
I don’t know how you’re gonna repurpose the existing address. My experience is that this works better on paper than in practice, but it was just a supplementary comment. What you can do is use…
-
4
votes3
answers342
viewsA: Where should I put a calculation method? In the entity itself or in the business class?
I think the answer is in the question. If you have one class for the entity and another for the business rules, you have no reason to put this method in the entity. The rule class is there just to…
-
7
votes1
answer975
viewsA: What differentiates a microframework from a full stack framework?
Researching the subject I concluded that there is no clear and universally accepted definition. At the moment, apparently, the term is mainly used as marketing according to the criteria of who…
-
11
votes1
answer1422
viewsA: Listeners are an Observer implementation?
Yes, it’s the same. If you pay attention, the names are a little different, but the function is the same. Observer or listener gives in the same. Subject or source... It has several ways to do and…
-
17
votes3
answers1592
viewsA: What is System.Linq for?
That specifically is a namespace of . NET. See in another question. Just like in PHP, if something is inside a namespace needs to be "imported" to gain access to its members (unless you use the full…
-
36
votes3
answers6154
viewsA: C# is a compiled or interpreted language?
It is completely compiled. First for intermediate code, then for native code. Well, that’s the simple explanation. None programming language is compiled or interpreted. Language is something…
-
2
votes1
answer51
viewsA: How to get Windows 7 DLL documentation?
All documentation of this type is on Docs Microsoft. Specifically the API. The main of Windows.…
-
3
votes1
answer333
viewsA: Delphi => C#: generic function to return billet DV
Not to be without any answer I gave an improved one. I fixed some mistakes. There were things that the translation of the code was completely wrong, or had performance problems, and the style was…
-
10
votes3
answers821
viewsA: What is the difference between "decimal. Divide" and the traditional "/" in C#?
None practical, it’s just a different syntactic way, they perform exactly the same thing. At least if we are only talking about this specific example or use with decimals. See the operator source.…
-
1
votes1
answer45
viewsA: How to remove element from a list?
When I answered the question was different, I don’t think I still have enough information for a different answer from this. I do not know what is the intention of this code, but starting from the…
-
6
votes1
answer96
viewsA: Why not give Segmentation fault when writing to a "char *" without allocating memory?
Because C does not require you to allocate memory. The language can access all of your address space insecurely. C is powerful, performative and flexible, at the cost of robustness. If the…
-
14
votes2
answers877
viewsA: Is there a specific rule for commit messages in versioning systems like Git?
Maybe the problem is not the messages, but what is done in each commit. One of the advantages of Git is to facilitate the granulation of commits. The rule is to make a small change, or even other…
-
3
votes1
answer182
viewsA: Why does Netbeans suggest changing an array addition?
I guess I could start reading what is a vector. It even makes sense to pass the whole vector as a parameter, but it makes little sense to access it directly. Normally we access its elements through…
-
5
votes2
answers97
viewsA: Reverse process modeling
There are several more complete tools, most pay (but have free, even closed source). All I know do reverse engineering from physical model to logical and logical to conceptual. The best starting…
-
7
votes1
answer1023
viewsA: Why is the size of a struct not the sum of the sizes of its variables?
In fact the structure may be the same size as the sum of its members. It depends on the alignment. If the members allow to assemble the structure in an aligned way will have the same size. The case…
-
1
votes1
answer137
viewsA: Chained list is not removing the elements
First let’s organize the code, mainly giving more meaningful names to make what we’re doing more intuitive (at least eliminate a generic name aux for atual). Then it’s easy to see the error: public…
-
11
votes6
answers1578
viewsA: Is it good practice to use constructors (or magic methods) in interfaces?
First I want to repeat what I always say: good practice is to do what is right for that situation. So to say that this can or cannot do, for everything, is a bad practice (with the pardon of the…
-
1
votes1
answer190
viewsA: Bigdecimal error cannot find Symbol
This code uses a variable called d on the line BigDecimal bd = new BigDecimal(d).setScale(2, RoundingMode.HALF_EVEN); this variable is not declared anywhere in the code. Surely this causes the…
-
2
votes1
answer140
viewsA: WYSIWYG editor with code style
Not to be without an answer: Some people recommend the Colorcode. It doesn’t work with many languages. From what I understand it would have to do this on the server, which I think is not ideal in…
-
5
votes2
answers837
viewsA: Operator error cannot be applied to the method group
There are several problems in this code. I will fix some. The method TempoTotal() it does not need to be static, there is no gain in being, on the contrary, it is causing problem. It is much easier…
-
2
votes1
answer1984
viewsA: What Ruby applications do you have besides the web?
Whichever programming language can be used for any activity. Of course some are better for one type of application than others. There are some languages that have chosen to be niche themselves and…
-
4
votes1
answer84
viewsA: What good is C-EPERM?
Documentation of this standard error library. It says that this code represents an operation error not allowed, perhaps due to lack of privileges to execute. in the specific case, or null occurs…
-
2
votes1
answer1233
views -
1
votes2
answers250
viewsA: Object error not instantiated
Vinicius' answer is perfect, at least to the extent that it gives on top of the presented code (I won’t go into details of what could be different than what is not the focus of the question). I’ll…
-
23
votes3
answers1609
viewsA: What is the function of the vector (array)?
A vector is usually a variable that can contain various values (can be only one object not stored in variable). You use it when you need to store a sequence of values in memory. In general these…
-
8
votes2
answers2804
viewsA: What is the "connectionString" connection string?
It is a text that passes the information necessary for the database to establish a connection with the application. You obviously need the address (usually includes the port) where the bank is, what…
-
26
votes4
answers1189
viewsA: How does a search engine work?
Crawling The mechanisms use a system of crawling (detailed information on Wikipedia). In the background they go browsing as if they were a user, only that it is a robot, is a software that keeps…
-
2
votes2
answers356
viewsA: Exception with timestamp in the database
The guy timestamp of SQL Server is equivalent to rowversion, he shouldn’t keep one timestamp your. The solution is given in the error message. Do not save anything in that column. Why save…
-
2
votes2
answers482
viewsA: Insert time and time into database
There is a typo, change to: VALUES (@nRequesicao, @nomeEmpresa, @colaborador, @data, @hora, @nota)
-
3
votes1
answer344
viewsA: Differences in constructors using property vs field (field)
First it’s good to understand well what a builder is for. Then it starts clearing up because it’s different to boot it or the property. Unless you’re using C#6 or higher and the initialize directly…
-
4
votes1
answer188
views -
5
votes1
answer180
viewsA: Variable with unassigned value within a "for" loop
The mistake is that the for is not running, it is being shut down even before starting, after all right at the beginning of it there is already a ; that closes it. The correct thing would be to have…
-
2
votes1
answer88
viewsA: Javascript conditions not working
This is a way that could solve the problem, but I cannot guarantee because the question does not explain what is the desired result. There was even an issue that completely changed what it was…
-
3
votes1
answer61
views -
42
votes1
answer9859
viewsA: How is a programming language developed?
The beginning It’s like making any software. A new language arises from the need to solve some kind of specific or general problem differently than before. This was the case when the first low-level…
-
1
votes1
answer401
viewsA: Separate array and save to strings for later use
I think this code is weird, I’d do it another way, but come on: char str[9]; char str_line[6][9]; for (int i = 0, b = 0; i < 8; i++) { str[i] = '0' + i; Serial.println(str); if (i == 8) { str[8]…
-
6
votes2
answers912
viewsA: Good practices for PHP MVC
There is no such thing as good practice. There is right or wrong for every situation. Only qualified, more than quantified experience will provide the basis for achieving better. Most of these…
-
3
votes1
answer294
viewsA: How to include the same class in multiple files?
You are having problems because they are interdependent. You must ensure that one does not call the other indefinitely. You need to ensure that there is a class statement (you don’t need to declare…
-
13
votes1
answer296
viewsA: What are Sockets? And how to develop in C#?
Socket (socket) is the final point of data communication from one process to another on the same machine or on another. It is a mechanism normally provided by operating systems to establish data…
-
11
votes4
answers870
views -
4
votes1
answer392
viewsA: How to model Product/Stock?
Yes, mixed the concepts. Product is product, lot is lot. Everything you deal with in general, abstract, is product. Think of the product as a document that talks about the product. It has no…
-
3
votes1
answer459
viewsA: How can I set the time pattern as UTC or GMT in PHP?
One can use date_default_timezone_set('UTC'). Coordinated Univeral Time is the same thing as Greenwich Mean Time, but today UTC subjectively is considered more correct in the scientific environment,…
-
3
votes1
answer138
viewsA: What does maximum depth level mean?
Documentation. Mongodb works with document nesting, right? You can go putting "sub-documents" inside each other. It’s like they’re tags XML/HTML, you put one inside the other. When you put a…
-
3
votes1
answer95
viewsA: Do static methods equate to functions?
Yes, functions function like static methods, the difference is that the method is encapsulated in a class, which avoids name conflicts that are more common in loose functions. Despite the term used,…
-
5
votes1
answer1339
viewsA: How to get attribute of a generic type object?
I don’t know if you have any goals that I don’t understand, but just put the normal generic and treat the object as the type you want. If it’s not, he’ll get one nulland need to treat this: public…
-
9
votes2
answers2008
viewsA: Save multiple instances of a class to a List in Java
Basically this is it: ArrayList<Pessoa> pessoas = new ArrayList<>(); pessoas.add(new Pessoa(1, "joão", 'M', "9999-9999")); pessoas.add(new Pessoa(2, "maria", 'F', "9999-9991")); for…
-
17
votes2
answers1644
viewsA: Why use the Angularjs?
There is a lot of opinion on the subject, I decided to answer to try an answer that does not fall into this much, so it is not very extensive. I will not stand by and say whether it is an advantage…
-
17
votes3
answers2808
viewsA: How to block Adblock?
There is no technical solution that can override a technique that is active with browser privileges. There are some palliatives that usually bring more problems than solutions. The most one can do…
-
10
votes2
answers2113
views