일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 권한정책
- Spring
- 널포인터에러
- Annotation
- mybatis
- 리스트비교
- ansible
- hashset
- Java
- anymatch메서드
- route53
- list중복제거
- awsconsole
- lightsail
- instance생성
- 두개리스트비교
- wordpress블로그
- 지옥같은git
- 리스트차집합
- xml
- AWS
- peer authentication 에러
- 중복제거
- postgresql13
- WordPress
- PostgreSQL
- 리스트교집합
- 리스트합집합
- enum
- db
- Today
- Total
목록전체 글 (35)
Anyway
truncate table model_data, public.model_data_sub, public.model_data_history, public.md_suitability, public.model_data_sub_history, public.md_suitability_history restart identity fk 로 묶여있는 테이블들이 있어서 한꺼번에 truncate 시켜주니 테이블은 그대로 내용은 싹 다 삭제된다.
SELECT object_type, object_name, description FROM service_master ▪️ 현재 쿼리 > object_type에 실제로 들어가 있는 값에 따라 다르게 출력하고 싶었다. SELECT CASE WHEN object_type = 'apple' THEN 'Apple' WHEN object_type = 'green' THEN 'Green' ELSE object_type END AS object_type, object_..
OS : Rhel 8.4 OS 파악 필요 시 cat /etc/os-release 1. PostgreSQL ver13 Install 1-1. PostgreSQL13 Repository 추가sudo yum install -y https://download.postgresql.org/pub/repos/yum/13/redhat/rhel-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm 1-2. 기본 모듈 비활성화sudo dnf -qy module disable postgresql 1-3. Installsudo yum install -y postgresql13 postgresql13-server 1-4. 초기화sudo /usr/pgsql-13/bin/postgresql-13-setu..

List A = {1,2,3}List B = {2,3,4} 이렇게 두 개의 리스트가 있을 때 내가 구하고 싶은 것은 A의 차집합니다. // A 리스트의 차집합을 구하는 함수 생성public static List findDifference(List A, List B) { Set setB = new HashSet(B); return A.stream() .filter(element -> !setB.contains(element)) .collect(Collectors.toList());} stream()을 사용한 것은 A의 요소를 stream으로 처리하여 B에 없는 요소만 필터링하기 위해서다. >>> 추가로 [합집합]에 대하여List union = new ArrayList..
List A = {3}List B = {3,5,6} A와 B의 리스트에서 중복된 값을 제거하고 싶을 때 // 중복 값을 찾기 위해 HashSet 사용HashSet setA = new HashSet(A);HashSet setB = new HashSet(B);// 교집합을 구해 중복된 값 확인HashSet intersection = new HashSet(setA)intersection.retainAll(setB);// 결과 리스트List result = new ArrayList();//A의 중복되지 않은 값 추가 for (Long num : A) { if (!intersection.contains(num)) { result.add(num); }} // B의 중복되지 않은 값 추가 for (L..

SELECT COUNT(CASE WHEN score BETWEEN 9 AND 10 THEN 1 END) AS excellent_score, COUNT(CASE WHEN score BETWEEN 7 AND 8 THEN 1 END) AS good_score, COUNT(CASE WHEN score BETWEEN 1 AND 6 THEN 1 END) AS bad_score, COUNT((CASE WHEN score BETWEEN 1 AND 6 THEN 1 END) AND (CASE WHEN A = false AND B = false AND C = false THEN 1 END)) AS bad_score_unconfirmed, COUNT(CASE WHEN score IS NULL OR ..