Examples of eval()


Examples of com.l2jfrozen.gameserver.scripting.L2ScriptEngineManager.eval()

  {
    L2ScriptEngineManager sem = L2ScriptEngineManager.getInstance();
    ScriptContext context = sem.getScriptContext("beanshell");
    try
    {
      sem.eval("beanshell", "double log1p(double d) { return Math.log1p(d); }");
      sem.eval("beanshell", "double pow(double d, double p) { return Math.pow(d,p); }");

      for(ScriptDocument script : _scripts)
      {
        parseScript(script, context);
View Full Code Here

Examples of com.mongodb.DB.eval()

  public final Fixture runInDatabaseQueryAndCleanupDatabases(
  final String database, final String query, final boolean cleanupDB) {
    DB srcDB = getDB(src, database);
    DB tgtDB = getDB(tgt, database);
    Number srcResult = (Number) srcDB.eval(query);
    Number tgtResult = (Number) tgtDB.eval(query);
    if (cleanupDB) {
      cleanupDBs(srcDB, tgtDB);
    }
    Result result = new Result(srcResult.longValue(), tgtResult.longValue());
    return new SetFixture(Collections.singletonList(result));
View Full Code Here

Examples of com.nr.fe.Chebyshev.eval()

    bjn bjn = new bjn();
    Chebyshev cheb = new Chebyshev(bjn,aa,bb,NN);
    m=cheb.setm(thresh);
    for (i=0;i<MM;i++) {
      x=-5.0+i;
      y[i]=cheb.eval(x,m);
      yy[i]=bjn.funk(x);
    }
    System.out.printf("Chebyshev (eval): Maximum discrepancy = %f\n", maxel(vecsub(y,yy)));
    localflag = maxel(vecsub(y,yy)) > sbeps;
    globalflag = globalflag || localflag;
View Full Code Here

Examples of com.objfac.prebop.Expression.eval()

      }
      catch (PreprocessorError e) {
        throw new RuntimeException("Failed to contruct expression: " + line, e);
      }
      try {
        return exp.eval();
      }
      catch (PreprocessorError e) {
        throw new RuntimeException("Failed to process expression: " + line, e);
      }
    }
View Full Code Here

Examples of com.odiago.flumebase.parser.Expr.eval()

    // Evaluate all our input expressions, left-to-right, and emit
    // their results into the output record.
    for (AliasedExpr aliasedExpr : mExprs) {
      Expr expr = aliasedExpr.getExpr();
      Object result = nativeToAvro(expr.eval(e), expr.getResolvedType());
      String fieldName = aliasedExpr.getAvroLabel();
      record.put(fieldName, result);
    }

    // Now add to our output record, any fields that we can pull in directly from
View Full Code Here

Examples of com.openbravo.pos.scripting.ScriptEngine.eval()

            msg.show(this);
        } else {
            try {
                ScriptEngine script = ScriptFactory.getScriptEngine(ScriptFactory.VELOCITY);
                script.put("payments", m_PaymentsToClose);
                m_TTP.printTicket(script.eval(sresource).toString());
            } catch (ScriptException e) {
                MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotprintticket"), e);
                msg.show(this);
            } catch (TicketPrinterException e) {
                MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotprintticket"), e);
View Full Code Here

Examples of com.redhat.ceylon.tools.new_.Template.eval()

    }
   
    @Test
    public void testSimple() {
        Template t = new Template("This is a test @[foo]\n@[bar]");
        Assert.assertEquals("This is a test FOO\nBAR", t.eval(env(
                "foo", "FOO",
                "bar", "BAR")));
    }
   
    @Test
View Full Code Here

Examples of com.sun.pdfview.function.postscript.operation.PostScriptOperation.eval()

    PostScriptParser p = new PostScriptParser();
    List<String> tokens = p.parse(text);
    for (Iterator<String> iterator = tokens.iterator(); iterator.hasNext(); ) {
      String token = iterator.next();
      PostScriptOperation op = OperationSet.getInstance().getOperation(token);
      op.eval(stack);
    }
    return stack;
  }

 
View Full Code Here

Examples of com.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval()

        Vertex pete = this.g.addVertex(T.label, "Person", "name", "pete");
        marko.addEdge("friend", john);
        marko.addEdge("friend", pete);
        this.g.tx().commit();

        Object result = engine.eval("g.v(" + marko.id().toString() + ").outE('friend')", bindings);
        assertTrue(result instanceof GraphTraversal);

        this.g.tx().commit();
        assertEquals(2L, ((GraphTraversal) result).count().next());
    }
View Full Code Here

Examples of com.tinygo.logic.BouzyMap.eval()

            }
            return notify;
        }
        boolean doScoreDone() {
            BouzyMap bmap = new BouzyMap(game.board);
            bmap.eval();
            Score score = game.getScore(bmap);

            statusScreen.displayScore(score);
//      Alert a = new Alert(LC._("Result"), score.scoreText, null, AlertType.INFO);
//      a.setTimeout(Alert.FOREVER);
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.