๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
  • What would life be If we had no courage to attemp anything?

์ „์ฒด ๊ธ€271

[javascript]ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค - ํฌ๋ ˆ์ธ ์ธํ˜•๋ฝ‘๊ธฐ ๊ฒŒ์ž„ [javascript]ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค - ํฌ๋ ˆ์ธ ์ธํ˜•๋ฝ‘๊ธฐ ๊ฒŒ์ž„ https://school.programmers.co.kr/learn/courses/30/lessons/64061 ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค ์ฝ”๋“œ ์ค‘์‹ฌ์˜ ๊ฐœ๋ฐœ์ž ์ฑ„์šฉ. ์Šคํƒ ๊ธฐ๋ฐ˜์˜ ํฌ์ง€์…˜ ๋งค์นญ. ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค์˜ ๊ฐœ๋ฐœ์ž ๋งž์ถคํ˜• ํ”„๋กœํ•„์„ ๋“ฑ๋กํ•˜๊ณ , ๋‚˜์™€ ๊ธฐ์ˆ  ๊ถํ•ฉ์ด ์ž˜ ๋งž๋Š” ๊ธฐ์—…๋“ค์„ ๋งค์นญ ๋ฐ›์œผ์„ธ์š”. programmers.co.kr function solution(board, moves) { var answer = 0; const stack = [] for(let i=0; i 2022. 9. 20.
[javascript]ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค - ์„ฑ๊ฒฉ ์œ ํ˜• ๊ฒ€์‚ฌ [javascript]ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค - ์„ฑ๊ฒฉ ์œ ํ˜• ๊ฒ€์‚ฌ https://school.programmers.co.kr/learn/courses/30/lessons/118666 ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค ์ฝ”๋“œ ์ค‘์‹ฌ์˜ ๊ฐœ๋ฐœ์ž ์ฑ„์šฉ. ์Šคํƒ ๊ธฐ๋ฐ˜์˜ ํฌ์ง€์…˜ ๋งค์นญ. ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค์˜ ๊ฐœ๋ฐœ์ž ๋งž์ถคํ˜• ํ”„๋กœํ•„์„ ๋“ฑ๋กํ•˜๊ณ , ๋‚˜์™€ ๊ธฐ์ˆ  ๊ถํ•ฉ์ด ์ž˜ ๋งž๋Š” ๊ธฐ์—…๋“ค์„ ๋งค์นญ ๋ฐ›์œผ์„ธ์š”. programmers.co.kr function solution(survey, choices) { var answer = ''; //์ ์ˆ˜ array const arr = {R:0,T:0,C:0,F:0,J:0,M:0,A:0,N:0} for(let i=0; i= arr["F"] ? "C" : "F"; answer += arr["J"] >= arr["M"] ? "J" : "M";.. 2022. 9. 14.
[TypeScript] Typescript Interface Typescript์˜ Interface Interface ์ธํ„ฐํŽ˜์ด์Šค๋Š” ํƒ€์ž…์„ ์ •์˜ํ•œ ๊ทœ์น™์„ ์˜๋ฏธ interface User { age: number; name: string; } ๋ณ€์ˆ˜์™€ ํ•จ์ˆ˜์— ํ™œ์šฉํ•œ ์ธํ„ฐํŽ˜์ด์Šค var person: User = { age: 30, name: 'aa' } function getUser(user: User) { console.log(user); } ์ธ๋ฑ์‹ฑ interface StringArray { [index: number]: string; } var arr2: StringArray = ['a', 'b', 'c']; arr[0] = 10 //Error; ๋”•์…”๋„ˆ๋ฆฌ ํŒจํ„ด interface StringRegexDictionary { [key: string]: RegExp } va.. 2022. 9. 14.
[Typescript] Typescript์˜ ํƒ€์ž…๊ณผ ํ•จ์ˆ˜ TypeScript ๊ธฐ๋ณธ ํƒ€์ž… (12๊ฐ€์ง€) Boolean Number String Object Array Tuple Enum Any void Null Undefined Never Array ํƒ€์ž…์ด ๋ฐฐ์—ด์ธ ๊ฒฝ์šฐ ๊ฐ„๋‹จํ•˜๊ฒŒ ์•„๋ž˜์™€ ๊ฐ™์ด ์„ ์–ธ let arr: number[] = [1,2,3]; let arr: Array = [1,2,3]; //generic ์‚ฌ์šฉ Tuple ํŠœํ”Œ์€ ๋ฐฐ์—ด์˜ ๊ธธ์ด๊ฐ€ ๊ณ ์ •๋˜๊ณ  ๊ฐ ์š”์†Œ์˜ ํƒ€์ž…์ด ์ง€์ •๋˜์–ด ์žˆ๋Š” ๋ฐฐ์—ด ํ˜•์‹์„ ์˜๋ฏธํ•œ๋‹ค. let arr: [string, number] = ['hi',10]; ์ด ๋•Œ, ์ •์˜ํ•˜์ง€ ์•Š์€ ํƒ€์ž…, ์ธ๋ฑ์Šค๋กœ ์ ‘๊ทผํ•  ๊ฒฝ์šฐ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค. Enum C, Java์™€ ๊ฐ™์€ ๋‹ค๋ฅธ ์–ธ์–ด์—์„œ ํ”ํ•˜๊ฒŒ ์“ฐ์ด๋Š” ํƒ€์ž…์œผ๋กœ ํŠน์ • ๊ฐ’(์ƒ์ˆ˜)๋“ค์˜ ์ง‘ํ•ฉ์„ ์˜๋ฏธ enum Aveng.. 2022. 9. 13.
[Sass] Scss ๋ฌธ๋ฒ• ์ •๋ฆฌ ๋งํฌ ๋ชจ์Œ https://velog.io/@dosilv/TIL-SCSS-%EB%AC%B8%EB%B2%95-%EC%A0%95%EB%A6%AC#-nesting [TIL] SCSS ๋ฌธ๋ฒ• ์ •๋ฆฌ ๐ŸŽ ์ผ๋‹จ ๋ฐฐ์šฐ๊ธด ๋ฐฐ์› ๋Š”๋ฐ SASS๋Š” ๋ญ๊ณ  SCSS๋Š” ๋ญ์ง€? ํ•˜๋‹ค๊ฐ€ ํ•ด๋ณด๋Š” ์ •๋ฆฌ! velog.io https://nykim.work/97 [์•„๋ฌดํŠผ Sass] 1. ์‹œ์ž‘ํ•˜๊ธฐ - Sass ๊ฐœ๋…, ์ปดํŒŒ์ผ๋Ÿฌ ์„ค์น˜ ํ”„๋กค๋กœ๊ทธ "CSS ์ธ์ƒ์€ ์ „์ฒ˜๋ฆฌ๊ธฐ๋ฅผ ๋„์ž…ํ•˜๊ธฐ ์ „๊ณผ ํ›„๋กœ ๋‚˜๋‰œ๋‹ค" ......์ด๋Ÿฐ ๋ง์€ ์—†์ง€๋งŒ, Sass๋ฅผ ๋ฐฐ์šฐ๋ฉด CSS ์ž‘์„ฑ์ด ์งฑ์งฑ ํŽธํ•ด์ง‘๋‹ˆ๋‹ค. ์‹ ์ž… ํผ๋ธ”๋ฆฌ์…”๋ถ€ํ„ฐ ์Šคํƒ€์ผ์‹œํŠธ ๊ด€๋ฆฌ๋ฅผ ํ•˜๋Š” ๊ฐœ๋ฐœ์ž๊นŒ์ง€, Sass์— ๋Œ€ nykim.work ์ด์ „์— ๋ณด์•˜๋˜ ๋ธ”๋กœ๊ทธ ๋ณด๋‹ค ๋” ๊ฐ€๋…์„ฑ ์žˆ๊ฒŒ ์ •๋ฆฌ๋œ ๋ธ”๋กœ๊ทธ ๊ธ€. ํ”„๋กœ์ ํŠธ ์‹œ์ž‘ํ•˜๋ฉด ์ฐธ๊ณ ํ•  ์˜ˆ์ • 2022. 9. 12.
[Typescript] Typescript์˜ ์ดํ•ด Typescript Typescript๊ฐ€ ๋‚˜์˜ค๊ฒŒ ๋œ ๋ฐฐ๊ฒฝ JavaScript๋Š” ์›๋ž˜ ํด๋ผ์ด์–ธํŠธ ์ธก ์–ธ์–ด๋กœ ๋„์ž…. Node.js์˜ ๊ฐœ๋ฐœ๋กœ ์ธํ•ด JavaScript๋ฅผ ํด๋ผ์ด์–ธํŠธ ์ธก ๋ฟ๋งŒ์ด ์•„๋‹Œ ์„œ๋ฒ„ ์ธก ๊ธฐ์ˆ ๋กœ๋„ ํ™œ์šฉํ•  ์ˆ˜ ์žˆ์Œ. ๊ทธ๋Ÿฌ๋‚˜, JavaScript ์ฝ”๋“œ๊ฐ€ ์ปค์งˆ์ˆ˜๋ก ์†Œ์Šค ์ฝ”๋“œ๊ฐ€ ๋” ๋ณต์žกํ•ด์ ธ์„œ ์ฝ”๋“œ๋ฅผ ์œ ์ง€ ๊ด€๋ฆฌํ•˜๊ณ  ์žฌ์‚ฌ์šฉํ•˜๊ธฐ ์–ด๋ ค์›Œ์ ธ ๋”์šฑ์ด Type ๊ฒ€์‚ฌ ๋ฐ ์ปดํŒŒ์ผ ์‹œ ์˜ค๋ฅ˜ ๊ฒ€์‚ฌ์˜ ๊ธฐ๋Šฅ์„ ์ˆ˜์šฉํ•˜์ง€ ๋ชปํ•˜๊ธฐ ๋•Œ๋ฌธ์— JavaScript๊ฐ€ ๋ณธ๊ฒฉ์ ์ธ ์„œ๋ฒ„ ์ธก ๊ธฐ์ˆ ๋กœ ์—”ํ„ฐํ”„๋ผ์ด์ฆˆ ์ˆ˜์ค€์—์„œ ์„ฑ๊ณตํ•˜์ง€ ๋ชปํ•˜๊ฒŒ ๋˜์–ด Typescript๊ฐ€ ์ œ์‹œ๋จ. Typescript๋ž€? TypeScript๋Š” JavaScript์— ํƒ€์ž…์„ ๋ถ€์—ฌํ•œ ์–ธ์–ด! JavaScript์˜ ํ™•์žฅ๋œ ์–ธ์–ด๋กœ ๋ณผ ์ˆ˜ ์žˆ์Œ Typescript๋Š” JavaScript.. 2022. 9. 8.
[Sass]Sass ๊ธฐ๋ณธ ๋ฌธ๋ฒ• ์ •๋ฆฌ Sass ๊ธฐ๋ณธ ๋ฌธ๋ฒ• ์ •๋ฆฌ 1) ๋ณ€์ˆ˜์— ๋ฐ์ดํ„ฐ ์ €์žฅํ•ด์„œ ์‚ฌ์šฉํ•˜๊ธฐ $๋ณ€์ˆ˜๋ช… : ๋ณ€์ˆ˜์— ๋„ฃ์„ ๊ฐ’; $mainColor : #ff0000; .red { color: $mainColor; } 2) ํŒŒ์ผ import ํ•˜๊ธฐ @import 'ํŒŒ์ผ ๊ฒฝ๋กœ'; \- ์ฃผ๋กœ ๋ชจ๋“  ํŽ˜์ด์ง€์— ํ•„์š”ํ•œ CSS reset์„ ํŒŒ์ผ์„ ์ƒˆ๋กœ ์ƒ์„ฑํ•˜์—ฌ ์ž‘์„ฑํ•˜๊ณ  import //src/reset.scss body { margin: 0; } div { box-sizing: border-box; } \- Detail.scss์— reset.scss ํŒŒ์ผ์„ import ํ•ฉ๋‹ˆ๋‹ค. @import './reset.scss'; 3) Nesting - ์…€๋ ‰ํ„ฐ ๋Œ€์‹  ์‚ฌ์šฉ ๊ฐ€๋Šฅ // Selector div.container h4 { color: blue; } di.. 2022. 9. 7.
[Sass]Sass๋ฅผ ์™œ ์‚ฌ์šฉํ•  ๊นŒ?/ Next.js์— Sass์„ค์น˜ํ•˜๊ธฐ Sass ๊ธฐ์ดˆ ๐ŸŽˆ์™œ Sass๋ฅผ ์‚ฌ์šฉํ•  ๊นŒ? CSS์—๋Š” ์น˜๋ช…์ ์ธ ๋‹จ์ ์ด ์กด์žฌ ๊ทœ๋ชจ๊ฐ€ ์ปค์งˆ์ˆ˜๋ก ์ฝ”๋“œ๊ฐ€ ๋ณต์žกํ•ด์ง€๊ณ , ์œ ์ง€๋ณด์ˆ˜๊ฐ€ ๋ถˆํŽธ Sass๋Š” ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ•˜๊ฑฐ๋‚˜, ์ฝ”๋“œ ์กฐ๊ฐ์„ ์žฌ์‚ฌ์šฉํ•˜๊ธฐ ํŽธ๋ฆฌ! Sass์˜ ์˜๋ฏธ CSS์˜ ๋‹จ์ ์„ ๋ฉ”์›Œ ๋” ๋น ๋ฅด๊ณ  ํšจ์œจ์ ์œผ๋กœ ์Šคํƒ€์ผ์„ ์ž‘์„ฑํ•  ์ˆ˜ ์žˆ๋Š” ๊ตฌ๋ฌธ CSS์ „์ฒ˜๋ฆฌ๊ธฐ ์ปดํŒŒ์ผ ๊ณผ์ • ๐ŸŽˆSass? SCSS? Sass ๊ตฌ๋ฌธ์„ ์ด์šฉํ•ด ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๋ฉด, Sass ์ „์ฒ˜๋ฆฌ๊ธฐ๊ฐ€ ์ด๋ฅผ css๋กœ ๋ณ€ํ™˜ Sass ๊ตฌ๋ฌธ๊ณผ ๋™์ผํ•œ ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•จ๊ณผ ๋™์‹œ์— ์ข€ ๋” CSS ์นœํ™”์ ์ธ ๊ตฌ๋ฌธ์ธ SCSS๋ผ๋Š” ๊ตฌ๋ฌธ๋„ ์กด์žฌ SCSS ๊ตฌ๋ฌธ์„ ์ด์šฉํ•ด ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๋ฉด,Sass ์ „์ฒ˜๋ฆฌ๊ธฐ๋Š” ์ด ๋˜ํ•œ CSS๋กœ ๋ณ€ํ™˜ ์‚ฌ๋žŒ๋“ค์ด Sass ๊ตฌ๋ฌธ๋ณด๋‹ค SCSS๊ตฌ๋ฌธ์„ ์„ ํ˜ธํ•˜๋Š” ๊ฒฝํ–ฅ์ด ์žˆ์Œ SCSS๊ตฌ๋ฌธ์€ Sass ์–ธ์–ด์˜ ํ•˜์œ„ ๊ฐœ๋… ๐ŸŽˆNext.js์—.. 2022. 9. 6.
[GIT]GitLab์—์„œ GitHub์œผ๋กœ ์ €์žฅ์†Œ ์˜ฎ๊ธฐ๊ธฐ : ์ž”๋”” ์‹ฌ์–ด์ง€์ง€ ์•Š๋Š” ๋ฌธ์ œ ํ•ด๊ฒฐํ•˜๊ธฐ GitLab์—์„œ GitHub์— ๋ฏธ๋Ÿฌ๋ง์„ ํ†ตํ•ด ์˜ฎ๊ฒจ์™”๋Š”๋ฐ ์ž”๋””๊ฐ€ ์‹ฌ์–ด์ง€์ง€ ์•Š๋Š” ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค! ์ „๋ถ€ํ„ฐ GitLab์•„์ด๋””์™€ GitHub์•„์ด๋””๊ฐ€ ๋‹ฌ๋ผ์„œ ์–‘์ชฝ์— ์ž”๋””๊ฐ€ ์•ˆ์‹ฌ์–ด์ง€๋Š” ๋ฌธ์ œ๊ฐ€ ํ•ญ์ƒ ๋ฐœ์ƒํ–ˆ๋Š”๋ฐ.... ์ด๋ฒˆ์—๋„ ๋˜ ๋ฐœ์ƒํ–ˆ๋‹ค. https://aldrn29.tistory.com/64 GitLab์—์„œ GitHub์œผ๋กœ ์ €์žฅ์†Œ ์˜ฎ๊ธฐ๊ธฐ : ์ž”๋”” ์‹ฌ์–ด์ง€์ง€ ์•Š๋Š” ๋ฌธ์ œ ํ•ด๊ฒฐํ•˜๊ธฐ GitLab์—์„œ GitHub Repository๋กœ ํ”„๋กœ์ ํŠธ๊ฐ€ ์ž˜ ์˜ฎ๊ฒจ์กŒ์Œ์—๋„ ๋ถˆ๊ตฌํ•˜๊ณ  ์ž”๋””๊ฐ€ ์•ˆ๋ณด์ด๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ๋‹ค. ํ›„... ๋ถ„๋ช… ์ด์ „์— ํ•  ๋•Œ๋Š” ์ž”๋””๊ฐ€ ์ž˜ ๋ณด์˜€๋Š”๋ฐ...! ํ•˜ํ•˜ ๊ทธ๋ž˜๋„ ์›์ธ์„ ์ฐพ์•˜๋‹ค! ๋ฌธ์ œ ์›์ธ ์›์ธ์— aldrn29.tistory.com ์›๋ž˜๋Š” ์ด ๋ธ”๋กœ๊ทธ ๊ธ€์„ ๋ณด๊ณ  ํŠน์ • ํด๋”๋งŒ user.email ๋ฐ”๊พธ๊ธฐ๋ฅผ ๋”ฐ๋ผ์„œ ํ•ด๋ดค์ง€๋งŒ ํ•ด๊ฒฐ.. 2022. 9. 1.
[python]ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค - [1์ฐจ] ์บ์‹œ [python]ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค - [1์ฐจ] ์บ์‹œ https://school.programmers.co.kr/learn/courses/30/lessons/17680 ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค ์ฝ”๋“œ ์ค‘์‹ฌ์˜ ๊ฐœ๋ฐœ์ž ์ฑ„์šฉ. ์Šคํƒ ๊ธฐ๋ฐ˜์˜ ํฌ์ง€์…˜ ๋งค์นญ. ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค์˜ ๊ฐœ๋ฐœ์ž ๋งž์ถคํ˜• ํ”„๋กœํ•„์„ ๋“ฑ๋กํ•˜๊ณ , ๋‚˜์™€ ๊ธฐ์ˆ  ๊ถํ•ฉ์ด ์ž˜ ๋งž๋Š” ๊ธฐ์—…๋“ค์„ ๋งค์นญ ๋ฐ›์œผ์„ธ์š”. programmers.co.kr def solution(cacheSize, cities): answer = 0 miss,hit=0,0 cache = [] for city in cities: #๋Œ€๋ฌธ์ž๋กœ ๋ณ€ํ™˜ city=city.upper() #cacheSize๊ฐ€ 0์ด ์•„๋‹ ๋•Œ if cacheSize != 0: #cache์— city๊ฐ€ ์กด์žฌ ํ•˜์ง€ ์•Š์„๋•Œ #cache miss +1 if no.. 2022. 8. 31.