Posts by Maniero • 444,682 points
6,921 posts
-
4
votes6
answers4502
viewsA: How to use two CSS attributes at the same time?
Must have been wrong in the syntax, as you did not show how, I can not point out the exact error. See working: <!DOCTYPE html> <html> <body> <h1 style="color:#CC0099;…
-
5
votes2
answers435
viewsA: What is the rule for converting a binary value to a negative number and vice versa?
Remembering that there I used an example of 8 bits that well spoke the mgibsonbr, is not the way that PHP assembles numbers. This makes all the difference because it will need to do data alignment…
-
8
votes1
answer2706
viewsA: How to count the number of tables in Mysql?
Do so: USE databasename; SHOW TABLES; SELECT FOUND_ROWS(); I put in the Github for future reference. Source.…
-
1
votes1
answer1855
viewsA: How to clean the screen on Tkinter?
The basic technique is to create a frame to group all the controls you want to destroy, since each control has the function to destroy all your children. Remembering that you can have frames inside…
-
8
votes1
answer2421
viewsA: What is the best way to store money in Sqlite?
The guy real of the Sqlite is the double, don’t use. Choosing one for you would fall in your opinion. It depends on what you need, how comfortable you are to work. I will point out the problems and…
-
3
votes3
answers6938
views -
6
votes1
answer4336
viewsA: Exception when it will generate bank bill with Boleto.Net
This software is poorly done and incomplete. If you want to use it this way you will have to complete it. See what causes the problem: switch (Banco.Codigo) { case 1: descricaoCarteira = new…
-
8
votes8
answers17275
viewsA: Difference between while and for
It has already been said that the basic difference is the semantics you want to give to the code. When the for was invented he was more limited to giving a numerical sequence. When they invented…
-
5
votes1
answer819
viewsA: How does "printf()" work?
Each compiler can use as much code as they like in their library as long as they do everything specified. And most make the source code available, so the best thing is to look there. Some places: If…
-
3
votes1
answer343
viewsA: How to get the value before MAX in SQL?
The concept of the former may be relative. I think it solves what you want: SELECT MAX(coluna) FROM tabela WHERE coluna NOT IN (SELECT MAX(coluna) FROM tabela) I put in the Github for future…
-
4
votes1
answer296
viewsA: How to mount a query with optional conditions?
Better resolve in PHP and analyze if the array is empty or not. If it is empty, bring everything, if it is not, use the condition. After the various changes in formulation, according to the comments…
-
5
votes3
answers1735
viewsA: How to use if/Else within a function?
I would do different, I see several conceptual errors in the function, but the only problem that prevents it from working is the function call in HTML, the function expects a parameter, you are not…
-
7
votes2
answers1967
viewsA: Programming language directly with hardware
There is no more suitable language, at least not with this description. There is one that solves the problem. If the hardware used does not accept code written in C, it is not suitable. The same…
-
2
votes1
answer270
viewsA: Is there any way to translate the error messages produced by PHP?
Tim S. has done the job of researching this and post to the OS. He thinks it’s not worth doing but can edit a file .po with the strings translated PHP. It indicates up to a editor for this. Needs…
-
3
votes1
answer781
viewsA: How to get the default temporary operating system directory in PHP?
sys_get_temp_dir(). That’s all :)
-
21
votes1
answer432
viewsA: What is the ~ (til) operator for in PHP?
It’s the negation operator bit to bit. That is, it reverses the value of all bits of the data in question. Those who were 0 saw 1 and those who were 1 saw 0. His name is bitwise not. Do not confuse…
-
12
votes1
answer6642
views -
3
votes1
answer139
views -
3
votes1
answer152
viewsA: Substring(string.Indexof) is returning unwanted parts
You’re really getting the wrong positions. The beginning is not considering the characters of what you are looking for. So if you are looking for <span> you have to get 6 characters ahead to…
-
4
votes1
answer502
viewsA: Loading external "pages" via AJAX. Will Google index?
Even if Google eventually executes code in Javascript it doesn’t count that this execution is perfect and plays exactly what you expect. In fact to current documentation Google’s search engine…
-
9
votes1
answer515
viewsA: What are the pros and cons of the Task<List<Object>> implementation on List<Object>
The first is prepared to do this asynchronously, that is, the code begins to do and continues its normal "life" regardless of the execution of this query and when she finishes the code will be…
-
2
votes2
answers174
viewsA: Method does not correctly show expected result
You have two problems. Your problem is recurring these days. Most people learn to program by methods I don’t understand. It seems to be a thing of following recipes and not learning the concepts,…
-
16
votes1
answer236
viewsA: What is the usefulness of the ! operator in Java?
He is the logical operator of negation (known as not) and it only applies to boolean data. That is, if it receives a true he turns into false and vice versa. Then: bool x = !true; is the same as…
-
5
votes2
answers1229
viewsA: Improve code performance in C#
Just looking at this excerpt has nothing that can be done to get significantly better results. I could tell you to do a formatting function of your own, but probably it would be less efficient. I…
-
8
votes3
answers219
viewsA: What is the whole argument in Exit() for?
It returns this value to what called the script PHP, in this case the shell operating system. As far as I know this is of no use if you are using an HTTP server. Obviously only the shell will know…
-
2
votes1
answer63
viewsA: Is it possible to serialize closures in PHP?
I believe you are bringing content from the OS here. So just do what you already was answered there. The function serialize() It’s not gonna work anyway, she’s not ready for this. There is another…
-
5
votes1
answer882
viewsA: What safe way to check if an object is numerical?
Yeah, this way is right to check if the guy is a Number. There may be other wrinkles that can help in some specific cases, but basically this is the best way. But note that it will not cover all…
-
5
votes1
answer1820
viewsA: How to convert string to double without rounding error?
Assuming that the culture is right and can use the comma (it seems so), the problem is of numerical rounding of the type double. Unfortunately most programmers do not understand its use and do not…
-
6
votes1
answer81
viewsA: Controller and action routes in lower case
It is possible to use a library (Nuget) to do this. There are indications how to install and use it. It is possible that the project has been abandoned. Alternative. But if you are using . NET 4.5…
-
2
votes1
answer164
viewsA: Dependent executable files available to the user
You are not with a problem, you want for some reason to reduce the amount of files. Do you have a good reason for this? If not, do not. If you really want to, you can do as Omni said in the…
-
2
votes1
answer129
viewsA: How to get only a part of a string from a pattern?
I don’t know if the most reliable way but this works: var = [[Content-Disposition: attachment; filename="403.htm.en" Content-Type: text/plain; name='403.htm.en' Content-Transfer-Encoding: BASE64 ]]…
-
3
votes1
answer77
viewsA: Program does not execute expected flow
Since you are using C++, why not use the type string existing in the default language library? Like this: #include <iostream> #include <string> using namespace std; int main() { cout…
-
4
votes2
answers170
viewsA: How to edit a Partial Class?
Definition Partial class is just a way to separate two parts of the code of a class into separate files. It has no secret or special semantics. It is essentially a way to facilitate code…
-
20
votes3
answers18194
viewsA: What purpose of unsigned in C++
As in C, the unsigned alone serves for nothing (except the one shown below), it is a modifier to determine that an integer numeric type is unsigned. In other words, you will only have positive…
-
9
votes2
answers3954
viewsA: How to list all remote repositories in Git?
Simple as that: git remote or git remote -v to list the Urls. Documentation.…
-
3
votes1
answer201
viewsA: Binary search on a list with no fixed size
I’ll assume you’re using some form of array and have access to it, even if this is just the internal representation. Otherwise I don’t see how to do even a simple search. This may depend somewhat on…
-
1
votes1
answer241
viewsA: Javascript and Activex printing
In the default web it is not possible to do this. I talk more about this in that reply. With Activex it is possible but it only runs on Internet Explorer, an end-of-line browser. Microsoft’s new…
-
2
votes2
answers709
viewsA: Projects created in Visual Studio 2015 are recognized in Visual Studio 2013?
It’s supposed to work, I didn’t find anyone complaining. I found people saying that 2013 projects are recognized by 2012, contrary to what you say. So it may be that you are having specific…
-
15
votes2
answers1999
viewsA: Why can’t I declare a variable with a numeric before the name?
There is the rule because it is ambiguous. If the variable starts with a number the compiler does not know it is a symbol (a variable, for example). He’ll think it’s a numerical literal. Note that…
-
6
votes2
answers348
viewsA: Creating string in PHP
If you just want to guarantee the size create and use a function that does this whenever you want to guarantee the size: function fixedSTring($txt, $length) { $length = max($length, strlen($length);…
-
1
votes2
answers2507
viewsA: How to put part of a text in bold in Tkinter?
It’s not possible even with this widget. The solutions people use are to use another control that renders the text the way you want it to or create a function that assembles some Labels as if it…
-
60
votes4
answers31911
viewsA: What is the difference between compiled language for interpreted language?
Correct terminology First, there is no such thing as an interpreted or compiled language. Except for some characteristic or specification, all can be interpreted and/or compiled. There are language…
-
10
votes2
answers716
viewsA: What is the name of => operator in PHP used in arrays?
It is not an operator, contrary to popular belief and error in Wikipedia, at least for PHP. The language has those operators. It is only a language construction element that separates the key from…
-
14
votes3
answers1869
viewsA: Why (1 == true) is "true" and (2 == true) is "false"?
It is a decision of each language to determine which values are considered true or false and the programmer’s obligation of each of them to know what is the standard adopted by the language you are…
-
2
votes1
answer658
viewsA: Perform task scheduling via PHP in windows
A script simpler run? If nothing in PHP runs, IIS is not configured to run PHP. And then, since the question does not give details, I can only make this diagnosis and indicate that you should…
-
4
votes3
answers1719
viewsA: Very slow C# and MVC site
This is relatively common. ASP.NET MVC itself has many components that need to Warm-up to start working in order. Of course, it may be that your case is a point outside the curve, but I believe…
-
8
votes3
answers423
viewsA: How to choose a digital certificate? What to take into account?
Cheapest certificates: has less name, it matters in some situations, in part there is a reason to have less name, in part it is marketing; are accepted in fewer browsers and other software (in…
-
1
votes1
answer45
viewsA: Concatenation of a Select field into the ADDTIME function
Since the second parameter of the function ADDTIME() needs to be the TIME and you want to use a dot column type INT need convert with function SEC_TO_TIME(): SEC_TO_TIME(t.toleranciaCurso * 60) I…
-
3
votes2
answers1623
viewsA: Concatenate number sum to a string
For me neither of the two work, the problem is in the statement of for: for (var i = 0; i < 10; i++) { let h = "texto" + i + 1 + ".txt"; console.log(h); } I put in the Github for future…
-
2
votes2
answers340
viewsA: How to save a function’s parameters to a variable?
Would that be: var p1 = 343, p2 = 5, p3 = 6, p4 = 2, p5 = 86528, p6 = 875433, p7 = longitude, p8 = latitude, p9 = 'COORDENADAS'; I put in the Github for future reference. Note that you have 9…
javascriptanswered Maniero 444,682