eval-Evaluation
eval is a function which evaluates a string as though it were an expression and returns a result; in others, it executes multiple lines of code as though they had been included instead of the line including the eval.
JavaScript[edit]
In JavaScript, eval is something of a hybrid between an expression evaluator and a statement executor. It returns the result of the last expression evaluated.
Example as an expression evaluator:
foo = 2;
alert(eval('foo + 2'));
Example as a statement executor:
foo = 2;
eval('foo = foo + 2;alert(foo);');
One use of JavaScript's eval is to parse JSON text, perhaps as part of an Ajax framework. However, modern browsers provide JSON.parse as a more secure alternative for this task.
https://en.wikipedia.org/wiki/Eval
Implementation
In interpreted languages, eval is almost always implemented with the same interpreter as normal code. In compiled languages, the same compiler used to compile programs may be embedded in programs using the eval function; separate interpreters are sometimes used, though this results in code duplication.
http://dictionary.sensagent.com/Eval/en-en/
eval-Evaluation的更多相关文章
- Html和JS基础
1.body:bgcolor,background(背景图片),bgproperities=fixed(图片水印),text(正文颜色). 2.hr:水平分割线,正文标题<h?>自动换行了 ...
- Java机器学习框架deeplearing4j入门教程
1.添加项目maven添加依赖 or 导入jar包 or 使用jvm <project xmlns="http://maven.apache.org/POM/4.0.0" x ...
- [Pandas] 04 - Efficient I/O
SQLITE3接口 调动 SQLITE3数据库 import sqlite3 as sq3 query = 'CREATE TABLE numbs (Date date, No1 real, No2 ...
- Paddle预训练模型应用工具PaddleHub
Paddle预训练模型应用工具PaddleHub 本文主要介绍如何使用飞桨预训练模型管理工具PaddleHub,快速体验模型以及实现迁移学习.建议使用GPU环境运行相关程序,可以在启动环境时,如下图所 ...
- Non-standard evaluation, how tidy eval builds on base R
As with many aspects of the tidyverse, its non-standard evaluation (NSE) implementation is not somet ...
- Evaluation of Expression Tree
Evaluation of Expression Tree Given a simple expression tree, consisting of basic binary operators i ...
- Windows Server 2012从Evaluation版转成正式版
步骤 运行->CMD(管理员)->输入DISM /online /Get-CurrentEdition 看你的Edition ID是什么,如果是Evaluation的话,例如Standar ...
- Weka开发[3]-Evaluation类
上一次最后的结果就是一个分类的值,可能让大家大失所望,这一次会给大家一个比较完美的答案,这就是Evaluation类,这次只讲一下最简单的用法,首先初始化一个Evaluation对象,Evaluati ...
- JavaScript eval() 为什么使用eval()是一个坏主意 什么时候可以使用eval()
---------------------------------------------------------------------------------------------------- ...
- Alpha,Beta,RC,RTM,EVAL,CTP,OEM,RTL,VOL
微软的一个系统(如Win 7)或开发工具(VS系列),往往会对应很多种版本,下面就介绍一下这些版本的含义: Alpha (阿尔法,希腊字母的第一位'α',代表最初的版本) Alpha是内部测试版, ...
随机推荐
- android webview一些注意事项(持续更新)
1.loadUrl() 的参数必须“http://”开头: 2.如果用到内部类获取页面内容,此类不能混淆: 3.2中情况保持不混淆需要将webview所在的包都保持不混淆,常规的保持类不混淆不生效: ...
- Python学习——BeautifulSoup篇
BeautifulSoup Beautiful Soup 是一个可以从HTML或XML文件中提取数据的Python库.它能够通过你喜欢的转换器实现惯用的文档导航,查找,修改文档的方式.Beau ...
- 【摘录】JAVA内存管理-有关垃圾收集的关键参数
第八章 有关垃圾收集的关键参数 一些命令行参数可以用来选择垃圾收集器,指定堆或代的大小,修改垃圾收集行为,获取垃圾收集统计数据.本章给出一些最常用的参数.有关各种各样参数更多完整的列表和详细信息可以参 ...
- Apache负载均衡配置
使用mod_proxy 配置Apache负载均衡 1.安装apache ./configure --prefix=/usr/local/apache2 –enable-so make &&am ...
- GFM(GitHub Flavored Markdown)与标准Markdown的语法区别
没有就自己造 其实这篇文16年底的时候就写好的,只不过当时是记在自己的笔记上(没错,我笔记大多记在本地,比发表的这寥寥几篇那是多的多的多了
- php 密码hash加密
做密码加密,记录一下. password_hash 函数在 PHP 5.5 时被引入. 此函数现在使用的是目前 PHP 所支持的最强大的加密算法 BCrypt .例子: $passwordHash = ...
- jquery 终止循环
jQuery中each类似于javascript的for循环 但不同于for循环的是在each里面不能使用break结束循环,也不能使用continue来结束本次循环,想要实现类似的功能就只能用ret ...
- vue路由传值params和query的区别
vue路由传值params和query的区别1.query传参和接收参数传参: this.$router.push({ path:'/xxx' query:{ id:id } })接收参数: this ...
- LoadRunner监控Window/Unix系统资源的配置
LoadRunner监控Window/Unix系统资源需要做两件事情: 1.配置被监视的服务器,以便于LoadRunner能够获取系统资源使用情况的数据 2.在LoadRunner的Controlle ...
- HDU 1521
指数型生成函数.做这题时,回去看看组合数学才知道,指数生成函数求的就是多重集合的r排列数. #include <iostream> #include <cstdio> #inc ...