Posts by Lucas de Carvalho • 6,427 points
260 posts
-
4
votes4
answers33862
viewsQ: How to search for values in column A that do not exist in column B?
For example, I have a spreadsheet: [ A ] [ B ] 1 valor1 valor1 2 valor2 valor2 3 valor3 valor3 4 valor4 valor4 5 valor5 valor6 You can see that in column B, there is no valor5, what I wanted is to…
excelasked Lucas de Carvalho 6,427 -
2
votes3
answers818
viewsA: Update does not work
See if this update works! If you look at it well, there are some double-quote and single-quote conflicts, as well as point and comma errors. To edit only the column with the id you need, the $id you…
-
0
votes4
answers880
viewsA: Why is it not advisable to use PHP codes in the same HTML document?
Complementing the responses, it is worth remembering that HTML files do not support PHP files, put PHP files are server side and HTML files are client side. Maybe that’s what your teacher wanted to…
-
5
votes1
answer39
viewsQ: What is the best way to insert with SQL?
I say that because there are two ways. Has the: INSERT INTO teste SET nome = "Lucas", sobrenome = "Alves"; And also the way: INSERT INTO teste (nome, sobrenome) VALUES ("Lucas", "Alves"); Speed,…
sqlasked Lucas de Carvalho 6,427 -
8
votes2
answers150
viewsQ: Is it worth using the W3C validator?
I ask this because it seems that he accuses things that, I think, were not to accuse. For example: <!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="UTF-8">…
-
3
votes3
answers139
viewsQ: What does it mean to distribute content with low latency and high data transfer speeds in Cloudfront?
I saw in a website, the Cloudfront, and it seems to me that the site gets faster because of this. I read about it: "Amazon Cloudfront is a web service that gives businesses and app developers an…
-
0
votes0
answers535
viewsQ: Clear my user cache?
I took a virtual store to do some updates, and so far so good. I did, etc... The problem is this. CSS modifications only apply in the clients' browser if they clear their browser history. If for…
-
1
votes2
answers3664
viewsQ: What is string ISO-8859-1?
I need to use utf8_decode and PHP utf8_encode, then I saw something about ISO-8859-1 string. What would that be? I do not want to know how to use, at the moment, I just want to know the meaning of…
-
1
votes2
answers34
viewsQ: Can I set ids and classes in Tyles, scripts, etc?
I can set ids and classes in style, script, etc.? Example: <style class="teste" id="teste"> /* Meu codigo aqui */ </style>…
-
6
votes2
answers555
viewsQ: Difference between fetch and setFetchDP methods
I understood the difference between fetch and fetchAll, but now, what is the difference between those and setFetchMode? Looks like it’s the same thing... (at least when it comes to riding). I can do…
-
0
votes1
answer21
viewsQ: .position() giving error - Jquery
I’m getting the following error: Uncaught ReferenceError: position is not defined What’s wrong with the code? $(document).ready(function () { $('.main_menu a').click(function () { var g = '.' +…
-
1
votes2
answers851
viewsQ: Database connection - PDO
Guys, in the course, we are manipulating database with PDO, but now in the connection part, appeared to me the MYSQL_ATTR_INIT_COMMAND and I don’t really understand what it’s for, I just know that…
-
2
votes3
answers58
viewsQ: Why does the use of parentheses affect a mathematical expression combined with a concatenation?
Why: echo "Você nasceu em ". (date('Y') - 20); //Retorna correto, no caso, se a idade for 20, retorna 1997 echo "Você nasceu em ". date('Y') - 20; // Retorna -20 Why in that particular case, with…
phpasked Lucas de Carvalho 6,427 -
0
votes1
answer282
viewsQ: Do I need to include classes when I inherit?
Following. When I want to use something, for example, on the index, I want to pull a class to make an object, right? Imagine the class is like this: <?php class Testando{ //Meu codigo aqui }…
-
4
votes2
answers197
viewsQ: Check if it is the class
How do I check with Javascript if it’s really that class in CSS? Example: if(é a class) { } or another example, if it is not the class if(!.minhaClasse) { } Is there any way to do this, with pure…
-
2
votes3
answers372
viewsQ: How to catch a class with Jquery array?
For example, in HTML, I have this: <ul class="benefits"> <li>Finalização rápida e fácil</li> <li>Múltiplos endereços de envio</li> <li>Acesso fácil a seu…
-
1
votes1
answer506
viewsQ: Create random classes and ids
How I create random classes and ids in HTML? A platform here with whom I work, she, every page update, a di in Footer updates its classes and ids, in a random mode. For example, now she’s like this:…
-
4
votes2
answers68
viewsQ: Why doesn’t the array value 1 appear in the explode?
When I create the code: $urlAtual = "https://www.meusite.com.br/customer/account/create/"; $parteurl = explode('/', $urlAtual); for($i=0;$i<=6;$i++){ $parteurldesejada = $parteurl[$i] .…
phpasked Lucas de Carvalho 6,427 -
0
votes2
answers939
viewsQ: Check if URL is different in PHP
In Javascript, we can check if the url is different, we have window.location.href You can do it: var urlAtual = window.location.href; var urlCadastro = "www.teste.com/cadastro"; if(urlAtual !=…
phpasked Lucas de Carvalho 6,427 -
7
votes1
answer432
viewsQ: What is a template engine?
Before long, I learned about the PHP template engine. By the way, I understood what it is, but I have doubts. • It is a "programming language?" I put in quotes put read this on a website: Purpose At…
-
3
votes1
answer105
viewsQ: How to do require_once from multiple locations in one line?
For example, I’m doing so: require_once 'Testeum.php'; require_once 'Testedois.php'; require_once 'Testetres.php'; Can I do this with a single require_once? With attribute I can put comma: private…
phpasked Lucas de Carvalho 6,427 -
5
votes3
answers1419
viewsQ: Clicking on <li> the <a> link also work
I always have that question, look at that: I have a menu, with ul and li: <ul> <li><a href="/inicio">Inicio</a></li> <li><a…
-
4
votes2
answers6999
viewsQ: What is generalization and specialization?
In POO, what is generalization and specialization? Would there be some explanation in some technical way and a not so technical way? Simpler to understand, etc.
oopasked Lucas de Carvalho 6,427 -
2
votes2
answers40
viewsQ: Take two "arrays" in one line?
It has for example, how to take the two in one line? Example: document.getElementsByClassName("teste")[0].removeAttribute("disabled"); I want to get the 0 and the 1 There’s a way to get the two…
javascriptasked Lucas de Carvalho 6,427 -
3
votes2
answers2478
viewsQ: Check if button is disabled - Javascript
I have this button, and I need to check with Javascript that it’s disabled, but I don’t know how to do it. Here’s HTML: <button type="button" title="Finalizar Compra" class="btn…
-
2
votes1
answer148
viewsQ: What is the importance of the interface in this particular code?
If we will put the interface functions, also inside the class, then create interface? Example: Interface interface Teste { function olaMundo($texto); } Class class Testando implements Teste {…
-
0
votes0
answers58
viewsQ: Should I create constructor with Setter? PHP
Which best and safest method to create the constructor? Netbeans creates direct by changing the variable, but has how to use Setter. So, which is the best and safest method? For example: Without…
-
4
votes3
answers667
viewsQ: Does the PHP method have line limits?
The size of the method is 22 lines. (20 Allowed) Netbeans gives me this "warning," so why? It’s a PHP rule? What’s best: A great method with all the code he needs. Split this code into smaller…
-
1
votes2
answers55
viewsQ: What’s the difference from . to -> in PHP?
What is the difference between them? I took an exercise of "Aggregation Relationship" that had the 2, and did not understand the use of . instead of the -> In this case, what is the difference,…
phpasked Lucas de Carvalho 6,427 -
1
votes2
answers4342
viewsA: Sublime Text 3 does not recognize commands in PHP
It does not run anything, it is a text editor. If you want to edit Syntax, just go to view >> Syntax >> PHP…
sublime-text-3answered Lucas de Carvalho 6,427 -
4
votes2
answers1335
viewsQ: $_GET gets ID or name value?
The $_GET, or even the $_POST, take values from the ID of the input or of name? <form action="#" method="get" name="meuForm"> <input id="nome" name="nome" type="text" value="Teste">…
-
7
votes2
answers91
viewsQ: How to shorten the process of creating an array without the need to write all indexes?
For example, if I need to create an array with 20 spaces, I need to always do so? $teste = array(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19); Or have some way to shorten that process, that 0 to…
-
0
votes4
answers211
viewsA: jQuery Hover does not work
Try it like this: $('.see-movie').toggleClass('buy').text('Gostou?Adquira já!'); $('.buy').hover(function() { $(this).text('Ligue 0800 123 4567'); }, function() { $(this).text('Gostou?Adquira já!');…
-
0
votes4
answers18367
viewsA: Applying opacity in a Background
Try it like this: #banner { width: 100%; background-repeat: no-repeat; background-size: cover; } #banner:after{ content : ""; display: block; position: absolute; top: 0; left: 0; background-image:…
-
3
votes2
answers154
viewsQ: How does the server know that the index is the main page?
For example, I have several . HTML and . PHP files in the public_html folder on my server (Internal), but when opening the path in the browser (open the path…
-
12
votes3
answers329
viewsQ: What are "code units"?
I want to know what units of code mean? I saw that term in a reply here at Sopt and I was in doubt. Code units shall be short and have only one responsibility. Link to the question I saw the term…
-
8
votes1
answer442
viewsQ: What is considered a "gambiarra" or a bad code?
For example, I create a code, and it works, but I’m not sure it’s right for me to do it that way. Is that a trick? I have to make sure that the code is done in such a way for it to be considered a…
-
2
votes2
answers1061
viewsA: How to redirect to HTTPS?
<?php function goHTTPS() { if ($_SERVER['HTTP'] == "on") { $url = $_SERVER['SERVER_NAME']; $new_url = "https://" . $url . $_SERVER['REQUEST_URI']; header("Location: $new_url"); exit; } }…
-
-1
votes4
answers596
viewsQ: Progressive counting using for
If I do this one: for (var i = 0; i < 9; i++) { document.write(i); } The result will be: 123456789 How do I stop instead of being like this: 123456789, it create a count with a single numeral?…
-
0
votes2
answers161
viewsQ: Increase width in % and not in px
How do I increase the widht with %? You put this code that I did, it increases, but it’s in px, and I wanted it to increase in percentage. var progressBar = $(".progress-bar");…
-
-1
votes3
answers25286
viewsA: Change image color with CSS
I was able to, using the filter: invert(100%) the image reverses the color, in the case of black, goes to white. I left the answer to help more people who need.
cssanswered Lucas de Carvalho 6,427 -
1
votes3
answers25286
viewsQ: Change image color with CSS
Is it possible to change the color of an image with CSS? By applying a filter maybe, or something like that. Is there a way? For example, an image like this:…
cssasked Lucas de Carvalho 6,427 -
9
votes5
answers1163
viewsQ: PHP only connects to Mysql?
I’ve never seen PHP connect using other databases, like Oracle, for example. In Mysql, to connect, you use mysqli connect, what if it were in another? PHP is integratable with which database?…
-
0
votes2
answers1743
viewsQ: Is there any way to clear cache in the client’s browser?
For example, I have my website and made a modification, but it has not yet been applied in the client’s browser. Is there any way I can run this cache cleanup in the client browser? With PHP,…
-
5
votes2
answers4989
viewsQ: What is a boolean?
What exactly is Boolean? Could you give practical examples? It makes a difference to write true or True?
-
0
votes2
answers174
viewsA: How to link to each banner in @keyframes
I don’t think so, put in case your problem and HTML. You will have to create 3 banner class Ivs, and in CSS, setalas as None display, in each size. For example: <div class="banner…
cssanswered Lucas de Carvalho 6,427 -
0
votes1
answer30
viewsA: I’m not able to save a data edit with php and mysql
The syntax is wrong: Wrong $nome="$_POST[nome]"; Right $nome = $_POST["nome"]; I don’t understand why you said that "Save" is working, and the syntax is wrong.…
-
8
votes3
answers1312
viewsQ: How to create PHP executable program?
Is it possible to create a program for my company that is executable, only with PHP and Mysql? Or I will need other languages such as C, Java, etc. In case the program is internal only.
-
24
votes3
answers971
viewsQ: Is POO the same in all languages?
Is the way of structuring, programming in POO the same in all languages? For example, class, interface, etc...
-
-4
votes1
answer1618
viewsQ: What is the difference between $_GET and $_POST?
Could they explain in detail what they are? And also give examples of how they work?