02 2022 档案
摘要:在macos终端启动tesseract可以识别,但是在idea工程启动就报以下错误 java.lang.UnsatisfiedLinkError: Unable to load library 'tesseract': Native library (darwin/libtesseract.dyli
阅读全文
摘要:::是java8的新特性,叫做方法引用 由于lamdba表达式中不可以直接执行方法,所以出现了方法引用 import java.util.ArrayList; public class Test { public static void main(String[] args) { // 实例方法的方
阅读全文
摘要:####当我们不知道传进来的对象有哪些属性并却还要赋值的时候,可以使用反射机制 class Test{ public static void main(String[] args) throws Exception { // Student student = new Student("factor
阅读全文
摘要:1.获取变量注解上的属性值 注解类 @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) @interface primaryKey { String name() default ""; } 测试方法 @Test public
阅读全文
摘要:统计文件行数 public static int getTotalLines(String filePath) throws IOException { LineNumberReader reader = new LineNumberReader(new FileReader(filePath));
阅读全文