![](https://img-blog.csdnimg.cn/20190927151101105.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
小工具
开发中可能用到的小工具
qq_41911762
为每行代码增添注释
展开
-
java生成验证码,字母或数学表达式及表达式计算
看看效果public static void main(String[] args) throws Exception { //字母数字验证码 Map map = CodeUtil.generateCodeAndPic(); OutputStream outputStream = new FileOutputStream("C:\\Users...原创 2020-04-07 02:59:09 · 417 阅读 · 1 评论 -
java实现简单计算器,支持整数计算、小数计算和精确计算,支持正负数
为了使用简单数学表达式做验证码,就要计算生成的表达式的计算结果,就去看了下数学表达式计算的方法。本来只计算简单的整型加减法的,但是最后整理了下,能计算小数。核心算法:以整数计算为例public Integer calculate(String[] expr) throws IllegalOperandException { Stack<Integer> n...原创 2020-04-07 00:18:15 · 1781 阅读 · 0 评论