Posts by Evandro • 465 points
4 posts
-
1
votes1
answer133
viewsA: Pick Table in string form
This function prints in the way you want: local function getTableString(t) local r = '{' for k, v in pairs(t) do if type(k) == 'number' then k = '' else k = k .. ' = ' end if r ~= '{' then r = r ..…
-
4
votes3
answers381
viewsA: PHP takes data from the SPLIT array
Simple solution to fixed numbering (the number will always be the same size). $minha_string = '/Date(770094000000-0300)/'; $numero_desejado = substr($minha_string, 6, 12); echo $numero_desejado; //…
-
1
votes3
answers243
viewsA: Regex for hexadecimal colors
This expression should work in your case: ^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})|([0-9a-fA-F]{3})$ Will return one group for colors like #fff 333 #333. Or else you will return three…
-
30
votes4
answers1879
viewsQ: Is it necessary to add prefixes to some CSS properties?
In many codes the browser compatibility prefixes are added in CSS attributes. Example: .exemplo { -webkit-background-size: 50% 50%; -moz-background-size: 50% 50%; -o-background-size: 50% 50%;…