[git & github] error: failed to push some refs to.. git pull ๋กœ ํ•ด๊ฒฐ
ยท
git & github
๐Ÿคท‍โ™‚๏ธ vscode - ๊นƒํ—ˆ๋ธŒ ๋ฒ„์ „ ์—…๋ฐ์ดํŠธ Error ๐Ÿ’ฅ ์ƒˆ๋กœ์šด ๋ฒ„์ „ ์—…๋ฐ์ดํŠธ๋ฅผ ์œ„ํ•ด ํ‰์†Œ์™€ ๊ฐ™์ด push! ํ•˜์ง€๋งŒ.. ์—๋Ÿฌ ๋ฐœ์ƒ error ์™€์˜ ํ•œํŒ ์Šน๋ถ€ ์˜ค๋Š˜๋„ ํ•ด๊ฒฐํ•˜๋Ÿฌ ๊ฐ€๋ณด์ž.. ! [rejected] main -> main (fetch first)error: failed to push some refs to 'https://github.com/sihyun22/CoffeeOrder-Web.git'hint: Updates were rejected because the remote contains work that you do nothint: have locally. This is usually caused by another repository pushing tohint: the ..
[Javascript] ๊ฐ„๋‹จํ•œ ๋ฉ”๋ชจ์žฅ์„ ๋งŒ๋“ค์–ด๋ณด์ž createTextNode() createElement() appendChild() remove()๐Ÿง
ยท
JavaScript
1. getElementById() ์ž…๋ ฅ์ฐฝ, ์ž…๋ ฅ์ฐฝ๊ฐ’(value) ๊ฐ€์ ธ์˜ค๊ธฐ2. createTextNode() ์ž…๋ ฅํ•œ ๋‚ด์šฉ์„ ํ…์ŠคํŠธ ๋…ธ๋“œ๋กœ ๋ณ€ํ™˜ํ•˜๊ธฐ3. createElement() HTML ์š”์†Œ ์ƒ์„ฑํ•˜๊ธฐ4. appendChild() ๋ถ€๋ชจ ์š”์†Œ์— ์ƒ์„ฑ๋œ ์ž์‹ ์š”์†Œ ์ถ”๊ฐ€ํ•˜๊ธฐ5. addEventListener() ํด๋ฆญ ์ด๋ฒคํŠธ ํ•จ์ˆ˜ (์ถ”๊ฐ€ / ์‚ญ์ œ)6. remove() HTML ์š”์†Œ ์ œ๊ฑฐํ•˜๊ธฐ  ๊ฐ„๋‹จํ•œ ๋ฉ”๋ชจ์žฅ์„ ๋งŒ๋“ค๊ธฐ ์œ„ํ•ด ์ž…๋ ฅ ์˜์—ญ, ์ถ”๊ฐ€ ์˜์—ญ, ๋ฆฌ์ŠคํŠธ ์˜์—ญ์„ ๊ฐ„๋‹จํ•œ HTML ์ฝ”๋“œ๋กœ ์ž‘์„ฑํ•˜๊ณ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ(Javascript) ๋กœ ์ถ”๊ฐ€, ์‚ญ์ œ ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ•˜์˜€๋‹ค. 1. HTML ์ฝ”๋“œ ์ž‘์„ฑ(์œ„ ์‚ฌ์ง„์€ CSS ๋”ฐ๋กœ ์ ์šฉ) ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ๋ฉ”๋ชจ์žฅ ์ถ”๊ฐ€/์‚ญ์ œ ๋ฉ”๋ชจ ์ถ”๊ฐ€  2. Java..
[Javascript] replace(), parseInt(), toString()๋ฌธ์ž์—ด์„ ์ •์ˆ˜๋กœ ๋ณ€ํ™˜, ์ •์ˆ˜๋ฅผ ๋ฌธ์ž์—ด๋กœ ๋ณ€ํ™˜ ๐Ÿง
ยท
JavaScript
๋ฉ”๋‰ด๋ฅผ ์ฃผ๋ฌธ๋‚ด์—ญ์— ์ถ”๊ฐ€ํ•˜๋Š” ๊ฒƒ์„ ๊ตฌํ˜„ํ•˜๋Š” ๋„์ค‘๊ฐ€๊ฒฉ์ด 6,200์› 6,000์›๊ณผ ๊ฐ™์ด ํƒ€์ž…์ด ๋ฌธ์ž์—ด์ด๊ธฐ ๋•Œ๋ฌธ์—์–ด๋–ป๊ฒŒ ํ•˜๋ฉด ์ •์ˆ˜๋กœ ๋ณ€ํ™˜ํ•˜์—ฌ ๋”ํ•  ๊ฒƒ์ด๋ฉฐ ์ฒœ์ž๋ฆฌ ๋ฐ”๋‹ค ์ฝค๋งˆ(,) ๊ฐ€ ์ฐํž ์ˆ˜ ์žˆ๋„๋ก ํ•˜๋Š” ๊ฒƒ์— ๋Œ€ํ•ด ๊ณ ๋ฏผํ–ˆ๋‹ค. ํ•ด๊ฒฐ ์ˆœ์„œ 1. 6,200์›(๋ฌธ์ž์—ด string) ์„ ์ •์ˆ˜๋กœ ๋ณ€ํ™˜ / 6,200์›(string)->6,200(number)2. 6200 (number) + 6000 (number)... + ์ด ๊ธˆ์•ก(number) ๊ณ„์‚ฐ3. ์ด ๊ธˆ์•ก 12200 (number)  ์„ 12,200 ์› (string) ์œผ๋กœ ๋ณ€ํ™˜ 1. ๋ฌธ์ž์—ด์„ ์ •์ˆ˜๋กœ ๋ณ€ํ™˜- ์ •์ˆ˜๋กœ ๋ณ€ํ™˜ํ•˜๊ธฐ ์ „์—๋Š” price, price2 ๋Š” string ํƒ€์ž…์ธ ๊ฒƒ์„ ํ™•์ธ ํ•  ์ˆ˜ ์žˆ๋‹ค.  - ์ •์ˆ˜๋กœ ๋ณ€ํ™˜ํ•ด์„œ ์ถœ๋ ฅํ•ด๋ณด๋‹ˆ 6200 ์ด ์•„๋‹Œ 6 ๋งŒ ๋‚˜์˜ค..
[JavaScript] break ๋ฌธ / ๋ฐ˜๋ณต๋ฌธ์„ ๋ฉˆ์ถ”๊ฑฐ๋‚˜ ๋น ์ ธ๋‚˜์˜ฌ ๋•Œ ๐Ÿง
ยท
JavaScript
break ๋ฌธ์€ ํŠน์ • ์กฐ๊ฑด์—์„œ ๋ฐ˜๋ณต๋ฌธ์„ ๋ฉˆ์ถ”๊ฑฐ๋‚˜, ๋ฐ˜๋ณต๋ฌธ ์ค‘๊ฐ„์—์„œ ์•ž์œผ๋กœ ๋˜๋Œ์•„๊ฐ€์•ผ ํ•  ๊ฒฝ์šฐ์— ์‚ฌ์šฉํ•œ๋‹ค.๋‹จ๋…์œผ๋กœ ์‚ฌ์šฉํ•  ์ˆ˜๋„ ์žˆ๊ณ  ๋ฐ˜๋ณต๋ฌธ์„ ๋๋‚ผ ์กฐ๊ฑด๊ณผ ํ•จ๊ป˜ ์‚ฌ์šฉํ•  ์ˆ˜๋„ ์žˆ๋‹ค.์˜ˆ์ œ 1 (์ž๋ฆฌ๋ฐฐ์น˜๋„)1-1 break ๋ฌธ์„ ์‚ฌ์šฉํ•˜์ง€ ์•Š์•˜์„ ๋•Œ์•„๋ž˜๋Š” ์ด ์ž…์žฅ๊ฐ ์ˆ˜์— ๋งž๊ฒŒ ๋ฒˆํ˜ธ๊ฐ€ ์žˆ๋Š” ์ขŒ์„์„ ๋ฐฐ์น˜ํ–ˆ๋‹ค.for๋ฌธ์„ ์‚ฌ์šฉํ•ด ์ด 56๋ช…์˜ ์ž…์žฅ๊ฐ์„ ํ•œ ์ค„์— 5 ์ขŒ์„์œผ๋กœ ์ž๋ฆฌ๋ฅผ ๋ฐฐ์น˜ํ•˜์˜€๋Š”๋ฐ,์ขŒ์„์€ 56๊ฐœ๊ฐ€ ์•„๋‹Œ 60๊ฐœ๊นŒ์ง€ ๋งŒ๋“ค์–ด์ง€๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์—ˆ๋‹ค.document.write(``); // ํ–‰ (11์ค„) for(let i = 0; i`); // ์—ด (5์ค„) for(let j = 1; j ์ขŒ์„ ${seatNo} `); } document.write(``); } document.wri..
[Java] ์ƒ์„ฑ์ž(constructor) - ์ธ์Šคํ„ด์Šค ์ดˆ๊ธฐํ™”๐Ÿง
ยท
Java
์ƒ์„ฑ์ž๋Š” ์ธ์Šคํ„ด์Šค๊ฐ€ ์ƒ์„ฑ๋  ๋•Œ ํ˜ธ์ถœ๋˜๋Š” '์ธ์Šคํ„ด์Šค ์ดˆ๊ธฐํ™” ๋ฉ”์„œ๋“œ' ์ด๋‹ค.์ƒ์„ฑ์ž์˜ ์กฐ๊ฑด1. ํด๋ž˜์Šค ๋‚ด์— ์„ ์–ธ๋˜์–ด์•ผ ํ•œ๋‹ค.2. ์ƒ์„ฑ์ž์˜ ์ด๋ฆ„์€ ํด๋ž˜์Šค์˜ ์ด๋ฆ„๊ณผ ๊ฐ™์•„์•ผ ํ•œ๋‹ค.3. ์ƒ์„ฑ์ž๋Š” ๋ฆฌํ„ด ๊ฐ’์ด ์—†๋‹ค. ๐Ÿ’ก ๋ฆฌํ„ด๊ฐ’์ด ์—†๋‹ค๋Š” ์˜๋ฏธ์˜ void๋ฅผ ๋ถ™์—ฌ์•ผ ํ•˜์ง€๋งŒ, ๋ชจ๋“  ์ƒ์„ฑ์ž์—๋Š” ๋ฆฌํ„ด๊ฐ’์ด ์—†์œผ๋ฏ€๋กœ void๋ฅผ ์ƒ๋žตํ•  ์ˆ˜ ์žˆ๋‹ค. 1. ๊ธฐ๋ณธ ์ƒ์„ฑ์ž(default constructor)๋ชจ๋“  ํด๋ž˜์Šค์—๋Š” ๋ฐ˜๋“œ์‹œ ํ•˜๋‚˜ ์ด์ƒ์˜ ์ƒ์„ฑ์ž๊ฐ€ ์ •์˜๋˜์–ด ์žˆ์–ด์•ผ ํ•œ๋‹ค.์ปดํŒŒ์ผ๋Ÿฌ๊ฐ€ ์ œ๊ณตํ•˜๋Š” '๊ธฐ๋ณธ ์ƒ์„ฑ์ž' ๋•๋ถ„์— ํด๋ž˜์Šค์— ์ƒ์„ฑ์ž๋ฅผ ์ •์˜ํ•˜์ง€ ์•Š๊ณ ๋„ ์ธ์Šคํ„ด์Šค๋ฅผ ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ์—ˆ๋‹ค.package chapter6;public class Ex6_12 { public static void main(String[] args) { Data_1 d1 =..