전체 글
-
[Hash Table]개발/자료구조 2022. 10. 5. 14:12
A hash table (often called a hash map) is a data structure that maps keys to values. Hash tables combine lookup, insert, and delete operations in an efficient way. The key is sent to a hash function that performs arithmetic operations on it. The result (called the hash value or hash) is an index of the key-value pair. Let a hash function H(x) maps the value at the index x%10 in an Array. For exa..
-
22.10.03개인공부/영어 2022. 10. 3. 11:53
legislation : a law or set of laws suggested by a government and made official by a parliament. amid : in the middle of or surrounded by subsidized : paid for partly by the government or another organization culminate : (culminate in/with something) : If an event or series of events culminates in something, it ends with it, having developed until it reaches this point. prominently : in a way tha..
-
[Greedy]개발/알고리즘 2022. 9. 30. 12:29
Greedy Algorithms work step-by-step, and always choose the steps which provide immediate profit/benefit. It chooses the “locally optimal solution”, without thinking about future consequences. Greedy algorithms may not always lead to the optimal global solution, because it does not consider the entire data. The choice made by the greedy approach does not consider future data and choices. In some ..
-
tc39 92nd, 93nd meetingFront-end/Javascript 2022. 9. 27. 11:11
https://dev.to/hemanth/updates-from-the-92nd-tc39-meeting-5fi6 Updates from the 92nd TC39 meeting There were several items on the agenda, this post focuses on feature proposals and their progress... dev.to https://www.ecma-international.org/technical-committees/tc39/?tab=activities
-
[Hooks] 훅스의 규칙Front-end/React 2022. 9. 17. 22:06
훅스는 컴포넌트의 영역 안에서만 작동한다 ( Only Call Hooks from React Functions) 리액트 컴포넌트 내부에서만 훅스를 호출해야 합니다. 마찬가지로 커스텀 훅도 결국에는 컴포넌트에 추가되야합니다. 기능을 여러 훅으로 나누기 훅스는 순서대로 호출되기 때문에 각 훅을 작게 유지하면 좋습니다. 최상위 수준에서만 훅을 호출해야한다. ( Only Call Hooks at the Top Level) 조건문이나 루프 또는 중첩된 함수에서 훅을 사용해서는 안됩니다. 비동기 작업도 훅 안에서 실행시켜야 합니다. cra를 사용한다면 eslint-plugin-react-hooks라는 플러그인을 사용하면 에러를 잡을수 있습니다. Hooks can call other Hooks Never call a..
-
[CDN]개발/인프라 2022. 9. 14. 14:36
Content Delivery Network cdn이란? 컨텐츠를 캐싱하는 프록시 서버의 분산 네트워크 (컨텐츠 전송 네트워크 또는 배포 네트워크)를 의미합니다. 사용자가 웹사이트를 방문할 때 서버의 데이터는 인터넷을 통해 이동하는데, 서버가 사용자와 멀리 떨어져 있는 경우 이미지 같은 대용량 파일을 로드하는데 시간이 오래 걸립니다. CDN의 목적은 물리적 거리를 줄여주어 퍼포먼스와 사용자경험을 향상시키기 위함입니다. cdn을 사용하면서 얻을수 있는 장점 1. 사이트 퍼포먼스 향상 예를 들어 AWS 서울 리전에 사이트가 호스트되어 있다고 가정하자, 서울에서 사이트에 접속하는 사용자는 지연시간 없이 접속할 것입니다. 하지만 만약 뉴욕에 있는 사용자가 접속한다면, 데이터를 가져오는데 더 많은 시간이 소요될 ..
-
[웹팩] 빌드하기Front-end 2022. 9. 12. 17:58
cra을 사용하지않고 react 프로젝트를 만들었다고 가정하고, 웹팩을 빌드해 봅시다. 웹팩으로 정적인 빌드 프로세스를 만들려면 필요한 모듈을 설치해야 합니다. npm install --save-dev webpack webpack-cli 웹팩이 번들을 빌드할때, JSX를 순수 리액트 코드로 변환하라고 지정할 필요가 있습니다. webpack.config.js파일에 시작파일과 번들을 출력할 파일을 지정합니다. 웹팩은 이 위치에 패키징한 자바스크립트 팡리을 넣어줍니다. 다음으로 필요한 바벨 의존관계를 설치합니다. npm install babel-loader @babel/core --save-dev 웹팩 설정 파일에서 module이라는 필드에 웹팩에서 사용할 여러 로더들에 대한 정보를 추가합니다. module:..
-
[웹팩]Front-end 2022. 9. 12. 13:13
웹팩 프로덕션 레벨에서 자바스크립트 프레임워크나 라이브러리를 사용하려면 고려해야 할 사항이 많습니다. 이때 사용할수 있는 도구가 웹팩 입니다. modularity, network performance 웹팩은 모듈 번들러입니다. 모듈 번들러는 여러 파일들을 한 파일로 묶어줍니다. 의존관계가 있는 여러 파일들을 묶은 번들은 브라우저가 한번만 읽기 때문에 네트워크 성능이 좋아집니다. - 모든 의존 관계를 한 파일에 넣으면 모든 파일을 단 한번의 http 요청으로 가져올 수 있으므로 추가 시간 지연을 방지할 수 있다. 컴파일 외 기능들 * 코드 분리 : 코드를 여러 덩어리로 나눠서 필요할때 각각 로딩할 수 있습니다. 다른 페이지나 디바이스에서 필요한 자원을 따로 나눠서 더 효율적으로 처리하기 위함입니다. * 코..