code stringlengths 41 34.3k | lang stringclasses 8
values | review stringlengths 1 4.74k |
|---|---|---|
@@ -0,0 +1,25 @@
+import { DeleteOutlined } from '@ant-design/icons';
+import { useDeleteReviewCycle, useGetReviewCycles } from '@apis/review/useReviewCycles';
+import { message } from 'antd';
+
+function DeleteButton({ entityId }: { entityId: number }) {
+ const { refetchReviewCycle } = useGetReviewCycles();
+ const... | Unknown | ๋ต button์ผ๋ก ๊ฐ์ธ๋๊ฒ ์ข๊ฒ ๊ตฐ์.
> ๋ฐ์ํ์ต๋๋ค! [refactor: ์ญ์ ๋ฒํผ ๊ตฌ์กฐ ๋ณ๊ฒฝ](https://github.com/lemonbase-labs/journee-on-boarding-project/pull/7/commits/2201091e80c11c71bb97c3cf131410067cb04478) |
@@ -0,0 +1,67 @@
+import { Button, Form, Input, Select, Space } from 'antd';
+import { REVIEW_CYCLE_FORM_NAMES, REVIEW_CYCLE_RULES } from './constants';
+import useMembers from '@apis/review/useMembers';
+import { ReviewCycleRequest } from '@apis/review/type';
+import { ReviewCycle } from '@apis/review/entities';
+
+in... | Unknown | ์ํ.. ์ ๋ ์ง๊ด์ ์ด๋ผ๊ณ ์๊ฐํ๋๋ฐ, ์ ์ง๋ณด์ ์ฐจ์์์ ์ด๋ค ์ด๋ ค์์ธ์ง ํน์ ์ด๋ป๊ฒ ๋ถ๋ฆฌ๋์ด์ผ ํ๋์ง ์ข ๋ ์ค๋ช
ํด์ฃผ์ค ์ ์์๊น์?
์ค์ ๋ก ํ์ฌ ๋ ๋ชฌ๋ฒ ์ด์ค ๋ชจ๋ฌ ํ
์ธ useBasicModal๋ ๋น์ทํ ํจํด์ผ๋ก ์ฌ์ฉํ๊ณ ์๋๋ฐ, ์ ๋ ์ ์ง๋ณด์ ์ฐจ์์์ ์ด๋ ค์์ด ์์ด์ ๊ฐ์ ํด์ผ ํ๋ค๊ณ ์๊ฐํ์ง ์์์ด์์! |
@@ -0,0 +1,43 @@
+import { Button } from 'antd';
+import { RoundContent } from 'components/common/RoundContent';
+import useReviewCycleCreateModal from './ReviewCycleModals/useReviewCycleCreateModal';
+import ReviewCycleTable from './ReviewCycleTable';
+import useReviewCycleUpdateModal from './ReviewCycleModals/useRevi... | Unknown | ๋ค!! ๋ฐ์ํ์ต๋๋ค!
[refactor: ์ธ์คํด์ค camelcase๋ก ์์ ](https://github.com/lemonbase-labs/journee-on-boarding-project/pull/7/commits/3a4fecb79aa6c1a53951900d79c308af0a87d940) |
@@ -0,0 +1,90 @@
+import { API_PATH } from '@apis/constants';
+import { useQuery } from '@apis/common/useQuery';
+import { ReviewCycle } from './entities';
+import { ReviewCycleRequest, ReviewCycleResponse } from './type';
+import { useDelete, usePost, usePut } from '@apis/common/useMutation';
+import { get } from 'lod... | TypeScript | ์คํธ ์ธํฐํ์ด์ค ํต์ผ ๋ชฉ์ ! ์ดํดํ์ต๋๋ค~
๊ณ ๋ ๋ค๋ฉด ๊ฐ์ ํ์ผ [L87](https://github.com/lemonbase-labs/journee-on-boarding-project/pull/7/files#diff-3ab91e36eb619267b0f18915f2e642a8452aece2c4e8220b0bce854dc2e8d68eR87)์ `deleteReviewCycle: trigger`๋ ์ ์ฒ๋ฆฌ๊ฐ ๋๋ฝ๋ ๊ฒ ๊ฐ์ ๊ฐ์ด ๋ฐ์ํ๋ฉด ์ข์ ๊ฒ ๊ฐ์์~ |
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | ์ด๋ค TextField์ธ์ง ๋ช
์ ์ํด์ฃผ๊ณ editing์ด ์์๋ textField์๋ ์๋์ผ๋ก ์ ์ฉ๋๋๊ตฌ๋
์ค ์๊ฐ๋ชปํ๋๋ฐ ๋ฐฐ์ ์ต๋๋ค ใ
ใ
๊ฐ์ฌํด์ |
@@ -0,0 +1,205 @@
+//
+// LoginView.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/16.
+//
+
+import UIKit
+
+class LoginView: UIView {
+
+ // MARK: - Object Setting
+
+ private let mainLabel = UILabel().then {
+ $0.text = "TVING ID ๋ก๊ทธ์ธ"
+ $0.font = .tvingMedium(ofSize... | Swift | ๊ฐ๊ฐ ์ข์ฐ๋ฅผ ๊ธฐ์ค์ผ๋ก ํ๋ฉด ๊ธฐ๊ธฐ๋ง๋ค ์ฐจ์ด๊ฐ ์ข ๋ํ๋ ๊ฑฐ ๊ฐ์์!
๊ฐ์ด๋ฐ๋ฅผ ๊ธฐ์ค์ผ๋ก ๋ฌถ์ ์ ์๋ ๋ฐฉ๋ฒ(stackview)๋ ์ข์ ๊ฑฐ๊ฐ์์ ใ
ใ
|
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | UIView๋ฅผ ๋ฐ๋ก ๋นผ๋๊น ํ ์ฝ๋๊ฐ ์งง์์ก๋ค์
์ ๋ ๋ค์์ ์ด๋ฐ์์ผ๋ก ํด๋ด์ผ๊ฒ ์ต๋๋ค ๊ฐ์ฌํฉ๋๋ค ใ
ใ
|
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | targetํจ์ ๋ฐ๋ก ๋บ ๊ฑฐ ์งฑ์ด์์ฌ ๋ฐฐ์๊ฐ๋๋ค |
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | ์ฐ์ ํค๋ณด๋ ์ฒ๋ฆฌ๊น์ง !! ์งฑ์ด๊ตฐ์ฌ |
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | ์ ๊ตฌ์กฐ์ฒด๋ก ๋ฌถ์ด์ฃผ๋ ๊ฑฐ ๊น์ง! |
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | ๊ตฌ์กฐ์ฒด์์ ๋ณ์๋ค์ ""๋ก ์ด๊ธฐํํ๋ ๊ฒ๋ณด๋ค ์ต์
๋ ์ฒ๋ฆฌํด๋๋๊ฒ ์ด๋จ๊น์?
๋์ค์ ๊ตฌ์กฐ์ฒด ๋ณ์์ ๊ฐ์ ๋ฃ๋ค๋ณด๋ฉด, ๋ณ์๊ฐ ์ค์ ๋ก ๊ฐ์ด ์๋ ์ํ์ธ์ง ์๋๋ฉด ์๋์ ์ผ๋ก ๋น ๊ฐ์ผ๋ก ์ด๊ธฐํ๋ ๊ฒ์ธ์ง๋ฅผ
๊ตฌ๋ถํ๊ธฐ ์ด๋ ต๋ค๊ณ ์๊ฐํด์ ์ ๋ ?(์ต์
๋)์ ์ฌ์ฉํด๋ณด๋ฉด ์ข์๊ฒ ๊ฐ์์!
`var id: String?` ์ด๋ฐ ์์ผ๋ก์ |
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | ์ค์ํํธ์์ ์ ๊ทผ ์ ์ด์๋ฅผ ๋ฐ๋ก ์ ์ธํ์ง ์์ผ๋ฉด internal ์ ๊ทผ์ด ๊ธฐ๋ณธ์ด๋ผ๊ณ ํด์!
open-> public -> internal -> file-private -> private ์ผ๋ก ๊ฐ ์๋ก ์ ํ์ ์ธ ์ ๊ทผ์์ธ๋ฐ
์๋ก ๋ค๋ฅธ ๋ชจ๋๋ผ๋ฆฌ ์ ๊ทผํ๋ ์ํฉ์ด ์๋๋ผ๋ฉด
๊ตณ์ด public์ ์ ์ธํ์ฌ ์ ๊ทผ ์์ค์ ์ฝํ๊ฒ ํ ํ์ ์๋ค๊ณ ์๊ฐํ๋๋ฐ ์ด๋ป๊ฒ ์๊ฐํ์ธ์ฉ?
https://zeddios.tistory.com/383 |
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | public์ด ์๋ก ๋ค๋ฅธ ๋ชจ๋์์๋ ์ ๊ทผํ ์ ์๋๋กํ๋ ์ ๊ทผ ์ ์ด๋ผ๊ณ ํ๋ค์.
๋ชจ๋์ด ์์ํด์ ์ฐพ์๋ณด๋ "Xcode์ ๊ฐ ๋น๋ ๋์"์ ๋ชจ๋์ด๋ผ๊ณ ํ๋๋ผ๊ณ ์. ํ๋ก์ ํธ ํ์ผ์ด๋ผ๊ณ ์ ๋ ์ดํดํ์ด์! |
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | ?? ๋ฐฉ์์ผ๋ก ์ต์
๋ ์ธ๋ฉํํ๋๊ฒ๋ ์ข์ง๋ง!
๊ฐ๋
์ฑ์ ์ํด if let ์ด๋ guard let์ ์ฐ๋ฉด ๋ ์ข์๊ฒ ๊ฐ์์~ |
@@ -0,0 +1,205 @@
+//
+// LoginView.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/16.
+//
+
+import UIKit
+
+class LoginView: UIView {
+
+ // MARK: - Object Setting
+
+ private let mainLabel = UILabel().then {
+ $0.text = "TVING ID ๋ก๊ทธ์ธ"
+ $0.font = .tvingMedium(ofSize... | Swift | ๋ฒํผ ์ปดํฌ๋ํธ๋ค์๋ง lazy๋ฅผ ๋ฃ์ด์ฃผ์
จ๋๋ฐ addTarget์์ (๋
ธ๋์)์๋์ ํผํ๊ธฐ ์ํด์ ๋ฃ์๊ฑฐ์ฃ ..?
๋ฒํผ ์ด๋ฒคํธ ์ฐ๊ฒฐ ๋ฐฉ์์ค์ addTarget ๋ฐฉ์ ์ธ์๋ addAction ๋ฐฉ์๋ ์์ด์!
addAction ๋ฐฉ์์ ์ฌ์ฉํ๋ฉด ๋ฒํผ ์ด๋ฒคํธ ์ฐ๊ฒฐ ํจ์์ @objc๋ ๋ถ์ด์ง ์์๋ ๋๊ณ , ์๋์ ํผํ๊ธฐ ์ํ lazy๋ ์์จ๋ ๋ฉ๋๋ค!
๊ฐ๋
์ฑ ์ธก๋ฉด์ด๋, ์ต๋ํ objc ์์๋ฅผ ์ ์ธํ๊ณ UIKit ํต์ผ์ฑ์ ์ํด addAction ๋ฐฉ์๋ ์๊ณ ์์ผ๋ฉด ์ข์๊ฒ ๊ฐ์์!
์๋๋ addAction ๋ฐฉ์์ผ๋ก ๋ฒํผ ์ด๋ฒคํธ ์ฐ๊ฒฐํ ์์ ์ฝ๋์์!
priva... |
@@ -0,0 +1,205 @@
+//
+// LoginView.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/16.
+//
+
+import UIKit
+
+class LoginView: UIView {
+
+ // MARK: - Object Setting
+
+ private let mainLabel = UILabel().then {
+ $0.text = "TVING ID ๋ก๊ทธ์ธ"
+ $0.font = .tvingMedium(ofSize... | Swift | ์ด๊ฑด ์ ๊ฐ ์์ฃผ ์ฌ์ฉํ๋ ๋ฐฉ์์ธ๋ฐ
addSubviews ํ ๋ ๊ฐ๋ก๋ก ๊ธธ๊ฒ ์ฐ๋๊ฒ ๋ณด๋ค ์๋ ์ฝ๋์ฒ๋ผ ์ธ๋ก๋ก ๋๋ฆฌ๋๊ฒ ๊ฐ๋
์ฑ์ ์ข๋๋ผ๊ณ ์.
๋ฌผ๋ก ์ฝ๋ ์ค์ ๋์ด๋์ง๋ง์! ๊ฐ์ ์ ํธํ๋ ์คํ์ผ์ด ์๋๊ฒ ๊ฐ์๋ฐ ์กฐ์ฌ์ค๋ .. ์ ์ํด๋ด
๋๋ค ใ
ใ
view.addSubviews(toolBarView,
titleLabelStackView,
houseImageView,
homeGroupLabel,
... |
@@ -0,0 +1,45 @@
+//
+// WelcomeViewController.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/12.
+//
+
+import UIKit
+
+final class WelcomeViewController: BaseViewController {
+
+ // MARK: - Property
+
+ private let mainView = WelcomeView()
+
+ // MARK: - Target
+
+ priva... | Swift | ์ ๊ฐ ์ต๊ทผ์ ์๊ฐ ์์ด ๋ฒํผ ์ด๋ฒคํธ ์ฐ๊ฒฐ ํจ์ ํธ์ถ์ viewWillAppear ์ชฝ์์ ํ๋ค๊ฐ... ๋ฌธ์ ๊ฐ ์๊ฒผ๋๋ฐ
viewDidLoad์ ๋๋ฌด ์ ํด๋์
จ๋ค์ ^~^ |
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | ๋ ์ด์ ์์๋์ง ์๋ ํด๋์ค๋ผ๋ฉด final ํค์๋ ๋ถ์ด๋ฉด ์ข์๊ฒ ๊ฐ์์! |
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | ์ฌ๊ธฐ์ didSet์ ์ฌ์ฉํด์ ์ฝ๋๋ฅผ ์์ฑํ๋ฉด ์ข์๊ฑฐ ๊ฐ์์ฉ ์๋ ๋์ถฉ ์์๋ฅผ ์ ์๋๋ฐ ์ ์์ ๋ didSet์ ์ ํ์ฉํ์ง ๋ชปํด์
@meltsplit @seungchan2 ํ์ธ ๋ถํ๋๋ฆฝ๋๋ค
```Swift
public var nickName: String = โ" {
didSet {
guard let nickName = nickNameBottomSheet.nickNameTextFeild.text else { return }
self.nickName = nickName
}
... |
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | ์ต์
๋ ์ฒ๋ฆฌ์ ๋ํด ๊ณต๋ถํ๋๊ฑด ๋ถ๋ช
๋์ค์ ์ข์ ์์ฐ์ด ๋ ๊ฑฐ์์ฌ! |
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | ๋ฒํผ ํ์ฑํ์ ์ ๊ท์์ ๋ง๋์ง ํ์ธํ๋ ๋ถ๋ถ์ ๋๋ ์ฃผ๋ฉด ๋ ์ข์๊ฑฐ ๊ฐ์์
๋ฒํผ ํ์ฑํ๋ -> textFeild์ ๊ธ์ด ์ฐจ ์์ ๊ฒฝ์ฐ -> textFeildDidChange๋ฅผ ์ฌ์ฉํ๋ฉด ์ข์๊ฑฐ ๊ฐ๊ณ
์ ๊ท์ ํ์ธ -> ๋ฒํผ์ ๋๋ ์ ๋ -> ๋ฒํผ์ addTarget์ ํด์ ํ์ธํด์ฃผ๋ toastMessage๋ print๋ฌธ์ ์ฐ์ด์ฃผ๋๊ฒ ์ข์๊ฑฐ ๊ฐ์ต๋๋ค~ |
@@ -0,0 +1,119 @@
+//
+// AddNickNameBottomSheetUIView.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/15.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+final class AddNickNameBottomSheetUIView: UIView {
+
+ let bottomSheetHeight = UIScreen.main.bounds.height / 2
+
+ let ... | Swift | ์ ๊ทผ ์ ์ด์๋ฅผ ํ์ฉํ ๋๋ ๋ด๊ฐ ํด๋น ๋ด์ฉ์(? ๋ช
์นญ์ด ์ ๋งคํจ) ์ฌ์ฉํ ์ต์ํ์ ๋ฒ์๋ก ์ฌ์ฉํ๋๊ฒ ์ข์์! ๋ง์ฝ ํด๋น ํ์ผ์์๋ง ์ฌ์ฉํ component๋ผ๋ฉด private์ผ๋ก ๋ฐ๊พธ๋๊ฒ๋ ์ข๊ฒ ์ฃ ? |
@@ -0,0 +1,205 @@
+//
+// LoginView.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/16.
+//
+
+import UIKit
+
+class LoginView: UIView {
+
+ // MARK: - Object Setting
+
+ private let mainLabel = UILabel().then {
+ $0.text = "TVING ID ๋ก๊ทธ์ธ"
+ $0.font = .tvingMedium(ofSize... | Swift | ์ด์ฉ์ง ๋ ์ด์์ ์ก์ผ๋ฉด์๋ ์ด๊ฒ ๋ง๋.. ์ถ์์ด๋ฏธ๋ค
์คํ๋ทฐ๋ก ๋ค์ ์ง๋ดค์ด์!!!!!! |
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | bottomSheet ๋๋ฌธ์ ์ด์ฉ๋ค๋ณด๋..
์ฅ๋จ์ ์ด ์๋ ๊ฒ ๊ฐ์์!!! ์ฝ๋๋ ์ง์ง ๊ฐ๊ฒฐํด์ก์ฃต |
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | bottomSheet๋ฅผ ์ฌ๋ฆฌ๋ ค๊ณ ์ฌ์ฉํ๋๋ฐ ์ด๊ฒ ๋ง๋์ง๋ ๋ฉ๊ฒ ใ
๋ค์..ใ
ใ
|
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | ๋ด์ ๋ฆฌ๋ทฐ ๋ฐ๋ก ๋ฌ๋ฌ๊ฐ๊ฒ์ฉ~๐ |
@@ -0,0 +1,19 @@
+import { ShoppingCartIcon } from "../../assets";
+import { BaseButton } from "./BaseButton";
+import { StyledCartButtonImg, StyledCartCount, StyledContainer } from "./CartButton.styled";
+
+interface CartButtonProps {
+ quantity: number;
+ onClick: () => void;
+}
+
+export const CartButton = ({ quan... | Unknown | ์ ํ๋ฆฌ์ผ์ด์
์ด ์ฒ์ ์คํ๋์ ๋ fetchํ ์ดํ์๋, ๋ด๊ธฐ/๋นผ๊ธฐ ๋ฒํผ์ ๋๋ฌ๋ productCount๊ฐ ๋ณ๊ฒฝ๋์ง ์๊ธฐ ๋๋ฌธ์ ์ค์๊ฐ์ผ๋ก ๊ฐ์๋ฅผ ์
๋ฐ์ดํธํ์ง ๋ชปํ๋ ๊ฒ์ผ๋ก ์ดํดํ์ด์. prop์ผ๋ก `productCount`๊ฐ๊ณผ `updateProductCount` ํจ์๋ฅผ ๋ง๋ค์ด CartActionButton๋ก ๋๊ฒจ์ฃผ๊ณ , CartActionButton์์๋ action์ด ์ผ์ด๋๋ฉด `updateProductCount`์ ๋ฐ๋ ๊ฐ์๋ฅผ CartButton์ผ๋ก ์ ๋ฌํ๋ฉด ์
๋ฐ์ดํธํ ์ ์์ ๊ฒ ๊ฐ์์!๐ |
@@ -0,0 +1,177 @@
+@import '../../../styles/variable.scss';
+
+@mixin flex {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+@mixin login-input {
+ width: 266px;
+ height: 36px;
+ border: $boxBorder;
+ background-color: #fafafa;
+ color: #a4a4a4;
+ border-radius: 2px;
+ margin-bottom:... | Unknown | - index.js์์ importํ๊ธฐ ๋๋ฌธ์ ์ฌ๊ธฐ์๋ ์ํ์
๋ ๋ฉ๋๋ค. |
@@ -0,0 +1,177 @@
+@import '../../../styles/variable.scss';
+
+@mixin flex {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+@mixin login-input {
+ width: 266px;
+ height: 36px;
+ border: $boxBorder;
+ background-color: #fafafa;
+ color: #a4a4a4;
+ border-radius: 2px;
+ margin-bottom:... | Unknown | - mixin ์ฌ์ฉํด์ฃผ์ ๊ฒ ์ข์ต๋๋ค.
- ๋ค๋ฅธ ๋ถ๋ค๊น์ง ์ฌ์ฉํ์ค ์ ์๋ ๋ถ๋ถ์ด๋ผ๊ณ ์๊ฐ๋์๋ฉด variables.scss๋ก ์ฎ๊ฒจ์ ์งํํด ์ฃผ์ธ์. |
@@ -0,0 +1,177 @@
+@import '../../../styles/variable.scss';
+
+@mixin flex {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+@mixin login-input {
+ width: 266px;
+ height: 36px;
+ border: $boxBorder;
+ background-color: #fafafa;
+ color: #a4a4a4;
+ border-radius: 2px;
+ margin-bottom:... | Unknown | - nesting ํด์ฃผ์ธ์.
- ๋ ํ๊ทธ๋ฅผ ์ด์ฉํ ์์ฑ ์ฃผ์๋ ๊ฒ์ ์งํฅํด ์ฃผ์๊ณ className์ ํ์ฉํด ์ฃผ์ธ์. |
@@ -1,7 +1,138 @@
-import React from 'react';
+import React, { useState } from 'react';
+import { useNavigate, Link } from 'react-router-dom';
-function Login() {
- return <div>Gaeul Login</div>;
-}
+const Login = () => {
+ const [inputValues, setInputValues] = useState({
+ userId: '',
+ password: '',
+ });
... | JavaScript | - ๋ถํ์ํ ์ฃผ์์ ์ญ์ ํด ์ฃผ์ธ์. |
@@ -1,7 +1,138 @@
-import React from 'react';
+import React, { useState } from 'react';
+import { useNavigate, Link } from 'react-router-dom';
-function Login() {
- return <div>Gaeul Login</div>;
-}
+const Login = () => {
+ const [inputValues, setInputValues] = useState({
+ userId: '',
+ password: '',
+ });
... | JavaScript | - ํ๊ทธ๋ฅผ ์ฌ์ฉํด ์ฃผ์๊ณ className์ ํด๋น ์ปดํฌ๋ํธ๋ก ํด์ฃผ์ธ์. |
@@ -1,7 +1,138 @@
-import React from 'react';
+import React, { useState } from 'react';
+import { useNavigate, Link } from 'react-router-dom';
-function Login() {
- return <div>Gaeul Login</div>;
-}
+const Login = () => {
+ const [inputValues, setInputValues] = useState({
+ userId: '',
+ password: '',
+ });
... | JavaScript | - return ์์ชฝ์ render์ ๊ด๋ จ๋ ๋ถ๋ถ์ด๋ผ ๋ก์ง์ ์ต๋ํ ํจ์ ์์ญ์ ์์ฑํด ์ฃผ์ธ์. |
@@ -1,7 +1,138 @@
-import React from 'react';
+import React, { useState } from 'react';
+import { useNavigate, Link } from 'react-router-dom';
-function Login() {
- return <div>Gaeul Login</div>;
-}
+const Login = () => {
+ const [inputValues, setInputValues] = useState({
+ userId: '',
+ password: '',
+ });
... | JavaScript | - navigate๋ ์กฐ๊ฑด์ด ์์ ๋ ์ฌ์ฉํ์๋ฉด ๋ฉ๋๋ค.
- ๊ทธ๊ฒ ์๋๋ผ๋ฉด ๋ง์ํ์ ๊ฒ ์ฒ๋ผ Link ์ปดํฌ๋ํธ๋ฅผ ํ์ฉํ์
๋ ๋ฉ๋๋ค. |
@@ -0,0 +1,100 @@
+@import '../../../styles/variable.scss';
+
+p {
+ font-family: 'Roboto';
+ letter-spacing: 0.2px;
+}
+
+.Main {
+ background-color: $backGroundColor;
+
+ .main {
+ display: flex;
+ justify-content: center;
+ padding-bottom: 100px;
+
+ .main-right {
+ width: 250px;
+ height: ... | Unknown | - body๋ ๋ค๋ฅธ ํ์ด์ง์๋ ์ํฅ์ ์ค ์ ์๊ฒ ๋ค์
- ํ์ํ ๋ถ๋ถ์ด๋ผ๋ฉด common.scss์์ ์งํ๋๊ฑฐ๋ ํ์๋ค๊ณผ ๋
ผ์ ํ ์งํํ์๋ฉด ๋ฉ๋๋ค. |
@@ -0,0 +1,100 @@
+@import '../../../styles/variable.scss';
+
+p {
+ font-family: 'Roboto';
+ letter-spacing: 0.2px;
+}
+
+.Main {
+ background-color: $backGroundColor;
+
+ .main {
+ display: flex;
+ justify-content: center;
+ padding-bottom: 100px;
+
+ .main-right {
+ width: 250px;
+ height: ... | Unknown | - ์ปดํฌ๋ํธ๋ฅผ ๋ถ๋ฆฌํ์
จ๋ค๋ฉด ํด๋น css๋ ๋ถ๋ฆฌํ์
์ ์งํํ์๋ ๊ฒ ๊ฐ๋
์ฑ์๋ ์ข๊ฒ ๋ค์. |
@@ -0,0 +1,82 @@
+import React, { useState } from 'react';
+import CommentList from './CommentList';
+
+const Feeds = ({ feedData }) => {
+ const [input, setInput] = useState('');
+ const [inputList, setInputList] = useState([]);
+
+ const post = event => {
+ event.preventDefault();
+ setInputList(inputList.co... | JavaScript | - className์ ์ปดํฌ๋ํธ๋ช
๊ณผ ๊ฐ๊ฒ ํด์ฃผ์ธ์. |
@@ -0,0 +1,82 @@
+import React, { useState } from 'react';
+import CommentList from './CommentList';
+
+const Feeds = ({ feedData }) => {
+ const [input, setInput] = useState('');
+ const [inputList, setInputList] = useState([]);
+
+ const post = event => {
+ event.preventDefault();
+ setInputList(inputList.co... | JavaScript | - alt๋ ์ ์ ๊ฐ ๋ณด๋ ํ
์คํธ ์
๋๋ค.
- ์ ์ ์
์ฅ์์ ์์ฑํด ์ฃผ์ธ์. |
@@ -0,0 +1,82 @@
+import React, { useState } from 'react';
+import CommentList from './CommentList';
+
+const Feeds = ({ feedData }) => {
+ const [input, setInput] = useState('');
+ const [inputList, setInputList] = useState([]);
+
+ const post = event => {
+ event.preventDefault();
+ setInputList(inputList.co... | JavaScript | - onKeyup ๋ณด๋ค๋ ๋ณ์๋ก ๋์ ๊ด๋ฆฌ๋ฅผ ํ๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค.
- ๋ณ์๋ฅผ ๋ง๋ค์ด ๋์ ์ผ๋ก ๊ด๋ฆฌํ๋ค๋ฉด state๊ฐ ์์ด๋ ๋๊ฒ ๋ค์. |
@@ -0,0 +1,82 @@
+import React, { useState } from 'react';
+import CommentList from './CommentList';
+
+const Feeds = ({ feedData }) => {
+ const [input, setInput] = useState('');
+ const [inputList, setInputList] = useState([]);
+
+ const post = event => {
+ event.preventDefault();
+ setInputList(inputList.co... | JavaScript | - form ํ๊ทธ ์์ ์๋ค๋ฉด ๋ฒํผ์๋ ๋ฐ๋ก onClick์ ๋ถ์ฌํ์ง ์์ผ์
๋ ๋ฉ๋๋ค. |
@@ -0,0 +1,36 @@
+package rentcar.domain;
+
+public class Avante extends Car {
+
+ private static final String NAME = "Avante";
+ private static final double DISTANCE_PER_LITER = 15;
+ private static final String VALIDATE_TRIP_DISTANCE_MESSAGE = "[ERROR] ์ฌํ๊ฑฐ๋ฆฌ๋ 0 ์ด์์
๋๋ค.";
+
+ private double tripDistance;
+
+... | Java | Car (์ถ์) ํด๋์ค์ ํ์ ๊ตฌํ์ฒด๋ค์ ๋ชจ๋ ์ด ๋ก์ง์ด ๋ฐ๋ณต๋๊ณ ์์ด์. ๐
๋ฐ๋ณต๋๋ ์ฝ๋๋ฅผ Car ํด๋์ค์ ๊ตฌํํ๋ฉด ๋ฐ๋ณต๋๋ ์ฝ๋๋ฅผ ์ค์ผ ์ ์์ ๊ฒ ๊ฐ์์. ๐ค |
@@ -0,0 +1,36 @@
+package rentcar.domain;
+
+public class Avante extends Car {
+
+ private static final String NAME = "Avante";
+ private static final double DISTANCE_PER_LITER = 15;
+ private static final String VALIDATE_TRIP_DISTANCE_MESSAGE = "[ERROR] ์ฌํ๊ฑฐ๋ฆฌ๋ 0 ์ด์์
๋๋ค.";
+
+ private double tripDistance;
+
+... | Java | `0`์ด ์ด๋ค ์ซ์์ธ์ง ์์๋ก ์ถ์ถํ์ฌ ์๋ฏธ๋ฅผ ๋ช
ํํ๊ฒ ํด์ฃผ๋ฉด ์ข์ ๊ฒ ๊ฐ์์. ๐ค |
@@ -0,0 +1,7 @@
+package rentcar.domain;
+
+public interface Reportable {
+
+ String generateReport();
+
+} | Java | ์ธํฐํ์ด์ค ํ์ฉ ๐๐ |
@@ -0,0 +1,92 @@
+package blackjack.controller;
+
+import blackjack.domain.card.CardFactory;
+import blackjack.domain.card.Deck;
+import blackjack.domain.report.GameReports;
+import blackjack.domain.request.DrawRequest;
+import blackjack.domain.request.UserNamesRequest;
+import blackjack.domain.user.Dealer;
+import bla... | Java | `collectingAndThen` ํจ์๋ ์ ๋ ๋ชฐ๋๋๋ฐ, ์ ์ฉํ ๊ฒ ๊ฐ์์! ๐คญ๐ |
@@ -0,0 +1,92 @@
+package blackjack.controller;
+
+import blackjack.domain.card.CardFactory;
+import blackjack.domain.card.Deck;
+import blackjack.domain.report.GameReports;
+import blackjack.domain.request.DrawRequest;
+import blackjack.domain.request.UserNamesRequest;
+import blackjack.domain.user.Dealer;
+import bla... | Java | `BlackJack` ํด๋์ค๋ Controller์ ์ฉ๋๋ก ์ฌ์ฉํ๋ ค๋ ๊ฒ ๊ฐ์ผ๋ ๋น์ฆ๋์ค ๋ก์ง์ด ์๋น์ ์กด์ฌํ๋ ๊ฒ ๊ฐ์์. ๐ค
Controller๋ ์ํ ๊ฐ์ ๊ฐ์ง์ง ์์์ผํด์. ๐
`BlackJackController` ํด๋์ค์ ๋น์ฆ๋์ค ๋ชจ๋ธ์ธ `BlackJack` ํด๋์ค๋ก ๋ถ๋ฆฌํด๋ณผ ์ ์์ ๊ฒ ๊ฐ์์. ๐ค |
@@ -0,0 +1,34 @@
+package blackjack.domain.card;
+
+public enum Number {
+
+ ACE(1, "A"),
+ TWO(2, "2"),
+ THREE(3, "3"),
+ FOUR(4, "4"),
+ FIVE(5, "5"),
+ SIX(6, "6"),
+ SEVEN(7, "7"),
+ EIGHT(8, "8"),
+ NINE(9, "9"),
+ TEN(10, "10"),
+ JACK(10, "J"),
+ QUEEN(10, "Q"),
+ KING(10,... | Java | enum ํด๋์ค๋ช
์ด `ACE, JACK, QUEEN, KING`์ ํฌํจํ๋ ์๋ฏธ๋ผ๊ณ ๋ณผ ์ ์์๊น์? ๐ค
`Type` or `CardType`๊ณผ ๊ฐ์ ๋ค์ด๋ฐ์ ์ด๋จ๊น์? ๐ |
@@ -0,0 +1,34 @@
+package blackjack.domain.card;
+
+public enum Number {
+
+ ACE(1, "A"),
+ TWO(2, "2"),
+ THREE(3, "3"),
+ FOUR(4, "4"),
+ FIVE(5, "5"),
+ SIX(6, "6"),
+ SEVEN(7, "7"),
+ EIGHT(8, "8"),
+ NINE(9, "9"),
+ TEN(10, "10"),
+ JACK(10, "J"),
+ QUEEN(10, "Q"),
+ KING(10,... | Java | ๊ฐ์ฒด์ ์ํ ๊ฐ์ ์ธ๋ถ๋ก ํธ์ถํ๋ ๋ฉ์๋๋ `getter` ๋ฉ์๋๋ฅผ ์ ์ํด์ฃผ์ธ์. ๐
getter, setter์ ๊ฐ์ ๊ด์ต์ ์ธ ๋ฉ์๋ ์์ฑ์ด ๋ฏ์ค๊ฑฐ๋ ์ด๋ ต๋ค๋ฉด `โ + N` ๋จ์ถํค๋ฅผ ํตํด์ ์ด๋ฐ ๋ฉ์๋๋ค์ ์ฝ๊ฒ ์์ฑํ ์ ์์ด์. ๐ค |
@@ -0,0 +1,35 @@
+package blackjack.domain.card;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public class CardFactory {
+
+ public static CardFactory INSTANCE;
+
+ private CardFactory() {
+ }
+
+ public static CardFactory getInstance() {
+ if (INSTANCE == ... | Java | Deck์ผ๋ก ์ฐ์ด๋ ์นด๋๋ค์ ์นด๋์ ํํ์ ๊ฐฏ์๋ค์ด ์ ํด์ ธ์๊ณ ์ฌ์ฌ์ฉํ ํ๋ฅ ์ด ๋๋ค๊ณ ์๊ฐํด์. ๐
๋ฏธ๋ฆฌ ๋ง๋ค์ด๋๋ค๊ฐ ํ์ํ ์์ ์ ์ฌ์ฌ์ฉํด๋ณด๋ฉด ์ด๋จ๊น์? ๐ค
[์ฐธ๊ณ ์๋ฃ](https://tecoble.techcourse.co.kr/post/2020-06-24-caching-instance/) |
@@ -0,0 +1,22 @@
+package blackjack.domain.card;
+
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Queue;
+
+public class Deck {
+
+ private final Queue<Card> deck;
+
+ public Deck(List<Card> cards) {
+ this.deck = new LinkedList<>(cards);
+ }
+
+ public Card spreadCard() {
+ ... | Java | ์ ๋ Stack์ด ์กฐ๊ธ ๋ ์นด๋ ๊ฒ์์ ์ด์ธ๋ฆฐ๋ค๊ณ ์๊ฐํ๋๋ฐ, Queue๋ ์ข์ ์ ๊ทผ์ธ ๊ฒ ๊ฐ์์. ๐ค
`spreadCard` ๋ฉ์๋์์๋ deck์ด ๋น์ด์๋ ๊ฒฝ์ฐ์ ๋ํ ์์ธ ์ฒ๋ฆฌ๋ ํ ์ ์์ ๊ฒ ๊ฐ์์. ๐ |
@@ -0,0 +1,42 @@
+package blackjack.domain.card;
+
+import blackjack.domain.score.ScoreCalculator;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public class CardBundle {
+
+ private static final int BLACK_JACK_SCORE = 21;
+
+ private final List<Card> cards;
+
+ private... | Java | CardBundle.`empty()` ๋ก๋ ์ถฉ๋ถํ ์๋ฏธ๊ฐ ์ ๋ฌ๋๋ ๊ฒ ๊ฐ์์. ๐ |
@@ -0,0 +1,42 @@
+package blackjack.domain.card;
+
+import blackjack.domain.score.ScoreCalculator;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public class CardBundle {
+
+ private static final int BLACK_JACK_SCORE = 21;
+
+ private final List<Card> cards;
+
+ private... | Java | `CardBundle` ๊ฐ์ฒด๋ **์นด๋์ ์ ์๋ฅผ ํฉ์ฐํ๋ ์ญํ **์ ์ํํ๋ค๊ณ ์๊ฐํด์. ๐ค
`ScoreCalculator` enum class ๋ด๋ถ ์ฝ๋๋ ๋งค์ฐ ํฅ๋ฏธ๋กญ๊ฒ ๋ดค์ด์. ๐ ๐
ํ์ง๋ง `AceScoreStrategy`, `DefaultScoreStrategy`์ ๋ด๋ถ ์ฝ๋๋ฅผ ๋ณด์์ ๋, ์ด๋ฐ ์์ผ๋ก (์นด๋ ์ ์ ํฉ์ฐ) ์ ๋ต์ ๊ตฌ๋ถํ์ฌ ๊ตฌํํ๋ ๊ฒ๋ณด๋ค ์นด๋ ์ ์ ํฉ์ฐ ๋ก์ง์ด ํ์ํ `CardBundle ๊ฐ์ฒด ๋ด๋ถ`์ ์ง์ ๊ตฌํํ๋ ๊ฒ์ด ๋ ์์ง์ฑ์ด ๋๋ค๊ณ ์๊ฐํด์. ๐
์ง๊ธ์ ์ฝ๋์์ `์ ์๋ฅผ ํฉ์ฐ`ํ๋ ๊ธฐ๋ฅ์ ํ์
ํ๊ธฐ๊ฐ ์ด๋ ค์ด ๊ฒ ๊ฐ์์... |
@@ -0,0 +1,51 @@
+package blackjack.domain.report;
+
+import java.util.Objects;
+
+public class GameReport {
+
+ private final String name;
+ private final GameResult result;
+
+ public GameReport(String name, GameResult result) {
+ this.name = name;
+ this.result = result;
+ }
+
+ public S... | Java | GameReport ๊ฐ์ฒด์ `๋๋ฑ์ฑ`์ ์ ์ํ ํ์๊ฐ ์๋์? ๐ค
ํน์ ํ์ํ ์์น๊ฐ ์์๊น์? ๐ (์ ๊ฐ ๋ชป ์ฐพ๋ ๊ฑธ๊น์? ๐) |
@@ -0,0 +1,52 @@
+package blackjack.domain.report;
+
+import blackjack.domain.card.CardBundle;
+import java.util.Arrays;
+
+public enum GameResult {
+
+ WIN(1, "์น"),
+ DRAW(0, "๋ฌด"),
+ LOSE(-1, "ํจ");
+
+ private final int result;
+ private final String message;
+
+ GameResult(int result, String message... | Java | getter (getter ์ญํ ์ ํ๋ ๋ฉ์๋), setter, compareTo, toString ๋ฑ์ ๋ฉ์๋๋ ํด๋์ค์ ์ตํ๋จ์ ์์น์์ผ์ฃผ์ธ์! |
@@ -0,0 +1,52 @@
+package blackjack.domain.report;
+
+import blackjack.domain.card.CardBundle;
+import java.util.Arrays;
+
+public enum GameResult {
+
+ WIN(1, "์น"),
+ DRAW(0, "๋ฌด"),
+ LOSE(-1, "ํจ");
+
+ private final int result;
+ private final String message;
+
+ GameResult(int result, String message... | Java | ๋ CardBundle (์ฌ์ค์ ๋ ๋ฒ์งธ, ํ๋ผ๋ฏธํฐ๋ก ๋ฐ๋ CardBundle์ Dealer์ CardBundle๋ก ๊ณ ์ ๋๋ ๊ฒ ๊ฐ์์. ๐)์ ๋ฐ์์ `๊ฒ์ ๊ฒฐ๊ณผ`๋ฅผ ๋ฐํํ๋ ์ญํ ์ `Dealer`์ ์ญํ ์ด๋ผ๊ณ ๋ณผ ์ ์์ง ์์๊น์? ๐ค (๊ทธ๋ฌ๋ฉด ์ฒซ ๋ฒ์งธ ํ๋ผ๋ฏธํฐ์ ๋ ๋ฒ์งธ ํ๋ผ๋ฏธํฐ์ ์์๋ฅผ ์๋ชป ๋์
ํ๋ค๊ฑฐ๋ ํ๋ ์ค์๋ฅผ ๋ง์ ์๋ ์์ ๊ฒ ๊ฐ์์. ๐) |
@@ -0,0 +1,45 @@
+package blackjack.domain.request;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+public class UserNamesRequest {
+
+ private static final String USER_NAME_DELIMITER = ",";
+... | Java | ์ด ์ ํจ์ฑ ๊ฒ์ฆ ๋ก์ง์ ๋ธ๋์ญ ๋๋ฉ์ธ ๋ชจ๋ธ์ ๊ผญ ํ์ํ ์ ํจ์ฑ ๊ฒ์ฆ์ธ ๊ฒ ๊ฐ์์. ๐
๋จผ์ Player์ ์ํ ๊ฐ์ธ ์์ ๊ฐ name์ ํฌ์ฅํด๋ณด๋ฉด ์ด๋จ๊น์? ๐ค |
@@ -0,0 +1,55 @@
+package blackjack.domain.user;
+
+import blackjack.domain.card.Card;
+import blackjack.domain.card.CardBundle;
+import java.util.List;
+
+public class Player {
+
+ protected final CardBundle cardBundle;
+ private final String name;
+
+ public Player(String name) {
+ validateName(name);... | Java | String์ `isEmpty` ํจ์๋ฅผ ๋์ ์ฌ์ฉํด๋ณด๋ฉด ์ด๋จ๊น์? ๐
```suggestion
if (name == null || name.trim().isEmpty()) {
``` |
@@ -0,0 +1,33 @@
+package blackjack.domain.user;
+
+import blackjack.domain.report.GameResult;
+import blackjack.domain.report.GameReport;
+
+public class Dealer extends Player {
+
+ private static final int DEALER_MUST_DRAW_SCORE = 16;
+
+ public Dealer() {
+ super("๋๋ฌ");
+ }
+
+ public GameReport c... | Java | Dealer๊ฐ ์จ์ ํ Player ํด๋์ค๋ฅผ ๋ฐ๋ก ์์๋ฐ์๊ธฐ ๋๋ฌธ์ ์ด๋ค ๋ฉ์๋๋ฅผ ์ฌ์ ์ํด์ผ ํ๋์ง ํ์
ํ๊ธฐ ์ด๋ ค์ด ๊ฒ ๊ฐ์์. ๐ค
๊ณตํต์ผ๋ก ์ฌ์ฉํ๋ ๋ฉ์๋๋ ๊ทธ๋๋ก ์ฌ์ฉํ ์ ์๊ฒ ํ๋, ํ์ ๊ตฌํ์ฒด์ ๋ฐ๋ผ ๋ฌ๋ผ์ง๋ ๊ธฐ๋ฅ๋ค์ `์ถ์ ๋ฉ์๋`๋ก ์ ์ํด์ ํ์ ๊ตฌํ์ฒด์์๋ ์ฌ์ ์๋ฅผ ๊ฐ์ ํ๋๋ก ํ๋ฉด ์ข์ง ์์๊น์? ๐ |
@@ -0,0 +1,33 @@
+package blackjack.domain.user;
+
+import blackjack.domain.report.GameResult;
+import blackjack.domain.report.GameReport;
+
+public class Dealer extends Player {
+
+ private static final int DEALER_MUST_DRAW_SCORE = 16;
+
+ public Dealer() {
+ super("๋๋ฌ");
+ }
+
+ public GameReport c... | Java | GameReport ๊ฐ์ฒด์ ์ํ ๊ฐ์ผ๋ก Player์ ์ด๋ฆ์ ๋ฐ๋๊ฒ ์๋๋ผ `Player`๋ฅผ ๊ฐ์ง๋ฉด ์ด๋จ๊น์? ๐ค |
@@ -0,0 +1,82 @@
+package blackjack.view;
+
+import static blackjack.domain.user.Players.START_CARD_INIT_SIZE;
+
+import blackjack.domain.report.GameReports;
+import blackjack.domain.card.Card;
+import blackjack.domain.user.Player;
+import blackjack.domain.user.Players;
+import java.util.List;
+import java.util.stream.... | Java | `findOnlyPlayers`์ `findDealer`๋ ๋น์ฆ๋์ค ๋ก์ง์ด๊ธฐ ๋๋ฌธ์ Model์ ์์ญ์ด๋ผ๊ณ ๋ณผ ์ ์์ด์. ๐
Controller์์ ๋ ๋ฉ์๋๋ฅผ ํธ์ถํ ๋ค, ๋ฉ์๋ ํ๋ผ๋ฏธํฐ๋ก ๊ทธ ๊ฒฐ๊ณผ ๊ฐ๋ค์ ์ ๋ฌ๋ฐ๋๋ก ๋ณ๊ฒฝํด์ฃผ์ธ์! ๐ |
@@ -0,0 +1,34 @@
+package blackjack.domain.card;
+
+public enum Number {
+
+ ACE(1, "A"),
+ TWO(2, "2"),
+ THREE(3, "3"),
+ FOUR(4, "4"),
+ FIVE(5, "5"),
+ SIX(6, "6"),
+ SEVEN(7, "7"),
+ EIGHT(8, "8"),
+ NINE(9, "9"),
+ TEN(10, "10"),
+ JACK(10, "J"),
+ QUEEN(10, "Q"),
+ KING(10,... | Java | ์ ๋ `getXXX`๊ณผ ๊ฐ์ ๋ค์ด๋ฐ์ด ์คํ๋ ค ๋ด๋ถ ์์ฑ์ ๋
ธ์ถํ๋ค๊ณ ์๊ฐํด์
`์๋ฏธ์๋ ๋ค์ด๋ฐ์ ๋ฉ์๋๋ฅผ ์ฌ์ฉํ๋๊ฒ ๋ ๋ซ์ง ์์๊น?` ๋ผ๋ ์๊ฐ์ผ๋ก ๋ฉ์๋์ ๋ค์ด๋ฐ์ ์์ฑํด๋ณด์๋๋ฐ
ํด๋น์ ๋ํด์๋ `getXXX`์ผ๋ก ํต์ผํ๋๊ฒ ๋ ์ข์๊น์? |
@@ -0,0 +1,42 @@
+package blackjack.domain.card;
+
+import blackjack.domain.score.ScoreCalculator;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public class CardBundle {
+
+ private static final int BLACK_JACK_SCORE = 21;
+
+ private final List<Card> cards;
+
+ private... | Java | `empty()`๋ ๊ด์ฐฎ์ ๋ค์ด๋ฐ์ด๋ผ๊ณ ์๊ฐํ์ง๋ง,
ํด๋น ๋ฒ๋ค์ด ๋น์ด์๋ค๋ ์๋ฏธ(`isEmpty()`)์ ์ ์ฌํ๊ฒ ํด์๋ ์๋ ์๋ค๊ณ ์๊ฐํ์ต๋๋ค. |
@@ -0,0 +1,51 @@
+package blackjack.domain.report;
+
+import java.util.Objects;
+
+public class GameReport {
+
+ private final String name;
+ private final GameResult result;
+
+ public GameReport(String name, GameResult result) {
+ this.name = name;
+ this.result = result;
+ }
+
+ public S... | Java | ์ ์ฒ์์ GameReports์ `Set`์ ์๋ํ๊ณ ๊ตฌํํ๋๋ฐ ์ง๊ธ์ ๋ถํ์ํ ๋ฉ์๋๋ผ๊ณ ์๊ฐ๋์ด ์ญ์ ํ๊ฒ ์ต๋๋ค! |
@@ -0,0 +1,18 @@
+package subway.config;
+
+import lombok.extern.slf4j.*;
+import org.springframework.http.*;
+import org.springframework.web.bind.annotation.*;
+
+@Slf4j
+@RestControllerAdvice
+public class GlobalExceptionHandler {
+
+ @ExceptionHandler(RuntimeException.class)
+ public ResponseEntity<ErrorRespon... | Java | ์๋ฌ ๊ณตํต ์ฒ๋ฆฌ๋ฅผ ์ ํด์ฃผ์
จ๋ค์! ๐
์์ธ์ข
๋ฅ์ ๋ฐ๋ผ ๋ก๊น
๋ ๋ฒจ์ ์ ์ ํ๊ฒ ๋ถ๋ฆฌํด์ ๋ก๊ทธ๋ฅผ ๋จ๊ธฐ๋ ๊ฒ๋ ์ข์ ๊ฑฐ ๊ฐ์๋ฐ ์ด๋ป๊ฒ ์๊ฐํ์๋์?
logging level ๊ด๋ จํด์๋ ์๋ ๋ด์ฉ์ ์ฐธ๊ณ ํด ์ฃผ์๋ฉด ๊ฐ์ฌํ๊ฒ ์ต๋๋ค.
์) log.error("Unexpected exception occurred: {}", e.getMessage(), e);
โ DEBUG : ๊ฐ๋ฐ๋จ๊ณ์์๋ถํฐ ํ์ฑํ.ํ๋ก์ธ์ค์์ฒ๋ฆฌ์์/ํ๋ฆ์๋ถ์ํ๋๋ฐ ๋์์ด ๋๋ ์ ๋ณด ๋ฑ
โ INFO : ๋๋ฒ๊น
์ ๋ณด์ธ์ ํ๋ก์ธ์ค์ค์ / ๊ธฐ๋์ ๊ด๋ จํ ์ ๋ณด ๋ฑ
โ WARN : ์ค๋ฅ์ํฉ์ ์๋์ง๋ง,... |
@@ -1,13 +1,13 @@
package subway.line;
import lombok.*;
+import subway.*;
+import subway.line.section.*;
import javax.persistence.*;
@Entity
@NoArgsConstructor(access = AccessLevel.PROTECTED)
-@AllArgsConstructor(access = AccessLevel.PRIVATE)
-@Builder
@Getter
public class Line {
@@ -21,13 +21,27 @@ publ... | Java | `@Embedded ์ ์ด์ฉํด ๋๋ฉ์ธ ๋ก์ง์ ์ ๋ถ๋ฆฌํด ์ฃผ์
จ๊ตฐ์! ๐ |
@@ -0,0 +1,49 @@
+package subway.line.section;
+
+import lombok.*;
+import org.springframework.stereotype.*;
+import org.springframework.transaction.annotation.*;
+import subway.*;
+import subway.line.*;
+
+@Service
+@Transactional
+@RequiredArgsConstructor
+public class SectionService {
+
+ private final StationSer... | Java | ํด๋น ํจ์๋ SectionService ์์๋ง ์ฌ์ฉํ๋ ๊ฒ์ผ๋ก ๋ณด์ฌ์ง๋๋ฐ static ์ผ๋ก ์ ์ธํ ์ด์ ๊ฐ ์์๊น์? ๐ |
@@ -0,0 +1,81 @@
+package subway.line.section;
+
+import lombok.*;
+import subway.*;
+
+import javax.persistence.*;
+import java.util.*;
+
+@Embeddable
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public class Sections {
+
+ @OneToMany(fetch = FetchType.LAZY, mappedBy = "line", cascade = CascadeType.ALL, orpha... | Java | ๋งค๊ฐ๋ณ์ ํ์
์ Station ์ธ๋ฐ ๋ณ์ ๋ช
์ section ์ด์ฌ์ ํผ๋์ด ์์ด ๋ณด์ฌ์! ๐ |
@@ -0,0 +1,55 @@
+package subway.given;
+
+import io.restassured.response.*;
+import org.springframework.http.*;
+
+import java.util.*;
+
+import static io.restassured.RestAssured.*;
+
+public class GivenLineApi {
+
+ public static final String LINE_PATH = "/lines";
+ public static final String BG_COLOR_600 = "bg... | Java | Map ์ผ๋ก ๋ง๋ค์ด์ ๋๊ธฐ๊ธฐ ๋ณด๋ค๋ DTO ๋ก ๋ง๋ค์ด๋ ์ข์ง ์์๊น์? โบ๏ธ |
@@ -0,0 +1,171 @@
+package subway.line.section;
+
+import io.restassured.response.*;
+import org.junit.jupiter.api.*;
+import org.springframework.boot.test.context.*;
+import org.springframework.test.annotation.*;
+
+import java.util.*;
+
+import static io.restassured.RestAssured.*;
+import static org.assertj.core.api.... | Java | `@DirtiesContext` ๋ฅผ ํ์ฉํด ํ
์คํธ ๊ฒฉ๋ฆฌ๋ฅผ ํด ์ฃผ์
จ๊ตฐ์! ๐
`@DirtiesContext` ๋ ์ปจํ
์คํธ๋ฅผ ๋ค์ ๋ก๋ํ๊ธฐ ๋๋ฌธ์ ํ
์คํธ ์๋๊ฐ ์ค๋ ๊ฑธ๋ฆฐ๋ค๋ ๋จ์ ์ด ์์ต๋๋ค!
์ด ๋ถ๋ถ์ ํ๋ฒ ๊ณ ๋ฏผํด ๋ณด์๋ฉด ์ข์ ๊ฑฐ ๊ฐ์ต๋๋ค ๐ |
@@ -0,0 +1,171 @@
+package subway.line.section;
+
+import io.restassured.response.*;
+import org.junit.jupiter.api.*;
+import org.springframework.boot.test.context.*;
+import org.springframework.test.annotation.*;
+
+import java.util.*;
+
+import static io.restassured.RestAssured.*;
+import static org.assertj.core.api.... | Java | ์์ธ ์๋๋ฆฌ์ค์ ๋ํด ํ
์คํธ๋ฅผ ์ํด์ฃผ์
จ๋ค์! ๐ |
@@ -0,0 +1,21 @@
+import React from 'react';
+
+class InputBox extends React.Component {
+ // eslint-disable-next-line no-useless-constructor
+ constructor(props) {
+ super(props);
+ }
+ render() {
+ const { name, type, placeholder, recivedValue } = this.props;
+ return (
+ <input
+ name={name}... | JavaScript | ์ด๋ถ๋ถ ์ ์ฃผ์์ฒ๋ฆฌํ์
จ๋์?
์ด๋ ๊ฒ ์์ฐ๋ ์ฝ๋๋ฅผ ์ฃผ์์ฒ๋ฆฌํด์ ๋จ๊ฒจ๋๋ฉด ๋ค๋ฅธ์ฌ๋๋ ์ด ์ฝ๋๊ฐ ์ด๋์ ์ฐ์ด๋๊ฑด๊ฐ ํด์ ๋ชจ๋ ๋ชป์ง์ฐ๊ณ ๊ฒฐ๊ตญ ์๋ฌด ์ธ๋ชจ ์์ง๋ง ๊ณ์ ์ ํด ๋ด๋ ค๊ฐ๋ ์ฃผ์์ฝ๋๊ฐ ๋ฉ๋๋ค
ํ์์๋ ์ฝ๋๋ ์ญ์ ํด์ฃผ์ธ์!
์ปค๋ฐ๋ง ์ ๋จ๊ฒจ๋๋ฉด ๋ค์ ๋์์ฌ ์ ์์ผ๋๊น ๊ณผ๊ฐํ๊ฒ ์ง์๋ ๋ฉ๋๋ค! |
@@ -0,0 +1,21 @@
+import React from 'react';
+
+class InputBox extends React.Component {
+ // eslint-disable-next-line no-useless-constructor
+ constructor(props) {
+ super(props);
+ }
+ render() {
+ const { name, type, placeholder, recivedValue } = this.props;
+ return (
+ <input
+ name={name}... | JavaScript | ```suggestion
const {name, type, placeholder, recivedValue} = this.props;
return (
<input
name={name}
type={type}
placeholder={placeholder}
onChange={recivedValue}
/>
);
```
๊ตฌ์กฐ๋ถํดํ ๋นํด์ ์ฐ๋ฉด ์ข ๋ ๊น๋ํ๊ฒ ๋ค์ |
@@ -0,0 +1,85 @@
+import React from 'react';
+import { withRouter } from 'react-router-dom';
+import InputBox from './InputBox/InputBox';
+import './JaehyunLogin.scss';
+
+class JaehyunLogin extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ userName: '',
+ password: ... | JavaScript | import ์์ ๋ง์ถฐ์ฃผ์ธ์ |
@@ -0,0 +1,85 @@
+import React from 'react';
+import { withRouter } from 'react-router-dom';
+import InputBox from './InputBox/InputBox';
+import './JaehyunLogin.scss';
+
+class JaehyunLogin extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ userName: '',
+ password: ... | JavaScript | peer review์ ํ์ต์๋ฃ๋ก ์ ๊ณต๋ ๋ฆฌํฉํ ๋ง ์ฒดํฌ๋ฆฌ์คํธ ํ์ธํด๋ณด์๋ฉด ๋ฉ๋๋ค. |
@@ -0,0 +1,85 @@
+import React from 'react';
+import { withRouter } from 'react-router-dom';
+import InputBox from './InputBox/InputBox';
+import './JaehyunLogin.scss';
+
+class JaehyunLogin extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ userName: '',
+ password: ... | JavaScript | [๊ณต์๋ฌธ์ React๋ก ์ฌ๊ณ ํ๊ธฐ](https://ko.reactjs.org/docs/thinking-in-react.html#step-3-identify-the-minimal-but-complete-representation-of-ui-state) ๋ฅผ ๋ณด์๋ฉด ์ด๋ค ๊ฐ๋ค์ด state๊ฐ ๋์ด์ผํ๋์ง์ ๋ํด ์ ํ์์ต๋๋ค.
> ๊ฐ๊ฐ ์ดํด๋ณด๊ณ ์ด๋ค ๊ฒ state๊ฐ ๋์ด์ผ ํ๋ ์ง ์ดํด๋ด
์๋ค. ์ด๋ ๊ฐ ๋ฐ์ดํฐ์ ๋ํด ์๋์ ์ธ ๊ฐ์ง ์ง๋ฌธ์ ํตํด ๊ฒฐ์ ํ ์ ์์ต๋๋ค
> 1. ๋ถ๋ชจ๋ก๋ถํฐ props๋ฅผ ํตํด ์ ๋ฌ๋ฉ๋๊น? ๊ทธ๋ฌ๋ฉด ํ์คํ state๊ฐ ์๋๋๋ค.
> 2. ์๊ฐ์ด ์ง... |
@@ -0,0 +1,85 @@
+import React from 'react';
+import { withRouter } from 'react-router-dom';
+import InputBox from './InputBox/InputBox';
+import './JaehyunLogin.scss';
+
+class JaehyunLogin extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ userName: '',
+ password: ... | JavaScript | ์ฃผ์ ์ญ์ ํด์ฃผ์ธ์~ |
@@ -0,0 +1,85 @@
+import React from 'react';
+import { withRouter } from 'react-router-dom';
+import InputBox from './InputBox/InputBox';
+import './JaehyunLogin.scss';
+
+class JaehyunLogin extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ userName: '',
+ password: ... | JavaScript | ```suggestion
const { name, value } = e.target;
this.setState({[name]:value});
}
```
๊ณ์ฐ๋ ์์ฑ๋ช
์ฌ์ฉํด์ ์ค์ผ ์ ์์ด๋ณด์
๋๋ค, passwordCheck, userIdCheck๋ ํ์์๋ ๊ฐ์ด๋๊น ์์ ๋ ๋๋ณด์
๋๋ค.
๊ทธ๋ฆฌ๊ณ check๋ ๋ญ๊ฐ ์ฒดํฌ๋ฐ์ค๊ฐ ์ฒดํฌ๋๊ณ ์๋๊ณ ๊ฐ์ง ์๋์? isPasswordValid ๋ฑ์ ์๋ฏธ๊ฐ ๋๋ฌ๋๊ณ , boolean์์ ์์๋ณผ ์ ์๋ ๋ค์ด๋ฐ์ ํด์ฃผ์ธ์ |
@@ -0,0 +1,85 @@
+import React from 'react';
+import { withRouter } from 'react-router-dom';
+import InputBox from './InputBox/InputBox';
+import './JaehyunLogin.scss';
+
+class JaehyunLogin extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ userName: '',
+ password: ... | JavaScript | ๋ฐ๋ณต๋๋ UI๋ก ๋ณด์
๋๋ค, ์์๋ฐ์ดํฐ + Array.map method ํ์ฉํด์ ํํํด๋ณด์ธ์ |
@@ -0,0 +1,85 @@
+import React from 'react';
+import { withRouter } from 'react-router-dom';
+import InputBox from './InputBox/InputBox';
+import './JaehyunLogin.scss';
+
+class JaehyunLogin extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ userName: '',
+ password: ... | JavaScript | - `id` ๋ณด๋ค๋ `className` ์ ํ์ฉํด์ฃผ์๊ธฐ ๋ฐ๋๋๋ค.
- HTML์์ `id` ๋ ๋ฌธ์ ๋ด์์ ์ ์ผํด์ผ ํฉ๋๋ค. ์ด๋ฌํ ์ด์ ๋ก ๋จ์ผ ์์๋ฅผ ๋ค๋ฃจ๋ ๊ฒฝ์ฐ `id`๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค.
- ํ์ง๋งย ์ ๋ง๋ก ํด๋น ์์์ ๋ํ ์ด๋ฒคํธ๋ ์คํ์ผ ํธ๋ค๋ง์ด ํ๋ก์ ํธ ์ ์ฒด์์ ๋จ ํ๋ฒ๋ง ์ฌ์ฉ ๋๋์งย ์ถฉ๋ถํ ๊ณ ๋ฏผํด์ผํฉ๋๋ค. ์ผ๋ฐ์ ์ผ๋ก ์ปดํฌ๋ํธ๋ ์ฌ์ฌ์ฉ ๋ ์ ์๊ธฐ ๋๋ฌธ์ ๊ฐ์ ์์๊ฐ ์ฌ๋ฌ๋ฒ ์์ฑ๋ ์ ์์ต๋๋ค. ์ด๋ฌํ ์ด์ ๋ก ๋ณดํต์ ๊ฒฝ์ฐ์๋ `className` ์ ์ฌ์ฉํฉ๋๋ค. |
@@ -0,0 +1,85 @@
+import React from 'react';
+import { withRouter } from 'react-router-dom';
+import InputBox from './InputBox/InputBox';
+import './JaehyunLogin.scss';
+
+class JaehyunLogin extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ userName: '',
+ password: ... | JavaScript | inline-style๋ณด๋ค className์ ๋์ ์ผ๋ก ๋ฐ๊พธ๋ ์์ผ๋ก ์คํ์ผ๋ง ํด์ฃผ์ธ์ |
@@ -0,0 +1,20 @@
+import React from 'react';
+
+class Content extends React.Component {
+ constructor(props) {
+ super(props);
+ }
+
+ render() {
+ return (
+ <li key={this.props.key} style={{ listStyle: 'none' }}>
+ <span style={{ fontWeight: 'bold', marginRight: '20px' }}>
+ {this.props.... | JavaScript | state๋ฅผ ๋ง๋ค์ง ์์ ๊ฒฝ์ฐ constructor ์ํด์ฃผ์
๋ ๋ฉ๋๋ค! |
@@ -0,0 +1,20 @@
+import React from 'react';
+
+class Content extends React.Component {
+ constructor(props) {
+ super(props);
+ }
+
+ render() {
+ return (
+ <li key={this.props.key} style={{ listStyle: 'none' }}>
+ <span style={{ fontWeight: 'bold', marginRight: '20px' }}>
+ {this.props.... | JavaScript | key props์ Array.map method๋ฅผ ํ์ฉํ์ฌ ์ฌ๋ฌ ์๋ฆฌ๋จผํธ๋ฅผ ์์ฑํ ๋ ๋ถ์ฌํด์ํ๋ ๊ฒ์ธ๋ฐ ์ฌ๊ธฐ์๋ map์ ์ฌ์ฉํ๊ณ ์์ง ์์ต๋๋ค. key prop ๋ถ์ฌํ๋ ์๋ฏธ๊ฐ ์์ด๋ณด์
๋๋ค,
๊ทธ๋ฆฌ๊ณ inline-style์ ์ง์ํด์ฃผ์๊ณ className์ ํตํ ์คํ์ผ๋ง ํด์ฃผ์ธ์, ๋๋จธ์ง ๋ถ๋ถ๋ ๋ง์ฐฌ๊ฐ์ง์
๋๋ค, |
@@ -0,0 +1,26 @@
+import React from 'react';
+
+class InputForm extends React.Component {
+ constructor(props) {
+ super(props);
+ }
+
+ render() {
+ return (
+ <form onSubmit={this.addContent}>
+ <input
+ name="comment"
+ className="replyInput"
+ type="text"
+ p... | JavaScript | currenState๋ผ๋ ํจ์๋ ๋ณด์ด์ง ์์ต๋๋ค! undefined๊ฐ ํ ๋น๋๊ณ ์์ ๊ฒ ๊ฐ๋ค์ |
@@ -0,0 +1,26 @@
+import React from 'react';
+
+class InputForm extends React.Component {
+ constructor(props) {
+ super(props);
+ }
+
+ render() {
+ return (
+ <form onSubmit={this.addContent}>
+ <input
+ name="comment"
+ className="replyInput"
+ type="text"
+ p... | JavaScript | addContent๋ ๋ง์ฐฌ๊ฐ์ง๋ก ์์ด๋ณด์
๋๋ค! |
@@ -0,0 +1,183 @@
+import React from 'react';
+import { withRouter } from 'react-router';
+import './JaehyunMain.scss';
+import Nav from '../../../components/Nav/Nav';
+import Content from './Content/Content';
+
+class JaehyunMain extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = ... | JavaScript | ```suggestion
this.setState({ newContent });
```
๊ฐ์ฒด ๋จ์ถ ์์ฑ๋ช
์ ์ด์ฉํ ์ ์์ต๋๋ค. |
@@ -0,0 +1,183 @@
+import React from 'react';
+import { withRouter } from 'react-router';
+import './JaehyunMain.scss';
+import Nav from '../../../components/Nav/Nav';
+import Content from './Content/Content';
+
+class JaehyunMain extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = ... | JavaScript | alt ์์ฑ์ด ์ต์๋จ์ ์์นํ๋๋ก ์์ ์กฐ์ ํด์ฃผ์ธ์ |
@@ -0,0 +1,183 @@
+import React from 'react';
+import { withRouter } from 'react-router';
+import './JaehyunMain.scss';
+import Nav from '../../../components/Nav/Nav';
+import Content from './Content/Content';
+
+class JaehyunMain extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = ... | JavaScript | className ์ฌ์ฉํด์ฃผ์ธ์ |
@@ -0,0 +1,280 @@
+.JaehyunMain {
+ .fixedTop {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ background-color: white;
+ border-bottom: 2px solid #ebebeb;
+
+ nav {
+ display: flex;
+ justify-content: space-between;
+ padding: 15px;
+ max-width: 1100px;
+ width: 10... | Unknown | ์ต์์ ๋ค์คํ
ํ๋ ์์์ ํด๋์ค๋ค์์ ์ปดํฌ๋ํธ ๋ช
๊ณผ ๋์ผํ๊ฒ ๋ถ์ฌํด์ฃผ์๊ณ , ํด๋์ค ๋ค์์ ์ด์ฉํด์ ์ต์์ ๋ค์คํ
์ ํด์ฃผ์๋๊ฒ ๋ค๋ฅธ ์ปดํฌ๋ํธ์ css ์ถฉ๋์ด ๋ฐ์ํ ํ๋ฅ ์ ๋ฎ์ถ ์ ์์ต๋๋ค. |
@@ -0,0 +1,280 @@
+.JaehyunMain {
+ .fixedTop {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ background-color: white;
+ border-bottom: 2px solid #ebebeb;
+
+ nav {
+ display: flex;
+ justify-content: space-between;
+ padding: 15px;
+ max-width: 1100px;
+ width: 10... | Unknown | section์ ์ด๋ฏธ display:block์ ์์ฑ์ด๊ธฐ๋๋ฌธ์, width:100%๋ฅผ ๋ถ์ฌํ ํ์๊ฐ ์์ต๋๋ค. |
@@ -0,0 +1,280 @@
+.JaehyunMain {
+ .fixedTop {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ background-color: white;
+ border-bottom: 2px solid #ebebeb;
+
+ nav {
+ display: flex;
+ justify-content: space-between;
+ padding: 15px;
+ max-width: 1100px;
+ width: 10... | Unknown | ๊ฐ๋ฅํ ํ๊ทธ ์
๋ ํฐ๋ณด๋ค ํด๋์ค๋ค์์ ๋ถ์ฌํด์ ์ ํํด์ฃผ์ธ์! ํ๊ทธ์
๋ ํฐ๋ฅผ ์ฌ์ฉํ ๊ฒฝ์ฐ ๋ค๋ฅธ ์์๋ค์ ์ํฅ์ ๋ฏธ์น ์ฌ์ง๊ฐ ์์ต๋๋ค! |
@@ -0,0 +1,280 @@
+.JaehyunMain {
+ .fixedTop {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ background-color: white;
+ border-bottom: 2px solid #ebebeb;
+
+ nav {
+ display: flex;
+ justify-content: space-between;
+ padding: 15px;
+ max-width: 1100px;
+ width: 10... | Unknown | ์ด๋ ๊ฒ ์์ฃผ ์ฌ์ฉํ๋ ์์ฑ๋ค์ mixin์ผ๋ก ๋ง๋ค์ด์ ์ฌ์ฉํด๋ ์ข๊ฒ ๋ค์ |
@@ -0,0 +1,280 @@
+.JaehyunMain {
+ .fixedTop {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ background-color: white;
+ border-bottom: 2px solid #ebebeb;
+
+ nav {
+ display: flex;
+ justify-content: space-between;
+ padding: 15px;
+ max-width: 1100px;
+ width: 10... | Unknown | ์ฐ์ฑ๋ ๋ฆฌ๋ทฐ ๋๋ฌด ๊ฐ์ฌํฉ๋๋ค! |
@@ -0,0 +1,9 @@
+# ํ์ด 1 - Counter ์ด์ฉ
+from collections import Counter
+
+def solution(participant, completion):
+ # Counter๋ฅผ ์ด์ฉํ๋ฉด ๋ฆฌ์คํธ ๋ด์ ์ฑ๋ถ์ ์ซ์๋ฅผ ๋์
๋๋ฆฌ ํํ๋ก ๋ฐํํด์ค๋ค
+ # ex) list1 =['a', 'b', 'c', 'a'] => Counter(list1) : {'a':2, 'b':1, 'c':1}
+ not_completion = Counter(participant) - Counter(completion) # Counter์ ... | Python | `Counter`๋ฅผ ์ด์ฉํ๋ ๋ฐฉ๋ฒ์ด ๊ต์ฅํ ์ ์ฉํ๊ตฐ์ ! ๐ฏ |
@@ -0,0 +1,21 @@
+package lotto.constants;
+
+public enum ErrorMessage {
+ DUPLICATION("[ERROR] ๊ฐ์ด ์ค๋ณต๋์์ต๋๋ค"),
+ ISNOTINTEGER("[ERROR] ์ซ์๋ฅผ ์
๋ ฅํด์ฃผ์ธ์"),
+ SIXNUMBER("[ERROR] ๋ฒํธ 6๊ฐ๋ฅผ ์
๋ ฅํด์ฃผ์ธ์"),
+ OUTFRANGE("[ERROR] ๋ก๋ ๋ฒํธ๋ 1๋ถํฐ 45 ์ฌ์ด์ ์ซ์์ฌ์ผ ํฉ๋๋ค."),
+ ONENUMBER("[ERROR] ์ซ์ ๋ฒํธ 1๊ฐ๋ฅผ ์
๋ ฅํด์ฃผ์ธ์"),
+ NOTTHOUSAND("[ERROR] ... | Java | ์ค๋ณต๋๋ ๋ถ๋ถ์ ๋ํด์ ์์์ฒ๋ฆฌ ํด์ค๋ ์ข์๊ฑฐ๊ฐ์์ |
@@ -0,0 +1,50 @@
+package lotto.controller;
+
+import lotto.model.Lotto;
+import lotto.model.LottoNumberMaker;
+import lotto.model.LottoPercentageCalculation;
+import lotto.model.constants.LottoPrize;
+import lotto.view.LottoInput;
+import lotto.view.LottoOutput;
+
+import java.util.ArrayList;
+import java.util.List;
+... | Java | ์ปจํธ๋กค๋ฌ ์์ ๋๋ถ๋ถ์ ๋ฉ์๋์ ๋ณ์๋ฅผ static ์ฒ๋ฆฌํ ๋ณ๋์ ์ด์ ๊ฐ ์๋์? |
@@ -0,0 +1,79 @@
+package lotto.model;
+
+import lotto.model.constants.LottoPrize;
+
+import java.util.List;
+import java.util.Objects;
+import java.util.function.Predicate;
+
+import static lotto.constants.ErrorMessage.DUPLICATION;
+import static lotto.constants.ErrorMessage.SIXNUMBER;
+import static lotto.model.const... | Java | bonus์ ๊ฒฝ์ฐ longํ์ ์ฌ์ฉํ ์ด์ ๊ฐ ์๋์?
๊ทธ๋ฆฌ๊ณ ํด๋น ๋ฉ์๋๊ฐ lotto ๋๋ฉ์ธ์์ ๊ผญ ์ ์ธ๋์ผ ํ๋ ์ด์ ๊ฐ ์๋์ง ๊ถ๊ธํฉ๋๋ค !!(lotto๊ฐ์ฒด๊ฐ ๊ฐ์ง๋ ๋ณ์๋ฅผ ์ฌ์ฉํ์ง ์์๊ฑฐ ๊ฐ์์์ !!) |
@@ -0,0 +1,67 @@
+package lotto.model;
+
+import camp.nextstep.edu.missionutils.Randoms;
+import lotto.controller.LottoController;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+
+import static lotto.constants.ErrorMessage.ISNOTINTEGER;
+... | Java | Lotto๊ฐ List'<'Integer'>'ํ์ ๊ฐ์ง๋๋ฐ List'<'Lotto'>'๋ก ๋ง๋ค์๋ค๋ฉด ์ด๋จ๊น์ ?! |
@@ -0,0 +1,67 @@
+package lotto.model;
+
+import camp.nextstep.edu.missionutils.Randoms;
+import lotto.controller.LottoController;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+
+import static lotto.constants.ErrorMessage.ISNOTINTEGER;
+... | Java | ๋๋ฉ์ธ์์ ์ปจํธ๋กค๋ฌ๋ฅผ ์ฌ์ฉํ ์ด์ ๊ฐ ๊ถ๊ธํฉ๋๋ค |
@@ -0,0 +1,67 @@
+package lotto.model;
+
+import camp.nextstep.edu.missionutils.Randoms;
+import lotto.controller.LottoController;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+
+import static lotto.constants.ErrorMessage.ISNOTINTEGER;
+... | Java | ๋ก๋ ๊ตฌ์
๊ธ์ก๋ํ 1000์ผ๋ก ๊ณ ์ ์ํค๋ ๊ฒ ๋ณด๋ค ํ์ฅ์ฑ ์ธก๋ฉด์์ ๊ณ ๋ คํ์ฌ ์์ ์ฒ๋ฆฌํด์ ์ฌ์ฉํด๋ ์ข์๊ฑฐ๊ฐ์์ |
@@ -1,5 +1,7 @@
package lotto;
+import lotto.model.Lotto;
+import lotto.model.LottoNumberMaker;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
@@ -22,6 +24,11 @@ void createLottoByDuplicatedNumber() {
assertThatThrownBy(() -> new Lotto(List.of(1, 2, 3, 4, 5, 5)))
... | Java | ๋จ์ ํ
์คํธ๋ ๋๋ฉ์ธ ๋ณ๋ก ๋ค์ํ๊ฒ ์งํํด๋ณด๋ฉด ๋ ์ข์๊ฑฐ ๊ฐ์์ :) |
@@ -1,7 +1,13 @@
package lotto;
+import lotto.controller.LottoController;
+
public class Application {
public static void main(String[] args) {
- // TODO: ํ๋ก๊ทธ๋จ ๊ตฌํ
+ LottoController.setPrice();
+ LottoController.setBuyLottoNumberPrint();
+ LottoController.setPrizeNumberInput();
+ ... | Java | ์์๋๋ก ๋ชจ๋ ์คํํด์ผํ๋ค๋ฉด controller์์์ ํ๋์ ๋ฉ์๋๋ก ์คํํ๋ฉด ์กฐ๊ธ ๋ ์ฝ๋๊ฐ ๊น๋ํด์ง ๊ฒ ๊ฐ์์. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.