๐Ÿค study

    [GraphQL] graphQL์ด๋ž€? | restAPI vs graphQL | graphQL ์žฅ๋‹จ์  ๋น„๊ต

    https://www.youtube.com/watch?v=EkWI6Ru8lFQ&list=PLE0hRBClSk5Lcgv3c-I3PH-1LGkv96oYN&index=19 ๊ฐœ๋… facebook์ด ๊ฐœ๋ฐœํ•œ API๋ฅผ ์œ„ํ•œ query language client์—๊ฒŒ ํ•„์š”ํ•œ ๊ฒƒ๋งŒ ์ •ํ™•ํ•˜๊ฒŒ ์š”์ฒญํ•  ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋Šฅ์„ ์ œ๊ณต RestAPI ๋ฐฉ์‹๊ณผ์˜ ๋น„๊ต โœ”๏ธ RestAPI ์žฅ์  ๋ฉ”์†Œ๋“œ์™€ URI๋ฅผ ์กฐํ•ฉํ•ด์„œ ์˜ˆ์ธก๊ฐ€๋Šฅํ•˜๊ณ  ์ผ์ •ํ•œ ์ •๋ณด์™€ ์ž‘์—…์„ ์š”์ฒญํ•  ์ˆ˜ ์žˆ๋‹ค. ์ •๋ณด๋“ค์„ ์ฝ๊ณ , ์“ฐ๊ณ , ์ˆ˜์ •ํ•˜๊ณ , ์‚ญ์ œํ•  ์ˆ˜ ์žˆ์Œ ๋ฐ›์•„์•ผํ•˜๋Š” ํ˜•์‹์ด ์ผ์ •ํ•œ ๊ฒฝ์šฐ์— ๋งŽ์ด ์‚ฌ์šฉ ์ปค์Šคํ„ฐ๋งˆ์ด์ง•ํ• ๋•Œ ์ข‹์Œ. ๋‹จ์  overfetching : ํ•„์š”ํ•˜์ง€ ์•Š์€ ์ •๋ณด๋“ค๊นŒ์ง€ ๋ณผ ์ˆ˜ ์žˆ์Œ. → ๋ฐ์ดํ„ฐ ์ธก๋ฉด์—์„œ ์†Œ๋ชจ๊ฐ€ ๋งŽ์Œ. underfetching : ํ•„์š”ํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด..

    [CSS] flex | align-items | justify-content | flex-direction | flex-wrap | layout ๋ฐฐ์น˜๋ฐฉ๋ฒ•

    [CSS] flex | align-items | justify-content | flex-direction | flex-wrap | layout ๋ฐฐ์น˜๋ฐฉ๋ฒ•

    โœจ flex ๊ฐœ๋… โœ”๏ธ flexible box๋ผ๊ณ ๋„ ๋ถ€๋ฅธ๋‹ค. โœ”๏ธ layout ๋ฐฐ์น˜์˜ ๊ธฐ๋Šฅ์„ ์ˆ˜ํ–‰ํ•œ๋‹ค ์†์„ฑ 1๏ธโƒฃ display: flex flex container๋ฅผ ์ •์˜ํ•  ๋•Œ ์‚ฌ์šฉ (1)๊ฐ€๋กœ๋ฐฉํ–ฅ์œผ๋กœ flex item๋ฐฐ์น˜, (2)๋‚ด์šฉ๋ฌผ์˜ width๋งŒํผ ์ฐจ์ง€, (2)container์˜ ๋†’์ด๋งŒํผ height ์ฆ๊ฐ€ 2๏ธโƒฃ align-items (1) align-items: flex-start; : ์•„์ดํ…œ์„ ์‹œ์ž‘์  ๊ธฐ์ค€์œผ๋กœ ์ •๋ ฌ ๊ธฐ๋ณธ๊ฐ’ (2) align-items: flex-end; : ์•„์ดํ…œ์„ ๋์œผ๋กœ ์ •๋ ฌํ•จ (3) align-items: center; : ์•„์ดํ…œ์„ ๊ฐ€์šด๋ฐ๋กœ ์ •๋ ฌํ•จ 3๏ธโƒฃ justify-content ๋ฉ”์ธ๋ฐฉํ–ฅ ์•„์ดํ…œ ์ •๋ ฌ(๊ฐ€๋กœ๋ฐฐ์น˜์ผ ๊ฒฝ์šฐ์—” ์™ผ์ชฝ, ์„ธ๋กœ ๋ฐฐ์น˜์ผ ๋•Œ์—๋Š” ์œ„์ชฝ ์ •๋ ฌ) (1) just..

    [CSS] CSS ๊ฐ€์ƒ ์„ ํƒ์ž nth-child, nth-of-type

    [CSS] CSS ๊ฐ€์ƒ ์„ ํƒ์ž nth-child, nth-of-type

    (1) :nth-child(N) : ๋ถ€๋ชจ ์•ˆ ๋ชจ๋“  ์š”์†Œ ์ค‘ N๋ฒˆ์งธ (2) M:nth-of-type(N) : ๋ถ€๋ชจ ์•ˆ M ์š”์†Œ์ค‘ N๋ฒˆ์งธ ์˜ˆ์ œ ) ์‹ ํ˜ธ๋“ฑ..?๋งŒ๋“ค๊ธฐ : div ์„ธ๊ฐœ๋กœ ๊ฐ box๋“ค์ด ๊ตฌ์„ฑ๋˜์–ด ์žˆ๋‹ค๊ณ  ๊ฐ€์ •(๊ณ ์œ  ์ด๋ฆ„ x) /*1-2.css*/ div { width:100px; height:100px; margin-left:0; background-color:red; } div:nth-child(2) { background-color:gold; margin-left:auto; margin-right:auto; } div:nth-child(3) { background-color:green; margin-left:auto; } section { border:5px dotted gray; } ํŠน์ • ๋ฐฉํ–ฅ..

    [VSCode] vscode์—์„œ emmet ์„ค์ •ํ•˜๋Š” ๋ฒ• / emmet ์ ์šฉ ์•ˆ๋ ๋•Œ (Mac)๐Ÿ› 

    [VSCode] vscode์—์„œ emmet ์„ค์ •ํ•˜๋Š” ๋ฒ• / emmet ์ ์šฉ ์•ˆ๋ ๋•Œ (Mac)๐Ÿ› 

    1. Code > ๊ธฐ๋ณธ์„ค์ • > ์„ค์ • ํด๋ฆญ 2. ํ™•์žฅ > Emmet ํด๋ฆญ 3. Trigger Expansion On Tab ์ฒดํฌ๋ฐ•์Šค ์ฒดํฌํ•ด์ฃผ๊ธฐ โ€ผ๏ธ 4. ํ™•์ธ ex) ํ…Œ์ŠคํŠธ์ฝ”๋“œ section>div*10 ๐Ÿ“‹ ๊ณต์‹๋ฌธ์„œ https://code.visualstudio.com/docs/editor/emmet Emmet in Visual Studio Code Using Emmet abbreviations inside Visual Studio Code. code.visualstudio.com

    [CSS] ๋กค์˜ค๋ฒ„(hover)๋ž€? | hover ์‚ฌ์šฉ๋ฒ• | hover ์˜ˆ์ œ

    [CSS] ๋กค์˜ค๋ฒ„(hover)๋ž€? | hover ์‚ฌ์šฉ๋ฒ• | hover ์˜ˆ์ œ

    ๐Ÿ”ฅ CSS [์‹ค์Šต 1] ๋กค์˜ค๋ฒ„(hover) ์‚ฌ์šฉํ•˜๊ธฐ hover๋ž€? : ์ด๋ฏธ์ง€, ํ…์ŠคํŠธ, ๋ฒ„ํŠผ ๋“ฑ์— ๋งˆ์šฐ์Šค ํฌ์ธํ„ฐ๊ฐ€ ์˜ฌ๋ผ๊ฐ”์„ ๋•Œ ์ „ํ™˜๋˜๋Š” css ์š”์†Œ ์‚ฌ์šฉ๋ฒ• : ์ด๋ฒคํŠธ๋ฅผ ์ ์šฉํ•˜๊ณ  ์‹ถ์€ ์œ„์น˜์— :hover ์„ ์–ธ ์˜ˆ์‹œ) div:hover { background-color : pink; } ๋ฐ• ๋‹ค ์•ˆ๋…•? ์ • /* hober.css */ section, div { width: 150px; height: 150px; margin: 20px; background-color: yellow; font-size: 2rem; color: white; text-align: center; } div { background-color: pink; display: none; } section:hover ~ div:not(:nth-..

    [GIT] git ๋ธŒ๋žœ์น˜ ์ „๋žต | git flow, github flow ์ฐจ์ด

    [GIT] git ๋ธŒ๋žœ์น˜ ์ „๋žต | git flow, github flow ์ฐจ์ด

    โœจ ๋ธŒ๋žœ์น˜ ์ „๋žต ๐Ÿ“Œ ๋ธŒ๋žœ์น˜ ์ „๋žต ์ •์˜ : ๋ธŒ๋žœ์น˜ ์ƒ์„ฑ์— ๊ทœ์น™์„ ๋งŒ๋“ค์–ด ํ˜‘์—…์„ ์œ ์—ฐํ•˜๊ฒŒ ํ•˜๋Š” ๋ฐฉ๋ฒ•๋ก  ๋‘๊ฐ€์ง€ ๋ธŒ๋žœ์น˜ ์ „๋žต์œผ๋กœ ๊ตฌ๋ถ„๋œ๋‹ค. 1๏ธโƒฃ git-flow ์ „๋žต 5๊ฐ€์ง€ branch๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ๋ชจ๋ธ 1. ๋ฉ”์ธ ๋ธŒ๋žœ์น˜ master branch - ๋ฐฐํฌ ๊ฐ€๋Šฅํ•œ ์ƒํƒœ๋งŒ ๊ด€๋ฆฌํ•˜๋Š” ๋ธŒ๋žœ์น˜ develop branch - ํ‰์†Œ์—๋Š” ์ด ๋ธŒ๋žœ์น˜๋กœ ๊ฐœ๋ฐœ ์ง„ํ–‰ → ๋‚˜์ค‘์— master๊ณผ ํ†ตํ•ฉ - ๋‹ค์Œ์— ๋ฐฐํฌํ•  ๊ฒƒ์„ ๊ฐœ๋ฐœํ•˜๋Š”๋ฐ ์“ฐ์ด๋Š” ๋ธŒ๋žœ์น˜ 2. ๋ณด์กฐ ๋ธŒ๋žœ์น˜ feature branch - ๋ณดํ†ต develop branch์—์„œ ๋ถ„๊ธฐ๋˜์–ด ๊ฐ๊ฐ์˜ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•œ๋‹ค. - ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ์„ ์ถ”๊ฐ€ํ•  ๋•Œ ์ฃผ๋กœ ์‚ฌ์šฉํ•˜๋Š” ๊ฐ€์ง€ release branch - develop ๋ธŒ๋žœ์น˜๋กœ๋ถ€ํ„ฐ release branch๋ฅผ ์ƒ์„ฑ → ๋ฐฐํฌ ๊ฐ€๋Šฅํ•œ ์ƒํƒœ๊ฐ€ ๋˜๋ฉด mas..

    [Java] length, size()์˜ ์ฐจ์ด

    [Java] length, size()์˜ ์ฐจ์ด

    ๐Ÿค length array.length -> ๋ฐฐ์—ด์˜ ๊ธธ์ด ๊ตฌํ•  ๋•Œ ์‚ฌ์šฉ int[] array = new int[10]; System.out.println(array.length); // ์ถœ๋ ฅ : 10 ๐Ÿค size() list.size() -> collection ํƒ€์ž…์˜ ์‚ฌ์ด์ฆˆ๋ฅผ ๊ตฌํ• ๋•Œ ํ•„์š”ํ•˜๋‹ค.(ArrayList) List l = new ArrayList(); l.add(1); l.add(2); System.out.println(l.size()); // ์ถœ๋ ฅ : 2

    [Java] HashMap์ •๋ฆฌ

    [Java] HashMap์ •๋ฆฌ

    ๐Ÿ”ฅ ์ด ํฌ์ŠคํŒ…์€ ๋…ธ๋งˆ๋“œ์ฝ”๋”, ์ž๋ฐ”์˜์ •์„๋‹˜์˜ ์˜์ƒ์„ ๋ณด๊ณ  ๊ฐ„๊ฒฐํ•˜๊ฒŒ ์ •๋ฆฌํ–ˆ์Šต๋‹ˆ๋‹ค. HashMap์€ key-value ์‹œ์Šคํ…œ์œผ๋กœ Map ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ๊ตฌํ˜„ํ•œ ๋Œ€ํ‘œ์ ์ธ ์ปฌ๋ ‰์…˜ ํด๋ž˜์Šค๋‹ค. ๐Ÿค HashMap๊ณผ List ๋น„๊ต List : O(N) - ์ผ์ผํžˆ ์•„์ดํ…œ์„ ํƒ์ƒ‰ํ•˜๋Š” ๊ตฌ์กฐ(์•„์ดํ…œ์ด ๋งŽ์•„์งˆ์ˆ˜๋ก ์‹œ๊ฐ„์ด ์ฆ๊ฐ€) HashMap : O(1) - ์ฐพ๋Š”๋ฐ ๋‹จ 1 ์Šคํ…๋งŒ ๋“ค์–ด๊ฐ => ๋งค์šฐ ๋น ๋ฆ„! ๐Ÿค ํ•ด์‹ฑ(Hashing)์ด๋ž€? hash function์„ ํ†ตํ•ด data๋ฅผ ์ €์žฅํ•˜๊ณ  ์ฝ์–ด์˜ค๋Š” ๋ฐฉ๋ฒ• key๊ฐ’์„ ๋„ฃ์œผ๋ฉด index(์ €์žฅ์œ„์น˜, Hash Code)๋ฅผ ์•Œ๋ ค์ค€๋‹ค. โญ๏ธ ํ•ด์‹ฑ ์ˆœ์„œ : ํ‚ค๋กœ ํ•ด์‹œํ•จ์ˆ˜ ํ˜ธ์ถœ -> hash function์„ ํ†ตํ•ด hash code์–ป์–ด์˜ด -> hash code์— ๋Œ€์‘ํ•˜๋Š” ๋งํฌ๋“œ๋ฆฌ์ŠคํŠธ ๋ฐฐ์—ด์—์„œ ์ฐพ์Œ -> ..

    [Java] ์ •๊ทœ์‹ ์ •๋ฆฌ

    ๊ณ„์† ์ถ”๊ฐ€ํ•  ๊ณ„ํš.. ๐Ÿค ๋ฌธ๋ฒ• 1. ์—ฐ์†๋œ ๋ฌธ์ž์—ด ์น˜ํ™˜ํ•˜๊ธฐ str.replaceAll("\\s{2,}", ""); \\s : ๋ฌธ์ž์—ด (ํŠน์ˆ˜๋ถ€ํ˜ธ์˜ ์—ฐ์†์ธ ๊ฒฝ์šฐ \\. ์™€ ๊ฐ™์ด ์‚ฌ์šฉ) {2,} : 2ํšŒ ์ด์ƒ์˜ 2. ํŠน์ • ๋ฌธ์ž๋ฅผ ์ œ์™ธํ•œ ๋ชจ๋“  ๋ฌธ์ž ์ œ๊ฑฐ s = s.replaceAll("[^\\d\\-_.]*", ""); //์ˆซ์ž๋‚˜ -,_,.์ด ๋“ค์–ด๊ฐ€์ง€ ์•Š์œผ๋ฉด ๋ชจ๋‘ ์ œ๊ฑฐ \\d : ์ˆซ์ž(0-9)๋ฅผ ์˜๋ฏธ ^ : (์ค‘๊ด„ํ˜ธ ์•ˆ์— ๋“ค์–ด๊ฐ€ ์žˆ๋Š” ๊ฒฝ์šฐ)not์กฐ๊ฑด, "๊ทธ ๋’ค์— ๋“ค์–ด๊ฐ€๋Š” ๋ฌธ์ž์—ด์— ํ•ด๋‹นํ•˜์ง€ ์•Š์œผ๋ฉด ~" ์ด๋ผ๋Š” ์˜๋ฏธ๋ฅผ ๊ฐ€์ง. \\ : \d์™€ ๊ฐ™์€ \๊ฐ€ ์ž์ฒด์ ์œผ๋กœ ๋“ค์–ด๊ฐ€๋Š” ๋ฌธ๋ฒ•์ด๋‚˜ ํŠน์ˆ˜๋ฌธ์ž์˜ ์‚ฌ์šฉ์— ํ•„์š”ํ•จ 3. ํŠน์ • ๋ฌธ์ž๋กœ ์‹œ์ž‘ํ•˜๊ฑฐ๋‚˜ ์ข…๋ฃŒํ•˜๋Š” ๊ฒฝ์šฐ์˜ ์ œ๊ฑฐ new_id = new_id.replaceAll("^[.]|[..

    [Java] ArrayList<Integer>๋ฅผ int[]๋กœ ๋ณ€ํ™˜ํ•˜๋Š” ๋ฐฉ๋ฒ•

    1. int์™€ Integer์˜ ์ฐจ์ด int๋Š” primitive ์ž๋ฃŒํ˜•์œผ๋กœ ์—ฐ์‚ฐ์ด ๊ฐ€๋Šฅํ•˜์ง€๋งŒ null๋กœ ์ดˆ๊ธฐํ™” ํ•  ์ˆ˜ ์—†๋‹ค๋Š” ์ ์ด ํŠน์ง•์ด๋‹ค. Integer๋Š” Wrapper ํด๋ž˜์Šค๋กœ ์—ฐ์‚ฐ์ด ๋ถˆ๊ฐ€๋Šฅํ•˜์ง€๋งŒ null๊ฐ’์„ ๊ฐ€์งˆ ์ˆ˜ ์žˆ๋‹ค. ์„ ์–ธ int i = 0; Integer j = new Integer(10); Integer๊ฐ€ ์—ฐ์‚ฐ์„ ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” Unboxing๊ณผ์ •์ด ํ•„์š”ํ•˜๋‹ค. Integer j = new Integer(5); int k = j.intValue(); //unboxing 2. ArrayList๋ฅผ int[]๋กœ ๋ณ€ํ™˜ํ•˜๋Š” ๋ฐฉ๋ฒ• List list = new ArrayList(Arrays.asList(1,2,3,4)); System.out.println(list.getClass().getSimpleName..