Posts by buback • 996 points
39 posts
-
2
votes3
answers434
viewsA: Error converting php data
I had similar problem, I solved so: $data = implode('-', array_reverse(explode('/', $data)));
-
0
votes2
answers713
viewsQ: Problem leaving active link - Angular Routes 2
I’m having trouble adding the class to my active page link. It works on all pages, but the index is always active. For example: if I am on the application page, the two links are active. Menu:…
-
4
votes4
answers832
viewsQ: Create layout for PHP and . NET applications
Work in a public body and we have numerous web applications in PHP and .NET. I’m working on a standard layout so we can maintain visual identity across all systems. Is there any way…
-
1
votes4
answers8543
viewsA: Ordering an array of objects by date
I used it once: function date_compare($a, $b) { $t1 = strtotime($a['datetime']); $t2 = strtotime($b['datetime']); return $t1 - $t2; } usort($array, 'date_compare'); usort - Sorts an array of values…
javascriptanswered buback 996 -
3
votes2
answers939
viewsQ: Query returns empty using PHP with PDO and MS Sqlserver
I’m migrating a system made in ASP to PHP. However, I’m having trouble making a query using PDO: Search.php class Busca extends Conexao { private $termo; public function setTermo($termo) {…
-
0
votes2
answers501
viewsA: Send data to sidebar.blade.php only
I decided using the Service Injection of Laravel 5.1. In my sidebar.blade.php added: @inject('categorias', 'App\Categoria') @foreach($categorias->listar() as $categoria) <li>{{…
-
2
votes1
answer756
views -
1
votes2
answers501
viewsQ: Send data to sidebar.blade.php only
I need to build a menu using the registered categories. How can I do this without using a view? I have my layout.blade.php with a @include('sidebar') My consultation works on view…
-
4
votes2
answers1455
viewsA: Load remote content into a Twitter Bootstrap modal
I use it here and it works normally. Just follow my code: Modal call: <a href="modal.html" class="btn btn-info btn-xs" data-toggle="modal" data-target="#meuModal"><i class="fa…
-
0
votes1
answer856
viewsQ: Filter a query using an attribute in Laravel
I have, briefly, the following structure:: Suppliers: id | cnpj | razao_social | endereco_id People: id | nome | tipo_pessoa | fornecedor_id Addressee: id | logradouro | cep Model - Supplier: public…
-
0
votes1
answer1897
viewsA: How to align all the elements of a form in the center?
Place in the fields you want to center: margin: 0 auto; Take a look at the example: » Jsfiddle…
-
1
votes1
answer609
viewsQ: Relationship N:N in Laravel does not record object attributes
My tables have, briefly, the following structure: minutes: id | vigencia products: id | nome | descricao ata_produto: ata_id | produto_id | vlr_produto | qtd_produto The same product may have…
-
0
votes1
answer125
viewsA: Problem with slideshow css
Correct the slide percentage. 75% + 50% is 125%. Use float: left in all elements. .slide-1{ width:75%; height:505px; float:left; } .slide-2{ width:25%; height:250px; float:left; } .slide-3{…
-
0
votes2
answers425
viewsA: Problem with accentuation in . js after Concat and uglify in Gulp
After several attempts, the only one that worked was converting each file to UTF8 before doing Concat and Minify. All accents worked correctly.
-
3
votes2
answers2912
viewsA: Write to two different tables using the same View
Solved: Within the method store() from Vendorcontroller I separated the fields for each table instead of using $request->all(). Vendorcontroller: public function store(Request $request) {…
-
2
votes2
answers2912
viewsQ: Write to two different tables using the same View
I am registering suppliers, and I need to record it in a table and your address in another. I use a single view suppliers. to fill in all the data. How can I separate this data to save it to their…
-
0
votes3
answers1872
viewsA: Error running Composer update while trying to install package scafold in Laravel 5.1
Try to clear the cache: $ composer clearcache
-
0
votes1
answer112
viewsA: Redirect URL to htaccess file
I found this topic because it was with a similar problem. For me it solved like this: Redirect 301 /pasta /arquivo.asp
-
0
votes3
answers1386
viewsA: Uncaught Exception Pdoexception error with message 'SQLSTATE[HY000]: General error: 2014
Try it like this: $conn->exec('SET @orderA := 0; SET @orderB := 0;'); $conn->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY,true); $q = $conn->prepare(" SELECT id, voz FROM ( SELECT id,…
-
5
votes1
answer775
viewsQ: Catch event click inside iframe with jQuery
I’m using the Google Forms to do a satisfaction survey on a site. On this site I show a bar at the top, asking the user to participate. If he closes the message, a cookie is saved that expires in 24…
-
7
votes2
answers29844
viewsA: Convert date to dd/MM/yyyy ORACLE
Try it like this: SELECT TO_DATE(TO_CHAR(sysdate, 'DD/MM/YYYY'), 'DD/MM/YYYY') AS data_formatada FROM tabela
-
10
votes2
answers2727
views -
0
votes2
answers727
viewsA: How to display a hidden CSS select using Javascript
If I may use Jquery, I think it works that way: $('#temas').change(function () { if($('#temas option:selected').val() == 'infantil') { $('#infantil').show(); } }); And would put id="infantil", in…
-
1
votes2
answers21648
viewsA: Image alignment with CSS
To align vertically: HTML: <div id="clientes"> <h1>Clientes</h1> <div class="clientes-logo"> <img src="http://blog.grio.com/wp-content/uploads/2012/09/stackoverflow.png"…
-
2
votes1
answer160
viewsA: CSS + Bootstrap Alignment
The example repeats a column for each image. Each image must be inside a div with col-Md-*: <div class="row"> <div class="col-xs-6 col-md-3"> <a href="#" class="thumbnail"> <img…
-
2
votes5
answers3537
viewsA: Make div disappear
Or in the CSS: <div id="panel" style="visibility:hidden;"></div> or #panel { visibility:hidden; } It just doesn’t make a lot of sense, or I didn’t get it right.…
-
2
votes4
answers1123
viewsA: Next record. PHP + Mysql
As already reported in the previous quote, these are not the best ways to do this. The above example does what you asked for, besides it, as you commented on the while: $i = 1; while ($i <= 10){…
-
5
votes2
answers43
viewsA: What’s the best way to post this echo?
You must concatenate and not repeat echo. <?php echo '<a href="page.php"><em>' . $locale->translate('ID') . '</em></a>'; ?>
-
3
votes2
answers1412
viewsQ: List Tree Categories in Laravel 5.1
I’m starting with Laravel 5.1 and I’m a little lost yet. I need to list categories, subcategories and "sub-subcategories". Table: Categorias ------------------------ id | int nome | varchar…
-
1
votes3
answers96
viewsA: Doubt how to use a Less class with RAZOR
Try the following: .tamanhoColuna(@x){ min-width: @x; } <p class="tamanhoColuna(@x: 200px)"> Teste :D </p>
-
3
votes2
answers425
viewsQ: Problem with accentuation in . js after Concat and uglify in Gulp
I’m trying to optimize the organ site where I work and I’m facing problems after concatenating and minifying the Avascripts. Our Apache server uses ISO-8859-1 and all my files in Phpstorm are…
-
1
votes1
answer253
viewsA: How to use jquery variable value
The variable was missing. Try the following: var id_pais = $('#endUF option[value=' + id_pais + ']').text(); $('#endUF option[value=' + id_pais + ']').remove(); $('#endPAIS option[value=' + id_pais…
-
1
votes1
answer430
viewsA: jQuery, how to change the z-index of datepicker
Use the! Important in the z-index of the desired element. So it ignores if there is another value previously defined. #ui-datepicker { z-index:999 !important; }
-
4
votes4
answers3288
viewsA: Select with redirection
Or if you want to use jQuery: <select id="selecao"> <option value="http://www.exemplo.com.br">Opção 1</option> <option value="http://www.exemplo.com.br">Opção…
-
4
votes4
answers6129
viewsA: Grab <a> tag link with javascript. For active menu script
Try it like this: document.getElementById("seuID").href; or document.getElementById("seuID").getAttribute("href"); In your case: var tag_li = document.getElementById('lista_menu'); var tag_a =…
-
2
votes0
answers808
viewsQ: Composer SSL3_GET_SERVER_CERTIFICATE:Certificate Verify failed
I work in a public body and here the access is very restricted. I have been facing problems when trying to run "Composer install" or "Composer update", this also goes for pro NPM or Bower. Follow…
-
3
votes2
answers101
viewsA: Status in the news system
If the status is in the news table, use WHERE in SQL: $news8 = mysql_query("SELECT * FROM 10cms_noticias WHERE status = 'ativo' ORDER BY ID DESC LIMIT 8") or die(mysql_error());…
-
0
votes1
answer64
viewsA: The Site disagrees on the responsive
Instead of placing the border on the element with col-Md-6, it creates another one inside. Ex: <div class="col-md-6"> <div style="border:1px solid #cor;">Lorem ipsum</div>…
-
0
votes1
answer532
viewsQ: Default field to select in Illuminate/html
I have a problem and I have already searched the internet for the solution. Unsuccessful! I have a form and inside it, a select filled automatically: {!! Form::select('categoria_id', $categorias,…