感谢deepseek
1 | import cv2 |
感谢deepseek
1 | import cv2 |
1 between 0 and 4 的编译结果:
1 | package org.kie.dmn.feel.codegen.feel11.genadeb1f468481413bbc5bfd45c3422978; |
between调用的方法是org.kie.dmn.feel.codegen.feel11.CompiledFEELSemanticMappings.between方法,是预先写好的。
我觉得相比于ast的方式,把一些变量放在类里面了。编译完之后也可以直接加载使用。
The retrieved
CompiledFEELExpression
could be a statically-interpretedInterpretedExecutableExpression
(that wraps the originalBaseNode
ast) or could be a dynamically-code-generatedCompiledExecutableExpression
.
In the first case, evaluation is executed by the DMN code as it is statically defined.
In the latter case, code is generated out of the given model. In that code, some variable will be directly written in the generated, speeding up its execution.
https://sentinelguard.io/zh-cn/docs/system-adaptive-protection.html
1 | // total thread |
qps * rt==当前的线程数就是最佳的负载。如果当前线程数据>qps * rt可以认为新进来的请求会产生积压。
qps * rt 就是当前系统的消费能力。线程数就是当前的生产能力。
正常还是需要组合其他策略使用。
只能在入口使用是因为需要当前cpu负载激发。
1 | if (highestSystemLoadIsSet && getCurrentSystemAvgLoad() > highestSystemLoad) { |
但实际上是不是也可以对下游也这么干?现在都是微服务架构,如何根据下游的能力实时的进行出口限流?
https://github.com/kiegroup/drools/tree/main/kie-dmn/kie-dmn-feel:
antlr4词法解析,通过vistor生成抽象语法树,执行。但是可以用javaparser将ast生成java代码,再编译成class执行。其原理效果还不太明确。
例子:
https://stackoverflow.com/questions/29971097/how-to-create-ast-with-antlr4
https://camunda.github.io/feel-scala/:
用的scala实现
readme里有一段最近被删掉了。
The following resources can help to understand some general concepts behind the implementation:
2024-08-30/2024-09-03
总自费3000元左右。
设备:A6700 18-135
决策模型和符号(DMN™)是由 OMG® 制定的一项标准,它提供了一种通用且可视化的符号,所有用户和角色都可以轻松理解。借助 DMN,业务分析师可以定义初始决策需求,然后将更详细的决策模型形式化;技术开发人员可以使用可移植的执行语义来自动执行任何流程中的决策,而业务利益相关者可以管理和监控这些决策。
https://www.omg.org/spec/DMN/1.5/Beta1
1 |
https://marketplace.visualstudio.com/items?itemName=kie-group.dmn-vscode-extension
https://bpmn.io/toolkit/dmn-js/
@kogito-tooling/kie-editors-standalone
DMN 更易于理解和维护,更适合业务人员参与
DMN 支持图形化的决策模型,更直观
DMN 提供了更丰富的决策元素和功能,更灵活
DMN 标准化程度更高,更易于与其他系统集成
无论是easyExcel或者poi等excel处理框架,在生成excel时都需要同步等待操作。但如果数据量较大,生成excel的时间会比较长,对于用户来说需要等待,影响体验。这时候就需要考虑使用流式生成excel。
下面提供了几种方案实现流失生成,能够在页面上直接开启下载。
excel2017版本之后,文件本身其实是一个zip文件,里面包含了多个xml文件,这些xml文件描述了excel的内容。所以我们可以通过流式生成xml文件,然后将这些xml文件打包成zip文件,最后返回给浏览器。
1 | public ExcelGenerator(InputStream template, Integer dataIndex, OutputStream outputStream) throws IOException { |
前端可以通过restful接口获取到excel内容,然后通过blob对象生成excel文件,最后通过a标签的download属性下载excel文件。
https://medium.com/@Nopziiemoo/create-excel-files-using-javascript-without-all-the-fuss-2c4aa5377813
使用dify.ai构建考试问答机器人
发现问卷星没有强制使用https,本地配置hosts
1 | 127.0.0.1 kaoshi.wjx.top |
实现一个代理服务,注入我们的js代码,实现答题时访问dify api 获取答案,将答案拼接在问题下面。将原来的地址改成http访问,也省需要mitm了。
当然也需要将代理返回内容里的https改成http,否则就访问不了了。
1 | from http.server import HTTPServer, BaseHTTPRequestHandler |
1 | document.addEventListener("DOMContentLoaded", (event) => { |