๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

์ „์ฒด ๊ธ€115

Spring - DB์ ‘๊ทผ3 (์Šคํ”„๋ง ํ†ตํ•ฉ ํ…Œ์ŠคํŠธ) ์Šคํ”„๋ง - ์Šคํ”„๋ง ์ปจํ…Œ์ด๋„ˆ - DB ๋ฅผ ํ†ตํ•ฉํ•˜์—ฌ ํ…Œ์ŠคํŠธ package hello.hellospring.service; import hello.hellospring.domain.Member; import hello.hellospring.repository.MemberRepository; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.transaction.annotation.Transactional; import static .. 2023. 7. 4.
Spring - DB์ ‘๊ทผ2 (๊ณ ์ „ jdbc ์ด์šฉ) ๊ณ ์ „ jdbc๋ฅผ ์ด์šฉํ•ด์„œ ์ €์žฅ์†Œ๋ฅผ ์ƒ์„ฑ package hello.hellospring.repository; import hello.hellospring.domain.Member; import org.springframework.jdbc.datasource.DataSourceUtils; import javax.sql.DataSource; import java.sql.*; import java.util.ArrayList; import java.util.List; import java.util.Optional; public class JdbcMemberRepository implements MemberRepository { private final DataSource dataSource; public Jdbc.. 2023. 7. 4.
Spring - DB์ ‘๊ทผ1 (h2) h2 ์‹คํ–‰ ๋ฐฉ๋ฒ• (ํ„ฐ๋ฏธ๋„) ์œ„์— ๊ฐ™์ด ์ธํ„ฐ๋„ท ํ˜ธ์ŠคํŠธ์—์„œ H2๊ฐ€ ์ž˜ ๋œจ๋Š”๊ฒƒ์„ ํ™•์ธํ•˜๋ฉด ์™„๋ฃŒ! JDBC URL์„ ์‚ดํŽด๋ณด๋ฉด ์ง์ ‘ ์ ‘๊ทผ์ด ์•„๋‹Œ, ์†Œ์ผ“์„ ํ†ตํ•ด ์—ฐ๊ฒฐ๋จ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๊ณผ์ •์„ ํ†ตํ•ด H2 ์— DB๋ฅผ ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ๋‹ค. 2023. 7. 4.
[Stack] ์Šคํƒ - STL์„ ์ด์šฉํ•œ ๋ฏธ๋กœ์ฐพ๊ธฐ // #include "Location2D.h" #include #include using namespace std; const int MAZE_SIZE=6; //๋ฏธ๋กœ๋งต ํฌ๊ธฐ ๊ณ ์ • char map[MAZE_SIZE][MAZE_SIZE] = { //๋ฏธ๋กœ๋งต ๋ฐ์ดํ„ฐ {'1','1','1','1','1','1'}, {'e','0','1','0','0','1'}, {'1','0','0','0','1','1'}, {'1','0','1','0','1','1'}, {'1','0','1','0','0','x'}, {'1','1','1','1','1','1'}, }; //(r,c)๊ฐ€ ๊ฐˆ ์ˆ˜ ์žˆ๋Š” ์œ„์น˜์ธ์ง€๋ฅผ ๊ฒ€์‚ฌ //(r,c)๊ฐ€ ๋ฐฐ์—ด ์•ˆ์— ์žˆ๊ณ , ๊ฐ’์ด ๊ฐˆ ์ˆ˜ ์žˆ๋Š” ์œ„์น˜ '0'์ด๊ฑฐ๋‚˜ ์ถœ๊ตฌ 'x'์ด์–ด์•ผํ•จ bool isValid.. 2023. 7. 4.