๐Ÿ˜Ž Today I Learned

๐Ÿ˜Ž Today I Learned

[TIL] 23.06.09

ํ—ท๊ฐˆ๋ฆฌ๋Š”๊ฑฐ ์ •๋ฆฌ ์ˆœ์—ด : ์ˆœ์„œ ์ƒ๊ด€ ์žˆ์Œ ์กฐํ•ฉ : ์ˆœ์„œ ์ƒ๊ด€ ์—†์Œ [์ˆ˜ํ•™] ์ˆœ์—ด, ์กฐํ•ฉ ๊ณต์‹ ์ด์ •๋ฆฌ ํŒฉํ† ๋ฆฌ์–ผ ( ! ) ํŒฉํ† ๋ฆฌ์–ผ์ด๋ž€ ์„œ๋กœ ๋‹ค๋ฅธ n๊ฐœ๋ฅผ ๋‚˜์—ดํ•˜๋Š” ๊ฒฝ์šฐ์˜ ์ˆ˜๋ฅผ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค. ๊ธฐํ˜ธ๋กœ๋Š” n! ์ด๋ ‡๊ฒŒ ์“ฐ๊ณ  ๊ณ„์‚ฐ์€ n๋ถ€ํ„ฐ 1์”ฉ ์ค„์—ฌ๋‚˜๊ฐ€๋ฉด์„œ 1์ด ๋ ๋•Œ๊นŒ์ง€์˜ ๋ชจ๋“  ์ˆ˜๋ฅผ ๊ณฑํ•ฉ๋‹ˆ๋‹ค. ์ˆœ์—ด ( nPr ) ์ˆœ์—ด์ด coding-factory.tistory.com enumerate() ๋‚ด์žฅ ํ•จ์ˆ˜ : ์ธ๋ฑ์Šค์™€ ์›์†Œ๋กœ ์ด๋ฃจ์–ด์ง„ ํŠœํ”Œ์„ ๋งŒ๋“ค์–ด์ค€๋‹ค. for๋ฌธ์—์„œ ์‚ฌ์šฉ ํŒŒ์ด์ฌ์˜ enumerate() ๋‚ด์žฅ ํ•จ์ˆ˜๋กœ for ๋ฃจํ”„ ๋Œ๋ฆฌ๊ธฐ Engineering Blog by Dale Seo www.daleseo.com

๐Ÿ˜Ž Today I Learned

[TIL] 22.03.10

Today I Learned FileUpload - ํšŒ์›๊ฐ€์ž…์‹œ ์ฒจ๋ถ€ํ•œ ์ด๋ฏธ์ง€ํŒŒ์ผ์€ Mypage์—์„œ ์ถœ๋ ฅ๋จ - MemberDAO public int addFile(MemberFileDTO memberFileDTO) throws Exception { return sqlSession.insert(NAMESPACE + "addFile", memberFileDTO); } - MemberFileDTO package com.spring.s1.member; public class MemberFileDTO { private Long fileNum; private String id; private String fileName; private String oriName; public Long getFileNum() { re..

๐Ÿ˜Ž Today I Learned

[TIL] 22.03.08

Today I Learned QnA ๋‹ต๊ธ€ - Reply File Upload - Client ์ปดํ“จํ„ฐ์— ์ €์žฅ๋˜์–ด ์žˆ๋Š” ํŒŒ์ผ(์ด๋ฏธ์ง€, ๋™์˜์ƒ, ๋ฌธ์„œ ๋“ฑ)์„ Server ์ปดํ“จํ„ฐ๋กœ ์ „์†ก 1. ์ค€๋น„์‚ฌํ•ญ 1) Library ๋‹ค์šด(pom.xml) - commons-fileupload commons-fileupload commons-fileupload 1.4 2) form ํƒœ๊ทธ์˜ method ํ˜•์‹์€ post, enctype="multipart/form-data"๋กœ ๋ณ€๊ฒฝ - ์ฒจ๋ถ€ํŒŒ์ผ์ด ์—†๋Š” ํผ์€ enctype์€ ๊ธฐ๋ณธ์œผ๋กœ ์„ค์ • 3) Server์—์„œ ์—ฌ๋Ÿฌ ๊ฐœ์˜ ํŒŒ์ผ ์กฐ๊ฐ๋“ค์„ ํ•˜๋‚˜๋กœ ํ•ฉ์ณ์ฃผ๋Š” ์—ญํ• ์„ ํ•˜๋Š” ๊ฐ์ฒด๋ฅผ ์ƒ์„ฑ - ***-context.xml 4) form ํƒœ๊ทธ์— ํŒŒ์ผ ํƒœ๊ทธ ์ถ”๊ฐ€ 5) Controller์˜ ๋ฉ”์„œ๋“œ - ๋งค..

๐Ÿ˜Ž Today I Learned

[TIL] 22.03.07

Today I Learned Board ์ถ”๊ฐ€ notice์™€ qna ๊ฒน์น˜๋Š” ๋ถ€๋ถ„ board๋กœ ํ†ต์ผ BoardDAO, BoardDTO, BoardService ์ƒ์„ฑ Notice, Qna๋Š” Board๋ฅผ extends, implements ํ•ด์„œ ์‚ฌ์šฉ JSP ๋ถ€๋ถ„๋„ board๋กœ ํ†ต์ผ QnA - ๋‹ต๊ธ€, ๋Œ“๊ธ€ ref, step, depth ์‚ฌ์šฉ ref : ์›๋ณธ๊ธ€๊ณผ ๋‹ต๊ธ€๋“ค์„ ๊ทธ๋ฃน์œผ๋กœ ๋ฌถ๋Š” ์—ญํ•  step : ๊ทธ๋ฃน ๋‚ด์—์„œ ์ˆœ์„œ๋ฅผ ๊ฒฐ์ •ํ•˜๋Š” ์—ญํ•  depth : ๋“ค์—ฌ์“ฐ๊ธฐ ํšŸ์ˆ˜ - ์›๋ณธ๊ธ€ ์ž‘์„ฑ 1) ref : ์ž๊ธฐ ์ž์‹ ์˜ ๊ธ€๋ฒˆํ˜ธ๊ฐ€ ref ๊ฐ’์ด ๋จ 2) step : 0 3) depth : 0 - ๋‹ต๊ธ€(๋Œ“๊ธ€) ์ž‘์„ฑ 1) ref : ๋ถ€๋ชจ๊ธ€์˜ ref๋ฅผ ์ž๊ธฐ์˜ ref๊ฐ’์ด ๋จ 2) step a. ํ…Œ์ด๋ธ”์—์„œ ref๊ฐ€ ๋ถ€๋ชจ์˜ ref์™€ ๊ฐ™๊ณ  s..

๐Ÿ˜Ž Today I Learned

[TIL] 22.03.04

Today I Learned Java Script Event - keyboard ์ด๋ฒคํŠธ keydown : key๋ฅผ ๋ˆŒ๋ €์„ ๋•Œ, ํŠน์ˆ˜ํ‚ค ํฌํ•จ keypress : key๋ฅผ ๋ˆŒ๋ €์„ ๋•Œ, ํŠน์ˆ˜ํ‚ค ์ œ์™ธ keyup : key๋ฅผ ๋ˆŒ๋ €๋‹ค๊ฐ€ ๋—์„ ๋•Œ - form ์ด๋ฒคํŠธ focus : ์ž…๋ ฅ ๋Œ€๊ธฐ ์ƒํƒœ blur : focus ์žƒ์—ˆ์„ ๋•Œ submit : form์„ ์„œ๋ฒ„๋กœ ์š”์ฒญ ๋ฐœ์ƒ reset : form ๋‚ด๋ถ€์˜ ๋ฐ์ดํ„ฐ๋ฅผ ์ดˆ๊ธฐํ™” change : ๊ฐ’์ด ๋ณ€๊ฒฝ๋˜์—ˆ์„ ๋•Œ ๋‚ด์žฅ ๊ฐ์ฒด - Object : ์ตœ์ƒ์œ„ ๊ฐ์ฒด - String : ๋ฌธ์ž์—ด ๋‹ค๋ฃจ๋Š” ๊ฐ์ฒด 1) length : ๋ฌธ์ž์—ด์˜ ๊ธธ์ด ์˜ˆ์ œ ์†Œ์Šค ์ฝ”๋“œ ๋”๋ณด๊ธฐ 1) event2.html Event 2 event2.js const d1 = document.getElementById('d..

๐Ÿ˜Ž Today I Learned

[TIL] 22.03.03

Today I Learned JavaScript 1. function - ํ•จ์ˆ˜ ์„ ์–ธ function ํ•จ์ˆ˜๋ช… ([๋งค๊ฐœ๋ณ€์ˆ˜ ์„ ์–ธ]) { [return ] } - ํ•จ์ˆ˜ ํ˜ธ์ถœ : ํ•จ์ˆ˜๋ช…([์ธ์ž๊ฐ’]); 2. event - ๋งˆ์šฐ์Šค ์ด๋ฒคํŠธ click - ๋“ฑ๋ก : ์„ ํƒ์ž.addEventListener("์ด๋ฒคํŠธ๋ช…", ์ต๋ช…ํ•จ์ˆ˜์„ ์–ธ ๋˜๋Š” ํ•จ์ˆ˜ ํ˜ธ์ถœ) JoinCheck JavaScript - ์•ฝ๊ด€ ๋™์˜ ์„ ํƒํ•˜๊ธฐ - ์ „์ฒด ๋™์˜ ์ฒดํฌ๋ฐ•์Šค ์ƒ์„ฑ - ์•ฝ๊ด€์— ๋ชจ๋‘ ๋™์˜๊ฐ€ ์ฒดํฌ๋˜์–ด ์žˆ์„ ๊ฒฝ์šฐ์—๋งŒ Join ๋ฒ„ํŠผ ๋ˆ„๋ฅด๋ฉด Join Form์œผ๋กœ ์ด๋™ ๋”๋ณด๊ธฐ const checkAll = document.getElementById("checkAll"); const check = document.getElementsByClassName("chec..

๐Ÿ˜Ž Today I Learned

[TIL] 22.03.02

Today I Learned GIT 1. Main๊ณผ Add_BB_Pager ๋ธŒ๋žœ์น˜ Merge ์ž‘์—… 2. ์ƒˆ๋กœ์šด Branch 'Study_JS_1' ์ƒ์„ฑ JavaScript - ์ธํ„ฐํ”„๋ฆฌํ„ฐ ์–ธ์–ด - ๋‚ด๋ถ€ : - ์™ธ๋ถ€ : - ๋ณ€์ˆ˜ ์„ ์–ธ : let ๋ณ€์ˆ˜๋ช… - ์—ฐ์‚ฐ์ž : ์‚ฐ์ˆ , ๋…ผ๋ฆฌ, ๋น„๊ต, ์ฆ๊ฐ * ์ œ์–ด๋ฌธ - for(let i in arr) : ๋ณ€์ˆ˜ i์— ์ธ๋ฑ์Šค ๋ฒˆํ˜ธ๊ฐ€ ๋Œ€์ž… - for(let i of arr) : ๋ณ€์ˆ˜ i์— arr๊ฐ’ ์ค‘ ํ•˜๋‚˜๊ฐ€ ๋Œ€์ž… * ๋ฐฐ์—ด - ์ดˆ๊ธฐํ™” : let arr = []; - ์ฃผ์š” ๋ฉ”์„œ๋“œ 1) push(data) : ๋ฐฐ์—ด ๋์— ์š”์†Œ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ณ  ์ƒˆ๋กœ์šด ๊ธธ์ด (length) ๋ฐ˜ํ™˜ 2) pop() : ๋ฐฐ์—ด ๋์— ์š”์†Œ๋ฅผ ์‚ญ์ œํ•˜๊ณ  ์‚ญ์ œํ•œ ์š”์†Œ๋ฅผ ๋ฐ˜ํ™˜ 3) unshift(data) : ๋ฐฐ์—ด ์ฒ˜์Œ์— ..

๐Ÿ˜Ž Today I Learned

[TIL] 22.02.23

Member Branch ๋‹ค ์ปค๋ฐ‹ํ•˜๊ณ  ๋ฉ”์ธ์ด๋ž‘ Merge ์„œ๋ฒ„๋กœ ์š”์ฒญ - URL, Method, Parameter ์›น ๋ธŒ๋ผ์šฐ์ €์— ์ฃผ์†Œ์ฐฝ์— ์ง์ ‘์ž…๋ ฅ : URL aํƒœ๊ทธ : href form ํƒœ๊ทธ : action JS ajax BankBook update ์ถ”๊ฐ€ bookNumber์€ update ํŽ˜์ด์ง€์—์„œ readonly , hidden ์‚ฌ์šฉ Notice update ์ถ”๊ฐ€ writer, regDate, hit : ์ˆ˜์ • ์•ˆํ•จ title, contents ๋งŒ ์ˆ˜์ • ๊ฐ€๋Šฅ CSS ์ƒ์„ฑ ๋ฐ ์ ์šฉ Login, Join - form.css ์ ์šฉ ์ฐธ๊ณ ์‚ฌ์ดํŠธ : https://codepen.io/joaomarcossb/pen/qBVXOxj?editors=1100 portal-login ... codepen.io

๐Ÿ˜Ž Today I Learned

[TIL] 22.02.22

Today I Learned Cookie - Server์—์„œ ์ƒ์„ฑ๋œ Cookie๋ฅผ Response ์— ๋‹ด์•„์„œ Client๋กœ ์ „์†ก 1) Cookie [] cookies = request.getCookies(); 2) @CookieValue(value="Cookie์˜ ์ด๋ฆ„", required = false, defaultValue="๊ฐ’") String value - setMaxAge(0)์œผ๋กœ ์‚ญ์ œ Session - Session ๊ฐ์ฒด๋ฅผ ์‹๋ณ„ํ•˜๋Š” sessionId๋ฅผ ์ƒ์„ฑํ•ด์„œ Cookie๋กœ Client ์— ์ €์žฅ - void setAttribute("key", Object) : Session ์†์„ฑ์— Data ์ €์žฅ - void invalidDate() : Session ์‚ญ์ œ JSTL Memb..

soozkim
'๐Ÿ˜Ž Today I Learned' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก