- 博客(70)
- 收藏
- 关注
转载 Redis
吃住Redis Redis入门指南 Redis设计与实现 Redis实战 基本类型 字符串类型 SDS (simple dynamic string) 还被用作缓冲区:AOF中的AOF缓冲区,客户端状态中的输入缓冲区 c字符串作为字符串字面量(string literal)用在一些无须对字符串值进行修改的地方,如打印日志. Redis使用sdshdr类型变量来存储字符串,redisO...
2018-11-27 14:19:00
153
转载 吐槽
再瞎折腾Linux我就是狗. 拥抱Windows, 快乐编程. 转载于:https://www.cnblogs.com/R4mble/p/10017949.html
2018-11-25 22:46:00
172
转载 Scala实战
Scala实战 Scala读取控制台输入并打印出来 Scala求最大公约数 转载于:https://www.cnblogs.com/R4mble/p/10016389.html
2018-11-25 17:28:00
143
转载 Scala
Scala之旅 久仰Scala, 以前也零零散散地学习过一些. 这次借着要研究Spark的机会, 也顺便把Scala再好好过一遍. Scala目录 Scala基础 模式匹配 隐式转换 函数式编程 面向对象 集合 类型系统 并发 转载于:https://ww...
2018-11-25 03:46:00
98
转载 String比较全解析
== equals 解释 a b true true a c false true a e true true a g true true f g false true String a = "hello2";String...
2018-08-20 15:37:00
123
转载 php非静态方法静态调用
tp5里面的Model,调用with方法时,这个方法本身不是静态的,用->的话,拿不到东西,用::的话,ide会报错。 转载于:https://www.cnblogs.com/R4mble/p/8620947.html...
2018-03-22 00:53:00
183
转载 id一直是Null
@RequestMapping(value = "/obj", produces = "application/json;charset=UTF-8")//7 @ResponseBody //8 public String passObj(DemoObj obj, HttpServletRequest request) { ...
2018-02-06 02:11:00
461
转载 简直不敢相信...
谷歌浏览器害我不浅啊... 转载于:https://www.cnblogs.com/R4mble/p/8416019.html
2018-02-05 08:12:00
108
转载 idea classpath
Source Folders表示的都是代码源文件目录,生成的class文件会输出到target->classess文件夹中,但是里面的源文件不会复制到target->classes文件夹中,Test Source Folders表示的都是测试代码源文件目录,生成的class文件同样会输出到target->classess文件夹中,并且里面的源文件不会复制到target-...
2018-02-04 01:39:00
156
转载 (五)返回两个数组之间的差异
public static int[] difference(int[] first, int[] second) { Set<Integer> set = Arrays.stream(second).boxed().collect(Collectors.toSet()); return Arrays.stream(first) ...
2018-02-03 01:57:00
191
转载 (四)数组扁平化
public static int[] deepFlatten(Object[] input) { return Arrays.stream(input) .flatMapToInt(o -> { if (o instanceof Object[]) { return...
2018-02-03 01:43:00
127
转载 (三)计算数组中某个值出现的次数
public static long countOccurrences(int[] numbers, int value) { return Arrays.stream(numbers) .filter(number -> number == value) .count(); } 转载于:https:/...
2018-02-03 01:20:00
242
转载 (二)连接两个数组返回新数组
public static <T> T[] concat(T[] first, T[] second) { return Stream.concat( Stream.of(first), Stream.of(second) ).toArray(i -> (T[]) Arrays.copyOf(n...
2018-02-03 01:09:00
350
转载 (一)将数组分割成特定大小的小数组。
public static int[][] chunk(int[] numbers, int size) { return IntStream.iterate(0, i -> i + size) .limit((long) Math.ceil((double) numbers.length / size)) ...
2018-02-03 00:15:00
223
转载 1.43(计算f的n次重复应用)
递归写法: (define (repeated f n) (if (= n 1) f (compose f (repeated f (- n 1))))) 迭代写法: (define (repeateds f n) (define (iter i repeated-f) (if (= i ...
2018-01-31 23:56:00
87
转载 1.42(函数的复合)
(define (compose f g) (lambda (x) (f (g x)))) ((compose square inc) 6) ((compose inc inc) 6) 转载于:https://www.cnblogs.com/R4mble/p/8395477.html
2018-01-31 23:54:00
100
转载 1.40(玩弄函数:对一个参数应用两次函数的函数)
(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) 转载于:https...
2018-01-31 23:20:00
84
转载 2.2(点,线段,矩形的构造)
;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...
2018-01-31 22:44:00
126
转载 2.1(构造序对)
(define (make-rat n d) (let ((g (gcd n d))) (cons (/ n g) (/ d g)))) (define (numer x) (car x)) (define (denom x) (cdr x)) (define (print-rat x) (newline) (cond ((= (denom ...
2018-01-31 21:43:00
130
转载 要修改一万个位置的jdk版本
然后按"Ctrl+Shift+Alt+S"打开项目配置,设置Modules的Language Level为"8": 转载于:https://www.cnblogs.com/R4mble/p/8377437.html
2018-01-29 15:11:00
102
转载 8个球7个一样重的,有一个偏重,一个天平,如何两次找出偏重的小球
第一次称的时候,天平两边各放3个球,剩余2个球。 如果天平平衡,说明较轻的球在剩余的两个球中,第二次称的时候只需称剩余的这2个球即可。 如果天平不平衡,从第一次称时相对较轻的那3个球中选2个做第二次称重。第二次称重时,如果天平平衡,则剩下的那个球就是较轻的;如果天平不平衡,较轻的球也就找到了。 转载于:https://www.cnblogs.com/R4mble/p/8371...
2018-01-28 15:42:00
1774
转载 玄学
在sbt添加akka依赖 https://stackoverflow.com/questions/24931902/unresolved-dependencies-error-in-akka 转载于:https://www.cnblogs.com/R4mble/p/8368439.html
2018-01-28 01:32:00
130
转载 异常:java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/LoopTag
jstl 1.3 和 standard 1.1.2不搭配 应当是jstl 1.2 加上 standard 1.1.2 转载于:https://www.cnblogs.com/R4mble/p/8338400.html
2018-01-23 23:43:00
257
转载 提高输入效率
dd 删除当前行 复制粘贴当前行 yyp 删除字符串 dw 开启新一行 esc o 转载于:https://www.cnblogs.com/R4mble/p/8228310.html...
2018-01-07 16:21:00
86
转载 fan
1.mybatis版本设为3.3.0的时候,导入不了包 换成3.4.0就好了 2.cannot find resource . 转载于:https://www.cnblogs.com/R4mble/p/8177312.html
2018-01-02 15:12:00
98
转载 idea
写了一个person的List, idea竟然自动把集合名字命名为people 服了. 转载于:https://www.cnblogs.com/R4mble/p/8035620.html
2017-12-14 00:01:00
85
转载 打印整数的补码
public class IntegerExchange { public static void main(String[] args) { int a = -6; for (int i=0; i<32; i++) { int t = (a & 0x80000000>>>i)...
2017-12-06 10:53:00
185
转载 let应用 找零点
(define (search f neg-point pos-point) (let ((midpoint (average neg-point pos-point))) (if (close-enough? neg-point pos-point) midpoint (let ((test-value (f midpoint))...
2017-11-25 03:13:00
135
转载 1.3.2 let
(define (square x) (* x x)) (define (f x y) (define (f-helper a b) (+ (* x (square a)) (* y b) (* a b))) (f-helper (+ 1 (* x y)) (- 1 y))) (f 1 ...
2017-11-25 02:21:00
83
转载 1.33 (累积互素数)
(define (filtered-accumulate filter? combiner null-value term a next b) (define (iter a result) (cond ((> a b) result) ((filter? a) (iter (next a) ...
2017-11-25 01:57:00
135
转载 1.33 (过滤累积和 求区间内所有素数之和)
(define (filtered-accumulate filter? combiner null-value term a next b) (define (iter a result) (cond ((> a b) result) ((filter? a) (iter (next a) ...
2017-11-25 01:41:00
165
转载 1.32 (更高层次的抽象! 乘法与加法本来就是一回事)
(define (accumulate combiner null-value term a next b) (define (iter a result) (if (> a b) result (iter (next a) (combiner (term a) result)))) (iter a nul...
2017-11-25 01:10:00
110
转载 1.31 (另一种求圆周率的算法)
(define (product term a next b) (if (> a b) 1 (* (term a) (product term (next a) next b)))) (product (lambda (x) x) 1 (lambda (i) (+ i 1)) ...
2017-11-25 00:59:00
135
转载 1.30 (递归的sum变迭代)
(define (sum term a next b) (define (iter a result) (if (> a b) result (iter (next a) (+ (term a) result)))) (iter a 0)) ;test (sum (lambda ...
2017-11-24 23:37:00
117
转载 习题1.29 (积分方法的优化---simpson规则)
(define (sum term a next b) (if (> a b) 0 (+ (term a) (sum term (next a) next b)))) (define (integral f a b dx) ;积分 (define (add-dx x) (+ x dx)) (* (sum ...
2017-11-24 23:26:00
188
转载 1.3.1 (对过程的抽象)
(define (sum-integers a b) (if (> a b) 0 (+ a (sum-integers (+ a 1) b)))) (sum-integers 1 10) (define (sum-cubes a b) (define (cube x) (* x x x)) (if (> ...
2017-11-24 23:02:00
122
转载 SICP习题 1.23(素数查找的去偶数优化)
(define (next n) (if (= n 2) 3 (+ n 2))) (define (find-divisor n test-divisor) (cond ((> (square test-divisor) n) n) ((divides? n test-divisor) test-divisor) ...
2017-11-24 22:00:00
162
转载 SICP习题 1.22(素数)
(define (next-odd n) (if (odd? n) (+ 2 n) (+ 1 n))) (define (smallest-divisor n) (find-divisor n 2)) (define (find-divisor n test-divisor) (cond ((> (square test...
2017-11-24 21:45:00
152
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅