leon90dm / aviator Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/aviator
Automatically exported from code.google.com/p/aviator
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
att
Original issue reported on code.google.com by [email protected]
on 22 May 2014 at 4:26
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.