GithubHelp home page GithubHelp logo

aviator's People

Watchers

 avatar

aviator's Issues

没有正确处理超大数的扫描

System.out.println(AviatorEvaluator.execute("100000000000000000000.0/3.0"));
//      2.5887598771507471E18

System.out.println(AviatorEvaluator.execute("100000000000000000000/3"));
//      2588759877150747306

正确结果应为

3.33333333333⋯⋯

Original issue reported on code.google.com by [email protected] on 13 Dec 2011 at 8:17

JRocket 6 not support Long.compare

What steps will reproduce the problem?
1.JRocket 6 not support Long.compare (int Aviator 2.3.0 
AviatorNumber.innerCompare)
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 26 Aug 2013 at 3:15

做了一个简单的测试,出错了

下载后导入lib下的所有jar和aviator-1.0.0-RC.jar
Src Code:
      Map<String, Object> env = new HashMap<String, Object>();
      env.put("email", "[email protected]");
      final TestObject testObject = new TestObject();
      //env.put("obj", testObject);
      String username = (String) AviatorEvaluator.execute("email=~/([\\w0-8]+@\\w+[\\.\\w+]+)/ ? $1:'unknow'", env);

Exception:
Exception in thread "main" java.lang.NoSuchMethodError: 
org.objectweb.asm.ClassWriter.<init>(I)V
    at com.googlecode.aviator.code.asm.ASMCodeGenerator.<init>(ASMCodeGenerator.java:86)
    at com.googlecode.aviator.AviatorEvaluator.compile(AviatorEvaluator.java:176)

Original issue reported on code.google.com by [email protected] on 2 Jul 2010 at 10:46

When using ScriptEngine to eval script, have not using correct scope variable.

What steps will reproduce the problem?
1. When using ScriptEngine to eval script, have not using correct scope 
variable.

What is the expected output? What do you see instead?
The next code can't run successful.
public class AviatorTest {

    private ScriptEngineManager manager = new ScriptEngineManager();
    private ScriptEngine engine = manager.getEngineByName("Aviator");

    @Test
    public void testGlobal2VarScope() throws ScriptException {
        String script = "greeting";
        Object eval;

        // ScriptEngineManager scope
        manager.put("greeting", "ScriptEngineManager scope");
        eval = engine.eval(script);
        assertEquals("ScriptEngineManager scope", eval);

        // ScriptEngine scope
        engine.put("greeting", "ScriptEngine scope");
        eval = engine.eval(script);
        assertEquals("ScriptEngine scope", eval);

        // Bindings scope
        Bindings bindings = engine.createBindings();
        bindings.put("greeting", "Bindings scope");
        eval = engine.eval(script, bindings);
        assertEquals("Bindings scope", eval);
    }
}

What version of the product are you using? On what operating system?
Version: aviator 2.2.1
JDK: 1.6.0_23
OS: Windows xp

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 10 Mar 2012 at 11:55

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.