algebra

Algebra equation parser for java

北城余情 提交于 2019-11-26 16:34:11
问题 I need a library to be able to parse an equation an give me the result giving the inputs. For example something like this: String equation = "x + y + z"; Map<String, Integer> vars = new HashMap<String, Integer>(); vars.add("x", 2); vars.add("y", 1), vars.add("z", 3); EquationSolver solver = new EquationSolver(equation, vars); int result = solver.getResult(); System.out.println("result: " + result); And evaluates to: 6 Is there any kind of library for java that can do that for me? Thanks 回答1:

How to transform black into any given color using only CSS filters

霸气de小男生 提交于 2019-11-26 08:46:44
问题 My question is: given a target RGB color, what is the formula to recolor black ( #000 ) into that color using only CSS filters? For an answer to be accepted, it would need to provide a function (in any language) that would accept the target color as an argument and return the corresponding CSS filter string. The context for this is the need to recolor an SVG inside a background-image . In this case, it is to support certain TeX math features in KaTeX: https://github.com/Khan/KaTeX/issues/587.