https://github.com/sveinbjornt/Sloth GitHub - sveinbjornt/Sloth: Mac app that shows all open files, directories, sockets, pipes and devices in use by all running pro Mac app that shows all open files, directories, sockets, pipes and devices in use by all running processes. Nice GUI for lsof. - GitHub - sveinbjornt/Sloth: Mac app that shows all open files, direc... github.com 자세한 사항은 위의 정보를 보면 알수..
nginx 로그를 카프카로 전송에 용이하게 로그를 json 구조로 남길 필요가 있었다. json 구조로 남기는 부분을 기록한다. nginx에서 지원하는 변수 리스트 http://nginx.org/en/docs/varindex.html Alphabetical index of variables nginx.org nginx 로그 sample http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format Module ngx_http_log_module Module ngx_http_log_module The ngx_http_log_module module writes request logs in the specified format. Requests are ..
앞의 글에서 Promise에 대해 간략히 알아보았다. 위에처럼 비동기 Promise를 사용시 then 또는 catch를 통해 반환 받을 수 있었다. 이외에도 awit를 통해서도 똑같이 사용할 수 있다. // as-is promise() .then(result =>{ console.log(result); }) // to Be let result = await promise(); console.log(result); 위의 코드는 같은 결과로 출력된다. 또한 함수를 선언할 때 function 키워드 앞에 async를 붙여주면 해당 함수를 호출 했을 때 함수내부에서 반환한 값을 이행하는 Promise를 반환한다. async function promise() { return "결과" } promise() .the..
자바스크립트에서는 비동기 프로그래밍을 자연스럽게 습득하게 된다. 이를 대표하는게 자바스크립트 Promise이다. Promise의 기본적인 구조는 아래와 같다. const promise = new Promise((resolve, reject) => { // resolve, reject의 타입은 함수타입이다. }); Promise는 resolve와 reject를 파라미터로 받아오는 함수로 resolve는 작업이 성공했을때, reject는 작업이 실패했을때 호출하는 함수이다. const promise = new Promise((resolve, reject) => { reject(new Error("에러 메시지를 던집니다.")); }); const promise = new Promise((resolve, rej..
1. 소비자태도지수(CSI) 공식 CSI = [(매우좋아짐 * 1.0 + 약간좋아짐 * 0.5 - 약간나빠짐 * 0.5 - 매우나빠짐 * 1.0) / 전체 응답가구수 ] * 100 + 100 CSI의 기준치는 100으로 이하라면 소비를 줄인다는 소비자가 많다는 의미이며 100보다 높으면 소비자들이 소비를 늘리겠다고 응답하는 의미이다. 2. 경기실사지수 (BSI) 공식 BSI = [(긍정 응답수 - 부정응답수 ) / 전체 응답수] * 100 + 100 BSI의 기준치는 보통 100으로 이하라면 향후 경기가 나빠질 것으로 예상된다는 의미이며 100보다 높으면 기업에서는 향후 경기가 좋아질 것으로 응답한다는 의미이다. 관련 지수 바로가기 : 새창으로 띄우기