
Copy a path or a reference Use the Edit | Copy Path/Reference action to insert a reference to a field/method/class/file into the current position in the editor. Position the caret within the myMethod method name and press Ctrl Alt Shift C . To paste the reference, press Ctrl V . You can also copy references in the Go to Class/Go to Symbol/Go to File dialogs. Press Ctrl C on any element in the lo..
상황. 화면 또는 다른 프로세스에서 "20231222" 형식으로 문자열을 받았다. 하루를 더하고 빼고 비교하는 등의 연산을 해야 한다. 예전(JDK7 이하 버전) 에서는 Calander이나 Date 객체를 사용했었다. 이 객체들에는 소소한 문제들이 있었는데, JDK8 버전부터 LocalDate, LocalTime, LocalDateTime 를 지원하기 시작하면서 그런 문제들이 사라졌다. 따라서 JDK8 이상의 버전을 사용하고 있다면 앞으로 이 객체들을 사용하자 날짜형 전환 우선 "20231222" 라는 문자열로 받은 데이터를 날짜 형식의 객체로 전환해야 한다. LocalDate 에는 LocalDate.of(년, 월, 일) 이라는 훌륭한 메서드를 제공한다. 따라서 "20231222" 를 substring ..

Verify regular expressions To verify that your regular expression is correct, place the caret within the expression you want to check, press Alt Enter , and select Check RegExp. In the popup, type a sample string that should match your regular expression. The icon shows that the match occurred.

View inheritance hierarchy To see the inheritance hierarchy for the selected class, press Ctrl H (Navigate | Type Hierarchy). You can also invoke the hierarchy view directly from the editor to see the hierarchy for the currently edited class.

View code reference information You can use Ctrl Q (View | Quick Documentation), Ctrl P (View | Parameter Info), Ctrl B (Navigate | Declaration), and similar shortcuts not only in the editor but also in the suggestions list while using code completion.
자바스크립트의 Date() 객체는 시간의 한 점을 플랫폼에 종속되지 않는 형태로 나타낸다. Date() 객체는 1970년 1월 1일 UTC(협정 세계시) 자정과의 시간 차이를 밀리초로 나타내는 정수 값을 담고 있다. 아래는 Date()를 활용할때 가장 많이 사용하는 방법을 정리해 보았다. 생성자 Date() 객체는 클래스 이기 때문에 생성자 호출을 통해 객체를 생성한다. 이때 생성자에 어떠한 인자를 넣느냐에 따라 객체를 통해 얻어 낼 수 있는 시간 데이터가 달라진다. new Date(); new Date(value); new Date(dateString); new Date(year, monthIndex); new Date(year, monthIndex, day); new Date(year, monthIn..

기준 관리 화면에 아래와 같이 시작시간과 종료시간을 추가해 달라는 요청을 받았다. 단순히 위 그림과 같이 '시작시간'과 '종료시간'을 입력(선택) 받아 저장하면 좋겠지만 입력받은 값이 제대로 되어 있는지 체크까지 해줘야 하는게 우리의 일이다. 오늘은 그 과정을 풀이해보려고 한다. 특정 날짜를 지정 위 그림을 보면 알겠지만 특정 날짜를 입력 받는 것은 아니고, 단순히 '당일'/'익일'만 선택 할 수 있도록 되어 있다. 시간과 날짜를 계산하기 위해서는 임의라도 날짜가 필요하다. 따라서 날짜는 아래와 같이 고정 하였다. 당일 : 1970.01.01 익일 : 1970.01.02 이미 눈치챈 사람도 있을 것이다. 1970년 01월 01일은 timestamp의 시작 날짜이다. 이제 위에 식을 코드로 짜보자 let ..
function calcDistance(locLat, locLng, myLat, myLng){ const earth_r = 6371; //지구 반지름(km) const dLat = deg2Rad(myLat - locLat); const dLng = def2Rad(myLng - locLng); const a = Math.sin(dLat/2) * Math.sin(dLat/2) + Math.cos(deg2Rad(LocLat)) * Math.cos(deg2Rad(myLat)) * Math.sin(dLng/2) * Math.sin(dLng/2); const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); const distance = earth_r * c; return d..

Compare archives To compare two .jar , .zip or .phar archives or even files inside an archive, select them in the Project tool window and press Ctrl D . The Compare Archives feature is integrated with the Java bytecode decompiler and allows you to see what exactly has changed between two different versions of a library.
서버나 다른 화면으로 부터 '20231121' 과 같은 8자리 문자열을 리턴 받았다. 이 데이터를 화면에 그대로 보여주기 보다는 '년.월.일' 혹은 '년/월/일' 하는 형식으로 포멧을 적용해 보여주는 것이 사용자 경험에 중요한 역활을 할 것이다. 이런 데이터가 수시로 넘어 올 것이기 때문에 아래와 같이 함수를 만들었다. function formatByYmd(ymd){ return ymd.replace(/(\d{4})(\d{2})(\d{2})/, '$1.$2.$'); } 이제 서버에서 '20231121' 과 같은 데이터가 넘어오면 이 함수를 통해 '2023.11.21'로 바뀌게 될 것이다. 만약 구분자를 '/' 나 '-' 같은 형식으로 변경하고 싶다면 replace의 두 번째 인자인 '$1.$2.$3'을 ..

Use colors for data sources You can use colors to distinguish between your data sources and their elements. To set a color to a data source or its object, right-click the element in the Database tool window ( View | Tool Windows | Database ) and select Tools | Set Color.
- Total
- Today
- Yesterday
- MAC OS STS Spring
- 한빛미디어
- JEPQ
- IntelliJ
- 라즈베리파이3
- Linux
- 게시판
- 아침 글쓰기 챌린지
- spring board
- 리눅스
- 티스토리챌린지
- spring
- 오블완
- java
- 회고
- ETF투자
- openjdk
- 개발팁
- 도서
- SCHD
- php mvc
- 아침글쓰기
- Spring 게시판
- 스프링
- Raspberry pi3
- 아침 글쓰기
- 글쓰기
- 투자기록
- Tip of the day
- etf
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |