목록분류 전체보기 (556)
른록노트
@ 방법 JSONArray jarr; (안에 여러가지 데이터가 있음) JSONObject jval = null; for (int i = 0; i JSONArray안에 있는 JSONObject를 객체에 담아(위치름 참조) 그 객체를 수정해주면 JSONArray 은 그 위치를 보고있어서 수정이 가능함
@ 방법 output 창에서 오른쪽 클릭 후 Wrap text(ctrl+R) 클릭Right click within the output window -> wrap text(CTRL+R) 참고사이트https://stackoverflow.com/questions/11495359/how-do-you-turn-on-wrapped-mode-in-the-netbeans-output-console
@ 코드 String data = "{ ... }"; Object json = new JSONTokener(data).nextValue(); if (json instanceof JSONObject) //you have an object else if (json instanceof JSONArray) 참고사이트 https://code-examples.net/ko/q/5d5d34
1. 스크립트POST test/_doc/1/_update { "script" : { "source": "if (ctx._source.tags.contains(params.tag)) { ctx.op = 'delete' } else { ctx.op = 'none' }", "lang": "painless", "params" : { "tag" : "green" } } } 2.doc 사용POST test/_doc/1/_update { "doc" : { "name" : "new_name" } } 참고사이트https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html
@ 공식사이트 https://github.com/echoma/zkui/wiki/Download 참고사이트http://jinhokwon.tistory.com/160https://github.com/echoma/zkui/wiki/Download
@ 방법1)/** * yyyyMMdd 포맷으로 반환 */ function getFormatDate(date){var year = date.getFullYear(); //yyyyvar month = (1 + date.getMonth()); //Mmonth = month >= 10 ? month : '0' + month; // month 두자리로 저장var day = date.getDate(); //dday = day >= 10 ? day : '0' + day; //day 두자리로 저장return year + '' + month + '' + day;} 현재 날짜 yyyyMMdd 포맷으로 변환하려면 아래와 같이 사용하면 됩니다.var date = new Date();date = getFormatDate(dat..
@ 방법 var os = require('os'); function getServerIp() { var ifaces = os.networkInterfaces(); var result = ''; for (var dev in ifaces) { var alias = 0; ifaces[dev].forEach(function(details) { if (details.family == 'IPv4' && details.internal === false) { result = details.address; ++alias; } }); } return result;} console.log(getServerIp()); 참고사이트https://wiki.arone.co.kr/pages/viewpage.action?pageId=2..
@ 설명 zookeeper에는 buffer로 데이터를 저장하는데 json을 buffer로 바꾸는 방법 var obj = {test : "test"}; var data = Buffer. from(JSON.stringify(obj)); 참고사이트https://stackoverflow.com/questions/41951307/convert-a-json-object-to-buffer-and-buffer-to-json-object-back