上一页 1 ··· 160 161 162 163 164 165 166 167 168 ··· 498 下一页
摘要: To void: forEach, forEachOrdered, peek stream.peek(System.out::println) // print without termination .filter(n -> n > 0) .distinct() .limit(10) .forEa 阅读全文
posted @ 2021-01-21 03:19 Zhentiw 阅读(94) 评论(0) 推荐(0)
摘要: Saying that we have some icons and a target sum, for example 16. How to choose which and how many icons to include to reach the target but minize the 阅读全文
posted @ 2021-01-19 03:00 Zhentiw 阅读(63) 评论(0) 推荐(0)
摘要: Sream<Employee> emps = ...; emps.sorted( Comparator.comparingInt(Employee::getSalary) .reversed() ).limit(10) .map(Employee::getName) .forEachOrdered( 阅读全文
posted @ 2021-01-18 22:43 Zhentiw 阅读(439) 评论(0) 推荐(0)
摘要: A serial of number, you cannot add siblings number together. To calcaulate what is the max sum value. Thinking: 1. Weather I should add current number 阅读全文
posted @ 2021-01-18 18:21 Zhentiw 阅读(139) 评论(0) 推荐(0)
摘要: <!-- HTML --> <div class="wrap"> <div class="headers"> <div class="scroller"> <div class="track"> <div class="heading">Heading 1</div> </div> ... </di 阅读全文
posted @ 2021-01-18 16:17 Zhentiw 阅读(166) 评论(0) 推荐(0)
摘要: Fibonacci sequence: The most well-known approach is memoization. Advantage is fast, but space complexity is big. O(N). Bottom-up: 1 : Bottom-up dynami 阅读全文
posted @ 2021-01-18 03:35 Zhentiw 阅读(145) 评论(0) 推荐(0)
摘要: Why need to use @ResponseEntity, first let's see what problem we might have when we don't use it. @RestController public class ProductsRestController 阅读全文
posted @ 2021-01-15 21:38 Zhentiw 阅读(99) 评论(0) 推荐(0)
摘要: Interceptor jump in before controller. So request may not reach controller if Pre-process is not ok. Demo: package com.test.hplus.interceptors; import 阅读全文
posted @ 2021-01-15 19:56 Zhentiw 阅读(114) 评论(0) 推荐(0)
摘要: In this lesson, you will learn how to extend a class's functionality through typescript decorators. Decorators provide a way to add both annotations a 阅读全文
posted @ 2021-01-14 04:21 Zhentiw 阅读(59) 评论(0) 推荐(0)
摘要: @ControllerAdvice public class DefaultAttributeController { // apply default value @ModelAttribute("newuser") public User getDefaultUser() { return ne 阅读全文
posted @ 2021-01-13 19:40 Zhentiw 阅读(131) 评论(0) 推荐(0)
上一页 1 ··· 160 161 162 163 164 165 166 167 168 ··· 498 下一页