| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 | 29 | 30 |
- JSTL
- 해시함수
- 대칭키암호화
- 무결성
- 공개키암호시스템
- NPM
- 대칭키알고리즘
- AndroidStudio
- SQL
- 대칭키암호시스템
- jQuery
- JavaScript
- Java
- c:forEach
- MySQL
- Spring
- 암호학
- 전자서명
- mybatis
- 국제화
- node.js
- 동적쿼리
- fullcalendar
- react
- RequestMethod.POST
- vscode
- c:choose
- 서드파티모듈
- C#크롤링
- jsx
- Today
- Total
목록Callback (2)
Today Yewon Learned
이벤트에 여러정보 전달하기 const EventEmitter = require('events'); const myEmitter = new EventEmitter(); myEmitter.on('test', (arg1, arg2, arg3) => { console.log(arg1); console.log(arg2); console.log(arg3); }); myEmitter.emit('test', 'apple', 'banana', 'pear'); 결과) apple banana pear 콜백에서 받고 싶은 인자만 설정하기 const EventEmitter = require('events'); const myEmitter = new EventEmitter(); myEmitter.on('test', (arg1, ..
동기 실행 방식 예시) const fs = require('fs'); console.log('Start'); let content = fs.readFileSync('./new', 'utf8'); // 동기 실행 부분 console.log(content); console.log('Finish'); 출력 결과) Start Hello Node.js! Finish - readFileSync 함수 : 동기 실행 함수 비동기 실행 방식 (Node.js 권장) - 특정 작업이 완료되었을 때 실행할 콜백을 등록해두고, 바로 다음 코드로 실행을 넘기는 것 예시) console.log('Start'); fs.readFile('./new', 'uft8', (error, data) => { // 비동기 실행 부분 consol..