순서 RestHighLevelClient 객체를 생성합니다. Request(요청) 객체를 생성합니다. Request.source(JSON String, Type) 을 호출하여 Request객체를 셋팅합니다. RestHighLevelClient.index(Request객체, RequestOptions) 를 통하여 데이터를 삽입하여 리턴 값으로 Response객체를 받습니다. Response객체를 통하여 Request의 결과를 확인합니다. 예시 // 1 RestHighLevelClient restHighLevelClient = new RestHighLevelClient(); String jsonUserInformation = objectMapper.writerWithDefaultPrettyPrinter()...
예시 1. forEach + 람다함수 사용 Map tempMap = new HashMap; tempMap.put("가", "A"); tempMap.put("나", "B"); tempMap.put("다", "C"); tempMap.forEach((key, value)->{ System.out.println(key); // key System.out.println(value); // value }); 2. 향상된 For문 + Set 사용 Map tempMap = new HashMap; tempMap.put("가", "A"); tempMap.put("나", "B"); tempMap.put("다", "C"); for (String key : tempMap.KeySet()) { System.out.println(..
핵심 스레드에 어떠 어떠한 조건을 만족할 때 까지 자라! 라는 명령을 내릴 수 있다. 중요한 부분은 Wait으로 조건을 걸고 스레드를 재우면 자고있는 스레드가 다시 조건을 검색할 수 있도록 조건 변수의 notify 함수를 실행시켜야 한다. 사용법 출처 : https://modoocode.com/270 #include // std::chrono::miliseconds #include // std::condition_variable #include #include #include #include #include #include void producer(std::queue* downloaded_pages, std::mutex* m, int index, std::condition_variable* cv) { f..
Elaticsearch를 이용하는 중 하나의 Field에 추가적으로 데이터를 넣어야하는 경우가 발생하였다. 서칭과 테스트 결과 update API와 Script를 이용하면 구현이 가능하였다. 예시 1. Index 생성 mehtod : PUT http://localhost:9200/users { "settings": { "index": { "number_of_shards": 4, "number_of_replicas": 1 } }, "mappings": { "properties": { "name" : { "type" : "text" }, "user_log": {"type": "object"} } } } 2. 필드에 데이터 추가 mehtod : POST http://localhost:9200/users/_up..
리눅스에서 디스크와 파티션을 부르는 규칙을 알아보자 본 내용은 C.4. 리눅스의 장치 이름 를 참고하였다. 명명 규칙 디스크/CD-ROM 첫번째 플로피 디스크 드라이브는 /dev/fd0 두번째 플로피 디스크 드라이브는 /dev/fd1 첫번째 발견한 하드디스크의 이름 /dev/sda 두번째 발견한 하드디스크의 이름은 /dev/sdb , 이후 명명 규칙은 동일하다 첫번째 SCSI(물리적 외부 장치와 연결하는 방식) CD-ROM은 /dev/scd0 또는 /dev/sr0 파티션 드라이브의 파티션 이름은 디스크 이름 뒤에 숫자를 붙입니다. sda1와 sda2는 각각 첫번째 SCSI 디스크의 첫번째와 두번째 파티션을 말합니다. 실제 예를 들어보면 다음과 같습니다. SCSI 디스크가 2개 있어서, 하나는 SCSI 주..
- Total
- Today
- Yesterday
- rotator
- unrealengine
- LambdaFunction
- 람다함수
- c++11
- c++
- Trouble shooting
- 람다
- C
- bug
- coordinate system
- UE4
- Lambda
- UE5
- double free
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |