Category 192

[jQuery] html() ์™€ append() ์ฐจ์ด

jQuery("#id").append(data); : ๊ธฐ์กด ๋ฐ์ดํ„ฐ์— ๋‚ด์šฉ์ด ์ถ”๊ฐ€ (์Œ“์ด๋Š”๊ฒƒ) -> .remove() ํ•„์š”. $("#qnaMenuBtn").on("click",function(){ $.ajax({ type : "GET", url : "/qna_list.jsp", dataType : "html", success : function(result){ $(".content").append($(result).find(".qnaListDiv")); } }); }); jQuery("#id").html(data); : ์ดˆ๊ธฐํ™”ํ•˜๊ณ  ์ƒˆ๋กœ์šด ๋‚ด์šฉ์ด ๋“ค์–ด๊ฐ„๋‹ค. -> .remove() ํ•„์š”์—†์Œ $("#qnaMenuBtn").on("click",function(){ $.ajax({ type : "GET", url ..

js 2021.09.15

Session ๊ธฐ๋ณธ ๊ฐ’ ํ™•์ธํ•˜๊ธฐ / Session ์‹œ๊ฐ„ ์ง์ ‘ ์„ค์ •ํ•˜๊ธฐ

session ๊ธฐ๋ณธ๊ฐ’ ํ™•์ธ ํ•˜๊ธฐ ํ”„๋กœ์ ํŠธ ์šฐํด๋ฆญ - Java Build Path - Libraries - Apache Tomcat ์œ„์น˜ ํ™•์ธ web.xml : session-config ํ™•์ธ session-timeout " 30๋ถ„ " ๊ธฐ๋ณธ ๊ฐ’ session timeout ์ง์ ‘ ์„ค์ •ํ•˜๊ธฐ ( ์šฐ์„ ์ˆœ์œ„ : controller > web.xml ) 1. web-xml = ๋ชจ๋“  ์„ธ์…˜์— ํƒ€์ž„์•„์›ƒ ์„ค์ • 10 // ๋ถ„ ๋‹จ์œ„ - 10๋ถ„ 2. controller = ํŠน์ • ์„ธ์…˜๋งŒ ํƒ€์ž„์•„์›ƒ ์„ค์ • session.setMaxInactiveInterval(20*60); // ์ดˆ ๋‹จ์œ„ - 20๋ถ„ * ๊ทธ์™ธ์˜ session ์‹œ๊ฐ„ ๋ฐ ์ œ๊ฑฐ * getCreationTime() - ์„ธ์…˜ ์ƒ์„ฑ ์‹œ๊ฐ„ getLastAccessedTime() - ..

Basic 2021.09.10

[JavaScript] Login ์•„์ด๋”” ๊ธฐ์–ตํ•˜๊ธฐ / ์ฟ ๊ธฐ (Cookie)

์•„์ด๋”” ์ €์žฅ ์•„์ด๋”” ์ฐพ๊ธฐ ๋น„๋ฐ€๋ฒˆํ˜ธ ์ฐพ๊ธฐ ์ฟ ํ‚ค(Cookie)๋ฅผ ์ด์šฉํ•œ ID ๊ธฐ์–ตํ•˜๊ธฐ ์˜ˆ์ œ ํ™”๋ฉด ์•„์ด๋”” ๊ธฐ์–ตํ•˜๊ธฐ ๊ตฌํ˜„๋ฐฉ๋ฒ• 1 ์ธํ„ฐ๋„ท์—์„œ ๋ฒ”์šฉ์ ์œผ๋กœ ๋Œ๊ณ  ์žˆ๋Š” ์˜ˆ์ œ์ด๋‹ค. ์ฟ ํ‚ค๋ฅผ 7์ผ ๋™์•ˆ ์‹ฌ๊ฑฐ๋‚˜ ์ฟ ํ‚ค๋ฅผ ๊ฐ€์ ธ์˜ค๊ฑฐ๋‚˜ ์‚ญ์ œํ•œ๋‹ค. $(document).ready(function(){ // ์ €์žฅ๋œ ์ฟ ํ‚ค๊ฐ’์„ ๊ฐ€์ ธ์™€ gbsb.tistory.com [JQuery] ์ฟ ํ‚ค๋กœ ์•„์ด๋”” ์ €์žฅํ•˜๋Š” ๋ฐฉ๋ฒ•!! ์ฟ ํ‚ค๋กœ ์•„์ด๋””๋ฅผ ์ €์žฅํ•˜๊ณ  ์•„์ด๋””๋ฅผ ์ง€์šฐ๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ํฌ์ŠคํŒ…ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ํ”ํžˆ ๋งํ•˜๋Š” ๋กœ๊ทธ์ธํ• ๋•Œ ์•„์ด๋””์ €์žฅ ๊ธฐ๋Šฅ์ž…๋‹ˆ๋‹ค. ๋ณดํ†ต ์•„๋ž˜ ํ™”๋ฉด์ฒ˜๋Ÿผ ๋˜์–ด์žˆ์ฃ ~ ์•„์ด๋”” ์ €์žฅํ•˜๋Š” ๋ฐฉ๋ฒ•์—๋Š” ์—ฌ๋Ÿฌ chobopark.tistory.com

js 2021.09.08

๋กœ๊ทธ์ธ ์–‘๋ฐฉํ–ฅ ์•”ํ˜ธํ™”(RSA) ๋‹จ๋ฐฉํ–ฅ ์•”ํ˜ธํ™”(SHA 256) ์‚ฌ์šฉํ•˜๊ธฐ

์–‘๋ฐฉํ–ฅ ์•”ํ˜ธํ™”(RSA) ๋‹จ๋ฐฉํ–ฅ ์•”ํ˜ธํ™”(SHA 256) ์ฐจ์ด RSA SHA 256 ์–‘๋ฐฉํ–ฅ ์•”ํ˜ธํ™” = ๋ณตํ˜ธํ™”๊ฐ€ ๊ฐ€๋Šฅํ•˜๋‹ค. ๋‹จ๋ฐฉํ–ฅ ์•”ํ˜ธํ™” = ๋ณตํ˜ธํ™”๊ฐ€ ๋ถˆ๊ฐ€๋Šฅํ•˜๋‹ค. ์‚ฌ์šฉ์ž๋Š” ๊ณต๊ฐœ๋œ ํ‚ค์™€ ์ž์‹ ๋งŒ ์•„๋Š” ๊ฐœ์ธํ‚ค๋ฅผ ๊ฐ€์ง„๋‹ค. hash ํ•จ์ˆ˜์˜ ์ผ์ข… ๊ณต๊ฐœํ‚ค, ๊ฐœ์ธํ‚ค๋กœ ์•”ํ˜ธํ™”/๋ณตํ˜ธํ™”๋ฅผ ํ•˜๋Š” ์‹œ์Šคํ…œ SHA ์•Œ๊ณ ๋ฆฌ์ฆ˜์˜ ํ•œ ์ข…๋ฅ˜๋กœ 256๋น„ํŠธ๋กœ ๊ตฌ์„ฑ 64์ž๋ฆฌ ๋ฌธ์ž์—ด์„ ๋ฐ˜ํ™˜ ํ‚ค์ƒ์„ฑ - ํ‚ค๋ถ„๋ฐฐ - ์•”ํ˜ธํ™” - ๋ณตํ˜ธํ™” ์ˆœ์œผ๋กœ ์ด๋ฃจ์–ด์ง. ๋ณตํ˜ธํ™”๋ฅผ ํ•˜์ง€ ์•Š์•„๋„ ๋˜ ์†๋„๊ฐ€ ๋น ๋ฅด๋‹ค. web(JSP) -> server(controller)๋กœ ํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ๋ณด๋‚ผ ๋•Œ ์ค‘๊ฐ„์—์„œ ์ •๋ณด๋ฅผ ๊ฐ€๋กœ์ฑŒ ์ˆ˜ ์žˆ๋‹ค. ์ด๋Ÿฌํ•œ ๋ณด์•ˆ ๋ฌธ์ œ๋ฅผ ๋ง‰๊ธฐ ์œ„ํ•ด JSP์—์„œ RSA๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์•”ํ˜ธํ™”ํ•ด์ค€๋‹ค.. RSA๋กœ ์•”ํ˜ธํ™”๋œ ํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ controller์—์„œ ๋ณตํ˜ธํ™”์‹œํ‚ค๊ณ , ๋ณตํ˜ธ..

Spring 2021.09.03

[PostgreSQL] DATE / TIME ๋‹ค๋ฃจ๊ธฐ

CURRENT_TIMESTAMP๋Š” ํ‘œ์ค€ SQL / NOW()๋Š” ๋น„ํ‘œ์ค€SQL์ด๋‹ค. (๊ฒฐ๊ณผ๋Š” ๋™์ผํ•˜๋‹ค.) NOW() SELECT NOW() 2021-09-02 11:21:39.028994+09 CURRENT_TIMESTAMP SELECT CURRENT_TIMESTAMP 2021-09-02 11:21:39.028994+09 CURRENT_DATE SELECT CURRENT_DATE 2021-09-02 https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-CURRENT 9.9. Date/Time Functions and Operators 9.9. Date/Time Functions and Operators 9.9.1...

DB 2021.09.02

[Spring Error] Can not find the tag library descriptor for

Can not find the tag library descriptor for ๋˜๋Š” The import javax.servlet cannot be resolved ์˜ค๋ฅ˜๋ฅผ ํ•ด๊ฒฐํ•ด๋ณด์ž. project ์šฐํด๋ฆญ - Build Path - Configure Build Path * Apache Tomcat v7.0์˜ Server Library๋ฅผ ํฌํ•จํ•˜๋Š”๋ฐ ํ˜„์žฌ ์ดํด๋ฆฝ์Šค์—๋Š” ํ†ฐ์บฃ 7 ์„œ๋ฒ„๊ฐ€ ๋“ฑ๋ก๋˜์–ด ์žˆ์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์— unbound๋ผ๊ณ  ํ‘œ์‹œ. Server Library ๋”๋ธ” ํด๋ฆญ - Tomcat server runtime library ์ถ”๊ฐ€ unbound ํ‘œ์‹œ๊ฐ€ ์‚ฌ๋ผ์ง€๊ณ  ํŽผ์ณ๋ณด๋ฉด tomcat Library๋“ค์ด build path์— ์ถ”๊ฐ€๋จ. Apply ํด๋ฆญ ๊ฒฐ๊ณผ ํ™•์ธ

Spring 2021.08.31

[M1 Mac] XCODE(12.5.1) unrecognized selector sent to instance ์˜ค๋ฅ˜

์˜ค๋ฅ˜ ๋‚ด์šฉ unrecognized selector sent to instance ์˜ค๋ฅ˜ ์›์ธ ์…€๋ ‰ํ„ฐ ์ธ์Šคํ„ด์Šค๋ฅผ ๋ฐ›์ง€ ๋ชปํ•œ ๊ฒƒ ํ•ด๊ฒฐ๋ฐฉ๋ฒ• 1. ๋ณ€์ˆ˜๋ช…์ด ๋ณ€๊ฒฝ๋œ ๊ฒฝ์šฐ. 2. 2์ค‘ ์—ฐ๊ฒฐ์ด ๋˜์—ˆ์„ ๊ฒฝ์šฐ. * 3. ํด๋ž˜์Šค๊ฐ€ ํด๋”์•ˆ์— ๋“ค์–ด๊ฐ”์„ ๊ฒฝ์šฐ.

iOS 2021.08.28

[JAVA] Lamda ํ‘œํ˜„์‹ ์˜ˆ์ œ

Lamda ํ‘œํ˜„์‹ ๋žŒ๋‹ค์‹์€ JAVA 8์— ๋„์ž…๋œ ํ•จ์ˆ˜(๋ฉ”์„œ๋“œ)๋ฅผ ๊ฐ„๋‹จํ•œ ์‹์œผ๋กœ ํ‘œํ˜„ํ•˜๋Š” ๋ฐฉ๋ฒ•์œผ๋กœ ์ต๋ช… ํ•จ์ˆ˜(anonymous function)๋ฅผ ์ƒ์„ฑํ•˜๊ธฐ ์œ„ํ•œ ์‹์ด๋‹ค. ๊ฐ์ฒด ์ง€ํ–ฅ ์–ธ์–ด๋ณด๋‹ค๋Š” ํ•จ์ˆ˜ ์ง€ํ–ฅ ์–ธ์–ด์— ๊ฐ€๊น๋‹ค. ํ•จ์ˆ˜ ๋ฉ”์„œ๋“œ ํด๋ž˜์Šค์— ๋…๋ฆฝ์  ํด๋ž˜์Šค์— ์ข…์†์  ์ผ๋ฐ˜์ ์ธ ์šฉ์–ด ๊ฐ์ฒด์ง€ํ–ฅ ๊ฐœ๋… ์šฉ์–ด Lamda์‹ ๊ธฐ๋ณธ ์ž‘์„ฑ ๋ฐฉ๋ฒ• (์ธ์ˆ˜) -> {์ฒ˜๋ฆฌ} ()-> {์ฒ˜๋ฆฌ} (์ธ์ˆ˜) -> ์ฒ˜๋ฆฌ (์ธ์ˆ˜) -> {return 0;} int max(int a, int b) { retrun a > b ? a : b; } ↓ ๋ฉ”์„œ๋“œ์˜ ์ด๋ฆ„๊ณผ ๋ฐ˜ํ™˜ ํƒ€์ž…์„ ์ œ๊ฑฐ ํ›„ ' -> ' ์ถ”๊ฐ€ (a, b) -> a > b ? a : b List์—์„œ Lamda์‚ฌ์šฉ Java 7 ์ดํ•˜ : for๋ฌธ ์‚ฌ์šฉ List list = ...service...

Spring 2021.08.27

[M1 Mac] XCODE(12.5.1) swift ๋ฉ”๋ชจ์žฅ ๋งŒ๋“ค๊ธฐ(3),(4)

[M1 Mac] XCODE(12.5.1) swift ๋ฉ”๋ชจ์žฅ ๋งŒ๋“ค๊ธฐ(1),(2) ์ ์‹ฌ์‹œ๊ฐ„์ด๋‚˜ ํ‡ด๊ทผ ํ›„์— ์งฌ์งฌ์ด ๊ฐ•์˜๋ฅผ ๋ณด๋ฉฐ swift๋กœ ๋ฉ”๋ชจ์žฅ์„ ๋งŒ๋“ค์—ˆ๊ณ  core Data ๊ตฌํ˜„ ์ „๊นŒ์ง€ ๊ณต๋ถ€ํ–ˆ๋‹ค. ๋ณด๊ณ  ๋”ฐ๋ผ ํ•˜๋Š” ๊ฑด ์‰ฝ์ง€๋งŒ ์ดํ•ด๊ฐ€ ์™„์ „ํžˆ ๋˜์ง€ ์•Š์•„ #1 - #2๊นŒ์ง€์˜ ๊ฐ•์˜ ๋‚ด์šฉ์„ ์ •๋ฆฌํ•ด๋ณด๋ ค truecode-95.tistory.com ์ด์–ด์„œ ์ž‘์„ฑํ•ด๋ณด๋Š” swift ๋ฉ”๋ชจ์žฅ ๋งŒ๋“ค๊ธฐ 8. data source ๊ตฌํ˜„ 8-1. MemoListTableViewContoller.swift -> numberOfSection method delete 8-2. tableView method dumyData ์ˆซ์ž๋ฅผ return 8-3. ์•„๋ž˜ tableView method ์ฃผ์„ ์ œ๊ฑฐ 8-4. ์‹๋ณ„์ž identifier ๊ฐ’ ํ™•์ธํ•˜๊ธฐ ..

iOS 2021.08.26