Posts by Diego Souza • 16,524 points
642 posts
-
2
votes1
answer34
viewsA: Function in javascript
Specifies the file type as text/javascript. <script type="text/javascript" src="js/somar.js"></script> And put before closing the tag </body>. An example using the <select>.…
javascriptanswered Diego Souza 16,524 -
3
votes3
answers415
viewsA: I want to test my test site on my tablet and wanted to know how
Type the IP of your machine. MAC If yes, go to System and Network Preferences. See your IP. Type the IP in the browser address bar on the tablet. http://192.168. 1.4/sitename Windows Enter CMD…
htmlanswered Diego Souza 16,524 -
1
votes2
answers1832
viewsA: How to make an image responsive without using frameworks?
img{ width: 100%; max-width: 300px; /* coloque aqui o tamanho real da imagem em px */ } So the image will suit your box, but your box should also be 100%. Example: <div style="width: 100%">…
-
2
votes2
answers759
viewsA: Add a 'Pointer' arrow in Tooltip effect
You can use a pseudo-element, like the before. http://jsfiddle.net/13s7j1kd/2/ a.tooltip { position: relative; padding: 0; color: #000000; text-decoration: none; border-bottom: 1px dotted #133783;…
-
0
votes2
answers2151
viewsA: Publish Laravel 5 in a subfolder
Daniel, selects all folders, files and places inside the admin folder. The Laravel it’s like your website. Look in the image below. Select everything you have in this directory and put inside your…
laravelanswered Diego Souza 16,524 -
0
votes2
answers2029
viewsQ: Next and Prev Arrows in Slider
I’m trying to change the image using the arrows NEXT and PREV. HTML <div id="imagem-galeria"> {!! Html::image('img/quem-somos/galeria/foto-grande-1.jpg', 'Peças Colhedora de Cana', ['class'…
-
0
votes2
answers235
viewsA: How to Leave Element LI 100%
I got. I put in the ul the property: display: table. Why the li was already display: inline-block.
-
3
votes2
answers235
viewsQ: How to Leave Element LI 100%
The photo above represents a slider I’m doing on a page. Each slider has an image in the middle representing the white sphere. I want all the sliders that are formed by a li are the same size, the…
-
2
votes4
answers231
viewsA: Jquery find in tree
It can be like that too. $('div.pai').find('.filho').siblings('.filho'); Search in the tree the .filho(s) and takes only the first-degree.
-
5
votes1
answer790
viewsA: how to align radios inputs in bootstrap?
I edited your code, see if it applies to your need: http://jsfiddle.net/96ra0n8h/2/ I updated the code above. Note media query I created for devices or screens above 768px. This CSS code can put on…
-
1
votes1
answer142
viewsA: In IE the code works and in Chrome it doesn’t
Is the eval() the problem. Exchange for document.getElementsByName(pCodigo)[0].value
javascriptanswered Diego Souza 16,524 -
1
votes1
answer451
viewsQ: Animation in SVG image - Auto Drawing
I created a vector in Illustrator and saved it in .svg - this is the present and future of images. And I got the code on svg of the picture and put on the website. I want to make an animation with…
-
4
votes3
answers9083
viewsA: Enable and disable a form edit button - with PHP
If according to your query you ask if the status is equal to 2. So, just do a check asking if you returned any records ( > 0 ). If yes, it shows the disabled button, disabled. <?php $sqlstatus…
-
2
votes2
answers143
viewsA: Translate site that is already developed
You can use a file that contains a array() containing the content in the respective languages. Example $varArray = [ 'pt' => [ 'titulo' => 'Produtos', ]; 'en' => [ 'titulo' =>…
phpanswered Diego Souza 16,524 -
1
votes1
answer86
viewsQ: Sync CSS Animation - Two Objects in a Row
Look at this image above. I’m trying to get these two objects to start from the right and go to the left until they disappear from the screen. I want one to stay behind the other, without knocking,…
-
1
votes2
answers501
viewsA: Send data to sidebar.blade.php only
See the code below. On the line of return use with, to say that you will load the page with the list of categories. You do withCategorias. Categories is the name you will use on foreach in Blade.…
-
6
votes2
answers336
viewsA: Is the Apache server required in hosting services?
Your hosting provider is already equipped with everything. It is independent of your machine. The XAMPP is used to run websites locally, on your machine. The XAMPP is a testing environment among…
-
0
votes2
answers463
viewsA: Change pagination HTML in Laravel 5.1
Open the tab containing the pagination. Open the Inspect Element of Chrome or another browser you use and inspect the elements that mount pagination. Altere via CSS.…
laravel-5answered Diego Souza 16,524 -
7
votes1
answer5078
viewsA: Configure page headers with DOMPDF
Ready. Changes I put the tags html head and body in sequence, just like a page .html. Placed type="text/css". It is good to tell the browser specifically what the code is. In the header #head added…
-
4
votes1
answer772
viewsQ: LINK Anchor to Section Does Not Work in Firefox
$(window).load(function() { $('a.scroll').each(function() { var id = $(this).attr('href'); if (id.match('^#')) { var target = $(id).offset().top - 65; var title = $(this).attr('title');…
-
1
votes3
answers9425
viewsA: Eloquent with does not Inner Join?
It can also be done like this. DB::table('TABELA') ->join('TABELA2', 'CODIGO.TABELA1', '=', 'CODIGO.TABELA2') ->where('1 = 1') ->get();
-
0
votes3
answers308
viewsA: Centralize elements using margin
<div class="anime-item">, in that element puts: position: relative; margin: auto;
-
0
votes6
answers896
viewsA: Rewrite and close array of a file
This function below searches line by line to string that you want and gives a replace. You need a form to do the POST also ? INDEX.php <?php $arquivo = fopen('config.php','r+'); $string = ''; if…
phpanswered Diego Souza 16,524 -
1
votes2
answers44
viewsA: Make an image grow proportionately to specific limit
max-width div.imagem{ width: 210px; height: 210px; } div.imagem img{ width: 100%; max-width: 198px; // Sua Primeira Imagem } …
cssanswered Diego Souza 16,524 -
1
votes1
answer271
viewsA: STORED PROCEDURE
You have to define variables. DEFINE @NomeVariavel_1 as INT DEFINE @NomeVariavel_2 as VARCHAR(100) DEFINE @NomeVariavel_3 as DATETIME DEFINE @NomeVariavel_4 as VARCHAR(100) Define how many variables…
-
3
votes2
answers961
viewsA: Calculate maturity date
SELECT START, DATE_ADD(START, INTERVAL 30 DAY) AS DATA_VENCIMENTO, DATADIFF(START, DATE_ADD(START, INTERVAL 30 DAY)) AS DIFERENCA FROM TABELA In that SELECT you can recover the difference of days…
-
2
votes1
answer807
viewsA: Php code is commented in html
A file that pulls another file that pulls the image... Just do it once. Where you want to put the captcha, do: <img src="captcha.php?iu=<?php echo mt_rand(0,4); ?>" />…
-
-1
votes3
answers4509
viewsA: Print orientation using Javascript, CSS, HTML or PHP
I did in CSS once and a JS plugin called printElement.js, however it is not necessary if it is a simple page. Print Element CSS @media print{ @page{ size: landscape; } #image-example{ position:…
-
1
votes3
answers1664
viewsA: Abbreviate content inside cell (HTML table)
You have to set fixed sizes for the columns. It’s the only way. In percentage or pixel. But if you want to abbreviate the content, use a function that limits your string. In PHP is the…
-
1
votes1
answer355
viewsA: Slug and Post/Get on the same Route - Laravel
Solved. Route::any('produtos/{slug?}', 'ProdutoController'); And in the Productocontroller.php done: public function anyIndex($slug){ } http://laravel.com/docs/4.2/routing#basic-routing…
-
3
votes4
answers2318
viewsA: H1 stylized with center edge with css
Take this example: http://jsfiddle.net/btxdm6ut/ With position: absolute. The edge is of value solid, but if you want to put dashed you can use dotted or some image and put as background-image. See…
-
1
votes2
answers46
viewsA: select com datetime mssql
SELECT * FROM Pesagem WHERE CONVERT(DATETIME, databruto, 103) = '01/10/2015' AND Ativo = 1
-
0
votes2
answers277
viewsA: Format select output
And if you use the function SUBSTRING. SUBSTRING ( ( convert(varchar(10),IdProduto) + ' - ' + Produto.nomeproduto + ' - ' + isnull(complemento,'')), 0, LEN( (convert(varchar(10),IdProduto) + ' - ' +…
-
1
votes2
answers505
viewsA: CSS form diagonally without bending the letter together
You have to do the same effect, but unlike in the field inside. To make it straight. #search{ -moz-transform: skewX(-40deg); -webkit-transform: skewX(-40deg); -o-transform: skewX(-40deg);…
cssanswered Diego Souza 16,524 -
11
votes4
answers19928
viewsA: strtoupper() with accents
MB_STRTOUPPER mb_strtoupper('virá', 'UTF-8'); Or mb_internal_encoding('UTF-8'); mb_strtoupper('virá');
-
1
votes2
answers706
viewsQ: PACE JS - Page Load Only
I am using this plugin, Page.JS - http://github.hubspot.com/pace/ - to make a progress bar on the site. I’m calling it that: <script src='js/vendor/pace.min.js' data-pace-options='{ "elements":…
-
0
votes1
answer2208
viewsA: Phpexcel class line break string
PREG_REPLACE http://php.net/manual/en/function.preg-replace.php ->setCellValue("E$row", preg_replace('/\s/',' ',"$Itens[2]]"); # Descrição…
-
1
votes1
answer408
viewsA: Class Not Found in Laravel 5
Resolution I was able to solve it this way: Placing the full path of the Controller in the View. Ex: {!! App\Http\Controllers\URLController::Link('quem-somos') !!}…
-
5
votes3
answers256
viewsA: use the PHP implode
$varArray = array(); foreach($_POST['NAME_CHECKBOX'] as $item){ $varArray[] = $item; } echo implode(",", $varArray);
phpanswered Diego Souza 16,524 -
3
votes2
answers1581
viewsA: Folder browsing in PHP
<?php function ListFolder($path){ $dir_handle = opendir($path) or die("Erro"); $dirname = end(explode("/", $path)); echo ("<li> $dirname"); echo…
-
4
votes2
answers378
viewsA: Problem picking textbox value with jQuery
Your field PASSWORD is like this: @Html.TextBox("txtSenha", "", new { @class = "form-control form-control-custom", style="width:100px" }) You did not give an individual ID for this field. You can…
jqueryanswered Diego Souza 16,524 -
3
votes3
answers80
viewsA: Move the mouse, and know that I’m on top of an object
HTML <svg class="element"> <image /> </svg> CSS .element:hover{ cursor:pointer; }
javascriptanswered Diego Souza 16,524 -
2
votes2
answers1231
viewsA: Change variable value in Ajax
It was easier for you to check the existence of the file on a server-side page. Probably PHP you are using. PHP <?php $file = $_POST['file']; $caminho = 'dir/'; if(file_exists($caminho.$file))…
-
5
votes1
answer617
viewsA: How to query multiple tables in PHP?
You can use the command UNION. SELECT * FROM TABELA_1 UNION SELECT * FROM TABELA_2 ATTENTION But to use this command the tables must have the same number of columns! OBJECTION "All right, but no.…
phpanswered Diego Souza 16,524 -
-1
votes3
answers37
viewsA: Problem adding a date to an array index
$pcb_data = array(); while($r = $DB->fetchArray($result)){ $pcb_data[$r['pcb_cmb_id']] = date("d/m/Y", strtotime($r['pcb_data'])); } echo '<pre>'; print_r($pcb_data); echo '<pre>';…
-
-1
votes2
answers750
viewsA: How to change the background color of a slider from the bootstrap-slider plugin?
The class in which the background color changes is this one: slider-track-high. Put this into the function setarCorSlider. $('.slider-track-high').css('background-color', 'red'); And take it from…
-
3
votes1
answer251
viewsQ: Header Fixed CSS - Transform Translate X
I’m trying to get the header from the mobile site stay fixed onscreen. However, I have a button on this header that opens the MENU to the right of the site, using the transform: translateX(-15%)…
cssasked Diego Souza 16,524 -
0
votes2
answers304
viewsA: Floating chat on the page
Use position: absolute. #chat{ width: 300px; height: 300px; position: absolute; right: 20px; bottom: 20px; }
javascriptanswered Diego Souza 16,524 -
3
votes1
answer993
viewsQ: Laravel Session - Public for Controller
I’m making a form that contains a Captcha. The Captcha is generated by a PHP script that mounts an image. And I put the script in the folder public of Laravel 4. When the code of Captcha is…
-
0
votes0
answers63
viewsQ: Play Audio - iOS Plays No Sound - Delay in Sound Output
I have this function to load, remove, startar and pause the audio. media = (function(){ return{ create : function(name, src){ mediaData[name] = new Audio(); mediaData[name].src =…