上一页 1 ··· 156 157 158 159 160 161 162 163 164 ··· 494 下一页
摘要: Sream<Employee> emps = ...; emps.sorted( Comparator.comparingInt(Employee::getSalary) .reversed() ).limit(10) .map(Employee::getName) .forEachOrdered( 阅读全文
posted @ 2021-01-18 22:43 Zhentiw 阅读(436) 评论(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 阅读(132) 评论(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 阅读(158) 评论(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 阅读(135) 评论(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 阅读(95) 评论(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 阅读(107) 评论(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 阅读(57) 评论(0) 推荐(0)
摘要: @ControllerAdvice public class DefaultAttributeController { // apply default value @ModelAttribute("newuser") public User getDefaultUser() { return ne 阅读全文
posted @ 2021-01-13 19:40 Zhentiw 阅读(124) 评论(0) 推荐(0)
摘要: Create file: // this apply to all the controllers @ControllerAdvice public class ApplicationExceptionHandler { @ExceptionHandler(ApplicationException. 阅读全文
posted @ 2021-01-13 19:36 Zhentiw 阅读(88) 评论(0) 推荐(0)
摘要: Controller: @Controller public class LoginController { private UserRepository userRepository; @PostMapping("/login") public String login(@ModelAttribu 阅读全文
posted @ 2021-01-13 01:18 Zhentiw 阅读(64) 评论(0) 推荐(0)
上一页 1 ··· 156 157 158 159 160 161 162 163 164 ··· 494 下一页