Posts by Maniero • 444,682 points
6,921 posts
-
7
votes2
answers124
viewsA: Remove half of the file name
A naive solution would be to use the Split(). In fact any solution that tries to find a text pattern runs the risk of going wrong unless it has guarantees of what it will find or the criterion is…
-
5
votes2
answers81
viewsA: Are there "problems" using jQuery’s small?
Yes, there are SEO problems. Today charge time counts for the page to be well ranked in search engine. This alone should be something to think about using jQuery. Even more to make a single line to…
-
5
votes1
answer691
viewsA: ASP.NET Webforms, MVC or Webapi?
It is a shame to know that it is restricted to Visual Studio 2013. If it is cost, it has free versions of modern VS and almost sompleto. Webforms is a technology considered almost legacy and weird.…
-
10
votes2
answers2425
viewsA: What is a state machine?
Asymchronism can be obtained through a state machine since it just needs to ensure that no waiting occurs while it is doing something potentially time consuming, so it needs to exchange the…
-
5
votes1
answer1242
viewsA: Are there differences between the terms Thread, Multithread, Async and Await?
Thread is the mechanism defining an implementation line of the applications. Multithread is the ability to run multiple execution lines of a process that may run parallel or appear to be running…
-
1
votes1
answer88
viewsA: Run a program with internal arguments
This is impossible. It would even be unsafe to be able to hide. If the two applications were yours then we can create another communication mechanism that does not need it, it is even better for…
-
3
votes1
answer2601
viewsA: What is the difference between Show(), Showdialog() and Application.Run()?
Let’s start at the beginning, Application.Run(). This is the static method that starts running the entire application window system. This is where the framework takes care of the implementation and…
-
6
votes2
answers362
viewsA: Count golang number size
The easiest way is to convert with Itoa() for text and pick up the characters with len(). But you can do it mathematically too (module math). package main import ("fmt" "strconv" "math") func main()…
-
6
votes2
answers264
viewsA: What is the shortcut in Netbeans to close all "+" functions?
Much of the shortcuts can be obtained in PDF created by the community. But you don’t have what you need. You have a older version wiki page with all shortcuts. It must not have changed much.…
-
3
votes1
answer70
viewsA: Good practice passing arguments to a method when they come from another function
Forget this business of good practice. You have to do what’s right for every situation. Since I don’t know the context of this situation I can’t say what is ideal to do in it. This whole code is…
-
5
votes2
answers728
viewsA: Field size takes total defined value?
If the maximum size of a field of type VARCHAR is 65535 (occupies 65KB), it will always take up a 65KB space in the database for each line even if I put less text in it? No, it will occupy…
-
3
votes2
answers429
viewsA: Create dynamic variables in Javascript
Actually what you want is not what is good is old array. var nomeVariavel = [1, 2, 3]; for (var i = 0; i < 3; i++) console.log(nomeVariavel[i]); I put in the Github for future reference. If you…
-
6
votes2
answers146
viewsA: Declaration of `var as object field
To do strictly what you wish would be something like this: public TipoDoRetornoDoMetodoDadosDermaClube ProdutosDermaClube {get; set;} public bool CarregaProdutosDermaClube(string consulta) { var…
-
2
votes2
answers648
viewsA: How to add the values in a loop?
The code has several errors in addition to well disorganized. It is not getting the name correctly. The total value is one, so there is no reason why it should be a vector. The value of each patient…
-
3
votes2
answers440
viewsA: Object orientation is the part of c# used for games?
Behold which means object orientation. And what is. And yet a comparison with the functional paradigm. And understand what is paradigm. So OOP is just a secondary way of organizing codes. It’s a way…
-
9
votes2
answers841
viewsA: What is an event?
In computing, an Event is an action or Occurrence recognized by software that may be handled by the software So according to Wikipedia is an action or occurrence recognized by the application that…
-
6
votes1
answer986
viewsA: What is an event handler?
Roughly speaking it is the action that must be executed when an event must be triggered. In general it is a method or function with a signing specific that will be called by the event. It is a…
-
18
votes2
answers6460
viewsA: What is the difference between a programmer and a software engineer?
You must have graduated to be considered a software engineer? In Brazil there is no regulation of the profession, which philosophically I am favorable, done the right way, so everyone can do…
-
4
votes2
answers374
viewsA: Java lambdas are equivalent to Javascript Closures?
In the general concept they are yes, but there are different details. Behold: What is the difference between a lambda expression, a closure and a delegate?. With this understand that there are…
-
2
votes2
answers114
viewsA: Is there any way to force you to ignore errors in Go?
Can be avoided using a _ before the declared name: import (_ "fmt") for _ index, item := range retorno.Threads { fmt.Fprint(w, item.Id) } I put in the Github for future reference.…
-
2
votes1
answer806
viewsA: How can I create my own protocol as well as HTTP?
With much study of the fundamentals of computing. Well, simply, write down on a paper what you want it to do, what operations, how is the format of the messages, the errors, how to deal with each…
-
8
votes1
answer113
viewsA: What’s wrong with parole?
The syntax is quite wrong. Anyway there is an easier way to do what you want: private void Botão_Click(object sender, EventArgs e) { PBox.Visible = !Pbox.Visible; } I put in the Github for future…
-
5
votes1
answer70
viewsA: Why use the rational type?
Float and Double are binary floating point types, so there are rounding problems. Many numbers with decimal parts cannot be expressed exactly. Rationals do not have this problem. But the biggest…
-
8
votes1
answer4142
viewsA: What is page fault?
Page fault is when an application asks to access a memory address and it is not mapped in RAM (it is a bit more complex than this, but let’s simplify). Virtual memory Modern operating systems use a…
-
2
votes3
answers656
viewsA: How to store values in a vector using inheritance/polymorphism?
If what you really wanted was the answer that was accepted then the right thing would be: public void insere(Carro carro) { int contador = 0; for (carro : vetVeiculo) { if(caro == null) break;…
-
6
votes1
answer1069
viewsA: Difference between temporary table and variable table type
A temporary table is a real table and can do everything a normal table can, SQL Server will do all possible optimizations on it, especially if it has secondary indexes, can be in transactions,…
-
10
votes1
answer98
viewsA: What are the benefits of using the => operator in common methods that are unrelated to Lists or Lambda Expression?
In this case it is not an operator, it is only a language construction to simplify the writing of methods containing only one line. This was introduced in C# 6 for normal methods and in C# 7 was…
-
6
votes2
answers211
viewsA: What value is verified in a condition operation with value assignment to a variable?
You have to look at the table of precedence and associativity of operators. The parentheses used already give a guarantee that everything inside it will be executed before and the result of this…
-
27
votes3
answers1101
viewsQ: What is the difference between architecture, engineering, science, analysis, design, programming and coding?
I know, you have the question What’s the difference between architecture and software engineering?. Ali already answers in part. Although I was not 100% satisfied with the answers, which are…
-
4
votes1
answer116
viewsA: Build error due to lack of constructor
The solution is simple, add this in the class: public GenericaBLO() {} Like DisciplinaBLO inherits from GenericaBLO, she needs to call a standard builder base class and it does not exist, you need…
-
8
votes4
answers7214
viewsA: Difference between epics and Features
I’ll explain to you how you understand the code, even if you don’t have a direct relationship between the terms: Think about Epic like the namespace, in Feature as the class, and in story as method.…
-
15
votes3
answers409
viewsA: Would it be necessary to have another programming language to create the Assembler?
There are wrong premises in the question. Assembly (emphasis on capitalization) exists before punched cards which is actually just a data input. Assembler is not a compiler, although some people…
-
1
votes1
answer81
viewsA: What’s wrong with this code?
It’s just a typo namespace is misspelled. This is because the code is written anyway. If you write a caution, whim makes it easier to avoid these mistakes and detect them more easily. #include…
-
5
votes2
answers210
viewsA: What do builders mean by this?
You cannot call other overloaded constructors within a constructor, you can only indicate that it should be called, so the compiler put the call in the most suitable location. In case it is calling…
-
2
votes1
answer706
viewsA: Doubt with @Style.Render
This row will only insert site.css who is in /Content. Unless you configure to use others. bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/bootstrap.css", "~/Content/site.css")); I…
-
1
votes1
answer208
viewsA: Problems with dynamic allocation and struct
I have considered that you are wanting to do C. The biggest problem is the pointer t which makes no sense. Actually the names are pretty bad, the code is incomplete and doesn’t seem to make any…
-
2
votes1
answer50
viewsA: Forearch loop how to use with controler
Windows Forms do not have controllers. The class Panel is a containter for various controls of all kinds. One of the members of this class is the Controls, as used in the code. It is a specialized…
-
2
votes1
answer698
viewsA: How to get Tempdata value with List<Object>?
As the value of each TempData is the type object there really is no indexer for it. It would have to make a cast for List<object> to actually have a list in hand and then access its elements.…
-
7
votes2
answers5167
viewsA: What is "stdafx. h" and what is its importance?
For lack of a better mechanism is a beautiful gambiarra to indicate that the headers to be used already have a compiled version and do not need to compile them again. Place this line and the…
-
1
votes1
answer119
views -
2
votes1
answer478
viewsA: Static properties and memory release
The object in the static variable won’t be released because the memory is static, it wouldn’t make sense to release it. But the object that is referenced in the static variable can be released yes,…
-
6
votes1
answer115
viewsA: Why does Shortstring consume more memory than an ordinary String?
ShortString is a type by value, so the text is in it. String is a type by reference, so the variable will only have a pointer to the text that is elsewhere. Note that ShortString can be up to 255…
-
2
votes1
answer53
viewsA: In terms of performance, what is the best way to declare a variable that will be used in multiple Actions/Methods in a class?
In terms of performance, mode 1 is probably faster, because it will have to instantiate only once against the other form that will possibly be instantiated more often. There are also…
-
8
votes2
answers157
viewsA: What does the expression "a+t" mean in the second parameter of fopen in C?
This is the access mode to the file being opened. "a+" indicates that you can only add data at the end of the file (append) and that can be read as well ("+"). Recording must always be made official…
-
9
votes1
answer476
viewsA: Why use pointers as function parameters?
Good materials explain why instead of setting an example. Data is passed to functions by value, so there is a copy of its value from argument for the parameter. This can be desired or not. When not…
-
1
votes1
answer4962
viewsA: Lvalue required as left operand of assignment
You want to make a comparison, right? Then use the correct operator for comparisons and don’t use the assignment operator: if (a * a == b * b + c * c) printf("TRIANGULO RETANGULO\n");…
-
23
votes3
answers3586
viewsA: In programming, what is an object?
A physical object is a portion of atoms. It is something physical (Dãã). Of course in programming we deal with abstractions. What would atoms be to us developers? The bit, right? The smallest piece…
-
10
votes3
answers119
viewsA: Why declare property twice in one class?
You are not declaring the property twice, you are declaring a field and a property that uses this field. In something so simple it is not necessary to do this way, can do: public int Years { get; }…
-
15
votes8
answers2184
viewsA: How to know all possible combinations of 0 and 1 in Java?
Simple, short, performative, original, library-free solution with pure math and a single loop. class HelloWorld { public static void main (String[] args) { for (int i = 0; i < 32; i++)…
-
2
votes1
answer109
viewsA: Library similar to Boost and STL in C
There’s nothing similar, not even that popular. Since STL is the standard C++ library it has something that has the same goal, although it does not have a proper name there is a standard C library…