Posts by Adriano de Azevedo • 533 points
18 posts
-
0
votes0
answers133
viewsQ: Error compiling Ionic application with Crosswalk
I am developing an app that will support for Android 4.1+ and I am having problems compiling APK for Android 4.4 devices<. In the Ionic documentation there is some information regarding your…
-
2
votes1
answer54
viewsA: Api returns data correctly by Artisan serves but not by apache
Laravel uses the route concept so you can access your application. Check if the extension mod_rewrite apache is enabled. <?php // teste.php print_r(apache_get_modules()); ?> If you check that…
-
0
votes2
answers32
viewsA: Create a PHP Script by pulling data from Excel
For this situation, I use the class Phpexcel. Here is a tutorial in English explaining how to make use of this class. But basically, you need to inform the path to the file, set the tab that is…
phpanswered Adriano de Azevedo 533 -
4
votes4
answers3559
viewsA: Increment a counter within a php foreach
According to the official PHP documentation, with each iteration, the value of the current element is assigned to $value and the array’s internal pointer moves forward one position (then, in the…
-
2
votes2
answers1580
viewsQ: Problems with charset in the Laravel
I have a database Firebird which was not built through migrations in the Laravel, and it has encoding ISO-8859-1 and I need to return an object in the format JSON for my application, however, in…
-
4
votes2
answers2344
viewsQ: How to print directly without opening the browser dialog box?
I am developing a web system where I need to print a label and a non tax receipt after sending a certain form. To perform this action, I have two printers: Matricial MP-20 MI Non Tax Printer - For…
-
10
votes4
answers1970
viewsQ: How to abbreviate words in PHP?
I have common information like people names and addresses, and I need it to contain at most 30 characters without cutting words. Example: 'Avenida Natalino João Brescansin' => 'Av. Natalino J.…
-
12
votes1
answer24921
viewsA: Download Files in PHP
If you simply want to download an existing file just put the download attribute in the tag a: <a href="caminho-ate-o-arquivo.txt" download>Clique aqui para fazer o download</a> If you…
-
2
votes2
answers1376
viewsQ: How to publish multiple Laravel applications on Shared Server?
I have two independent application made in Laravel would like to host them on the same server, in separate directories. I searched extensively for documentation and forums, and I was able to make…
-
2
votes1
answer473
viewsA: Concatenate in the PDO query
I use a class to do generic database reading and have never had a performance problem. The biggest problem is that you need to know exactly what is being passed in the parameters to do the query, if…
-
3
votes1
answer852
viewsA: Select to sort by hour
The ORDER BY command accepts multiple parameters: ORDER BY campo1 ASC, campo2 ASC Then your appointment would be: $dados = Connection::select(" Select *, date_format(`data`,'%d/%m/%Y') as…
mysqlanswered Adriano de Azevedo 533 -
0
votes2
answers99
viewsA: How to make a div have the dimension of an image and display it?
There is a very easy way to do this. You need to know the image width and height ratio. Set the height of the div to 0 and set the padding-top as a percentage based on the image ratio. #imagem{…
cssanswered Adriano de Azevedo 533 -
1
votes3
answers252
viewsA: Group and add PHP dynamic arrays
To solve this problem I created a function called sumArray: function sumArray(array $old, array $new) { foreach ($new as $key => $value) { if (array_key_exists($key, $old)) { $old[$key] +=…
-
-1
votes2
answers70
viewsA: Taking information from a function
If you just want to thresh your code to know what your function is returning, use the following command: echo '<pre>'; var_dump(getCoordinates($address)); echo '</pre>'; reference…
phpanswered Adriano de Azevedo 533 -
1
votes1
answer419
viewsA: Tooltip does not work dynamic
The problem you are having is that your tooltip is being dynamically added to your page. Try this: $("body").tooltip({ selector: '[data-toggle="tooltip"]' }); For me it works properly, but if it…
-
1
votes1
answer875
viewsQ: How to count the number of comma-separated items in Mysql?
I have a field in a table with data separated by comma: condicao_pagamento: 20,25,35,45,50. How do I count the number of comma-separated items using Mysql only?
-
0
votes1
answer463
viewsQ: How to install an apk directly from my application, with Titanium studio?
I need to be able to update an application, without the need for it to be in the Play Store or the client to access the internet to download it. I need something automatic, but without customer…
-
0
votes2
answers611
viewsQ: How to check if there is a function in Titanium Studio?
I need to check if in a View there is an Onclick event that executes the test function if($.minhaview.propriedade == 'teste'){ alert("existe um evento onClick com o valor teste"); }…