Questions tagged as 'eval'

1
answer

How to execute arbitrary code in Python?

I use an xBase language that has macro replacement as in the original Clipper. Is there something equivalent in Python? We use a lot of command line assembly via menus at runtime. For example, making filters.     
asked by 01.07.2016 / 14:28
3
answers

JavaScript eval check if it is safe

I would like to create sequenced objects and to set the object name, I could only do it with the eval() function, I did not find any other alternatives. They say it is uninsured, and subject to attacks. I would like to know if the code...
asked by 05.12.2016 / 16:10
1
answer

Eval () PHP, usability and context

I was reading some codes of e-commerce extensions. Usually these modules are paid, but what I was seeing had a 'trial' to try out. I installed and went to analyze the code. I was hoping for something in PHP itself, but it looks like the creators...
asked by 02.05.2016 / 16:17
1
answer

How to use strings as parameters in R

Galera, I need to create a column using a string and use other column strings as arguments, for example: dataframe <- dataframe %>% mutate("Newstring" = case_when("stringA" < 65 & stringB == 0 ~ 1, TRUE ~ 0)) I believe parsi...
asked by 26.05.2018 / 18:36
1
answer

How to transform a text in identifier name?

I would like to be able to receive a string as a parameter and use it as the identifier name, to create a variable or function with that name (not to use as a dictionary key). Is it possible to do this?     
asked by 03.11.2017 / 12:20
1
answer

How to put \ "in a String?

I'm trying to evaluate a PHP code using Java, so I need to replace all the " with \" in the code. The problem is that Java also has this escape character for " in a String. I was told to use \" , but the result was thi...
asked by 28.07.2017 / 17:58
3
answers

Use of eval () in javascript: what are the pros and cons?

I recently knew this function and I was surprised by its power, it was very useful to me, but after using it I heard comments that it was not safe. I would like to know if this usage can cause security problems and if there is an alternative...
asked by 04.02.2014 / 19:48
1
answer

Using eval to transform Razor to Javascript

Before criticizing the use of eval , I read and recommend this answer . Consider the following context: Home C # Code (Razor): var teste = new { prop1 = 123, prop2 = "minha mãe disse 'Háaaaaa!'" }; var listTeste = new object...
asked by 06.10.2017 / 00:15
2
answers

Compile string as a code

I have a string in VBScript that I need to be executed as a code, how would I do it? I have read some articles about Eval and Execute Statement but I did not find a clear explanation or did not understand correctly ... For example: Dim...
asked by 30.07.2018 / 18:48
1
answer

Check if it is a valid account

I'm doing a MySQL query where one of the columns would be the result of a calculation. However, I need to check by PHP if this account is valid. For example, pow (-0.2,0.5) would be an impossible value because it would be the same as trying to...
asked by 25.04.2018 / 14:04