Posts
Q&A
์น์ฌ์ดํธ ๋ชจ๋ฐ์ผํ๋ฉด์ผ๋ก ์ ํ๊ด๋ จ ์ง๋ฌธ์ ๋๋ค.
๋ค ์ ํ์ง ์๊ณ ์์ต๋๋ค. const text = div style={{padding:"30px 0px 50px 0px", backgroundColor:"#f0f0f0", width:"90%", height:"auto"}} > Title style={{fontSize:"150%"}} > 2011๋ ํ๊ตญ์ ๋ฌธํ๋ฅผ ์ฃผ๋ํ๋ ์์ธ ๊ฐ๋จ์ ์คํํ ํด๋ฝ ์ฅํ๊ณค์ ์ผ๋ง ์ง๋์ง ์์ ์์์๋ฅผ ๋ํํ๋ ํด๋ฝ์ผ๋ก ์๋ฆฌ๋งค๊นํ์๊ณ 2020๋ ํ์ฌ, ์ธ๊ณ์ ์ธ ํด๋ฝ ๋งค๊ฑฐ์ง DJ Mag : Top 100 Clubs Chart์์ ์ธ๊ณ 7์์ ์ค๋ฅด๋ฉฐ ๋ํ๋ฏผ๊ตญ ํด๋ฝ์ ์์์ ๋์์ต๋๋ค. ์ด๋ ๊ธฐ์กด ํ๊ตญ ํด๋ฝ ๋ฌธํ์์ ํํผํ์ฌ ๋จ์ ํด๋ฝ์ด ์๋ ๋ณตํฉ๋ฌธํ๊ณต๊ฐ์ผ๋ก์ ์ฌ๋ฌ ๊ฐ์ง ๋ฌธํ์ฝํ ์ธ ๋ฅผ ๊ณ ๊ฐ๋ค์๊ฒ ์ ๊ณตํ๊ณ ํด๋ฝ์ ๋ณธ์ง์ธ ์์ ๊ณผ ๋ฌธํ ํ์ฑ์ ๊ธฐ๋ฐ์ ๋์ด ๊พธ์คํ ๋ ธ๋ ฅํ ์ฑ๊ณผ์ ๋๋ค. ํด๋ฝ ์ฅํ๊ณค์ ๋ค์ํ ๊ฒฝํ๊ณผ ์ค๋ ฅ์ ๋ฐํ์ผ๋ก ๋ํ๋ฏผ๊ตญ์ ํด๋ฝ ๋ฌธํ๋ฅผ ์ธ๊ณ์ ์๋ฆฌ๊ณ ๊ฑด์ ํ๊ณ ์ฌ๋ฐ๋ฅธ ํด๋ฝ ๋ฌธํ ํ์ฑ์ ์ํ์ฌ ์์ผ๋ก๋ ๊ณ์ ๋ ธ๋ ฅํ๋ฉฐ ๋ฐ์ ํด ๋์๊ฐ ๊ฒ์ ๋๋ค. ๊ฐ์ฌํฉ๋๋ค. Club Octagon official Title> div> ์์๋ label๋ถ๋ถ์ ๋ค์ด๊ฐ๋ ํ ์คํธ๋ณ์์ด๊ณ Timeline mode="alternate" style={{padding:"30px 200px 30px 200px"}}> Timeline.Item dot={LoadingOutlined style={{fontSize:"20px", color: "red"}} />} label={about} style={{padding:"30px 0px 100px 0px"}} > Timeline.Item> Timeline.Item dot={LoadingOutlined style={{fontSize:"20px", color: "red"}} />} label={text} style={{padding:"30px 0px 50px 0px"}} > Carousel autoplay effect="fade" style={{textAlign: "center",height: "300px",lineHeight: "200px",overflow: "hidden"}}> div> img alt="fortest" src={require('../public/sky.jpg')} style={{width:"100%",height:"auto" }}/> div> div> img alt="fortest" src={require('../public/12.jpg')} style={{width:"100%",height:"auto" }}/> div> div> img alt="fortest" src={require('../public/14.jpg')} style={{width:"100%",height:"auto" }}/> div> div> img alt="fortest" src={require('../public/3.jpg')} style={{width:"100%",height:"auto" }}/> div> Carousel> Timeline.Item> ์ฌ๊ธฐ์์ Timeline.Item dot={LoadingOutlined style={{fontSize:"20px", color: "red"}} />} label={text} style={{padding:"30px 0px 50px 0px"}} > ๋ถ๋ถ์ ๋๋ค.
- 0
- 5
- 737
Q&A
์น์ฌ์ดํธ ๋ชจ๋ฐ์ผํ๋ฉด์ผ๋ก ์ ํ๊ด๋ จ ์ง๋ฌธ์ ๋๋ค.
๋ต๋ณ ๊ฐ์ฌํฉ๋๋ค. ์ ๋ก์ด๋์ ๋ง์๋๋ก %๋ก ๋ณ๊ฒฝ์ ํ๋๋ ์ฌ์ง์ด๋ ํ ์คํธ ์์ญ์ด ๋ถ๋ชจ ๋์ด์ ๋ฐ๋ผ ์ค์ด๋๋ ๊ฒ์ ํ์ธํ์ต๋๋ค. ๊ฐ์ฌํฉ๋๋ค. ๊ทธ๋ฐ๋ฐ ํ ์คํธ์ ํฌ๊ธฐ๊ฐ ๋ฌธ์ ์๋๊ฒ ๊ฐ์ต๋๋ค. ํ๋ฉด ๋น์จ์ ๋ฐ๋ผ ๋ค๋ฅธ ๊ฒ์ ์ค์ด๋ค์ง๋ง ํ ์คํธ์ ํฌ๊ธฐ๊ฐ ์ค์ด๋ค์ง ์์ ํ ์คํธ์ ๋ฐฐ๊ฒฝ์ด ํจ๊ป ๋์ด๋๋ฉฐ ๋ค๋ฅธ ๋ถ๋ถ์ ์์ญ์ ์นจ๋ฒํ๊ณ ์์ต๋๋ค. 1.ํ๋ฉด ๋น์จ์ ๋ฐ๋ผ ํ ์คํธ์ ํฌ๊ธฐ๋ฅผ ๋ง์ถ๋ ค๋ฉด ์ด๋กํด์ผํ ๊น์?
- 0
- 5
- 737
Q&A
๋ฅ์คํธ์ ์ ์ ์ผ๋ก ํ์ผ์ ์ฝ์ ํ๋ ๋ฐฉ๋ฒ์ด ๋ฐ๋ก ์์๊น์?
์ฌ์ง ์ถ๋ ฅ์ ๋์ต๋๋ค!! next.config.js์ ์ค์ ์ ๋ฐ๋ก ํด์ ์ถ๋ ฅ ๋์์ต๋๋ค
- 0
- 4
- 205
Q&A
๋ฅ์คํธ์ ์ ์ ์ผ๋ก ํ์ผ์ ์ฝ์ ํ๋ ๋ฐฉ๋ฒ์ด ๋ฐ๋ก ์์๊น์?
๋ค ๋ง์ํ์ ๋๋ก img alt="fortest" src="/home/gksdudxkr/์ ๋ก์ด/homepage/public/logo.jpg" style={{width:"600px", height:"600px"}} >img> ๋ฅผ ํ๋๋ฐ ์ฌ์ง์ด ์ถ๋ ฅ์ด ๋์ง ์์ต๋๋ค ์ฌ์ง์ด ๊นจ์ง๋ ์์ด์ฝ์ผ๋ก ์ถ๋ ฅ์ด ๋๋๋ฐ ์ค์ ์ ๋ฐ๋ก ํด์ผํ ๊น์?
- 0
- 4
- 205
Q&A
์ํ๋ผ์ด์ฆ๋ก ๋ฐ์ดํฐ๋ฅผ ๊ฐ์ ธ์ค๋ ๋ฌธ์ ์ ๋๋ค.
๋ต ๊ฐ์ฌํฉ๋๋ค!!
- 0
- 7
- 318
Q&A
์ํ๋ผ์ด์ฆ๋ก ๋ฐ์ดํฐ๋ฅผ ๊ฐ์ ธ์ค๋ ๋ฌธ์ ์ ๋๋ค.
์ ์ ๊ฐ findAll๋ก ํด์ ์๋๋ ๊ฑฐ์๊ตฐ์ findOne๋ก ํด์ ๊ฐ์ธ์ ์ ๋ณด๋ฅผ ๊ฐ์ ธ์ค๊ณ ๊ทธ ์ ๋ณด๋ก follow๋ฅผ ๊ฐ์ ธ์ค๋ ๊ฐ ์ปค๋งจํธ๋ค๋ ๊ฐ์ด ๊ฐ์ ธ์์ก์ต๋๋ค ๊ฐ์ฌํฉ๋๋ค!!! ์ ๋ก์ด๋ ์ง๊ธ์ 3๋จ๊ณ์ ๊ฑธ์ณ์ ๊ฐ์ ธ์ค๋ ๊ฒ์ ๊ตฌํํ๋๋ฐ์ ๋จ๊ณ๊ฐ ๊ณ์ ๋์ด๋๊ฑฐ๋ ์ง๊ธ ์ ๋ณด๋ณด๋ค ๋ ์ถ๊ฐ๋ก ๊ฐ์ ธ์ค๊ฒ ํ๋ ค๋ฉด ๊ทธ ํ์๋ ์ด๋กํด์ผ ํ ์ง ๊ฐ์ด ์์กํ๋๋ค ํน์ ๊ด๋ จ ์ค๋ช ์ด ๋ค์ด๊ฐ ์๋ ์ฌ์ดํธ๋ ์ฃผ์ ํน์ ๊ฐ์ง๊ณ ๊ณ์ค๊น์?
- 0
- 7
- 318
Q&A
์ํ๋ผ์ด์ฆ๋ก ๋ฐ์ดํฐ๋ฅผ ๊ฐ์ ธ์ค๋ ๋ฌธ์ ์ ๋๋ค.
user.associate = (db) =>{ db.user.hasMany(db.comments); db.user.belongsToMany(db.comments,{through:"like", as : "liker"}); db.user.belongsToMany(db.user,{through:"Follow",as:"Followers", foreignKey: 'Followingid'}); db.user.belongsToMany(db.user,{through:"Follow",as:"Followings", foreignKey: 'Followerid'}); db.user.hasMany(db.meeting_popup) }; ๋๋ฌธ์๋ก ์์ฑ์ ํด์ฃผ์์ต๋๋ค ํ์ฌ ๋ค๋ฅธ addFollowers๋ ์๋์ ํฉ๋๋ค ๊ทธ๋ฐ๋ฐ getFollowers๋ง ํจ์๋ฅผ ์ฐพ์ ์ ์๋ค๊ณ ๊ณ์ ๋์ค๊ณ ์์ต๋๋ค ๊ทธ๋ฆฌ๊ณ ๋ฐ์ดํฐ๋ฒ ์ด์ค๋ฅผ ์ง์ ๋ค๊ฐ ๋ค์ ๋ง๋ค์์ต๋๋ค
- 0
- 7
- 318
Q&A
๋ฐ์ดํฐ๋ฒ ์ด์ค ๋ค๋๋ค ๊ด๊ณ ์ฐ๊ฒฐ ์ง๋ฌธ์ ๋๋ค
์ followํ ์ด๋ธ์ด ์์์ด์!!! ์ ๊ฐ as๋ ํท๊ฐ๋ ธ๋๋ด์.. ๊ทธ๋ฆฌ๊ณ Follow ๋๋ฌธ์๋ก ํ๋๊น ๋ฐ๋ก ์ ์ฅ์ด ๋์์ต๋๋ค ๊ฐ์ฌํฉ๋๋ค!! ์ฃผ๋ง์ด์ ๋ฐ ์๋ ค์ฃผ์ ์ ๊ฐ์ฌํฉ๋๋ค
- 0
- 4
- 352
Q&A
๋ฐ์ดํฐ๋ฒ ์ด์ค ๋ค๋๋ค ๊ด๊ณ ์ฐ๊ฒฐ ์ง๋ฌธ์ ๋๋ค
์ฃผ๋ง์ธ๋ฐ๋ ๋ต๋ณ ๋ฌ์์ฃผ์ ์ ๊ฐ์ฌํฉ๋๋ค ๋ค belongsTo๋ฅผ ๊ฐ๊ฐ ์ถ๊ฐํ๊ณ as, foreignKey๋ ๊ฐ๊ฐ ์ถ๊ฐํ์ต๋๋ค. id๋ foreignKey๋ก ์์ฑ์ ์ฃผ์์ต๋๋ค. db.user.belongsToMany(db.user,{through:"follow",as:"followers", foreignKey: 'followingid'}); db.user.belongsToMany(db.user,{through:"follow",as:"followings", foreignKey: 'followerid'}); // ์์ ๋ถ๋ถ์ db.userํ ์ด๋ธ ๋ถ๋ถ์ด๊ณ ๋ฐ์ ๋ถ๋ถ์ด ์๋ฒ ๋ถ๋ถ์ ๋๋ค //id 7,2 ๋๋ค ์กด์ฌํ๊ณ ์๋ ๊ฐ์ ๋๋ค. app.post("/follow",async (req,res)=>{ console.log(req.body); try { const aaa = await db.user.findOne({ where:{id:7} }); await aaa.addfollowings(2) const testfollow = await db.user.findAll({ where:{username:young}, include:{ model:db.user, as: "followings" } }) res.status(200).json(testfollow) }catch(e){ console.log(e); } }) ๊ทธ๋ฐ๋ฐ ์๊พธ addfollowings๊ฐ ์กด์ฌํ์ง ์๋ ํจ์๋ผ๊ณ ๋์ต๋๋ค 1. ์ ์ ํจ์๊ฐ ์กด์ฌํ์ง ์๋ ํจ์๋ผ๊ณ ๋์ฌ๊น์? 2. ๊ทธ๋ฆฌ๊ณ ๋ง์ฝ ์ ์ฅ์ด ๋๋ค๋ฉด followings, followsํ ์ด๋ธ์ ์ ์ฅ๋ ๊ฐ์ ์ด๋์ ํ์ธ์ด ๊ฐ๋ฅํ ๊น์? mysql์์๋ userํ ์ด๋ธ์ ๋ฐ๋ก ํ์๋ ์๊ณ as ๋ก ๋ง๋ ํ ์ด๋ธ์ ๋ณด์ด์ง๋ ์๊ณ ์ํฌ๋ฒค์น์์๋ ํฌ๋ฆฐํค๋ก ์ง์ ๋๋ค๋ง ํ์ธ์ด ๊ฐ๋ฅํฉ๋๋ค ์๋ ค์ฃผ์๋ฉด ๊ฐ์ฌํ๊ฒ ์ต๋๋ค
- 0
- 4
- 352
Q&A
๋ฐ์ดํฐ๋ฒ ์ด์ค ๋ง๋๋ ์ง๋ฌผ
๋ค ๋ ธ๋๊ต๊ณผ์ ๊ฐ์ข๊ฐ ๋ง์ต๋๋ค 1. ๋ ธ๋๊ต๊ณผ์ ๊ฐ์ข์๋ hasmany๊ฐ์ ๋ถ๋ถ๋ค์ด models/index.jsํ์ผ์ ์์ฑ์ ํ์๊ณ sns๋ฒ๋ ๊ฐ์ข์์๋ ๊ฐ models/์ ํ ์ด๋ธ.jsํ์ผ์ associate๋ถ๋ถ์ ์์ฑ์ ํ์ จ๋๋ฐ ์ด๋ค๊ฒ์ด ๋ ํจ์จ์ ์ธ์ง ์์ฆ์ ์ด๋ค ๋ฐฉ๋ฒ์ ์ ํธํ๋์ง ๊ถ๊ธํด์ ์ฌ์ญค๋ด ๋๋ค. 2. ๋ง์ด๊ทธ๋ ์ด์ ์ผ๋ก ์์ ์ ํ๋ค๊ณ ํ์ จ๋๋ฐ ์ ๋ ๊ฐ์ด ์ฝ๋ ๊ณต๋ถ๋ฅผ ํ๋ ๋ค๋ฅธ ์ฌ๋๋ค์ ๋ง์ด๊ทธ๋ ์ด์ ์ผ๋ก ์์ฑ์ ํ๋๋ผ๊ณ ์ ๊ทธ๋ฌ๋ฉด ๋ง์ด๊ทธ๋ ์ด์ ์ ์์ฐ์๋๊น ๋ง์ด๊ทธ๋ ์ด์ ์ ์์ฆ์ ์์ฐ๋ ๋ฐฉ๋ฒ์ด๊ณ ํ์ฌ ๊ฐ์ํ์๋ ๋ด์ฉ์ด ์ต์ ํ๋ ํจ์จ์ ์ธ ๋ฐฉ๋ฒ์ธ๊ฐ์?
- 0
- 3
- 183