Posts by Eduardo Silva • 3,449 points
77 posts
-
1
votes3
answers751
viewsQ: Send email with dynamic content in PHP
I have a template .html email with +- 700 lines (created on Mailchimp) and need to insert some recovered database values into it (something similar to what the Velocity makes) before sending to the…
-
7
votes2
answers7305
viewsA: How to compress images in PHP?
You can test the quality loss using the PHP GD and see if it fits, you can also do this procedure while uploading the image: function compressImage($source_path, $destination_path, $quality) { $info…
phpanswered Eduardo Silva 3,449 -
1
votes1
answer1038
viewsA: Tela Responsivas
Always follow the conventions on Android best coding practices, they were taken for a reason and you don’t need to reinvent the wheel, that’s certainly the best attitude you can take. Speaking…
-
2
votes2
answers99
viewsA: Keep only the last 3 backup files
What you’re going to have to do is basically the following: Fetch all files from the directory and save them in one array using readdir. Treat the name of the searched files and use usort to…
phpanswered Eduardo Silva 3,449 -
5
votes1
answer1765
viewsQ: Position arrow from a dropdown menu correctly
I added an arrow to my dropdown menus from Bootstrap 3, but I’m having trouble positioning Arrow correctly below the dropdown-toggle, below is a demo image: On the left is my current scenario, with…
-
2
votes2
answers78
viewsA: Update photo counter instantly
You can assemble a code structure using the jQuery method on and ajax: HTML: <img id="img-id" class="img-class" src="img/imagem.jpg" alt="Minha imagem" /> Javascript:…
phpanswered Eduardo Silva 3,449 -
3
votes1
answer301
viewsA: javascript does not take form attributes
Your code has some structuring problems, and basically your error is in this excerpt var alturaJS = document.getElementById("altura").getAttribute('altura'); var pesoJS =…
-
1
votes6
answers1754
viewsA: Hide dives after selecting another category
You can ride a select with the values of div you want to display and then use the jQuery functions on() and each() to verify which the value selected and show the div with even id of the selected…
-
2
votes2
answers228
viewsA: Mobile site content with jQuery click
You can play this effect using only CSS, this is called off-canvas. First let’s tidy up your HTML: <ul class="conteudo"> <li class="nav-item"><a href="#">Página…
-
17
votes2
answers15531
viewsA: How to find the version of Laravel installed in my project?
If you run the command php artisan --version in his CLI he will show the version of his Laravel. Or else you can open the file vendor\laravel\framework\src\Illuminate\Foundation\Application.php, you…
-
1
votes1
answer170
viewsA: Follow users php mysql system
You’ll need a relationship Many-to-Many basic in your bank (a user can be followed by 0-n users, and can follow 0-n users). Basically, you will need a table that stores the follower and the…
-
1
votes1
answer1466
viewsA: How to increase emulator memory?
You can do this by editing the file C:\Users\<user>\.android\avd\<avd-profile-name>.avd\config.ini for Windows or ~/.android/avd/<avd-profile-name>.avd/config.ini to Ubuntu. Modify…
androidanswered Eduardo Silva 3,449 -
2
votes1
answer1378
viewsQ: Change navbar style with scroll
I’ve been looking for a way to make a navbar bootstrap 3 has a behavior similar to Google+ navbar, when scrolling down it gets smaller and displays in place of menus with icon and title only menus…
-
25
votes7
answers2649
viewsA: Should people’s names be stored in two or just one column?
In theory, knowing the culture name pattern that most users of your system are part of will make things much easier, since it will look closer to what they are used to. But this could also present…
-
2
votes1
answer265
viewsA: Run a PHP Pagination with Jquery
You can use the event .scroll() in his window, sort of like this: $(window).scroll(function() { if( $(window).scrollTop() + $(window).height() == $(document).height() ) { var url = document.URL; var…
-
0
votes3
answers98
viewsA: Search by selection field
I couldn’t test, but you’ll need to do something like this with AJAX: $('#select-categoria').on('change', function (e) { var selecionado = $("option:selected", this); var categoria =…
-
3
votes2
answers1093
viewsQ: How to assemble logic to read 2 files, compare them and extract values not found
I have 2 files .txt, one of them is a correct list of cities (contain all the cities of the country, written correctly) and the other, also a list of cities but with some wrong data (this list…
-
1
votes2
answers1117
viewsA: Take URL link and modify CSS
Using the code you posted, I was able to apply the display: block in div with the following jQuery: $( "a[href='/pt/page/investidores']" ).find( ".flechaSubmenu" ).css( "display", "block" );…
-
1
votes1
answer815
viewsA: Returning null when trying to display an image in p:graphicImage of Primefaces
Try to get using 2 Returns, one with a stub of StreamedContent and another with the true image. public StreamedContent getImage(String descricao) throws IOException { FacesContext context =…
-
2
votes3
answers8700
viewsA: Tag <a href> without changing the location bar
You probably want to use a link to change a certain part of the page or some action without adding the www.site.com/index.html# right? You can do this in several ways, one of them, although it’s not…
-
3
votes1
answer1301
viewsA: PHP generate confirmation Pop-Up
You can do this using AJAX in a simple way. Considering the following form: <form id="form-register"> <label for="inp-nome">Nome:</label> <input type="text" id="inp-nome" />…
-
4
votes2
answers6186
viewsA: Function equivalent to "DISTINCT ON" in Oracle BD?
With the help of the @Guilherme Nascimento I managed to assemble the SELECT correctly: SELECT DISTINCT CITY || ';' || FIRST_VALUE(STATE) OVER (PARTITION BY CITY) || ';' || FIRST_VALUE(ZIPCODE) OVER…
-
7
votes2
answers6186
viewsQ: Function equivalent to "DISTINCT ON" in Oracle BD?
In Postgres, you can make distinct apply to only 1 select field using the DISTINC ON, how can I reproduce this function in an Oracle database? Follow an example query: SELECT DISTINCT ON (CITY)…
-
1
votes3
answers245
viewsA: Programmer of Windows Tasks
You can make an event by calling a batch, in this batch you control the behavior: taskkill /f /im chrome.exe >nul 2>nul start "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"…
-
4
votes1
answer182
viewsA: How to return the total value of items in a table?
How are you trying to fetch? Here’s a simple code from a COUNT(*) using Mysqli. $db = new mysqli('localhost', 'usuario', 'senha', 'easycontrol'); if ($db->connect_errno > 0){ die('Impossível…
-
2
votes1
answer290
viewsA: Limit div html
If I understand your question correctly, consider the following Ivs: <div class="um"> <div class="dois"> asdf<br /> asdf<br /> asdf<br /> ... </div> </div>…
-
0
votes2
answers1260
viewsA: Changing a variable’s value with a PHP check box
Here is the code of the index.php page I did for testing, I used only php, html and jquery: <?php // Código php pra dar a resposta do ajax // Se o get for setado (se o checkbox for marcado) if…
phpanswered Eduardo Silva 3,449