'use strict'; // javascript 는 synchronous. // 호이스팅이 끝난 후 코드를 실행한다. // hoisting : var, function declaration // 모든 함수는 실행될 때 가장 먼저 선언된다. // Synchronous callback function printImmediately(print) { print(); } // Asynchronous callback function printWithDelay(print, timeout) { setTimeout(print, timeout); } console.log('1'); setTimeout(() => console.log('2'), 1000); console.log('3'); printImmediately((..
// JSON // JavaScript Objec Notation // 1. Object to JSON // stringfy(obj) let json = JSON.stringify(true); console.log(json); json = JSON.stringify(['apple', 'banana']); console.log(json); const rabbit = { name: 'tori', color: 'white', size: null, birthDate: new Date(), jump: () => { console.log(`${name} can jump!`); } } json = JSON.stringify(rabbit); console.log(json); json = JSON.stringify(ra..
'use strict'; // Array // 1. Declaration const arr1 = new Array(); const arr2 = [1, 2]; // 2. Index position const fruits = ['apple', 'banana']; console.log(fruits); console.log(fruits.length); console.log(fruits[0]); console.log(fruits[1]); console.log(fruits[2]); console.log(fruits[fruits.length - 1]); // 3. Looping over an array // print all fruits console.clear(); // a. for for (let i = 0; i..
// object = { key : value }; // 1. Literals and properties const ebj1 = {}; // 'object literal' syntax const obj2 = new Object(); // 'object constructor' syntax const name = 'ellie'; const age = 4; print(name, age); function print(person) { console.log(person.name); console.log(person.age); console.log(person.hasJob); } const ellie = {name: 'ellie', age: 4}; print(ellie); ellie.hasJob = true; pr..
``` 'use strict'; class Person{ // constructor constructor(name, age) { this.name = name; this.age = age; } // method speak() { console.log(`${this.name}: hello!`); } } const ellie = new Person('ellie', 20); console.log(ellie.name); console.log(ellie.age); ellie.speak(); // 2. Getter and Setter class User { constructor(firstName, lastName, age){ this.firstName = firstName; this.lastName = lastNa..
``` // 1. 바닐라 javascript 로 개발할 떄에는 use strict로 // 선언해 줄 경우 선언되지 않은 변수에 대해 에러를 보여줌 'use strict'; // 2. Variable // let (added in ES6) let globalName = 'global name'; { let name = 'soyeon'; console.log(name); name = 'hello'; console.log(name); } console.log(globalName); console.log(name); // var (쓰지마) // var hoisting (어디에 선언했는지에 상관없이 가장 제일위로 선언을 끌어올려줌) // console.log(age); // age = 4; // console.l..
를 head안에 둘 경우 브라우저가 parsing 하면서 페이지가 준비된다음 실행되기 때문에 페이지 컨텐츠를 보기까지 로딩이 오래 걸림 를 body 안에 둘 경우 javascript에 의존적인 페이지인 경우 페이지 로딩 시간이 오래 걸림 를 asyn 로 선언 브라우저가 한줄씩 parsing하면서 script태그에 있는 js파일 다운로드가 실행되면서 동시에 html 문서도 실행시킴(병렬) 위험요소 javascript에서 queryselect로 html 에 있는 태그를 선택하고자 할 때 html 이 아직 다운로드 되지 않은 경우 페이지에 이상이 나타날 수 있음 javascript를 실행하기 위해 멈출 수 있어 페이지 로딩이 더 오래걸릴 수 있음 다운로드가 먼저 된 js 파일부터 실행됨(선언 순서와 다를 수 ..
루씬이란? 자바로 개발된 오픈소스 정보검색(IR, Information Retrieval)라이브러리 독립된 프로그램이 아닌 소프트웨어 라이브러리 루씬 설치후 사용자가 루씬 라이브러리를 사용하여 검색서비스, 어플리케이션을 구현해야 함 프로그램에 텍스트 색인과 검색 기능을 추가할 수 있도록 지원함 Inverted Indexing 을 생성하여 사용함 Indexing 과정 Token scan: Text를 띄어쓰기 단위로 분리 Token Analysis: 불용어나 조사등을 뗴어내고 원형을 만듦 Frequency counting: 해당단어가 몇번 반복되는지를 Hash table에 저장 Sort: 검색이 용이하도록 정렬 Encoding: 디스크에 저장할 때 용량을 줄이기 위해 encoding함 Indexing과 검색..
- Total
- Today
- Yesterday
- stackframe
- react
- BFS
- server side rendering
- 자료구조
- 알고리즘
- 병행프로세스
- 클래스
- 세마포어
- Java
- dfs
- javascript
- Stack
- 인접행렬
- 퀵정렬
- 스텍
- 최단경로
- 운영체제
- 동적프로그래밍
- 입출력장치
- C++
- 인접리스트
- client side rendering
- C
- 구조체
- 재귀함수
- 이진탐색
- 교착상태
- 배열
- 소프트웨어
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |