์ „์ฒด ๊ธ€ 97

[Next.js] Planet Scale + Prisma ๋ฐฐํฌํ•˜๊ธฐ (Vercel)

๐Ÿš€ ํ”„๋กœ์ ํŠธ ๋ฐฐํฌํ•˜๊ธฐ ๊ฐœ๋ฐœ ํ™˜๊ฒฝ์—์„œ ์‚ฌ์šฉํ•˜๋˜ DB์™€ ๋ฐฐํฌ ํ™˜๊ฒฝ์—์„œ ์‚ฌ์šฉํ•  DB๋ฅผ ํ˜ผ์šฉํ•˜์ง€ ์•Š๊ธฐ ์œ„ํ•ด์„œ๋Š” ํ”„๋กœ์ ํŠธ ๊ฐœ๋ฐœ ์‹œ์— ๋งŒ๋“  DB branch๋ฅผ ๋ฐฐํฌํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค. ์ง€๊ธˆ๋ถ€ํ„ฐ branch ๋ฐฐํฌ ๋ฐฉ๋ฒ•์„ ํ•œ ๋‹จ๊ณ„์”ฉ ์•Œ์•„๊ฐ€ ๋ด…์‹œ๋‹ค. (๊ธ€์“ด์ด๋Š” Vercel๋กœ ํ”„๋กœ์ ํŠธ๋ฅผ ๋ฐฐํฌํ–ˆ์Šต๋‹ˆ๋‹ค.) 1. Promote branch https://app.planetscale.com/ Sign in - PlanetScale auth.planetscale.com ์šฐ์„  PlanetScale ์‚ฌ์ดํŠธ์— ์ ‘์†ํ•ด ๋กœ๊ทธ์ธ ํ›„, main branch์— ์ ‘์†ํ•ฉ๋‹ˆ๋‹ค. Promote a branch to production ๋ฒ„ํŠผ์„ ํด๋ฆญํ•˜๋ฉด main branch๊ฐ€ production์œผ๋กœ ์„ค์ •๋ฉ๋‹ˆ๋‹ค. 2. Add Environment Varia..

Next.js 2022.10.18

[Next.js] TinyMCE ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์‚ฌ์šฉํ•˜๊ธฐ (+ ์ด๋ฏธ์ง€ ์—…๋กœ๋“œ)

The Most Advanced WYSIWYG HTML Editor | Trusted Rich Text Editor | TinyMCE TinyMCE is the most advanced WYSIWYG HTML editor designed to simplify website content creation. The rich text editing platform that helped launched Atlassian, Medium, Evernote and more. www.tiny.cloud ์™œ TinyMCE ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์„ ํƒํ–ˆ์„๊นŒ? TinyMCE ์—๋””ํ„ฐ๋Š” ๋ฌด๋ฃŒ ๋ฒ„์ „๋„ ์žˆ๊ณ  ๊ฐ€์žฅ ๋งŽ์ด ์‚ฌ์šฉ๋˜๋Š” CKeditor๋ณด๋‹ค ๊ฐ€๋ฒผ์›Œ์„œ ์„ ํƒํ•˜๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๋ฌด์—‡๋ณด๋‹ค ํ‹ฐ์Šคํ† ๋ฆฌ ๋ธ”๋กœ๊ทธ์—์„œ๋„ TinyMCE ์—๋””ํ„ฐ๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ..

Next.js 2022.08.27

React์— ๋Œ€ํ•˜์—ฌ

ํ”„๋ก ํŠธ์—”๋“œ ๊ณต๋ถ€๋ฅผ ์ฒ˜์Œ ์‹œ์ž‘ํ•  ๋•Œ React ๊ณต๋ถ€๋ฅผ ํ–ˆ๊ณ , ํ˜„์žฌ๊นŒ์ง€๋„ ํ”„๋กœ์ ํŠธ๋ฅผ ๊ตฌํ˜„ํ•  ๋•Œ React๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๋ˆ„๊ตฐ๊ฐ€๊ฐ€ React๋ฅผ ์™œ ์‚ฌ์šฉํ•˜๋ƒ๊ณ  ๋ฌป๋Š”๋‹ค๋ฉด "์ธ๊ธฐ ์žˆ๋Š” ํ”„๋ก ํŠธ์—”๋“œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ", "๋งŽ์€ ๊ธฐ์—…์—์„œ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์–ด์„œ", "์ปดํฌ๋„ŒํŠธ ๊ธฐ๋ฐ˜ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋กœ ์žฌ์‚ฌ์šฉ์ด ๊ฐ€๋Šฅํ•˜๊ธฐ ๋•Œ๋ฌธ์—" ์ •๋„๋งŒ ๋Œ€๋‹ตํ•  ์ˆ˜ ์žˆ๊ฒ ๋”๊ตฐ์š”. ๊ทธ๋ž˜์„œ ์˜ค๋Š˜์€ React์˜ ๋“ฑ์žฅ ๋ฐฐ๊ฒฝ๊ณผ React๋ž€ ๋ฌด์—‡์ธ์ง€, React๋ฅผ ์™œ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ธ์ง€์— ๋Œ€ํ•ด ์ด์•ผ๊ธฐํ•ด๋ณด๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ๐ŸŒณ React ๋“ฑ์žฅ ๋ฐฐ๊ฒฝ ์‹œ๋Œ€๊ฐ€ ๋ณ€ํ•จ์— ๋”ฐ๋ผ ์‚ฌ์šฉ์ž๋“ค์˜ ์š”๊ตฌ์‚ฌํ•ญ์ด ๋งŽ์•„์ง€๋ฉด์„œ ๊ฐœ๋ฐœ์ž๋“ค์ด ์ฒ˜๋ฆฌํ•ด์•ผ ํ•  UI๊ฐ€ ๋งŽ์•„์ง€๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ์ƒํ™ฉ ์†์—์„œ ๊ฐœ๋ฐœ์ž๋“ค์€ ์˜ค์ง ๊ธฐ๋Šฅ ๊ฐœ๋ฐœ์— ์ดˆ์ ์„ ๋‘๊ณ  ๋™์ ์ธ ์›น ํŽ˜์ด์ง€๋ฅผ ๋ณด๋‹ค ํšจ์œจ์ ์œผ๋กœ ์œ ์ง€ ๋ณด์ˆ˜ํ•˜๊ธฐ ์œ„ํ•ด ์ƒˆ๋กœ์šด Fron..

React 2022.08.09

[ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค] ์ž…๊ตญ์‹ฌ์‚ฌ C++ (Lv.3)

https://programmers.co.kr/learn/courses/30/lessons/43238 ์ฝ”๋”ฉํ…Œ์ŠคํŠธ ์—ฐ์Šต - ์ž…๊ตญ์‹ฌ์‚ฌ n๋ช…์ด ์ž…๊ตญ์‹ฌ์‚ฌ๋ฅผ ์œ„ํ•ด ์ค„์„ ์„œ์„œ ๊ธฐ๋‹ค๋ฆฌ๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๊ฐ ์ž…๊ตญ์‹ฌ์‚ฌ๋Œ€์— ์žˆ๋Š” ์‹ฌ์‚ฌ๊ด€๋งˆ๋‹ค ์‹ฌ์‚ฌํ•˜๋Š”๋ฐ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„์€ ๋‹ค๋ฆ…๋‹ˆ๋‹ค. ์ฒ˜์Œ์— ๋ชจ๋“  ์‹ฌ์‚ฌ๋Œ€๋Š” ๋น„์–ด์žˆ์Šต๋‹ˆ๋‹ค. ํ•œ ์‹ฌ์‚ฌ๋Œ€์—์„œ๋Š” ๋™์‹œ์— ํ•œ programmers.co.kr ์ด๋ฒˆ ๋ฌธ์ œ๋Š” ์ด๋ถ„ ํƒ์ƒ‰ ๋ฌธ์ œ์˜€์Šต๋‹ˆ๋‹ค. ๐Ÿ“ ๋ฌธ์ œ ํ’€์ด 1. ์ด๋ถ„ ํƒ์ƒ‰์„ ํ•˜๊ธฐ ์œ„ํ•ด n๋ช…์„ ์‹ฌ์‚ฌํ•˜๋Š”๋ฐ ๊ฑธ๋ฆฌ๋Š” ์ตœ์†Œ ์‹œ๊ฐ„๊ณผ ์ตœ๋Œ€ ์‹œ๊ฐ„ ์ •์˜ (์ตœ์†Œ ์‹œ๊ฐ„: left_val, ์ตœ๋Œ€ ์‹œ๊ฐ„: right_val) 2. mid ์‹œ๊ฐ„ ๋™์•ˆ ์‹ฌ์‚ฌ ๊ฐ€๋Šฅํ•œ ์‚ฌ๋žŒ ์ˆ˜๊ฐ€ n๋ช… ๋ณด๋‹ค ์ ์œผ๋ฉด ์‹œ๊ฐ„ ๋ฒ”์œ„๋ฅผ ๋Š˜๋ฆผ ← left_val = mid + 1 3. mid ์‹œ๊ฐ„ ๋™์•ˆ ์‹ฌ์‚ฌ ๊ฐ€๋Šฅํ•œ ์‚ฌ๋žŒ ์ˆ˜๊ฐ€ ..

[ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค] ๊ฑฐ๋ฆฌ๋‘๊ธฐ ํ™•์ธํ•˜๊ธฐ

https://programmers.co.kr/learn/courses/30/lessons/81302 ์ฝ”๋”ฉํ…Œ์ŠคํŠธ ์—ฐ์Šต - ๊ฑฐ๋ฆฌ๋‘๊ธฐ ํ™•์ธํ•˜๊ธฐ [["POOOP", "OXXOX", "OPXPX", "OOXOX", "POXXP"], ["POOPX", "OXPXP", "PXXXO", "OXXXO", "OOOPP"], ["PXOPX", "OXOXP", "OXPOX", "OXXOP", "PXPOX"], ["OOOXX", "XOOOX", "OOOXX", "OXOOX", "OOOOO"], ["PXPXP", "XPXPX", "PXPXP", "XPXPX", "PXPXP"]] [1, 0, 1, 1, 1] programmers.co.kr ์ด๋ฒˆ ๋ฌธ์ œ๋Š” BFS ๋ฌธ์ œ์˜€์Šต๋‹ˆ๋‹ค. ใ€Š๋ฌธ์ œ ํ’€์ดใ€‹ 1. places ๋ฐฐ์—ด์˜ ๊ฐ ํ–‰์„ plac..

[ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค] ์ ํ”„์™€ ์ˆœ๊ฐ„ ์ด๋™

https://programmers.co.kr/learn/courses/30/lessons/12980 ์ฝ”๋”ฉํ…Œ์ŠคํŠธ ์—ฐ์Šต - ์ ํ”„์™€ ์ˆœ๊ฐ„ ์ด๋™ OO ์—ฐ๊ตฌ์†Œ๋Š” ํ•œ ๋ฒˆ์— K ์นธ์„ ์•ž์œผ๋กœ ์ ํ”„ํ•˜๊ฑฐ๋‚˜, (ํ˜„์žฌ๊นŒ์ง€ ์˜จ ๊ฑฐ๋ฆฌ) x 2 ์— ํ•ด๋‹นํ•˜๋Š” ์œ„์น˜๋กœ ์ˆœ๊ฐ„์ด๋™์„ ํ•  ์ˆ˜ ์žˆ๋Š” ํŠน์ˆ˜ํ•œ ๊ธฐ๋Šฅ์„ ๊ฐ€์ง„ ์•„์ด์–ธ ์ŠˆํŠธ๋ฅผ ๊ฐœ๋ฐœํ•˜์—ฌ ํŒ๋งคํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ์•„์ด์–ธ ์Šˆ programmers.co.kr ์ด๋ฒˆ ๋ฌธ์ œ๋Š” Top-Bottom ๋ฌธ์ œ์˜€์Šต๋‹ˆ๋‹ค. ใ€Š๋ฌธ์ œ ํ’€์ดใ€‹ 1. ์ฒ˜์Œ ํ•œ ์นธ์€ ๋ฌด์กฐ๊ฑด ์ ํ”„ํ•ด์•ผ ํ•˜๋ฏ€๋กœ ans 1 ๋ถ€ํ„ฐ ์‹œ์ž‘ 2. n์„ 2๋กœ ๋‚˜๋ˆ„์—ˆ์„ ๋•Œ ๋‚˜๋จธ์ง€๊ฐ€ 1์ด๋ฉด ์ ํ”„ํ•ด์•ผ ํ•œ๋‹ค๋Š” ์˜๋ฏธ์ด๋ฏ€๋กœ ans++ ใ€ŠC++ ์ฝ”๋“œใ€‹ #include using namespace std; int solution(int n) { int ans = 1; ..

[ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค] ์˜์–ด ๋๋ง์ž‡๊ธฐ

https://programmers.co.kr/learn/courses/30/lessons/12981 ์ฝ”๋”ฉํ…Œ์ŠคํŠธ ์—ฐ์Šต - ์˜์–ด ๋๋ง์ž‡๊ธฐ 3 ["tank", "kick", "know", "wheel", "land", "dream", "mother", "robot", "tank"] [3,3] 5 ["hello", "observe", "effect", "take", "either", "recognize", "encourage", "ensure", "establish", "hang", "gather", "refer", "reference", "estimate", "executive"] [0,0] programmers.co.kr ์ด๋ฒˆ ๋ฌธ์ œ๋Š” ๊ตฌํ˜„ ๋ฌธ์ œ์˜€์Šต๋‹ˆ๋‹ค. ๋‹จ์–ด์˜ ์ค‘๋ณต์„ ํ”ผํ•˜๊ธฐ ์œ„ํ•ด map ์ž๋ฃŒ๊ตฌ์กฐ๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด..

[ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค] ํ”„๋ฆฐํ„ฐ

https://programmers.co.kr/learn/courses/30/lessons/42587 ์ฝ”๋”ฉํ…Œ์ŠคํŠธ ์—ฐ์Šต - ํ”„๋ฆฐํ„ฐ ์ผ๋ฐ˜์ ์ธ ํ”„๋ฆฐํ„ฐ๋Š” ์ธ์‡„ ์š”์ฒญ์ด ๋“ค์–ด์˜จ ์ˆœ์„œ๋Œ€๋กœ ์ธ์‡„ํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋ ‡๊ธฐ ๋•Œ๋ฌธ์— ์ค‘์š”ํ•œ ๋ฌธ์„œ๊ฐ€ ๋‚˜์ค‘์— ์ธ์‡„๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋Ÿฐ ๋ฌธ์ œ๋ฅผ ๋ณด์™„ํ•˜๊ธฐ ์œ„ํ•ด ์ค‘์š”๋„๊ฐ€ ๋†’์€ ๋ฌธ์„œ๋ฅผ ๋จผ์ € ์ธ์‡„ํ•˜๋Š” ํ”„๋ฆฐ programmers.co.kr ์ด๋ฒˆ ๋ฌธ์ œ๋Š” ํ(Queue) ๋ฌธ์ œ์˜€์Šต๋‹ˆ๋‹ค. ใ€Š๋ฌธ์ œ ํ’€์ดใ€‹ 1. ๋ฌธ์„œ์˜ ์ค‘์š”๋„์™€ ๊ฐ ๋ฌธ์„œ์˜ ์ธ๋ฑ์Šค๋ฅผ ํ q์— ์‚ฝ์ž… 2. ๋ฌธ์„œ์˜ ์ค‘์š”๋„๋ฅผ ํŒ๋ณ„ํ•˜๊ธฐ ์œ„ํ•ด ์šฐ์„ ์ˆœ์œ„ ํ pq์— ๋ฌธ์„œ์˜ ์ค‘์š”๋„ ์‚ฝ์ž… 3. ํ˜„์žฌ ๋ฌธ์„œ์˜ ์ค‘์š”๋„๊ฐ€ ๊ฐ€์žฅ ๋†’๋‹ค๋ฉด ์ธ์‡„ ← print++ โ˜› ์ด ๋•Œ, ํ˜„์žฌ ๋ฌธ์„œ๊ฐ€ ๋‚ด๊ฐ€ ์š”์ฒญํ•œ ๋ฌธ์„œ์˜ ๋Œ€๊ธฐ ๋ชฉ๋ก ์œ„์น˜๋ผ๋ฉด ๋ฐ˜๋ณต๋ฌธ ์ข…๋ฃŒ โญ๏ธ (์‹œ๊ฐ„ ์ดˆ๊ณผ ๋ฌธ์ œ๋กœ ๊ผญ ํ•ด์ฃผ์–ด์•ผ ํ•ด..

[ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค] ๊ด„ํ˜ธ ๋ณ€ํ™˜

https://programmers.co.kr/learn/courses/30/lessons/60058 ์ฝ”๋”ฉํ…Œ์ŠคํŠธ ์—ฐ์Šต - ๊ด„ํ˜ธ ๋ณ€ํ™˜ ์นด์นด์˜ค์— ์‹ ์ž… ๊ฐœ๋ฐœ์ž๋กœ ์ž…์‚ฌํ•œ "์ฝ˜"์€ ์„ ๋ฐฐ ๊ฐœ๋ฐœ์ž๋กœ๋ถ€ํ„ฐ ๊ฐœ๋ฐœ์—ญ๋Ÿ‰ ๊ฐ•ํ™”๋ฅผ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฐœ๋ฐœ์ž๊ฐ€ ์ž‘์„ฑํ•œ ์†Œ์Šค ์ฝ”๋“œ๋ฅผ ๋ถ„์„ํ•˜์—ฌ ๋ฌธ์ œ์ ์„ ๋ฐœ๊ฒฌํ•˜๊ณ  ์ˆ˜์ •ํ•˜๋ผ๋Š” ์—…๋ฌด ๊ณผ์ œ๋ฅผ ๋ฐ›์•˜์Šต๋‹ˆ๋‹ค. ์†Œ์Šค๋ฅผ programmers.co.kr ์ด๋ฒˆ ๋ฌธ์ œ๋Š” ๊ตฌํ˜„ ๋ฌธ์ œ์˜€์Šต๋‹ˆ๋‹ค. ใ€Š๋ฌธ์ œ ํ’€์ดใ€‹ 1. ๋ฌธ์ž์—ด p๊ฐ€ ์˜ฌ๋ฐ”๋ฅธ ๊ด„ํ˜ธ ๋ฌธ์ž์—ด์ด๊ฑฐ๋‚˜ ๋นˆ ๋ฌธ์ž์—ด์ด๋ฉด ๋ฌธ์ž์—ด ๊ทธ๋Œ€๋กœ ๋ฐ˜ํ™˜ 2. ๋ฌธ์ž์—ด p๊ฐ€ ์˜ฌ๋ฐ”๋ฅธ ๊ด„ํ˜ธ ๋ฌธ์ž์—ด์ด ์•„๋‹ˆ๋ผ๋ฉด (1) ๋ฌธ์ž์—ด p๋ฅผ ๋‘ ๊ท ํ˜•์žกํžŒ ๊ด„ํ˜ธ ๋ฌธ์ž์—ด u, v๋กœ ๋ถ„๋ฆฌ ← cnt ๋ณ€์ˆ˜ ์ด์šฉ (2) ๋ฌธ์ž์—ด u๊ฐ€ ์˜ฌ๋ฐ”๋ฅธ ๊ด„ํ˜ธ ๋ฌธ์ž์—ด์ด๋ฉด u + solution(v) ๋ฐ˜ํ™˜ • ๋ฌธ์ž์—ด u๊ฐ€ ์˜ฌ๋ฐ”๋ฅธ ๊ด„ํ˜ธ ๋ฌธ์ž์—ด..

[ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค] ์ „ํ™”๋ฒˆํ˜ธ ๋ชฉ๋ก

https://programmers.co.kr/learn/courses/30/lessons/42577 ์ฝ”๋”ฉํ…Œ์ŠคํŠธ ์—ฐ์Šต - ์ „ํ™”๋ฒˆํ˜ธ ๋ชฉ๋ก ์ „ํ™”๋ฒˆํ˜ธ๋ถ€์— ์ ํžŒ ์ „ํ™”๋ฒˆํ˜ธ ์ค‘, ํ•œ ๋ฒˆํ˜ธ๊ฐ€ ๋‹ค๋ฅธ ๋ฒˆํ˜ธ์˜ ์ ‘๋‘์–ด์ธ ๊ฒฝ์šฐ๊ฐ€ ์žˆ๋Š”์ง€ ํ™•์ธํ•˜๋ ค ํ•ฉ๋‹ˆ๋‹ค. ์ „ํ™”๋ฒˆํ˜ธ๊ฐ€ ๋‹ค์Œ๊ณผ ๊ฐ™์„ ๊ฒฝ์šฐ, ๊ตฌ์กฐ๋Œ€ ์ „ํ™”๋ฒˆํ˜ธ๋Š” ์˜์„์ด์˜ ์ „ํ™”๋ฒˆํ˜ธ์˜ ์ ‘๋‘์‚ฌ์ž…๋‹ˆ๋‹ค. ๊ตฌ์กฐ programmers.co.kr ์ด๋ฒˆ ๋ฌธ์ œ๋Š” ํ•ด์‹œ ๋ฌธ์ œ์˜€์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ.. ์ €๋Š” ํ•ด์‹œ๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ณ  ํ’€์—ˆ์Šต๋‹ˆ๋‹ค. ๐Ÿ˜… ใ€Š๋ฌธ์ œ ํ’€์ดใ€‹ 1. phone_book์„ ์‚ฌ์ „ ์ˆœ์œผ๋กœ ์ •๋ ฌ 2. ํ˜„์žฌ ์ „ํ™”๋ฒˆํ˜ธ๊ฐ€ ๋‹ค๋ฅธ ์ „ํ™”๋ฒˆํ˜ธ์˜ ์ ‘๋‘์–ด๋ผ๋ฉด answer = false ใ€ŠC++ ์ฝ”๋“œใ€‹ #include #include #include using namespace std; bool solution(vector ..

๋ฐ˜์‘ํ˜•