Posts by Weslley Araújo • 89 points
8 posts
-
1
votes2
answers101
viewsA: HOW DO I SELECT A DIV WITH PHP?
A way to do this without relying on several IF ELSE for each situation, would be keeping each style in a array and during the loop, check if there is a key in the array with the current value of…
-
0
votes4
answers1230
viewsA: Put smooth transition with Javascript
Looking at the answers, the big problem is that using only opacity: 0, a lot of things escapes, because the element is not visible, but it is still there, that is, it remains selectable,…
-
3
votes2
answers92
viewsA: Empty Space in PHP String Explode
On the problem with the spaces, inspect the variable $letras, will realize that it generates two $values "" (empty) for every three spaces. This is because the spaces are being used by split /…
-
1
votes2
answers55
viewsA: Make a background photo opaque/darken. Should I use pseudo element ::after?
A very practical way, as in the commentary of Augusto Vasques, would be with the filter: #background { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background:…
-
1
votes1
answer450
viewsA: Regular Expression to validate password - PHP
It’s been a long time, but here’s a chance to validate only with a pure regex: /(?!\s)(?=.*?[a-z]{1,})(?=.*?[A-Z]{1,})(?=.*?\d{1,}).*(?=.?[^a-zA-Z0-9]{1,})?.([^\s]){8,}/g In the last parentheses,…
-
2
votes2
answers111
viewsA: How to block special characters in a textarea field
In his job maskCharacters, you were indicating that it should return with the value validated only in $(input), without indicating the textarea along. You also don’t need to use the bind, just add…
-
0
votes1
answer53
viewsA: Regex to obtain Token - Zabbix
Following the idea of having the two returns in the same regex, one exit would be this: /"token_type":.?"(.*?)",|"access_token":.?"(.*?)",/g Where in Group 1, it returns what is within the first…
-
0
votes4
answers486
viewsA: How would an algorithm work to prevent attempts to trick word blocks (strings)?
Edit: I’ve altered almost all class behavior* I liked the challenge that this brings and I made a class that dynamically generates a rule in regex with all possibilities combined between the items…