분류 전체보기
-
[TS] generic 선언할 때 T, U, V는 왜 쓰는걸까etc 2022. 10. 14. 17:42
https://stackoverflow.com/questions/44589035/where-does-the-t-u-v-convention-for-generic-type-params-come-from Where does the T, U, V convention for generic type params come from? Java, C#, and TypeScript (aka. the Sun/Hejlsberg family of languages) use T, U, V, etc. to represent generic type parameters. Ostensibly that's because T stands for "Type", and U and V follow T in ... stackoverflow.com..
-
졸업선물 JS-> Python 번역너의말이보여네약점algorithm 2022. 10. 13. 23:08
products.sort((a, b) => a[0] + a[1] - (b[0] + b[1])); // 오름차순 정렬 products.sort(key = lambda p : p[0] + p[1]) https://docs.python.org/ko/3/howto/sorting.html#sorting-basics 정렬 HOW TO — Python 3.10.8 문서 정렬 HOW TO 저자 Andrew Dalke와 Raymond Hettinger 배포 0.1 파이썬 리스트에는 리스트를 제자리에서(in-place) 수정하는 내장 list.sort() 메서드가 있습니다. 또한, 이터러블로부터 새로운 정렬된 리스트를 만 docs.python.org 키로 정렬하는 방법
-
[HTTP, 약간의 삽질] content-type : application-json/text-html 차이memoir 2022. 10. 13. 03:48
역시나 뇌피셜로 인해 잘못된 정보가 포함되어 있을 수 있으며 책임지지 않습니다. https://stackoverflow.com/questions/22406077/what-is-the-exact-difference-between-content-type-text-json-and-application-json What is the exact difference between content-type: text/json and application/json? What is the exact difference between Content-type: text/json Content-type: application/json I've been using them randomly and never find any out..
-
cors 떴을 때 HTTP 요청 헤더에 no-cors add하기error 2022. 10. 6. 16:59
https://evertpot.com/no-cors/ Common no-cors misconceptions Between tasks I spend a fair time on Stack Overflow, which is (truth be told) a love/hate relationship. There’s a few recurring questions that I feel deserve a longer explanation. Last time, I wrote about how to use MySQL in Node.js, but today I wanted t evertpot.com https://ui.toast.com/weekly-pick/ko_20211110 CORS에서 이기는 방법 CORS에서 이기는 ..
-
자바스크립트 실행은 어떻게 될까? : 1편memoir 2022. 10. 3. 01:56
글을 읽기 전 "지식을 획득하는 가장 효율적인 방법은 인터넷에 틀린 글을 적는 것이다." 이 글은 제 뇌피셜이며, 인용하셨다가 욕을 먹어도 책임지지 않습니다. SATURDAY가 목요일이 아니라 토요일인 걸 아신다면 자막을 끄듯이, 제 글도 꺼주시면 감사합니다. 시간이 남으신다면 틀린 내용을 적어주셔도 좋습니다. 참조된 글을 번역하였습니다. 목차 ## intro ## Body ### 실행 컨텍스트 - 전역 실행 컨텍스트와 함수 실행컨텍스트 #### 실행 컨텍스트 생성 단계 1. 생성 단계 ##### 1) 변수 객체의 생성 ##### 2) 스코프 체인 생성 ##### 3) this의 값 결정 #### 실행 컨텍스트 생성 단계 2. 실행 단계 ## intro 자바스크립트는 싱글스레드 비동기 언어다. 즉 코드 ..
-
도커 컨테이너에 빌드했을 때 failed to solve with frontend dockerfile.v0:에러error 2022. 9. 13. 22:57
https://stackoverflow.com/questions/64221861/an-error-failed-to-solve-with-frontend-dockerfile-v0 An error, "failed to solve with frontend dockerfile.v0" I was trying to build my Docker image for my Gatsby application. Whenever I run the command docker build . -t gatsbyapp, it gives me an error: failed to solve with frontend dockerfile.v0: failed to... stackoverflow.com raccoon@yoonO ~/Documen..
-
방문 길이너의말이보여네약점algorithm 2022. 9. 6. 17:59
const visited = new Set(); const arrowDict = { // x, y U: [ 0, 1], D: [ 0,-1], R: [ 1, 0], L: [-1, 0], } function token(x, y){ return String(x)+String(y); } function normalize(start, end){ if(start > end){ return start+end; } return end+start; } function solution(dirs) { let now = [0,0] for (const dir of dirs){ const arrow = arrowDict[dir]; const nx = now[0] + arrow[0]; const ny = now[1] + arrow..