안녕하세요 제로초님 강의 잘 듣던 중 styled-component 적용이 안되는 것을 확인하고 질문 남깁니다. 현재 버전정보는 "dependencies" : { "@ant-design/icons" : "^4.2.1" , "antd" : "^4.4.3" , "next" : "^9.4.4" , "next-redux-wrapper" : "^6.0.2" , "prop-types" : "^15.7.2" , "react" : "^16.13.1" , "react-dom" : "^16.13.1" , "react-redux" : "^7.2.1" , "react-slick" : "^0.27.1" , "redux" : "^4.0.5" , "redux-devtools-extension" : "^2.13.8" , "styled-components" : "^5.1.1" } 이렇게 됩니다. 혹시 몰라 node_modules 삭제하고 다시 설치해보았지만 똑같이 적용 안되고 프로필페이지 이동 후 다시 돌아와도 적용 안되는거 확인했습니다. 어느 부분에서 문제가 발생한 걸까요?
안녕하세요 김영한님, 소중한 강좌 잘 보고 제것으로 소화 중입니다. 강좌 중에 성능 최적화 하면서 쿼리 실행횟수 1+n+n 을 1+1로 끌어올리는 과정을 보면서 호기심이 들었습니다. 논리적으로 쿼리 횟수를 세는게 아니라 프로그래머틱(?)하게 db로 몇 번 쿼리를 쏘는지 확인하는 방법이 있을까요? 엉뚱한 질문일 수 있는데 시간 조금만 할애해주셔서 답변 주시면 감사하겠습니다.
# %ls pandas\ n\ numpy/titanic titanic_df = pd.read_csv("pandas n numpy/titanic/train.csv") y_titanic_df = titanic_df.Survived x_titanic = titanic_df.drop("Survived", axis = 1) x_titanic_df = preprocess(x_titanic) x_train, x_test, y_train, y_test = train_test_split(x_titanic_df, y_titanic_df, test_size = 0.2, random_state = 0) myclf = MyDummyClassifier() myclf.fit(x_train, y_train) mypredictions = myclf.predict(x_test) print("Dummy Classifier의 정확도는: {0:.4f}".format(accuracy_score(y_test, mypredictions))) 강의 내용 중 MyDummyClassifier라는 클래스를 만들때 .fit 이라는 method는 아무것도 하지 않고 pass 시켰는데 위 코드에서 myclf.fit(x_train, y_train) 를 하는 이유가 따로 있나요?? 아직 파이썬의 class 관련 내용은 깊게 공부를 하지 않아 미숙하여 질문을 남기게 되었습니다.. 또한, 함수를 만들지 않고 클래스 따로 만들어 사용할때 특별한 장점이 있는지 궁금합니다!!!
1. PackatQueue 를 OnRecvcallback 을 통해 거치게되면 유니티에서 사용되는 메인쓰레드로 사용할 수 있다는 얘기로 들리는데. 유니티에서 그렇게 작동하도록 만든것인가요? 즉 유니티 오브젝트와 서버를 연동시키려면 쓰레드는 무조건 큐( Push , Pop )를 거쳐서 와야한다? 라고 유니티 측에서 규칙을 정해둔거? 그리고 2. 전 강의에서 설명하셨을 수도 있는데 너무 많은게 지나가서 질문 드립니다... HandlePacket 만으론 유니티와의 연동이 되지않은 걸로 보이는데 HandlePacket 을 자동화해서 사용하는 이유가 있나요. 제가 이해한 바로는 1번에 해당하는 경우에만 유니티가 제대로 작동되는 걸로 보여져 HandlePacket 은 뭘하는지 잘 모르겠습니다. 3. 기존에는 (유니티 연동 전) 백그라운드 풀에서 쓰레드를 뽑아와서 쓴다고 하셨는데.. 이 부분은 제가 잊은건지 모르겠지만.. 쓰레드 풀 자체를 어디서 생성해줬는지 기억이 가물가물합니다... 분명 첫수업시간 때 Task를 이용해 쓰레드 풀을 만드는 건 어렴풋이 기억이 나는데 그런 코드는 여기서 작성한 기억은 없고... 쓰레드 자체가 어디에서 왔는가에 대해 알려주실 수 있나요.. 메모하면서 진행해왔는데 찾기가 어렵네요. 4. 그리고 복습하는 도중에 알려주신 모든 부분을 응용해서 학습할 수 있게 해주신점 감사드립니다. 그런데 한가지 ThreadLocal을 이용한 최적화는 파이널 프로젝트에 응용한게 없는듯한데 파트 7정도 때에나 이런 것들을 한꺼번에 볼 수있을까요. 감사합니다. ---------------------------------------------------
안녕하세요, 강사님! 정말 친절한 설명 덕분에 이해가 잘 가는거 같습니다! 그런데 혹시 hello라는 url을 요청하면 이번 강의에서 만든 hello함수만을 실행시킬수 있는 이유가 @GetMapping이라는 어노테이션을 사용하는 모든 메서드를 스프링이 확인해 보는것 인가요?? 그리고 혹시, 첫 편에서 말씀하신 강의순서랑 올려주신 강의랑 이름이 맞지 않던데 JPA부터 듣는것이 맞는것 인가요? 아니면 아직 스프링 핵심 원리 및 스프링 mvc등의 강의는 올라오지 않은것 인가요? 감사합니다!
안녕하세요? IOU의 이해 강의에서 이해되지 않는 부분이 있어 질문 드립니다. Intersection 구역 넓이를 구하기 위해 좌상단 좌표와 우하단 좌표를 구하는 경우에 있어서, Intersection의 좌상단 X좌표는 각 GT, CB 박스의 좌상단 X좌표 중 큰(Max)값을 구하는 건 이해했습니다. 그런데 Intersection 좌상단의 Y좌표를 구할 때 코드를 보면 각 GT, CB 박스의 좌상단 Y좌표 중 큰(Max)값을 구하는게 잘 이해가 안됩니다. 반대로 작은(Min)값을 구해야 intersection 영역의 좌상단 Y좌표가 나오는 것이 아닌지.. 이와 유사하게 intersection의 우하단 영역의 Y좌표를 구하기 위해서는 GT, CB 박스 우하단의 Y좌표 중 큰(Max)값으로 구해야 하는 것이 아닌지요? 아니면 혹시 각 Box별 모서리 좌표의 Notation을 제가 잘못 이해하고 있는 것 같은데.. 설명 부탁드립니다.
안녕하세요! 그림판 처럼 보이는 곳에 도형이 이미 그려져 있고, 그것을 잘 따라 그리면 true, 잘 못 따라 그리면 false 라는걸 만들고 싶습니다. 모바일에서 동작하게 만들고 싶은데 도형을 잘 따라 그렸는지를 어떤식으로 확인 할 수 있을까요? 대략적인 방향을 잡아주시면 많은 도움이 될거같습니다 ㅠ 이러한 기능을 구현하려면 svg로 해야하는건지 canvas를 이용해야 하는지도 궁금합니다. 감사합니다!
안녕하세요. 따라하던 중에 src/test/resources 폴더를 만들어서 아래에 메모리모드로 설정하는 파일을 따로 두어 test 동작 시에는 그 application.yml을 읽도록 하는 부분에서 문제가 있는데 해결이 안돼서 질문드립니다! main아래의 yml파일을 지우면 test아래의 yml을 읽기는 하는데 main에도 있고 test에도 파일이 있으면 main 파일 밑에 yml을 읽어버려서 혹시 STS 를 사용하면 실행 시에 읽어드리는 우선순위를 설정해야하는 것인지 무슨 문제인지 궁금합니다.
안녕하세요, 강의 잘 보고 있습니다. @NamedEntityGraph로 N+1 select를 해결하는것은 잘 되는데요, 문득 궁금증이 생겨 @NamedEntityGraph를 제거하고 그냥 해당 필드에 EAGER를 붙여보았습니다. Notification entity를 조회할 때 참조하고있는 Tag entity를 같이 가져오는 것을 구현연습 하고 있었습니다. Notification.java @Entity @Getter @Setter @EqualsAndHashCode(of = "id") @NoArgsConstructor public class Notification { @Id @GeneratedValue private Long id; @Enumerated(EnumType.STRING) private NotificationType notificationType; private String title; private String link; private boolean ringBellChecked = false; private boolean linkVisited = false; @ManyToOne private Account account; @ManyToMany(fetch = FetchType.EAGER) private List<Tag> commonTag = new LinkedList<>(); private LocalDateTime createdDateTime; } NotificationRepository.java public interface NotificationRepository extends JpaRepository<Notification, Long> { List<Notification> findByAccount(Account sessionAccount); } 그리고 이를 활용하여 NotificationService.java @Transactional @RequiredArgsConstructor @Service public class NotificationService { private final NotificationRepository notificationRepository; public List<Notification> ringBellCheck(Account sessionAccount) { List<Notification> allNotification = notificationRepository.findByAccount(sessionAccount); allNotification.forEach(notification -> { notification.setRingBellChecked(true); }); return allNotification; } } 위와같은 작업을 처리합니다. 근데 현재 Notification이 3개가 존재할 때, 2020-07-28 10:14:57.791 DEBUG 15072 --- [nio-8080-exec-9] org.hibernate.SQL : select notificati0_.id as id1_2_, notificati0_.account_id as account_8_2_, notificati0_.created_date_time as created_2_2_, notificati0_.link as link3_2_, notificati0_.link_visited as link_vis4_2_, notificati0_.notification_type as notifica5_2_, notificati0_.ring_bell_checked as ring_bel6_2_, notificati0_.title as title7_2_ from notification notificati0_ where notificati0_.account_id=? 2020-07-28 10:14:57.792 TRACE 15072 --- [nio-8080-exec-9] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [BIGINT] - [1] 2020-07-28 10:14:57.840 DEBUG 15072 --- [nio-8080-exec-9] org.hibernate.SQL : select account0_.id as id1_0_0_, account0_.bio as bio2_0_0_, account0_.count_of_sending_email_verification_email as count_of3_0_0_, account0_.email_first_verified as email_fi4_0_0_, account0_.email_verification_token as email_ve5_0_0_, account0_.email_verified as email_ve6_0_0_, account0_.email_waiting_to_be_verified as email_wa7_0_0_, account0_.first_count_of_sending_email_verification_email_set_date_time as first_co8_0_0_, account0_.location as location9_0_0_, account0_.nickname as nicknam10_0_0_, account0_.nickname_before_update as nicknam11_0_0_, account0_.notification_comment_on_my_comment_by_email as notific12_0_0_, account0_.notification_comment_on_my_comment_by_web as notific13_0_0_, account0_.notification_comment_on_my_post_by_email as notific14_0_0_, account0_.notification_comment_on_my_post_by_web as notific15_0_0_, account0_.notification_like_on_my_comment_by_email as notific16_0_0_, account0_.notification_like_on_my_comment_by_web as notific17_0_0_, account0_.notification_like_on_my_post_by_email as notific18_0_0_, account0_.notification_like_on_my_post_by_web as notific19_0_0_, account0_.notification_my_interest_tag_added_to_existing_post_by_email as notific20_0_0_, account0_.notification_my_interest_tag_added_to_existing_post_by_web as notific21_0_0_, account0_.notification_new_post_with_my_interest_tag_by_email as notific22_0_0_, account0_.notification_new_post_with_my_interest_tag_by_web as notific23_0_0_, account0_.occupation as occupat24_0_0_, account0_.password as passwor25_0_0_, account0_.profile_image as profile26_0_0_, account0_.show_password_update_page_token as show_pa27_0_0_, account0_.sign_up_date_time as sign_up28_0_0_, account0_.user_id as user_id29_0_0_, account0_.verified_email as verifie30_0_0_ from account account0_ where account0_.id=? 2020-07-28 10:14:57.840 TRACE 15072 --- [nio-8080-exec-9] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [BIGINT] - [1] 2020-07-28 10:14:57.888 DEBUG 15072 --- [nio-8080-exec-9] org.hibernate.SQL : select commontag0_.notification_id as notifica1_3_0_, commontag0_.common_tag_id as common_t2_3_0_, tag1_.id as id1_8_1_, tag1_.title as title2_8_1_ from notification_common_tag commontag0_ inner join tag tag1_ on commontag0_.common_tag_id=tag1_.id where commontag0_.notification_id=? 2020-07-28 10:14:57.889 TRACE 15072 --- [nio-8080-exec-9] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [BIGINT] - [15] 2020-07-28 10:14:57.937 DEBUG 15072 --- [nio-8080-exec-9] org.hibernate.SQL : select commontag0_.notification_id as notifica1_3_0_, commontag0_.common_tag_id as common_t2_3_0_, tag1_.id as id1_8_1_, tag1_.title as title2_8_1_ from notification_common_tag commontag0_ inner join tag tag1_ on commontag0_.common_tag_id=tag1_.id where commontag0_.notification_id=? 2020-07-28 10:14:57.937 TRACE 15072 --- [nio-8080-exec-9] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [BIGINT] - [13] 2020-07-28 10:14:57.984 DEBUG 15072 --- [nio-8080-exec-9] org.hibernate.SQL : select commontag0_.notification_id as notifica1_3_0_, commontag0_.common_tag_id as common_t2_3_0_, tag1_.id as id1_8_1_, tag1_.title as title2_8_1_ from notification_common_tag commontag0_ inner join tag tag1_ on commontag0_.common_tag_id=tag1_.id where commontag0_.notification_id=? 2020-07-28 10:14:57.984 TRACE 15072 --- [nio-8080-exec-9] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [BIGINT] - [11] 2020-07-28 10:14:58.137 DEBUG 15072 --- [nio-8080-exec-9] org.hibernate.SQL : select count(notificati0_.id) as col_0_0_ from notification notificati0_ where notificati0_.account_id=? and notificati0_.ring_bell_checked=? 2020-07-28 10:14:58.137 TRACE 15072 --- [nio-8080-exec-9] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [BIGINT] - [1] 2020-07-28 10:14:58.137 TRACE 15072 --- [nio-8080-exec-9] o.h.type.descriptor.sql.BasicBinder : binding parameter [2] as [BOOLEAN] - [false] 이처럼 필드에 EAGER를 붙인것은 N+1 select 문제가 해결되진 않네요. 하나의 Notification만 Id로 조회했을 때는 Tag도 같이 가져오는걸 확인했습니다. 하지만 List<Notification>에서는 적용이 안되네요. 필드에 EAGER를 붙이는 것은 하나만 조회할 때 유효한 건가요? 그리고 NotificationInterceptor.java에서 SecurityContextHolder에서 세션객체 꺼내서 해당 세션객체로 Notification를 조회할 때는 왜 Account를 조회하는 쿼리는 안날아가나요? detached상태인데.. NotificationService에서 Account로 Notification을 조회했을 때는 새로 Account를 다시 조회하는 쿼리가 날아가는데..
안녕하세요~ 강의잘보고 있습니다!!! 강의를 듣다가 의존관계(DI) 주입관련해서 의문이 생겼습니다. 저는 기존에 @Autowired 어노테이션을 사용하여 의존관계를 설정하였는데 김영한님 뿐만 아니라 다른 블로그를 찾아봐도 생성자 주입을 통해 DI 설정을 하고 있는데 Autowired를 사용하지않고 생성자 주입했을 때의 장점을 알려주셨으면 좋겠습니다 ㅎㅎ
안녕하세요, 윈도우 환경에서 yarn 을 사용하여 create-react-app을 설치했습니다. create-react-app <프로젝트 이름>을 사용하여 프로젝트를 생성하려고 하는데, 아래와 같은 오류가 나면서 안되네요. 어떻게 해결해야 하나요?? Error: Cannot find module './encoding/utf8' Require stack: - C:\Users\charm\Documents\bus-control\node_modules\chardet\index.js - C:\Users\charm\Documents\bus-control\node_modules\external-editor\main\index.js - C:\Users\charm\Documents\bus-control\node_modules\inquirer\lib\prompts\editor.js - C:\Users\charm\Documents\bus-control\node_modules\inquirer\lib\inquirer.js - C:\Users\charm\Documents\bus-control\node_modules\react-dev-utils\browsersHelper.js - C:\Users\charm\Documents\bus-control\node_modules\react-scripts\scripts\init.js - C:\Users\charm\Documents\bus-control\[eval] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1065:15) at Function.Module._load (internal/modules/cjs/loader.js:911:27) at Module.require (internal/modules/cjs/loader.js:1125:19) at require (internal/modules/cjs/helpers.js:75:18) at Object.<anonymous> (C:\Users\charm\Documents\bus-control\node_modules\chardet\index.js:4:13) at Module._compile (internal/modules/cjs/loader.js:1236:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1257:10) at Module.load (internal/modules/cjs/loader.js:1085:32) at Function.Module._load (internal/modules/cjs/loader.js:950:14) at Module.require (internal/modules/cjs/loader.js:1125:19) { code: 'MODULE_NOT_FOUND', requireStack: [ 'C:\\Users\\charm\\Documents\\bus-control\\node_modules\\chardet\\index.js', 'C:\\Users\\charm\\Documents\\bus-control\\node_modules\\external-editor\\main\\index.js', 'C:\\Users\\charm\\Documents\\bus-control\\node_modules\\inquirer\\lib\\prompts\\editor.js', 'C:\\Users\\charm\\Documents\\bus-control\\node_modules\\inquirer\\lib\\inquirer.js', 'C:\\Users\\charm\\Documents\\bus-control\\node_modules\\react-dev-utils\\browsersHelper.js', 'C:\\Users\\charm\\Documents\\bus-control\\node_modules\\react-scripts\\scripts\\init.js', 'C:\\Users\\charm\\Documents\\bus-control\\[eval]' ]