Posts by Adriano Luz • 1,023 points
51 posts
-
1
votes1
answer87
viewsQ: How to make a navbar with two logos?
I need to make a navbar that receives two Banks, one next to the other <nav class="navbar navbar-light navbar-expand-lg"> <div class="col-md-3 navbar-nav"> <a class="navbar-brand"…
-
-1
votes1
answer70
viewsQ: Is there any way to "dismember" an element child of a parent element?
I have the following situation in the destkop version of a template: <div class="bloco-pai"> ... <div class="bloco-filho"> </div> When the template is viewed on mobile I would like…
-
0
votes1
answer287
viewsQ: How to assemble a floating navbar layout in Bootstrap?
I was trying to make a layout with floating menu, as in the link below: https://demo.tagdiv.com/newspaper_nomad/ But whenever you try to set the absolute positioning on the navbar, to make it float…
htmlasked Adriano Luz 1,023 -
1
votes2
answers66
viewsQ: Select with Join does not return results
I have the following tables livro id int pk passador id int pk fk_livro_id int ordem int I am making a screen listing books. The goal is to bring all the books that are not registered in the dealer…
sqlasked Adriano Luz 1,023 -
0
votes1
answer34
viewsQ: How to apply the Hover effect to an element immediately before?
I have the following structure: <div> <img src="#"> <button>Teste</button> </div> <div> <img src="#"> <button>Teste</button> </div> I need…
-
0
votes1
answer976
viewsQ: How to use bootstrap push pull?
I have a template with the structure illustrated by the image below Searching in the documentation I saw that combining the classes col-*-push-* and col-*-pull-* it is possible to produce this…
-
2
votes2
answers89
viewsA: Does a large image hinder the performance of the application?
Remember that we no longer only develop for PC platform, give support for mobile phones and tablets is extremely important. The issue of images is an important topic of responsive design. Imagine…
-
2
votes2
answers174
viewsA: How do I create an alias to run multiple commands with git?
I was able to solve the problem using a Function and creating the alias by the console itself git config --global alias.upl '!func(){ git add -A && git commit -m "$1" && git push -q;…
-
6
votes2
answers174
viewsQ: How do I create an alias to run multiple commands with git?
I wonder how to create an alias for git that runs the following commands: git add (all modified files) git commit (including a message) git push I tried the following gitconfig setting: [alias] upl…
-
8
votes2
answers1898
viewsA: Perform function from the same class
to call a class function within itself you must use the operator $this class foo{ public function minhafuncao1(){ //... } public function minhafuncao2(){ $this->minhafuncao1(); } } Apparently you…
-
1
votes1
answer420
viewsA: Disable virtual keyboard Cipherlab 9700 Collector via PHP
I remember when I was in college, I had to develop a script for a cell phone. At the time almost all had physical keyboards, and the script had to do more or less the same thing. $('#no_keyboard…
-
5
votes3
answers714
viewsA: Is filter_var() sufficient to avoid SQL Injection?
Not filter_var() is useful for making some types of validations such as Is empty? Is numerical? Is it an IP? (among others) To avoid sql injectction use the function mysqli_real_escape() if you are…
-
0
votes3
answers69
viewsA: Loop of DIV’s in PHP
Just use the selector :first-child css. See the example below: .minha_div{ background-color:red; color:white; display:block; margin-top:5px; padding:2px; text-align:center; } .minha_div:first-child{…
-
0
votes2
answers48
viewsA: PHP session after Load()
just give a <?php session_start()?> on the page being loaded by load()
-
1
votes1
answer641
viewsA: Submit form in modal bootstrap window, and update window with submitted information
Considering that your page refreshes, in this case it is enough that the php file that processes the form returns a parameter to the page. You can do it two ways: Via $_GET or Via $_SESSION VIA…
-
3
votes1
answer233
viewsQ: How to group dates from an array?
I’ve got a job to do here and I don’t even know where to start: I have an array of dates to group: array (size=12)<br> 0 => string '2016-08-22' (length=10)<br> 1 => string…
-
3
votes4
answers3142
viewsA: How to protect an AJAX request?
An ajax request is as secure as a webform request. Both are HTTP requests and the difference between them is the possibility for ajax to carry out asynchronous submissions in addition to server…
-
1
votes2
answers109
viewsQ: Doubt about vertical and tableless alignment
Wikipedia defines tableless as: Tableless is a form of website development that does not use tables for content layout on the page suggested by W3C, as it argues that HTML codes should be used for…
htmlasked Adriano Luz 1,023 -
2
votes2
answers3019
viewsA: How to use "float: left" correctly?
FEIJAO WITH FLOAT RICE: To illustrate let’s then create a div wrap, it will be the parent element that will serve as reference to contain the floating elements. Inside this parent element we will…
-
2
votes2
answers99
viewsA: Problems with php Mailer
You need to define the following properties: $mail->SMTPDebug = 1; $mail->SMTPAuth = true; $mail->SMTPSecure = "ssl"; $mail->Port = 587; $mail->Username = '[email protected]';…
phpanswered Adriano Luz 1,023 -
1
votes2
answers1565
viewsA: Login to Postgresql and PHP
Connection: $host = "localhost"; $db = "base_postgres"; $user = "usuario"; $pass = "palavra_passe"; $banco = new PDO("pgsql:host=$host;dbname=$db;user=$user;password=$pass"); Performing an insert:…
-
1
votes2
answers44
viewsA: Automatic redirection of pages
Since it will be exposed, better use a Javascript to put a transition effect, redirect are not aesthetically legal. HTML <div class="wrap"></div> CSS * {padding:0;margin:0;} .wrap…
phpanswered Adriano Luz 1,023 -
5
votes6
answers6260
viewsA: How to determine if a number is power 2?
Divide the number by two until the rest of the division is less than or equal to 1 (use a loop for this) If the rest of the division is equal to 1 the number is power of 2 If the rest of the…
-
1
votes1
answer73
viewsQ: Is it possible to obtain multi-valued results in a group by?
I have 3 tables in the bank: Teacher, Student and Discipline. All of them have N:M relationships with each other. Then decide to gather all relationships in a single class table, which stores the…
databaseasked Adriano Luz 1,023 -
1
votes1
answer75
viewsQ: Bug with slide jquery effect
I am developing a button that when passing the mouse has a slideDown effect. I made an example of jsfiddle: https://jsfiddle.net/xmwrrom4/ When the mouse is passed once the expected effect is…
-
2
votes0
answers59
viewsQ: How to protect the application against unwanted requests?
I have an application for course management, in which several requests are made via ajax that are processed in the background: getListCurso(), findDisciplinaById(), deleteAluno(), etc. But anyone…
-
-2
votes3
answers1413
viewsA: How to check if a snippet of a string is in an array item
Let’s do the opposite, let’s check if one of the entries of the array exists in the reference variable, so any reference that contains facebook.com will be valid $array = "facebook.com, google.com,…
phpanswered Adriano Luz 1,023 -
4
votes3
answers3645
viewsA: Leave selected menu
I like to use javascript to do the service: $(document).ready(function(){ var get = document.URL; if(get.match(/main/i)){ $('.aw-menu li:eq(0)').addClass('is-selected'); } if(get.match(/cargo/i)){…
-
1
votes1
answer78
viewsQ: How to create more organized codes?
I’ve been developing with jquery for some time now and I can already create anything I propose to do with the language. But one thing has been bothering me for some time, is the organization of code…
jqueryasked Adriano Luz 1,023 -
0
votes1
answer239
viewsA: PHP upgrade in stock
You must generate the Names dynamically Create a variable and increment it with each iteration, so you can create field-1, field-2, field-3... ex: <?php $i = 1; echo '<form>';…
-
1
votes1
answer166
viewsQ: Check if an ID exists on a data-list
I’m doing an ajax crud where user chooses a result coming from a data-list to be added to a table(html). data-list <div class="list_details"> <ul> <li id="valor"><img…
-
2
votes1
answer137
viewsQ: Data loss in session
I’m making a form with steps in Ajax. The idea is to each step take the form data, play an array and store the array in the session, so I can manipulate all the data in the last step: Ajax…
-
0
votes2
answers71
viewsA: Select from all companies that have catalogues
SELECT e.id FROM tbl_empresa AS e INNER JOIN tbl_catalogo AS c ON e.id = c.tbl_empresa_id
-
1
votes2
answers1988
viewsA: Authenticated PHP Mailer Sending using Gmail
Almost sure Google is limiting access to email Go to the page below and check if less secure applications are free for the account in question https://www.google.com/settings/security/lesssecureapps…
-
4
votes1
answer423
viewsA: How to use ajax to select Where
I’m at the exact moment making a similar code As you have never seen ajax before I will make a bean with ajax rice commented: AJAX PAGE: // Coloque um evento para um grupo de elementos que você…
-
0
votes2
answers457
viewsA: Problem entering data into BD with PDO
to execute a method of a parent class use the operator parent $stmt = parent::prepare($sql);
-
0
votes0
answers39
viewsQ: How to unescape with jquery?
I’m putting together a page with ajax, she has a registration modal I have a form that is in the file novo.php and I need to do his include inside the modal. The modal is created the moment the user…
-
0
votes1
answer41
viewsQ: Configure localhost to display header sending warnings
I would like to configure apache on my localhost so I can view the header sending warnings. Warning: Cannot Modify header information - headers already sent by... It is very common to develop the…
phpasked Adriano Luz 1,023 -
2
votes1
answer424
viewsA: Session values do not appear
Whenever you are ordering some session data you should give one session_start() before. Ex: session_start(); if(!isset($_SESSION['user'])){ header("Location:index.php?error=denied"); } Whatever you…
phpanswered Adriano Luz 1,023 -
1
votes2
answers356
viewsQ: Make a Jquery script to run only on mobile phones
I can’t post the code now, so I’ll be as clear as I can. I’m making a website on that standard single page, where every session of the site has the exact screen size. This is done via Jquery(that…
-
0
votes2
answers1057
viewsA: Improve code to only get value from localstorage
You can create a input of the kind hidden and receive the form data as POST. <input type="hidden" value="valor" name="accent_color" id="accent_color"> Then just create a script to make the…
-
1
votes1
answer155
viewsA: php Fatal error: Cannot use Object PHPMAILER of type as array
Change the line: $mail['smtp_port'] = 465; for $mail->port = 465 Remember to log in to google and go to the page: https://www.google.com/settings/security/lesssecureapps And ensure phpmailer…
-
3
votes1
answer5744
viewsQ: Return error message for queries in PHP database
Is there any way to receive error messages from the database when trying to execute a Query with PHP PDO? I’ve tried to get one try catch in the method ->execute() but the class PDOException…
-
1
votes1
answer1888
viewsQ: Problem with postgres database connection in php
I’m making a connection to bank postgres but there’s been an error I can’t determine, following the codes: Config.php: define('DB','sistema_postgres'); define('HOST','localhost');…
-
4
votes5
answers1538
viewsQ: How to run an event once?
How to make an event to be triggered once? <div> <span class="oi"> OI </span> </div> $('.oi').mouseenter(function(){ alert('OLÁ'); }); This is just a simple example.…
jqueryasked Adriano Luz 1,023 -
0
votes2
answers884
viewsQ: How to stretch an element to the end of the screen?
How to stretch an element to the bottom of the page taking into account the position it is in? ex: <div class="caixa1">CAIXA 1</div> <div class="caixa2">CAIXA 2</div>…
-
1
votes3
answers3722
viewsQ: How to extend a DIV to the end of the screen?
Well I created a main div to hold all the elements of the page. Inside it I have 3 others divs: 1 menu bar, 1 sidebar, 1 content area. HTML: <div class="principal"> <div…
-
0
votes2
answers555
viewsQ: Controller pulling database data from wrong place
I have the application properly configured and running normally. But one detail is jamming. This is my file . env: APP_ENV=local APP_DEBUG=true APP_KEY=9FaEj6iJCBur1favtWQ88b8m1anbGbzP…
-
2
votes1
answer101
viewsQ: Android/IOS vs Java
Suppose I have an android or Ios app I have a system made in java ee to publish data that will be downloaded from the internet by the application. All this is inside a web server How do I…
-
1
votes1
answer570
viewsQ: Block events with jquery
I have been for some time searching the jquery documentation for a function with the following behavior Suppose we have two buttons on the screen each with a different click event:…