Posts by Maniero • 444,682 points
6,921 posts
-
5
votes1
answer637
views -
6
votes1
answer637
views -
7
votes3
answers8500
viewsA: Angular + ASP.NET MVC: Does it make sense?
It makes some sense. One thing does not eliminate the other. If it makes a lot of sense there is already questionable. Maybe it is more important to ASP.NET Webapi. If your application actually has…
-
5
votes2
answers226
viewsA: Which . NET should I use?
Now my answer is a little different and should use the newer . NET Core, ie at least the 3.0 that accepts the use of Winforms. I’ll leave the original answer below, but this is it, go from . NET…
-
6
votes2
answers2249
viewsA: How to resolve a string formatting error?
The problem is that you put the argument that does not exist. These numbers inside the keys are the number in the order that comes arguments after the formatting text. The first will always be 0 and…
-
4
votes1
answer97
viewsQ: Does it pay to store the value of a struct member in a local variable?
I see several programmers doing this. Instead of accessing a member of a struct directly, it copies the value to a local variable to the function and uses this variable. Is there performance gain in…
-
5
votes1
answer97
viewsA: Does it pay to store the value of a struct member in a local variable?
Let’s create a code that makes the two forms of use of the variable, both in stack as in the heap: #include <stdio.h> #include <stdlib.h> typedef struct { int i; } Tipo; int main() {…
-
7
votes1
answer130
viewsA: In operating systems, what is the difference between I/O and I/O operations?
No difference. I/O is Input/Output. I/O is Input/Output. That is, it is only a matter of translation. IO operations is everything the operating system deals with devices other than the processor or…
-
7
votes2
answers1041
viewsA: What is the difference between "step over" and "step into" in Debugger mode?
In many lines the effect is the same, will change if you have any function on that line (some operators may not seem and are functions). To F10 is called Stepping over and executes the line ignoring…
-
13
votes2
answers6067
viewsA: What’s the difference in instantiating, initializing, and declaring a variable?
The definition of "declare" can be found in What is the difference between declaration and definition?. "Initialize" we can say that is synonymous with assigning a first value, not necessarily in…
variables terminology variable-declaration language-independent initializationanswered Maniero 444,682 -
1
votes2
answers1846
viewsA: How to create a static method in a public class?
The creation of the method is ok, so much so that there is no error in it. What is wrong is to access this in a static method. If the method is static, it belongs to the class and not to an…
-
6
votes2
answers941
viewsA: Import multiple classes from the same package
Not unless it really matters, even something you might not want to matter. Nothing prevents you from having name conflicts in the classes that are imported and you might not even notice using them.…
-
26
votes3
answers640
viewsQ: How should an error page (404) behave?
Should it redirect to another page? After how long? Should there be an index? A box and search free? Or already do the search suggesting pages based on what was typed? Should it demonstrate that it…
-
2
votes2
answers914
viewsA: Time difference Timespan in 24hrs format
There’s a mess there. You need as an answer a period, a time interval, then the answer will be a TimeSpan. Data entry is the time of entry and time of exit, so there are two points in time, that is,…
-
10
votes3
answers1253
viewsA: What is Gzip? How does it improve a website?
Gzip is a data compression format. It comes from GNU Zip. When it is enabled (it can turn on and off for each type of content) on the server it is possible to stream web content faster by having a…
-
12
votes3
answers464
viewsQ: Should the checkbox label be on the right or left of the controller?
Usually we put the label to the left of the data entry control. Well, it has layouts but this is a common good. By linearity would be the case of label continue left. But it’s very common to see the…
-
7
votes2
answers728
viewsA: How to separate numbers from three to three, backwards, in Javascript, without regular expression?
The toLocaleString() do this. function separarDeTresEmTres(numero) { return numero.toLocaleString(); } console.log(separarDeTresEmTres(1000)); console.log(separarDeTresEmTres(1000000));…
-
10
votes2
answers327
viewsQ: When to use underlining in web hyperlinks?
When I got on the web everyone hyperlinks were underlined. After this was no longer used, practically no longer used anywhere. Is there a reason not to use it anymore? Do you still have a situation…
-
2
votes2
answers180
views -
19
votes2
answers1617
viewsA: What is LINQ technology?
Language INtegrated Query or integrated query to language is a technology, and so can be considered a mechanism to facilitate queries to data organized in collections. LINQ To SQL The main purpose…
-
3
votes3
answers809
viewsA: C program "eating" characters when executed
Change this line: printf("insira a idade do aluno %d", i + 1); You can’t concatenate everything like you were doing. Interestingly you know how to do it right and put a placeholder to fit the value…
-
34
votes2
answers19823
viewsA: What is the difference between htm, html, dhtml and ghtml?
Each uses the file extension you want. There is no universal standard. The most common is .html. On Windows some people prefer to use .htm, but it doesn’t change anything. The .dhtml can be an…
-
18
votes5
answers1252
viewsQ: What are the advantages and disadvantages of using pagination and infinite scroll on websites?
What does the user gain or lose when choosing one of them? Consequently what website owner has some gain due to better user experience. When to choose each one? There is a type of website or web…
-
5
votes2
answers393
viewsQ: If array is the same as pointer, why does one need to be copied to a variable and another need not?
In that reply Maniero said that if the member of the structure was a pointer it would not need to copy the string into it. But arrays are not pointers? Why is it different?…
-
5
votes2
answers393
viewsA: If array is the same as pointer, why does one need to be copied to a variable and another need not?
First, arrays are not pointers. They serve different purposes. The main difference between them is that the array reserve memory space for its value, the pointer only reserves space for the pointer…
-
6
votes1
answer778
viewsA: Typedef struct with C character array not working
You need to use strcpy() to copy the contents of string into the structure in the limb where the array of char reserved space. You should be used to other languages that copy to you when you do the…
-
6
votes3
answers304
viewsA: What is the difference between the modules Math and cmath?
mathis the mathematical functions module. cmath is the module of mathematical functions working with complex numbers.
-
27
votes3
answers983
viewsQ: What is a variable?
We always use variables all the time in codes. Is it the same thing we learn in mathematics? How does the variable work?
-
24
votes3
answers983
viewsA: What is a variable?
Essentially variable in computation is the same as in mathematics, we only use it in a slightly different way, at least the way we learn about variables in school. Variable does not need to be part…
-
5
votes1
answer203
viewsA: What are the differences between local functions, delegates and English expressions?
The difference between delegate and lambda has been answered in another question. One another question maybe it helps to understand what function is a thing and lambda is another, even if the syntax…
-
2
votes2
answers189
viewsA: Xamarin installation on Windows 7
You need Windows 7 for the basics, 8.1 for Xamarin.Forms Windows, and 10 for Xamarin.Forms UWP, as per documentation.…
-
13
votes1
answer4028
viewsA: What does Handshake mean?
Handshake :P In this context, what Handshake means? It is the initial communication between two applications that will communicate. During the process of handshaking each of the applications go…
-
10
votes3
answers9451
views -
20
votes2
answers5648
viewsA: What is Ecmascript 2015 (ES6) specification?
Specification is a set of rules that will regulate language implementations. It will have evolutions, new versions are created with novelties of what the language should have and the implementations…
-
6
votes2
answers396
viewsA: Convert string value to hexadecimal without changing format
You can do it like this: using static System.Console; using System.Globalization; public class Program { public static void Main() { WriteLine($"{int.Parse("7302", NumberStyles.HexNumber):X}");…
-
41
votes1
answer2950
viewsQ: What is an indirect?
I read in some places about programming that something does or should do an indirect. What is this and what it’s for?
-
36
votes1
answer2950
viewsA: What is an indirect?
It is the act of making reference to something indirectly, that is, through something other than its value. It is a form of delegation. We use it in programming all the time without realizing. One…
-
4
votes4
answers110
viewsA: Why this division in the class instantiation in C#?
You need to understand What good is a builder?. Read there and you’ll practically get your answer. Now, if you want to know why it wasn’t made out of the builder, like this: public partial class…
-
3
votes1
answer1959
views -
5
votes2
answers498
viewsQ: How to assemble a list of generic objects in C?
In many higher-level languages it is possible to have a structure or a collection of data of various types, often the type is used Object for this. How to do the same in C? I mean, I don’t know the…
-
5
votes2
answers498
viewsA: How to assemble a list of generic objects in C?
Most likely to use a void *. This will cause any object to be placed on the object in question (a structure or a collection) as a reference, i.e., it will be a pointer. This way you even the type…
-
4
votes1
answer312
viewsA: See the values of variables at runtime?
It’s normal to show up when you are thrashing, if it is not appearing in your Visual Studio can use CTRL + ALT + V and then To (only the variables being manipulated at this time) or CTRL + ALT + V…
-
3
votes2
answers220
viewsA: How to map and obtain only one property or field of a query?
You’re trying to play the result of a query which is a collection in a string, this does not work and is not what you want. Take the result, then take the desired field: using (conexao = new…
-
2
votes3
answers2541
viewsA: Taking String values from Arraylist<Object>
You’re putting a array within a ArrayList. I don’t recommend doing it this way, but since you did, the solution is to access the array within the ArrayList. It’s like another dimension. That’s how…
-
5
votes1
answer111
viewsA: Can LINQ be considered business rule?
Generally speaking, no. LINQ is not a business rule, it is a programming mechanism. What you will do with LINQ will determine whether specific use is business rule or not. In Ddds they will say that…
-
7
votes2
answers362
viewsQ: How to pass an array as argument of a function per copy?
Like we know a array is used as a pointer in various situations. A parameter that waits for a array is actually a pointer, so what you copy is the memory address and not the data from array, is a…
-
8
votes2
answers362
viewsA: How to pass an array as argument of a function per copy?
There really is this limitation, but at the same time C is a very smart language and provides a trick as a solution. Some will say that it is gambiarra, others will say that it is a good way to make…
-
3
votes1
answer322
viewsQ: How big is an "Enum" in C?
In general the enum keeps a whole, I can consider that this is the size of it?
-
5
votes1
answer322
viewsA: How big is an "Enum" in C?
If you want to know the size safely the best thing to do is to use the sizeof, even because the int has no maximum size guaranteed, so it can vary. If you want to have a busy size idea, you can…
-
4
votes2
answers959
viewsA: Instantiate an object through the interface and access methods not present in it
The problem is that you don’t understand what it is to program to interface. I believe that you think it is a rule that you have created and must follow. It is not. It is something to understand why…