inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

172만명의 커뮤니티!! 함께 토론해봐요.

closed 사용하는 이유

미해결

김영한의 실전 자바 - 고급 2편, I/O, 네트워크, 리플렉션

NormalCloseServer 할때 close()가 여러번 호출돼도 예방하는 코드가 있다고 했습니다. 그러면 V6SessionV6에서 closeAll() 하기전에 closed를 확인 안해도 되지 않나요?

  • java
  • 네트워크
  • 객체지향
tjrans303 댓글 2 좋아요 0 조회수 213

변수 초기화

해결됨

[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)

학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! 질문과 관련된 영상 위치를 알려주면 더 빠르게 답변할 수 있어요 먼저 유사한 질문이 있었는지 검색해보세요 여기서 처음처럼 20이 출력되도록 초기화?하려면 어떻게 해야 하나요? # 20 = 10 + 10 box = box + box box

  • python
  • 머신러닝
  • 빅데이터
  • pandas
  • 빅데이터분석기사
yorabbit08 댓글 2 좋아요 0 조회수 131

데이터 핸들링을 위한 판다스 기초1 시리즈 선택 질문

해결됨

[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)

시리즈 선택할때 저는 왼쪽처럼 대괄호 하나만 해도 데이터프레임처럼 나오는데 강의에는 오른쪽처럼 나오시더라구요 어떻게 된걸까요?

  • python
  • 머신러닝
  • 빅데이터
  • pandas
  • 빅데이터분석기사
코딩바보 댓글 2 좋아요 0 조회수 101

강의 자료 그림

미해결

김영한의 실전 자바 - 중급 1편

학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 안녕하세요 ~! 강의 자료에서 처럼 이런 자료들을 draw.io에서 만든다는 정보는 찾았는데요 ! 그 내부에서 어떤 템플릿을 사용하시는지 궁금합니다..! 몇 시간 동안 여러가지 클릭 해봤는데 못 찾아서요 ㅠㅠ 크래파스로 그은듯한 네모와 점선으로 연결된 화살표, dot 네모박스가 궁금합니다 !

  • java
  • 객체지향
강리눅스 댓글 1 좋아요 0 조회수 146

혹시 애플 M시리즈 사용하시는 분 중에 오류

미해결

내 업무를 대신 할 파이썬(Python) 웹크롤링 & 자동화 (feat. 주식, 부동산 데이터 / 인스타그램)

PackagesNotFoundError: The following packages are not available from current channels: - python=3.8.5* 이런거 나오면서 가상환경 설치가 안되면, conda create -n crawling_class -c conda-forge python=3.8.5 이렇게 하니까 해결되네요. Mt시리즈에서는 3.8.5버전이 기본지원이 안된다고함.

  • python
  • 웹-크롤링
hoonnews 댓글 0 좋아요 0 조회수 163

h2 데이터 베이스 버전 오류

미해결

자바 ORM 표준 JPA 프로그래밍 - 기본편

지금 현재 2가지 문제가 있는데 해결할 수있을까요? 해결방법을 알고 싶습니다 ㅠㅠ

  • java
  • jpa
주현 댓글 2 좋아요 0 조회수 289

구조체 강의 4:31 질문있습니다

해결됨

(2026 최신!) 일주일만에 합격하는 정보처리기사 실기

myCar.model[i] = '\0'; 은 세줄 위의 for에 영향을 받는 것 인가요?? 바로 위 } 에서 for문이 종료됐다고 생각했는데 myCar.model[i] = '\0'; 가 [i]에는 어떤 숫자를 넣어야할지 이해가 되지 않습니다

  • python
  • java
  • c
  • 정보처리기사
kku1804 댓글 2 좋아요 1 조회수 174

LettureLockStockFacadeTest에서 오류가 발생합니다.

미해결

재고시스템으로 알아보는 동시성이슈 해결방법

package com.example.stock.repository; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Component; import java.time.Duration; @Component public class RedisLockRepository { private RedisTemplate<String, String> redisTemplate; public RedisLockRepository(RedisTemplate<String, String> redisTemplate) { this.redisTemplate = redisTemplate; } public Boolean lock(Long key) { return redisTemplate .opsForValue() .setIfAbsent(generateKey(key), "lock", Duration.ofMillis(3_000)); } public void unlock(Long key) { redisTemplate.delete(generateKey(key)); } private String generateKey(Long key) { return key.toString(); } } package com.example.stock.facade; import com.example.stock.repository.RedisLockRepository; import com.example.stock.service.StockService; import org.springframework.stereotype.Component; @Component public class LettuceLockStockFacade { private final RedisLockRepository redisLockRepository; private final StockService stockService; public LettuceLockStockFacade(RedisLockRepository redisLockRepository, StockService stockService) { this.redisLockRepository = redisLockRepository; this.stockService = stockService; } public void decrease(Long key, Long quantity) throws InterruptedException { while(!redisLockRepository.lock(key)){ Thread.sleep(100); } try{ stockService.decrease(key, quantity); }finally { redisLockRepository.unlock(key); } } } package com.example.stock.facade; import com.example.stock.domain.Stock; import com.example.stock.repository.StockRepository; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import static org.junit.jupiter.api.Assertions.*; @SpringBootTest class LettuceLockStockFacadeTest { @Autowired private LettuceLockStockFacade lettuceLockStockFacade; @Autowired private StockRepository stockRepository; @BeforeEach public void before(){ stockRepository.saveAndFlush(new Stock(1L, 100L)); } @AfterEach public void after(){ stockRepository.deleteAll(); } @Test public void 동시에_100개의_요청() throws InterruptedException { int threadCount = 100; ExecutorService executorService = Executors.newFixedThreadPool(32); CountDownLatch latch = new CountDownLatch(threadCount); for(int i = 0; i < threadCount; i++){ executorService.submit(() -> { try{ lettuceLockStockFacade.decrease(1L, 1L); } catch (InterruptedException e) { throw new RuntimeException(e); } finally { latch.countDown(); } }); } latch.await(); Stock stock = stockRepository.findById(1L).orElseThrow(); assertEquals(0, stock.getQuantity()); } } 이렇게 코딩했고 dockre에 redis를 설치하고 window Shell에서 데이터가 남아 있을까봐 1번 key 값을 삭제해서 돌렸는데도 오류가 발생했습니다. 또한 레디스가 실행이 되지 않은 채 했을까봐 ping을 입력했는데 pong이라는 응답을 받았습니다. Hibernate: drop table if exists stock 2024-11-03T22:08:40.414+09:00 DEBUG 17108 --- [ Test worker] org.hibernate.SQL : create table stock (id bigint not null auto_increment, product_id bigint, quantity bigint, version bigint, primary key (id)) engine=InnoDB Hibernate: create table stock (id bigint not null auto_increment, product_id bigint, quantity bigint, version bigint, primary key (id)) engine=InnoDB 2024-11-03T22:08:40.439+09:00 INFO 17108 --- [ Test worker] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 2024-11-03T22:08:41.136+09:00 INFO 17108 --- [ Test worker] o.s.d.j.r.query.QueryEnhancerFactory : Hibernate is in classpath; If applicable, HQL parser will be used. 2024-11-03T22:08:42.092+09:00 WARN 17108 --- [ Test worker] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning 2024-11-03T22:08:42.990+09:00 INFO 17108 --- [ Test worker] c.e.s.facade.LettuceLockStockFacadeTest : Started LettuceLockStockFacadeTest in 6.21 seconds (process running for 7.345) 2024-11-03T22:08:43.504+09:00 DEBUG 17108 --- [ Test worker] org.hibernate.SQL : insert into stock (product_id,quantity,version) values (?,?,?) Hibernate: insert into stock (product_id,quantity,version) values (?,?,?) 2024-11-03T22:08:44.203+09:00 DEBUG 17108 --- [ Test worker] org.hibernate.SQL : select s1_0.id,s1_0.product_id,s1_0.quantity,s1_0.version from stock s1_0 where s1_0.id=? Hibernate: select s1_0.id,s1_0.product_id,s1_0.quantity,s1_0.version from stock s1_0 where s1_0.id=? 2024-11-03T22:08:44.245+09:00 DEBUG 17108 --- [ Test worker] org.hibernate.SQL : select s1_0.id,s1_0.product_id,s1_0.quantity,s1_0.version from stock s1_0 Hibernate: select s1_0.id,s1_0.product_id,s1_0.quantity,s1_0.version from stock s1_0 2024-11-03T22:08:44.252+09:00 DEBUG 17108 --- [ Test worker] org.hibernate.SQL : delete from stock where id=? and version=? Hibernate: delete from stock where id=? and version=? Expected :0 Actual :100 <Click to see difference> org.opentest4j.AssertionFailedError: expected: <0> but was: <100> at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151) at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132) at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197) at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182) at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:177) at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:639) at com.example.stock.facade.LettuceLockStockFacadeTest.동시에_100개의_요청(LettuceLockStockFacadeTest.java:55) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended 어디를 더 수정해야 하는지 모르겠습니다..

  • java
  • spring
  • 동시성
소리쨩 댓글 2 좋아요 1 조회수 298

작업형1 모의문제1 강의에서 질문있습니다

해결됨

[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)

학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! 질문과 관련된 영상 위치를 알려주면 더 빠르게 답변할 수 있어요 먼저 유사한 질문이 있었는지 검색해보세요 6:42 부터 quantile 에서 강의를 따라하면 에러가 나는데 어디서 수정을 해야할까요

  • python
  • 머신러닝
  • 빅데이터
  • pandas
  • 빅데이터분석기사
이재욱 댓글 2 좋아요 0 조회수 147

22-1 파일 불러오기 질문

해결됨

프로그래밍 시작하기 : 도전! 45가지 파이썬 기초 문법 실습 (Inflearn Original)

def cnt_word1(filepath): with open(filepath,'r') as file: txt = file.read () txt = txt.replace(',',' ') print(txt) print(cnt_word1("../source/22-1.txt")) 이렇게 그대로 사용했는데 아무것도 안뜹니다 오류메세지가 없는걸로 보아 오류는 아닌데 (그대로 입력) 파일 경로가 문제일까요?

  • python
hunter 댓글 2 좋아요 0 조회수 112

train , test 채우기

해결됨

[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)

15:10~13초 부분인데.. 왜 train하고 test 데이터를 같이 채워야 하나요>?

  • python
  • 머신러닝
  • 빅데이터
  • pandas
  • 빅데이터분석기사
유민곤 댓글 2 좋아요 0 조회수 131

stack구조관련질문

미해결

김영한의 실전 자바 - 중급 2편

package collection.deque.test.stack; import java.util.ArrayDeque; import java.util.Deque; public class BrowserHistory { private Deque<String> history = new ArrayDeque<>(); private String currentPage = null; public void visitPage(String s) { if(currentPage != null){ history.push(currentPage); } currentPage = s; System.out.println("방문 : "+s); } @Override public String toString() { return "BrowserHistory{" + "stack=" + history + '}'; } public String goBack() { if(!history.isEmpty()){ currentPage = history.pop(); System.out.println("뒤로가기 : "+currentPage); return currentPage; } return null; } public void pop(){ System.out.println(history.pop()); } } 문제와풀이3 -stack시간 수업에관한 질문입니다 stack구조의 경우 마지막에 넣은 입력이 pop()을 하면 나오는데 이경우는 마지막 전에 입력한것이 나옵니다 이유가뭘까요??

  • java
  • 객체지향
  • 코딩-테스트
  • 알고리즘
DG Y 댓글 2 좋아요 0 조회수 80

컬렉션프레임워크 Stack 관련질문

미해결

김영한의 실전 자바 - 중급 2편

package collection.deque.test.stack; import java.util.ArrayDeque; import java.util.Deque; public class BrowserHistory { private Deque<String> history = new ArrayDeque<>(); private String currentPage = null; public void visitPage(String s) { if(currentPage != null){ history.push(currentPage); } currentPage = s; System.out.println("방문 : "+s); } @Override public String toString() { return "BrowserHistory{" + "stack=" + history + '}'; } public String goBack() { if(!history.isEmpty()){ currentPage = history.pop(); System.out.println("뒤로가기 : "+currentPage); return currentPage; } return null; } } ////////////////////// package collection.deque.test.stack; public class BrowserHistoryTest { public static void main(String[] args) { BrowserHistory browser = new BrowserHistory(); // 사용자가 웹페이지를 방문하는 시나리오 browser.visitPage("youtube.com"); browser.visitPage("google.com"); browser.visitPage("facebook.com"); // 뒤로 가기 기능을 사용하는 시나리오 String currentPage1 = browser.goBack(); System.out.println("currentPage1 = " + currentPage1); String currentPage2 = browser.goBack(); System.out.println("currentPage2 = " + currentPage2); System.out.println(browser); } } 위의 goBack 메서드 실행코드가 Pop()인데 currentPage1 에서 facebook이 출력이되지않고 google이 출력되는 이유가 궁금합니다 스택구조는 마지막에 입력한것이 나오게 되어있는데 그 전에 입력한것이 왜 나오는 이유가 궁금합니다

  • java
  • 객체지향
  • 코딩-테스트
DG Y 댓글 1 좋아요 0 조회수 56

drop_duplicates() 함수 문의

해결됨

[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)

중복 제거 함수에서 subset 없이 바로 keep='last'해도 되나요? -> drop_duplicates(keep = 'last') subset과 keep 서로 앞뒤 바뀌어도 되는 건가요? -> drop_duplicates(keep = 'last', subset = [~])

  • python
  • 머신러닝
  • 빅데이터
  • pandas
  • 빅데이터분석기사
wsyang 댓글 2 좋아요 0 조회수 113

한국 수출입 은행 API 가져올시 오류 발생

해결됨

남박사의 파이썬으로 봇 만들기 with ChatGPT

Requests 모듈을 이용하여 HTTPS 사이트 방문시 나타나는 오류인거 같아 r = requests.get(url, verify=False ) 위와같이 verify=False 를 추가해줘야 오류를 무시하고 가져오는것으로 보입니다.

  • python
  • 웹-크롤링
  • 챗봇
  • 객체지향
  • openai-api
역학자 댓글 1 좋아요 0 조회수 611

환불문의

미해결

[리뉴얼] 처음하는 파이썬 머신러닝 부트캠프 (쉽게! 실제 캐글 문제 풀며 정리하기) [데이터분석/과학 Part2]

환불 문의 드립니다. 강의의 질이 떨어지는 건 절대 아니구요, 다만 제 수준이 너무 낮아서, 도무지 진도가 안 나갈 듯 싶습니다. 구매 후 시간이 꽤 많이 흘러서.. 전액 환불은 불가하더라도, 부분 환불 부탁드려도 될까요..?? ㅠㅠ 총 수강 수 는 2강 인데... ㅠㅠ

  • python
  • 머신러닝
  • pandas
  • kaggle
chlgkrwns747 댓글 1 좋아요 0 조회수 286

실행 순서 질문

미해결

프로그래밍 시작하기 : 도전! 45가지 파이썬 기초 문법 실습 (Inflearn Original)

a = 20 def test(): global a print(f' ex3 의 결과: {a}') a = 35 return a print(f' ex1 의 결과: {a}') a = 100 print(f' ex2 의 결과: {a}') print(f' ex4 의 결과: {test()}') print(f' ex5 의 결과: {a}') 여기서 a = 35 를 100보다 이전에 적어주었는데 왜 마지막 ex5의 실행결과가 35가 되는건지 모르겠습니다 35가 마지막 실행결과라고 하셨는데.. 나중에 쓴 100 이 최종 마지막 실행결과라고 생각했었어요! 실행 순서가 어떻게 되는지 궁금합니다

  • python
hunter 댓글 1 좋아요 0 조회수 99

train_iloc[] 문의

미해결

[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)

train_iloc[] 함수에서 연속된 두 피처 말고 떨어진 두개의 피처(ex. age, income)로 분리하려면 어떻게 대괄호 안에 적어야하나요?

  • python
  • 머신러닝
  • 빅데이터
  • pandas
  • 빅데이터분석기사
댓글 2 좋아요 0 조회수 89

lambda식 vs Comprehension 식 차이

미해결

프로그래밍 시작하기 : 도전! 45가지 파이썬 기초 문법 실습 (Inflearn Original)

제목 그대로 둘의 차이가 헷갈립니다! 아래 Lambda 사용할때 조건값 입력하고 iter한 리스트 적고 print(f'x1결과: {list(map( lambda x: str(x*10) , range(1,16)))}') comprehension 쓸때도 조건만족값 입력하고 맨 끝에 list 적고 # [조건 만족 시 출력값 if 조건 else 조건 불만족 시 출력 값 for i in list] print(f'x 결과: {[ str(x*10) for x in range(1,16)]}') 둘의 차이가 정확히 어떻게 구분하면될까요?

  • python
hunter 댓글 1 좋아요 0 조회수 143

NoSQL의 PlatformTransactionManager adapter 는 없는건가요?

미해결

토비의 스프링 6 - 이해와 원리

안녕하세요. 우선 토비님의 강의 너무 잘 듣고 있습니다. 강의 제작해주셔서 무한 감사드려요. Transaction manager 추상화 부분 강의를 들으면서 NoSQL의 트랜잭션을 지원하는 어댑터는 없는건가 궁금해서 질문드립니다. 감사합니다.

  • java
  • spring
gslee100 댓글 2 좋아요 0 조회수 246

인기 태그

인프런 TOP Writers

주간 인기글