본문 바로가기

Programing/OpenSource

(55)
[Apache Lucene] Lucene의 의미는? 사실 사람의 이름이라 의미를 찾기는 어렵다. Lucene을 만든 Doug Cutting 의 아내의 미들네임이 Lucene인 것과 그의 아내의 할머니의 이름이 루씬이다. 출처: Barker, Deane (2016). Web Content Management. O'Reilly. p. 233. ISBN 1491908106
[tomcat] HttpServletRequest.getHeader 헤더를 보면 가끔 대소문자를 가리지 않고 동작하는 경우가 있어서 확인을 해보았다. package javax.servlet.http; public interface HttpServletRequest extends ServletRequest { /** * Returns the value of the specified request header as a * String. If the request did not include a header of the * specified name, this method returns null. If there are * multiple headers with the same name, this method returns the first head * in the reque..
[Redis] 난 Redis가 Ruby로 짰는 줄 알았는데... 난 Redis가 Ruby로 짰는 줄 알았는데... 코드를 받아보니 C로 짜여져 있다. server.h를 보면 ae.h를 포함하고 있다. Jim's event-loop 를 위해 만든 event-driven 프로그래밍 라이브러리를 재사용하기 편하게 라이브러리화 한 것이다. ae.c에 보면 시스템에서 지원하는 최적(최고)의 멀티플렉싱 레이어를 포함하는 코드가 있는데, evport -> epoll -> kqueue -> select 순으로 되어 있다. #ifdef HAVE_EVPORT #include "ae_evport.c" #else #ifdef HAVE_EPOLL #include "ae_epoll.c" #else #ifdef HAVE_KQUEUE #include "ae_kqueue.c" #else #incl..
[Docker] Unable to find image 해결책 에러 메세지 $ docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube Unable to find image 'sonarqube:latest' locally docker: Error response from daemon: Get https://registry-1.docker.io/v2/library/sonarqube/manifests/latest: unauthorized: incorrect username or password. See 'docker run --help'. 시도 Docker Update 업데이트 할 때 권한에 대한 확인 창이 뜬다. 하지만 마찬가지이다. Troubleshoot 진단 성공 딱히 도움이 되지 않는다. 원인은.....
[SonarQube] 메이븐(Maven) 프로젝트에서 커버리지 표시하기 Gradle 방식 내가 개발하던 팀은 주로 그레이들(Gradle)을 사용했다. 그래서 org.sonarqube 라는 이름의 플러그인을 사용해서 SonarQube 리포팅을 했기에 특별한 설정은 프로퍼티 정도만 추가로 해주었다. 그래서 build.gradle 에 아래와 같이 플러그인 DSL 만 명시해주면 ./gradlew sonar 라는 태스크를 이용해서 리포팅이 가능했다. plugins { id "org.sonarqube" version "2.7.1" } sonarqube { properties { property "sonar.projectKey", "${artifactName}" property "sonar.projectName", "${artifactName}" property "sonar.source..
[electon] keytar electron 앱에서 아이디/비밀번호를 저장해야했다. atom 에서 관리하는 프로젝트 중에 keytar가 있었다. 운영체제마다 Valut같은 기능을 제공을 하는데, 가령 macOS의 경우는 키체인을, 윈도우의 경우는 Credential Vault 같은 것이다. 맥에서는 잘 저장/불러오기가 되는 것을 확인했는데, 윈도우에서는 npm install keytar부터 잘 안되었다. 아마 의존하고 있는 native 모듈이 있어서 윈도우의 경우 Visual Studio의 설치를 필요로 한다. 처음에 Visual Studio 2015 express를 설치했더니 C++ 11이 지원되지 않는다고 한다. 그래서 visual Studio 2019 community 를 설치했더니 아래와 같은 에러가 나왔다. 메세지를 보니 ..
[docker] oracle xe 11g on macOS 맥 운영체제에서는 오라클 설치를 지원하지 않는다. 그래서 보통 docker를 이용해서 로컬에서 개발을 하는 경우를 보았다. Docker Hub: https://hub.docker.com/r/jaspeen/oracle-xe-11g 명령 모음 $ docker pull jaspeen/oracle-xe-11g $ docker run -d --name=oracle-xe-11g -p 1521:1521 -p 18080:8080 jaspeen/oracle-xe-11g $ docker stop oracle-xe-11g $ docker rm oracle-xe-11g 위에서 부터, 이미지를 받아오는 것 컨테이너를 실행(포트 연결 포함) 컨테이너 정지 컨테이너 삭제 접속 DataGrip을 이용했다. JDBC드라이버가 지원되는..
[Util] EUC-KR to JavaScript escaped string 파일럿 성으로 만들어보았는데 결국 쓰지 않을 것 같지만 아카이브용으로 기록해둔다. public static String toJsonEucKr(String str) { if (Objects.isNull(str)) { return null; } byte[] euckr = str.getBytes(EUC_KR); StringBuilder sb = new StringBuilder(euckr.length * 5); // 1: 5B -> 6: \u005B , 2: B0E6 -> 6: \uB0E6 boolean isMultibyte = false; for (byte b : euckr) { if (isMultibyte) { sb.append(byteToHex(b)); isMultibyte = false; } else {..