摘要: Source Folders表示的都是代码源文件目录,生成的class文件会输出到target->classess文件夹中,但是里面的源文件不会复制到target->classes文件夹中,Test Source Folders表示的都是测试代码源文件目录,生成的class文件同样会输出到targe 阅读全文
posted @ 2018-02-04 01:39 R4mble 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 只保留 b 中不包含的值。 阅读全文
posted @ 2018-02-03 01:57 R4mble 阅读(160) 评论(0) 推荐(0) 编辑
摘要: public static int[] deepFlatten(Object[] input) { return Arrays.stream(input) .flatMapToInt(o -> { if (o instanceof Object[]) { return Arrays.strea... 阅读全文
posted @ 2018-02-03 01:43 R4mble 阅读(113) 评论(0) 推荐(0) 编辑
摘要: public static long countOccurrences(int[] numbers, int value) { return Arrays.stream(numbers) .filter(number -> number == value) .count(); } 阅读全文
posted @ 2018-02-03 01:20 R4mble 阅读(298) 评论(0) 推荐(0) 编辑
摘要: public static T[] concat(T[] first, T[] second) { return Stream.concat( Stream.of(first), Stream.of(second) ).toArray(i -> (T[]) Arrays.copyOf(new Object[0], i, first... 阅读全文
posted @ 2018-02-03 01:09 R4mble 阅读(155) 评论(0) 推荐(0) 编辑
摘要: public static int[][] chunk(int[] numbers, int size) { return IntStream.iterate(0, i -> i + size) .limit((long) Math.ceil((double) numbers.length / size)) //返回大于或等于... 阅读全文
posted @ 2018-02-03 00:15 R4mble 阅读(419) 评论(0) 推荐(0) 编辑
摘要: 递归写法: 迭代写法: 阅读全文
posted @ 2018-01-31 23:56 R4mble 阅读(174) 评论(0) 推荐(0) 编辑
摘要: (define (compose f g) (lambda (x) (f (g x)))) ((compose square inc) 6) ((compose inc inc) 6) 阅读全文
posted @ 2018-01-31 23:54 R4mble 阅读(171) 评论(0) 推荐(0) 编辑
摘要: (define (double f) (lambda (x) (f (f x)))) (define (inc x) (+ x 1)) (((double (double double)) inc) 5) ;amazing (((double (double (double double))) inc) 0) 阅读全文
posted @ 2018-01-31 23:20 R4mble 阅读(140) 评论(0) 推荐(0) 编辑
摘要: ;2.2 (define (make-point x y) (cons x y)) (define (x-point p) (car p)) (define (y-point p) (cdr p)) (define (print-point p) (newline) (display "{") (display (x-point p)) (display ","... 阅读全文
posted @ 2018-01-31 22:44 R4mble 阅读(141) 评论(0) 推荐(0) 编辑