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

์ „์ฒด ๊ธ€293

[Next.js] SWC๋ฅผ ํ™œ์šฉํ•˜์—ฌ ๋นŒ๋“œ ์‹œ๊ฐ„ ๋‹จ์ถ•ํ•˜๊ธฐ SWC๋ฅผ ํ™œ์šฉํ•˜์—ฌ ๋นŒ๋“œ ์‹œ๊ฐ„ ๋‹จ์ถ•ํ•˜๊ธฐ  ์‚ฌ๋‚ด์—์„œ๋Š” CI/CD ๋„๊ตฌ๋กœ ๊นƒํ—™ ์•ก์…˜์„ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋‹ค.๋ฐฑ์—”๋“œ์™€ ๋‹ค๋ฅด๊ฒŒ ํ”„๋ก ํŠธ๋Š” ์•ก์…˜์ด ์™„๋ฃŒ๋˜๋Š”๋ฐ ๊นŒ์ง€ ์ „์ฒด์ ์ธ ์‹œ๊ฐ„์ด ์ข€ ๋” ์†Œ์š”๋˜๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค. ํ˜„์žฌ ๋‚ด๊ฐ€ ๊ฐœ๋ฐœํ•˜๊ณ  ์žˆ๋Š” ํ”„๋ก ํŠธ ํ™˜๊ฒฝ์—์„œ CI/CD ๊ณผ์ • ์ค‘ ๊ฐ€์žฅ ์†Œ์š” ์‹œ๊ฐ„์ด ๊ธด ์Šคํƒญ์€ ๋นŒ๋“œ ํ›„ ๋„์ปค ์ด๋ฏธ์ง€๋ฅผ ๋งŒ๋“ค์–ด ECR๋กœ ์˜ฎ๊ธฐ๋Š” ์‹œ์ ์ด๋‹ค.  ๊ทธ ์ค‘ CI ๊ณผ์ • ์ค‘์—์„œ ํ”„๋ก ํŠธ ํ”„๋กœ์ ํŠธ ๋นŒ๋“œ ์‹œ๊ฐ„๊ณผ ECR PUSH ํƒ€์ž„์ด ๋Œ€๋ถ€๋ถ„์„ ์ฐจ์ง€ํ•จ์„ ํ™•์ธ ํ•  ์ˆ˜ ์žˆ๋‹ค.   โ“๊ทธ๋ ‡๋‹ค๋ฉด,ํ”„๋ก ํŠธ ํ”„๋กœ์ ํŠธ ๋นŒ๋“œ ์‹œ๊ฐ„์„ ์–ด๋–ป๊ฒŒ ์ค„์ผ ์ˆ˜ ์žˆ์„๊นŒ?  Next.js ๋นŒ๋“œ ์‹œ๊ฐ„์„ ๋‹จ์ถ• ํ•˜๋Š” ๋ฐฉ๋ฒ•SWC ์ฝ”๋“œ ์••์ถ• ํ™œ์„ฑํ™”: swcMinify: true๋ฅผ ์„ค์ •ํ•ด ๋นŒ๋“œ ์‹œ SWC๋ฅผ ํ†ตํ•ด ์ฝ”๋“œ๋ฅผ ์••์ถ•ํ•˜์—ฌ ์ตœ์ ํ™”.Webpack ์บ์‹ฑ ์‚ฌ์šฉ: W.. 2024. 11. 1.
[JavaScript] ๋งˆ์šฐ์Šค ๋ฐ ํœ  ์ด๋ฒคํŠธ (onMouseEnter, onMouseLeave, onWheel) [JavaScript] ๋งˆ์šฐ์Šค ๋ฐ ํœ  ์ด๋ฒคํŠธ (onMouseEnter, onMouseLeave, onWheel)ํšŒ์‚ฌ ์„œ๋น„์Šค๋ฅผ ๊ตฌํ˜„ ํ•˜๋ฉด์„œ ํšŒ์‚ฌ ์ž์ฒด ์ปดํฌ๋„ŒํŠธ ํˆดํŒ ์ŠคํŽ™๋•Œ๋ฌธ์—,๋งˆ์šฐ์Šค๊ฐ€ ํ…์ŠคํŠธ ์œ„์— ์กด์žฌ ํ•˜์ง€ ์•Š์Œ์—๋„ ํœ  ์ด๋ฒคํŠธ ๋ฐœ์ƒ์‹œ ํˆดํŒ์ด ๊ณ„์† ๋– ์žˆ๋Š” ํ˜„์ƒ์ด ๋ฐœ์ƒํ•˜์˜€๋‹ค. ๊ทธ๋ž˜์„œ tooltip์ด ๋– ์•ผ ํ•˜๋Š” ํ…์ŠคํŠธ์— onMouseEnter, onMouseLeave, onWheel ์ด๋ฒคํŠธ ํ•ธ๋“ค๋Ÿฌ๋“ค์„ ์‚ฌ์šฉํ•˜์—ฌ ์ด๋ฅผ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ์—ˆ๋‹ค. onMouseEnter ์ด๋ฒคํŠธonMouseEnter ์ด๋ฒคํŠธ๋Š” ๋งˆ์šฐ์Šค ํฌ์ธํ„ฐ๊ฐ€ ํŠน์ • ์š”์†Œ์— ์ฒ˜์Œ์œผ๋กœ ๋“ค์–ด๊ฐ”์„ ๋•Œ ๋ฐœ์ƒํ•˜๋Š” ์ด๋ฒคํŠธ.์ด ์ด๋ฒคํŠธ๋Š” ์‚ฌ์šฉ์ž๊ฐ€ ๋งˆ์šฐ์Šค๋ฅผ ์š”์†Œ ์œ„๋กœ ์ด๋™์‹œํ‚ฌ ๋•Œ ํŠธ๋ฆฌ๊ฑฐ ๋œ๋‹ค.onMouseEnter๋Š” ํ•ด๋‹น ์š”์†Œ์˜ ์ž์‹ ์š”์†Œ์—๋Š” ์ด๋ฒคํŠธ๋ฅผ ์ „ํŒŒํ•˜์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์— ๋ถ€๋ชจ .. 2024. 5. 20.
[JavaScript] ํŒ์—… ์ฐฝ ๊ตฌํ˜„ - window.open [JavaScript] ํŒ์—… ์ฐฝ ๊ตฌํ˜„ - window.openํ”„๋กœ์ ํŠธ์—์„œ ๊ธฐํš ๋ช…์„ธ๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ๋…๋ฆฝ๋œ ํŒ์—… ์ฐฝ์„ ๊ตฌํ˜„ํ•ด์•ผ ํ–ˆ๋‹ค.JavaScript์˜ window.open ๋ฉ”์„œ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํŒ์—…์ฐฝ์„ ๊ตฌํ˜„ํ•˜์˜€๋‹ค. window.open ๋ฉ”์„œ๋“œ์ƒˆ ๋ธŒ๋ผ์šฐ์ € ์ฐฝ์ด๋‚˜ ํƒญ์„ ์—ด ๋•Œ ์‚ฌ์šฉํ•˜๋Š” ๋ฉ”์„œ๋“œwindow.open(url, windowName, [windowFeatures]);- url : ํŒ์—… ์ฐฝ์— ๋กœ๋“œํ•  ํŽ˜์ด์ง€ URL- windowName :  ํŒ์—… ์ฐฝ์˜ ์ด๋ฆ„. ๊ฐ™์€ ์ด๋ฆ„์„ ๊ฐ€์ง„ ์ฐฝ์ด ์ด๋ฏธ ์—ด๋ ค์žˆ๋‹ค๋ฉด ํ•ด๋‹น ์ฐฝ์„ ์žฌ์‚ฌ์šฉ.- windowFeatures : ํŒ์—… ์ฐฝ์˜ ํŠน์„ฑ์„ ์ •์˜ํ•˜๋Š” ๋ฌธ์ž์—ด. ์ฝ”๋“œ ์˜ˆ์‹œ์•ฝ๊ด€ ๋ณด๊ธฐ Reference Window: open() method - Web APIs | MDNThe open() m.. 2024. 5. 20.
[Softeer] level1 A+B python [Softeer] level1 A+B python import sys input = sys.stdin.readline T = int(input()) for t in range(1,T+1): A,B = map(int,input().split(' ')) answer = A+B print(f'Case #{t}: {answer}') https://softeer.ai/practice/info.do?idx=1&eid=362 Softeer ์—ฐ์Šต๋ฌธ์ œ๋ฅผ ๋‹ด์„ Set์„ ์„ ํƒํ•ด์ฃผ์„ธ์š”. ์ทจ์†Œ ํ™•์ธ softeer.ai ์–ธ์–ด๋ณ„ ์‹œ๊ฐ„/๋ฉ”๋ชจ๋ฆฌ ์–ธ์–ด์‹œ๊ฐ„๋ฉ”๋ชจ๋ฆฌ C 1์ดˆ 256MB C++ 1์ดˆ 256MB Java 1์ดˆ 256MB Python 1์ดˆ 256MB Javascript 1์ดˆ 256MB ๋ฌธ์ œ ๋‘ ์ •์ˆ˜ A์™€ B๋ฅผ ์ž…๋ ฅ๋ฐ›์€ ๋‹ค์Œ, A+.. 2023. 7. 23.
[Softeer] level1 ๊ทผ๋ฌด์‹œ๊ฐ„ python [Softeer] level1 ๊ทผ๋ฌด์‹œ๊ฐ„ paython https://softeer.ai/practice/info.do?idx=1&eid=990&sw_prbl_sbms_sn=227123 Softeer ์—ฐ์Šต๋ฌธ์ œ๋ฅผ ๋‹ด์„ Set์„ ์„ ํƒํ•ด์ฃผ์„ธ์š”. ์ทจ์†Œ ํ™•์ธ softeer.ai ์–ธ์–ด๋ณ„ ์‹œ๊ฐ„/๋ฉ”๋ชจ๋ฆฌ ์–ธ์–ด์‹œ๊ฐ„๋ฉ”๋ชจ๋ฆฌ C 1์ดˆ 1024MB C++ 1์ดˆ 1024MB Java 1์ดˆ 1024MB Python 1์ดˆ 1024MB Javascript 1์ดˆ 1024MB ๋ฌธ์ œ ๋‹น์‹ ์€ ์ธ์‚ฌํŒ€ ์ง์›์œผ๋กœ, ๊ฐ ์ง์›์˜ ๊ทผํƒœ๋ฅผ ํ™•์ธํ•˜๊ณ ์ž ํ•œ๋‹ค. ๋‹น์‹ ์˜ ํšŒ์‚ฌ๋Š” ์ž์œจ์ถœํ‡ด๊ทผ์ œ๋ฅผ ์‹ค์‹œํ•˜๊ธฐ ๋•Œ๋ฌธ์— ๊ฐ ์ง์›์ด ์ •ํ™•ํžˆ ๋ช‡ ์‹œ์— ์ถœ๊ทผํ•˜๋Š” ๊ฒƒ์€ ์ค‘์š”ํ•˜์ง€ ์•Š๊ณ , ์ด ๊ทผ๋กœ ์‹œ๊ฐ„์ด ๋ช‡ ๋ถ„์ธ์ง€๊ฐ€ ์ค‘์š”ํ•˜๋‹ค. ์ด ๊ทผ๋กœ ์‹œ๊ฐ„์ด ๋ฒ•์ •๊ทผ๋กœ์‹œ๊ฐ„์„ ์ดˆ๊ณผํ•˜์ง€ ์•Š์•„์•ผ ํ•˜๋ฉด์„œ, ํšŒ์‚ฌ์™€.. 2023. 7. 23.
[baekjoon]python #5525 IOIOI [baekjoon]python #5525 IOIOI https://www.acmicpc.net/problem/5525 5525๋ฒˆ: IOIOI N+1๊ฐœ์˜ I์™€ N๊ฐœ์˜ O๋กœ ์ด๋ฃจ์–ด์ ธ ์žˆ์œผ๋ฉด, I์™€ O์ด ๊ต๋Œ€๋กœ ๋‚˜์˜ค๋Š” ๋ฌธ์ž์—ด์„ PN์ด๋ผ๊ณ  ํ•œ๋‹ค. P1 IOI P2 IOIOI P3 IOIOIOI PN IOIOI...OI (O๊ฐ€ N๊ฐœ) I์™€ O๋กœ๋งŒ ์ด๋ฃจ์–ด์ง„ ๋ฌธ์ž์—ด S์™€ ์ •์ˆ˜ N์ด ์ฃผ์–ด์กŒ์„ ๋•Œ, S์•ˆ์— PN์ด ๋ช‡ www.acmicpc.net ์ฝ”๋“œ 50์  import sys input = sys.stdin.readline N = int(input()) M = int(input()) S = input() P=(2*N)+1 search='' for i in range(1,P+1): #์ง์ˆ˜ if i % 2 == 0: sea.. 2023. 7. 19.
[baekjoon]python #20920 ์˜๋‹จ์–ด ์•”๊ธฐ๋Š” ๊ดด๋กœ์›Œ [baekjoon]python #20920 ์˜๋‹จ์–ด ์•”๊ธฐ๋Š” ๊ดด๋กœ์›Œ https://www.acmicpc.net/problem/20920 20920๋ฒˆ: ์˜๋‹จ์–ด ์•”๊ธฐ๋Š” ๊ดด๋กœ์›Œ ์ฒซ์งธ ์ค„์—๋Š” ์˜์–ด ์ง€๋ฌธ์— ๋‚˜์˜ค๋Š” ๋‹จ์–ด์˜ ๊ฐœ์ˆ˜ $N$๊ณผ ์™ธ์šธ ๋‹จ์–ด์˜ ๊ธธ์ด ๊ธฐ์ค€์ด ๋˜๋Š” $M$์ด ๊ณต๋ฐฑ์œผ๋กœ ๊ตฌ๋ถ„๋˜์–ด ์ฃผ์–ด์ง„๋‹ค. ($1 \leq N \leq 100\,000$, $1 \leq M \leq 10$) ๋‘˜์งธ ์ค„๋ถ€ํ„ฐ $N+1$๋ฒˆ์งธ ์ค„๊นŒ์ง€ ์™ธ์šธ ๋‹จ www.acmicpc.net import sys input = sys.stdin.readline N,M = map(int,input().split()) dict={} for i in range(N): word = input().rstrip() if len(word) >= M: if word no.. 2023. 7. 18.
[baekjoon]python #7785 ํšŒ์‚ฌ์— ์žˆ๋Š” ์‚ฌ๋žŒ [baekjoon]python #7785 ํšŒ์‚ฌ์— ์žˆ๋Š” ์‚ฌ๋žŒ https://www.acmicpc.net/problem/7785 7785๋ฒˆ: ํšŒ์‚ฌ์— ์žˆ๋Š” ์‚ฌ๋žŒ ์ฒซ์งธ ์ค„์— ๋กœ๊ทธ์— ๊ธฐ๋ก๋œ ์ถœ์ž… ๊ธฐ๋ก์˜ ์ˆ˜ n์ด ์ฃผ์–ด์ง„๋‹ค. (2 ≤ n ≤ 106) ๋‹ค์Œ n๊ฐœ์˜ ์ค„์—๋Š” ์ถœ์ž… ๊ธฐ๋ก์ด ์ˆœ์„œ๋Œ€๋กœ ์ฃผ์–ด์ง€๋ฉฐ, ๊ฐ ์‚ฌ๋žŒ์˜ ์ด๋ฆ„์ด ์ฃผ์–ด์ง€๊ณ  "enter"๋‚˜ "leave"๊ฐ€ ์ฃผ์–ด์ง„๋‹ค. "enter"์ธ ๊ฒฝ์šฐ๋Š” www.acmicpc.net ๋ฆฌ์ŠคํŠธ ์ž๋ฃŒ๊ตฌ์กฐ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํ’€๋ฉด ์‹œ๊ฐ„ ์ดˆ๊ณผ๊ฐ€ ๋‚œ๋‹ค. ๋ฆฌ์ŠคํŠธ๊ฐ€ ์•„๋‹Œ ๋”•์…”๋„ˆ๋ฆฌ ์ž๋ฃŒ๊ตฌ์กฐ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํ’€๋ฉด ๋œ๋‹ค. (set์„ ์‚ฌ์šฉํ•ด๋„ ๋œ๋‹ค) ๋ฆฌ์ŠคํŠธ์˜ ์ฃผ์š” ์—ฐ์‚ฐ ์‹œ๊ฐ„ ๋ณต์žก๋„ https://lifeofyoori.tistory.com/77 ์—ฐ์‚ฐ ์‹œ๊ฐ„ ๋ณต์žก๋„ Index lst[idx] O(1) Length len.. 2023. 7. 16.
[baekjoon]python #10815 ์ˆซ์ž ์นด๋“œ [baekjoon]python #10815 ์ˆซ์ž ์นด๋“œ3 https://www.acmicpc.net/problem/10815 10815๋ฒˆ: ์ˆซ์ž ์นด๋“œ ์ฒซ์งธ ์ค„์— ์ƒ๊ทผ์ด๊ฐ€ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ์ˆซ์ž ์นด๋“œ์˜ ๊ฐœ์ˆ˜ N(1 ≤ N ≤ 500,000)์ด ์ฃผ์–ด์ง„๋‹ค. ๋‘˜์งธ ์ค„์—๋Š” ์ˆซ์ž ์นด๋“œ์— ์ ํ˜€์žˆ๋Š” ์ •์ˆ˜๊ฐ€ ์ฃผ์–ด์ง„๋‹ค. ์ˆซ์ž ์นด๋“œ์— ์ ํ˜€์žˆ๋Š” ์ˆ˜๋Š” -10,000,000๋ณด๋‹ค ํฌ๊ฑฐ๋‚˜ ๊ฐ™๊ณ , 10, www.acmicpc.net import sys input = sys.stdin.readline N = int(input()) # in ์ˆ˜ํ–‰์‹œ list๋ณด๋‹ค set์ด ๋” ๋นจ๋ฆฌ ๋™์ž‘ # in ์ˆ˜ํ–‰ ์‹œ ๋ชจ๋“  ์š”์†Œ๋ฅผ ์ฒ˜์Œ๋ถ€ํ„ฐ ๊ฒ€์‚ฌํ•˜๋ฉด์„œ ์›์†Œ๋ฅผ ์ฐพ๋Š” list ๋Š” O(n)์˜ ์‹œ๊ฐ„๋ณต์žก๋„๋ฅผ ๊ฐ€์ง€๊ณ , ํ•ด์‹œ๋กœ ๊ตฌํ˜„๋œ set์€ ์ตœ์†Œ O(1)์˜ ์‹œ๊ฐ„๋ณต์žก๋„๋ฅผ ๊ฐ€์ ธ.. 2023. 7. 16.
[baekjoon]python #14425 ๋ฌธ์ž์—ด ์ง‘ํ•ฉ [baekjoon]python #14425 ๋ฌธ์ž์—ด ์ง‘ํ•ฉ https://www.acmicpc.net/problem/14425 14425๋ฒˆ: ๋ฌธ์ž์—ด ์ง‘ํ•ฉ ์ฒซ์งธ ์ค„์— ๋ฌธ์ž์—ด์˜ ๊ฐœ์ˆ˜ N๊ณผ M (1 ≤ N ≤ 10,000, 1 ≤ M ≤ 10,000)์ด ์ฃผ์–ด์ง„๋‹ค. ๋‹ค์Œ N๊ฐœ์˜ ์ค„์—๋Š” ์ง‘ํ•ฉ S์— ํฌํ•จ๋˜์–ด ์žˆ๋Š” ๋ฌธ์ž์—ด๋“ค์ด ์ฃผ์–ด์ง„๋‹ค. ๋‹ค์Œ M๊ฐœ์˜ ์ค„์—๋Š” ๊ฒ€์‚ฌํ•ด์•ผ ํ•˜๋Š” ๋ฌธ์ž์—ด๋“ค์ด ์ฃผ์–ด www.acmicpc.net import sys input = sys.stdin.readline N,M = map(int,input().split(' ')) S = [input()for _ in range(N)] arr = [input()for _ in range(M)] answer = 0 for a in arr: if a in S: an.. 2023. 7. 16.