Posts by Maniero • 444,682 points
6,921 posts
-
3
votes2
answers355
viewsA: Maintenance page ASP.NET MVC
Directly, in a ready way, it does not give. Nothing prevents you from creating a code that takes care said and decide whether you will meet the request made or will show the maintenance page. And…
-
2
votes3
answers788
viewsA: Hide description with ''Display: None " bad for SEO?
Not in general. At least Google is able to "see" this content. It does not penalize the ranking because it is marked this way. So you can do what you need without major worries. Of course, I cannot…
-
4
votes1
answer60
viewsA: Can I run Delphi 6 software in more current versions of Delphi?
In theory yes, but it may depend on the specific code. There are some small things that have become incompatible, so just trying to know. Even if something doesn’t work it’s very simple to adapt to…
-
4
votes2
answers323
viewsA: Syntax error in SELECT WHERE using ADO.Net parameters
That will make it right: "SELECT Qtd, UnitPriceInv FROM JAN WHERE EmgPartInv = @EmgPart AND CodCliInv = @CodCli AND InvoiceName = @Invoice" I put in the Github for future reference. Documentation.…
-
2
votes2
answers531
viewsA: Error 1093 in Mysql
I don’t know if you have other problems but you have a clear mistake and two other weird things that end up causing the reported error. The primary key is ID + RA. A problem occurs when trying to…
-
3
votes2
answers220
viewsA: How to create an object with two or more instances in Javascript?
There is only one instance created. An instance can have more than one type, as long as there is hierarchy between them. So el is the type HTMLAnchorElement which in turn was inherited from…
-
3
votes1
answer115
viewsA: How do I know the client sent me something?
Without getting into the merit of this code being adequate, because I imagine it’s just an initial attempt the problem is to use the Pending(). If you remove it the "server" will be waiting to…
-
4
votes1
answer307
viewsA: Why in set methods in C++ do I have to use the parameter as a reference?
For the same reason you have to use in any other type of method. Or you should not use in any method. Let’s understand. Data is passed to the parameter by value, then the argument value is copied to…
-
6
votes1
answer56
viewsA: Set a standard comment for every new project
The templates used to start the codes are in C:\VisualStudioInstallationDirectory\Common7\IDE\ItemTemplates\VisualBasic\1033\ and can handle them at will. Obviously VisualStudioInstallationDirectory…
-
12
votes1
answer2776
viewsA: What is the difference between testing and debugging?
Testing The question already has a good definition about tests. It has a broader definition in Tests, TDD, Unit Test, QA and similar. What is the difference between concepts on tests?. So we can…
-
16
votes2
answers2381
viewsA: What is the difference between static and dynamic linkage?
This was a simplification of the answer, C can use both forms. In thesis Go could also, I do not know if the Linker language is capable today. Unless you have something in the language specification…
-
6
votes2
answers329
viewsA: How to transform attributes into properties?
In C# you create property that is nothing more than a private field (and not, attribute which is something else in C#) with a couple of methods (can be one) that will give access to this field. You…
-
11
votes4
answers635
viewsA: Why can objects other than the same class access private fields from each other?
The question example does not show what was asked. TL;DR The simple answer to the question is why the designers of the language wanted so and it was specified that. C++ did so, C# also.…
-
1
votes1
answer575
viewsA: I would like to check in the customer register if the code entered already exists. How do I?
The simplest way is by using LINQ, which seems to already be ready to use. So you can do a simple query: var codCli = Convert.ToInt32(Console.ReadLine()); //isso pode dar erro fácil if…
-
1
votes1
answer311
viewsA: Variable not defined in Python for-loop
The code has some problems. As the auto-descriptive error presented by the compiler fails to declare the list val before using it. Maybe it’s just a matter of version, but I used the function…
-
11
votes3
answers135
viewsA: Difference of null and another proposition using this null object
The second will not be called. That’s called short Circuit Evaluation (in Portuguese). When the expression already gets a final guarantee value, there is no reason to keep checking the rest and the…
-
2
votes1
answer874
viewsA: How to store letters in a variable and display them all at the end by forming a phrase/word
The first thing is to decide whether to do it in C or C++. It looks like it goes in C++, so use everything in C++ and avoid things in C. I tried to do here in a better way what I understood is the…
-
4
votes5
answers2439
viewsA: Subtract sums of fields in two separate tables
The SELECT serves to select information anyway. It doesn’t even need to be from the database. It can select data if SQL sub-expressions, including other SELECTs. Then you can make each of them as a…
-
4
votes1
answer3125
viewsA: Why does calling a simple method in a class give a reference error?
It seems to access the methods directly without instantiating an object it is necessary that the method is static. Obviously static methods also cannot directly access instance members. The fact of…
-
4
votes1
answer117
viewsA: Can I declare a library within a class in C++?
You need to include the file with the definition of string. Then you can access your members. But you have to remember that his namespace is std, then either use the fully qualified name std::string…
-
6
votes1
answer933
viewsA: File . exe in Visual Studio 2015
The normal thing is to need the . NET installed. It is possible to make an executable and include all dependencies without the . Standard NET installed on the machine if you can use the .NET Core…
-
4
votes1
answer129
viewsA: syntax error, Unexpected 'if' (T_IF)
Try to better organize your code that will avoid simple errors like this. Note below how easy it is to read and find problems in the code. Missing ; in the completion of several lines. Get used to…
-
3
votes1
answer1747
viewsA: Function to sum elements of an array does not return correct value
The code had several problems, even to compile I had to mess with a lot of things. I ended up getting the final result that worked. I can not say what was the problem reported in the question, in…
-
6
votes2
answers231
viewsA: Multidimensional array in C# equal PHP?
I’m going to show you several ways to do all of this, this one has been scratching at being more than one question. We start by creating a dictionary that is the equivalent of array associative of…
-
3
votes1
answer136
viewsA: How not to show in the output the null positions of a vector?
The final print is printing the 10 positions of the array of notes that were above average, can only print the amount of notes that were inserted there, that is, can only go up to j (bad name for…
-
2
votes1
answer221
viewsA: Call methods and catch exception
You have to instantiate the class by throwing the requested dice into it try-catch. To simulate the exception you can use the method that changes the value of one of the properties. You can do this:…
-
4
votes2
answers126
viewsA: Release of exceptions as a function of prime number
Normally I would not use exception for this, I think an abuse, it is good to make the function not print anything and return the result to print off it, so separates the responsibilities. I do not…
-
4
votes2
answers153
viewsA: Keyword for C# equivalent to Java’s "Synchronized"
In C# the lock for code blocks only. Essentially just swap the keyword. There is semantic equivalence. lock (instances) { if (!instances.ContainsKey(key)) { // ... create connection…
-
3
votes2
answers497
viewsA: Conflict of types in function
I put on the ideone. And in the repl it.. Also put on the Github for future reference. And after solving a number of other problems not listed in the question the code compiled and ran perfectly. If…
-
11
votes2
answers4637
viewsA: What is the difference between "node", "attribute", "element" and "tag" in XML?
Knot or Node is all minimal part of XML. Sets of nodes form other nodes. Comparing, roughly, with programming language, are tokens. Some nodes have specific meaning and some of them are described…
-
3
votes1
answer41
viewsA: Method returns instance, after setting property
The question gives no details, but I believe it refers to the fact that the $this. This is used to create what is called interface Fluent (although not all cases are that). This way the methods can…
-
6
votes2
answers182
viewsA: Exit multiple loops without using goto
Interesting not. It is possible to use a long jump in C or make an exception in C++, but are much worse options than goto. In some cases a simple return in a function can solve, so you place the…
-
3
votes1
answer203
viewsA: Indexes in primary key columns
In my case, considering that the primary key of each table of my bank is used in the wheres of my queries to the bank, I must create an index for them? Primary key indication automatically creates…
-
1
votes1
answer85
viewsA: POST coding
This is called Percent encoding. It is used to escape characters that are part of the content but are confused with special characters used in specific indications of URL/URI. All basic text…
-
7
votes2
answers562
viewsA: Switch case Java ends without reason
The line while (menu != 7) { clearly says that it is to close the loop when typing 7. Probably wanted to use while (menu != 8) {. Another possibility is to make a while (true) { and within the…
-
11
votes1
answer4004
viewsA: How to limit reading decimals (scanf) of a double variable?
There’s no way to do that. The scanf() is useful for very basic readings. If you need something more complex you need to write a more sophisticated function or use some library that provides…
-
1
votes1
answer632
viewsA: Typeerror: Document.getElementsById is not a Function
The problem is on that line. there’s an S where it shouldn’t: var soma = document.getElementById('valor').value; I put in the Github for future reference.…
-
9
votes5
answers1240
viewsA: How to split a string into specific Javascript sizes?
I know someone will provide a solution with Regex, but I prefer something like this (can put in a function to then use in a single line in a simpler way than Regex and probably faster. var str =…
-
6
votes1
answer79
viewsA: Is using "Touint64()" to format string correct?
If it reaches the expected result in all situations I can not say it is wrong. But I consider gambiarra (which is sometimes the best way). But I wouldn’t do that. Text is text, number is number. The…
-
6
votes1
answer396
viewsA: Proposal from the Clojure?
If it is worth investing it is something personal and each has to decide on its own analyzing its objectives. If you want to know if she’s popular, it’s not, like all functional language, which…
-
4
votes3
answers493
viewsA: Is it bad practice to fill <select> <option></option> with data from the database?
There is no such thing as "bad practice". There is what needs to be done to solve a problem, meet a requirement and do free things. There is the right doing in the specific case or not. I notice a…
-
17
votes1
answer1078
viewsA: What is the difference between the relationships between tables?
This is called cardinality. In a way what is in the question practically already says what is each one. 1:1 means that for each row of a table will be referenced in one row in the other table and…
-
1
votes1
answer126
viewsA: Relationship in database table
Is there a reason to separate? That’s the question. You almost always don’t. Usually there is a small loss of performance (in some cases there may be improvement, but would have to analyze the…
-
8
votes1
answer148
views -
34
votes2
answers1952
viewsQ: What is a Jitter?
In the context of software development what is a Jitter? More and more people are talking about it and several languages are using the so-called JIT compilation. As it differs from a compiler?…
-
29
votes2
answers1952
viewsA: What is a Jitter?
Jitter is short for Just-In-Time Compiler or compiler on demand. We can consider it as a dynamic compiler since it runs at runtime and can adapt the code as needed. Unlike the traditional compiler,…
-
9
votes1
answer1627
viewsA: Usercontrol, what is it? When to use?
The UserControl is a WPF control used as a basis for the programmer to create their own controls (GUI elements) composing other existing controls as if they were one. It has advantages and…
-
7
votes2
answers106
viewsA: How to be less repetitive in my Javascript codes?
Repetitive code is not always bad. It can reduce it, but it can get harder to understand. The key to eliminating repetitions is to find a pattern and change what varies. It has several ways to…
-
2
votes1
answer2162
viewsA: Show a specific number of decimals in floating point numbers in Lua language
Uses in a similar way to printf() of the C language: string.format("%.4f", 25.33333333) Behold working in the ideone. And in the repl it.. Also put on the Github for future reference. This page can…
-
4
votes1
answer218
viewsA: Precision scaling using Entity Framework and SQL Server
Why does this happen? Because the value recorded in double is used for scientific calculations where it needs performance and the processor has specialized instructions that make the calculations…