Posts by Maniero • 444,682 points
6,921 posts
-
2
votes1
answer119
viewsA: How to upload safely?
There is no way. You can create some tricks to encrypt the password, but since it is in the application that the user has control, you can decipher it, even if it takes time. Actually you don’t even…
-
1
votes2
answers97
viewsA: How to use pseudo names with CONCAT and Mysql?
It’s not possible, and in this case it doesn’t even make sense. I initially imagined that I would use the die for something else, as it would not be completely unnecessary to name the result of the…
-
7
votes3
answers3104
viewsA: Why does GROUP BY not work with Mysql in this case?
The example is not very good because it is not conceptually suitable for grouping. You want to show only once each occupation. So far so good, normal. You want to show the name of someone who has…
-
0
votes2
answers316
viewsA: Program to ask multiplication questions
There are some problems, besides being comparing a string with a number, letting you type a text where you expect a number does not seem like a good idea. Of course you can handle the generated…
-
11
votes4
answers4494
views -
4
votes2
answers413
viewsA: Memory management and release
When I create an object inside arrays and large variables, defining them as null, will help in the reduction? Within a method Dispose() - before they were of some value. It helps more or less, but…
-
4
votes1
answer73
viewsA: Are methods objects in Ruby?
Depending on the context any function or method is an object in any language. But ok, I understand what context you’re talking about. I always say that people have become so obsessed with OOP that…
-
1
votes1
answer1990
viewsA: How to limit decimal place?
There is, but not the way you expect. You’re using binary floating point types, and comparisons are complicated. If it depends on accuracy, you need to use a fixed point or floating decimal type. As…
-
3
votes2
answers594
viewsA: Interest calculation
If the interest rate has to vary with each installment then you have to use a variable that increments the installment to calculate the new interest, nothing changes without a variation, the…
-
10
votes1
answer272
viewsA: Sort list by string resemblance
What seems to have been defined as similar is whether the substring exists in the string of each element in the list. Then just sort the ones you have first, so the OrderByDecending() applied in the…
-
2
votes1
answer49
viewsA: Create an algorithm that saves data in HD
Yes, it’s possible, but that doesn’t mean it’s the most organized. If the intention is only to solve the problem, you can enter this code, if you want to do the right thing, the manipulation would…
-
12
votes2
answers350
viewsA: Why is it necessary to close file?
It may be for several reasons: One of them is to make the recording take place. It has several file manipulation modes that only play on disk if you really need to or when to close. So without…
-
11
votes1
answer3563
viewsA: What is the maximum size of a JSON file?
In general it has no limit beyond the physical. The problems that can cause is not knowing how to carry it in memory because it is big, Although 43MB for today is silly and does not usually take…
-
3
votes1
answer57
viewsA: View window without frameworks
Without frameworks using C# so far is still impossible, even on .NET Native. Generally not even without the . NET or other implementation of CLR can’t (which is already a framework). If none of this…
-
3
votes1
answer715
viewsA: How to increase performance in PHP?
Increasing the memory limit itself does not increase processor load. It is possible that some algorithm works better because it has more available memory, but it is something punctual and would need…
-
6
votes1
answer94
viewsA: What is the probability of the Crc32b hash repeating?
It allows 232 different combinations (just over 4 billion), so the probability is in this ratio, i.e., 1 in ~4 billion. As new intenses compare, the probability increases faster and faster, until it…
-
2
votes1
answer130
views -
3
votes1
answer1397
viewsA: How do I correct "indefinite reference to 'function' in C?
Include the arquivo.c in the compilation, without it the function is not compiled and does not exist, so it cannot be called.
-
13
votes1
answer8579
viewsA: Is there a Timezone for Brasilia?
Use the SP that is the same thing: date_default_timezone_set('America/Sao_Paulo'); I put in the Github for future reference. It is customary to adopt the most populous city of the region as a…
-
4
votes1
answer199
viewsA: Convert uint16_t to int
One fits the other perfectly and a promotion is done automatically. Look what simple: #include <stdio.h> #include <inttypes.h> int main(void) { uint16_t x = 1000; int y = x; printf("%d",…
-
1
votes1
answer304
viewsA: Use Text User Interfaces in C#?
Yes, it is possible, it only takes work. Some people have already created libraries to eliminate much of the work, among them: Terminal GUI Console Framework Console Draw Sharptui TUI (alternative…
-
1
votes1
answer127
viewsA: Problem with "Else if" and "<" ">" in VB.NET
This is to work if only allow 1 digit, if allowing more than 1 may give problem. The statement seems wrong too, I did what was written in the question. There seems to be a logic error too, unless…
-
3
votes2
answers2434
viewsA: In terms of performance, "Character Varying" or "text" in Postgresql?
According to the documentation there is no difference in performance. It is in this place that you must search, can avoid other places. The implementation is unique, just changes the name. If the…
-
0
votes1
answer155
viewsA: How to check the size of a PFA-type array?
The two options are correct, within normal logic would be this, although I think the code is bad.
-
4
votes2
answers113
viewsA: Error translating structure code from C++ to C#
First, there is no way to transpose the semantics from C to C#. Nothing you do will be the same. There are several differences, even if it seems to be the same thing. There is no way to initialize…
-
2
votes1
answer215
viewsA: Sprint in Scrum methodology can’t have the scope negotiated?
It seems to me more a matter of text interpretation. The fact is that by elimination the other 4 answers are much worse, they talk about things that affect the result. The correct answer talks about…
-
3
votes1
answer126
viewsA: What is the most performative way to convert an int into the sum of its digits?
The best way to know which is faster is by running tests running the expected algorithm many times and compare. Of course the test needs care not to give biased results. I answered something facing…
-
4
votes2
answers484
viewsA: Is there a way to create an IDE based on Intellij?
Actually you don’t want to create an IDE, you want to customize a few things. I don’t know if much, it just seems to want the Intellij IDEA and the Webstorm or Phpstorm. But if you really want to…
-
3
votes3
answers108
viewsA: Decrease the lines of code by maintaining the function of getElementByID?
You can reduce some things. You can create auxiliary variables so you don’t have to stay the same element multiple times. Can cause what does not vary to be done outside the if. Actually one of the…
-
3
votes2
answers127
viewsA: Use of the "Instance of"
The result is correct since you added a1 who is just a student, no al1 who is a graduate student. I don’t know if this is a typo (facilitated by bad variable names) or if you thought that the fact…
-
8
votes1
answer83
viewsA: Why use "is" at variable start in Kotlin?
This has nothing to do with Kotlin or another language, it’s just a convention that is used to indicate that the variable is boolean, it’s to give legibility showing its semantics. It has nothing to…
-
3
votes1
answer1340
viewsA: What are the differences between the HASH and BTREE algorithms used in an index?
Already answered in the context of Postgresql. Already I gave details about Btree (OK, I still need to complete). Already I talked about the code of hash. Already was answered on the tables hash. To…
-
2
votes1
answer1729
viewsA: How do I inherit an abstract class in C++?
I disagree with the comment that getters/setters abstract are unusual. Actually in C++ the mechanism of getters/setters are unusual, but where they are used is common use, if it makes sense, the…
-
9
votes1
answer2819
viewsA: Using Switch Case for Ranges
Pure mathematics: class Main { public static void main(String[] args) { int x = 534; switch (x / 200) { case 0: System.out.println("entre 0 e 199"); break; case 1: System.out.println("entre 200 e…
-
3
votes1
answer102
viewsA: How was ". include?" developed in Ruby?
Has the his source code. As I could see is as obvious as possible, it runs through the whole array with a loop and filters whether each element is the same as the one you are looking for. Once you…
-
3
votes2
answers74
viewsA: How to edit gigantic codes?
I see some classes with a thousand, two thousand, thousands of lines A thousand lines is a lot? "I guess" I don’t. How a programmer can edit so much without "getting lost" in the middle of so much…
-
4
votes5
answers212
viewsA: Get array object by description in index
It seems to me that a dictionary is enough for what you need. using System; using System.Collections.Generic; public class Program { public static void Main() { var dicionario = new…
-
10
votes8
answers16426
viewsA: Why is using "SELECT * FROM table" bad?
What problems are caused by its use? From the technical point of view there is loss of performance because: may require reading more information on mass storage that is slower may require that a…
-
1
votes1
answer186
viewsA: Meaning of class member icons in Visual Studio
Not to be unanswered documentation that shows some of the icons used. Note that they use a technique of overlay putting some more information on top of the icon. In this case the "V" there indicates…
-
6
votes1
answer1085
viewsA: What is the difference between class instance variables, automatic (local) and static duration variables?
What is a variable? instance variable This variable belongs to the object, concretely it only exists when the object is created. In the class it only serves as a plan for how to create the object.…
-
1
votes1
answer100
viewsA: How to pass structure to function?
The best way to grow is to learn in a structured way. Especially in C which is full of details. If in any language you have to know exactly how everything works, you can’t think that because it…
-
3
votes1
answer450
viewsA: In which programming language does a Crawler/scrapper scan the DOM faster?
Programming languages do not have speed as a feature. Some have features that help to have more speed. Libraries may already have speed, but the default does not need to be used. If the standard…
-
6
votes1
answer312
viewsA: Can PHP object orientation create any kind of website and project?
PHP object orientation can create any type of website and project? Yes, it does. Just like any programming language can solve any problem. The staff made websites when PHP had no object orientation…
-
3
votes1
answer127
viewsA: Types of ordering and their performance, which one to choose?
First let’s use the correct terminology. You want to sort and not sort, it’s already in an order, it’s not classified. To PHP documentation makes a comparison of what is ready to use. Depending on…
-
7
votes1
answer181
viewsA: Is the "Row ID" equal to the primary key?
In some situations, yes. The PRIMARY KEY of a rowid table (if there is one) is usually not the true Primary key for the table, in the sense that it is not the Unique key used by the underlying…
-
12
votes1
answer221
viewsA: Is there any way to build a useful application based entirely on the functional paradigm?
There is how to build a useful application based entirely on functional programming? Are compilers useful? It’s a domain where this paradigm works very well. Big Data, Machine Learning are useful?…
-
10
votes1
answer149
viewsA: What happens if a binary search does not find the element?
What happens if a binary search does not find the element? It closes the search without finding the element. Nothing more. Pure logic. He gets into loop? Why would you do that? A binary search will…
-
7
votes2
answers70
viewsA: Why does the return of the linear search for the element not found have to be -1?
You don’t have to do this, you can do a lot of things, but you have to report in some way that you haven’t found the element you’re looking for. One of the most commonly used ways is to return a…
-
3
votes1
answer125
viewsA: How to verify that all elements of a vector are between - 4 and 4?
It is easier to reverse the condition and exit quickly if you have an element that does not fit in the filter, like this: #include <stdio.h> void filtro(int tamanho, int vet[]) { for (int i =…
-
5
votes2
answers3763
views