Examples of eval()


Examples of org.sf.bee.commons.script.IBeeScriptEngine.eval()

            final Map<String, Object> scriptContext) {
        if (StringUtils.hasText(script)) {
            final IBeeScriptEngine engine = this.getScriptEngine();
            if (null != engine) {
                try {
                    final Object result = engine.eval(script, scriptContext);
                    return null != result ? Boolean.parseBoolean(result.toString()) : false;
                } catch (Exception ex) {
                    this.getLogger().log(Level.SEVERE, null, ex);
                    return false;
                }
View Full Code Here

Examples of org.springframework.data.redis.connection.DefaultStringRedisConnection.eval()

        final LettuceConnectionFactory factory2 = new LettuceConnectionFactory(SettingsUtils.getHost(),
            SettingsUtils.getPort());
        factory2.afterPropertiesSet();
        DefaultStringRedisConnection conn2 = new DefaultStringRedisConnection(factory2.getConnection());
        try {
          conn2.eval("local time=1 while time < 10000000000 do time=time+1 end", ReturnType.BOOLEAN, 0);
        } catch (DataAccessException e) {
          scriptDead.set(true);
        }
        conn2.close();
        factory2.destroy();
View Full Code Here

Examples of org.webharvest.runtime.scripting.ScriptEngine.eval()

        }

        String returnExpression = scriptDef.getReturnExpression();

        ScriptEngine scriptEngine = language == null ? scraper.getScriptEngine() : scraper.getScriptEngine(language);
        scriptEngine.eval( scriptText.toString() );

        if (returnExpression != null) {
            String returnExpressionEvaluated = BaseTemplater.execute( scriptDef.getReturnExpression(), scraper.getScriptEngine());
            Object returnValue = scriptEngine.eval(returnExpressionEvaluated);
            return CommonUtil.createVariable(returnValue);
View Full Code Here

Examples of parser.Parser.eval()

    ValueMap values = new ValueMap();
    values.put("val1", new BigDecimal(5));
    values.put("val2", new BigDecimal(10));
   
    Parser p = new Parser("val1+val2");
    BigDecimal value = p.eval(p.lexicalVerifier(), values);
    assertEquals(value.compareTo(new BigDecimal("15")), 0);
  }
 
  @Test
  public void testMinus() throws LexicalException, Exception {
View Full Code Here

Examples of plan_runner.expressions.ValueExpression.eval()

    if (_comeFromFirstEmitter)
      val = (ValueExpression) comparison.getExpressions().get(0);
    else
      val = (ValueExpression) comparison.getExpressions().get(1);

    _valuesToIndex.add(val.eval(_tuple).toString());
    _typesOfValuesToIndex.add(val.getType().getInitialValue());
  }

  @Override
  public void visit(LikePredicate like) {
View Full Code Here

Examples of redis.clients.jedis.BinaryJedis.eval()

  BinaryJedis binaryJedis = new BinaryJedis(hnp.getHost(), hnp.getPort(),
    500);
  binaryJedis.connect();
  binaryJedis.auth("foobared");

  List<byte[]> responses = (List<byte[]>) binaryJedis.eval(
    script.getBytes(), keys, args);
  assertEquals(5, responses.size());
  assertEquals("key1", new String(responses.get(0)));
  assertEquals("key2", new String(responses.get(1)));
  assertEquals("first", new String(responses.get(2)));
View Full Code Here

Examples of redis.clients.jedis.Pipeline.eval()

    @Test
    public void testEval() {
  String script = "return 'success!'";

  Pipeline p = jedis.pipelined();
  Response<String> result = p.eval(script);
  p.sync();

  assertEquals("success!", result.get());
    }
View Full Code Here

Examples of sisc.Interpreter.eval()

      = (SchemeInterpreter)manager.lookup(SchemeInterpreter.ROLE);
    Symbol mainFunction = interpreters.getMainFunction();
    Interpreter interp = interpreters.getInterpreter();

    try {
      return interp.eval(handler.getContent());
    }
    finally {
      interpreters.releaseInterpreter(interp);
    }
  }
View Full Code Here

Examples of tcl.lang.Interp.eval()

      int code = 0;
  String result = interp.getResult().toString();
      synchronized (interp) {
      try {
    interp.eval(callback + " " +
      ReflectObject.newInstance(interp, Request.class, request));
      } catch (TclException e) {
    code = e.getCompletionCode();
    String trace = e.toString();
    System.out.println("Tcl Oops: "  + code + " " + e);
View Full Code Here

Examples of tv.floe.metronome.eval.Evaluation.eval()

    System.out.println("--- Predictions XOR ----");
    MatrixUtils.debug_print(predict);
    //log.info(predict.toString());

    Evaluation eval = new Evaluation();
    eval.eval( y_xor_Matrix, predict );
    //log.info(eval.stats());
    System.out.println( eval.stats() );

    System.out.println( "Total Correct: " + eval.correctScores() + " out of " + x_xor_Matrix.numRows() );
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.