Evaluate a Javascript expression.
432985
def eval_js(self, expr):
        """"""
        if not self.is_built():
            self._pending_js_eval.append(expr)
            return
        logger.log(5, "Evaluate Javascript: `%s`.", expr)
        out = self.page().mainFrame().evaluateJavaScript(expr)
        return _to_py(out)
145942
private void evaluateExpressions() throws JspException {
        /* 
         * Note: we don't check for type mismatches here; we assume
         * the expression evaluator will return the expected type
         * (by virtue of knowledge we give it about what that type is).
         * A ClassCastException here is truly unexpected, so we let it
         * propagate up.
         */

        if (value_ != null) {
            value = ExpressionEvaluatorManager.evaluate(
                    "value", value_, Object.class, this, pageContext);
        }
    }
1021185
def do_evaluate(parser, token):
  ''''''
  code = token.contents
  firstspace = code.find(' ')
  if firstspace >= 0:
    code = code[firstspace+1:]
  return Evaluator(code)
276755
function(expression){
      var t = this,
          value = null;

      // Evaluate the expression
      try {
        value = eval(expression);
      } catch (e) {
        throw new Error('Unable to evaluate: ' + expression);
      }

      // Return the value
      return value;
    }
1216900
def _evaluate(expression, defines):
    
    #interpolated = _interpolate(s, defines)
    try:
        defined = {'defined': (lambda v: v in defines)}
        return_value = eval(expression, defined, defines)
    except Exception, ex:
        message = str(ex)
        if message.startswith("name '") and message.endswith("' is not defined"):
            # A common error (at least this is presumed:) is to have
            #   defined(FOO)   instead of   defined('FOO')
            # We should give a little insight into what might be wrong.
            # message == "name 'FOO' is not defined"
            #    -->  variable_name == "FOO"
            variable_name = message[len("name '"):-len("' is not defined")]
            if expression.find("defined(%s)" % variable_name) > -1:
                # "defined(FOO)" in expr instead of "defined('FOO')"
                message += ''' (perhaps you want `defined('%s')` instead of `defined(%s)`)''' % (variable_name, variable_name)
        elif message.startswith("invalid syntax"):
            message = "invalid syntax: `%s`" % expression
        raise PreprocessorError(message, defines['__FILE__'], defines['__LINE__'])

    logger.debug("evaluate %r -> %s (defines=%r)", expression, return_value, defines)
    return return_value
581470
private void evaluateExpressions() throws JspException {
		String string = null;
		Boolean bool = null;
		if (getBase64Expr() != null
				&& (bool = EvalHelper.evalBoolean("base64", getBase64Expr(), this, pageContext)) != null) {
			setBase64(bool);
		}

		if (getAlignExpr() != null
				&& (string = EvalHelper.evalString("align", getAlignExpr(), this, pageContext)) != null) {
			setAlign(string);
		}

		if (getAltExpr() != null && (string = EvalHelper.evalString("alt", getAltExpr(), this, pageContext)) != null) {
			setAlt(string);
		}

		if (getBorderExpr() != null
				&& (string = EvalHelper.evalString("border", getBorderExpr(), this, pageContext)) != null) {
			setBorder(string);
		}

		if (getDirExpr() != null && (string = EvalHelper.evalString("dir", getDirExpr(), this, pageContext)) != null) {
			setDir(string);
		}

		if (getHeightExpr() != null
				&& (string = EvalHelper.evalString("height", getHeightExpr(), this, pageContext)) != null) {
			setHeight(string);
		}

		if (getHspaceExpr() != null
				&& (string = EvalHelper.evalString("hspace", getHspaceExpr(), this, pageContext)) != null) {
			setHspace(string);
		}

		if (getNameExpr() != null
				&& (string = EvalHelper.evalString("name", getNameExpr(), this, pageContext)) != null) {
			setName(string);
		}

		if (getIsmapExpr() != null
				&& (string = EvalHelper.evalString("ismap", getIsmapExpr(), this, pageContext)) != null) {
			setIsmap(string);
		}

		if (getLangExpr() != null
				&& (string = EvalHelper.evalString("lang", getLangExpr(), this, pageContext)) != null) {
			setLang(string);
		}

		if (getNameExpr() != null
				&& (string = EvalHelper.evalString("name", getNameExpr(), this, pageContext)) != null) {
			setName(string);
		}

		if (getOnclickExpr() != null
				&& (string = EvalHelper.evalString("onclick", getOnclickExpr(), this, pageContext)) != null) {
			setOnclick(string);
		}

		if (getOndblclickExpr() != null
				&& (string = EvalHelper.evalString("ondblclick", getOndblclickExpr(), this, pageContext)) != null) {
			setOndblclick(string);
		}

		if (getOnkeydownExpr() != null
				&& (string = EvalHelper.evalString("onkeydown", getOnkeydownExpr(), this, pageContext)) != null) {
			setOnkeydown(string);
		}

		if (getOnkeypressExpr() != null
				&& (string = EvalHelper.evalString("onkeypress", getOnkeypressExpr(), this, pageContext)) != null) {
			setOnkeypress(string);
		}

		if (getOnkeyupExpr() != null
				&& (string = EvalHelper.evalString("onkeyup", getOnkeyupExpr(), this, pageContext)) != null) {
			setOnkeyup(string);
		}

		if (getOnmousedownExpr() != null
				&& (string = EvalHelper.evalString("onmousedown", getOnmousedownExpr(), this, pageContext)) != null) {
			setOnmousedown(string);
		}

		if (getOnmousemoveExpr() != null
				&& (string = EvalHelper.evalString("onmousemove", getOnmousemoveExpr(), this, pageContext)) != null) {
			setOnmousemove(string);
		}

		if (getOnmouseoutExpr() != null
				&& (string = EvalHelper.evalString("onmouseout", getOnmouseoutExpr(), this, pageContext)) != null) {
			setOnmouseout(string);
		}

		if (getOnmouseoverExpr() != null
				&& (string = EvalHelper.evalString("onmouseover", getOnmouseoverExpr(), this, pageContext)) != null) {
			setOnmouseover(string);
		}

		if (getOnmouseupExpr() != null
				&& (string = EvalHelper.evalString("onmouseup", getOnmouseupExpr(), this, pageContext)) != null) {
			setOnmouseup(string);
		}

		if (getSrcExpr() != null && (string = EvalHelper.evalString("src", getSrcExpr(), this, pageContext)) != null) {
			setSrc(string);
		}

		if (getStyleExpr() != null
				&& (string = EvalHelper.evalString("style", getStyleExpr(), this, pageContext)) != null) {
			setStyle(string);
		}

		if (getStyleClassExpr() != null
				&& (string = EvalHelper.evalString("styleClass", getStyleClassExpr(), this, pageContext)) != null) {
			setStyleClass(string);
		}

		if (getStyleIdExpr() != null
				&& (string = EvalHelper.evalString("styleId", getStyleIdExpr(), this, pageContext)) != null) {
			setStyleId(string);
		}

		if (getTitleExpr() != null
				&& (string = EvalHelper.evalString("title", getTitleExpr(), this, pageContext)) != null) {
			setTitle(string);
		}

		if (getUsemapExpr() != null
				&& (string = EvalHelper.evalString("usemap", getUsemapExpr(), this, pageContext)) != null) {
			setUsemap(string);
		}

		if (getVspaceExpr() != null
				&& (string = EvalHelper.evalString("vspace", getVspaceExpr(), this, pageContext)) != null) {
			setVspace(string);
		}

		if (getWidthExpr() != null
				&& (string = EvalHelper.evalString("width", getWidthExpr(), this, pageContext)) != null) {
			setWidth(string);
		}
	}
145180
private void evaluateExpressions() throws JspException {
        Integer tempInt = null;

        if (dataSourceEL != null) {
            rawDataSource = (Object) ExpressionEvaluatorManager.evaluate(
                    "dataSource", dataSourceEL, Object.class, this, pageContext);
        }

        if (sqlEL != null) {
            sql = (String) ExpressionEvaluatorManager.evaluate("sql", sqlEL,
                    String.class, this, pageContext);
        }

        if (startRowEL != null) {
            tempInt = (Integer) ExpressionEvaluatorManager.evaluate(
                    "startRow", startRowEL, Integer.class, this, pageContext);
            if (tempInt != null) {
                startRow = tempInt.intValue();
            }
        }

        if (maxRowsEL != null) {
            tempInt = (Integer) ExpressionEvaluatorManager.evaluate(
                    "maxRows", maxRowsEL, Integer.class, this, pageContext);
            if (tempInt != null) {
                maxRows = tempInt.intValue();
            }
        }
    }
683259
private void evaluateExpressions() throws JspException {
        /* 
         * Note: we don't check for type mismatches here; we assume
         * the expression evaluator will return the expected type
         * (by virtue of knowledge we give it about what that type is).
         * A ClassCastException here is truly unexpected, so we let it
         * propagate up.
         */

        xml = ExpressionUtil.evalNotNull(
                "parse", "xml", xml_, Object.class, this, pageContext);
        systemId = (String) ExpressionUtil.evalNotNull(
                "parse", "systemId", systemId_, String.class, this, pageContext);

        try {
            filter = (XMLFilter) ExpressionUtil.evalNotNull(
                    "parse", "filter", filter_, XMLFilter.class, this, pageContext);
        } catch (NullAttributeException ex) {
            // explicitly let 'filter' be null
            filter = null;
        }
    }
582276
def eval_script(self, expr):
    
    ret = self.conn.issue_command("Evaluate", expr)
    return json.loads("[%s]" % ret)[0]
386506
public Object eval(String expression) {
    	expression = transform(expression);
    	Object result = calculate(expression);
        return result;
    }
687518
private void evaluateExpressions() throws JspException {
        Object obj = null;

        /* 
         * Note: we don't check for type mismatches here; we assume
         * the expression evaluator will return the expected type
         * (by virtue of knowledge we give it about what that type is).
         * A ClassCastException here is truly unexpected, so we let it
         * propagate up.
         */

        // 'value' attribute
        if (value_ != null) {
            value = ExpressionEvaluatorManager.evaluate(
                    "value", value_, Object.class, this, pageContext);
        }

        // 'type' attribute
        if (type_ != null) {
            type = (String) ExpressionEvaluatorManager.evaluate(
                    "type", type_, String.class, this, pageContext);
        }

        // 'pattern' attribute
        if (pattern_ != null) {
            pattern = (String) ExpressionEvaluatorManager.evaluate(
                    "pattern", pattern_, String.class, this, pageContext);
        }

        // 'currencyCode' attribute
        if (currencyCode_ != null) {
            currencyCode = (String) ExpressionEvaluatorManager.evaluate(
                    "currencyCode", currencyCode_, String.class, this,
                    pageContext);
        }

        // 'currencySymbol' attribute
        if (currencySymbol_ != null) {
            currencySymbol = (String) ExpressionEvaluatorManager.evaluate(
                    "currencySymbol", currencySymbol_, String.class, this,
                    pageContext);
        }

        // 'groupingUsed' attribute
        if (groupingUsed_ != null) {
            obj = ExpressionEvaluatorManager.evaluate(
                    "groupingUsed", groupingUsed_, Boolean.class, this,
                    pageContext);
            if (obj != null) {
                isGroupingUsed = ((Boolean) obj).booleanValue();
            }
        }

        // 'maxIntegerDigits' attribute
        if (maxIntegerDigits_ != null) {
            obj = ExpressionEvaluatorManager.evaluate(
                    "maxIntegerDigits", maxIntegerDigits_, Integer.class, this,
                    pageContext);
            if (obj != null) {
                maxIntegerDigits = ((Integer) obj).intValue();
            }
        }

        // 'minIntegerDigits' attribute
        if (minIntegerDigits_ != null) {
            obj = ExpressionEvaluatorManager.evaluate(
                    "minIntegerDigits", minIntegerDigits_, Integer.class, this,
                    pageContext);
            if (obj != null) {
                minIntegerDigits = ((Integer) obj).intValue();
            }
        }

        // 'maxFractionDigits' attribute
        if (maxFractionDigits_ != null) {
            obj = ExpressionEvaluatorManager.evaluate(
                    "maxFractionDigits", maxFractionDigits_, Integer.class, this,
                    pageContext);
            if (obj != null) {
                maxFractionDigits = ((Integer) obj).intValue();
            }
        }

        // 'minFractionDigits' attribute
        if (minFractionDigits_ != null) {
            obj = ExpressionEvaluatorManager.evaluate(
                    "minFractionDigits", minFractionDigits_, Integer.class, this,
                    pageContext);
            if (obj != null) {
                minFractionDigits = ((Integer) obj).intValue();
            }
        }
    }
430446
private void evaluateExpressions() throws JspException {
        /* 
         * Note: we don't check for type mismatches here; we assume
         * the expression evaluator will return the expected type
         * (by virtue of knowledge we give it about what that type is).
         * A ClassCastException here is truly unexpected, so we let it
         * propagate up.
         */

        url = (String) ExpressionUtil.evalNotNull(
                "import", "url", url_, String.class, this, pageContext);
        if (url == null || url.equals("")) {
            throw new NullAttributeException("import", "url");
        }

        context = (String) ExpressionUtil.evalNotNull(
                "import", "context", context_, String.class, this, pageContext);
        charEncoding = (String) ExpressionUtil.evalNotNull(
                "import", "charEncoding", charEncoding_, String.class, this,
                pageContext);
    }
399774
function(a, b){
		
			//Get value for "a" and "b" element
			var aValue = expression(a);
			var bValue = expression(b);
		
			//Check if one element is greater then the second one
			if(aValue < bValue) return -1;
			if(aValue > bValue) return 1;
			return 0;
		}
1119069
def eval(e, amplitude, e_0, e_break, alpha_1, alpha_2):
        """"""
        K = np.where(e < e_break, 1, (e_break / e_0) ** (alpha_2 - alpha_1))
        alpha = np.where(e < e_break, alpha_1, alpha_2)
        return amplitude * K * (e / e_0) ** -alpha
1043338
def eval(e, amplitude, e_0, alpha):
        """"""

        xx = e / e_0
        return amplitude * xx ** (-alpha)
1252204
def evaluate_inline(self, expression, context=None, escape=None, safe_wrapper=None):
        """"""
        if context is None:
            context = {}

        try:
            with self._evaluation_context(escape, safe_wrapper):
                compiled = self._environment.compile_expression(expression)
                return compiled(**context)
        except jinja2.TemplateError as error:
            raise EvaluationError(error.args[0])
1135786
def get_value(self, expression):
        """"""
        self._check_valid()
        return super(Result, self).get_value(expression)