Posts by Pliavi • 983 points
36 posts
-
0
votes1
answer120
viewsA: Close menu by clicking outside item on Vue.js 3
How to close a modal by clicking outside: There are two ways to do, in your case, as you do not have a div around your modal (a staff puts to darken the screen), usually by it you could make this…
-
1
votes1
answer67
viewsQ: What is the difference between Reduce and Foldl in Elixir?
I found myself needing a job reduce (for having more custom with JS this is the first name that comes to mind) in the Elixir and found the Enum.reduce/2, but with a little more research already in…
-
0
votes2
answers1568
viewsA: Taking absolute path from relative on Node
A simple and functional way for the problem was the use of the variable module, from it I can find out who imported it and soon have the file path that is being read at that instant, using the…
-
2
votes2
answers1568
viewsQ: Taking absolute path from relative on Node
I have a problem reading files in a code that is the following: src/race.js import { readFileSync } from "fs"; import { resolve } from "path"; export function readFile(path) { const absolutePath =…
-
3
votes1
answer63
viewsQ: How to extract a binary from a string?
I have the following decimal list in Erlang: "01000001" == [48, 49, 49, 49, 49, 49, 48] I need to create a binary type from that list, so: <<01000001>> == <<"A">> I tried to…
-
3
votes1
answer55
viewsQ: Guards vs functions with Pattern matching
I’m starting out in Haskell and I was doing some exercises on her Exercism. When I sent a code, I compared it with the others and came across a very similar one to mine, but I used a definition of…
-
-1
votes4
answers1464
viewsA: Bootstrap how to print table background colors?
Bootstrap really has a problem with printing, it doesn’t give you so much freedom. First of all because it already uses the !important on their properties. So if you add: td{background-color: #000…
bootstrap-3answered Pliavi 983 -
-1
votes1
answer324
viewsA: Custom routes on Laravel 5.4?
To retrieve some data from the URL, you can use a direct parameter in the route using a variable name between keys, this way: Route::get('categoria/{categoria}', function($categoria) { return…
-
1
votes2
answers225
viewsA: Loading in css does not work in IE11 and Edge
IE and Edge need the animation on keyframe be set from start to finish to work, check that you put the following in the @keyframes color: 0%, 40%, 66%, 80% and 90%. So your animation is going from…
-
3
votes2
answers7271
viewsA: Divs daughters extrapolam Div father
Complementing the @Leonfreire response The cause of the problem is overflow: visible next to `height: 100%, but... Why? The height: 100% takes 100% of the screen according to its parent element, and…
-
2
votes1
answer182
viewsA: innerText does not accept white space
Always use quotes for attribute values HTML does not require you to use quotes, but I recommend that you always use to avoid this kind of problem. Cause of the problem: When you do not use quotation…
-
5
votes2
answers2299
viewsA: Make all LI to the height of the largest using CSS
Let ALL blocks of the same size using only CSS do not know if it is possible (unknown) since each line becomes independent, but each element of a line has a certain connection and can be used as…
-
1
votes1
answer529
viewsA: Javascript does not receive json Response from Laravel
According to the information given in the comments, it was possible to discover the cause of the problem. The function enviarEmail class Emails is returning a response for the controller with the…
-
2
votes1
answer457
viewsA: I can’t access website hosted on github
It is not possible for you to use the domain github.io the repository name must be the same as the user name or organization name, otherwise Github will not "upara" your site. As described on the…
-
4
votes2
answers4266
viewsA: Laravel Insert data into a table and use the same id to fill another
The Create command cannot make associations, and hardly the value of the foreign key (in your case the questionario_id) will come by request, so I wouldn’t recommend using it in this case, but I’ll…
-
1
votes3
answers207
viewsQ: Unsigned in the primary key increases my chances?
I was setting up a bank for a personal project and I came across creating a table to keep a few values, this would use a TINYINT as a primary key, since I assume I won’t go more than 100 records,…
-
1
votes2
answers4168
viewsA: 'php' not recognized as an internal or external command
Causative According to the comments and the previous answer given by the questioner himself can be understood that the cause of the problem is a kind of linter that uses the executable php to check…
-
4
votes3
answers10837
viewsA: Replace is not a Function
Your problem is with typing (you can see by TypeError), as you are making a subtraction, the whole result becomes the type number, hence, the function replace there is no. var x = 10 - 5; // deve…
-
2
votes1
answer599
viewsA: How to check if an array has an attribute?
After chat chat, it was verified that the case was to force the user to have the phone if the DDD was informed. For this, it is possible to use the validation rule required_with which makes a field…
-
4
votes1
answer178
viewsA: Gulp Watch Customizado
As already stated in the comment, to create the "watch" it is only necessary to create a new task containing a gulp.watch of tasks that you want to run when modifying the file: gulp.task('watch', ()…
-
3
votes1
answer1120
viewsA: How to filter one array by another?
Your problem is that the indexOf looks for the full value within the array, so how are you passing a array, it must be contained and in the same order within the program, otherwise it is…
-
0
votes4
answers1052
viewsA: How to mount 3-column CSS mosaic?
One way is to use the flex, next to the media-queries: .container{ display: flex; max-width: 300px; /* Você pode trocar a largura aqui livremente */ } .container .all, .container .last{ display:…
-
2
votes4
answers342
viewsA: Laravel 5.3 - Model that can be created by multiple Controllers
Injection has already been shown (IMHO the best), static method, so let’s go to one more alternative and you see which one adapts best to what you need. What you need can be done from inheritance:…
-
0
votes0
answers25
viewsQ: Is it possible to share validation failures between nested controllers?
I have two models, one child of the other, User and Address where User>hasOne>Address and I’m about to do the following: Request: [ 'User' => [ 'name' => 'fulano', 'etc' => 'etc' ],…
-
2
votes2
answers947
viewsA: How to expand an image with Hover without other elements moving
You can use the property transform with scale(largura, altura) alternatively: It resizes the element according to a scale, and it does not move others close to it. nav#foto ul li{…
-
2
votes3
answers84
viewsA: Partial selection of a class with jQuery
An alternative to @pedro-camara-junior’s response with pure JS, certain that it was requested with jQuery, but sometimes not quite necessary, would be the use of the querySelector(): var el =…
-
1
votes1
answer1526
viewsA: How do I use vueJS with Gulp?
Your file is already assembling all other resources, would only need to do the same with the .vue. For that there is the package Gulp-vueify To use it you must download it next to the Babel: npm…
-
7
votes1
answer1438
viewsA: Reuse/reuse of reactive Vue component
Components serve to be reused, it would not be necessary to use the mixin, which is reuse of component fragments. You got two problems there: Mixin injects values into components, but their values…
-
1
votes1
answer56
viewsA: trashed() returning 'true' after Store()?
After the comment of Virgilio I figured out what caused the problem. I created another model with the same trait and controller and the same worked without problems, so the problem was in the model…
-
0
votes1
answer349
viewsA: Is there any way to calculate a pattern of extra space from a source?
This space is from source to source, does not seem to have a correct pattern, as already said in the comments, the use of line-height is the best option. Already to calculate the value, you can use…
-
2
votes1
answer56
viewsQ: trashed() returning 'true' after Store()?
I have a model Manifestation using SoftDeletingTrait to keep them inactive in the bank and in the ManifestationController I have the following method destroy(): $manifestation =…
-
1
votes1
answer211
viewsA: use ref in a list without v-for Vue.js
Yes, it is possible. When not using the v-for, to ref becomes a common variable and can be rescued with this.$refs.suaref. Using the ref in the component with the v-for the name given in the…
-
2
votes1
answer448
viewsA: How to make Chosen ignore accents in the search?
Stackoverflow has a similar question, and there is an open Issue on Github requesting this change. In this Issue has several users putting ways to change the code, one of them posted in this Stack…
-
4
votes1
answer1553
viewsA: Problem with Vue-cli
Since you installed it globally, you do not use NPM to run, to see the list of templates just run the command: vue list (Obs, without the --, because it is a command, not an option). And to run the…
-
0
votes2
answers315
viewsA: Navigating between Javascript Urls (changing url value)
With a small combination of substrings you can, if all the links end with the file extension, just look for the last dot and add the text chosen above lastIndexOf: To see where the last point is.…
-
1
votes1
answer232
viewsA: How to define a directive with Vue 2.0 that always does Binding as string
I believe that is not possible, according to "Directives in Depth": For security reasons, in inline Expressions you can only access properties and methods present on the Current context Viewmodel…