Posts by Lucas de Carvalho • 6,427 points
260 posts
-
1
votes1
answer15
viewsA: Delete file value with database information
Try to do with attr: $("#excluir").click(function(){ $("#fileUpload").removeAttr("value"); $("#imagem, #excluir").css("display","none"); });
jqueryanswered Lucas de Carvalho 6,427 -
3
votes1
answer113
viewsQ: Controller needs to be a class?
The controllers within an MVC, must they be classes? Because from what I’m seeing here, their only function is to take the information that the view You’re asking, play for model "solve the problem"…
-
0
votes1
answer283
viewsQ: Session vs Database Query
Guys, I’m in doubt here. Inside my control panel, I will need to get user id, email, password (only to change password) name, over name, etc... The ideal would be to save all this in a session at…
-
0
votes0
answers81
viewsQ: Is it safe to use session_id with MD5?
I’m taking the session_id and putting it with MD5 encryption, to make a logout process. I’d like to know if there’s any safety issue with that, so I’ll do it, or I’ll take some risk in the future?…
-
1
votes2
answers2712
viewsQ: Run PHP function inside onclick or href
I’m with a logoff system, and it works, but, I didn’t want to run it by using URL: $logoff = filter_input(INPUT_GET, 'logoff', FILTER_VALIDATE_BOOLEAN); if($logoff){ unset($_SESSION['userlogin']);…
-
0
votes1
answer1047
viewsQ: html and body height 100%
You guys, good morning! I am using flexbox, and saw that, to center some div on the screen, div in the case created inside the body, to align with the align-items and Justify-content (Using both…
-
1
votes1
answer172
viewsQ: Noindex Nofollow from similar sites
I have two equal sites, same content, design, everything (One is homologation the other production). They are in different domains, only thing that changes, it is in the Robots that one is indexed…
-
1
votes1
answer1735
viewsQ: Touch-action for what? CSS
I’m getting a warning on the console of Google Chrome: [Intervention] Unable to preventDefault Inside Passive EventListener due to target being treated as Passive. See…
-
0
votes1
answer25
viewsA: Validation in_array with Ç
You can draw on this example: <?php $arr = ["Endereco","Endereço","Não", "Olá"]; $decode = implode(' ', $arr); $Format = array(); $Format['a'] =…
phpanswered Lucas de Carvalho 6,427 -
1
votes1
answer27
viewsA: Fatal Error related to the page.php theme
Answering your question, the error is that there is no function: sanzo_get_page_options() that is being called into the archive: /home/julisaupiscinasc/public_html/wp-content/themes/sanzo/page.php…
-
2
votes1
answer44
viewsA: How to use a website on the server
You can do it this way too: First, get the Apache XAMP ports: In the case here, I took the 80. Then, to see the IPV4 of the machine, in my case it is 192.168.0.20 Going on the PC of the same…
-
1
votes2
answers83
viewsA: 3 Div’s 100%, 30% each, one on the left another in the middle and one on the right
Try Flexbox, what do you think? body{padding: 0;margin: 0;} .pai{display: flex;justify-content: center;} .filho{padding: 20px;border: 1px solid; width: 20%; flex-grow: 1;margin: 10px;} <!DOCTYPE…
-
3
votes1
answer801
viewsQ: Compress external JS files
In the PageSpeed Google, some warnings I sometimes get, is to enable compression of JS and CSS files. But because I work with Apis and external scripts, sometimes I can’t do that. There would be a…
-
0
votes1
answer42
viewsQ: Fastest way to use CSS
Which is the fastest to use: .testando1{display: none;} .testando2{display: none;} .testando3{display: none;} .testando4{display: none;} .testando5{display: none;} Or: .testando1, .testando2,…
cssasked Lucas de Carvalho 6,427 -
1
votes1
answer37
viewsQ: Is using Super Global obsolete and insecure?
I wonder if Using Super Global is obsolete and unsafe in PHP, and why. For now we have the filter_input and I was left with that doubt.
phpasked Lucas de Carvalho 6,427 -
0
votes1
answer45
viewsA: Visualization accompaniment (pop up)
I don’t know what popup you’re saying, whether it’s some modal or whether it’s an Alert, but it would be something simple to check. Another thing I don’t understand is: it is programmed to open…
-
0
votes0
answers33
viewsQ: $_SERVER returns me ::1
Good afternoon! If I in PHP give a echo/var_dump/print_r, etc... in $_SERVER['REMOTE_ADDR']; Note: In host place, it returns to me: ::1 Why that? What does that mean ::1?…
phpasked Lucas de Carvalho 6,427 -
2
votes2
answers39
viewsQ: Lack of security page registration
Guys, I have a question about security. I made a form, to register users, until then ok. But for example, this form has an action, which is for the same page in the case. If a person creates a page…
-
4
votes1
answer5136
viewsQ: "New" autoload from PHP 7
I would like to understand the "new" autoload of PHP, in it I can choose the name I want to put? For example, in the old one, it was __autoload. That in case, I can put autoload_de_teste ? Another…
-
2
votes1
answer347
viewsQ: Does load method have beforeSend?
I wonder, if in Jquery’s . load() method, there is some way to use beforeSend, just like we use it directly in $.ajax(); Would have? $.ajax({ url: "https://www.blablabla.com.br", beforeSend:…
-
1
votes3
answers833
viewsA: I’m trying to get a C on file, but the code won’t let me enter the address
if has to have 2 equal, ie if(opcao == 1). I only work with PHP, but I believe that in C it is also like this, just an equal sign =, means you’re adding something that, two signs of equal == is…
canswered Lucas de Carvalho 6,427 -
2
votes5
answers1054
viewsA: How to make each input stay on a separate line?
Only with CSS, same code as yours: *{ margin: 0px; padding: 0px; background-color: #ccc; font-family: 'Arial'; font-size: 16px; color: #1C1C1C; line-height: 1.5; } .log-adm{ background-color: #000;…
-
0
votes0
answers72
viewsQ: Ajax only load div from a page by Class
With ID I can guess, doing so: $.ajax({ url: "www.teste.com/recuperar-senha #senha", beforeSend: function(){ $('.main').html("<p>Carregando...</p>"); }, success: function(r){…
-
1
votes1
answer110
viewsQ: Load page inside a div with Ajax
Good afternoon! I’m trying to use Ajax to load a page inside a div I have, but it’s giving error 403 (Forbidden). In case I can’t do it? There’s no way I could do it any other way? NOTE: The page I…
-
2
votes4
answers1339
viewsQ: Send PHP command via Ajax?
There is how to send a PHP command via Ajax? For example: $.ajax({ url: 'index.php', type: 'POST', data: '<?php echo "teste"; ?>', success: function(r) { $('body').html(r); } }); In case, I’m…
-
10
votes1
answer5204
viewsQ: What is the difference between . on(), . click(), . Blur(), bind()?
And if there is one more, what would it be? And the difference of that "some more" to the others above. Note: I know you have, I’m not saying you don’t have, if someone in a didactic way can answer…
jqueryasked Lucas de Carvalho 6,427 -
1
votes3
answers3345
viewsA: Go through jquery inputs and check if you have a certain class in input
You can do so with Jquery: $('.nav.nav-tabs li').each(function(){ if($(this).attr('class') == "active"){ alert("Achei a class!"); } else { alert("A class não está aqui!"); } }); NOTE: In place of…
-
0
votes4
answers562
viewsA: Display the output of a JS variable through Jquery in an html input
function Jogar(Voce){ var radom = Math.random(); if(radom <= 0.3){ var Maquina = "Pedra"; } else if(radom <= 0.6){ var…
jqueryanswered Lucas de Carvalho 6,427 -
2
votes0
answers43
viewsQ: Is the main document of style sheets defined in HTML Imports obsolete?
I’m realizing that all the sites are getting this message on console: [Deprecation] Styling master Document from stylesheets defined in HTML Imports is deprecated, and is Planned to be Removed in…
html5asked Lucas de Carvalho 6,427 -
1
votes1
answer88
viewsA: Is there a website or PDF with exercises for handling arrays?
Array I thought it was a seven-headed bug, but it’s just simple powerful variables. A normal variable can save my name, for example: $nome = "Lucas"; If we give a echo what will be shown is: Lucas…
-
0
votes1
answer670
viewsQ: How does the imagecreatetruecolor function work? PHP
It came in a part of the course that I am creating a helper for uploading images, and it has an exercise that I need to use imagecreatetruecolor, but I don’t quite understand what the official…
phpasked Lucas de Carvalho 6,427 -
4
votes2
answers362
viewsQ: Error in isset PHP
Error when using isset with new PHP methods: <?php require './fb.php'; if (isset(filter_input(INPUT_SESSION, "fb_access_token")) && !empty(filter_input(INPUT_SESSION,…
phpasked Lucas de Carvalho 6,427 -
1
votes2
answers451
viewsQ: Get which div was clicked correctly
I got some Ivs: <div class="filter__filters tamanho"></div> <div class="filter__filters preco"></div> <div class="filter__filters cor"></div> I’m trying to catch…
-
3
votes1
answer263
viewsQ: Picking up more than one element with Jquery/Javascript
Good morning! Could I get more than one element with Jquery? For example, I’m doing this in my code: if (!is992()) { $j('.filters .title--sm').click(function(){ $j('.filters__list').slideToggle(50);…
-
1
votes1
answer365
viewsQ: Function within function
These days, I asked a question here at Sopt and the boy answered me with a code, creating a function within another function, something simple, but I didn’t use it, and I started to implement.…
-
0
votes2
answers34
viewsQ: Use start and end parameters without using the middle ones. PHP
Good night! Imagine that I have a Function with some parameters set as null: public function Usuario($Nome = null, $Idade = null, $Sexo = null, $Email = null) { $this->Nome = (string) $Nome;…
-
0
votes2
answers74
viewsA: Receiving 2x emails from the form
When you send an email and continue on the same page, "giving an F5", the form will always send again, because the data sent by POST are stored, (You can take as example send something by GET and…
-
0
votes1
answer42
viewsQ: What does Javascript take as default?
Example, I have the window.location.href, the location.href, the document.location.href This second in the case, what will Javascript leave as default? Window? Default I say, I can use both the…
javascriptasked Lucas de Carvalho 6,427 -
1
votes3
answers641
viewsQ: Check if window load is false
When I give the command: $(window).load(function(){ console.log('Site totalmente carregado!'); }); Works correctly, the message on the console only appears when the window has been fully loaded. But…
-
1
votes2
answers226
viewsA: How to create a tabs menu like Stack Overflow
You can create with the Jquery slideToggle: <a title="Abre o Elemento 01" class="element--01" href="javascript:void(0)">Abrir Elemento 01</a> <a title="Abre o Elemento 02"…
-
0
votes1
answer152
viewsQ: Value of DEG CSS
How many px amounts to 1deg? In this case, if you have this conversion. Or in this case, how to work with it. deg in the case that we use in CSS Transform.…
cssasked Lucas de Carvalho 6,427 -
0
votes0
answers173
viewsQ: Modify in real time
I made a simple script with Jquery that changes some texts in select of sizes in a store: <select> <option value="">Escolha seu tamanho...</option> <option value="476" price="0"…
-
2
votes3
answers229
viewsA: Function within Jquery what is the execution order?
Wagner Fernando, another thing that was not informed, is that the function first can not have "-" (trace). It can be like this for example: gravaDados() And the <= also can not have space < =…
-
1
votes1
answer138
viewsQ: Always get the second read
Guys, I have some columns, made with ul li <ul> <li>1</li> <li>2</li> <li>1</li> <li>2</li> <li>1</li> <li>2</li>…
cssasked Lucas de Carvalho 6,427 -
3
votes1
answer9223
viewsQ: What does window.location.Reload do?
I have a question about window.location.reload(true). Him with the parameter true, really updates the site, downloading all the files again, without using the cache? Or just update the site…
javascriptasked Lucas de Carvalho 6,427 -
2
votes2
answers362
viewsA: Remove line break after each INSERT
Use strip_tags next to Trim, strip_tags will remove any html or php code from your file and Trim will remove the spaces from the beginning and the end. $voucher = explode("\n",$voucher); foreach…
-
5
votes1
answer533
viewsA: Uncaught Error: Call to Undefined Function
It is problem in concatenation (missing the point "."): $sql= mysqli_query ($conexao,"select * from usuario where email='."($_POST['email'])."' and senha='".($_POST['senha_usu'])."' limit 1") or…
-
2
votes1
answer8172
viewsQ: Icons do not appear - Font Awesome
The icons used from the awesome font do not appear on my site, it is just a few squares, I do not understand why. It’s like this topic: LINK As it was not solved, I posted again to ask for help.…
-
0
votes2
answers291
viewsA: How to manipulate image loaded by background: url();
Use the background-size: TAMANHO_AQUI; Change TAMANHO_AQUI to the size you want. But this is not advisable, and yes, your image be optimized already in some image editing program, for the size you…
-
2
votes0
answers29
viewsQ: Does Important CSS weigh the site?
I would like to know this... Put put I have a project here that is being needed to use, (really necessary.). Someone would have some answer for that: Making it clearer, I would like to know if the…