분류 전체보기 65

[postgreSQL] 우분투(Ubuntu 20.04)에서 dbf파일 import 하기

서버환경 우분투 20.04 postgreSQL 12 postgreSQL 설치 (원격) sudo apt-get update sudo apt-get install postgresql 관련 설정 경로) /etc/postgresql/12/main shp 파일을 다루려면 postGIS과 shp2pgsql을 사용함 참고) - 한글이 들어간 데이터를 업로드할 예정이라 우분투의 locale을 ko_KR.UTF-8로 변경함 DB 생성 postgres(superuser)로 접속 sudo -u postgres psql DB 생성 시 인코딩 설정함 CREATE DATABASE address WITH ENCODING 'UTF-8' LC_COLLATE='ko_KR.UTF-8' LC_CTYPE='ko_KR.UTF-8' TEMPLA..

개발일지 2023.09.14

[postgreSQL] 원격 서버(Ubuntu)와 pgAdmin4 연결하고 접속하기

원격 서버에 postgreSQL이 설치만 되어있는 상황 서버환경 우분투 20.04 postgreSQL 12 로컬환경 window 10 postgreSQL 설치 (원격) sudo apt-get update sudo apt-get install postgresql 관련 설정 경로) /etc/postgresql/12/main 방화벽 & 외부접근 허용 설정 우분투) sudo ufw allow 5432 # 방화벽 열기 sudo systemctl enable postgresql #재시작 postgreSQL) - postgresql.conf # vim으로 편집할 경우 vim /etc/postgresql/12/main/postgresql.conf listen_addresses = '*' # 모든 접근 허용 - pg_h..

개발일지 2023.09.14

[SPARQL] URI를 '/'로 구분하고 마지막 문자열만 추출

type이 여러개인 개체를 출력할 때, 한 행으로 합쳤더니 prefix없이 URI가 모두 들어가서 읽기 어려운 상태가 되었다. 원래 계획은 prefix를 붙여서 출력하고 싶었지만, 그러려면 prefix를 모두 알고 있는 상태에서 변환하는 작업이기때문에 포기하고 다른 방법을 찾았다. http://www.w3.org/2000/01/rdf-schema#Class 이러한 URI가 있을 때, 마지막 '/'를 기준으로 가장 뒤에 있는 문자열만 출력하게 하고 싶어서 찾아본 결과 정규식을 사용한 예시를 참고하였다. - BIND (REPLACE(STR(?type), "^.*/([^/]*)$", "$1") as ?typeName) PREFIX skos: PREFIX rdfs: PREFIX owl: SELECT ?URI (..

[SPARQL] GROUP_CONCAT 여러 행을 단일 행으로 출력

예시로 type이 여러개인 개체가 있을 때, SPARQL 쿼리를 출력하면 중복으로 출력됨 PREFIX rdfs: PREFIX skos: SELECT ?URI ?type ?label ?definition WHERE { ?URI a ?type ; rdfs:label ?label ; skos:definition ?definition . } 1 fibo-fnd-plc-adr:Address rdfs:Class "address"@en "index to a location to which communications may be delivered" 2 fibo-fnd-plc-adr:Address owl:Class "address"@en "index to a location to which communications m..

[vue3] props 배열에 ref 변수 인덱싱

props와 ref 복합적으로 사용할 때 헷갈려서 정리용으로 남깁니다. if (Array.isArray(props.parentArray) && props.parentArray.length > 0 && childRefConst.value !== '' && childRefConst.value !== undefined) { tmp = props.parentArray[childRefConst.value]; //인덱스에 붙일 때 감싼거면 .value붙이기 } else { tmp = ''; } template에서는 - props 안붙이고 변수명만 사용 script에서 - ref는 .value와 함께 - 상속받은 변수는 꼭 props.변수 => .value 안 붙여도됨

오류 해결 2023.05.25

[Vue warn]: Failed to resolve component: v-for If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.

https://stackoverflow.com/questions/75770846/nuxt-3-and-vuetify-3-failed-to-resolve-component https://codybontecou.com/how-to-use-vuetify-with-nuxt-3.html Nuxt 3 and Vuetify 3: Failed to resolve component: * I wanted to look at Nuxt 3 with Vuetify 3 and unfortunately I get the following error message during setup: [Vue warn]: Failed to resolve component: v-btn ... stackoverflow.com 내 경우 문제는 v-fo..

오류 해결 2023.05.22

[vue3] v-tooltip 조건절(v-if) 적용안될 때

엄청 골머리를 앓다가 해결함 div에 툴팁을 주고, 툴팁내용을 출력하는데 조건에 따라 div가 안보일때도 있음 근데 자꾸 에러가 나서 3시간동안 디버깅한 결과, 툴팁 내용을 그냥 {{ 배열 변수}} 이렇게 줬더니 여기는 조건 상관없이 렌더링이 계속 돼서 오류가 났던 거였다. 아래처럼 툴팁 안에 div를 설정하고 v-if 설정하니까 드디어 해결.... {{ 배열[index][subIndex] }} {{ 배열[index][subIndex] }} chatGPT로 계속 질문해가면서 고쳤다. 아래는 GPT 답변 툴팁의 렌더링을 조건부로 제어하기 위해 `v-if` 조건을 추가한 것은 올바른 접근입니다. 그러나 `v-if` 조건을 통해 툴팁의 렌더링을 숨기려면 해당 툴팁을 감싸고 있는 `div` 요소에 `v-tool..

오류 해결 2023.05.21

[Python] 여러 딕셔너리(dictionary)를 하나의 딕셔너리로 합치기

**는 Python에서 unpacking operator로 사용됩니다. 딕셔너리 unpacking을 할 때, **를 사용하면 딕셔너리 안의 key-value 쌍들을 분리해서, 해당 key와 value를 변수들에 각각 할당할 수 있다. 예를 들어, 다음과 같이 두 개의 딕셔너리를 하나로 합치고 싶을 때, dict1 = {'a': 1, 'b': 2} dict2 = {'c': 3, 'd': 4} **를 사용하여 unpacking하면 다음과 같이 작성할 수 있다. combined_dict = {**dict1, **dict2} print(combined_dict) # {'a': 1, 'b': 2, 'c': 3, 'd': 4} 이처럼 **를 사용하면 여러 개의 딕셔너리를 하나로 합치기 쉬워지며, 만약 키 값이 중복..