Posts by Maniero • 444,682 points
6,921 posts
-
2
votes1
answer150
views -
7
votes3
answers13259
viewsA: How to develop user manuals?
Software that helps make user manuals are common to help produce any written content. It will be mainly a word processor and eventually others who can help illustrate the text. There’s nothing to…
-
3
votes1
answer1163
viewsA: Cannot evaluate Expression because the Current thread is in a stack overflow state
Pay attention to what you are doing. Enter the builder descricaoo, within it you create a list and add an item in it. This item is created by calling a new object of the same class. That is, it will…
-
4
votes2
answers459
viewsA: Send parameters to a C#interface
You’re saying implement the interface, so do this: using System.Collections.Generic; public class Program { public static void Main() {} } class descricaoo : IInstrucao { private string…
-
8
votes1
answer2455
viewsA: What is the correct way to declare a main() function?
Both work on most compilers. It may depend on the option on and the default you want to meet. The recommendation is usually to use at least the C99 standard where these two forms are accepted: int…
-
3
votes2
answers108
viewsA: Memory Leak in Xmlserializer
The XmlSerializer doesn’t need dispose() because it does not allocate resources. It only allocates memory, so when it terminates the execution of the method, the object will have no reference to it.…
-
5
votes3
answers337
views -
25
votes1
answer9723
viewsA: What is Tuple and when to use?
The term means vessel. It serves to put various things inside. Formally is a list of ordered finite elements. The. NET made it available to group some data that need to be stored, and mainly…
-
9
votes1
answer713
viewsA: Does number of columns influence performance?
Everything can interfere with performance, but here comes the question of need or not. It certainly influences, but very little and proportional. Actually proportional amortized because some…
-
5
votes1
answer1235
viewsA: Destruction of an instance
C# is a language with managed memory, so you do not destroy the object, it will be destroyed when there is no reference to it and memory needs its space. The gargabe Collector will take care of…
-
3
votes1
answer346
viewsA: Error: Undefined reference to 'sqlite3_open'
You need to have Sqlite compiled together using some variation of this command line: gcc main.c sqlite3.c -lpthread -ldl
-
9
votes2
answers57301
viewsA: How to limit decimal places?
One of the ways would be like this: #include <iostream> using namespace std; int main() { float num = 3.14159; cout << fixed; cout.precision(2); cout << num << endl;…
-
5
votes1
answer67
viewsA: Include a. c file inside a project. c
To do what you want just put one #include "menu.c" where you want to include, but I doubt that’s what you really need. The correct solution is to compile the two files, one called the functions of…
-
7
votes3
answers1283
viewsA: Remove Saturdays and Sundays from Calculation
I found a ready function in the OS that seems to solve what you want. using static System.Console; using System; public class Program { public static void Main() {…
-
7
votes2
answers184
viewsA: Have images in the tables where they will be used or table with image repository?
Both ways may be correct depending on what you want. Is the image part of the category information? Is there a 1 to 1 ratio between the category and image? That is, there are not several images for…
-
8
votes1
answer762
viewsA: Is PHP client side feasible?
If you are going to program for the web you cannot escape from JS. You can escape from all programming languages, except JS This is not true anymore, we can already use several other languages in…
-
2
votes1
answer56
viewsA: Nullpointer Exception during registration using MVC standard
Change this: private Editora editora = new Fachada(); You need to initialize the object, not just declare it. You can also choose to do this in the constructor, as was done at other points in the…
-
5
votes2
answers1067
viewsA: How do I print to dot matrix printer on the client with a web application?
Client is client, server is server. For reasons that should be obvious it is not possible to access client resources through the server. The server can only send text and other data to the browser…
-
3
votes2
answers134
viewsA: 'system.outofmemoryexception' while opening . dbf 300 mega file
The solution is very simple. Do not load the whole file into memory. When giving the SELECT place a clause WHERE to take only part of the .dbf and process in parts. You will probably have to create…
-
11
votes1
answer6653
viewsA: How to know if Java is running in 32 or 64 bits?
System.getProperty("sun.arch.data.model") or indirectly System.getProperty("os.arch"); I put in the Github for future reference.…
-
17
votes2
answers2001
viewsA: Documentation in software development
First let’s differentiate documentation and commentary. They are distinct things with different objectives and so we treat differently. And let’s make it clear that each team knows what’s best for…
-
11
votes5
answers1899
viewsA: Is dealing with business rules in the model bad practice?
I’ll confirm what Victor said. And add that model does not mean a class that encompasses everything it needs in a controller or a view. If you start modeling thinking about how it will be used in…
-
7
votes2
answers649
viewsA: When should I maintain or delete a branch?
Each person has his own flow. In thesis after doing the merge you can delete it. You may want to keep it for some time to facilitate maintenance if you encounter any problems specifically on…
-
13
votes1
answer162
viewsA: Is "Then" really necessary at the end of the If block?
It is only required when it will use commands on a line, so it is the separator. When it will execute a block of commands it is optional even. Documentation. Example of single line: If x > 0 Then…
-
2
votes2
answers757
viewsA: NULL value in database x performance
First read the question that talks about NULL. Use it the right way. NULL is NULL, empty is empty. NULL indicates the index of the value. I would have to measure if there is any difference in…
-
4
votes4
answers542
viewsA: Why use block using in ASP.NET MVC?
Especially this using should be used in any C#code. It ensures the release of resources and is essential to avoid resource leakage issues. This is a language feature, not something that was made for…
-
22
votes4
answers3299
viewsA: Typing the return in PHP 7. What are the advantages?
The advantage is precisely what you saw and demonstrated in the question. The compiler has the condition to check if the data type used in the return corresponds to what was specified by the…
-
7
votes3
answers941
viewsA: Encapsulation in Javascript
Insurance is a relative term. If you want to know if she will pop up at any time elsewhere and access it unintentionally, you are certainly safe. If you want to know if there is no forced means (see…
javascriptanswered Maniero 444,682 -
4
votes2
answers848
viewsA: Desktop application audit log
First you need to decide what to save. Try log in each user action seems unfeasible. Monitoring his movements can be useful to analyze the use of the interface and how is the experience, but it…
-
7
votes1
answer1273
views -
15
votes2
answers6808
viewsA: What is the difference between Carriage Return and line feed?
As the name says the CR makes back to the beginning of the line and the LF is to go to the next line. Roughly it is the end of the line. This comes from the fact that printers worked like this. In…
-
16
votes1
answer487
viewsA: How do I make Google understand my Links?
This is called sitelinks. It is not guaranteed to appear. The criteria is the search engine. You can give better conditions for this to happen, but the sites that manage are rare. Visits to the site…
-
9
votes2
answers455
viewsA: String Interpolation performs better than string. Format?
The best way to find out is by testing. I did a simple test: using static System.Console; using System.Diagnostics; public class Program { public static void Main() { var x = ""; var sw = new…
-
4
votes1
answer92
viewsA: Why is it possible to open serial ports (COM) on Windows using file functions?
Because they are files. Or at least a form of. It’s not just in Windows. It makes it much easier for the operating system to treat certain devices as if they were files. After all what you will do…
-
4
votes1
answer97
viewsA: Problem in condition to handle string
The problem is the condition that cannot be OR, must be E, the way it was the condition would always be true. #include <stdio.h> #include <string.h> int main() { char texto[100]; int i =…
-
12
votes3
answers4953
viewsA: How is the module math calculation (%) done in Javascript?
The account is made over integer values, exactly as it is in mathematics. The algorithm would be more or less like this: let x = 23; let y = 10; let temp = Math.trunc(x / y); //pega a parte inteira,…
-
5
votes2
answers950
viewsA: How to create Exceptions to handle statement with Mysqli
You need to enable exceptions with: mysqli_report(MYSQLI_REPORT_ALL); Or just: mysqli_report(MYSQLI_REPORT_STRICT); Then you can use normally: $query = $db->prepare("ppapapa sql sql"); try {…
-
13
votes1
answer3515
viewsA: What is Partial View?
It’s a part of view, a part of the HTML code that will be generated. It works as if it were a control that would be inserted into HTML with its own characteristics (today it has better mechanisms…
-
2
votes1
answer38
viewsA: How to have an option that exits the program or continues running with others?
Just add a bow on main(). I preferred to use the 0 to come out to maintain consistency: #include <stdio.h> int soma(void) { int valor = 0, soma = 0; printf("Foi escolhida a soma:\n\n"); do {…
-
2
votes2
answers106
viewsA: Error changing static property value
You can solve this in two ways. One is taking static of property. See more about the static. using System; public static class Program { public static void Main() { var con = new…
-
4
votes2
answers3240
viewsA: How to take information from one function and use it in another?
Your code is picking up trash. You need to pass data from one function to another. The variable result that exists within the main() is not the same variable within the other functions. In general…
-
4
votes2
answers540
viewsA: How do I exit a loop by typing a specific value?
Force the loop output before doing multiplication: else if (op == 2) { printf("Foi escolhida a multiplicacao:\n\n"); do { printf("Informe os valores desejados e 0 (zero) para concluir:");…
-
3
votes1
answer344
viewsA: What is the correct MIME type?
In general all these will work but the most semantic is the application/json in accordance with RFC. Using the right one, it’s easier for all consumers to work correctly - assuming that they are…
-
28
votes3
answers15296
viewsA: What is Yield for?
Python has its own specifics but essentially all languages work the same. It creates a Generator, that is, it creates a list of data that is being consumed on demand. In general it is used to give…
-
2
votes1
answer219
views -
1
votes3
answers329
views -
32
votes4
answers52318
viewsA: What is the difference between PUT and POST?
Technically none. Only semantics change. Read the RFC: The fundamental difference between POST and PUT requests is reflected in the difference in meaning of the Request-URI. The URI on a POST…
-
2
votes1
answer304
viewsA: Generate sequential key based on sum of digits
Badly written is not (in my opinion), I would change some small details, but is cosmetic: using static System.Console; using static System.Convert; public class Program { public static void Main() {…
-
11
votes2
answers6497
viewsA: What is pointer to pointer?
The error has already been pointed out by the mgibsonbr comment. You cannot store an address (when using the & is saying to pick up the address) as a pointer value. You put the address on the…
-
1
votes1
answer146
views