Posts by UzumakiArtanis • 9,534 points
129 posts
-
21
votes2
answers5427
viewsQ: What is an automaton?
For several times I hear discussions about automata, whether in the chat or in questions/answers. However I particularly do not know what an automaton is, I have no idea to tell the truth. When…
-
0
votes1
answer582
viewsA: How to perform safe file upload?
To check if the file is really an image, through PHP, there is already a question answered about this in What is the safest way to identify that the upload file is an image?. Now, responding how to…
-
6
votes2
answers172
viewsA: What is the difference between $('#id') and Document.querySelector('#id')?
The first you use the alias for use of jQuery, while in the latter it uses the DOM with Javascript only. var record = document.querySelector('#record'); record.onclick = function(){…
-
2
votes2
answers1420
viewsA: How to prevent the user from making changes to the input?
The other answers already contemplate what was requested, however I would like to leave an alternative using Javascript: window.onload = function() {…
-
2
votes1
answer44
viewsA: What extensions are supported by $_FILES?
As already stated in the comment and can be seen in a reply on Stack Overflow, PHP does not limit any file, or extension, or mime type, "naturally", after all a file is only information. You do the…
phpanswered UzumakiArtanis 9,534 -
2
votes2
answers449
viewsA: How to make a slider footer by running the site partners?
There is a library called Slick as well as the Owl Carousel which you can use to make this transition effect, and which is specific to this. Click the blue button Execute to get a preview of how it…
-
3
votes1
answer1130
viewsA: How do I know if the last character of a string ends with the letter "a" or "o"?
To get the last letter of a word use substr(): substr("testers", -1); // retorna "s" If the 2nd parameter (known as start) for negative, the returned string will start at the start character from…
phpanswered UzumakiArtanis 9,534 -
25
votes4
answers2054
viewsQ: What can be considered a character?
In another question, Is it bad practice to put numbers as id in HTML elements? If yes why? is asked about placing numbers as id in HTML elements. I saw that after a few minutes a great confusion…
language-independentasked UzumakiArtanis 9,534 -
11
votes3
answers1595
viewsA: Is it bad practice to put numbers as id in HTML elements? If so, why?
As @Renan said, a number is an alphanumeric character. I agree that using only numbers is bad practice, but it doesn’t go against what the W3C establishes. Really "there is no technical problem",…
-
6
votes4
answers10811
viewsA: How to get the text of the selected option inside a select?
To Sergio’s response already contemplates what has been requested, however I would like to leave an alternative using jQuery: $('#selectOption').change(function() { var option =…
javascriptanswered UzumakiArtanis 9,534 -
7
votes1
answer12040
viewsA: Why are the pull-left and pull-right classes no longer working in Bootstrap 4?
The classes pull-right and pull-left no longer work in Bootstrap v4 because they have been removed. Added . float-{Sm,Md,lg,Xl}-{left,right,None} classes for Responsive floats and Removed .…
-
3
votes1
answer97
viewsA: What is the difference between text/javascript and text/x-javascript?
text/javascript is obsolete application/x-javascript was experimental, and decided to officially switch to the then official application/javascript application/javascript is the MIME Type official…
javascriptanswered UzumakiArtanis 9,534 -
0
votes3
answers4370
viewsQ: How to add opacity only to the image?
A snippet speaks more than a thousand words: body { padding-top: 11%; background: url(https://fakeimg.pl/1920x1920/); } <link…
-
3
votes4
answers1140
viewsA: How do you get a form down?
To position elements use CSS. O <br> shall be used in word line breaking, as its name suggests. Use for example style="padding-top: 150px;" in his <body>, to position the way you want,…
-
3
votes3
answers2388
viewsA: How to change the home page of the directory through . htaccess?
By default, when the browser requests, the file is returned index.html of the requested site. In this case, thinking that you want an answer that solves the problem, in this scope specifically, use…
htaccessanswered UzumakiArtanis 9,534 -
8
votes3
answers640
viewsA: How should an error page (404) behave?
First, I believe it is interesting to define what an error message is and what it is for. According to the trusted Portuguese language dictionaries, Priberam, Michaelis and Aulete an error, in…
-
18
votes5
answers2375
viewsA: Should I show generic error messages like, wrong password or user, or specific messages?
There are already some threads in the Information Security, site of Stack Exchange specific on information security, which deals, more or less, with the same subject. Actually there is a tag…
-
5
votes2
answers5450
viewsA: How to run . mkv files in all browsers?
HTML does not support any video format, and HTML5 does not specify which formats browsers should support. It’s up to browsers to decide which formats they choose to support. Apparently, Chrome runs…
-
6
votes1
answer221
viewsQ: What is a T-SQL query?
In the Stack Exchange Data Explorer, specifically in the first line it says: Click the Compose Query button up there and start Typing your T-SQL query [...] That in free translation would be: Click…
-
16
votes2
answers1206
viewsA: Should placeholders contain examples or descriptions?
Placeholders must contain examples or descriptions? Where possible they should contain examples and descriptions, both friendly and politely, to the right extent, to help the user understand how to…
-
2
votes2
answers298
viewsA: What is the difference of use between mouseClicked and actionPerformed?
The event mouseClicked() is part of the Interface Mouselistener, "listener" interface of events related to mouse and controls its events. This "listener" is called when the mouse button has been…
javaanswered UzumakiArtanis 9,534 -
0
votes2
answers63
viewsA: Why is the selected <select> option not being cleared using Choosen?
The logic is correct, however, you forgot to include your variable cmb at the loop. Notice that you didn’t use it on loop itself, simply stated it, but within the loop, you didn’t use it:…
-
2
votes2
answers63
viewsQ: Why is the selected <select> option not being cleared using Choosen?
I was trying to clear the selected option from the checkbox - <select> using Javascript. In this checkbox I am using the plugin Choosen. I saw an answer in Stack Overflow, and I’ve already…
-
5
votes2
answers1874
viewsA: Where is a PHP session file stored?
The storage location of the variable $ _SESSION is determined by the configuration session.save_path PHP. Normally, the path is /tmp on a Linux/Unix system. Use the function phpinfo() to see your…
-
2
votes2
answers1874
viewsQ: Where is a PHP session file stored?
I’ve read about files related to $_SESSION, but I would like to find them. Where they are stored?
-
7
votes1
answer361
viewsA: What is the difference between NULL and null?
In broad lines, there are no differences. The NULL is case insensitive - case sensitive. In the case documentation that’s being said: There is only one null value, and that is the constant case…
-
5
votes1
answer361
viewsQ: What is the difference between NULL and null?
Is there any difference between the NULL (in capital letters) and null (lowercase) in PHP? I know I can use both types, but there’s some rule of naming those words?…
-
2
votes1
answer51
viewsA: How to access version of a . exe file with Javascript?
Through Javascript only, there is no way to access version of a file .exe. If you are using File(), according to the W3C, the only values returned from a given file are: The sequence of bytes; The…
-
9
votes2
answers2146
viewsA: What is the difference between mysql-server and mysql-client?
Server and Client The server package will install the database server (Mysql / Mariadb) with which you can interact using a client. You can use the client to send commands to any server; on a remote…
-
2
votes1
answer1909
viewsA: How to concatenate the records of two columns?
First of all, do backup of your database and the information related to it. Sometimes very large changes can crash the browser. The function to concatenate the tuples into the database is CONCAT().…
-
0
votes1
answer1909
viewsQ: How to concatenate the records of two columns?
Let’s say I have a table with two columns name and surname, for example: Nome | Sobrenome -------+----------- João | Silva Mike | Corin Carlos | Rodrigues And I want to join the column of the name…
-
7
votes3
answers8795
viewsA: How to round a number to the highest value in Mysql?
I believe you seek the function CEILING(X). That function CEILING(), which can be used abbreviated as CEIL(), returns the smallest integer value not less than X. In other words, "round the…
-
6
votes3
answers8795
viewsQ: How to round a number to the highest value in Mysql?
I was doing some tests on Mysql and then the need arose to have to round a number to the largest. It would be something like: if($numero == 1.5){ $numero = 2; } Even though I could do it like this,…
-
12
votes3
answers3452
viewsA: What is an absolute value?
Let me explain a little bit about the mathematical concept of function ABS(), because I believe that is what you want to understand, and is what is part of the scope of the site. ABS() - returns the…
-
8
votes3
answers3452
viewsQ: What is an absolute value?
Viewing the Mysql documentation you can find the mathematical function ABS(x), to which the absolute value of x. mysql> SELECT ABS(2); -> 2 mysql> SELECT ABS(-32); -> 32 What exactly is…
-
4
votes2
answers1593
viewsA: What are the differences between normal jQuery and slim versions?
In the jQuery 3.0 release version, was also announced the version slim (slender, thin, light) to which removed some functions, that you might not want to use, or that you already used/preferred to…
jqueryanswered UzumakiArtanis 9,534 -
2
votes1
answer667
viewsA: How does the floatval function work?
Brief Introduction to Float Taken from the tag float: Float is an abbreviation of Floating Point Number (Floating point number). And in most programming languages, this type is used for variables…
-
1
votes1
answer667
viewsQ: How does the floatval function work?
I saw in the PHP documentation that there is a function called floatval(), to take the floating point value of a variable. Then I saw on the internet a question similar to this one on the internet:…
-
3
votes3
answers139
viewsA: What does it mean to distribute content with low latency and high data transfer speeds in Cloudfront?
Cloudfront The Amazon Cloudfront is a global content delivery (CDN) network that securely delivers data, videos, apps, and Apis to viewers, low latency and high transfer speeds. Recommended reading:…
-
1
votes2
answers890
viewsA: Notice: Undefined variable
You have an undefined variable called $row. What happens is that you assign the values of fetch() the variable $data and then calls for a variable that was not created, $row. You have to change the…
phpanswered UzumakiArtanis 9,534 -
1
votes1
answer1017
viewsA: How to search for the lowest value between columns?
SELECT produto, LEAST(preco1, preco2, preco3) FROM precos WHERE codigo=? The operator least(), will select the smallest argument of a given query. With two or more arguments, returns the smallest…
-
6
votes1
answer1107
viewsA: Where is it used and what is the importance of string type?
Short Answer You will write something (texts, phrases, words, characters) to your user? If you answered yes, then you should know that that’s a string, why a string is a sequence of zero or more…
stringanswered UzumakiArtanis 9,534 -
9
votes2
answers132
viewsA: What will be the result of $a?
I believe that you removed the code from here. And I also believe that you have not finished reading the document, because at the end is shown all the answers, which in this case corresponds to…
-
3
votes2
answers132
viewsQ: What will be the result of $a?
I was studying PHP and seeing questions, to improve my knowledge in the area. Here is an excerpt from a question: Given an excerpt of code written in PHP language, as the below: $a = array("a", "b",…
-
11
votes2
answers2954
viewsQ: What is a scalar variable?
I was reading the PHP documentation and a function is_scalar() - as stated by the site itself - when it is used it will inform if a certain variable is scalar. However I wanted to know a little more…
-
1
votes2
answers2091
viewsA: Uncaught Syntaxerror: Unexpected token {
Not missing a key, is a syntax error occurring. What is happening is that you have a comma that is in the wrong place, close to: return data; }, // <--Essa vírgula, tem que estar na linha debaixo…
javascriptanswered UzumakiArtanis 9,534 -
3
votes2
answers2091
viewsQ: Uncaught Syntaxerror: Unexpected token {
I was developing this code and the following error was generated: Uncaught Syntaxerror: Unexpected token { $(document).ready(function() { editor = new $.fn.dataTable.Editor( { ajax:…
javascriptasked UzumakiArtanis 9,534 -
10
votes2
answers188
viewsQ: Boolean arguments, in general, are not good?
I was reading a little bit of Clean Code. The book talks about "good programming practices", and on the Internet, in one of the slides it is said that: Boolean arguments, in general, are not good. I…
-
26
votes2
answers39989
viewsA: What are data-target and data-toggle attributes for?
About attributes data-* HTML5 was created thinking about the extensibility of data that needs to be associated with a given element but does not necessarily have a defined meaning. Attributes…
-
2
votes1
answer808
viewsQ: How to get information from the server operating system?
How can I get the operating system from my server? For example, some method to know if the operating system of the production environment is on Linux, Windows, etc...