Posts by Maniero • 444,682 points
6,921 posts
-
19
votes8
answers2223
viewsA: Error: not all code paths Return a value
Because not all execution paths return an expected value. Note that the only one return exists in this code is within a if, so it will only run conditionally. What happens if the code does not enter…
-
22
votes3
answers3624
viewsA: When to use asynchronous or synchronous method?
When to use asynchronous or synchronous methods in controllers (index, search, delete, create) of ASP.NET MVC applications? The general recommendation of using asynchrony is when the operation takes…
-
7
votes1
answer318
viewsA: What does it take to learn specific classes and methods for a task?
Everything you can use is documented. At least in libraries that are worth using. All basic class usage information is there. Obviously their methods, too. The Android has a site dedicated to this.…
-
7
votes1
answer1076
viewsA: Python type conversion
Because the type remains the same. Binary representation and decimal representation are representations of the same type. The value of representing in one way does not mean that the value is…
-
5
votes2
answers806
viewsA: What is the usefulness of auto keyword in C?
None. Ok, technically it indicates where the variable will be stored, as well as static and extern can be used. Only it can only be used within function. And if you use nothing within the function…
-
2
votes1
answer277
viewsA: LINQ to Entities x Lambda Expression
You can’t compare the two things since they do completely different things. The only relationship between them is that LINQ in general, including Entities, uses lambda as a mechanism. This has…
-
1
votes1
answer64
views -
2
votes3
answers378
views -
3
votes2
answers458
views -
8
votes2
answers205
viewsA: Why do some functions that work with C strings start with *?
Because that particular function should do that. Look at her name: string copy. She must copy a string. What you have learned is correct, if you receive a pointer, anything that moves the content…
-
4
votes2
answers83
viewsA: What is the syncblock?
In fact its main function is competition control, but it is not the only one, somehow it would have to exist this "block" in the header of the object. It has the address of a synchronization object…
-
4
votes1
answer66
viewsA: How to find out in which generation of Garbage Telescope an object is allocated?
Yes, it is possible with the method GC.GetGeneration(). The practical usefulness in normal code is debatable. You can’t even make much use of it because it’s implementation detail. It is useful for…
-
2
votes1
answer83
viewsA: Processing cost between code and database
You can only answer this on a case-by-case basis, which means you only measure with darlings, available optimizations, data load and actual access load. What is valid in one circumstance is not…
-
6
votes1
answer110
viewsA: What is abstraction from a framework?
Abstraction is to hide the complexity of a problem in a generalized way. Is to create a layer that is something simple to understand and use to do more complex tasks. The spoken abstraction is just…
-
3
votes1
answer607
viewsA: How many elements does an array have?
It would be something like that: void ReposicionaObjetos(){ int contaElementosValidos = 0; memset(marcadoresVisiveis, 0, sizeof marcadoresVisiveis); for int (i = 0; i < config->marker_num;…
-
15
votes1
answer193
views -
1
votes1
answer104
viewsA: Is it incorrect to state that in a stack-type data structure, the element that will be removed from the structure is the one that is stored in the header?
You would need to define what a header is. A stack has no header. So either you’re talking about something else in this hypothetical answer or you’re using the term in an unusual way, at least for…
-
4
votes1
answer1676
viewsA: Cannot Convert from 'string' to 'System.Iformatprovider'
It makes no sense to convert string for string, already is string. Let alone you can convert string for ToString() which is a method and not a type. If you want to put zeros in front of the number…
-
10
votes2
answers300
viewsA: Why does . NET’s Garbage ollector have several generations?
The GC is something very old, much more than people realize. This is a mechanism studied in depth by many people. More and more were detecting the problems and finding solutions. Problems of the GC…
-
13
votes3
answers569
viewsA: What are the consequences of programming in 32 bits or 64 bits?
You should know that the 32-bit pointer has 4 bytes and 64-bit architecture has 8 bytes. This has deep internal changes in the . NET. The memory consumption of all objects that have pointers will be…
-
6
votes1
answer195
viewsA: TDD improves the design?
The very Uncle Bob who defends the TDD so much says what makes the design be good is the programmer. And I couldn’t agree more. If the person thinks that TDD is silver bullet will go wrong. And it…
-
14
votes2
answers17350
viewsA: Minimum bit amount required to represent decimal numbers
I’ll teach you and not solve, as you asked. How do you find the amount of digits needed to save a decimal number? In decimal numerical representation we obviously have 10 different digits. So this…
-
9
votes3
answers5198
views -
5
votes1
answer66
viewsA: What’s the difference if I instantiate a class within the method or if I instantiate just once?
If you instantiate locally the variable will surely be in stack, which is always desirable if you have no reason to use outside the method. If you create a variable in the class it will take up…
-
2
votes2
answers154
views -
2
votes1
answer1025
viewsA: Is there an IDE for developing GTK graphical interface?
The GTK already has the Glade. The Anjuta. One can use the Eclipse. The Code::Blocks has something.…
-
7
votes3
answers524
viewsA: include library in C is required?
If you use something from this library then you have to use yes. Depending on the compiler and its settings it is possible to find the functions to link. When it generates Warning means your code is…
-
23
votes5
answers2915
viewsA: What is actually the array?
But after all, what is a array? Is it a sequentially indexed list? Or is it a container of manually indexed items (as in PHP)? Formally anything other than a single, continuous sequence of values is…
-
10
votes1
answer584
viewsA: What does this "." point in Python mean?
Is the Operator or point operator. It is the operator that gives access to members of the object contained in the variable. These members can be variables or object methods. Then in that case var is…
-
26
votes5
answers1461
viewsA: Is it possible to code the size of the object in memory?
It depends on what you want. If you want to know the exact size you will occupy it is quite difficult. If you accept an approach there gives, but I do not know if the approach is so useful. Denis'…
-
3
votes2
answers75
viewsA: Questions about the standard C library
The default defines the specification, each does as you want the implementation. As long as the implementation complies with everything that is in the specification it can do as it wishes and will…
-
9
votes3
answers191
views -
3
votes2
answers113
viewsA: Use of@in variables
They are decorators of functions and properties. When you use a decorator adds or changes the shape with the function or property works. Although they look like java annotations and attributes of…
-
27
votes3
answers466
viewsA: Comments weigh in?
Weigh them down, but you probably use one mini-caster, right? Then they disappear and no longer weigh. They would weigh if they were present because it’s more content to traffic not only slightly…
-
28
votes1
answer1866
viewsA: What is the Webassembly?
In my opinion based on almost 40 years of experience, for the good and general happiness of the nation of programmers, the JS "will end" even :P Or at least it will cease to be used by many. But…
-
3
votes2
answers153
viewsA: Print number of nodes in a list
You have to add one manually if you keep this logic. Or you can just start from the 1 which is simpler. The problem is that the last item on the list has the value of prox exactly the value NULL, so…
-
5
votes3
answers160
viewsA: Function prints while list
You should use what is most suitable for each situation. The for may seem the same as a while, and it’s until you get to use continue, there is a difference because in the for the statement which…
-
5
votes2
answers1567
viewsA: Error declaration null - Unknown type name bool
Added #include <stdbool.h>? Using a compiler at least C99 compatible? Need. This code has other problems. Documentation.…
-
7
votes1
answer515
viewsA: What is COM (Component Object Model)?
COM is the old . NET :P For someone else maybe I explained it in another way, but for those who understand why . NET exists, that’s it. I’m talking about . NET, from CLI specifically, not from C#.…
-
6
votes1
answer125
viewsA: What is the best way to get out of a C#app?
The best way is the return in the Main(). It’s the least traumatic. But if you have any reason to leave before the Environment.Exit() can be used anywhere in the application without major problems.…
-
1
votes1
answer118
viewsA: Table with primary key that never repeats
The standard solution for distributed banks like this is the use of GUID. Some people don’t like it. I will not go into detail because this has already been extensively answered here: Should I use…
-
16
votes2
answers9904
viewsA: What is the difference between clustered index and nonclustered index?
What is the difference between clustered index and nonclustered index? The index clustered is almost a synonym of primary key. In fact can only use one per table and has to be in the order of…
-
3
votes1
answer229
viewsA: Ipv4 and/or IPV6 record in the database
It seems to me to be a clear case for VARCHAR since it needs a variable size but it will never be too big. CHAR would only be useful if it did not have this variation. I could even use the largest…
-
6
votes1
answer155
viewsA: Modeling with Code First so you can exchange databases
The idea of the Entity Framework is this, you develop in a way independent of the database. It even has some facilities to make the migration. This is not to say that any code you make will be well…
-
5
votes2
answers350
viewsA: How to get the total memory occupied by the application?
You’d have to take the file and have it inspected through the class Process. Being able to identify the memory used is complicated. There are basically two measures. One is the private memory that…
-
2
votes3
answers1401
viewsA: How to access object created by another thread?
Yes, it is possible. You access it the same way you access an object created in it thread. There is no differentiation between objects created in the same thread or another. At least when we are…
-
2
votes1
answer127
viewsA: Number of elements allocated from a pointer
There is no standard way to do this and trying to use some extension may have interoperability problems. But also no need to get that information since it is available in the code. In this example…
-
5
votes2
answers1109
viewsA: Number divided by a divisor greater than it returns zero?
In almost every language the division of integer numbers results in an integer number. To ensure that the operation results in a floating point number must have at least one of the operands such as…
-
30
votes2
answers9761
viewsA: What is an overhead?
Overhead is overhead does not matter much the context of computing. We could translate as overload. The literal translation would be "above the head". It would indicate that it is above the normal…
-
10
votes3
answers722
viewsA: Initialize private fields in the declaration or constructor?
Actually there is no way the field can be initialized by itself, it needs a code to do this. And codes can only be placed in methods. If it is a field being initialized a method in the construction…