학습 관련 질문을 최대한 상세히 남겨주세요! 고민 과정도 같이 나열해주셔도 좋습니다. 먼저 유사한 질문이 있었는지 검색해보세요. 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. [인기글 Producer&Consumer 테스트] 강의 6분 30초에서 좋아요 수는 userId는 유니크해야 좋아요 수가 중복없이 하나씩으로 집계된다고 말씀하셨습니다. 근데 비관적 락 방법 1과 2 그리고 낙관적 락 방법 모두 다 저희가 구현할 때, 따로 userId에 대한 중복 처리는 하지 않았는데 userId는 동일해도 상관 없지 않나 싶어서요. 비관적 락 방법 1 쿼리도 단순 where 조건은 articleId 뿐이라서 질문드려봅니다. 게시글 조회수는 redis로 key 생성할때, articleId와 userId를 활용해서 중복처리는 했는데, 게시글 좋아요수는 redis를 활용하지 않아서요!
asyncIO 스크랩핑 실습 중 macOS에서 SSL인증서 문제로 인해 추가적으로 인증서 설치 등을 진행해야 하더라구요. 아래와 같이 수정하여, 코드 실행에는 문제가 없었는데 비동기 예제이다보니 추가적으로 선언한 get_request를 사용 시 동기화 문제에서 자유로운지 궁금합니다. 제가 한 것은 아래와 같이 SSL 인증서 설치 (Python 3.13 ver) /Applications/Python\ 3.13/Install\ Certificates.command 일부 코드 수정 import ssl import certifi # 인증서 설정 ssl_context = ssl.create_default_context(cafile=cerfiti.where()) # 추가적으로 추가한 함수 def get_request(url): headers = {'User-Agent' : 'Mozila/5.0'} req = Request(url, headers=headers) return urlopen(req, context=ssl_context) async def fetch(url, executor): res = await loop.run_in_executor(executor, lambda: get_request(rul)) return res.read()
학습 관련 질문을 최대한 상세히 남겨주세요! 고민 과정도 같이 나열해주셔도 좋습니다. 먼저 유사한 질문이 있었는지 검색해보세요. 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. mysql 말고 마리아 디비로 진행하고 있는데 다음과 같은 오류가 납니다... java.sql.SQLException: (conn=47) Record has changed since last read in table 'article_like_count' 그래서 인지 count가 일정하지 않네요.. 이유가 있을까요
안녕하세요. 강의 잘 듣고 있습니다! restClient 사용시에 retrieve ignore로 테스트가 계속 실패 되네요. void인 경우 body(Void.class)하면 됐었는데 likePerformance 하는 경우 실패가 계속 되버려서요. 500에러라면서. body를 제거하고 하면 test 실패이고 해결방법 있을까요?
게시글 데이터 삽입 부분에서요, 영상 강의에서는 데이터 1200만건 삽입 하는데 대략 13분 정도 걸리는걸 확인 햇는데, 저는 2초만에 끝나더니 삽입된 갯수 확인해보니까 2만건만 추가 되고 더 추가 안된거같은데 어떤 문제가 있을가요?? 아래는 코드랑 영상에서 설명한 sql 설정값 첨부 했습니다. @SpringBootTest public class DataInitializer { @PersistenceContext EntityManager entityManager; @Autowired TransactionTemplate transactionTemplate; Snowflake snowflake = new Snowflake(); CountDownLatch latch = new CountDownLatch(EXECUTE_COUNT); static final int BULK_INSERT_SIZE = 2000; static final int EXECUTE_COUNT = 6000; @Test void initialize() throws InterruptedException { ExecutorService executorService = Executors.newFixedThreadPool(10); for(int i = 0; i < EXECUTE_COUNT; i++) { executorService.submit(() -> { insert(); latch.countDown(); System.out.println("latch.getCount() = " + latch.getCount()); }); } latch.await(); executorService.shutdown(); } void insert() { transactionTemplate.executeWithoutResult(status -> { for(int i = 0; i < BULK_INSERT_SIZE; i++) { Article article = Article.create( snowflake.nextId(), "title" + i, "content" + i, 1L, 1L ); entityManager.persist(article); } }); } }
아래 문제해설을 보니 pred = rf.predict(X_val) 로 반영 pred = rf.predict(test) 로 반영해도 문제없나요? # 랜덤포레스트 from sklearn.ensemble import RandomForestClassifier rf = RandomForestClassifier(random_state=0) rf.fit(X_tr, y_tr) pred = rf.predict(X_val) f1_score(y_val, pred, average='macro')
안녕하세요 해당수업중 강의 내용대로 했는데 실행시 아래와 같이 에러 뜨고 정상 실행이 안됩니다. TypeError: react_dom_1.default.findDOMNode is not a function at ReactQuill.getEditingArea ( http://localhost:3000/_next/static/chunks/node_modules_5754136c._.js:16760:43 ) at ReactQuill.instantiateEditor ( http://localhost:3000/_next/static/chunks/node_modules_5754136c._.js:16631:50 ) at ReactQuill.componentDidMount ( http://localhost:3000/_next/static/chunks/node_modules_5754136c._.js:16590:14 ) at LoadableComponent ( http://localhost:3000/_next/static/chunks/_2df4111c._.js:296:57 ) at WebEditorPage ( http://localhost:3000/_next/static/chunks/_2df4111c._.js:81:215 ) at ClientPageRoot ( http://localhost:3000/_next/static/chunks/node_modules_next_dist_1a6ee436._.js:2053:50 )
25년 5월 시점에서 하다보니깐, requests 강의를 들을때 클래스 파싱 하는 과정이 작동이 안되서 확인해보니, requests는 javascript 로 만들어진 동적 내용을 긁을 수 없다고 하더라구요. 그래서 selenium의 webdriver를 사용했는데, 작동은 되는데 불편한 점이 각 실행시마다 크롬 창이 떠요. 혹시 javascript도 requests로 파싱할 수 있는 방법 이 있을까요?
댓글의 path를 설정하는 과정에서 public CommentPath createChildCommentPath(String descendantsTopPath) { if (descendantsTopPath == null) { return CommentPath.create(path + MIN_CHUNK); } String childrenTopPath = findChildrenTopPath(descendantsTopPath); return CommentPath.create(increase(childrenTopPath)); } 이런식으로 findChildrenTopPath 를 설정하게 되는데 이 과정에서 동시성 이슈가 발생할 수 있을 것 같아 질문 드립니다. increase 하는 함수에서도 동시성 제어를 하는 파트가 없어 동시에 같은 계층의 댓글이 생성되면 id가 겹칠 것 같습니다!