일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
- Spring Batch
- spring cloud
- 정규표현식
- regex
- JavaScript
- migration
- expire_logs_days
- MySQL
- 퀵소트
- update
- Regular expression
- REACT
- REACTJS
- log_bin
- log4j2
- nodejs
- git
- Chunk
- java
- Effective Java 3/e
- Node
- mysql 5.5
- Effective Java
- upgrade
- spring
- Express
- eslint
- npm
- current_date
- try catch
- Today
- Total
목록java (3)
내 세상
https://hbase.tistory.com/171 [Java] 자바 스트림(Stream) 사용법 및 예제 자바 스트림(Stream) 자바의 스트림(Stream)은 'Java 8'부터 지원되기 시작한 기능이다. 컬렉션에 저장되어 있는 엘리먼트들을 하나씩 순회하면서 처리할 수 있는 코드패턴이다. 람다식과 함께 사용되 hbase.tistory.com Collectors.groupingBy() 와 Collectors.groupingByConcurrent = SQL 언어의 Group BY 절과 유사한 기능을 제공함.
import java.util.regex.Pattern; import java.util.regex.Matcher; class CodeRunner{ public static void main(String[] args) { Pattern p = Pattern.compile("_([0-9]+).txt$", Pattern.CASE_INSENSITIVE); Matcher m = p.matcher("ABC_TEST_BABO_GOSU_COMPUTER_10.txT"); if(m.find()){ System.out.println(m.group(1)); } } } round bucket, 괄호, ( => 괄호로 묶을 경우, group으로 칭한다. m.group(1) => Matcher에서 첫번째 그룹을 가져온다는 의미. ..
https://hashcode.co.kr/code_runners?language=java 코드 실행기 | Hashcode 로그인하시겠습니까? hashcode.co.kr import java.util.Date; import java.util.Locale; import java.text.SimpleDateFormat; class Test{ public static void main(String[] args) { Date today = new Date(); Locale currentLocale = new Locale("KOREAN", "KOREA"); String pattern = "yyyyMMddHHmmss"; //hhmmss로 시간,분,초만 뽑기도 가능 SimpleDateFormat formatter = ..