๐Ÿ‘ฉ‍๐Ÿ’ป 93

[MarkDown] ๋งˆํฌ๋‹ค์šด ํ•˜์œ„ ํด๋” ๋‚ด๋ถ€ ๋ฌธ์„œ ๊ฒฝ๋กœ ์ถ”๊ฐ€ / ๋ชฉ์ฐจ ์ƒ์„ฑ

๋งˆํฌ๋‹ค์šด ํ•˜์œ„ ํด๋” ๋‚ด๋ถ€ ๋ฌธ์„œ ๊ฒฝ๋กœ ์ถ”๊ฐ€ TIL ๋ผ๋Š” ์ด๋ฆ„์˜ repository์— ์ข…์ข… ๊ณต๋ถ€ํ•˜๋Š” ๋ถ„์•ผ๋ณ„๋กœ ํด๋”๋ฅผ ํŒŒ์„œ ๋‚ด์šฉ์„ ์—…๋ฐ์ดํŠธํ•˜๋‹ค๊ฐ€ ์˜ค๋Š˜ ํ•˜์œ„ ํด๋”์— ๊ฐœ๋ณ„ markdown ๋ฌธ์„œ๋ฅผ ์ถ”๊ฐ€ํ•  ์ผ์ด ์žˆ์—ˆ๋‹ค. ํ”„๋กœ์ ํŠธ root์— ์œ„์น˜ํ•œ README.md์— ํ•ด๋‹น ํด๋” ๋‚ด๋ถ€์˜ md ๋ฌธ์„œ๋ฅผ ๋งํฌ ๊ฑธ์–ด์ฃผ์–ด์•ผ ํ•ด์„œ ์•„๋ž˜์ฒ˜๋Ÿผ ์ž‘์„ฑํ•ด์คฌ๋‹ค. ## ๐Ÿ“– Self-study Chapters // H1 ### db-modeling // H2 ### python-weeks // H3 ### ts-first-project // H3 - [TypeScript 101](ts-first-project/doc/TypeScript_101.md) (updated 2021-01-11) // [์ฐธ์กฐ ๋งํฌ์˜ ์ด๋ฆ„](ํ•˜์œ„ ํด๋”๋ช… / [ํ•˜์œ„ ํด๋”๋ช… ..

[TypeScript] TS2564 Error : Property '~' has no initializer and is not definitely assigned in the constructor

๋งจ ์ฒ˜์Œ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๋ฅผ ๋ฐฐ์šธ ๋•Œ ๊ฐœ๋…๋งŒ ํ•œ ๋ฒˆ ํ›‘๊ณ  ์ง€๋‚˜๊ฐ”๋˜ TypeScript๋ฅผ ๋‹ค์‹œ ํ•ด๋ณด๊ณ  ์‹ถ์–ด์„œ ์˜ค๋Š˜ ๊ธฐ์ดˆ ๊ฐ•์˜๋“ค์„ ์ญ‰ ์‚ดํŽด๋ดค๋‹ค. Java๋ฅผ ํ•˜๊ณ  ์˜จ ๋‹ค์Œ์— TypeScript๋ฅผ ์ ‘ํ•˜๋‹ˆ ์•„๋ฌด๋ž˜๋„ ์ดํ•ดํ•˜๊ธฐ๊ฐ€ ๋” ์‰ฌ์› ๋‹ค. ์˜ˆ์ œ ์ค‘ ๊ฐ์ฒด์ง€ํ–ฅ ํ”„๋กœ๊ทธ๋ž˜๋ฐ๊ณผ ํด๋ž˜์Šค๋ฅผ ์†Œ๊ฐœํ•˜๋Š” ์ฑ•ํ„ฐ์—์„œ ๋‚œ๋ฐ์—†์ด ts2564 ์—๋Ÿฌ, "Property 'fullName' has no initializer and is not definitely assigned in the constructor"๋ฅผ ๋งŒ๋‚ฌ๋‹ค. ํ˜„์žฌ tsc -v ๋ช…๋ น์–ด๋กœ ์‚ดํŽด๋ณธ ํ˜„์žฌ Version์€ 4.1.3์ด๊ณ , ์ด๊ณณ์„ ์ฐธ๊ณ ํ•ด๋ณด๋‹ˆ, 2.7.2์—๋ถ€ํ„ฐ ๋„์ž…๋œ strict class checking์œผ๋กœ ์ธํ•œ ์˜ค๋ฅ˜๋ผ๊ณ  ๋‚˜์™€ ์žˆ์—ˆ๋‹ค. ๋‘ ๊ฐ€์ง€ ๋ฐฉ๋ฒ•์œผ๋กœ ํ•ด๊ฒฐ ๊ฐ€๋Šฅํ•œ๋ฐ, class..

[responsive-web] CSS grid-layout repeat() (auto-fill, auto-fit)

๋ฐ˜์‘ํ˜• ๋ ˆ์ด์•„์›ƒ์„ ์ œ์ž‘ํ•  ๋•Œ, grid-template-columns์˜ repeat() ํ•จ์ˆ˜์˜ ๋‘ ์†์„ฑ๊ฐ’ auto-fill๊ณผ auto-fit์˜ ์ฐจ์ด์ . repeat() ํ•จ์ˆ˜ ๋งŒ์ผ, ์นผ๋Ÿผ 12๊ฐœ๋ฅผ ๋ฐ˜๋ณตํ•œ๋‹ค๊ณ  ํ•˜๋ฉด, ์šฐ๋ฆฌ๋Š” ๋ช…์‹œ์ ์œผ๋กœ repeat() ํ•จ์ˆ˜์•ˆ์— ๊ทธ ๊ฐ’์„ ์ ์–ด์ค„ ์ˆ˜ ์žˆ๋‹ค. .grid { display: grid; /* define the number of grid columns */ grid-template-columns: repeat(12, 1fr); column-gap: 12px; row-gap: 8px; } ์ด ๊ฐ€๋กœ ๋‹จ ์•ˆ์—์„œ ์นผ๋Ÿผ 12๊ฐœ๊ฐ€ ๋ฏธ๋ฆฌ ์ง€์ •ํ•ด์ค€ row-gap, column-gap ๊ฐ’์„ ์œ ์ง€ํ•˜๋ฉฐ ์ •๋ ฌ๋˜์–ด ์žˆ๋‹ค. ๋ธŒ๋ผ์šฐ์ €์—๊ฒŒ ๊ฐ row์— ์ปฌ๋Ÿผ 12๊ฐœ๋ฅผ ์ •๋ ฌํ•˜๋ผ๊ณ  ํ–ˆ์œผ๋ฏ€๋กœ, ํ™”๋ฉด ํฌ๊ธฐ..

[responsive-web] px, em, rem๋‹จ์œ„๋ฅผ ์ ์žฌ์ ์†Œ์— ์“ฐ๊ธฐ

๊ฐ ๋‹จ์œ„๋ฅผ ์ž˜ ๋ชจ๋ฅด๊ณ  px๋งŒ ์ฃผ๊ตฌ์žฅ์ฐฝ ์“ฐ๋‹ค๊ฐ€, ์ƒ๊ฐ๋‚œ ๊น€์— ์ •๋ฆฌํ•  ํ•„์š”๊ฐ€ ์žˆ์–ด์„œ, ์ด๋Ÿฐ ์ €๋Ÿฐ ๊ฐ•์˜๋“ค ๋ชจ์•„ ๋ณด๊ณ , ๊ธฐ๋ก์œผ๋กœ ๋‚จ๊ฒจ๋ดค๋‹ค. ์š”์•ฝํ•˜์ž๋ฉด, px์€ ๊ณ ์ •๋œ ๊ฐ’, ๋น„์œจ์„ ๋ฐ˜์˜ํ•˜์ง€ ๋ชปํ•˜๋‹ˆ ์ฃผ์˜๊ฐ€ ํ•„์š”ํ•˜๋‹ค. em์€ ํ…์ŠคํŠธ์™€ ๊ด€๋ จ์ด ๋†’์€๋ฐ, ์–ด๋–ค ๋””์ž์ธ์ด ํ…์ŠคํŠธ๋ฅผ ๊ธฐ์ค€์œผ๋กœ ์‚ผ์„ ๊ฒฝ์šฐ '๊ทธ ๋น„์œจ์„ ๊ณ„์‚ฐํ•ด์•ผ ํ•  ํ•„์š”์„ฑ์ด ์žˆ์„ ๋•Œ ์œ ์šฉ'ํ•œ ๋‹จ์œ„. rem์€ em์˜ ํ•œ๊ณ„๋ฅผ ๊ทน๋ณตํ•˜๊ธฐ ์œ„ํ•ด ๋‚˜์˜จ ๋‹จ์œ„๋กœ, root์ธ ์˜ ๊ธฐ๋ณธ font-size๋งŒ์„ ๊ธฐ์ค€์œผ๋กœ ๊ณ„์‚ฐํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋„์™€์ค€๋‹ค. em(์— )์˜ ์–ด์› - ๊ณผ๊ฑฐ ๊ธˆ์† ํ™œ์ž๋ฅผ ์ฐ๋˜ ์‹œ์ ˆ, ํฐํŠธ๋“ค์˜ ๊ธฐ์ค€์ ์ด ๋  ํ•˜๋‚˜์˜ ํฐํŠธ ๊ทœ๊ฒฉ์€ ์•ŒํŒŒ๋ฒณ ๋Œ€๋ฌธ์ž M์ด ๋งก์•˜๋‹ค. M์ด ๊ฐ€์žฅ ํญ์ด ๋„“๊ณ , ๋„ค๋ชจ ํ˜•ํƒœ๋ฅผ ๋„์—ˆ์œผ๋ฏ€๋กœ, M์„ ๋‹ด์„ ์ปจํ…Œ์ด๋„ˆ๋Š” ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ๋‹ค๋ฅธ ์•ŒํŒŒ๋ฒณ๋“ค์„ ๋ชจ๋‘ ๋‹ด์„ ์ˆ˜ ์žˆ์—ˆ๋‹ค. ์ด..

[interactive-web] will-change

์ธํ„ฐ๋ž™ํ‹ฐ๋ธŒ ์›น ๊ธฐ์ˆ  ๊ด€๋ จ ๋น„์ฃผ์–ผ ์•„ํ‹ฐํด ๊ฐ•์˜๋ฅผ ๋“ฃ๊ณ  ์•Œ๊ฒŒ ๋œ CSS ์†์„ฑ ์ค‘ ํ•˜๋‚˜์ธ will-change. ์ ์žฌ์ ์†Œ์— ์ œํ•œ์ ์œผ๋กœ ์‚ฌ์šฉํ–ˆ์„ ๋•Œ ์„ฑ๋Šฅ์„ ์˜ฌ๋ ค์ค„ ์ˆ˜ ์žˆ๋Š” ์†์„ฑ์ด๋‹ค. ์•ž์œผ๋กœ ์ผ์–ด๋‚  ์†์„ฑ ๋ณ€ํ™”๋ฅผ ๋ฏธ๋ฆฌ ๋ธŒ๋ผ์šฐ์ €์— ์•Œ๋ ค ๋ธŒ๋ผ์šฐ์ €๊ฐ€ ์ตœ์ ํ™”ํ•  ์ˆ˜ ์žˆ๋„๋ก ์ค€๋น„์‹œํ‚ค๋Š” ์†์„ฑ์ด๋ฏ€๋กœ, ์„ฑ๋Šฅ ๋น„์šฉ์ด ํด ๊ฒฝ์šฐ ์ œํ•œ์ ์œผ๋กœ ์ผ์„ ๋•Œ ํšจ๊ณผ๊ฐ€ ํฌ๋‹ค๊ณ  ํ•œ๋‹ค. ์ด๋ฏธ ๋ธŒ๋ผ์šฐ์ €๋Š” ์„ฑ๋Šฅ ์ตœ์ ํ™”๋ฅผ ์œ„ํ•ด ๊ฐ€๋Šฅํ•œ ํ•œ ๋ชจ๋“  ๊ฒƒ์„ ์‹œ๋„ ์ค‘์ด๋ฏ€๋กœ, ๊ณผํ•˜๊ฒŒ ์“ธ ๊ฒฝ์šฐ ์˜คํžˆ๋ ค ๋ฐ˜๋Œ€ ํšจ๊ณผ๊ฐ€ ๋‚  ์ˆ˜ ์žˆ์œผ๋‹ˆ ๋„ˆ๋ฌด ๋งŽ์ด will-change๋ฅผ ์“ฐ์ง€ ๋ง ๊ฒƒ. ๋งˆ์ง€๋ง‰ ์ˆ˜๋‹จ์œผ๋กœ ์“ฐ๋ผ๊ณ  ์กฐ์–ธ์ด ๋‚˜์™€ ์žˆ๋‹ค. 21๋…„ 1์›” ํ™•์ธํ–ˆ์„ ๋•Œ, IE ์ง€์›์ด ์•ˆ ๋œ๋‹ค๊ณ  ๋‚˜์™€ ์žˆ๋‹ค. ์ฐธ๊ณ  developer.mozilla.org/ko/docs/Web/CSS/will-change ..

[firebase] Vue.js + Element UI + Firebase : firestore์—์„œ sub-collection๋กœ ๋ฐ์ดํ„ฐ ๊ณ„์ธตํ™”ํ•˜๊ธฐ

firebase.firestore() .collection("firstCollection").doc("firstDoc") .collection("secondCollection").add(dataToAdd); // firebase.js // .. export const dbService = firebase.firestore(); export const bookRecordRef = dbService.collection("bookRecord"); ์ด์ „ ํฌ์ŠคํŠธ์—์„œ Vue.js ํ”„๋กœ์ ํŠธ์—์„œ firebase๋ฅผ ์—ฐ๊ฒฐํ•ด ๊ฐ„๋‹จํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ๋‹ค๋ค˜๋Š”๋ฐ, ์˜ค๋Š˜์€ ๊ฑฐ๊ธฐ์— ์ด์–ด ๊ณ„์ธต์  ๊ตฌ์กฐํ™”๋ฅผ ์กฐ๊ธˆ ๋” ๋‹ค๋ค„๋ณด๋ ค๊ณ  ํ•œ๋‹ค. ๊ฐ„๋‹จํ•œ book tracker web app์„ ๋งŒ๋“œ๋Š” ์ค‘์ธ๋ฐ, ์•„๋ž˜ ์ด๋ฏธ์ง€์ฒ˜๋Ÿผ bookRecor..

[fontawesome] vue.js์—์„œ free-brands-svg-icons ์“ฐ๊ธฐ

vue ํ”„๋กœ์ ํŠธ์—์„œ font-awesome์„ ์“ฐ๊ธฐ. $ yarn add -D @fortawesome/fontawesome-svg-core $ yarn add -D @fortawesome/free-solid-svg-icons (optional) $ yarn add -D @fortawesome/free-brands-svg-icons (optional) $ yarn add -D @fortawesome/vue-fontawesome optional์ด ์•„๋‹Œ ์ฒซ ๋ฒˆ์งธ, ๋„ค ๋ฒˆ์งธ๋Š” ํ•„์ˆ˜๋กœ ๋‹ค์šด๋ฐ›์•„์ค€๋‹ค. ๋‚˜๋Š” ์†Œ์…œ ๋กœ๊ทธ์ธ์„ ์œ„ํ•œ ๋ฒ„ํŠผ์„ ๋งŒ๋“ค ๋•Œ ๋“ค์–ด๊ฐˆ github, google icon์„ ์“ฐ๊ธฐ ์œ„ํ•ด ์„ธ ๋ฒˆ์งธ free-brands-svg-icons๋ฅผ ๋จผ์ € ๋ฐ›์•„์ฃผ์—ˆ๋‹ค. ๋ฐ›๊ณ ์ž ํ•˜๋Š” ์•„์ด์ฝ˜์ด ์–ด๋–ค ์นดํ…Œ๊ณ ๋ฆฌ์— ์žˆ๋Š”์ง€๋Š”, sol..

[note] Vue.js์˜ ์ƒํƒœ๊ด€๋ฆฌ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ Vuex์˜ ํ•ต์‹ฌ๋“ค (1) state & getters

์ด์ „ ํ”„๋กœ์ ํŠธ์—์„œ Vue.js์—์„œ ์ปดํฌ๋„ŒํŠธ ๊ฐ„์˜ ๋ฐ์ดํ„ฐ ๋ณ€๊ฒฝ์„ ๋‹ค๋ฃฐ ๋•Œ event bus ๋“ฑ์œผ๋กœ๋งŒ ๊ด€๋ฆฌํ–ˆ์„ ๋•Œ ์ปดํฌ๋„ŒํŠธ๋ผ๋ฆฌ์˜ ๊ด€๊ณ„์„ฑ์„ ํŒŒ์•…ํ•˜๊ธฐ ์–ด๋ ค์› ๋‹ค. ์‚ฌ์ด์ฆˆ๊ฐ€ ํฐ ์•ฑ์„ ๋‹ค๋ฃฐ ๋•Œ๋Š” ๊ทธ๋ž˜์„œ Vuex๋ฅผ ๋งŽ์ด ์“ฐ๋Š”๋ฐ, ์ฒ˜์Œ Vuex๋ฅผ ์ ‘ํ–ˆ์„ ๋•Œ ๋งŽ์ด ํ—ท๊ฐˆ๋ ธ์–ด์„œ, ํ•œ ๋ฒˆ ์ •๋ฆฌ๋ฅผ ์ญ‰ ํ•ด๋ดค๋‹ค. Vuex๋Š” ํ•ต์‹ฌ์ธ state, mutations, actions๋ฅผ ์ดํ•ดํ•˜๋Š” ๊ฒŒ ์ค‘์š”ํ•œ๋ฐ, state๋Š” vuex๋ผ๋Š” ๊ณตํ†ต ์ค‘์•™ ์ €์žฅ์†Œ๊ฐ€ ๊ฐ€์ง€๋Š”, ๋ชจ๋“  ์ปดํฌ๋„ŒํŠธ๊ฐ€ ๊ณต์œ ํ•˜๋Š” data๋‹ค. ์ด state๋ผ๋Š” data๋Š” ๋ชจ๋“  ์ปดํฌ๋„ŒํŠธ ๊ฐ„์— ๊ณต์œ ๋˜๋Š” ์†์„ฑ์ด๊ธฐ ๋•Œ๋ฌธ์— this.$store.state.sampleState ์‹์œผ๋กœ ์ ‘๊ทผ์ด ๊ฐ€๋Šฅํ•˜๋‹ค. ํ•˜์ง€๋งŒ, ์ปดํฌ๋„ŒํŠธ๋ผ๋ฆฌ ๋ชจ๋‘ ๊ณต์œ ๊ฐ€ ๋œ๋‹ค๋Š” ์†์„ฑ ๋•Œ๋ฌธ์—, ์ง์ ‘์ ์œผ๋กœ ์ด๋ ‡๊ฒŒ ์ ‘๊ทผํ•ด ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š”..

[firebase] Vue.js + Element UI + Firebase : ์…‹์—… + ๊ฐ„๋‹จํ•œ ์ •๋ณด ๋“ฑ๋ก

๊ฐ„๋‹จํ•œ ์ฑ… ์ •๋ณด์™€ ๋ฆฌ๋ทฐ๋ฅผ ๋“ฑ๋กํ•˜๋Š” ์›น์•ฑ์„ Vue์™€ Element UI ํ”„๋ ˆ์ž„์›Œํฌ, ๊ทธ๋ฆฌ๊ณ  Firebase๋ฅผ ์ด์šฉํ•ด ๋งŒ๋“ค๊ณ  ์žˆ๋‹ค. ์ด๊ณณ์„ ์ฐธ๊ณ ํ•  ์ˆ˜ ์žˆ๋‹ค. ์ƒ์„ฑํ•˜๊ณ ์ž ํ•˜๋Š” ํด๋” ๊ฒฝ๋กœ์—์„œ node prompt๋ฅผ ์—ด๊ณ  ์•„๋ž˜ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•œ๋‹ค. vue create [vue-project-name] Vue CLI v4.x ๋ถ€ํ„ฐ๋Š” almost-full ์˜ต์…˜์ด ์ƒ๊ธด ๋ชจ์–‘์ด๋‹ค. ์ด๋ฒˆ์— ํ•˜๋ฉด์„œ ์ฒ˜์Œ ๋ดค๋‹ค. ์†์‰ฝ๊ฒŒ ํ•„์š”ํ•œ ๊ธฐ๋Šฅ๋“ค์ด ๋‹ค ์žˆ์–ด์„œ, ํ•ด๋‹น ์˜ต์…˜์œผ๋กœ ์ง„ํ–‰ํ–ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  element UI ํ”„๋ ˆ์ž„์›Œํฌ๋ฅผ ์“ฐ๊ธฐ ์œ„ํ•ด ์•„๋ž˜ ๋ช…๋ น์–ด๋ฅผ ์จ์คฌ๋‹ค. ๋ฌธ์„œ๋Š” ์ด๊ณณ npm i element-ui -S ๊ทธ๋Ÿฌ๋‹ค๊ฐ€ ์ผ ํ•˜๋ฉด์„œ ๊ธฐ๋ณธ ํ…œํ”Œ๋ฆฟ์œผ๋กœ ์ผ๋˜ vue-admin-template์„ ์ด์šฉํ•˜๋ ค๊ณ  ํ•ด๋‹น ํ”„๋กœ์ ํŠธ๋Š” ์ง€์šฐ๊ณ , ์ด๊ณณ์—์„œ git clon..

[error] git push ํ•  ๋•Œ ๋œจ๋Š” ์—๋Ÿฌ : The current branch main has no upstream branch/src refspec main does not match any

๊ธฐ์กด git ์ด๋ ฅ์„ ์‚ญ์ œํ•˜๋ ค๊ณ  git์„ ์ดˆ๊ธฐํ™”(initialize)ํ•œ ๋’ค์— ๋ฐœ์ƒํ•œ ์—๋Ÿฌ. git remote -v ๋กœ ํ˜„์žฌ ์›๊ฒฉ ์ €์žฅ์†Œ ์ƒํƒœ๋ฅผ ํ™•์ธํ•˜๊ณ , ๋ฐ˜์˜์ด ์ž˜ ๋œ ๊ฒƒ์„ ํ™•์ธํ•˜๊ณ , ์•„๋ž˜ ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ–ˆ๋‹ค. git push -u origin main ๊ทธํ›„์— ์ด๊ฒƒ์ €๊ฒƒ ์‹œ๋„ํ•˜๋ฉด์„œ ์•„๋ž˜ ๋‘ ์—๋Ÿฌ ๋ฉ”์„ธ์ง€๊ฐ€ ๋ฒˆ๊ฐˆ์•„๊ฐ€๋ฉด์„œ ์ถœ๋ ฅ๋๋‹ค. fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin master error: src refspec main does not match any error: failed t..