전체 글
-
[JAVA] Apache Tika 아파치 티카Back/JAVA 2020. 8. 12. 14:33
:: PPT, CSV ,PDF 등 다양한 형태의, 파일의 메타 데이터와 텍스트를 감지하고 추출하는 라이브러리 - CSV의 인코딩 타입을 확인할 목적으로 사용했다 - tika 외 메타데이터 추출을 돕는 라이브러리가 있으나 최근까지 release 하길래 선택했다 - juniversalchardet , ICU4J :: tika-core - 핵심 라이브러리 (파서 없음) :: tika-parsers - core + Tika Parser interface org.apache.tika tika-parsers 1.24.1 # metadata public static void getMetadata() { Tika tika = new Tika(); Metadata metadata = new Metadata(); try ..
-
[Postgresql] $$ 의미DB/PostgreSQL 2020. 8. 10. 14:25
CREATE OR REPLACE FUNCTION increment(i integer) RETURNS integer AS $$ BEGIN RETURN i + 1; END; $$ LANGUAGE plpgsql; Dollar-Quoted String Constants - 함수 정의의 시작과 끝을 알려주는 기호 ** https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-DOLLAR-QUOTING ** https://stackoverflow.com/questions/31285366/what-does-the-mean-in-postgresql-function
-
The server cannot be started because one or more of the ports are invalid. Open the server editor and correct the invalid ports.Error 2020. 8. 5. 18:01
# 프로젝트 톰캣 install 후 돌려보니 The server cannot be started because one or more of the ports are invalid. Open the server editor and correct the invalid ports. ## xml 체크를 했으나 run 중 에러 발생 ### 설치 제거하고 zip으로 받아서 톰캣 다시 연결함
-
Unable to load authentication plugin 'caching_sha2_password'Error 2020. 8. 5. 18:01
# 디비버 설치 후 mysql 접속시 발생 Unable to load authentication plugin 'caching_sha2_password' ## password 방식문제 - caching_sha2_password : 8.x부터 기본 - mysql_native_password ### mysql cmd 로그인 후 방식 변경 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '****'; ==============================================
-
[ES6] Arrow FunctionFront/JavaScript 2020. 7. 31. 16:41
1) - 정적으로, 선언시 this가 정의된다. 리터럴은 동적으로, 호출시 정의된다(감싼 객체) - this는 가까운 non-arrow 펑션의 this를 참조한다. var literal = function(){console.log(this)}; // Window var arrow = ()=>{console.log(this)};// Window var obj = { literal : literal,// Object arrow : arrow// Window }; var obj = { outer(){ literal();// Window arrow();// Window (function(){console.log(this)})();// Window (()=>{console.log(this);})();// Obje..
-
[JS] FileReaderFront/JavaScript 2020. 7. 29. 16:48
FileReader - 사용자 컴퓨터에 저장된 FIle(or raw data buffers) 의 내용을 비동기로 읽는 객체 # readyState - 현재상태 error - 읽기 실패시 발생한 오류 result - 읽은 결과물 # FileReader() - Internet Explorer 10 이전 버전에서는 지원하지 않음 # .readAsDataURL(File) - Blob이나 File을 읽음 - 결과물은 base64 인코딩 된 스트링 형태로 result 속성에 담는다 .onloaded - 파일을 읽은 뒤 트리거되는 이벤트. https://developer.mozilla.org/en-US/docs/Web/API/FileReader
-
[JS] 정규식 RegExpFront/JavaScript 2020. 7. 29. 16:33
자바스크립트에서는 '정규식'을 객체로 정의함 1) 리터럴생성 : //로 감싼다. 스크립트 읽을 때 컴파일 된다. 상수정의시 유리. var reg = /e/ 2) RegExp 생성자 : 사용시 컴파일 된다. 다시 정의할 경우 유리. var reg = new RegExp("e"); RegExp.exec(str) - 일치한 텍스트 반환. 없으면 null RegExp.test(str) - match와 같은 기능 String.split(reg) - 문자열 -> 배열 String.match(reg) - 정규식에 일치한 문자열이 있는지 boolean으로 반환 String.search() - 정규식에 일치한 문자의 index 반환 String.replace(reg,a,b) ** https://www.w3schools...
-
[JAVA] API 호출 - HttpURLConnectionBack/JAVA 2020. 7. 28. 23:25
public String getJsonUseHttpURLConnection(){ String result = ""; try{ URL url = new URL(uriStr); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setConnectTimeout(5000); conn.setReadTimeout(5000); conn.setRequestMethod("GET"); StringBuilder sb = new StringBuilder(); if(conn.getResponseCode() == HttpURLConnection.HTTP_OK) { BufferedReader br = new BufferedReader( new Input..