Posts by Diego Souza • 16,524 points
642 posts
-
1
votes2
answers411
viewsA: Center div inside scroll
You can use jQuery or JS pure to do this. In case I used jQuery to take the size of the element .content. So I split it two ways to get halfway through div.srcoll. The biggest problem is that we…
-
2
votes1
answer185
viewsA: ENTER key save table instead of spacing
Puts in the TD one onkeydown calling the same parameters as the onblur. onKeyDown="checkEnter(event, this,'question','<?php echo $faq[$k]["id"]; ?>')" But calling the function below: function…
-
2
votes1
answer146
viewsA: Open div via ajax
HTML <div class="row"> <div id="retorno_galeria"> <a onclick="galeria_id(this.id)" id="<?=$gal["id"]; ?>" href="#"> LINK </a> </div> </div> JS function…
-
5
votes1
answer258
viewsA: Check Old Jquery’s Winning Game
var vez = 1; var vencedor = ""; $(document).ready(function() { function casasIguais(a, b, c) { var casaA =…
jqueryanswered Diego Souza 16,524 -
13
votes2
answers256
viewsA: How to print only the first 5 characters?
One can use the ch .limit { max-width: 5.8ch; overflow: hidden; white-space: nowrap; } <div class="limit">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cum deserunt ad repellendus…
-
5
votes6
answers29816
viewsA: How to create space before or at the end of the text contained between html tags?
You can use the text-indent. .indent { text-indent: 50px; display: inline-block; } <div>Texto 1 <span class="indent">texto que quero um espaço antes</span></div>…
htmlanswered Diego Souza 16,524 -
2
votes1
answer39
viewsA: Help with misaligned flexbox footer
First, your tag: <a href="#contato"> </a> is missing a > Second, your class .footer-infos it has to be like this: display:flex; flex-direction:column;…
-
1
votes2
answers765
viewsA: Hiding entire column with CSS at a specific resolution
Hiding only the third column from 568px. Using the :nth-child(X) you can put the number of the column you want to hide. table tr td { border: 1px solid #000; } @media screen and (min-width: 568px) {…
cssanswered Diego Souza 16,524 -
8
votes3
answers228
viewsA: What is the default value for the "resize" attribute in a textarea?
The default value is: auto. resize: auto; How do we know this ? We can see in user agent stylesheet browser. textarea { -webkit-appearance: textarea; background-color: white; -webkit-rtl-ordering:…
-
3
votes1
answer66
viewsA: Field filling
I can give you a path like this. Imagine you have the HTML fields on the page and the list of registrations, with a class called numero_matricula. HTML <li id="mat123"…
phpanswered Diego Souza 16,524 -
1
votes1
answer192
viewsA: Jquery/Ajax Duplicating
You are causing this. First you click on the button and run the function: AlterarSenhaExpirada(), as is in the onClick. <input type="button" id="btnabrir" name="btnabrir" value="Alterar"…
-
5
votes2
answers228
viewsA: What’s wrong? BD + Laravel
You can use the if in blade. By doing so you check if the field is filled. He’s setting this date because of the function date() PHP. Since he has nothing, he puts this. <th> <a href="{{…
-
0
votes3
answers2856
viewsA: What can cause file_get_contents to give "timeout" error?
$streamContext = stream_context_create(array( 'http' => array( 'method' => 'GET', 'timeout' => 30 ) )); Where the key timeout is in seconds. Afterward:…
-
-1
votes5
answers1818
viewsA: Group records per day
You can use the SUM and the DAY and the MONTH to catch only the day for each month. SELECT ID, DAY (INICIO) AS DIA, MONTH (INICIO) AS MES, SUM(HORAS) AS HORAS FROM TABELA GROUP BY DAY (INICIO),…
-
2
votes2
answers548
viewsA: Navbar scrollbar does not appear on another width
@media (max-width: 991px) { .navbar{ overflow: auto; } .navbar-toggle { display: block; } …
-
4
votes3
answers458
viewsA: Search between Jquery columns
You can do it using the :contains. $(".search").keyup(function () { var data = this.value.split(" "); var table = $("#table").find("tr"); if (this.value == "") { table.show(); return; }…
-
3
votes2
answers2598
viewsA: How to Insert Taking Data from FORM in Laravel 5.2?
Controller: $model = new Model; $model->nome = $request->get('nome'); // Vem do Form $model->email = $request->get('email'); // Vem do Form $model->telefone =…
-
3
votes2
answers141
viewsA: Sort Mysql results using two tables
Use the COUNT with the GROUP BY. I don’t know your structure, but that’s what you have to do. SELECT IFNULL(COUNT(COMENTARIOS.ID), 0) AS QUANTIDADE_COMENTARIOS FROM COMENTARIOS GROUP BY ID_TOPICO…
-
3
votes1
answer714
viewsA: How to validate at least one mandatory field?
One can use the required_without or required_without_all. [ 'Cpf' => 'required_without:Cnpj', 'Cnpj' => 'required_without:Cpf', ]…
-
9
votes4
answers62720
viewsA: How to style a "file" input?
$('.btn').on('click', function() { $('.arquivo').trigger('click'); }); $('.arquivo').on('change', function() { var fileName =…
-
2
votes1
answer512
viewsA: How to pass two variables from a view to the controller?
You can do it in many ways. <a href="{ {url("/ordemvar/$equipam->codigoequipamento/$equipam->nome") }}"> Link </a> See that above has two slugs bar separated. So your controller…
-
2
votes3
answers72
viewsA: Javascript Doubt ( Loopin through an array using a for loop )
Scrolls through the object’s list of items myObj, in the index cars. When you put .length is counting the number of items. In this case there are 3. Lists an item of cars each time, and jumps line.…
javascriptanswered Diego Souza 16,524 -
2
votes2
answers3168
viewsA: How does the history Javascript object work?
According to the W3C the method history has access to all browser history. Definition and Usage The back() method loads the Previous URL in the history list. The method back() load previous history…
javascriptanswered Diego Souza 16,524 -
2
votes2
answers92
viewsA: Date calculations in the query
SELECT DATEDIFF(data_operacao, NOW()) AS Diferenca_Dias FROM Tabela Hence in the language you are using you do the check. If the result you gave is greater than 3 is late.…
-
6
votes1
answer43
viewsA: I calculate with Javascript inputs
Missed the .val() in the end function IBUTG() { $tt = parseFloat($('[name=tempo_trabalho]').val()); $vt = parseFloat($('[name=valor_ibutg_trabalho]').val()); $td =…
javascriptanswered Diego Souza 16,524 -
1
votes1
answer791
viewsA: I calculate in javascript without refreshing the page
Puts a return false; in the last line of the script, so it runs the script. Maybe you have a <form> there and he understands the button as submit. document.getElementById("btn").onclick =…
-
0
votes1
answer80
viewsA: background image on one page
With the menu on the right and then on the left. With the background images. $(document).ready(function() { $('header a').click(function() { var section = $(this).attr('href'); var speed = 750;…
-
1
votes2
answers99
viewsA: Images in Divs
You can use the overflow: hidden the element surrounding the image so that the image stays within the established limits. And in the image you can subtract the margins 50% (half of 100%), above and…
-
3
votes1
answer544
viewsA: Export array within a table?
You can use the foreach to list the results in HTML. In the PHP function you can join the ID with the Name in the same Array, by using the variable $i of for. PHP <?php function imprimir_Tbl($Id,…
-
2
votes2
answers247
viewsA: Send parameter from one route to another
return redirect()->route('exams')->with(['message' => $message]); If it is configured in the Routes file an action for the link exams, will work. <div class="row text-success…
-
3
votes3
answers449
viewsA: Alignment of text vertically
Just take the CSS. #carrossel-principal { position: relative; height: 100%; overflow-y: hidden; } #carrossel-principal .item { position: relative; } .carousel-caption { font-family: "Open Sans",…
-
2
votes1
answer114
viewsA: Close menu by clicking another
Add this to your code above the code: $('ul.list-submenu').slideUp(); // Essa linha $(this).find('ul').slideToggle();
jqueryanswered Diego Souza 16,524 -
2
votes3
answers238
viewsA: I can’t center the text
Puts in the ul that: padding: 0; list-style: none;
cssanswered Diego Souza 16,524 -
0
votes1
answer693
viewsA: Artisan Command Calling Controller
It seems that for some reason Command was not accessing my Controller. So I did using Service Provider. I created a Prior called Cronprovider: Cronprovider public function boot(){ } public function…
-
5
votes4
answers257
viewsA: Grab link on date and play on src from img on Hover
$(document).ready(function() { $('.img-hover-out').on('mouseover', function() { var dataSrc = $(this).data('hover'); $(this).attr('src',…
-
0
votes1
answer693
viewsQ: Artisan Command Calling Controller
I did a job on a Controller and created a Command in the Artisan to run this function. Follows: Controller <?php namespace App\Http\Controllers; use App\Http\Requests; use App\EmpresaRating; use…
-
0
votes1
answer735
viewsA: Help to pass values from the table inside php via form
Personally I don’t know what you want to do with it, but there’s a solution below. The name of your field hidden is incorrect. There can be no spaces. Have a look. PHP <?php $array_dados =…
phpanswered Diego Souza 16,524 -
4
votes1
answer45
viewsA: Problem with mouse over in image
#user { position: relative; } #user #nav_menu { position: absolute; left: 100px; top: 0; background-color:…
-
1
votes2
answers1724
viewsA: Centralize items of a DIV
You can use the calc CSS to calculate column size. width: calc(100% / 3); /* Altera aqui */ min-width: 30%; /* Tira isso */ max-width: 30%; /* Tira isso */…
-
2
votes1
answer215
viewsA: Validating routes in Lumen
Do so according to the Documentation. $app->get('/produtos/mostra/{id:[0-9]+}', 'ProdutoController@mostra');…
-
0
votes1
answer235
viewsA: Get authenticated user in constructor
Try something like that: class AdminPanelController extends Controller { protected $_authUser; public function __construct() { $this->middleware([$this, 'getAuthUserFromMiddleware']); } public…
laravel-5.3answered Diego Souza 16,524 -
3
votes1
answer43
viewsA: How to create a textarea autorisize with js?
Response taken from: Stackoverflow English var observe; if (window.attachEvent) { observe = function(element, event, handler) { element.attachEvent('on' + event, handler); }; } else { observe =…
-
0
votes1
answer634
viewsA: Load a Combobox with Selected Value
It would be nice for you to install the Laravel Collective. You will have access to class Form. Example of combobox filled with database data: Controller $users = User::orderBy('nome') ->get()…
-
0
votes3
answers34
viewsA: Line up and put div on the other
I don’t understand so well what you need, but it follows something I did thinking about what I understood. I did with float:right and left. $(document).ready(function() { // Abre Sidenav…
-
3
votes3
answers1464
viewsA: How to change the text of a link after clicked?
window.onload = function() { var el = document.getElementsByClassName('texto')[0]; var btn = document.getElementById("read-more"); …
-
2
votes2
answers3232
viewsA: check amount of php character
Use the strlen(): $string = "Teste de Contador"; $contString = strlen($string); if ($contString > 3) { echo "Tem mais de 3 Caracteres"; } else { echo "Essa string tem $contString caracteres."; }…
phpanswered Diego Souza 16,524 -
1
votes3
answers310
viewsA: Add variables to Auth 4.2
Missed the return. public function empresa() { return $this->belongsTo('Ewempresa', 'empresa_id'); } echo Auth::user()->empresa->morada_fiscal;…
-
2
votes1
answer264
viewsA: Dropdown div menu with different width in browsers
The problem is in the position of your menu. You don’t have a parent to handle the submenu. So it looks different in each browser. I redid your menu: .header-menu { float: left; height: 60px; width:…
-
2
votes1
answer521
viewsA: work with value in google maps
Thus ? <html> <head> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript">…
-
1
votes1
answer9732
viewsA: How to Remove Fatal error: Uncaught Error: Class
You need to include the class in the file. <?php require 'caminho_do_arquivo/cRelatorios.class.php'; function RetornaAtualizacoes($etor,$host,$month){