Posts by Guilherme Pressutto • 413 points
12 posts
-
1
votes2
answers369
viewsA: Error while rendering component
In Vue.js 2.0 the directive v-ref turned into just ref, in accordance with the documentation. This is the right way: <lista-component ref="lista-component"></lista-component>…
vue.jsanswered Guilherme Pressutto 413 -
1
votes2
answers2635
viewsA: Fixed menu after scrolling
You are using menu-topo as id and selector is searching for class .menu-topo instead of #menu-topo.
-
4
votes1
answer148
viewsQ: Check if file was created
I made a function that creates a file in php, but I need it to return true if all goes well or false if one of the steps has failed. I solved it as follows: function createFile($path, $nome,…
phpasked Guilherme Pressutto 413 -
0
votes1
answer402
viewsQ: I can’t link to css with relative path
I am using Valet and my link to the css file is not working. I have this in my file /exemplo/index.php <link rel="stylesheet" type="text/css" href="css/style.css"> The file is in…
-
2
votes1
answer604
viewsQ: How to use materialize components with Vue.js?
I have a dynamic table that updates according to an object array. In one of her columns I want to put a dropdown with the possible actions (edit, delete, etc). But the dropdown does not work and…
-
2
votes1
answer604
viewsA: How to use materialize components with Vue.js?
As the table data is being generated dynamically, and consequently the buttons as well, we cannot initialize the dropdowns only when the page is loaded. Most of the time the table will be generated…
-
2
votes2
answers369
viewsQ: Error while rendering component
The browser page is empty and the following error appears in the console: Failed to resolve directive: ref After commenting and uncommenting various parts of my code, I discovered that the page only…
vue.jsasked Guilherme Pressutto 413 -
1
votes2
answers42
viewsA: Parallel function on website
I solved it in a very simple way. I modified the generate button .xlsx so that instead of generating, it calls in the terminal the code it generates with shell_exec("php nomeDoArquivo.php"), but…
-
2
votes1
answer107
viewsQ: Apache mod_rewrite
I have a rewrite rule I found in a very old question of the US: RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^(.*/)([^/]+)/([^/]+) $1?$2=$3&%1 [L] RewriteCond %{QUERY_STRING} ^(.*)$…
-
1
votes2
answers42
viewsQ: Parallel function on website
I have a class that generates a file .xls for download. The problem is that it has more than 30,000 entries, so it takes about 10 minutes to generate. And in that time I have to keep the page open…
-
8
votes3
answers1005
viewsQ: Foreach by reference or by value?
Is there a difference in performance and safety between using foreach by reference or by value? I always use the first option(when necessary) by finding the code less confusing to read. Reference:…
-
4
votes2
answers723
viewsA: Count black pixels from a region of the image
If you’re going to do it in php try something like: $numeroDePixels = abs(($se[0]-$id[0])*($se[1]-$id[1])); In this code we have: ($if[0]-$id[0]) as the width of the area. ($if[1]-$id[1]) as area…