#build https://github.com/stevenjoezhang/fractal-tree/ #bash fix instruction
git clone https://github.com/stevenjoezhang/fractal-tree &&cd fractal-tree
npm install
sed 's/script src="js\/bundle.js"/\0 type="module"/' -i public/index.html
pushd src/js/ &&sed "s/'Three/'three/g" -i environment.js -i index.js -i tree.js
popd
npm start # 会自动 npm run build-dev 输出 public/js/bundle.js
#linux #Learn #Java #math #build #bash fix for Desoms (Kt, Java:Algebra)
1. Java Desmos 求解后端
2. Kotlin Desmos 简单重写
手动复制粘贴 https://paste.ubuntu.com/p/Q4DnzrZ37Z/ 或(源地址)到 Window.kt ,因为 国内 #China 许多地方不仅 #GitHub raw 连 pastebin 都连不上 🌚🌝 #freedom
然后
感觉 maven 依赖这么多插件 archetype, install, exec 完成日常任务,有点不平衡吧……
此外还看到了生成本地文件依赖的 Maven #doc https://stackoverflow.com/questions/6704813/maven-generating-pom-file
#parser https://github.com/mariuszgromada/MathParser.org-mXparser 我草这玩意又不支持逆向计算,有啥好吹的
还夸张地弄了那么多图,太那啥了
http://scalarmath.org/wp-content/uploads/2019/01/scalar-promo-screens.png 弄个心型函数还要用户自己推导正向公式, 就凭这? 一个 evaluator 和 Python, JS eval 之类的东西有什么区别
不愧是 Java EE 搞出来的混乱怪物,就喜欢一些毫无意义的老套封装
1. Java Desmos 求解后端
git clone https://github.com/galbar07/Desmos.git DesmosJ &&cd DesmosJ因为 mvng 没有写完不能用脚本生成 POM 修复了 emm ,当然有 IDE 就能直接用(不过这年头 只会用 IDE 建项目 对细节一无所知的人真的有创造力吗 😑 )
sed 's/import org.junit.jupiter.api.BeforeEach;//;s/@BeforeEach//;' -i tests/Functions_GUITest.java
javac -cp `ls JAR/gson-*.jar`:`ls ~/.m2/repository/junit/junit/4.0/junit-*.jar` ex1/*.java tests/Functions_GUITest.java
java -cp . ex1.StdDraw
#java -cp ".:`ls JAR -m|sed 's/, /:/g'`" tests.Functions_GUITest
java -cp `find JAR -type f -printf '%p:'`. tests.Functions_GUITest
2. Kotlin Desmos 简单重写
手动复制粘贴 https://paste.ubuntu.com/p/Q4DnzrZ37Z/ 或(源地址)到 Window.kt ,因为 国内 #China 许多地方不仅 #GitHub raw 连 pastebin 都连不上 🌚🌝 #freedom
mvn archetype:help
#mkdir DesmosKt &&cd DesmosKt
#mvn archetype:generate -DgroupId=com.example - DartifactId=desmos -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
mvn archetype:generate -DgroupId=me.nanjingchj -DartifactId=DesmosKt -DarchetypeArtifactId=kotlin-archetype-jvm -DarchetypeGroupId=org.jetbrains.kotlin -DarchetypeVersion=1.4.21 -DinteractiveMode=false
cd DesmosKt
mkdir -p src/main/kotlin/me/nanjingchj/desmos/
cat>`find -type d -name desmos`/Window.kt
mvnDeps=`python -c 'from lxml import etree,builder; s="org.mariuszgromada.math:MathParser.org-mXparser:4.4.2";E=builder.E;e=E("dependency", *(E(k, v) for v,k in zip(s.split(":"), "groupId artifactId version".split(" ")))); print(etree.tostring(e).decode())'`
sed "38i\ ${mvnDeps}" -i pom.xml
echo 'object Main{@JvmStatic fun main(vararg a:String){System.setProperty("sun.java2d.opengl","True"); me.nanjingchj.desmos.Window()} }'>`find -type d -name kotlin|head -n1`/Main.kt
然后
mvn package exec:java -Dexec.mainClass=Main
即可感觉 maven 依赖这么多插件 archetype, install, exec 完成日常任务,有点不平衡吧……
此外还看到了生成本地文件依赖的 Maven #doc https://stackoverflow.com/questions/6704813/maven-generating-pom-file
mvn install:install-file
#parser https://github.com/mariuszgromada/MathParser.org-mXparser 我草这玩意又不支持逆向计算,有啥好吹的
还夸张地弄了那么多图,太那啥了
http://scalarmath.org/wp-content/uploads/2019/01/scalar-promo-screens.png 弄个心型函数还要用户自己推导正向公式, 就凭这? 一个 evaluator 和 Python, JS eval 之类的东西有什么区别
不愧是 Java EE 搞出来的混乱怪物,就喜欢一些毫无意义的老套封装
GitHub
GitHub - galbar07/Desmos: Desmos
Desmos. Contribute to galbar07/Desmos development by creating an account on GitHub.