1. 강의 내용과 관련된 질문인가요? 예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예 [질문 내용] 강의 내용중에 스프링 부트는 내장 서버가 있어 JAR 빌드 후 바로 실행할 수 있다고 말씀해주셨고, 일반 스프링 MVC는 WAS를 따로 연동하여 구동한다고 말씀해 주셨는데요 실제 배민같은 대규모 트래픽이 발생하는 곳에서는 내장형 WAS와 외장 WAS의 성능적인 차이가 크게 발생하는지 또는 거의 차이가 없는지 문의드립니다. ( '실제 편리함은 내장형이지만, 대규모 처리에는 성능상 외장 WAS가 효율적이다' 같은 의미가 있는지? )
문제를 풀때, 재귀함수를 사용하여 백트래킹 하는 방법이 있고 완전 탐색 for 문을 돌리는 방법 두가지가 있다고 했을때, 어느것을 사용하든지 관계 없나요? 본질적으로 모든 경우의 수 탐색하는 건 똑같은데 그 방법의 차이일 뿐인가요?? 만약 그렇다면 for 문으로 일일이 코딩하기 어려운 문제들을 재귀로 푼다고 생각하면 될까요?
소스코드: movies_df['genres_literal'] = movies_df['genres'].apply(lambda x : (' ').join(x)) count_vect = CountVectorizer(min_df=0, ngram_range=(1,2)) genre_mat = count_vect.fit_transform(movies_df['genres_literal']) print(genre_mat.shape) 에러 코드: InvalidParameterError Traceback (most recent call last) Cell In[99], line 10 8 count_vect = CountVectorizer(min_df=0, ngram_range=(1,2)) 9 # print(movies_df['genres_literal']) ---> 10 genre_mat = count_vect.fit_transform(movies_df['genres_literal']) File D:\dev03\anaconda\Lib\site-packages\sklearn\base.py:1467, in _fit_context.<locals>.decorator.<locals>.wrapper(estimator, *args, **kwargs) 1462 partial_fit_and_fitted = ( 1463 fit_method.__name__ == "partial_fit" and _is_fitted(estimator) 1464 ) 1466 if not global_skip_validation and not partial_fit_and_fitted: -> 1467 estimator._validate_params() 1469 with config_context( 1470 skip_parameter_validation=( 1471 prefer_skip_nested_validation or global_skip_validation 1472 ) 1473 ): 1474 return fit_method(estimator, *args, **kwargs) File D:\dev03\anaconda\Lib\site-packages\sklearn\base.py:666, in BaseEstimator._validate_params(self) 658 def _validate_params(self): 659 """Validate types and values of constructor parameters 660 661 The expected type and values must be defined in the `_parameter_constraints` (...) 664 accepted constraints. 665 """ --> 666 validate_parameter_constraints( 667 self._parameter_constraints, 668 self.get_params(deep=False), 669 caller_name=self.__class__.__name__, 670 ) File D:\dev03\anaconda\Lib\site-packages\sklearn\utils\_param_validation.py:95, in validate_parameter_constraints(parameter_constraints, params, caller_name) 89 else: 90 constraints_str = ( 91 f"{', '.join([str(c) for c in constraints[:-1]])} or" 92 f" {constraints[-1]}" 93 ) ---> 95 raise InvalidParameterError( 96 f"The {param_name!r} parameter of {caller_name} must be" 97 f" {constraints_str}. Got {param_val!r} instead." 98 ) InvalidParameterError: The 'min_df' parameter of CountVectorizer must be a float in the range [0.0, 1.0] or an int in the range [1, inf). Got 0 instea
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 안녕하세요 김영한 강사님 현재 진행중인 7. 스프링 MVC - 웹 페이지 만들기 강의 - 상품 목록 페이지 th:onclick 부분은 아래와 같이 작성되어 있고, <div class="row"> <div class="col"> <button class="btn btn-primary float-end" onclick="location.href='addForm.html'" th:onclick="|location.href='@{basic/items/add}'|" type="button">상품 등록 </button> </div> </div> 컨트롤러의 상품 등록 부분도 예제와 동일하게 작성되어 있습니다. @Controller @RequestMapping("/basic/items") @RequiredArgsConstructor public class BasicItemController { private final ItemRepository itemRepository; ...(생략) @GetMapping("/add") public String addForm() { return "basic/addForm"; } } 그런데 브라우저에서 등록 버튼을 누르면 /basic이 한 번 더 붙는데 이유가 궁금합니다.
체크예외와 언체크예외에 대해서 복구불가능한 문제와 언체크예외를 주로 사용해야하는 부분에 대해서 아래와 같이 이해했는데 이렇게 이해하면 될까요?? 1. 예외는 주로 복구 불가능한 이유가 예외가 발생하면 try~catch로 예외를 처리해서 정상흐름대로는 할순있지만, 예외가 발생한거에대해서 이를 복구해서 원했던결과대로 정상적으로 돌리는것은 불가능하기때문에 그런건가요?? + 애플리케이션내에서 코드를 통해서 복구할수는 없는건가요?? 체크예외에서는 예외가 발생하면 throws로 예외를 던져야하지만 이를 서비스나 컨트롤러에서는 try catch로 처리할순있어도 딱히 예외를 복구할순없다. 그래서 그냥 try~catch로 예외를 처리하지말고 예외를 발생시켜서 개발자가 로그를통해 예외를 인지하는게 낫다. 결국 그래서 throws를 할필요가없는 언체크예외가 낫다.
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? 예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예 [질문 내용] addItemV5 함수에서는 public String addItemV5(Item item) { itemRepository.save(item); return "redirect:/basic/items/"+item.getId(); } 보시다시피 return 값을 줄 때 리포지토리에 저장한 item의 id를 가져오는 것이 아니라 파라미터로 받은 item의 id를 가져와서 반환했는데, public String addItemV6(Item item, RedirectAttributes redirectAttributes) { Item savedItem = itemRepository.save(item); redirectAttributes.addAttribute("itemId", savedItem.getId()); redirectAttributes.addAttribute("status", true); return "redirect:/basic/items/{itemId}"; } v6 에서는 savedItem으로 저장한 item 자체를 가져와서 id를 넣어주는데, 혹시 차이점이 있을까요?
조금씩이지만 열심히 따라서 구현을 해 보려고 하지만 모르는게 너무 많아 조금은 힘드네요 그래도 강의 내용이 스텝 바이 스텝으로 상세해 아주 큰 도움이 됩니다 저희 중요 업무는 고객 요구 사항들 (텍스트/ 이미지)이 기록되어 있는 문서를 참조로 현재 개발된 디자인이 모든 요구 사항들을 다 잘 지켜서 개발이 완료된 건지를 체크하는 일입니다 기존에 일일히 하나하나 체크를 하다 보니 시간도 너무 오래 걸리고 일부 경험 많은 엔지니어의 경우 기존 경험에 의존해 체크가 누락되는 경우도 발생이 되고 있습니다 이에 고객 요구 사항들을 AI (gpt-4o)에게 학습시키고 완료된 디자인 문서를 프로프팅 창에 입력해 자동으로 미지원 항목을 체크해 알려주는 기능을 만드는 것이 목표입니다 이를 위해 프롬프트 창에 디자인 문서 (텍스트/ 파워포인트/ PDF/ JPG 등) 멀티모달 프롬프팅이 되어야 디자이너 스스로 자기가 만든 디자인 파일의 셀프 체크가 가능하기에 gpt-4o를 선택해서 구현을 할려고 합니다 여기서 중요한건 비교를 해야 하는 고객 요구 사항을 어떻게 gpt-4o에게 학습시키는지에 대해 잘 몰라 난감해서 문의 드립니다 가장 효과적인 학습 방법에 대한 조언을 주실 수 있으실지요? 사내 전용 우리 회사만의 GPT라면 비교 자료도 나만의 자료가 되는게 필요해서 문의 드립니다 답변 부탁 드리겠습니다 감사합니다
========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 안녕하세요, 해당 static 폴더에 index.html파일에 코드를 입력한후 서버 실행결과 whilelabel 에러가 뜹니다. 해결에 도움을 주시면 감사하겠습니다.. 콘솔 내용 :: Spring Boot :: (v3.3.3) 2024-08-26T17:27:55.146+09:00 INFO 4895 --- [ main] h.hello_spring.HelloSpringApplication : Starting HelloSpringApplication using Java 17.0.12 with PID 4895 (/Users/kipyo/Documents/스프링/hello-spring/out/production/classes started by kipyo in /Users/kipyo/Documents/스프링/hello-spring) 2024-08-26T17:27:55.148+09:00 INFO 4895 --- [ main] h.hello_spring.HelloSpringApplication : No active profile set, falling back to 1 default profile: "default" 2024-08-26T17:27:55.573+09:00 INFO 4895 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http) 2024-08-26T17:27:55.580+09:00 INFO 4895 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2024-08-26T17:27:55.580+09:00 INFO 4895 --- [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.28] 2024-08-26T17:27:55.606+09:00 INFO 4895 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2024-08-26T17:27:55.607+09:00 INFO 4895 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 433 ms 2024-08-26T17:27:55.743+09:00 WARN 4895 --- [ main] ion$DefaultTemplateResolverConfiguration : Cannot find template location: classpath:/templates/ (please add some templates, check your Thymeleaf configuration, or set spring.thymeleaf.check-template-location=false) 2024-08-26T17:27:55.768+09:00 INFO 4895 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port 8080 (http) with context path '/' 2024-08-26T17:27:55.772+09:00 INFO 4895 --- [ main] h.hello_spring.HelloSpringApplication : Started HelloSpringApplication in 0.793 seconds (process running for 0.952)
n = int(input()) hint = [list(map(int,input().split())) for _ in range(n)] answer = 0 #100 ~ 999 for a in range(1,10): # 100의 자리 for b in range(10): # 10의 자리 for c in range(10): # 1의 자리 if (a == b or b == c or c == a): continue cnt = 0 for arr in hint: number = list(map(int, str(arr[0]))) strike = arr[1] ball = arr[2] ball_count = 0 strike_count = 0 #스트라이크카운트 자리수,숫자 둘다 if number[0] == a: strike_count += 1 if number[1] == b: strike_count += 1 if number[2] == c: strike_count += 1 #볼카운트 자리수는 안맞고 숫자만 if a in number and number[0] != a: ball_count += 1 if b in number and number[1] != b: ball_count += 1 if c in number and number[2] != c: ball_count += 1 if ball == ball_count and strike == strike_count: cnt += 1 if cnt == n: answer += 1 print(answer)