header-img
Info :
๋ฌธ๋ฒ• 4
Javascript :: ๋™์ ์œผ๋กœ ๋ณ€์ˆ˜ ์ƒ์„ฑ
2024.11.26
// ๊ฐ์ฒด ์ƒ์„ฑlet dynamicVars = {};// ๋™์ ์œผ๋กœ ๋ณ€์ˆ˜๋ช… ์ƒ์„ฑfor (let i = 0; i  ์ด๋ ‡๊ฒŒ ๋ฌด์ง€์„ฑ ๋ณ€์ˆ˜๋„ ์„ ์–ธํ•  ์ˆ˜ ์žˆ๊ณ ,${i} ๋Œ€์‹  ๊ธฐ์กด์— ์„ ์–ธํ•ด๋‘์—ˆ๋˜ ๋ณ€์ˆ˜๋“ค์„ ์‚ฌ์šฉํ•  ์ˆ˜๋„ ์žˆ๋‹ค. ๋‚˜์˜ ๊ฒฝ์šฐ์—๋Š” ๋ฐฐ์—ด ์•ˆ์˜ ๊ฐ’์— ํ•ด๋‹นํ•˜๋Š” ๋ฐ์ดํ„ฐ์˜ ๊ฒ€์ฆํ•œ ๊ฒฐ๊ณผ๋ฅผ ์ €์žฅํ•ด๋‘ฌ์•ผ ํ•ด์„œ ๋™์  ๋ณ€์ˆ˜๋ฅผ ๊ตฌํ˜„ํ•˜๊ฒŒ ๋˜์—ˆ์Œ. ์˜ˆ๋ฅผ ๋“ค๋ฉด ๊ทธ๋ฆฌ๋“œ์•ˆ์— ๋ฐฐ์—ด[] ์•ˆ์— ์žˆ๋Š” ๊ฐ’๊ณผ ์ด๋ฆ„์ด ๊ฐ™์€ ์ปฌ๋Ÿผ์— ๋ฐ์ดํ„ฐ๋ฅผ ํ™•์ธํ•˜๋Š” ์ผ์ด๋‹ค.๊ทธ๋•Œ๋Š” ์•„๋ž˜์™€ ๊ฐ™์ด ๋ณ€ํ˜•ํ•ด์„œ ์‚ฌ์šฉํ• ์ˆ˜๋„ ์žˆ๋‹ค. const checkColumns = ['Nation', 'Dept', 'Name', 'Age'] _.forEach(dataList, (row, index) => { let dynamicVars = {}; // ๋™์ ์œผ๋กœ ๋ณ€์ˆ˜๋ช… ์ƒ์„ฑ for (let i ..
Springboot, Mybatis :: ๋ถ€๋“ฑํ˜ธ, ๋น„๊ต์—ฐ์‚ฐ์ž ์‚ฌ์šฉ ๋ฐฉ๋ฒ• 1
2024.02.02
์ฟผ๋ฆฌ๋ฌธ์„ ์ž‘์„ฑํ•˜๋‹ค๋ณด๋ฉด ๋น„๊ต๋ฌธ์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ์ƒ๊ธฐ๋Š”๋ฐ.. ๋งˆ์ด๋ฐ”ํ‹ฐ์Šค์—์„œ๋Š” , WITH CTE(WorkDate) AS ( SELECT CONVERT ( DATE, #{Year}+'-01-01') UNION ALL SELECT DATEADD(d, 1, WorkDate) FROM CTE WHERE WorkDate (CONVERT(DATE, #{Year}+'-12-31')) ) SELECT * FROM CTE OPTION ( MAXRECURSION 0 ); ๋‘˜. WITH CTE(WorkDate) AS ( SELECT CONVERT ( DATE, #{Year}+'-01-01') UNION ALL SELECT DATEADD(d, 1, WorkDate) FROM CTE WHERE ) SELECT * FROM CTE..
่ˆŠ.๋ฆฌ์•กํŠธ ๊ฐ•์‚ฌ๊ฐ€ ๋ง์•„์ฃผ๋Š” ๊ฐ„๋‹จ react ๋ฌธ๋ฒ•
2023.11.01
๋ชฉ์ฐจ ๋™์ ์ธ ๊ฐ’์„ ํ• ๋‹นํ•˜๊ธฐ ์œ„ํ•œ ๋ณ€์ˆ˜, "useState" ์ดˆ๊ธฐ ๋ Œ๋”๋ง ๋ฐ ๋ณ€์ˆ˜ ๋ณ€ํ™˜์— ๋”ฐ๋ฅธ ๊ธฐ๋Šฅ call์„ ์œ„ํ•œ "useEffect" ์ปดํฌ๋„ŒํŠธ์˜ ์†์„ฑ ๊ฐ’์„ get/set ํ•  ์ˆ˜ ์žˆ๋Š” "useRef" useRef + ์ƒ์† ๊ฐœ๋…, "ForwardRef()", "useImperativeHandle()" ํ•จ์ˆ˜ ์žฌ์‚ฌ์šฉ์„ ์œ„ํ•œ "UseCallback" ์‰ฌ์šด ์ „์—ญ ์ƒํƒœ๊ด€๋ฆฌ๋ฅผ ์œ„ํ•œ "Recoil" ์ปค์Šคํ…€ํ•œ ๋‹ค๊ตญ์–ด ์ฒ˜๋ฆฌ๋ฅผ ์œ„ํ•œ "i18next" ๋ฒˆ์™ธ. Axios์™€ Fetch์˜ ์ฐจ์ด ๋ฒˆ์™ธ. Lazy Import ๋ž€?
SQL :: ์ƒ์œ„ N๊ฐœ ๋ฐ์ดํ„ฐ ์ถœ๋ ฅํ•˜๊ธฐ (mssql, oracle, mysql)
2023.09.14
1. MSSQL SELECT TOP 100 name, age, dept from [table๋ช…]; 2. ORACLE SELECT name, age, dept from [table๋ช…] where rownum