code
stringlengths
41
34.3k
lang
stringclasses
8 values
review
stringlengths
1
4.74k
@@ -61,7 +61,10 @@ class Nav extends React.Component { </a> <a href="/"> <div className="profile-image"> - <img src="images/profile/me.jpeg" alt="me" /> + <img + src="/images/hyunchanpark//images/user-icon.jpg" + al...
JavaScript
a๋งํฌ ์‚ฌ์šฉํ•˜์‹ ๊ฒŒ ๋งŽ์ด ๋ณด์ž…๋‹ˆ๋‹ค! a ๋งํฌ๋Œ€์‹  Link๋ฅผ ์‚ฌ์šฉํ•˜๋Š”๊ฒŒ ์ข‹์•„๋ณด์ž…๋‹ˆ๋‹ค!
@@ -0,0 +1,121 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withRouter } from 'react-router'; +import './Login.scss'; + +const REGEXP = { + emailRegExp: + /[a-zA-Z0-9.-_+!]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]{2,}(?:.[a-zA-Z0-9]{2,3})?/, + passwordRegExp: /[a-zA-Z0-9]{5,100}/, +}; + +cl...
JavaScript
์ •๊ทœ์‹ ํ‘œํ˜„์„ ์‚ฌ์šฉํ•ด์„œ ์ด๋Ÿฐ์‹์œผ๋กœ ํ…Œ์ŠคํŠธ ๋Œ๋ฆด ์ˆ˜ ์žˆ๊ตฐ์š” ์ฐธ๊ณ ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค !! ๐Ÿ‘
@@ -0,0 +1,92 @@ +[ + { + "id": 1, + "userName": "wecode", + "city": "KAYTRANADA", + "userImgSrc": "/images/hyunchanpark/images/insta-mini.jpg", + "feedImgSrc": "https://images.unsplash.com/photo-1621419079793-73020baef9eb?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw0fHx8ZW58MHx8fHw%3D&ixlib=rb-1.2.1&auto=f...
Unknown
json ๋ฐ์ดํ„ฐ๋ฅผ ๋‹ค์–‘ํ•˜๊ฒŒ ํ™œ์šฉํ•˜์…”์„œ ๋ณด๊ธฐ ์ข‹์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,121 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withRouter } from 'react-router'; +import './Login.scss'; + +const REGEXP = { + emailRegExp: + /[a-zA-Z0-9.-_+!]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]{2,}(?:.[a-zA-Z0-9]{2,3})?/, + passwordRegExp: /[a-zA-Z0-9]{5,100}/, +}; + +cl...
JavaScript
๋น„๊ตฌ์กฐํ™” ํ• ๋‹น์„ ๋”ฐ๋กœ ํ•ด์ฃผ์…จ๋Š”๋ฐ ์‚ฌ์šฉ์„ ์•ˆํ•˜๊ณ  ๊ณ„์‹ญ๋‹ˆ๋‹ค! ํ•จ์ˆ˜๋„ ๋น„๊ตฌ์กฐํ™” ํ• ๋‹น ๊ฐ€๋Šฅํ•ด๋ณด์ž…๋‹ˆ๋‹ค !
@@ -0,0 +1,43 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; + +class Comment extends React.Component { + render() { + const { feedId, comment, onRemoveComment, onToggleLike } = this.props; + + return ( + <> + <div className="comment" id={comment.id}> + <div classNa...
JavaScript
๋น„๊ตฌ์กฐํ™” ํ• ๋‹น ๋ณด๊ธฐ ์ข‹์Šต๋‹ˆ๋‹ค ๐Ÿ‘
@@ -0,0 +1,47 @@ +import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; +import Comment from './Comment'; + +class CommentList extends Component { + render() { + const { feedId, commentList, onToggleLike, onRemoveComment } = this.props; + + return ( + <> + <div> + ...
JavaScript
์‚ฌ์šฉ์„ ์•ˆํ•˜์‹œ๋Š” ์ฝ”๋“œ๋ฉด ์‚ญ์ œ๋ฅผ ํ•ด์ฃผ์‹œ๋Š”๊ฒŒ ์ข‹์•„ ๋ณด์ž…๋‹ˆ๋‹ค!
@@ -0,0 +1,47 @@ +import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; +import Comment from './Comment'; + +class CommentList extends Component { + render() { + const { feedId, commentList, onToggleLike, onRemoveComment } = this.props; + + return ( + <> + <div> + ...
JavaScript
์ข‹์•„์š” ๊นŒ์ง€ ๊ตฌํ˜„ํ•˜์‹ ๊ฑด๊ฐ€์š” ๐Ÿ”ฅ
@@ -0,0 +1,47 @@ +import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; +import Comment from './Comment'; + +class CommentList extends Component { + render() { + const { feedId, commentList, onToggleLike, onRemoveComment } = this.props; + + return ( + <> + <div> + ...
JavaScript
json๋ฐ์ดํ„ฐ๋ฅผ ๋ณต์‚ฌํ•ด์„œ ์ด๋ ‡๊ฒŒ ์‚ฌ์šฉ๋„ ๊ฐ€๋Šฅํ•˜๊ตฐ์š” ์ฐธ๊ณ ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค~
@@ -0,0 +1,47 @@ +import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; +import Comment from './Comment'; + +class CommentList extends Component { + render() { + const { feedId, commentList, onToggleLike, onRemoveComment } = this.props; + + return ( + <> + <div> + ...
JavaScript
key๋”ฐ๋กœ id๋”ฐ๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌํ•ด์ฃผ์‹ ๊ฑฐ ๋„ˆ๋ฌด ์ข‹์€๊ฑฐ ๊ฐ™๋„ค์š”! ๐Ÿ‘๐Ÿป
@@ -0,0 +1,150 @@ +import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; +import CommentInput from './CommentInput'; +import CommentList from './CommentList'; + +class Feed extends Component { + render() { + const { feed, onSubmitCommentForm, onRemoveComment, onToggleLike } = + th...
JavaScript
์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” console.log ๋ฐœ๊ฒฌ~ ๐Ÿ›ธ
@@ -0,0 +1,156 @@ +@import '../Styles/common.scss'; + +.entire-container { + @include flex-set(row, center, center); + width: 100%; + height: 100vh; + background-color: $background-default-color; + + .entire { + width: 350px; + background-color: $background-default-color; + + .entire_top { + height: ...
Unknown
sass nesting ์‚ฌ์šฉ ๊น”๋”, ๊ฐ„๊ฒฐ ๊ฐ€๋…์„ฑ ๐Ÿ‘
@@ -0,0 +1,150 @@ +import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; +import CommentInput from './CommentInput'; +import CommentList from './CommentList'; + +class Feed extends Component { + render() { + const { feed, onSubmitCommentForm, onRemoveComment, onToggleLike } = + th...
JavaScript
Boolean ๋ฐ์ดํ„ฐ ํƒ€์ž…์˜ ํ™œ์šฉ์„ ํ•˜๋‚˜ํ•˜๋‚˜ ๊ผผ๊ผผํ•˜๊ฒŒ ์ž์ฃผ ํ•˜์‹ ์  ๐Ÿ‘๐Ÿป ๋ฐ•์ˆ˜~~~
@@ -0,0 +1,212 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import Nav from '../../../Components/Nav/Nav'; +import FeedList from './FeedList'; +import './Main.scss'; + +class Main extends React.Component { + render() { + return ( + <> + <Nav /> + <div className="main-...
JavaScript
๋ฆฌ์•กํŠธ ์ธ๋ผ์ธ ์Šคํƒ€์ผ๋กœ ๊พธ๋ฏธ๋Š”๋ฒ• ๊นŒ๋จน๊ณ  ์žˆ์—ˆ๋Š”๋ฐ ์ฐธ๊ณ  ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค~
@@ -0,0 +1,212 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import Nav from '../../../Components/Nav/Nav'; +import FeedList from './FeedList'; +import './Main.scss'; + +class Main extends React.Component { + render() { + return ( + <> + <Nav /> + <div className="main-...
JavaScript
์š”๊ธฐ ์ฝ”๋“œ๋„ ์ „์ฒด๋กœ a๋งํฌ๋ฅผ ์ฃผ์…จ์Šต๋‹ˆ๋‹ค Link๋กœ ์ฃผ์‹œ๋ฉด ์ข‹์„๊ฑฐ ๊ฐ™์Šต๋‹ˆ๋‹ค
@@ -0,0 +1,47 @@ +import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; +import Comment from './Comment'; + +class CommentList extends Component { + render() { + const { feedId, commentList, onToggleLike, onRemoveComment } = this.props; + + return ( + <> + <div> + ...
JavaScript
formํƒœ๊ทธ์˜ submit์„ ์ถ”๊ฐ€ํ•˜์…”์„œ ์—”ํ„ฐํ‚ค๋ฅผ ์ณ๋„ ์ž…๋ ฅ์ด ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•œ์  ๋ณด๊ธฐ ์ข‹์Šต๋‹ˆ๋‹ค! ์ด๋ ‡๊ฒŒ ํ•˜๋ฉด ๋”ฐ๋กœ ์—”ํ„ฐํ‚ค ํ•จ์ˆ˜๋ฅผ ๋งŒ๋“ค์ง€ ์•Š์•„๋„ ๋˜๋‹ˆ๊นŒ ์ข‹์€๊ฑฐ ๊ฐ™์Šต๋‹ˆ๋‹ค !
@@ -0,0 +1,47 @@ +import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; +import Comment from './Comment'; + +class CommentList extends Component { + render() { + const { feedId, commentList, onToggleLike, onRemoveComment } = this.props; + + return ( + <> + <div> + ...
JavaScript
์•„๋‹ˆ์š”......์‚ญ์ œ๊นŒ์ง€ ๊ตฌํ˜„ํ–ˆ์Šต๋‹ˆ๋‹ค. ใ… ใ… 
@@ -61,7 +61,10 @@ class Nav extends React.Component { </a> <a href="/"> <div className="profile-image"> - <img src="images/profile/me.jpeg" alt="me" /> + <img + src="/images/hyunchanpark//images/user-icon.jpg" + al...
JavaScript
[์ฐธ๊ณ ](https://stackoverflow.com/questions/43087007/react-link-vs-a-tag-and-arrow-function) `<a>`๋Š” ์‚ฌ์šฉํ•˜๋ฉด ์ƒˆ๋กœ๊ณ ์นจ ํ•˜๋Š” ๊ฒƒ์ฒ˜๋Ÿผ html์„ ์ƒˆ๋กœ ๋‹ค ๋ฐ›์•„ ์˜ค๋Š” ๋ฐ˜๋ฉด, `<Link>`๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์ปดํฌ๋„ŒํŠธ๋งŒ ๋ฐ”๊ฟ”์ค๋‹ˆ๋‹ค. ๋ Œ๋”๋ง ์ตœ์ ํ™”๋ฅผ ์œ„ํ•ด์„œ `<Link>` ์‚ฌ์šฉํ•ด์ฃผ์„ธ์š”!
@@ -22,6 +22,7 @@ nav { .title { margin: 0; font-size: 30px; + font-weight: 400; font-family: 'Lobster', cursive; } @@ -44,5 +45,30 @@ nav { font-weight: 300; } } + + .path-icon { + display: flex; + + a { + margin-left: 24px; + backgr...
Unknown
font-weight:400์ด ๊ธฐ๋ณธ์†์„ฑ์ธ๋ฐ ๋”ฐ๋กœ ๋ถ€์—ฌํ•˜์‹  ์ด์œ ๊ฐ€ ์žˆ๋‚˜์š”?
@@ -0,0 +1,121 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withRouter } from 'react-router'; +import './Login.scss'; + +const REGEXP = { + emailRegExp: + /[a-zA-Z0-9.-_+!]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]{2,}(?:.[a-zA-Z0-9]{2,3})?/, + passwordRegExp: /[a-zA-Z0-9]{5,100}/, +}; + +cl...
JavaScript
์ด ๊ฐ’์€ ์ปดํฌ๋„ŒํŠธ๋‚ด๋ถ€์— ๊ฐ’์œผ๋กœ ๊ฐ€์ง€๊ณ  ์žˆ๋Š”๊ฒŒ ์ข‹์•„๋ณด์ด๋Š”๋ฐ ์ปดํฌ๋„ŒํŠธ ๋ฐ”๊นฅ์—์„œ ์„ ์–ธํ•˜์‹  ์ด์œ ๊ฐ€ ์žˆ๋‚˜์š”?
@@ -0,0 +1,121 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withRouter } from 'react-router'; +import './Login.scss'; + +const REGEXP = { + emailRegExp: + /[a-zA-Z0-9.-_+!]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]{2,}(?:.[a-zA-Z0-9]{2,3})?/, + passwordRegExp: /[a-zA-Z0-9]{5,100}/, +}; + +cl...
JavaScript
```suggestion return reg.test(value) ``` test method์˜ return๊ฐ’ ์ž์ฒด๊ฐ€ boolean์ด๊ธฐ ๋•Œ๋ฌธ์— ์œ„์™€ ๊ฐ™์ด ๊ฐ„๊ฒฐํ•˜๊ฒŒ ํ‘œํ˜„ ๊ฐ€๋Šฅํ•ด๋ณด์ž…๋‹ˆ๋‹ค!
@@ -0,0 +1,121 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withRouter } from 'react-router'; +import './Login.scss'; + +const REGEXP = { + emailRegExp: + /[a-zA-Z0-9.-_+!]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]{2,}(?:.[a-zA-Z0-9]{2,3})?/, + passwordRegExp: /[a-zA-Z0-9]{5,100}/, +}; + +cl...
JavaScript
๊ธฐ๋Šฅ๋ณ„ ํ•จ์ˆ˜ ๋ถ„๋ฆฌํ•˜๊ณ  ์ž˜ ์žฌํ™œ์šฉํ•˜์‹  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!๐Ÿ‘
@@ -0,0 +1,121 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withRouter } from 'react-router'; +import './Login.scss'; + +const REGEXP = { + emailRegExp: + /[a-zA-Z0-9.-_+!]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]{2,}(?:.[a-zA-Z0-9]{2,3})?/, + passwordRegExp: /[a-zA-Z0-9]{5,100}/, +}; + +cl...
JavaScript
validateInputData ๋ฅผ ํ˜ธ์ถœํ•˜๊ณ  ๊ณ„์‹œ์ง€๋งŒ ์ด ํ•จ์ˆ˜๋Š” ์‹คํ–‰๋˜๊ธฐ๋งŒ ํ•˜๊ณ  ๋ฆฌํ„ด๊ฐ’์„ ์–ด๋””์—๋„ ํ™œ์šฉํ•˜์ง€ ์•Š๊ณ  ์žˆ๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค! ์‹ค์งˆ์ ์œผ๋กœ ์–ด๋–ค ์˜๋ฏธ๋„ ์—†๋Š” ์ฝ”๋“œ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,121 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withRouter } from 'react-router'; +import './Login.scss'; + +const REGEXP = { + emailRegExp: + /[a-zA-Z0-9.-_+!]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]{2,}(?:.[a-zA-Z0-9]{2,3})?/, + passwordRegExp: /[a-zA-Z0-9]{5,100}/, +}; + +cl...
JavaScript
`const {name, value} = e.target;` ์œผ๋กœ ๊ตฌ์กฐ๋ถ„ํ•ดํ•ด์„œ ์‚ฌ์šฉํ•˜์‹œ๋ฉด ์ข€ ๋” ๊ฐ„๊ฒฐํ•˜๊ฒ ๋„ค์š”!
@@ -0,0 +1,121 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withRouter } from 'react-router'; +import './Login.scss'; + +const REGEXP = { + emailRegExp: + /[a-zA-Z0-9.-_+!]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]{2,}(?:.[a-zA-Z0-9]{2,3})?/, + passwordRegExp: /[a-zA-Z0-9]{5,100}/, +}; + +cl...
JavaScript
๐Ÿ‘ state๊ฐ’๋„ ๊ตฌ์กฐ๋ถ„ํ•ดํ•ด์„œ ์‚ฌ์šฉํ•˜๋ฉด ์ข€ ๋” ๊ฐ„๊ฒฐํ•ด๋ณด์ผ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,121 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withRouter } from 'react-router'; +import './Login.scss'; + +const REGEXP = { + emailRegExp: + /[a-zA-Z0-9.-_+!]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]{2,}(?:.[a-zA-Z0-9]{2,3})?/, + passwordRegExp: /[a-zA-Z0-9]{5,100}/, +}; + +cl...
JavaScript
๊ฑด์šฐ๋‹˜์ด ๋ฆฌ๋ทฐ ์ž˜ ๋‚จ๊ฒจ์ฃผ์…จ๋„ค์š” ํ™•์ธํ•˜๊ณ  ๋ฐ˜์˜ํ•ด๋ณด์„ธ์š”!๐Ÿ‘
@@ -0,0 +1,121 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withRouter } from 'react-router'; +import './Login.scss'; + +const REGEXP = { + emailRegExp: + /[a-zA-Z0-9.-_+!]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]{2,}(?:.[a-zA-Z0-9]{2,3})?/, + passwordRegExp: /[a-zA-Z0-9]{5,100}/, +}; + +cl...
JavaScript
์• ์ดˆ์— boolean์„ ๋ฆฌํ„ดํ•˜๋Š” ํ•จ์ˆ˜์ด๊ธฐ ๋•Œ๋ฌธ์— not ์—ฐ์‚ฐ์ž๋ฅผ ํ™œ์šฉํ•ด์„œ ```suggestion const isDisabled = !this.validateInputData(userId, userPw) ``` button tag์—์„œ ํ•œ๋ฒˆ๋งŒ ์‚ฌ์šฉ๋˜๋Š” ๊ฐ’์ด๋ผ๋ฉด ๋”ฐ๋กœ ๋ณ€์ˆ˜์„ ์–ธ ํ• ๋‹น๊ณผ์ • ๊ฑฐ์น  ํ•„์š” ์—†์ด ๋ฒ„ํŠผ ํƒœ๊ทธ ๋‚ด์— ๋ฐ”๋กœ ์ ์–ด์ค˜๋„ ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,121 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withRouter } from 'react-router'; +import './Login.scss'; + +const REGEXP = { + emailRegExp: + /[a-zA-Z0-9.-_+!]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]{2,}(?:.[a-zA-Z0-9]{2,3})?/, + passwordRegExp: /[a-zA-Z0-9]{5,100}/, +}; + +cl...
JavaScript
```suggestion disabled={!this.validateInputData(userId, userPw)} ``` ์œ„์— ๋‹ฌ์•„๋“œ๋ฆฐ ์ฝ”๋ฉ˜ํŠธ์™€ ์ด์–ด์ง€๋Š” ๋‚ด์šฉ์ž…๋‹ˆ๋‹ค!
@@ -0,0 +1,156 @@ +@import '../Styles/common.scss'; + +.entire-container { + @include flex-set(row, center, center); + width: 100%; + height: 100vh; + background-color: $background-default-color; + + .entire { + width: 350px; + background-color: $background-default-color; + + .entire_top { + height: ...
Unknown
์ปดํฌ๋„ŒํŠธ ์ด๋ฆ„์œผ๋กœ nesting ์ ์šฉํ•ด์ฃผ์„ธ์š”! ์ด๋ ‡๊ฒŒ ๋˜๋ฉด ๋‹ค๋ฅธ ์ปดํฌ๋„ŒํŠธ๋“ค์˜ ์Šคํƒ€์ผ์—๋„ ์˜ํ–ฅ์„ ๋ฏธ์น  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,156 @@ +@import '../Styles/common.scss'; + +.entire-container { + @include flex-set(row, center, center); + width: 100%; + height: 100vh; + background-color: $background-default-color; + + .entire { + width: 350px; + background-color: $background-default-color; + + .entire_top { + height: ...
Unknown
๊ณตํ†ต์ ์œผ๋กœ ์ ์šฉ๋˜์–ด์•ผ ํ•˜๋Š” ์†์„ฑ์ด๋ผ๋ฉด common์— ๋„ฃ์–ด์ฃผ์‹œ๋Š” ๊ฒŒ ๋งž์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,156 @@ +@import '../Styles/common.scss'; + +.entire-container { + @include flex-set(row, center, center); + width: 100%; + height: 100vh; + background-color: $background-default-color; + + .entire { + width: 350px; + background-color: $background-default-color; + + .entire_top { + height: ...
Unknown
mixin ์ž˜ ํ™œ์šฉํ•ด์ฃผ์…จ๋„ค์š”!
@@ -0,0 +1,12 @@ +package develop.baminchan; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class SidedishApplication { + + public static void main(String[] args) { + SpringApplication.run(SidedishApplication...
Java
Security ์„ค์ •์ด ๋ณ„๋„ ํด๋ž˜์Šค๋กœ ๋…๋ฆฝํ•˜๋ฉด ์กฐ๊ธˆ ๋” ์ข‹์„ ๊ฒƒ ๊ฐ™๋„ค์š”.
@@ -0,0 +1,75 @@ +package develop.baminchan.controller; + +import develop.baminchan.dto.BanchanDto; +import develop.baminchan.dto.CategoryDto; +import develop.baminchan.dto.banchan.BanchanDetailDto; +import develop.baminchan.entity.Banchan; +import develop.baminchan.service.BanchanService; +import org.springframework.h...
Java
`@PathVariable` ์•ˆ์— path variable name์„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ๋Š” ํ•„๋“œ๊ฐ€ ์žˆ์„ ๊ฑฐ๋ผ ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค. ์–ด๋– ํ•œ ์ˆœ๊ฐ„์—๋„ ์ž๋ฐ”์˜ ๊ธฐ๋ณธ์  ์ฝ”๋”ฉ ์ปจ๋ฒค์…˜์„ ๊ณ„์† ์ค€์ˆ˜ํ•ด์ฃผ์„ธ์š”.
@@ -0,0 +1,24 @@ +package develop.baminchan.controller; + +public class Message { + public static final int OK = 200; + public static final int BAD_REQUEST = 400; + public static final int NOT_FOUND = 404; + public static final int INTERNAL_SERVER_ERROR = 500; + + private int statusCode; + private Obj...
Java
`enum` ์œผ๋กœ ๊ด€๋ฆฌํ•ด๋ณด์‹œ๋ฉด ์–ด๋–จ๊นŒ์š”?
@@ -0,0 +1,78 @@ +package develop.baminchan.dto; + +import com.fasterxml.jackson.annotation.JsonInclude; +import develop.baminchan.entity.Banchan; + +import java.util.Set; + +import static develop.baminchan.dto.util.StringConvertor.convertToSet; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public class BanchanDto { +...
Java
`@JsonProperty` ๋ฅผ ํ†ตํ•ด JSON field์˜ ์ด๋ฆ„ ์ •ํ•ด์ฃผ์‹œ๋ฉด ๋  ๊ฒƒ ๊ฐ™์•„์š”. ์–ธ๋”์Šค์ฝ”์–ด๋Š” ์ž๋ฐ” ์ฝ”๋“œ์— ์—†์—ˆ์œผ๋ฉด ํ•ฉ๋‹ˆ๋‹ค.
@@ -0,0 +1,78 @@ +package develop.baminchan.dto; + +import com.fasterxml.jackson.annotation.JsonInclude; +import develop.baminchan.entity.Banchan; + +import java.util.Set; + +import static develop.baminchan.dto.util.StringConvertor.convertToSet; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public class BanchanDto { +...
Java
`private` ์œผ๋กœ ๊ฐ€๋ ค๋†จ์œผ๋ฏ€๋กœ ๋ชจ๋“  ํ•„๋“œ์— ํ•ด๋‹นํ•˜๋Š” ํŒŒ๋ผ๋ฉ”ํ„ฐ๋ฅผ ๋‹ค ์„ ์–ธํ•ด์ฃผ์…”๋„ ๋ฉ๋‹ˆ๋‹ค. ๋˜ ๊ทธ๋ ‡๊ฒŒ ํ•ด์•ผ ์ถ”ํ›„ ํ™•์žฅ์„ฑ ์ธก๋ฉด์—์„œ๋„ ์ข‹์„ ๊ฑฐ๋ผ ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค. `Banchan` ์„ ๋ฐ›์•„์„œ ํ•˜๋‚˜์”ฉ ์ •๋ณด๋ฅผ ๊บผ๋‚ด๋Š” ์ฑ…์ž„์€ `.of()` ์—๊ฒŒ ๋งก๊ธฐ๊ณ  ์ƒ์„ฑ์ž์—์„  ๋‹จ์ˆœ ๊ฐ’ ํ• ๋‹น์— ์ง‘์ค‘ํ•˜๋ฉด ์–ด๋–จ๊นŒ์š”.
@@ -0,0 +1,45 @@ +package develop.baminchan.dto; + +import develop.baminchan.entity.Category; +import org.springframework.data.annotation.Id; + +import java.util.ArrayList; +import java.util.List; + +public class CategoryDto { + @Id + private int id; + + private String category_id; + private String name; + ...
Java
DTO์ธ๋ฐ `@Id`.... ๊ดœ์ฐฎ์„๊นŒ์š”?
@@ -0,0 +1,20 @@ +package develop.baminchan.dto.util; + +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +public class StringConvertor { + private StringConvertor() { + } + + public static Set<String> convertToSet(String column) { + if (column == null) { + return ...
Java
[์ด ๋งํฌ](https://docs.spring.io/spring-data/jdbc/docs/current/reference/html/#jdbc.custom-converters) ๋ฅผ ์ฐธ๊ณ ํ•ด์ฃผ์‹œ๊ณ  ํ‘œ์ค€ ์ŠคํŽ™์— ๋งž๋Š” ํด๋ž˜์Šค๋กœ ์ „ํ™˜์„ ๋ถ€ํƒ๋“œ๋ฆด๊ฒŒ์š”.
@@ -0,0 +1,35 @@ +package develop.baminchan.entity; + +import org.springframework.data.annotation.Id; + +public class Order { + @Id + private Long id; + + private String client_id; + private String detail_hash; + private int quantity; + + public Order(Long id, String client_id, String detail_hash, int...
Java
๊ตณ์ด ์•ฝ์–ด๋ฅผ ์‚ฌ์šฉํ•˜์‹ค ํ•„์š”๋Š” ์—†์–ด ๋ณด์ด๊ธฐ๋Š” ํ•ฉ๋‹ˆ๋‹ค. ํ…Œ์ด๋ธ” ์ƒ์—๋„ ์ด ์ด๋ฆ„์œผ๋กœ ์นผ๋Ÿผ์ด ๋“ค์–ด๊ฐ€์žˆ๋‚˜์š”? ๊ทธ๋ ‡๋‹ค๋ฉด ํ’€ ๋„ค์ž„์ธ `quantity` ๋กœ์˜ ์ „ํ™˜์„ ์ œ์•ˆ๋“œ๋ฆฝ๋‹ˆ๋‹ค.
@@ -0,0 +1,57 @@ +package develop.baminchan.service; + +import develop.baminchan.dto.BanchanDto; +import develop.baminchan.dto.CategoryDto; +import develop.baminchan.entity.Banchan; +import develop.baminchan.entity.Category; +import develop.baminchan.repository.BanchanRepository; +import develop.baminchan.repository.Ca...
Java
`logger` ์‚ฌ์šฉํ•ด์ฃผ์„ธ์š”.
@@ -0,0 +1,57 @@ +package develop.baminchan.service; + +import develop.baminchan.dto.BanchanDto; +import develop.baminchan.dto.CategoryDto; +import develop.baminchan.entity.Banchan; +import develop.baminchan.entity.Category; +import develop.baminchan.repository.BanchanRepository; +import develop.baminchan.repository.Ca...
Java
`.stream().map()` ์‚ฌ์šฉ์œผ๋กœ ์•ž์„  for loop์ด๋ž‘ ์—ฌ๊ธฐ๊นŒ์ง€ ์—†์•จ ์ˆ˜ ์žˆ์–ด ๋ณด์ž…๋‹ˆ๋‹ค.
@@ -0,0 +1,57 @@ +package develop.baminchan.service; + +import develop.baminchan.dto.BanchanDto; +import develop.baminchan.dto.CategoryDto; +import develop.baminchan.entity.Banchan; +import develop.baminchan.entity.Category; +import develop.baminchan.repository.BanchanRepository; +import develop.baminchan.repository.Ca...
Java
์—ฌ๊ธฐ๋„ `.stream().map()` ์œผ๋กœ ๋ฐ”๊ฟ€ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
@@ -0,0 +1,20 @@ +package develop.baminchan.dto.util; + +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +public class StringConvertor { + private StringConvertor() { + } + + public static Set<String> convertToSet(String column) { + if (column == null) { + return ...
Java
๋ฐ์ดํ„ฐ ๋ณ€ํ™˜์„ ์œ„ํ•œ ์ปจ๋ฒ„ํ„ฐ์— ๋Œ€ํ•œ ํ‘œ์ค€ ์ŠคํŽ™์ด ์žˆ์—ˆ๊ตฐ์š”..์Šคํ”„๋ง ๋ฌธ์„œ ์ „์ฒด์ ์œผ๋กœ ๊ผญ ํ•œ๋ฒˆ ์ฝ์–ด๋ด์•ผ๊ฒ ๋„ค์š”. ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.
@@ -0,0 +1,94 @@ +package develop.baminchan.entity; + +import develop.baminchan.entity.banchan.BanchanDetail; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Embedded; + +public class Banchan { + @Id + private Long id; + + private String detail_hash; + ...
Java
๋‹ค๋ฅธ ๋ฆฌ๋ทฐ์—์„œ ์ด๋Ÿฐ ๋ฅ˜์˜ ์ƒ์„ฑ์ž๋ฅผ ๊ต‰์žฅํžˆ ์‹ซ์–ดํ•˜์‹ ๋‹ค๊ณ  ํ–ˆ์—ˆ๋Š”๋ฐ ์—ฌ๊ธฐ๋„ ๋˜‘๊ฐ™์€ ๋ถ€๋ถ„ ๋งž๋‚˜์š”?
@@ -0,0 +1,80 @@ +import React from 'react'; +import Comment from './Comment'; +import './CommentList.scss'; + +class CommentList extends React.Component { + constructor(props) { + super(props); + this.state = { + commentInput: '', + newComment: [], + nickname: '', + commentList: [], + c...
JavaScript
๋น„๊ตฌ์กฐํ™” ํ• ๋‹น์„ ์ ์šฉํ•˜๋ฉด ๋” ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.
@@ -0,0 +1,23 @@ +import React from 'react'; +import './Comment.scss'; + +class NewComment extends React.Component { + render() { + // const newArray = this.props.newComment.map((commentarray, index) => ( + // <li key={index}> + // <span className="newCommentid">{this.props.nickname}</span> + // ...
JavaScript
- state ๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š”๋‹ค๋ฉด, constructor ์˜ ์„ ์–ธ์ด ํ•„์š” ์—†์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,15 @@ +.comment { + .newComment { + margin-bottom: 5px; + } + + .newCommentid { + font-weight: bold; + margin-bottom: 0; + } + + .newComments { + font-weight: normal; + margin-left: 5px; + } +}
Unknown
- `.comment` ์•„๋ž˜๋กœ ๋„ค์ŠคํŒ… ํ•ด์ฃผ์„ธ์š”!
@@ -0,0 +1,80 @@ +import React from 'react'; +import Comment from './Comment'; +import './CommentList.scss'; + +class CommentList extends React.Component { + constructor(props) { + super(props); + this.state = { + commentInput: '', + newComment: [], + nickname: '', + commentList: [], + c...
JavaScript
- ๊ตฌ์กฐ ๋ถ„ํ•ด ํ• ๋‹น ํ•ด์ฃผ์„ธ์š”! ```suggestion inputToComment = () => { const { comment, commentInput } = this.state; this.setState({ id: 'wecode_bootcamp', comment: comment.concat(commentInput), }); }; ```
@@ -0,0 +1,23 @@ +import React from 'react'; +import './Comment.scss'; + +class NewComment extends React.Component { + render() { + // const newArray = this.props.newComment.map((commentarray, index) => ( + // <li key={index}> + // <span className="newCommentid">{this.props.nickname}</span> + // ...
JavaScript
- ์ปดํฌ๋„ŒํŠธ์™€ ๋™์ผํ•˜๊ฒŒ ํด๋ž˜์Šค๋„ค์ž„ ์ง€์–ด์ฃผ์‹œ๊ณ , ์ฒซ๊ธ€์ž๋ฅผ ๋Œ€๋ฌธ์ž๋กœ ์ž‘์„ฑํ•˜๋Š” ์ปจ๋ฒค์…˜์€ ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋„ค์ด๋ฐ ํ•˜๊ธฐ ์œ„ํ•œ ์ปจ๋ฒค์…˜ ์ž…๋‹ˆ๋‹ค! ```suggestion <div className="comment"> ```
@@ -0,0 +1,80 @@ +import React from 'react'; +import Comment from './Comment'; +import './CommentList.scss'; + +class CommentList extends React.Component { + constructor(props) { + super(props); + this.state = { + commentInput: '', + newComment: [], + nickname: '', + commentList: [], + c...
JavaScript
- id ๋ผ๋Š” ๊ฐ’์€ ๋ฌด์Šจ ์šฉ๋„๋ฅผ ์œ„ํ•ด ์ž‘์„ฑํ•ด ์ฃผ์‹  ๊ฑธ๊นŒ์š”? id ๋Š” ๊ผญ ํ•„์š”ํ•œ ๋ถ€๋ถ„์ด ์•„๋‹ˆ๋ผ๋ฉด ์‚ฌ์šฉ์„ ์ง€์–‘ํ•ด์ฃผ์„ธ์š”! id ๊ฐ’์€ ํ”„๋กœ์ ํŠธ ๋‚ด์—์„œ ์œ ์ผํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. - id ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ๋Š” ์˜ˆ๋ฅผ ๋“ค์–ด, google map api ๋ฅผ ์‚ฌ์šฉํ•ด์„œ ์ง€๋„๋ฅผ ๊ทธ๋ฆด๋•Œ, ์ง€๋„๋ฅผ ๊ทธ๋ฆด html element ๋ฅผ ํŠน์ •ํ•  ๋•Œ ์‚ฌ์šฉ๋˜๊ณค ํ•ฉ๋‹ˆ๋‹ค.
@@ -0,0 +1,80 @@ +import React from 'react'; +import Comment from './Comment'; +import './CommentList.scss'; + +class CommentList extends React.Component { + constructor(props) { + super(props); + this.state = { + commentInput: '', + newComment: [], + nickname: '', + commentList: [], + c...
JavaScript
- ์—ฌ๊ธฐ๋„ id ๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š”๋ฐ ๋ถˆํ•„์š”ํ•˜๊ฒŒ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค! ์ง€์›Œ์ฃผ์„ธ์š”~
@@ -1,13 +1,92 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; class LoginAh extends React.Component { + constructor(props) { + super(props); + this.state = { + idInput: '', + pwInput: '', + }; + } + + loginTest = () => { + fetch('users/...
JavaScript
- constructor ์„ ์–ธ์„ ๊ฐ€์žฅ ์œ„์— ์œ„์น˜์‹œ์ผœ์ฃผ์„ธ์š”!
@@ -1,13 +1,92 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; class LoginAh extends React.Component { + constructor(props) { + super(props); + this.state = { + idInput: '', + pwInput: '', + }; + } + + loginTest = () => { + fetch('users/...
JavaScript
- defaultColor ์™€ disabled ๋Š” state ๋กœ ๊ด€๋ฆฌํ•˜๊ธฐ์—๋Š” ๋ถ€์ ์ ˆํ•œ ๊ฐ’ ๊ฐ™์Šต๋‹ˆ๋‹ค. idInput ๊ณผ pwInput ๋ฅผ ์‚ฌ์šฉํ•ด์„œ ๊ณ„์‚ฐํ•  ์ˆ˜ ์žˆ๋Š” ๊ฐ’์ด๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค! - ์–ด๋–ค ๊ธฐ์ค€์œผ๋กœ state ๋ฅผ ๋งŒ๋“ค์–ด์•ผ ํ•˜๋Š”์ง€์— ๋Œ€ํ•ด์„œ๋Š” ์•„๋ž˜ ๋ฌธ์„œ๋ฅผ ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์š”! - https://ko.reactjs.org/docs/thinking-in-react.html#step-3-identify-the-minimal-but-complete-representation-of-ui-state - state ๋กœ ๊ด€๋ฆฌํ•  ํ•„์š”๊ฐ€ ์—†๋Š” ๊ฐ’๋“ค์€ state ๋ฅผ ๋งŒ๋“ค์ง€ ์•Š๋„๋ก ํ•ด์ฃผ์„ธ์š”. ...
@@ -1,13 +1,92 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; class LoginAh extends React.Component { + constructor(props) { + super(props); + this.state = { + idInput: '', + pwInput: '', + }; + } + + loginTest = () => { + fetch('users/...
JavaScript
- ๊ตฌ์กฐ ๋ถ„ํ•ด ํ• ๋‹น ํ™œ์šฉํ•ด ์ฃผ์‹œ๋ฉด ๋” ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค! ```suggestion const { name, value } = event.target; this.setState({ [name]: value, }); ```
@@ -1,13 +1,92 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; class LoginAh extends React.Component { + constructor(props) { + super(props); + this.state = { + idInput: '', + pwInput: '', + }; + } + + loginTest = () => { + fetch('users/...
JavaScript
- defaultColor ์™€ disabled ๋ฅผ state ์—์„œ ๊ด€๋ฆฌํ•˜์ง€ ์•Š๋„๋ก ํ•œ๋‹ค๋ฉด, ์ด ๋กœ์ง ๋ถ€๋ถ„์€ ๋” ์ด์ƒ ํ•„์š” ์—†์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.
@@ -1,13 +1,92 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; class LoginAh extends React.Component { + constructor(props) { + super(props); + this.state = { + idInput: '', + pwInput: '', + }; + } + + loginTest = () => { + fetch('users/...
JavaScript
- idInput ๊ณผ pwInput ์„ ์‚ฌ์šฉํ•ด์„œ ๋ฐ”๋กœ ๊ฐ’์„ ๊ณ„์‚ฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ฝ”๋“œ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์š”! - inline ์Šคํƒ€์ผ๋ง์„ ์ฃผ์‹œ๋Š” ๊ฒƒ์€ ๊ผญ ํ•„์š”ํ•œ ๊ฒฝ์šฐ๊ฐ€ ์•„๋‹ˆ๋ผ๋ฉด ์ง€์–‘ํ•ด์ฃผ์‹œ๊ณ , className ์„ ๋™์ ์œผ๋กœ ๋ถ€์—ฌํ•˜๋Š” ๊ฒƒ์œผ๋กœ ์Šคํƒ€์ผ๋ง ํ•ด์ฃผ์„ธ์š”! - inline ์Šคํƒ€์ผ๋ง์„ ์‚ฌ์šฉํ•˜์‹œ๋Š” ๊ฒฝ์šฐ๋Š”, ์Šฌ๋ผ์ด๋”๋ฅผ ๊ตฌํ˜„๊ณผ ๊ฐ™์ด ์Šคํƒ€์ผ๋ง์ด ๋งค์šฐ ๋งŽ์ด ์ง€์†์ ์œผ๋กœ ๋ณ€ํ•ด์•ผ ํ•˜๋Š” ์ƒํ™ฉ์— ์‚ฌ์šฉํ•ด ์ฃผ์‹œ๋Š” ๊ฒ๋‹ˆ๋‹ค! ```jsx render () { const { idInput, pwInput } = this.state; isButtonActive = id...
@@ -0,0 +1,46 @@ +@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap'); +@import '../../../styles/variable.scss'; + +.Login { + .container { + width: 2000px; + max-width: 100vw; + + .loginContainer { + width: 350px; + height: 400px; + margin: 25vh auto; + border: 2p...
Unknown
- common.scss ์— ์ ํ•ฉํ•˜๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,46 @@ +@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap'); +@import '../../../styles/variable.scss'; + +.Login { + .container { + width: 2000px; + max-width: 100vw; + + .loginContainer { + width: 350px; + height: 400px; + margin: 25vh auto; + border: 2p...
Unknown
- mixin ์€ variable.scss ์™€ ๊ฐ™์€ ๋ณ„๋„์˜ ํŒŒ์ผ์„ ํ•˜๋‚˜ ๋” ๋งŒ๋“ค์–ด์„œ ๊ทธ๊ณณ์—์„œ ์ผ๊ด„์ ์œผ๋กœ ๊ด€๋ฆฌํ•ด์ฃผ์„ธ์š”!
@@ -0,0 +1,46 @@ +@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap'); +@import '../../../styles/variable.scss'; + +.Login { + .container { + width: 2000px; + max-width: 100vw; + + .loginContainer { + width: 350px; + height: 400px; + margin: 25vh auto; + border: 2p...
Unknown
- ์Šคํƒ€์ผ๋ง์„ ๋ถ€์—ฌํ•˜๊ธฐ ์œ„ํ•จ์œผ๋กœ๋Š” className ์œผ๋กœ๋„ ์ถฉ๋ถ„ํ•ฉ๋‹ˆ๋‹ค. id ๋ฅผ ์‚ฌ์šฉํ•˜์‹ค ์ด์œ ๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค.
@@ -1,13 +1,108 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import Nav from '../../../components/Nav/Nav'; +import CommentList from '../Comment/CommentList'; +import './Main.scss'; class MainAh extends React.Component { render() { return ( - <div> - <p>๋ช…์„ฑ</p> +...
JavaScript
- ๋ฐ˜๋ณต์ ์ธ ๊ตฌ์กฐ๊ฐ€ ๋ณด์ด๋„ค์š”! ๊ทธ๋ฆฌ๊ณ  ์‚ฌ์‹ค ์ด ๋ถ€๋ถ„์€ ๋ฐฑ์—”๋“œ์—์„œ ์ •๋ณด๋ฅผ ๋ฐ›์•„์™€์„œ ํ™”๋ฉด์— ๊ทธ๋ฆฌ๋Š” ๊ฒƒ์ด๋ฏ€๋กœ, ๋ชฉ์—… ๋ฐ์ดํ„ฐ๋ฅผ ๊ตฌ์„ฑํ•˜์…”์„œ map ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๊ตฌํ˜„ํ•ด์ฃผ์‹œ๋Š”๊ฒŒ ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -1,13 +1,108 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import Nav from '../../../components/Nav/Nav'; +import CommentList from '../Comment/CommentList'; +import './Main.scss'; class MainAh extends React.Component { render() { return ( - <div> - <p>๋ช…์„ฑ</p> +...
JavaScript
- ์—ฌ๊ธฐ๋„ ์œ„์™€ ๋™์ผํ•ฉ๋‹ˆ๋‹ค!
@@ -0,0 +1,201 @@ +body { + margin: 0; +} +@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap'); + +.MainAh { + .mainContainer { + display: flex; + position: relative; + justify-content: center; + width: 2000px; + max-width: 100vw; + height: 2000px; + background-color: #fa...
Unknown
- reset.scss ์— ์ ํ•ฉํ•ด ๋ณด์ด๋„ค์š”!
@@ -0,0 +1,80 @@ +import React from 'react'; +import Comment from './Comment'; +import './CommentList.scss'; + +class CommentList extends React.Component { + constructor(props) { + super(props); + this.state = { + commentInput: '', + newComment: [], + nickname: '', + commentList: [], + c...
JavaScript
์ ์šฉ์™„๋ฃŒ~! ๋‹ค์Šฌ๋‹˜ ์ตœ๊ณ !
@@ -0,0 +1,23 @@ +import React from 'react'; +import './Comment.scss'; + +class NewComment extends React.Component { + render() { + // const newArray = this.props.newComment.map((commentarray, index) => ( + // <li key={index}> + // <span className="newCommentid">{this.props.nickname}</span> + // ...
JavaScript
์ง€์› ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,15 @@ +.comment { + .newComment { + margin-bottom: 5px; + } + + .newCommentid { + font-weight: bold; + margin-bottom: 0; + } + + .newComments { + font-weight: normal; + margin-left: 5px; + } +}
Unknown
์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,80 @@ +import React from 'react'; +import Comment from './Comment'; +import './CommentList.scss'; + +class CommentList extends React.Component { + constructor(props) { + super(props); + this.state = { + commentInput: '', + newComment: [], + nickname: '', + commentList: [], + c...
JavaScript
์ ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ตฌ์กฐ ๋ถ„ํ•ด ํ• ๋‹น์ด ์ต์ˆ™ํ•˜์ง€์•Š์•„ ์จ์•ผํ•  ๊ณณ์„ ์ž˜ ๊ตฌ๋ถ„ํ•˜์ง€ ๋ชปํ•˜๋Š”๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.. ใ… 
@@ -0,0 +1,23 @@ +import React from 'react'; +import './Comment.scss'; + +class NewComment extends React.Component { + render() { + // const newArray = this.props.newComment.map((commentarray, index) => ( + // <li key={index}> + // <span className="newCommentid">{this.props.nickname}</span> + // ...
JavaScript
์•„ ์ด๋Ÿฐ ์‹ค์ˆ˜๋ฅผ ... ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,80 @@ +import React from 'react'; +import Comment from './Comment'; +import './CommentList.scss'; + +class CommentList extends React.Component { + constructor(props) { + super(props); + this.state = { + commentInput: '', + newComment: [], + nickname: '', + commentList: [], + c...
JavaScript
์œ„์—์„œ ๋ฐ›์•„์˜จ 'wecode-bootcamp' ๋ผ๋Š” id ๊ฐ’์„ ๋ฐ›์•„์˜ค๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉํ–ˆ๋Š”๋ฐ, ํ™•์‹คํžˆ id ๋ผ๋Š”๊ฒƒ์€ ์ ์ ˆ์น˜ ์•Š์•„ nickname ์œผ๋กœ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,80 @@ +import React from 'react'; +import Comment from './Comment'; +import './CommentList.scss'; + +class CommentList extends React.Component { + constructor(props) { + super(props); + this.state = { + commentInput: '', + newComment: [], + nickname: '', + commentList: [], + c...
JavaScript
์ง€์› ์Šต๋‹ˆ๋‹ค!
@@ -1,13 +1,92 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; class LoginAh extends React.Component { + constructor(props) { + super(props); + this.state = { + idInput: '', + pwInput: '', + }; + } + + loginTest = () => { + fetch('users/...
JavaScript
์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -1,13 +1,92 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; class LoginAh extends React.Component { + constructor(props) { + super(props); + this.state = { + idInput: '', + pwInput: '', + }; + } + + loginTest = () => { + fetch('users/...
JavaScript
defaultColor๋Š” ์•„์˜ˆ ์ง€์šฐ๊ณ  ์‚ผํ•ญ์—ฐ์‚ฐ์ž๋ฅผ ์ด์šฉํ•œ ํ•ด๊ฒฐ๋ฐฉ๋ฒ•์„ ๋ฐ‘์— ์ฃผ์…”์„œ ๊ทธ๊ฑฐ๋กœ ์ƒ‰์ƒ ๋ณ€ํ™˜๊นŒ์ง€ ์ ์šฉํ•˜์˜€์Šต๋‹ˆ๋‹ค. ์ƒํƒœ๊ฐ€ ๋ณ€ํ•œ๋‹ค๊ณ  ์ƒ๊ฐ๋˜๋Š”๊ฒƒ์€ ์ž๊พธ state๋ฅผ ์ด์šฉํ•˜๊ฒŒ ๋˜๋Š”๊ฑฐ ๊ฐ™์•„ ๋” ๊ณต๋ถ€ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.
@@ -1,13 +1,92 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; class LoginAh extends React.Component { + constructor(props) { + super(props); + this.state = { + idInput: '', + pwInput: '', + }; + } + + loginTest = () => { + fetch('users/...
JavaScript
์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -1,13 +1,92 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; class LoginAh extends React.Component { + constructor(props) { + super(props); + this.state = { + idInput: '', + pwInput: '', + }; + } + + loginTest = () => { + fetch('users/...
JavaScript
ํ•˜๋‹จ์— ์ฃผ์‹  ํ•ด๊ฒฐ๋ฒ•์œผ๋กœ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -1,13 +1,92 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; class LoginAh extends React.Component { + constructor(props) { + super(props); + this.state = { + idInput: '', + pwInput: '', + }; + } + + loginTest = () => { + fetch('users/...
JavaScript
์ •๋ง ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ๋ฌด์กฐ๊ฑด constructor ๋‹จ์—์„œ ๋ณ€ํ™”์‹œํ‚ค๋Š” ์ค„ ์•Œ๊ณ  ๊ทธ๊ณณ์—์„œ๋งŒ ํ•ด๊ฒฐํ•˜๋ ค๊ณ  ํ–ˆ๋Š”๋ฐ render์—์„œ ๋ณ€๊ฒฝํ•˜๋ฉด ๋” ๊ฐ„๋‹จํ•˜๊ฒŒ ๋˜๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. inline ์Šคํƒ€์ผ๋ง ์ง€์–‘ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค!!!
@@ -0,0 +1,106 @@ +package nextstep.security.authorization.hierarchy; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; + +import java.util.Collection; +import java.util.Set; + +import static org.assertj.core....
Java
๊ผผ๊ผผํ•œ ํ…Œ์ŠคํŠธ ์ฝ”๋“œ ๐Ÿ‘
@@ -1,20 +1,22 @@ package nextstep.security.authorization; import nextstep.security.authentication.Authentication; +import nextstep.security.authorization.hierarchy.RoleHierarchy; import java.util.Set; public class AuthorityAuthorizationManager<T> implements AuthorizationManager<T> { - private final Author...
Java
Spring Security์˜ AuthoritiesAuthorizationManager๋Š” String... authorities๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋‹ค์ค‘ ๊ถŒํ•œ์„ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ๋„๋ก ์„ค๊ณ„๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๊ฐ€๋ณ€์ธ์ž ํ™œ์šฉ์„ ํ†ตํ•ด AuthorityAuthorizationManager๊ฐ€ ๋” ์œ ์—ฐํ•˜๊ฒŒ ๋™์ž‘ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•ด๋ณด๋ฉด ์–ด๋–จ๊นŒ์š”? ๐Ÿ˜„ ```suggestion public AuthorityAuthorizationManager(RoleHierarchy roleHierarchy, String... authorities) { ```
@@ -0,0 +1,126 @@ +package nextstep.security.authorization.hierarchy; + +import org.springframework.util.Assert; + +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Queue; +import ...
Java
๋‹ค์Œ๊ณผ ๊ฐ™์ด ํ•ด๋ณผ ์ˆ˜๋„ ์žˆ๊ฒ ๋„ค์š” ๐Ÿ˜„ ```suggestion Set<String> childRoles = Set.of(impliedRoles); ```
@@ -0,0 +1,126 @@ +package nextstep.security.authorization.hierarchy; + +import org.springframework.util.Assert; + +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Queue; +import ...
Java
์ˆœํ™˜ ์ฐธ์กฐ๊ฐ€ ์ผ์–ด๋‚  ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™์•„์š” ์—ญํ•  ๊ณ„์ธต์„ ์„ค์ •ํ•  ๋•Œ ์ˆœํ™˜ ์ฐธ์กฐ(์‚ฌ์ดํด)์— ๋Œ€ํ•œ ์˜ˆ์™ธ์ฒ˜๋ฆฌ๋ฅผ ํ•ด๋ณด๋Š”๊ฑด ์–ด๋–จ๊นŒ์š”? ๐Ÿ˜„
@@ -0,0 +1,126 @@ +package nextstep.security.authorization.hierarchy; + +import org.springframework.util.Assert; + +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Queue; +import ...
Java
Spring Security๋Š” ์„ฑ๋Šฅ ์ตœ์ ํ™”๋ฅผ ์ค‘์š”ํ•˜๊ฒŒ ์ƒ๊ฐํ•˜๋Š”๋ฐ์š”, ArrayDeque ์‚ฌ์šฉ์„ ํ†ตํ•ด ์„ฑ๋Šฅ์„ ํ–ฅ์ƒ ์‹œ์ผœ๋ด๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค ๐Ÿ˜„ ```suggestion Queue<String> queue = new ArrayDeque<>(authorities); ```
@@ -1,20 +1,22 @@ package nextstep.security.authorization; import nextstep.security.authentication.Authentication; +import nextstep.security.authorization.hierarchy.RoleHierarchy; import java.util.Set; public class AuthorityAuthorizationManager<T> implements AuthorizationManager<T> { - private final Author...
Java
Set ์œผ๋กœ ์ค‘๋ณต์„ ์ œ๊ฑฐํ•ด ์ฃผ์…จ๊ตฐ์š” ๐Ÿ‘
@@ -0,0 +1,15 @@ +{ + "arrowParens": "always", + "bracketSpacing": true, + "jsxBracketSameLine": false, + "jsxSingleQuote": false, + "printWidth": 80, + "proseWrap": "always", + "quoteProps": "as-needed", + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "es5", + "useTabs": false, ...
Unknown
EOL์ด ์žˆ๋„ค์š”
@@ -10,7 +10,17 @@ "@babel/core": "^7.23.0", "@babel/preset-env": "^7.22.20", "babel-jest": "^29.7.0", - "jest": "29.6.0" + "eslint": "^8.56.0", + "eslint-config-airbnb": "^19.0.4", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-import": "^2.29.1", + "eslint-plugin-jsx-a11y": "^...
Unknown
์˜ค.. husky๊นŒ์ง€
@@ -0,0 +1,28 @@ +import GameMessage from "./GameMessage.js"; +import { VALID_INPUT_LENGTH } from "./gameConstants.js"; + +class Validator { + static isValidInput(input) { + if (!this.isNumber(input)) + throw new Error(GameMessage.INVALID_INPUT_NOT_A_NUMBER); + if (!this.isValidLength(input)) + throw n...
JavaScript
3์ด๋ผ๋Š” ์ˆซ์ž๋Š” ์–ด๋–ค ์˜๋ฏธ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ์ˆซ์ž ๊ฐ™์€๋ฐ์š”, ์ด๋Ÿฌํ•œ ์ˆซ์ž๊ฐ€ ์ˆซ์ž ๊ทธ๋Œ€๋กœ ์กด์žฌํ•˜๋Š” ๊ฒƒ์„ ํ”ํžˆ ๋งค์ง๋„˜๋ฒ„๋ผ๊ณ  ๋ถ€๋ฆ…๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์ด๋Ÿฌํ•œ ์ˆซ์ž๋Š” ๋‹ค์Œ์˜ ์ด์œ ๋กœ ์ƒ์ˆ˜ํ™” ํ•ด์ฃผ๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค. 1. ์˜ˆ์‹œ๋กœ ์ˆซ์ž์•ผ๊ตฌ ๊ฒŒ์ž„์˜ ์ˆซ์ž๊ฐฏ์ˆ˜๊ฐ€ 4๋กœ ๋Š˜์–ด๋‚ฌ๋‹ค. ๊ทธ๋ ‡๋‹ค๋ฉด ๋ชจ๋“  ํŒŒ์ผ์„ ๋’ค์ ธ์„œ 3์„ 4๋กœ ๊ณ ์ณ์•ผํ•œ๋‹ค. (๋ณ€๊ฒฝ์— ์šฉ์ดํ•˜์ง€ ์•Š๋‹ค.) 2. ์ฒ˜์Œ ์˜จ๋ณด๋”ฉ ํ•˜๋Š” ์‚ฌ๋žŒ์€ ์ด ์ˆซ์ž์˜ ์˜๋ฏธ๋ฅผ ํŒŒ์•…ํ•˜๊ธฐ ํž˜๋“ค๋‹ค. ์ฝ”๋“œ ๊ฐ€๋…์„ฑ์ด ์ค„์–ด๋“ ๋‹ค.
@@ -0,0 +1,28 @@ +import GameMessage from "./GameMessage.js"; +import { VALID_INPUT_LENGTH } from "./gameConstants.js"; + +class Validator { + static isValidInput(input) { + if (!this.isNumber(input)) + throw new Error(GameMessage.INVALID_INPUT_NOT_A_NUMBER); + if (!this.isValidLength(input)) + throw n...
JavaScript
1. ์ฝ”๋“œ๋ฅผ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๊ณ ์น˜๋ฉด ๋” ์ค„์–ด๋“ญ๋‹ˆ๋‹ค ใ…Žใ…Ž ```suggestion const newArr = [...new Set(input)] ``` 2. newArr์ด๋ผ๋Š” ์ƒ์ˆ˜๋ช…์ด ์–ด๋–ค ์˜๋ฏธ๋ฅผ ๋‹ด๊ณ  ์žˆ๋Š” ์ด๋ฆ„์ธ๊ฐ€์š”? ์˜๋ฏธ๊ฐ€ ์—†๊ณ , ๋‹จ๋ฐœ์„ฑ์œผ๋กœ ์‚ฌ์šฉ๋˜๋Š” ์ธก๋ฉด์—์„œ ์ด๋ ‡๊ฒŒ ์ž‘์„ฑํ•ด๋„ ๋  ๊ฒƒ ๊ฐ™์•„์š”. ```js isDuplicate(input) { if ([...new Set(input)].length !== 3) throw new Error(GameMessage.INVALID_INPUT_IS_DUPLICATED) return true; }...
@@ -0,0 +1,28 @@ +import GameMessage from "./GameMessage.js"; +import { VALID_INPUT_LENGTH } from "./gameConstants.js"; + +class Validator { + static isValidInput(input) { + if (!this.isNumber(input)) + throw new Error(GameMessage.INVALID_INPUT_NOT_A_NUMBER); + if (!this.isValidLength(input)) + throw n...
JavaScript
1. ๊ฐœ์ธ์ ์ธ ๊ฒฌํ•ด๋กœ๋Š” ๊ฒ€์ฆํ•จ์ˆ˜์—์„œ๋Š” ํ•ด๋‹น input์ด ์œ ํšจํ•œ์ง€/์•ˆํ•œ์ง€(boolean) ํ‰๊ฐ€ํ•œ ๋‹ค์Œ, ์ด ๊ฒฐ๊ณผ์— ๋”ฐ๋ผ ์—๋Ÿฌ๋ฅผ ๋˜์ ธ์ฃผ๋Š” ํŒจํ„ด์„ ์„ ํ˜ธํ•ฉ๋‹ˆ๋‹ค. ๋‹ค์‹œ ๋งํ•˜๋ฉด ์—๋Ÿฌ๋ฅผ ๋˜์ ธ์ฃผ๋Š” ๋ถ€๋ถ„์„ ์ด ํ•จ์ˆ˜(is..)๋ฅผ ํ˜ธ์ถœํ•˜๋Š” ๋ถ€๋ถ„์œผ๋กœ ๋„˜๊ธฐ๋Š” ๋ฐฉ์‹์œผ๋กœ ํ•˜๊ณคํ•ฉ๋‹ˆ๋‹ค 2. ์ด๊ฒŒ static method๊ฐ€ ์•„๋‹Œ method์ผ ์ด์œ ๊ฐ€ ์žˆ๋‚˜์š”?
@@ -0,0 +1,28 @@ +import GameMessage from "./GameMessage.js"; +import { VALID_INPUT_LENGTH } from "./gameConstants.js"; + +class Validator { + static isValidInput(input) { + if (!this.isNumber(input)) + throw new Error(GameMessage.INVALID_INPUT_NOT_A_NUMBER); + if (!this.isValidLength(input)) + throw n...
JavaScript
ํ•„์š”์—†๋Š” ์ฃผ์„์€ ์ง€์šฐ๋ฉด ์ข‹๊ฒ ์Šต๋‹ˆ๋‹ค !
@@ -0,0 +1,28 @@ +import GameMessage from "./GameMessage.js"; +import { VALID_INPUT_LENGTH } from "./gameConstants.js"; + +class Validator { + static isValidInput(input) { + if (!this.isNumber(input)) + throw new Error(GameMessage.INVALID_INPUT_NOT_A_NUMBER); + if (!this.isValidLength(input)) + throw n...
JavaScript
boolean์„ ๋ฆฌํ„ดํ•  ๋•Œ๋Š” ๋ฉ”์„œ๋“œ์˜ prefix์— is, has๋ฅผ ๋ถ™์—ฌ์ฃผ๋Š” ๊ฒƒ์ด ๊ด€๋ก€์ž…๋‹ˆ๋‹คใ…Ž_ใ…Ž
@@ -0,0 +1,49 @@ +import { Random } from "@woowacourse/mission-utils"; +import { + VALID_INPUT_LENGTH, + MIN_RANDOM_NUMBER, + MAX_RANDOM_NUMBER, +} from "./gameConstants.js"; + +class Computer { + #solution; + + seeSolution() { + return this.#solution; + } + + makeSolution() { + const computer = []; + w...
JavaScript
์–ด๋–ค ๊ตฌ๋ฌธ์—๋Š” ์„ธ๋ฏธ์ฝœ๋ก ์ด ์žˆ๊ณ , ์–ด๋–ค ๊ตฌ๋ฌธ์—๋Š” ์„ธ๋ฏธ์ฝœ๋ก ์ด ์žˆ์ง€ ์•Š๋„ค์š”. ๋‘˜ ์ค‘ ํ•˜๋‚˜๋งŒ ํ•˜์‹œ๋Š” ๊ฑธ ์ถ”์ฒœ๋“œ๋ฆฌ๊ณ , ๊ฐ•์ œํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด prettier๋“ฑ์„ ์ด์šฉํ•ด๋ณด์„ธ์š”.
@@ -0,0 +1,49 @@ +import { Random } from "@woowacourse/mission-utils"; +import { + VALID_INPUT_LENGTH, + MIN_RANDOM_NUMBER, + MAX_RANDOM_NUMBER, +} from "./gameConstants.js"; + +class Computer { + #solution; + + seeSolution() { + return this.#solution; + } + + makeSolution() { + const computer = []; + w...
JavaScript
1. ์ด๋ ‡๊ฒŒ๋„ ๋ฉ๋‹ˆ๋‹ค. ```suggestion const userInput = input.split("").map(Number); ``` 2. ๋ฐฐ์—ด์ด๋ฉด.. s๊ฐ€ ๋ถ™์œผ๋ฉด ์ข‹์ง€ ์•Š์„๊นŒ์š”?
@@ -0,0 +1,49 @@ +import { Random } from "@woowacourse/mission-utils"; +import { + VALID_INPUT_LENGTH, + MIN_RANDOM_NUMBER, + MAX_RANDOM_NUMBER, +} from "./gameConstants.js"; + +class Computer { + #solution; + + seeSolution() { + return this.#solution; + } + + makeSolution() { + const computer = []; + w...
JavaScript
reduce๋ฅผ ์จ์„œ๋„ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ๊ฒ ๋„ค์š” ```js const strikeAndBall = userInput.reduce((acc, cur) => { if ((this.#solution.indexOf(item) === index) && this.#solution.includes(item)) return { ...acc, strike: acc.strike + 1 } if ((this.#solution.indexOf(item) !== index) && this.#solution.includes(item)) return { ...acc, ball:acc.ball...
@@ -0,0 +1,15 @@ +{ + "arrowParens": "always", + "bracketSpacing": true, + "jsxBracketSameLine": false, + "jsxSingleQuote": false, + "printWidth": 80, + "proseWrap": "always", + "quoteProps": "as-needed", + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "es5", + "useTabs": false, ...
Unknown
์ฝ”๋“œ๋ฅผ ๋ณด๋ฉด prettier๊ฐ€ ์ ์šฉ๋˜์–ด์žˆ์ง€ ์•Š์€๋ฐ, ํ™•์ธํ•œ๋ฒˆ ํ•ด๋ณด์„ธ์šฉ
@@ -0,0 +1,49 @@ +import { Random } from "@woowacourse/mission-utils"; +import { + VALID_INPUT_LENGTH, + MIN_RANDOM_NUMBER, + MAX_RANDOM_NUMBER, +} from "./gameConstants.js"; + +class Computer { + #solution; + + seeSolution() { + return this.#solution; + } + + makeSolution() { + const computer = []; + w...
JavaScript
์ด๊ฑธ ๋ฆฌํ„ดํ•˜๋Š” ์ด์œ ๊ฐ€ ๋ญ”๊ฐ€์š” ?
@@ -1,5 +1,62 @@ +import { Console } from "@woowacourse/mission-utils"; +import User from "./User.js"; +import Computer from "./Computer.js"; +import Validator from "./Validator.js"; +import GameMessage from "./GameMessage.js"; +import { RETRY_RESPONSE, FULL_STRIKE } from "./gameConstants.js"; + class App { - async p...
JavaScript
indent๊ฐ€..
@@ -1,5 +1,62 @@ +import { Console } from "@woowacourse/mission-utils"; +import User from "./User.js"; +import Computer from "./Computer.js"; +import Validator from "./Validator.js"; +import GameMessage from "./GameMessage.js"; +import { RETRY_RESPONSE, FULL_STRIKE } from "./gameConstants.js"; + class App { - async p...
JavaScript
๋งค์ง๋„˜๋ฒ„๊ฐ€ ์‚ด์•„์ด์žˆ๋„ค์šฉ
@@ -1,5 +1,62 @@ +import { Console } from "@woowacourse/mission-utils"; +import User from "./User.js"; +import Computer from "./Computer.js"; +import Validator from "./Validator.js"; +import GameMessage from "./GameMessage.js"; +import { RETRY_RESPONSE, FULL_STRIKE } from "./gameConstants.js"; + class App { - async p...
JavaScript
์ด๋ ‡๊ฒŒ eslint ๊ทœ์น™์„ ๋ฌด์‹œํ• ๊ฑฐ๋ฉด eslint๋ฅผ ์™œ ์‚ฌ์šฉํ•˜์‹œ๋‚˜์š”?
@@ -1,20 +1,36 @@ package model; +import java.util.ArrayList; import java.util.List; public class Lotto { - private List<String> lottoNumbers; + private List<LottoNo> lottoNumbers; - public Lotto(List<String> lottoNumbers) { + public Lotto(List<LottoNo> lottoNumbers) { this.lottoNumbers ...
Java
๋กœ๋˜ ๋ฒˆํ˜ธ๋ฅผ Set ์œผ๋กœ ๊ตฌํ˜„ํ•˜๋Š” ๊ฒƒ๊ณผ List ๋กœ ๊ตฌํ˜„ํ•˜๋Š” ๊ฒƒ์„ ๋น„๊ตํ•ด ๋ณด์•˜์„ ๋•Œ ์–ด๋–ค ์žฅ๋‹จ์ ์ด ์žˆ์„๊นŒ์š”? ์—ฌ๊ธฐ์„œ๋Š” ์–ด๋–ค ์ž๋ฃŒ๊ตฌ์กฐ๊ฐ€ ์–ด์šธ๋ฆด๊นŒ์š”?
@@ -1,20 +1,36 @@ package model; +import java.util.ArrayList; import java.util.List; public class Lotto { - private List<String> lottoNumbers; + private List<LottoNo> lottoNumbers; - public Lotto(List<String> lottoNumbers) { + public Lotto(List<LottoNo> lottoNumbers) { this.lottoNumbers ...
Java
ํ•œ์ค„์ด๋”๋ผ๋„ ๊ด„ํ˜ธ๋ฅผ ๋ถ™์—ฌ์ฃผ๋Š”๊ฑธ ์ปจ๋ฒค์…˜์œผ๋กœ ํ•ฉ์‹œ๋‹ค. ์ด๊ฒƒ์ด ๊ฐ„๊ฒฐํ•˜๋”๋ผ๋„ ์ฝ๋Š” ์‚ฌ๋žŒ ์ž…์žฅ์œผ๋กœ ์ฝ”๋“œ๋ฅผ ๋ณด๋ฉด ๋‹น์—ฐํžˆ ์žˆ์–ด์•ผํ•  ๊ณณ์— ๋ฌด์–ธ๊ฐ€๊ฐ€ ๋น ์ง€๊ฒŒ ๋˜๋ฉด ๊ฐ€๋…์„ฑ์ด ์ €ํ•˜๋ฉ๋‹ˆ๋‹ค. (์ฑ… ์ฝ์„ ๋•Œ์™€ ๋น„์Šท) ๊ทธ๋ฆฌ๊ณ  ์ƒ์„ฑ์ž์—์„œ ๋ญ”๊ฐ€ ๋งŽ์€ ์ผ์„ ํ•ด์ฃผ๋Š”๊ฒŒ ์•„์‰ฝ๋„ค์š”
@@ -1,20 +1,36 @@ package model; +import java.util.ArrayList; import java.util.List; public class Lotto { - private List<String> lottoNumbers; + private List<LottoNo> lottoNumbers; - public Lotto(List<String> lottoNumbers) { + public Lotto(List<LottoNo> lottoNumbers) { this.lottoNumbers ...
Java
boolean์„ int ๋กœ ๋ณ€ํ™˜ํ•ด์ฃผ๋Š” ์ด์œ ๋Š” ๋ญ”๊ฐ€์š”?
@@ -1,20 +1,36 @@ package model; +import java.util.ArrayList; import java.util.List; public class Lotto { - private List<String> lottoNumbers; + private List<LottoNo> lottoNumbers; - public Lotto(List<String> lottoNumbers) { + public Lotto(List<LottoNo> lottoNumbers) { this.lottoNumbers ...
Java
์ด ๋ถ€๋ถ„ ์ข€ ๋” ๊ฐœ์„ ํ•ด๋ณด์„ธ์š”
@@ -1,20 +1,36 @@ package model; +import java.util.ArrayList; import java.util.List; public class Lotto { - private List<String> lottoNumbers; + private List<LottoNo> lottoNumbers; - public Lotto(List<String> lottoNumbers) { + public Lotto(List<LottoNo> lottoNumbers) { this.lottoNumbers ...
Java
x ๋ฅผ ์ข€ ๋” ์˜๋ฏธ์žˆ๋Š” ๋ณ€์ˆ˜์ด๋ฆ„์œผ๋กœ ์ง€์—ˆ์œผ๋ฉด ์ข‹์•˜์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋ฉ”์†Œ๋“œ ์ฒด์ด๋‹ ๋ฐฉ์‹์—์„œ๋Š” ๊ธธ์ด๊ฐ€ ๊ธธ์–ด์ง€๋ฉด IDE์—์„œ ํ•œ๋ˆˆ์— ํ™•์ธํ•˜๊ธฐ ํž˜๋“œ๋‹ˆ๊นŒ ๊ฐ€๋…์„ฑ์„ ์œ„ํ•ด ์—”ํ„ฐ๋กœ ๋ผ์ธ์ •๋ฆฌ๋ฅผ ์–ด๋А์ •๋„ ํ•ด์ฃผ๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค. ์ด๋ฅผ ์œ„ํ•œ ์ปจ๋ฒค์…˜๋„ intellij code style ์—์„œ ์ž๋™์ •๋ ฌ ์„ค์ •ํ•  ์ˆ˜ ์žˆ๊ธด ํ•ฉ๋‹ˆ๋‹ค(์ €๋Š” ์‚ฌ์šฉ์ค‘)
@@ -1,10 +1,8 @@ package model; -import util.ListGenerator; import util.SplitGenerator; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -13,43 +11,44 @@ public class LottoMachine { private static int LOTTO_NUMBER_RANGE = 45; private stat...
Java
getter ์™€ ํ—ท๊ฐˆ๋ฆฌ๋ฏ€๋กœ calculateRandomNumbers ์ฒ˜๋Ÿผ ๋‹ค๋ฅธ ๋‹จ์–ด๋ฅผ ํ™œ์šฉํ•ด๋ณด์‹œ๋Š”๊ฑธ ์ถ”์ฒœ