code stringlengths 41 34.3k | lang stringclasses 8
values | review stringlengths 1 4.74k |
|---|---|---|
@@ -0,0 +1,137 @@
+package store.controller;
+
+import camp.nextstep.edu.missionutils.DateTimes;
+import java.util.ArrayList;
+import java.util.List;
+import store.domain.BuyProductParser;
+import store.domain.BuyProducts;
+import store.domain.FileReader;
+import store.domain.CustomerReceipt;
+import store.domain.Produ... | Java | FileReader๋ฅผ ์์ฑํ๋ ๊ฒ๋ณด๋ค ์์กด์ฑ ์ฃผ์
์ ํตํด ์ฌ์ฉํ์๋ฉด ์ถํ ํ๋ก๋ชจ์
์ ๊ฐ์ ธ์ค๋ ๋ฐฉ๋ฒ์ด ๋ฐ๋์ด๋ ์ฝ๊ฒ ์์ ์ด ๊ฐ๋ฅํด์ง ๊ฒ ๊ฐ์ต๋๋ค. |
@@ -0,0 +1,41 @@
+package store.domain;
+
+import java.time.LocalDateTime;
+import java.util.ArrayList;
+import java.util.List;
+import store.domain.vo.PromotionType;
+
+public class Promotions {
+
+ private static final int BUY_INDEX = 1;
+ private static final int FREE_GET_INDEX = 2;
+ private static final i... | Java | List<List<String>>์ผ๋ก ์ ๋ณด๋ฅผ ๋ฝ์๋ด๋ ๊ฒ์ ๋๋ฉ์ธ์ ์ญํ ์ด ์๋ view์ ์ญํ ์ ๋ ๊ฐ๊น์ด ๊ฒ ๊ฐ์ต๋๋ค. View์์ ์ด๋์ ๋์ ๋ฐ์ดํฐ๋ฅผ ๊ฐ๊ณตํ ํ DTO๋ฅผ ํตํด product๋ฅผ ์์ฑํ๋ ๊ฒ์ ์ด๋จ๊น์? |
@@ -0,0 +1,60 @@
+package store.domain;
+
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import store.domain.vo.ProductQuantity;
+import store.domain.vo.PromotionType;
+
+public class Promotion {
+
+ private final PromotionType promotionType;
+ private final ProductQua... | Java | ํ๋ก๋ชจ์
์์ฑ ๊ณผ์ ์ ๋ณด๋ฉด ํ์ฌ ์๊ฐ์ ๋ง์ถฐ ํ๋ก๋ชจ์
์ ์ฉ์ ์ ํ๋๋ฐ ์ฌ๊ณ ๋ฅผ ๋ฃ๋ ์๊ฐ๋์ ๋ฌผํ์ ์ฌ๋ ์๊ฐ์ด ๋ค๋ฅธ ๊ฒฝ์ฐ ๋ฌธ์ ๊ฐ ์๊ธธ ๊ฒ ๊ฐ์ต๋๋ค. |
@@ -0,0 +1,137 @@
+package store.controller;
+
+import camp.nextstep.edu.missionutils.DateTimes;
+import java.util.ArrayList;
+import java.util.List;
+import store.domain.BuyProductParser;
+import store.domain.BuyProducts;
+import store.domain.FileReader;
+import store.domain.CustomerReceipt;
+import store.domain.Produ... | Java | ์ด๋ ๊ฒ ์ฌ๋ฌ๋ฒ ํธ์ถ์ด ๋๋ค๋ฉด IO์์
์ด ๋์ด๋๊ฒ ๋๋ฉด์ ์ฑ๋ฅ์ ์ผ๋ก ์์ฌ์์ด ์๊ธธ ์ ์๋ค๊ณ ์๊ฐํฉ๋๋ค. List๋ฅผ ํตํด ํ๋ฒ์ ๋ณด๋ธ ํ IO์์
์ ํตํด ์ฒ๋ฆฌํ์๋๊ฒ์ ์ด๋ค๊ฐ์? |
@@ -0,0 +1,76 @@
+package store.view;
+
+import java.util.List;
+import store.view.dto.response.BuyProductResponse;
+import store.view.dto.response.ErrorResponse;
+import store.view.dto.response.FreeProductResponse;
+import store.view.dto.response.ProductCalculateResponse;
+
+public class OutputView {
+
+ private st... | Java | format์ ์์๋ฅผ ํตํด ์ฒ๋ฆฌํ๋ ๊ฒ์ ์ด๋ค๊ฐ์?
๋ง์ฝ ์ถ๋ ฅ ํ์์ด ์ข ๋ฌ๋ผ์ง๋ค๋ฉด ์์ ์ด ๋์ฑ ๋ฒ๊ฑฐ๋ก์ธ๊ฒ ๊ฐ์ต๋๋ค. |
@@ -0,0 +1,76 @@
+package store.view;
+
+import java.util.List;
+import store.view.dto.response.BuyProductResponse;
+import store.view.dto.response.ErrorResponse;
+import store.view.dto.response.FreeProductResponse;
+import store.view.dto.response.ProductCalculateResponse;
+
+public class OutputView {
+
+ private st... | Java | System.lineSeparator๋ฅผ ํตํ ์ค๋ฐ๊ฟ ์ฒ๋ฆฌ ๊ต์ฅํ ์ข์ ๊ฒ ๊ฐ์ต๋๋ค. |
@@ -0,0 +1,46 @@
+package store.domain.service;
+
+import java.util.ArrayList;
+import java.util.List;
+import store.domain.BuyProducts;
+import store.domain.Product;
+import store.domain.Products;
+import store.view.dto.response.PromotionResponse;
+
+public class PromotionChecker {
+
+ private static final int ZERO... | Java | ํ๋ก๋ชจ์
์ ํ์ธํ๋ ๋ถ๋ถ์ ๋ฐ๋ก ๋ฝ์ ์ด์ ๊ฐ ์์๊น์? |
@@ -0,0 +1,137 @@
+package store.controller;
+
+import camp.nextstep.edu.missionutils.DateTimes;
+import java.util.ArrayList;
+import java.util.List;
+import store.domain.BuyProductParser;
+import store.domain.BuyProducts;
+import store.domain.FileReader;
+import store.domain.CustomerReceipt;
+import store.domain.Produ... | Java | false์ isFreePromotion์ enum์ ํตํ ์ํ๋ฅผ ๋ํ๋ด๋ ์ด๊ฑฐํ์ผ๋ก ํ๋ ๊ฒ์ ์ด๋จ๊น์? |
@@ -0,0 +1,137 @@
+package store.controller;
+
+import camp.nextstep.edu.missionutils.DateTimes;
+import java.util.ArrayList;
+import java.util.List;
+import store.domain.BuyProductParser;
+import store.domain.BuyProducts;
+import store.domain.FileReader;
+import store.domain.CustomerReceipt;
+import store.domain.Produ... | Java | ์ด ๋ถ๋ถ์ outputView์์ ์์๋ฅผ ๊ด๋ฆฌํ๋ ๊ฒ์ด ๋ ์ข์ ๊ฒ ๊ฐ์ต๋๋ค |
@@ -0,0 +1,137 @@
+package store.controller;
+
+import camp.nextstep.edu.missionutils.DateTimes;
+import java.util.ArrayList;
+import java.util.List;
+import store.domain.BuyProductParser;
+import store.domain.BuyProducts;
+import store.domain.FileReader;
+import store.domain.CustomerReceipt;
+import store.domain.Produ... | Java | while์กฐ๊ฑด ์์ true๋ฅผ ๋ฃ๋ ๋ฐฉ์์ ๋งค์ฐ ์ข์ง ๋ชปํ ๋ฐฉ์์ด๋ผ๊ณ ์๊ณ ์์ต๋๋ค. ๋ฐ๋ก boolean๊ฐ์ ์ฌ์ฉํด์ ์กฐ๊ฑด์ ๋ฃ๋ ๊ฒ์ด ๋ ์ข์ ๊ฒ ๊ฐ์ต๋๋ค |
@@ -0,0 +1,63 @@
+package store.domain;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import store.domain.exception.ProductErrorCode;
+import store.domain.exception.ProductException;
+
+... | Java | Hash์ ๊ฒฝ์ฐ ์ฌ๊ธฐ์ ์ธ ์๊ฐ๋ณต์ก๋๋ก ์ข์ง๋ง ํน์ํ ์ํฉ์์๋ Hash์ ๊ฒฝ์ฐ ๊ต์ฅํ ๋๋ ค์ง ์ ์๋ค๊ณ ์๊ฐํฉ๋๋ค. ๋ฐ๋ผ์ Hash๋ณด๋จ ๋๋ฆฌ์ง๋ง ์์ ์ ์ธ ์ฑ๋ฅ์ ๊ฐ์ง๋ TreeMap๋ ์ถ์ฒ๋๋ฆฝ๋๋ค. ๊ทผ๋ฐ TreeMap์ ์ฌ์ฉํ๋ฉด ์์์ ๋ค๋ฅด๊ฒ ์ ๋ ฌ๋๋ค๋ ๋จ์ ์ด ์์ต๋๋ค. |
@@ -0,0 +1,168 @@
+## ๊ณ ๋ฏผ์ฌํญ
+
+**๊ณ ๋ฏผ**
+~~~
+๊ตฌํ์ ํ์ํ ์ํ ๋ชฉ๋ก๊ณผ ํ์ฌ ๋ชฉ๋ก์ ํ์ผ ์
์ถ๋ ฅ์ ํตํด ๋ถ๋ฌ์จ๋ค.
+src/main/resources/products.md๊ณผ
+src/main/resources/promotions.md ํ์ผ์ ์ด์ฉํ๋ค.
+~~~
+* ๋งํฌ๋ค์ด ํ์ผ์ ์๋ ๋ด์ฉ์ ์ด๋ป๊ฒ ๋ถ๋ฌ์ ์ฝ๋์ ์ ์ฉ์ํฌ ์ ์์๊น?
+
+**ํด๊ฒฐ ๊ณผ์ **
+* BufferedReader ๋ฅผ ์ฌ์ฉํ์ฌ ํ์ผ ๋ด์ฉ์ ํ ์ค์ฉ ์
๋ ฅ๋ฐ๋ ํ์์ผ๋ก ํ๋ค.
+* ๋ฐ์์จ ์ค์ ์ผํ(,)๋ก ๊ตฌ๋ถํ์ฌ ๋ถ๋ฆฌํ๋ค
+* ๋ถ๋ฆฌํ ๋ด์ฉ์ ์๋ง๊ฒ ์์๊ฐ ... | Unknown | README์ ๋ชจ๋ ์์ฑํ์ง ์๊ณ , ์ฌ๋ฌ๊ฐ๋ก ๋ถ๋ฆฌํ์ ์ด์ ๊ฐ ์์๊น์?? |
@@ -1,7 +1,19 @@
package store;
+import store.controller.StoreController;
+import store.domain.service.MemberShipCalculator;
+import store.domain.service.PromotionCalculator;
+import store.view.InputView;
+import store.view.OutputView;
+
public class Application {
public static void main(String[] args) {
... | Java | controller ๋ด๋ถ์์ ์์ฑ์ ์ฃผ์
์ผ๋ก ์ด๋ฏธ ๋ช
์๋ฅผ ํด๋์๋๋ฐ, ๊ฐ์ฒด ์์ฑ์ ํ๋ฒ ๋ ํ์ ์ด์ ๊ฐ ๊ถ๊ธํด์!
InputView์ OutputView๋ static์ผ๋ก ํธ์ถํ๊ณ ์๋์ฒ๋ผ ํ์๋ฉด ์ด๋จ๊น์??
```suggestion
StoreController storeController = new StoreController(new MemberShipCalculator(), new PromotionCalculateService());
``` |
@@ -0,0 +1,79 @@
+package store.domain;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map.Entry;
+import store.domain.vo.MemberShip;
+import store.domain.vo.ProductQuantity;
+import store.view.dto.response.BuyProductResponse;
+import store.view.dto.response.Free... | Java | ๋ฉ์๋๋ช
์ด ๋ชจ๋ ์ง๊ด์ ์ด์ด์ ์ข๋ค์๐ |
@@ -0,0 +1,54 @@
+package store.domain;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import store.domain.exception.ProductErrorCode;
+import store.domain.exception.ProductException;
+
+public class FileReader {
+
+ ... | Java | List<List<String>>์ผ๋ก ๊ตฌํํ์ ์ด์ ๊ฐ ๊ถ๊ธํฉ๋๋ค! |
@@ -0,0 +1,45 @@
+package store.domain;
+
+import store.domain.exception.ProductErrorCode;
+import store.domain.exception.ProductException;
+
+public enum ProductInfo {
+
+ COKE("์ฝ๋ผ", "1000"),
+ CIDER("์ฌ์ด๋ค", "1000"),
+ ORANGE_JUICE("์ค๋ ์ง์ฃผ์ค", "1800"),
+ SPARKLING_WATER("ํ์ฐ์", "1200"),
+ WATER("๋ฌผ", "500"),
... | Java | ํด๋น ๋ถ๋ถ์ ํ์ผ ๋ด์ ์๋ ๋ด์ฉ์ ํ์ฉํด์ ๊ตฌํํด์ผํ์ง ์๋์ฉ?? ๋ฐ๋ก ๋ช
์ํด๋์ ์ด์ ๊ฐ ๊ถ๊ธํฉ๋๋ค! |
@@ -0,0 +1,76 @@
+package store.view;
+
+import java.util.List;
+import store.view.dto.response.BuyProductResponse;
+import store.view.dto.response.ErrorResponse;
+import store.view.dto.response.FreeProductResponse;
+import store.view.dto.response.ProductCalculateResponse;
+
+public class OutputView {
+
+ private st... | Java | System.lineSeparator()๋ฅผ ํ์ฉํ ์ ์๊ตฐ์!! ๋ฐฐ์๊ฐ๋๋ค:) |
@@ -0,0 +1,6 @@
+package store.view.dto.request;
+
+public record MemberShipRequest(
+ boolean isMemberShip
+) {
+} | Java | ๋ถ๋ณ์์ ๋ช
์ํ ์ ์๋ record ์ฌ์ฉ ์ข๋ค์!!๐ |
@@ -0,0 +1,63 @@
+package store.domain;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import store.domain.exception.ProductErrorCode;
+import store.domain.exception.ProductException;
+
+... | Java | parse ํด๋์ค๋ domain๋ณด๋ค util ํจํค์ง ๋ด์ ์๋๊ฒ ์ ํฉํ๋ค๊ณ ์๊ฐํ๋๋ฐ, ์ํ๋์ ์๊ฒฌ์ ์ด๋ ์ ๊ฐ์? |
@@ -0,0 +1,54 @@
+package store.domain;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import store.domain.exception.ProductErrorCode;
+import store.domain.exception.ProductException;
+
+public class FileReader {
+
+ ... | Java | FileReader๋ util ํจํค์ง ๋ด์ ์๋๊ฒ ์ ํฉํ๋ค๊ณ ์๊ฐํฉ๋๋ค! |
@@ -0,0 +1,86 @@
+package store.domain;
+
+import java.util.Objects;
+import store.domain.vo.ProductName;
+import store.domain.vo.ProductPrice;
+import store.domain.vo.ProductQuantity;
+
+public class Product {
+
+ private final ProductName name;
+ private final ProductPrice price;
+ private final ProductQuant... | Java | ๋๋ฉ์ธ ํจํค์ง ๋ด์ ํด๋์ค๊ฐ ๋ง์ ๊ฒ ๊ฐ์์!
product์ promotion ๋ฑ์ ํจํค์ง๋ฅผ ํ๋ฒ ๋ ๋ง๋ค์ด์ ๋ถ๋ฆฌํด์ฃผ์๋ฉด ๋๋ฉ์ธ์ ์ญํ ์ด ๋ช
ํํ ๋ณด์ผ ๊ฒ ๊ฐ์์! |
@@ -0,0 +1,63 @@
+package store.domain;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import store.domain.exception.ProductErrorCode;
+import store.domain.exception.ProductException;
+
+... | Java | private ๋ฉ์๋๋ก ๋ฉ์๋๋ฅผ ๋ถ๋ฆฌํ๋ ๊ฒ์ ์ด๋จ๊น์? |
@@ -0,0 +1,56 @@
+package store.domain;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import store.domain.exception.ProductErrorCode;
+import store.domain.exception.ProductException;
+
+public class BuyProducts {
+
+ private... | Java | ๋ฐํํด์ค๋ ๋ฐ์ดํฐ์ ์์ ์ฑ์ ์งํค๊ธฐ ์ํด ์ฌ์ฉํ์
จ๊ตฐ์ ๋ฐฐ์๊ฐ๋๋ค |
@@ -0,0 +1,56 @@
+package store.domain;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import store.domain.exception.ProductErrorCode;
+import store.domain.exception.ProductException;
+
+public class BuyProducts {
+
+ private... | Java | ์ ๋ entry๋ฅผ ์ฝํ
๋ฅผ ๋ณผ ๋ ๋ณ๋์ ํด๋์ค ์์ฑ์ด ํ์์๊ณ ํธํด ๋ง์ด ์ฌ์ฉํ๋๋ฐ ์ด๋ ๊ฐ๋
์ฑ ๋ฉด์์ ๋ง์ด ๋จ์ด์ง๋ค๊ณ ๋๋๋๋ค ์ด๋ณด๋ค๋ ๋ฐ๋ก DTO๋ฅผ ๋ง๋๋๊ฒ ๋์๊ฒ ๊ฐ์ต๋๋ค |
@@ -0,0 +1,56 @@
+package store.domain;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import store.domain.exception.ProductErrorCode;
+import store.domain.exception.ProductException;
+
+public class BuyProducts {
+
+ private... | Java | ๋จ์ํ getProductsํ contains๋ฅผ ์ง์ ์ ์ผ๋ก ํ๊ธฐ๋ณด๋จ Products์ public ๋ฉ์๋๋ฅผ ๋ฐ๋ก ๋๋ ๊ฒ์ ์ด๋ค๊ฐ์? |
@@ -0,0 +1,79 @@
+package store.domain;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map.Entry;
+import store.domain.vo.MemberShip;
+import store.domain.vo.ProductQuantity;
+import store.view.dto.response.BuyProductResponse;
+import store.view.dto.response.Free... | Java | ์ํธ๋ฆฌ๋ฅผ ์ง์ ์ ์ผ๋ก ์ฌ์ฉํ๋ ๊ฒฝ์ฐ ์ฝ๋์ ๊ฐ๋
์ฑ์ด ๋จ์ด์ง๋ค๊ณ ์๊ฐํฉ๋๋ค. getKey(), getValue()๊ณผ ๊ฐ์ด ํค์ ๊ฐ์ผ๋ก ๋ํ๋ด๋ ๋ฉ์๋๋ ์ฝ๋๋ฅผ ์ฝ๋ ์ฌ๋์๊ฒ key๋ ๋ฌด์์ด์ง๋ถํฐ ์์ํ๊ฒ ๋์ด ๋ฐ๋ก ๋ง๋๋๊ฒ ์ข์๊ฒ๊ฐ์ต๋๋ค |
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Bucket
+ uuid = "F89D4C7C-1180-42EB-AF20-BEE64400FB01"
+ type = "1"
+ version = "2.0">
+</Bucket> | Unknown | ์ด ํ์ผ์ ๋ฌด์์ธ๊ฐ์ . .?
gitignore ๋ก ์์ฌ๋ฆฌ๋๊ฒ ์ข์๊ฒ๊ฐํธ์ |
@@ -10,11 +10,11 @@ import UIKit
class HomeViewController: UIViewController {
private var feeds: [Feed] = [
- Feed(username: "Woody", profileImage: "profileImage", title: "์ฐ๋ญ๋จน๋ค ๋ฐ์ ์๊ฐ", hashTags: [HashTag(hashTag: "#Guitar"), HashTag(hashTag: "#Jazz")]),
- Feed(username: "Woody", profileImage: ... | Swift | 550์ ์๋ฏธ๋ ๋ฌด์์ธ๊ฐ์ !
์๋ฏธ๊ฐ ์๋ค๋ฉด let์ผ๋ก ๋ช
๋ช
ํด์ ์ถํ์ ์ ์ง๋ณด์ ๋ ์์๋ณด๊ธฐ ์ฝ๊ฒํ๋๊ฒ์ด ์ข์ ๋ฏํฉ๋๋ค ~ |
@@ -21,3 +21,25 @@ extension UICollectionViewCell {
NSStringFromClass(self.classForCoder()).components(separatedBy: ".").last!
}
}
+
+extension UIImage {
+
+ func applyBlur_usingClamp(radius: CGFloat) -> UIImage {
+ let context = CIContext()
+ guard let ciImage = CIImage(image: self),
+... | Swift | Swift๋ ์นด๋ฉ์ผ์ด์ค ~ ๐ซ |
@@ -21,3 +21,25 @@ extension UICollectionViewCell {
NSStringFromClass(self.classForCoder()).components(separatedBy: ".").last!
}
}
+
+extension UIImage {
+
+ func applyBlur_usingClamp(radius: CGFloat) -> UIImage {
+ let context = CIContext()
+ guard let ciImage = CIImage(image: self),
+... | Swift | ๊ณ์ extension์ด ๋์ด๋ ์์ ์ด๋ผ๋ฉด UIImage+.swift ๋ก ๋ณ๋๋ก ๋นผ๋ฉด์ด๋จ๊น์ฅ |
@@ -20,27 +20,106 @@ class FeedCollectionViewCell: UICollectionViewCell {
return stackView
}()
- // ์๋จ
+ // UpperBar
private let feedUpperBar: UIStackView = {
let stackView = UIStackView()
stackView.axis = .horizontal
stackView.distribution = .fill
... | Swift | ```suggestion
private let feedUpperBarStackView: UIStackView = {
```
class๊ฐ StackView์ธ๊ฑด ๋ฐ๋ก ์์๋ณด๋ฉด ์ฝ๊ธฐ ํธํ ๊ฑฐ๊ฐ์์ฉ |
@@ -20,27 +20,106 @@ class FeedCollectionViewCell: UICollectionViewCell {
return stackView
}()
- // ์๋จ
+ // UpperBar
private let feedUpperBar: UIStackView = {
let stackView = UIStackView()
stackView.axis = .horizontal
stackView.distribution = .fill
... | Swift | ```suggestion
```
์ฌ์ฉํ์ง ์๊ฒ๋์๋ค๋ฉด ์ญ์ |
@@ -20,27 +20,106 @@ class FeedCollectionViewCell: UICollectionViewCell {
return stackView
}()
- // ์๋จ
+ // UpperBar
private let feedUpperBar: UIStackView = {
let stackView = UIStackView()
stackView.axis = .horizontal
stackView.distribution = .fill
... | Swift | ์ฌ๊ธฐ์ ํ์ค์ฉ ๋ฃ๋๊ฑด ์ฐ๋๋ง์ ์คํ์ผ์ธ๊ฑด๊ฐ์?
๊ทธ์ ๊ถ๊ธ์ฐ |
@@ -20,27 +20,106 @@ class FeedCollectionViewCell: UICollectionViewCell {
return stackView
}()
- // ์๋จ
+ // UpperBar
private let feedUpperBar: UIStackView = {
let stackView = UIStackView()
stackView.axis = .horizontal
stackView.distribution = .fill
... | Swift | property์ด๋ฆ๊ณผ ์ฃผ์์ด ๊ฐ๋ค๋ฉด ๊ฐ ์ฃผ์์ด ์ฌ๋ผ์ ธ๋ ๋์ง ์์๊น์ ..? |
@@ -10,11 +10,11 @@ import UIKit
class HomeViewController: UIViewController {
private var feeds: [Feed] = [
- Feed(username: "Woody", profileImage: "profileImage", title: "์ฐ๋ญ๋จน๋ค ๋ฐ์ ์๊ฐ", hashTags: [HashTag(hashTag: "#Guitar"), HashTag(hashTag: "#Jazz")]),
- Feed(username: "Woody", profileImage: ... | Swift | ์๋ฏธ๋ ์์๋๋ค.. ๋์ผ๋ก ๋๊ฐ height ์์ต๋๋ค let์ผ๋ก ๋ณ์ ์ ์ธํ๋๊ฒ์ ํด๋น func ๋ด๋ถ์ ์ ์ธํ๋ ๊ฒ์ด ์ข๊ฒ ์ฃ ? |
@@ -20,27 +20,106 @@ class FeedCollectionViewCell: UICollectionViewCell {
return stackView
}()
- // ์๋จ
+ // UpperBar
private let feedUpperBar: UIStackView = {
let stackView = UIStackView()
stackView.axis = .horizontal
stackView.distribution = .fill
... | Swift | ์์ ์ฃผ์ ๋ง์์ด์ ๊ฐ์? |
@@ -20,27 +20,106 @@ class FeedCollectionViewCell: UICollectionViewCell {
return stackView
}()
- // ์๋จ
+ // UpperBar
private let feedUpperBar: UIStackView = {
let stackView = UIStackView()
stackView.axis = .horizontal
stackView.distribution = .fill
... | Swift | ์ฃผ์์ ์ ์๊ฒ ์ผ์ข
์ ์์ญ ํ์์ ๊ฐ์ต๋๋ค
๊ตณ์ด ์กด์ฌํ์ง ์์๋ ๋ ์๋ ์์ง๋ง ์ฌ๊ธฐ ๋ญ๊ฐ๊ฐ ์๋ค๋ผ๋ ๋๋์ ์ธ ๋๋์ด๋๊น์ |
@@ -20,27 +20,106 @@ class FeedCollectionViewCell: UICollectionViewCell {
return stackView
}()
- // ์๋จ
+ // UpperBar
private let feedUpperBar: UIStackView = {
let stackView = UIStackView()
stackView.axis = .horizontal
stackView.distribution = .fill
... | Swift | ํค์๋๋ฅผ ์ฌ๋ฌ๊ฐ ๋ถ์ฌ๋ ๋๋๊ตฐ์? ์๊ฐ๋ ์ํด๋ดค์ต๋๋ค |
@@ -10,11 +10,11 @@ import UIKit
class HomeViewController: UIViewController {
private var feeds: [Feed] = [
- Feed(username: "Woody", profileImage: "profileImage", title: "์ฐ๋ญ๋จน๋ค ๋ฐ์ ์๊ฐ", hashTags: [HashTag(hashTag: "#Guitar"), HashTag(hashTag: "#Jazz")]),
- Feed(username: "Woody", profileImage: ... | Swift | > ๋์ผ๋ก ๋๊ฐ height ์์ต๋๋ค
๐ค ..?????
> let์ผ๋ก ๋ณ์ ์ ์ธํ๋๊ฒ์ ํด๋น func ๋ด๋ถ์ ์ ์ธํ๋ ๊ฒ์ด ์ข๊ฒ ์ฃ ?
๋ฌผ๋ก ์ด์ฃ ! |
@@ -20,27 +20,106 @@ class FeedCollectionViewCell: UICollectionViewCell {
return stackView
}()
- // ์๋จ
+ // UpperBar
private let feedUpperBar: UIStackView = {
let stackView = UIStackView()
stackView.axis = .horizontal
stackView.distribution = .fill
... | Swift | L60๊ณผ ๊ฐ์ ๊ฐํ ์ด์ผ๊ธฐ๋๋ฆฐ๊ฑฐ์์ด์ ! |
@@ -20,27 +20,106 @@ class FeedCollectionViewCell: UICollectionViewCell {
return stackView
}()
- // ์๋จ
+ // UpperBar
private let feedUpperBar: UIStackView = {
let stackView = UIStackView()
stackView.axis = .horizontal
stackView.distribution = .fill
... | Swift | ๊ฐ์ธ์ ์ธ ์คํ์ผ์ด๋ค์ ! ๐ |
@@ -18,6 +18,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
+import java.util.stream.Collectors;
@Slf4j
@RestController
@@ -26,12 +27,24 @@ public class OrderController {
private final OrderService orderService;
private final BasketService basketService;
+
+ /*
... | Java | (C) ๋ถํ์ํ IOException์ธ ๊ฒ ๊ฐ์ต๋๋ค. |
@@ -11,6 +11,7 @@
import java.io.IOException;
+// (Q) Custom deserializer๋ฅผ ๊ตฌํํ ์ด์ ๊ฐ ๋ฌด์์ธ๊ฐ์? Jackson ๋ฑ์ serializer๋ฅผ ์ฌ์ฉํ๊ธฐ ์ด๋ ค์ด ๋ถ๋ถ์ด ์๋์?
public class StoreDeserializer extends StdDeserializer {
public StoreDeserializer(){ | Java | > ๋ค ์ฌ์ค Menu ๋ฐ์ดํฐ์๋ ๋ค๋ฅด๊ฒ Store ๋ฐ์ดํฐ๋ Point๋ผ๋ spring์์ ์ ๊ณตํ๋ ๊ฐ์ฒด๋ฅผ property๋ก ๊ฐ์ง๊ณ ์์ต๋๋ค. ๊ทธ๋ฐ๋ฐ objectMapper์ readValue()๋ก๋ Store.class๋ฅผ ๋ฐ๋ก ์ญ์ง๋ ฌํ์ํค์ง ๋ชปํ๋๋ฐ ๊ทธ๊ฑด ๋ฐ๋ก Point๋ฅผ objectMapper๊ฐ ํด์ํ์ง ๋ชปํ๊ธฐ ๋๋ฌธ์ด๋๋ผ๊ณ ์. JSONObject.get()์ ์ฌ์ฉํด์ ํ๋ํ๋ ๊น์ ์ญ์ง๋ ฌํํด๋ ๋์ง๋ง, convertStoreData() ๋ฉ์๋๊ฐ ๊ธธ์ด์ง๋ ๊ฒ ๋ณด๊ธฐ ์ซ์ด์ Custom deserializer๋ฅผ ์ฌ์ฉํด์ ํ๋ฐฉ์ ์ฒ๋ฆฌ๋๊ฒ๋ ๋ณด์ด๋๋ก(?) ํ์ต๋๋ค. ์ฌ์ค D... |
@@ -5,27 +5,32 @@
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.EnumSet;
import java.util.List;
+import java.util.stream.Collectors;
@RestController
-@RequestMapping("/customer")
+@RequestMapping("/customer") // (R) HomeController์์ url... | Java | >HomeController์ home()์ ํน๋ณํ ์ด์ ์์ด ์ด๊ธฐ์ ์๋ฒ๊ฐ ์ ๋์๊ฐ๋์ง ํ
์คํธ ํ๋ ค๊ณ ๋ฃ์ด๋์ ํ
์คํธ ์ฉ๋์ ์ฝ๋์
๋๋ค. Customer, Restaurant, Rider ์ธ๊ฐ์ง ์๋ฒ๋ฅผ ๋์ฐ๋ค๋ณด๋ White Error ํ์ด์ง๋ก๋ ํท๊ฐ๋ ค์ ์์๋ก ์์ฑํ๋ ์ฝ๋์ธ๋ฐ, ํ
์คํธ ์ฉ๋๊ธฐ ๋๋ฌธ์ ์์ด๋ ๋ฌธ์ ๊ฐ ์์ต๋๋ค. ํด๋น ์ฝ๋์๋ ์ฃผ์์ ๋ฃ์ด์ผ ํ์๋ค์.
> customer, restaurant, rider ์๋ฒ ๋ชจ๋ home controller๋ฅผ ๊ฐ์ง๊ณ ์๋๋ฐ, ์ฌ์ค ์ฃผ ์ฉ๋๋ ์๋ฒ๊ฐ ๋์๊ฐ๋์ง ๋ณด๋ ค๊ณ ๋ง๋ค์ด๋ ๊ฒ์
๋๋ค. url prefix๋ ์ปจํธ... |
@@ -18,6 +18,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
+import java.util.stream.Collectors;
@Slf4j
@RestController
@@ -26,12 +27,24 @@ public class OrderController {
private final OrderService orderService;
private final BasketService basketService;
+
+ /*
... | Java | > Customer๋น Basket์ ํ๋๋ง ๊ฐ์ง๋ค๊ณ ์๊ฐํด์ CustomerId๋ฅผ ๋ฐ๋ก BasketId๋ก ์ฌ์ฉํ์ต๋๋ค.
๋ฌผ๋ก ๋์ผํ ๊ฐ์ id๋ก ์ฌ์ฉํ์๋ ๊ฒ๋ ๊ธฐ๋ฅ ๋์์ ๋ฌธ์ ๊ฐ ์๊ฒ ์ง๋ง, basketId์ customerId๋ฅผ ๊ทธ๋๋ก ์ฌ์ฉํ๋ ๊ฒ์ ์ผ๋จ ์ฝ๋์ ์๋ ํ์
์ด ์ด๋ ต๊ณ , ์ดํ ๋ถ์ฌ๋๋ id๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ๋ฐ์ดํฐ๋ฅผ ๊ฒ์ํ ํ
๋ฐ ๊ทธ ๋๋ ์ค์๋ฅผ ์ ๋ฐํ ์ฌ์ง๊ฐ ์๋ ๊ฒ ๊ฐ์ต๋๋ค.
์ฝ๋ ์์ค์์ ์ค์๋ฅผ ์๋ฐฉํ ์ ์๋ ๋ถ๋ถ์ด ์๋ค๋ฉด ํญ์ ๋ฐฉ์ดํ๋๋ก ์์ฑํ๋ ๊ฒ์ด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค! |
@@ -18,6 +18,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
+import java.util.stream.Collectors;
@Slf4j
@RestController
@@ -26,12 +27,24 @@ public class OrderController {
private final OrderService orderService;
private final BasketService basketService;
+
+ /*
... | Java | > Repository์์ ์ต๊ด์ ์ผ๋ก create์ดํ id๋ฅผ ๋ฐํํ๋ ๋ก์ง์ ์ฌ์ฉํ๋ค๋ณด๋ ์ด๋ ๊ฒ ์์ฑํ๋๋ฐ, ์๊ฐํด๋ณด๋ order ์์ฒด๋ฅผ ๊ฐ์ ธ์ค๋ฉด getOrder()๋ ์ฌ์ฉํ์ง ์์๋ ๋๋ ์ฟผ๋ฆฌ ํ ๋ฒ์ ์ ์ฝํ๊ฒ ๊ตฐ์. ์ง์ ํด์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค.
๋ง์ํด์ฃผ์ ๋ถ๋ถ๋ order ๊ฐ์ฒด๋ก ์ฒ๋ฆฌํ๋ ๊ฒ์ ์ฅ์ ์ผ๋ก ๋ณผ ์ ์์ ๊ฒ ๊ฐ์ต๋๋ค.
๋ค๋ง ์ ๊ฐ ๋ฆฌ๋ทฐ๋๋ฆฐ ๊ด์ ์ ์กฐ๊ธ ๋ค๋ฅธ ๋ถ๋ถ์
๋๋ค.
string ํ์
์ ๋ฒ์ฉ์ ์ธ primitive ํ์
์ด๊ธฐ ๋๋ฌธ์, ํด๋์ค ์์ฒด๋ก์จ๋ ํฐ ์๋ฏธ๋ฅผ ๊ฐ์ง ์์ต๋๋ค. (๋จ์ง string์ ์ญํ ์ ํ๋ ๊ธฐ๋ฅ๋ค์ ์ ๊ณตํ ๋ฟ์ด๊ฒ ์ฃ )
ํ์ง๋ง... |
@@ -11,6 +11,7 @@
import java.io.IOException;
+// (Q) Custom deserializer๋ฅผ ๊ตฌํํ ์ด์ ๊ฐ ๋ฌด์์ธ๊ฐ์? Jackson ๋ฑ์ serializer๋ฅผ ์ฌ์ฉํ๊ธฐ ์ด๋ ค์ด ๋ถ๋ถ์ด ์๋์?
public class StoreDeserializer extends StdDeserializer {
public StoreDeserializer(){ | Java | ๋ค ๋์ผํ ๋ณ์๋ช
์ผ๋ก ์ฒ๋ฆฌํ์ง๋ง, custom deserializer๋ฅผ ์ฌ์ฉํ์ง ์์ผ๋ฉด ๋ค์๊ณผ ๊ฐ์ ์๋ฌ๊ฐ ๋ฐ์ํฉ๋๋ค.
_Cannot construct instance of `org.springframework.data.geo.Point` (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)_
Point๋ผ๋ ๊ฐ์ฒด๋ฅผ objectMapper๊ฐ ๋ชจ๋ฅด๊ธฐ ๋๋ฌธ์ ๋ฐ์ํ ์ผ์ด๋ผ๊ณ ํ๋๊ตฐ์. ์๋๋ c... |
@@ -11,6 +11,7 @@
import java.io.IOException;
+// (Q) Custom deserializer๋ฅผ ๊ตฌํํ ์ด์ ๊ฐ ๋ฌด์์ธ๊ฐ์? Jackson ๋ฑ์ serializer๋ฅผ ์ฌ์ฉํ๊ธฐ ์ด๋ ค์ด ๋ถ๋ถ์ด ์๋์?
public class StoreDeserializer extends StdDeserializer {
public StoreDeserializer(){ | Java | @millwheel
์ Point๊ฐ ๊ธฐ๋ณธ ์์ฑ์๊ฐ ์๊ตฐ์.
์ ๊ฐ ์๊ณ ์๋ ์ผ๋ฐ์ ์ธ serializer์ deserialize ๋ฐฉ์์, ๋จผ์ ๊ธฐ๋ณธ ์์ฑ์๋ก ๊ฐ์ฒด๋ฅผ ์์ฑํ๊ณ setter๋ฅผ ํตํด ๊ฐ์ฒด ํ๋๋ฅผ settingํ๋ ๋ฐฉ์์ผ๋ก ์๊ณ ์์ต๋๋ค.
๊ทธ๋ฐ๋ฐ ๊ธฐ๋ณธ ์์ฑ์๊ฐ ์๋ค๋ณด๋ ๊ฐ์ฒด๋ฅผ ์์ฑํ๋ ๊ณผ์ ์์ ์๋ฌ๊ฐ ๋๋ ๊ฒ ๊ฐ๋ค์~
์ฌ์ค point ํด๋์ค์ ๊ด๋ จํด์๋ ๋ฆฌ๋ทฐ ๋๋ฆฌ๋ ค๊ณ ํ๋๋ฐ, ์ดํ ๊ด๋ จ ๋ฆฌ๋ทฐ์์ ๋ ์๊ธฐํด๋ณด๊ฒ ์ต๋๋ค~ |
@@ -19,11 +19,16 @@
@RestController
@Slf4j
+/*
+ (C) foodKind๋ QueryParam์ผ๋ก ๋ฐ๋ ๊ฒ์ด ๋ restful ํด๋ณด์
๋๋ค.
+ ๋ํ showStoreInfo์์๋ foodKind๋ฅผ ์ฌ์ฉํ์ง ์๊ธฐ ๋๋ฌธ์, ๊ฐ๋ณ ๋ฉ์๋์์ ๋งตํํ๋ ๊ฒ์ด ์ข์ ๋ณด์
๋๋ค.
+*/
@RequestMapping("/customer/{foodKind}/store")
public class StoreController {
private final MemberService memberService;
priv... | Java | > Q) @RequiredArgConstructor๋ฅผ Entity์์ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ ์
๋ ฅ๋ Property์ ์์๋ฅผ ๋ฐ๊ฟจ์ ๋ ๋ ๊ฐ์ ํ์
์ property๋ผ๋ฉด ๋ฌธ์ ๊ฐ ๋๋ ๊ฒฝ์ฐ๊ฐ ์๋๋ผ๊ณ ์. ์์ฑ์๋ฅผ ์์ฑํ ๋ ๋งค๊ฐ๋ณ์ ์
๋ ฅ ์์๋ฅผ ๋ฐ๊พธ์ง ์์๋ ์ปดํ์ผ ๊ณผ์ ์์ ์๋ฌ๊ฐ ๋ฐ์ํ์ง ์์์ ์๋ชป๋ ๊ฐ์ด ๋ค์ด์๋ ์บ์นํ ์ ์์ด์ ์์ @RequiredArgConstructor๋ฅผ ์ฌ์ฉํ์ง ๋ง์๊ณ ํ๋ ๊ธ๋ ๋ดค์์ต๋๋ค. ๋ฌผ๋ก Controller๋ผ์ ๊ฐ์ ํ์
์ property๊ฐ ์์ผ๋๊น ์ฌ๊ธฐ์ ๋ฌธ์ ๊ฐ ์๊ฒ ์ง๋ง, ์ค์ ๋ก @requiredargsconstructor๋ฅผ ํธ์์ ... |
@@ -0,0 +1,28 @@
+# ๊ธฐ๋ฅ ์๊ตฌ ์ฌํญ
+
+1. ์ํ ๋ชฉ๋ก ์กฐํ
+
+ - [x] API๋ฅผ ํตํด ์ํ ๋ชฉ๋ก์ ๊ฐ์ ธ์ฌ ์ ์๋ค.
+ - [x] ๋งจ ์ฒ์ API ํธ์ถ ์ 20๊ฐ์ ๋ชฉ๋ก์ ๋ถ๋ฌ์จ๋ค.
+ - [x] ์ด ํ ์ถ๊ฐ API ํธ์ถ ์ 4๊ฐ์ ๋ชฉ๋ก์ ๋ถ๋ฌ์จ๋ค.
+ - [x] ๋ฌดํ ์คํฌ๋กค์ ํ ์ ์๋ค.
+
+2. ์ํ ์ ๋ ฌ ๋ฐ ํํฐ๋ง
+
+ - [x] ์ํ ์นดํ
๊ณ ๋ฆฌ๋ณ ํํฐ๋ง์ ํ ์ ์๋ค.
+ - [x] ์ํ์ ์ ๋ ฌ ํ ์ ์๋ค. (๋ฎ์ ๊ฐ๊ฒฉ ์, ๋์ ๊ฐ๊ฒฉ ์)
+
+3. ์ํ ์ฅ๋ฐ๊ตฌ๋ ๋ด๊ธฐ
+
+ - [x] ์ฌ์ฉ์๊ฐ ๋ด๊ธฐ ๋ฒ... | Unknown | ์ฌ์ํ์ง๋ง, ์ฌ๊ธฐ ๋ง์ง๋ง ๋ถ๋ถ ์ฒดํฌ๋ฆฌ์คํธ๊ฐ ๋น ์ ธ์๋ค์! ์์ง ๊ตฌํ ๋ชปํ ๋ถ๋ถ์ผ๊น์?! |
@@ -4,17 +4,21 @@
"version": "0.0.0",
"type": "module",
"scripts": {
- "dev": "vite",
+ "dev": "vite --host",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"test": "vitest"
},
"depend... | Unknown | ์ ์ด๋๋ styled-components๋ฅผ ์ฌ์ฉํ ์ด์ ๊ฐ ์์๊น์? ์ ์ด๋์ ์๊ฒฌ์ด ๊ถ๊ธํ๋ค์! ๐ซ |
@@ -0,0 +1,28 @@
+# ๊ธฐ๋ฅ ์๊ตฌ ์ฌํญ
+
+1. ์ํ ๋ชฉ๋ก ์กฐํ
+
+ - [x] API๋ฅผ ํตํด ์ํ ๋ชฉ๋ก์ ๊ฐ์ ธ์ฌ ์ ์๋ค.
+ - [x] ๋งจ ์ฒ์ API ํธ์ถ ์ 20๊ฐ์ ๋ชฉ๋ก์ ๋ถ๋ฌ์จ๋ค.
+ - [x] ์ด ํ ์ถ๊ฐ API ํธ์ถ ์ 4๊ฐ์ ๋ชฉ๋ก์ ๋ถ๋ฌ์จ๋ค.
+ - [x] ๋ฌดํ ์คํฌ๋กค์ ํ ์ ์๋ค.
+
+2. ์ํ ์ ๋ ฌ ๋ฐ ํํฐ๋ง
+
+ - [x] ์ํ ์นดํ
๊ณ ๋ฆฌ๋ณ ํํฐ๋ง์ ํ ์ ์๋ค.
+ - [x] ์ํ์ ์ ๋ ฌ ํ ์ ์๋ค. (๋ฎ์ ๊ฐ๊ฒฉ ์, ๋์ ๊ฐ๊ฒฉ ์)
+
+3. ์ํ ์ฅ๋ฐ๊ตฌ๋ ๋ด๊ธฐ
+
+ - [x] ์ฌ์ฉ์๊ฐ ๋ด๊ธฐ ๋ฒ... | Unknown | ++ README์ ์์ฑํ๊ธฐ๋ณด๋ค, REQUIREMENTS์ ์์ฑํ์ ์ด์ ๊ฐ ์์๊น์? |
@@ -4,17 +4,21 @@
"version": "0.0.0",
"type": "module",
"scripts": {
- "dev": "vite",
+ "dev": "vite --host",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"test": "vitest"
},
"depend... | Unknown | styled-component์
emotion ์ ์ ํ
์ฌ์ค ์ ๋ ๋ ๋ค์ฌ์ฉํด๋ณด๊ณ emotion์ ๋ ์ ํธํ์ง๋ง,
์ด๋ฒ ๋ฏธ์
์์๋ ์ด ๋์ ์ ํ์ ๋ํด์ ํฌ๋ฃจ์ ์๊ฒฌ์ ๋ฐ๋์ต๋๋ค.
emotion์ ์ข ๋ ์ ํธํ๋ ์ด์ :
styled-component๋ฅผ ๋ค๋ฅธํ์ผ์ ๊ณ์ ๋ง๋ค์ด ์ค ํ์ ์์
๋์ ์ธ css๋ฅผ ์ฌ์ฉํ๊ณ ์ถ์ ๋ ์ข ๋ ํธํ๋ค๊ณ ๋๊ผ์
์
๋๋ค. |
@@ -0,0 +1,28 @@
+# ๊ธฐ๋ฅ ์๊ตฌ ์ฌํญ
+
+1. ์ํ ๋ชฉ๋ก ์กฐํ
+
+ - [x] API๋ฅผ ํตํด ์ํ ๋ชฉ๋ก์ ๊ฐ์ ธ์ฌ ์ ์๋ค.
+ - [x] ๋งจ ์ฒ์ API ํธ์ถ ์ 20๊ฐ์ ๋ชฉ๋ก์ ๋ถ๋ฌ์จ๋ค.
+ - [x] ์ด ํ ์ถ๊ฐ API ํธ์ถ ์ 4๊ฐ์ ๋ชฉ๋ก์ ๋ถ๋ฌ์จ๋ค.
+ - [x] ๋ฌดํ ์คํฌ๋กค์ ํ ์ ์๋ค.
+
+2. ์ํ ์ ๋ ฌ ๋ฐ ํํฐ๋ง
+
+ - [x] ์ํ ์นดํ
๊ณ ๋ฆฌ๋ณ ํํฐ๋ง์ ํ ์ ์๋ค.
+ - [x] ์ํ์ ์ ๋ ฌ ํ ์ ์๋ค. (๋ฎ์ ๊ฐ๊ฒฉ ์, ๋์ ๊ฐ๊ฒฉ ์)
+
+3. ์ํ ์ฅ๋ฐ๊ตฌ๋ ๋ด๊ธฐ
+
+ - [x] ์ฌ์ฉ์๊ฐ ๋ด๊ธฐ ๋ฒ... | Unknown | ์๊ตฌ์ฌํญ์ด๋ผ์ REQUIREMENTS๋ก ๋ช
๋ช
ํ์ต๋๋ค.
README์๋ ํ๋ก์ ํธ ๋ด์ฉ์๋ํ ์๊ฐ ๋ฑ์ ์ฐ๋ ํธ์ธ ๊ฒ ๊ฐ์ต๋๋ค |
@@ -0,0 +1,29 @@
+import ItemCard from "@/components/ItemCard";
+import styled from "styled-components";
+import { flexCenter } from "@/styles/common";
+import { Product } from "@/types/products";
+import SeaOtterVideo from "@/components/SeaOtterVideo";
+
+const ItemCardList = ({ products, isLoading }: { products: Prod... | Unknown | ์ฌ๊ธฐ์ product.id ๊ฐ key ๊ฐ์ด ์๋๋ผ Math.random ์ผ๋ก ์ฃผ์ ์ด์ ๊ฐ ๋ฐ๋ก ์์ผ์ค๊น์ฉ ?? |
@@ -0,0 +1,15 @@
+import * as S from "@/components/Header/style";
+
+export const HeaderMain = ({ children }: React.PropsWithChildren) => {
+ return <S.Header>{children}</S.Header>;
+};
+
+export const Title = ({ text }: { text: string }) => {
+ return <S.Title>{text}</S.Title>;
+};
+
+const Header = Object.assign(He... | Unknown | ๋๋ฌด ์ข์์~! |
@@ -0,0 +1,29 @@
+import ItemCard from "@/components/ItemCard";
+import styled from "styled-components";
+import { flexCenter } from "@/styles/common";
+import { Product } from "@/types/products";
+import SeaOtterVideo from "@/components/SeaOtterVideo";
+
+const ItemCardList = ({ products, isLoading }: { products: Prod... | Unknown | ์๋ฒ์์ ๊ฐํ์ ์ผ๋ก ์ค๋ณต๋ key ๋ฅผ ๋ฐํํ๋ ๋ฌธ์ ๊ฐ ์์ด์ ํ ๋ฒ์ฉ ๋์ผํ key ๊ฐ์ผ๋ก ์๋ฌ๊ฐ ๋ฐ์ํ๊ธฐ์ random ๊ฐ์ key ๋ก ์ค์ ํด์คฌ์ด์! |
@@ -0,0 +1,162 @@
+package store.controller;
+
+import static store.controller.PromotionController.getValidInput;
+
+import java.text.NumberFormat;
+import java.util.List;
+import store.model.Receipt;
+import store.view.InputView;
+import store.view.OutputView;
+import store.view.error.ErrorException;
+import store.vie... | Java | ์ ๊ฐ ์ ๋ฒ์๋ ์ฌ๊ท ํจ์๊ฐ ์์ข์ง ์์๊น๋ผ๋ ์์ผ๋ก ์๊ธฐ๋ฅผ ํ์์ง๋ง ์๋
3์ฃผ์ฐจ ํผ๋๋ฐฑ์ ๋ณด๋ ์ฌ๊ทํจ์๋ก ์ฒ๋ฆฌํ ์ ์๋ค๋ ๋ด์ฉ์ด ์๋๊ตฐ์... ์ฝ๋๋ฅผ ์ค์ผ ์ ์๋ค๋ฉด ์ฌ๊ท๋ ์ข์ ๊ฒ ๊ฐ์ต๋๋ค! |
@@ -0,0 +1,162 @@
+package store.controller;
+
+import static store.controller.PromotionController.getValidInput;
+
+import java.text.NumberFormat;
+import java.util.List;
+import store.model.Receipt;
+import store.view.InputView;
+import store.view.OutputView;
+import store.view.error.ErrorException;
+import store.vie... | Java | ์ ๋ ๋ชฐ๋๋ ๋ด์ฉ์ด์ง๋ง String format๊ณผ %-8s(8์นธ๋งํผ ์ผ์ชฝ์ ๋ ฌ ์ด๋ฐ์์ผ๋ก ์ฌ์ฉํด์ ์ ๋ ฌ์ ์๋ํ๋๊ตฐ์ |
@@ -0,0 +1,306 @@
+package store.controller;
+
+import camp.nextstep.edu.missionutils.DateTimes;
+import java.time.LocalDateTime;
+import java.util.List;
+import java.util.function.Function;
+import java.util.function.Supplier;
+import store.model.Product;
+import store.model.ProductStock;
+import store.model.Promotion... | Java | enum์ ์ฌ์ฉํด์ ์ฒ๋ฆฌํ ์ ์๋ ๋ถ๋ถ์
๋๋ค! |
@@ -1,7 +1,26 @@
package store;
+
+import store.controller.FrontController;
+import store.controller.ProductController;
+import store.controller.PromotionController;
+import store.view.InputView;
+import store.view.OutputView;
+
+
public class Application {
+
+
public static void main(String[] args) {
- ... | Java | ํด๋์ค๋ช
์ผ๋ก ์๋ฏธ๋ฅผ ์ ์ ์์ผ๋ฏ๋ก ๋ฉ์๋๋ช
์ ํํ์ํด๋ ๋ ๊ฑฐ ๊ฐ์ต๋๋ค |
@@ -0,0 +1,33 @@
+public class Calculator {
+ public double calculate(String expression) {
+ String[] tokens = expression.split(" ");
+ double currentResult = Double.parseDouble(tokens[0]);
+
+ for (int i = 1; i < tokens.length; i += 2) {
+ String operator = tokens[i];
+ do... | Java | Enum์ ์ฌ์ฉํด์ switch๋ฌธ์ ์ฌ์ฉํ์ง ์๋ ๋ฐฉํฅ์ผ๋ก ์ฝ๋๋ฅผ ์์ฑํด๋ด
์๋ค |
@@ -0,0 +1,33 @@
+public class Calculator {
+ public double calculate(String expression) {
+ String[] tokens = expression.split(" ");
+ double currentResult = Double.parseDouble(tokens[0]);
+
+ for (int i = 1; i < tokens.length; i += 2) {
+ String operator = tokens[i];
+ do... | Java | Calculator ํด๋์ค์ ์ฑ
์์ ๋ฌด์์ธ๊ฐ์.
ํ ํด๋์ค์ ์ฌ๋ฌ ๊ฐ์ ์ฑ
์์ด ์๋ ๊ฒ ๊ฐ์ต๋๋ค.
SCP์ ๋ํด์ ๊ณต๋ถํด๋ณด๊ณ ์ฝ๋๋ฅผ ์์ฑํด์ฃผ์ธ์ |
@@ -0,0 +1,34 @@
+public class Validator {
+ public boolean isValid(String expression) {
+ String[] tokens = expression.split(" ");
+
+ if (tokens.length % 2 == 0) {
+ return false;
+ }
+
+ if (!isNumeric(tokens[0])) {
+ return false;
+ }
+
+ for (int i... | Java | ํ ๋ฉ์๋๊ฐ ๋ง์ ์ญํ ์ ํด์ฃผ๋ ๊ฒ ๊ฐ์ต๋๋ค.
๊ฐ๊ฐ์ if๋ฌธ์ ์ฌ๋ฌ ๋ฉ์๋๋ก ๋๋์ด๋ณด์ธ์. |
@@ -1,5 +1,22 @@
+import java.util.Scanner;
+
public class Main {
public static void main(String[] args) {
- System.out.println("1 + 1 = 2");
+ Scanner scanner = new Scanner(System.in);
+ System.out.println("๊ณ์ฐํ ์์์ ์
๋ ฅํ์ธ์ (์: 30 + 20 / 2 * 4):");
+ String expression = scanner.nextLine(... | Java | Main ํด๋์ค์ ๋๋ฌด ๋ง์ ์ฑ
์์ด ์์ต๋๋ค.
SCP์ ๋ํด์ ๊ณต๋ถ ํด๋ณด๊ณ ์ฝ๋๋ฅผ ์์ฑํด์ฃผ์ธ์
* ์ฝ์์ ํ๋ฆฐํธํด์ฃผ๋ ๊ฒ๋ ํ๋์ ์ฑ
์์ผ๋ก ๋ด
๋๋ค |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | ์์๋ก ๋นผ๋๋๊ฒ ์ข์๋ฏ.
`server/categories.js`์๋ ์ ์๋์ด์๊ณ server๋ client๋ ๊ฐ์ด ์ฐ๊ฒ ๋ ํ
๋ฐ ์ด๋ป๊ฒ ์ฒ๋ฆฌํ ์ง ์ ํ๋๊ฒ ์ข์๋ฏ |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | `idle` ์ด๋ฒคํธ๊ฐ ๋ธ๋ผ์ฐ์ ์ฐฝ ํฌ๊ธฐ๋ฅผ ๋ณ๊ฒฝํ ๋ ๋๋ฌด ์์ฃผ ๋ฐ์ํ๋ฏ๋ก debounce ์ฒ๋ฆฌํ๋๊ฒ ์ข๊ฒ ์ |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | ์
๋ ฅ๊ฐ๋ ์๊ณ , ๋ฆฌํด๊ฐ๋ ๊ณ ์ ๊ฐ์ธ๋ฐ ํจ์๋ก ๋ง๋ค์ด์ ๋ฐํํ ์ด์ ๊ฐ ์์ด๋ณด์. |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | `mainPageLoad`์์ ๋ฐ์ดํฐ ๋ก๋ฉ์ด ๋๋๋ ์์ ์ ๋ง๊ฒ ๊ธฐ์กดํ์ ์ ๊ฑฐํ๋ `DataDelete`๋ฅผ ์ฒ๋ฆฌํด์ผํ ๋ฏ ํจ. |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | ์ดํ์
```suggestion
} else {
this.drawList[el.id].setMap(null);
delete this.drawList[el.id];
}
```
์ด๋ ๊ฒ ํด์ผํ์ง ์์๊น? |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | ํ์์์ ์ ๊ฑฐ |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | ๊ฐ์๊ธฐ ์ ๋๋ฌธ์๋ก ์์ํ ๊น์?
์ด๋ฆ๋ `deleteDraw` / `unsetDraw` ๋ฑ์ผ๋ก ํด์ผํ ๋ฏ |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | `0.01`์ ์์์ฒ๋ฆฌ |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | ์ด๊ฒ๋ง underscore๋ก ์์ํ๋ ์ด์ ๊ฐ ๋ชจ์์?
๊ทธ๋ฆฌ๊ณ ๋ค์ด๋ฐ์ผ๋ก ๋ฌด์จ ์ผ์ ํ๋ ๋ฉ์๋์ธ์ง ์์์ฑ๊ธฐ ํ๋๋ค์. |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | ๋ฆฌํด๊ฐ์ด ๊ธฐ์กด๊ฐ์ธ๊ฒ ์ด์ํ๋ฐ, ์ดํด๋ณด๋ ๋ฆฌํด๊ฐ ๋ฐ์์ ์ฐ๋๋ฐ๋ ์๋๊ฑฐ ๊ฐ์์. |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | ์ดํ ์ฝ๋๊ฐ `mainPageLoad`๋ ์ค๋ณต๋๋ ๋ถ๋ถ์ด ๋ง์๋ฐ ์ผ๋ฐํ ํด์ผ๊ฒ ๋ค์. |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | style์ inline์ผ๋ก ์ง์ ์ง์ ํ๋ ๊ฒ ๋ณด๋ค๋ style์ `less(css)`์ ์ ์ํ๊ณ class๋ช
์ toggle ํ๋ ๋ฐฉ์์ ์ฐ๋๊ฒ ์ข์์. |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | ์ฌ๊ธฐ๋ ๋ง์ฐฌ๊ฐ์ง |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | `closeFn` ์ด๋ ๊ฒ postfix๋ก ๋ค์ด๋ฐํ๋ ๊ฒ๋ ๋ค๋ฅธ ํจ์๋ค๊ณผ๋ ๋ค๋ฅธ ๋ฐฉ์์ผ๋ก ์ฒ๋ฆฌ๋์๋ค์.
ํต์ผ์ฑ์ ์ํด ๊ทธ๋ฅ ๋ผ๋๊ฒ ์ข๊ฒ ์.
`onClose` ์ ๋๋, ํน์ ์๋์ชฝ์ `handle~` ์ด๋ฐ์์ผ๋ก ์ผ์ผ๋ `handleToggle` ๋ญ ์ด๋ฐ์์ด์ด๋ ์ข๊ฒ ๊ณ ์. |
@@ -0,0 +1,62 @@
+import React, { Component } from 'react';
+import PropTypes from 'prop-types';
+import Drawing from './Drawing';
+import '../less/Toolbox.less';
+
+class DrawContainer extends Component {
+ static propTypes = {
+ drawingData: PropTypes.array.isRequired,
+ mapLoad: PropTypes.ob... | JavaScript | less ๋ก ๋นผ๋ด๊ธฐ |
@@ -0,0 +1,62 @@
+import React, { Component } from 'react';
+import PropTypes from 'prop-types';
+import Drawing from './Drawing';
+import '../less/Toolbox.less';
+
+class DrawContainer extends Component {
+ static propTypes = {
+ drawingData: PropTypes.array.isRequired,
+ mapLoad: PropTypes.ob... | JavaScript | {``} ๋ก ๊ฐ์ ํ์๊ฐ ์์ |
@@ -0,0 +1,438 @@
+import React, { Component } from 'react';
+import PropTypes from 'prop-types';
+import '../less/Drawing.less';
+import Button from '../Module/Button';
+import Line from '../CustomOverlay/Line';
+import Arrow from '../CustomOverlay/Arrow';
+import Circle from '../CustomOverlay/Circle';
+import ... | JavaScript | key ์ ์ ์๋์์ |
@@ -0,0 +1,438 @@
+import React, { Component } from 'react';
+import PropTypes from 'prop-types';
+import '../less/Drawing.less';
+import Button from '../Module/Button';
+import Line from '../CustomOverlay/Line';
+import Arrow from '../CustomOverlay/Arrow';
+import Circle from '../CustomOverlay/Circle';
+import ... | JavaScript | ์์๋ก ๋บ๊ฒ.
๊ณ ์ ๋ ๊ฐ์ด๋ผ๋ฉด state๋ก ์ ์ํ ํ์์์. |
@@ -0,0 +1,438 @@
+import React, { Component } from 'react';
+import PropTypes from 'prop-types';
+import '../less/Drawing.less';
+import Button from '../Module/Button';
+import Line from '../CustomOverlay/Line';
+import Arrow from '../CustomOverlay/Arrow';
+import Circle from '../CustomOverlay/Circle';
+import ... | JavaScript | icons์ ๋์ํ๋ overlay ์ ํํ์ธ๊ฑฐ ๊ฐ์๋ฐ ์์๋ก ๋นผ์
`const SHAPES = [{ icons: 'line', overlay: Line }, ...]` ์ด๋ฐ์์ผ๋ก ์ ์ํ๋๊ฒ ์ข๊ฒ ์. |
@@ -0,0 +1,438 @@
+import React, { Component } from 'react';
+import PropTypes from 'prop-types';
+import '../less/Drawing.less';
+import Button from '../Module/Button';
+import Line from '../CustomOverlay/Line';
+import Arrow from '../CustomOverlay/Arrow';
+import Circle from '../CustomOverlay/Circle';
+import ... | JavaScript | break; ์ํ๋ฉด ๋ฐฐ์ด ๊ณ์ ์ํํจ. |
@@ -0,0 +1,96 @@
+import React, { Component } from 'react';
+import '../less/Filter.less';
+import PropTypes from 'prop-types';
+import FilterBox from './FilterBox';
+import * as constants from '../constants';
+
+class Filter extends Component {
+ static propTypes = {
+ MyInfoButton: PropTypes.bool.is... | JavaScript | ์์... |
@@ -0,0 +1,96 @@
+import React, { Component } from 'react';
+import '../less/Filter.less';
+import PropTypes from 'prop-types';
+import FilterBox from './FilterBox';
+import * as constants from '../constants';
+
+class Filter extends Component {
+ static propTypes = {
+ MyInfoButton: PropTypes.bool.is... | JavaScript | css๋ก ๋นผ๋ด๊ธฐ |
@@ -0,0 +1,96 @@
+import React, { Component } from 'react';
+import '../less/Filter.less';
+import PropTypes from 'prop-types';
+import FilterBox from './FilterBox';
+import * as constants from '../constants';
+
+class Filter extends Component {
+ static propTypes = {
+ MyInfoButton: PropTypes.bool.is... | JavaScript | ๊ฐ์ํ์ ์์ |
@@ -0,0 +1,138 @@
+name: CI
+
+on:
+ pull_request:
+ types:
+ - closed
+
+env:
+ IMAGE: ${{ vars.NCR_REGISTRY }}/follow-app
+ IMAGE_LATEST: ${{ vars.NCR_REGISTRY }}/follow-app:latest
+
+jobs:
+ lint-test:
+ name: lint and test
+ uses: ./.github/workflows/DRF-test.yaml
+
+ send-discord-fail-message:
+... | Unknown | ๋ค๋ฅธ yaml ํ์ผ์ ์๋ workflow ๋ฅผ ๊ฐ์ ธ์์ ์ฌ์ฉํ์๋๊ฑฐ ๊ฐ์๋ฐ, ์์
๋ด์ ์๋ ๋ณ์๋ ๋ฐ๋ก ๊บผ๋ด์ ์ธ ์ ์๋์ ?? |
@@ -0,0 +1,49 @@
+name: DRF Test
+
+on:
+ push:
+ workflow_call:
+
+jobs:
+ lint:
+ name: black check
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-python@v4
+ with:
+ python-version: "3.11"
+ - name: install black
+ run: pip in... | Unknown | DB๊ด๋ จ ๋ณ์๋ค๋ secret์ผ๋ก ์ถ๊ฐํด์ฃผ์
์ ์ฒ๋ฆฌํด์ฃผ์๋ฉด ๋ ์ข์๊ฑฐ ๊ฐ์ต๋๋ค :) |
@@ -0,0 +1,138 @@
+name: CI
+
+on:
+ pull_request:
+ types:
+ - closed
+
+env:
+ IMAGE: ${{ vars.NCR_REGISTRY }}/follow-app
+ IMAGE_LATEST: ${{ vars.NCR_REGISTRY }}/follow-app:latest
+
+jobs:
+ lint-test:
+ name: lint and test
+ uses: ./.github/workflows/DRF-test.yaml
+
+ send-discord-fail-message:
+... | Unknown | health-check๋ ์ด๋ค์์ผ๋ก ํ์ธํ๊ฒ ๋๋๊ฑด์ง ๊ถ๊ธํฉ๋๋ค! |
@@ -0,0 +1,33 @@
+from django.core.management.base import BaseCommand
+from django.contrib.auth.models import User
+from tweet.models import Follow, Post
+
+
+class Command(BaseCommand):
+ def handle(self, **options):
+ # if db has user script doesn't work
+ if User.objects.filter(username="user0").exi... | Python | ์ด๋ฐ๋ฐฉ๋ฒ์ด ์๋ค๋ ๋ง์ด ๋ฐฐ์ฐ๊ณ ๊ฐ๋๋ค ๊ฐ์ฌํฉ๋๋ค |
@@ -0,0 +1,138 @@
+name: CI
+
+on:
+ pull_request:
+ types:
+ - closed
+
+env:
+ IMAGE: ${{ vars.NCR_REGISTRY }}/follow-app
+ IMAGE_LATEST: ${{ vars.NCR_REGISTRY }}/follow-app:latest
+
+jobs:
+ lint-test:
+ name: lint and test
+ uses: ./.github/workflows/DRF-test.yaml
+
+ send-discord-fail-message:
+... | Unknown | test๋ง ํ๊ธฐ ์ํด ๋ถ๋ฌ์ค๋ workflow๋ผ ๋ณ์๋ฅผ ๊ฐ์ ธ์ฌ ์๊ฐ์ ๋ชปํ๋ค์.
job๋ผ๋ฆฌ์ ๋ณ์ ๊ณต์ ๋ฐฉ๋ฒ์ผ๋ก ๊บผ๋ผ ์ ์์ ๊ฒ ๊ฐ๊ธด ํ๋ฐ ์๋๋ ์ํด๋ดค์ด์ |
@@ -0,0 +1,49 @@
+name: DRF Test
+
+on:
+ push:
+ workflow_call:
+
+jobs:
+ lint:
+ name: black check
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-python@v4
+ with:
+ python-version: "3.11"
+ - name: install black
+ run: pip in... | Unknown | ๋ง์์ ๋ค๋ง ์ ๋ถ๋ถ์ด ์์ ํ ํ
์คํธ๋ง์ ์ํ ๋ถ๋ถ์ด๋ผ ๊ด์ฐฎ์ ๊ฑฐ๋ผ๊ณ ์๊ฐํ์ด์
์๋ test์ฉ envํ์ผ์ git์ ๊ทธ๋๋ก ์ฌ๋ ค์ actions์์ ์ฌ์ฉํ์๋๋ฐ ์ ๊ฐ ์ค์๋ก ncp key๋ฅผ ๋ฃ์ด์ ์ฌ๋ฆฌ๋ ๋ฐ๋์ ๊ธํ๊ฒ ์์ ๊ฐ์ด ๋ณ๊ฒฝ๋ ๊ฑฐ์์.
์ ๋ ์ ๋ฐ์์ผ๋ก ์์ฑํ๊ธฐ์ ๋ณด๊ธฐ ์์ข์ ๋ณด์ฌ์ ์กฐ๊ธ ๋ ์ธ๋ จ๋ ๋ฐฉ์์ผ๋ก ๋ณ๊ฒฝํด ๋ณด๊ฒ ์ต๋๋ค |
@@ -0,0 +1,138 @@
+name: CI
+
+on:
+ pull_request:
+ types:
+ - closed
+
+env:
+ IMAGE: ${{ vars.NCR_REGISTRY }}/follow-app
+ IMAGE_LATEST: ${{ vars.NCR_REGISTRY }}/follow-app:latest
+
+jobs:
+ lint-test:
+ name: lint and test
+ uses: ./.github/workflows/DRF-test.yaml
+
+ send-discord-fail-message:
+... | Unknown | health-check๋ฅผ ํ์ธํ๋ ๋ถ๋ถ์ ์์ง ๋ง๋ค์ง ์์์ด์ ๋์ ์ DRF test๋ฅผ ํต๊ณผํ๋ฉด ์ ์ ๋์์ธ ๊ฑฐ๋ก ๊ฐ์ฃผํ๊ณ ๋ง๋ค๊ธด ํ์ด์
์ฌ์ค actions์์ health-check๋ฅผ ๊ตฌํํ๊ธฐ ์กฐ๊ธ ๊น๋ค๋ก์์ k8s ์ ์ฉํ๋ฉด์ health-check๋ ๊ตฌํ ํ ๊ณํ์
๋๋ค. |
@@ -0,0 +1,45 @@
+package calculator.model;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.function.BiFunction;
+
+public enum OperatorType {
+ ADDITION("+", (a, b) -> a + b),
+ SUBTRACTION("-", (a, b) -> a - b),
+ MULTIPLICATION("*", (a, b) -> a * b),
+ DIVISION("/", (a, b) -> {
+ ... | Java | ์ด๋ ๊ฒ ๋ฌธ์์ด์ ๋ฆฌํดํด์ค ํ์๊ฐ ์์๊น์? |
@@ -0,0 +1,17 @@
+package calculator.model;
+
+public class Operator {
+
+ public int calculate(String[] values) {
+ int result = Integer.parseInt(values[0]);
+
+ for (int i = 1; i < values.length; i += 2) {
+ String symbol = values[i];
+ int nextNumber = Integer.parseInt(values[i... | Java | Enum ์ฌ์ฉ๋ฒ์ ๋ค์ ๊ณต๋ถํด์ ์ ์ฉํด๋ด
์๋ค. Switch๋ฌธ์ ์ฌ์ฉํ์ง ์๋ ๋ฐฉ์์ผ๋ก์. |
@@ -0,0 +1,11 @@
+package calculator.view;
+
+import java.util.Scanner;
+
+public class InputView {
+ public String formulaInput() {
+ Scanner scanner = new Scanner(System.in);
+ System.out.print("์์์ ์
๋ ฅํ์ธ์ : ");
+ return scanner.nextLine();
+ }
+}
\ No newline at end of file | Java | ํด๋์ค์ ์ญํ ์ด ๋ ๊ฐ์ง ์กด์ฌํฉ๋๋ค
1. ๋ฌธ์์ด์ ๋ฐ๋๋ค
2. ๋ฌธ์์ด์ ๋๋๋ค
ํด๋์ค์ ์ฑ
์๊ณผ ์ญํ ์ ๋ํด์ ์๊ฐํด๋ด
์๋ค |
@@ -0,0 +1,27 @@
+package calculator.controller;
+
+import calculator.model.Operator;
+import calculator.util.FormulaParser;
+import calculator.view.InputView;
+import calculator.view.OutputView;
+
+public class CalculatorController {
+ private final Operator operator;
+ private final InputView inputView;
+ pr... | Java | ์ด ๋ณ์๊ฐ ์ด๋ค ์ญํ ์ ํ๋ ๋ณ์์ธ์ง ๋ณ์๋ช
๋ง ๋ณด๊ณ ์ ์ ์๊ฒ ๋ง๋ค์ด์ฃผ์ธ์ |
@@ -0,0 +1,17 @@
+package calculator.model;
+
+public class Operator {
+
+ public int calculate(String[] values) {
+ int result = Integer.parseInt(values[0]);
+
+ for (int i = 1; i < values.length; i += 2) {
+ String symbol = values[i];
+ int nextNumber = Integer.parseInt(values[i... | Java | ์ด๋ ๊ฒ ํด์ค ๊ฑฐ๋ฉด ํ๋์์ ์ง์ ์ ์ผ๋ก ์ ์ธํด์ฃผ๋ ๊ฒ์ด ๋ ๊น๋ํฉ๋๋ค |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.