Posts by Maniero • 444,682 points
6,921 posts
-
8
votes1
answer338
views -
17
votes4
answers1286
viewsA: How many parameters should a method have?
Never work with absolute numbers. These metrics don’t work. If something like this could be determined compilers would prohibit a higher number. You can establish something for your project, but…
-
7
votes2
answers2414
viewsA: What is Travis CI?
It is a continuous integration tool. This is a methodology that preaches that everything that is made of development must be integrated immediately, usually several times a day. So you have the…
-
5
votes1
answer193
views -
2
votes1
answer82
views -
2
votes2
answers895
views -
5
votes3
answers137
viewsA: Access to pointer on main
You are accessing a array of strings. The [] represents the array and the char *represents the string. This is necessary because the command line can pass several arguments, and all are strings. In…
-
5
votes1
answer84
viewsA: How to start a variable correctly?
It is not a matter of being correct, but initializing a variable with a value to exchange that value in the next line makes no sense, so the second code is preferable. Only assign a value to a…
-
3
votes4
answers150
viewsA: How to use unsafe code on a Web Site
You have to do it in your hand by going through the file Web.config: <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider,…
-
2
votes1
answer241
viewsA: What is the difference in function and directive?
I recommend reading the documentation. Yes, all of it. I know that almost nobody will, but it’s still the ideal. What’s in the php.ini nothing to do with the language. That’s PHP environment…
-
2
votes1
answer148
viewsA: Development without EF ORM
It is valid yes, there are many people who do without a ORM or using a simplified ORM like the Dapper. And that’s what you can objectively answer. It has several advantages in doing so, it has some…
-
2
votes1
answer825
viewsA: Evaluation activity hours per minutes
I think this is what you want. #include<stdio.h> int main() { float hora; printf("Insira as horas formatada 0.00: "); scanf("%f", &hora); float min = hora; hora = (int)hora; min = (min -…
-
7
votes1
answer272
viewsA: What do the terms "forward Compatibility" and "backward Compatibility" mean?
Backward Compatibility is something that is compatible with previous versions of that component or with other existing components, so this new component can perfectly converse or replace existing…
terminologyanswered Maniero 444,682 -
5
votes1
answer1217
viewsA: Conversion from Farenheit to Centigrade always gives zero
The "never" error is from the compiler, it is always from the programmer. The problem is that you are mixing numbers with floating point and integer. How much is 5 divided by 9? Gives 0, then…
-
16
votes4
answers9040
views -
37
votes5
answers5647
viewsQ: What is the orthogonality?
Within the context of software development what it means to be orthogonal? Why it’s important to follow him?
terminologyasked Maniero 444,682 -
41
votes5
answers5647
viewsA: What is the orthogonality?
Something is orthogonal in relation to something else if changing something in it will not affect anything in other things. There is no dependency relationship. It is very important to seek…
terminologyanswered Maniero 444,682 -
3
votes1
answer270
viewsA: What criteria should be analyzed when choosing a language for creating an application? Is performance everything?
C++ About performance it would be good to understand that what gives performance are good algorithms, the correct data structures, the proper implementation. A good programmer can do something…
-
12
votes4
answers11601
viewsA: Set constant in Python
There isn’t. Don’t forget that Python is a language of script, so it doesn’t need to supply all the mechanisms that other languages have. The way is to: alguma_coia = 10 #não mexa neste valor, ele…
-
15
votes3
answers2361
viewsA: High consumption of RAM
That’s it? I’d say it’s a bit small. Visual Studio, since all powerful Ides are memory eaters, there is probably no desktop application that uses as much memory. To use well recommend 16GB of RAM…
-
21
votes1
answer631
viewsQ: What is the difference between DI, Factories and locators?
Already I asked about addiction injection. It is widely used. In my opinion it is even abused. But I saw that in her place you can use Factories or locators. What would they be, what are the…
-
2
votes2
answers224
viewsA: Why do you use extern?
"memory is no longer a problem nowadays" That is a fallacy. If it were true we would never close a program in life. Even if you don’t want to overdo it, you still have many reasons to save memory.…
-
2
votes2
answers457
viewsA: How to omit certain arguments for which standard values were given in the function prototype parameters?
There are even some techniques to allow this but everything so complicated, need so much work and in general has processing cost that is not worth the effort, it is much simpler to use the value.…
-
3
votes2
answers159
viewsA: Why is the value in bytes displayed as 4?
No. What is stored in m->arr? The return of malloc(), which is a pointer. In architecture 32 bits a pointer has 4 bytes, if you want the size of the sequence, you have to pass as argument to the…
-
2
votes2
answers363
viewsA: if-Else command is not working
The comparison is using a and && when the right one would be a or ||, since he is invalid both. In fact it would be impossible for both to be invalid, because **or ** the number is greater…
-
5
votes3
answers572
viewsA: What is map / reduce?
It has nothing to do with JS or Nosql (it was in the original question). Of course, they use the technique, but associating them with something fundamental doesn’t make sense. It was disseminated in…
javascriptanswered Maniero 444,682 -
7
votes1
answer6201
viewsA: What is procedural programming and not procedural programming?
Basically it is the programming that structures the execution through watertight routines that are called as needed. Normally we call them functions, but it doesn’t have to be exactly that way.…
-
21
votes1
answer7017
viewsQ: What is the POSIX?
I know the acronym Portable Operating System Interface (POSIX), but what is it? Does it have to do with UNIX? Windows cannot be POSIX? What this matters to the developer?
-
6
votes2
answers523
viewsA: What is an extensible language?
Programming language Each one has to define what it means by that. But overall I would say it is to create a new syntax, usually through metaprogramming. The mechanisms can be simpler, from the…
-
1
votes1
answer59
viewsA: Are there advantages to using little endianess?
According to a response in the SE. little endian is more advantageous because values of various sizes can be interpreted with a valid address without any extra operation. There are those who contest…
-
10
votes1
answer2048
viewsA: What is the difference between replace() and replaceAll()?
Yes, both serve the same purpose. The replace() replaces all occurrences of a character or a sequence of char in a string, while the replaceAll() does the same based on a regular expression pattern.…
-
7
votes1
answer242
viewsA: What are the differences between BCL and FCL?
BCL is the same base library, as its name says. It contains everything that is fundamental to working with . NET, including all the infrastructure that the C#language, and those that are very…
-
6
votes1
answer890
viewsA: Is there a binary tree in . NET?
Binary tree usually has problems with reference location, so avoid use. O . NET Framework and Core try to provide the most useful structures only and let each one provide the others, especially if…
-
35
votes2
answers1065
viewsQ: What problem do Microservices solve?
Okay, I read it What is an Microservices architecture? and articles on the subject, I know what it is and how it works. But I still don’t know what problem it tries to solve. What are the advantages…
-
2
votes1
answer63
viewsA: Why can’t I change a variable in C by performing an arithmetic operation with it?
Do not use comma to decimals, use dot. #include <stdio.h> int main (void){ float c, r; printf("Digite o salário\n"); scanf("%f", &c); printf("Digite o reajuste percentual:\n"); scanf("%f",…
-
5
votes1
answer6487
viewsA: How does a function run automatically without being called?
The engine browser will do this. It is the one who controls all execution and calls some events. The onload is an event, so when you play a function on it, when the page load occurs the engine will…
-
2
votes1
answer385
viewsA: I’m not getting loops while nested
1 - In this first check I understood why the list contains data, so for me it makes sense x be less than the length of the list. okay 2 - Here, how y which is 0 (zero) may be less than the length of…
-
19
votes4
answers1350
viewsA: How to pass string by reference?
In fact what is passed by reference is the object, not the reference itself. The reference is passed by value, therefore by copy, so changing the reference will not reflect the past argument. If I…
-
3
votes1
answer4788
viewsA: Do the tags that have no closure have any particular purpose?
No, they are just tags that do not need to be closed, that is, it has no content that it controls. It can be a <meta> or it may be a <br>. To tag exists on its own. It can have…
-
4
votes1
answer59
viewsQ: Are there advantages to using little endianess?
Today the main architectures use little endianess. Is there a clear advantage to its use? Should I worry when programming? In what situation?
-
17
votes2
answers2880
viewsA: What is cyclomatic complexity?
It is a measure of the complexity of an algorithm where the independent paths that the algorithm can take are considered. The greater the cyclomatic complexity, the harder it is to track the code,…
-
4
votes1
answer71
viewsA: Condition optimization
Can’t. I would do so: @((Model.Visibilidade == null || Model.Visibilidade == 1) ? "checked" : "") I put in the Github for future reference. In this case there is no problem because it is a int?, but…
-
28
votes6
answers1694
viewsQ: Why not use a Boolean parameter?
I’ve seen in some places you shouldn’t wear something like this: int teste(object obj, bool especial) { ... } There within the function some operation will be done or not, depending on what you…
-
6
votes1
answer2537
viewsA: What is the difference between pointer to vector and pointer to variable?
If you consider that a vector is a variable, at this point there is no difference. A pointer points to a point memory address. The address can be obtained in several ways. One of them is a pointer…
-
6
votes1
answer7278
viewsA: How to use the function toupper() in char in C?
The syntax of toupper() it’s not that so it won’t work anyway. EM programming can’t play anything in the code and see if it works. You have to read documentation and see how you have to use it. Even…
-
3
votes3
answers17994
viewsA: What is the Difference Between HTML.Actionlink vs Url.Action?
One generates a tag HTML with a link complete, the other generates only one URL (partial): @Html.ActionLink("texto", "action", "controller", new { id = "123" }, null) Produces: <a…
-
6
votes1
answer596
viewsA: Personalize message by the hour
You can do it like this: using System; public class Program { public static void Main() { int hora = DateTime.Now.Hour; var nome = "João"; var saudacoes = new string[] { "Boa madrugada", "Bom dia",…
-
3
votes2
answers4251
viewsA: How to make a percentage calculation on Oracle?
It’s pure mathematics: Select PD, TP, IPI, TP * (1.00 + IPI / 100) AS TOTAL I put in the Github for future reference. Maybe I wanted to make some rounding.…
-
7
votes2
answers1728
viewsA: How to receive a string and switch to check in C?
The code has several problems. Need to store the string, need to read with the correct format, need to use if and strcmp() to compare strings. #include <stdio.h> #include <string.h> int…
-
6
votes1
answer376
viewsA: What is Multi-version Concurrency Control in Postgresql?
It’s a technique where nothing is written over it. Every data change is created a new instance of it in another location and updates the references to the new location. This way does not need…