Posts by Rafael Lemos • 551 points
24 posts
-
-3
votes2
answers1461
viewsQ: Date and time in Brazilian format dd/mm/YYYY HH:MM:SS
I only opened that question because all the answers I found create functions or go very long ways to answer it. The fact is: I need date and time in the Brazilian format: dd/mm/AAAA HH:MM:SS…
javascriptasked Rafael Lemos 551 -
0
votes2
answers1461
viewsA: Date and time in Brazilian format dd/mm/YYYY HH:MM:SS
So after much searching I found the solution: var agora = new Date(); agora.toLocaleString("pt-br"); console.log(agora); // 18/03/2019 16:45:00
javascriptanswered Rafael Lemos 551 -
0
votes1
answer26
viewsA: How to place multiple icons according to "mime-type" in the same extension
Let’s get to the facts: I won’t be explaining about mime-types here. Whoever wants to do this follow this recipe: The distro in question is linux Ubuntu 16.04 64bits Create an icon file called…
-
0
votes1
answer26
viewsQ: How to place multiple icons according to "mime-type" in the same extension
The idea is very simple: I have a text file: texto.prisma $ file -i text.prism text.prism: text/Plain; charset=utf-8 I have another compiled file: compilado.prisma $ file -i compiled.prism…
-
2
votes2
answers3370
viewsA: Bring Datatable columns by Datatabe Ajax itself
All right: Not the best solution, but works in table.ajax.Reload() This function I created will reposition the names directly in html by taking the result from ajax. $(document).ready(function(){…
answered Rafael Lemos 551 -
0
votes0
answers297
viewsQ: What are stack tracks and stack bursts?
The only thing I know is that it refers to the use of memory but define pile and why it happens so often ?
stackasked Rafael Lemos 551 -
0
votes1
answer187
viewsQ: How to declare "strings" accented strings?
Lua is written in C logo shares the American Standard Code for Information Exchange "ASCII" Accepts matrix key declaration with accent: rafael = {} rafael["é"]="eu" print(rafael["é"]) --saída: eu…
-
1
votes0
answers78
viewsQ: How to calculate Mbps?
I’m picking up information from the interface of an internet modem: Txbytes, Rxbytes, Uptime He gives me a json input: Entrada=([[ { "uptime":"15423", "txbytes":"1147089", "rxbytes":"23124634" } ]])…
-
0
votes1
answer65
viewsQ: Prisma - How to handle semicolon files "csv"?
The title of the question refers to csv because it is widely used and has the same logic but my server produces the following output: ifname | username | calling-sid | ip | type | comp | state |…
prismaasked Rafael Lemos 551 -
1
votes1
answer137
viewsQ: Prisma - How to convert integer to binary?
I need a function in the Prism language that converts an integer to its binary form. For example, to convert 255 for 11111111. I have to create a formula just like…
prismaasked Rafael Lemos 551 -
3
votes1
answer85
viewsQ: How to repeat a failed ajax query?
The problem is that sometimes the consultation runs out of time or even gives error, so I want to automate in these cases. $.ajax({ type: "GET", url: 'inserindodados.prisma', data:…
-
3
votes2
answers743
viewsQ: Materialize - How to align the footer always below?
This code below leaves it aligned below if the content fills the whole page, otherwise it gets in the middle of the body. Remark: I have read the manual of materialize, it was even aligned but…
-
1
votes2
answers124
viewsA: how do I make a table go showing tables
Or even easier, use the json.cod(tabela) --saída: { "matriz": [ "filhos" : [ "netos" : [ 1,2,3] ] ]}
-
1
votes1
answer237
viewsA: Use string and integer in moon
From what I understand you want the table indexes to be of type number and string "string": You can handle table indices normally just use the tab , Test the code below on the network:…
luaanswered Rafael Lemos 551 -
2
votes2
answers124
viewsA: how do I make a table go showing tables
You need a recursive function. See the example below in online demonstration Lua. Turn on dump your table instead of _G. -- globals.lua -- show all global variables local seen={} function dump(t,i)…
-
2
votes1
answer525
viewsA: LUA, Separate string with numbers in a table!
You can separate the string with the function string gmatch.() function separa(s, delimitador) tab = {}; for valores in (s..delimitador):gmatch("(.-)"..delimiter) do table.insert(tab, valores); end…
-
-1
votes4
answers5462
viewsA: how to insert picture into database
According to the Postgresql documentation You can use the format bytea to record binaries: CREATE TABLE images (imgname text, img bytea); Creating table in Lua: require"luasql.postgres" -- carrega a…
-
0
votes1
answer500
viewsA: How to convert a table to json?
Using the library json.pris the first line calls the library, the second encodes the table for json and stores in cadeiajson, the third is an error handling. local json = inclua 'json' cadeiajson,…
prismaanswered Rafael Lemos 551 -
3
votes2
answers3965
viewsQ: What Development Environments (IDE) for Android and IOS using Lua?
I want to know what Development Environment options to develop applications for Android and IOS using the Lua language.
-
0
votes1
answer500
viewsQ: How to convert a table to json?
The table looks like this: tab = { semana={"seg","ter","qua"}, mês={"jan","fev","mar"}, modelo={ casaco={"pele","couro"} } } I need the output to be in json format for javascript to interpret.…
prismaasked Rafael Lemos 551 -
4
votes2
answers151
viewsA: How to convert a string to hexadecimal?
Can be done in two ways using the function formate(): cadeia = "blablabla" hex = cadeia:formate("%X") Or else it is also possible to achieve the same result: cadeia = "blablabla" hex =…
prismaanswered Rafael Lemos 551 -
1
votes2
answers151
viewsQ: How to convert a string to hexadecimal?
I want to convert a string to hexadecimal: cadeia = "blablabla"
prismaasked Rafael Lemos 551 -
6
votes2
answers670
viewsA: What is it, Prism?
What is Prism? https://linguagemprismablog.wordpress.com/about/ Prisma is an interpreter for the programming language that takes the same name. It has several characteristics, such as: interpreted…
prismaanswered Rafael Lemos 551 -
9
votes1
answer219
viewsQ: How to read a file in Prism?
I was trying to read a file in Prisma but I can’t find the correct function: local arquivo = 'arquivo.txt' imprima(arquivo) On the moon, it would be something like local file = 'file.txt';…
prismaasked Rafael Lemos 551