inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

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

Section 7 [Activation Function의 종류] Softmax logit 분포와 Entropy 질문이 있습니다

해결됨

딥러닝 이론 + PyTorch 실무 완전 정복

안녕하세요 선생님 해당 강의 마지막 참고사항: what is entropy 부분에서 Temperature가 낮을수록 softmax logit의 분포가 쏠리면 Entropy가 감소하게 되는 것이 아닌지 궁금합니다! 확인해주셔서 감사합니다!

  • 딥러닝
  • pytorch
  • NLP
  • 컴퓨터-비전
  • cnn
  • rnn
  • transformer
  • llm
ehdnjs 댓글 1 좋아요 2 조회수 257

em.detach(entity) 에 대해 질문 있습니다.

해결됨

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

em.detach(entity) 을 할 경우 영속성 컨텍스트의 1차 캐시에서 entity도 날라가고 쓰기 지연 저장소에 저장되어 있던 entity에 의해 발생한 변경 관련 쿼리문도 삭제 되는건가요?

  • java
  • jpa
감바스 댓글 1 좋아요 0 조회수 180

🎮아진코 코딩 스터디 동아리 부원 모집!!

미해결

안녕하세요, 코딩 기초 스터디 동아리 아진코입니다! 코딩 어떻게 시작해야 할지 망설이시고 계신 분 있으신가요~?? 이번 여름방학을 마친 대학생들이 모야 이제는 코딩이 일이 아닌 코딩을 게임처럼 즐기며 함께 스터디 해봐요 ▪ 이런분들 원해요 - 코딩 각잡고 할 건 아니고 맛보기만 하고 싶은 사람 - 학원까지는 부담스럽고 인강으로 스터디처럼 해보고 싶은 사람 - 혼자 공부하고 있는데 같이 하면서 의지가 필요한 사람 - 자바, 파이썬, C++ 중에서 하나는 공부해보고 싶은 사람 아진코는 "요즘 비전공자도 코딩 배워서 개발자된대! 나도 배워볼까?" 에서 시작된 동아리에요 여름방학 마치고 이제는 다시 학교로 돌아가야 되는 여름을 지나고 코딩 찍먹할 파티원들을 찾고 있어요! 🎮 동아리 운영방식 - 스터디 모임: 주 1회 오프라인/온라인 - 개별 학습: 각자 자유롭게 인강 시청 및 과제 수행 - 커뮤니티 활동: 질문/답변, 정보 공유, 프로젝트 협업 🎮 기본 커리큘럼 1. 자바 (Java) - 기초 문법 및 객체지향 프로그래밍 - 간단한 콘솔 프로그램 만들기 - 미니 프로젝트: To-Do List 어플리케이션 개발 2. 파이썬 (Python) - 기초 문법 및 데이터 처리 - 웹 크롤링 및 데이터 분석 - 미니 프로젝트: 날씨 정보 제공 챗봇 만들기 3. C++ - 기초 문법 및 메모리 관리 - 기본 자료구조와 알고리즘 - 미니 프로젝트: 텍스트 기반 게임 만들기 🎮 모집 내용 - 모집기간: 2024년 7월 10일 ~ 7월 26일 - 모집인원: 총 30명 (각 언어별 10명) - 활동장소: 서울 인근(상호 협의 예정) - 지원방법: [ 구글폼 작성 ] : https://forms.gle/Rr7PpaTSM6ECUrka9 지금 바로 지원해서 방학 동안 재미있고 유익한 코딩 경험을 쌓아봅시다! ‼ 대학생 자치적으로 운영되며 정치, 종교, 시민단체와 전혀 관련이 없음을 밝히는 바입니다!

댓글 1 좋아요 0 조회수 77

jpa에서 쿼리 보내는 시점에 대해 질문 있습니다.

해결됨

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

수정, 삭제, 삽입 같은 경우에는 데이터 변경이라 영속성 컨텍스트의 쓰기 저장소에 보관되어 있다가 커밋 직전에 한번에 보내지는 반면 em.find()를 통해 발생하는 조회 쿼리는 find() 사용시 바로 디비에 전송이 되는건지 궁금합니다. em.find()를 통해 발생한 조회 쿼리는 트랜잭션 커밋 종료에 상관없이 디비에 바로바로 전송이 되는건지 궁금합니다.

  • java
  • jpa
감바스 댓글 1 좋아요 1 조회수 133

IRSA 의 토큰이 최대 24시간인데 만료되면 어떻게 되나요?

해결됨

실무에서 사용중인 AWS 클라우드 IAM 이해와 보안

안녕하세요 우선 좋은 강의 감사합니다. 강의 시청 중 IRSA 부분을 진행 중인데, 웬만한 것들은 이해가 되는데 한가지 궁금한 것이 있습니다. 결국 파드가 AWS 리소스에 접근할 수 있는 토큰을 특정 마운트 경로에 가지고 있는 것인데, 임시 자격 증명은 영구적인 것이 아니고 최대 24시간까지만 유지가 되는데, 이 유효 시간이 지나면 어떻게 되나요? 예를 들어 파드 A 는 S3 에 접근을 해야 해서 IRSA 를 사용하고 있습니다. 최대 만료 시간인 24시간 지난 후에도 여전히 S3 에 접근이 가능한데, 이게 왜 가능한지가 궁금합니다. 무언가 토큰을 갱신해주는 쿠버네티스 컨트롤러나 오퍼레이터 같은 것이 있는 걸까요? (근데 암만 찾아봐도 mutatingwebhookconfigurations 의 pod-identity-webhook 외에는 관련된 것을 못찾겠네요 ㅜㅜ)

  • aws
  • Terraform
  • devops
  • devsecops
  • iam
kingbj0429 댓글 1 좋아요 1 조회수 575

강의자료부탁드립니다!

해결됨

팀 개발을 위한 Git, GitHub 입문

감사합니다!

  • git
  • github
  • 버전관리시스템
나무22 댓글 2 좋아요 0 조회수 174

테스트 코드 문의

미해결

실전! 스프링 데이터 JPA

DTO 쿼리 작성 시 join fetch 로 작성하는 경우는 에러가 발생하고 join 으로 작성하는 경우에는 에러가 발생하지 않았는데요. join fetch 의 개념은 결국 지연로딩을 작동시키지 않고 한 번에 연관된 것들 다 가져온다는 것인데 왜 여기선 안 되는 것인지 궁금합니다. 엔티티 @Query문하고 DTO @Query 테스트 코드를 돌렸는데 서로 영향을 미쳐 테스트가 실패라고 뜹니다. @Transactional 을 붙여 롤백이 되게끔 하여 해결은 했지만 궁금한 점이 있습니다. 스프링 데이터 JPA 테스트를 돌릴 때 @SpringBootTest 어노테이션 붙이면 자동으로 롤백이 되는 것이 아닌가요? package study.springdatajpa.repository; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.transaction.annotation.Transactional; import study.springdatajpa.domain.Member; import study.springdatajpa.domain.Team; import study.springdatajpa.dto.MemberDto; import java.util.List; @SpringBootTest class MemberRepositoryTest { @Autowired private MemberRepository memberRepository; @Autowired private TeamRepository teamRepository; @Test @Transactional void testQuery() { Member m1 = new Member("AAA", 10); Member m2 = new Member("BBB", 20); memberRepository.save(m1); memberRepository.save(m2); List<Member> result = memberRepository.findUser("AAA", 10); Assertions.assertThat(result.get(0)).isEqualTo(m1); } @Test @Transactional void testDtoQuery() { Team team = new Team("teamA"); teamRepository.save(team); Member m1 = new Member("AAA", 10); Member m2 = new Member("BBB", 20); m1.setTeam(team); m2.setTeam(team); memberRepository.save(m1); memberRepository.save(m2); List<MemberDto> dtoList = memberRepository.findUserDto(); Assertions.assertThat(dtoList.size()).isEqualTo(2); } }

  • java
  • spring
  • spring-boot
  • jpa
피곤한개발자 댓글 1 좋아요 0 조회수 199

사전형 데이터 타입 vs JSON 데이터 타입

미해결

파이썬 무료 강의 (기본편) - 6시간 뒤면 나도 개발자

JSON 데이터와 파이썬의 사전형 타입에 대해서 알고있는것도 좋을거 같아요! 밑에는 Chat GPT쪽에서 물어본 결과입니다. 참고하세요 🙂 파이썬 사전형 데이터 (Dictionary) • 내부 구성: 키-값 쌍으로 이루어져 있어. 예를 들어 { "name": "Alice", "age": 25 } 같은 식이야. • 사용 방법: 파이썬 내부에서 데이터를 쉽게 다루기 위해 만들어졌어. • 기능: 추가, 삭제, 수정 등의 다양한 기능을 가지고 있어. 예를 들어, my_dict["name"]으로 “Alice”를 불러올 수 있어. JSON 데이터 (JavaScript Object Notation) • 내부 구성: 역시 키-값 쌍으로 이루어져 있지만, 텍스트 기반 포맷이야. 예를 들어, "{"name": "Alice", "age": 25}"처럼 문자열로 표현돼. • 사용 방법: 주로 데이터를 주고받을 때 사용해. 웹 서버와 클라이언트 사이에서 데이터를 주고받을 때 많이 쓰여. • 기능: 데이터를 직렬화(serialize)하고 역직렬화(deserialize)하는데 초점이 맞춰져 있어. 예를 들어, 파이썬에서 JSON 문자열을 파이썬 사전형으로 변환하려면 json.loads()를 사용해. 차이점 요약 1. 포맷과 사용 목적: 파이썬 사전형은 파이썬 프로그램 내에서 사용하는 데이터 구조고, JSON은 주로 데이터 교환을 위한 텍스트 포맷이야. 2. 표현 방식: 사전형은 파이썬 문법을 따르고, JSON은 텍스트 기반이라 언어에 관계없이 사용할 수 있어. 3. 기능과 제약: 사전형은 다양한 조작이 가능하지만, JSON은 데이터를 주고받는 용도로 제한적인 기능을 갖고 있어. 요약: -> 똑같이 생겼지만 사전형 데이터 타입은 파이썬의 세계관안에서 바로 사용이 가능하며, 파이썬 세계관안에서 자유롭게 구사 가능하다. -> JSON 데이터 타입은 직렬화와 역직렬화에 초점이 맞춰져있으며 주고 받기 위한 데이터 타입이다. 다른 언어 세계관에 들어가면 디코딩 (역직렬화)가 필요하고 다른 언어 세계관으로 보낼때는 인코딩 (직렬화)가 필요하다.

  • python
이정완 댓글 1 좋아요 0 조회수 207

바인딩 시점에 대한 질문입니다

미해결

처음 만난 리액트(React)

위 소스에서 질문입니다. 생성자에서 this.handleClick 에 값을 대입할때 handleClick 함수가 정의되지않은 상태인데 어떻게 접근하는건지 궁금합니다 !

  • HTML/CSS
  • javascript
  • react
SUNYOUNG JUNG 댓글 1 좋아요 1 조회수 163

강의자료

해결됨

디지털 회로설계 실무 : Computer Architecture 와 SoC 프로토콜 Digital IP 설계하기

수업하시는 ppt 자료는 혹시 어디서 확인 가능할까요 ?

  • 컴퓨터-구조
  • verilog-hdl
  • fpga
  • 임베디드
  • amba
히죵히 댓글 1 좋아요 1 조회수 336

Fortis Hospital in India: A Comprehensive Exploration of Excellence in Healthcare

미해결

India's healthcare landscape has seen remarkable growth and development over recent decades, establishing the country as a global leader in medical services. At the forefront of this transformation is Fortis Healthcare, an institution that has redefined the standards of care with its expansive network and commitment to innovation. This article delves into Fortis Hospital in India , highlighting Fortis Hospital Delhi and Fortis Hospital Noida, the notable doctors associated with Fortis, and the significance of medical tourism in India. Fortis Hospital in India: A Beacon of Healthcare Excellence Fortis Healthcare, founded in 1996, is one of India's premier healthcare providers. The organization operates over 50 hospitals across the country, offering a comprehensive range of services from general healthcare to specialized treatments. Fortis is known for its advanced technology, highly skilled medical professionals, and patient-centered care, which has helped it become a trusted name in Indian healthcare. Mission and Values Fortis Healthcare’s mission is to deliver high-quality, accessible, and affordable healthcare to its patients. The organization emphasizes a holistic approach to health, focusing not just on treatment but also on preventive care, wellness, and patient education. Its core values of integrity, compassion, and excellence are reflected in every aspect of its operations, from clinical care to administrative functions. Innovations and Technological Advancements Fortis Hospitals are equipped with state-of-the-art technology, enabling them to provide cutting-edge medical care. The integration of advanced diagnostic tools, such as high-resolution MRI and CT scanners, along with robotic surgery systems, ensures that patients receive precise and effective treatments. Fortis is also involved in continuous research and development, incorporating the latest medical advancements into its practices. Fortis Hospital Delhi: A Pinnacle of Medical Excellence Fortis Hospital Delhi stands as a premier institution within Fortis Healthcare, located in the heart of India’s capital. This flagship hospital is renowned for its extensive range of medical services and commitment to delivering exceptional patient care. World-Class Infrastructure Fortis Hospital Delhi boasts a modern infrastructure designed to cater to a wide array of medical needs. The hospital features advanced diagnostic and therapeutic equipment, including state-of-the-art operating theaters, intensive care units, and patient monitoring systems. This infrastructure supports a wide range of specialties and complex procedures. Specialties and Services The hospital excels in several medical specialties, including cardiology, neurology, oncology, orthopedics, nephrology, and more. It is particularly renowned for its cardiac care unit, which offers advanced treatments for heart diseases. The oncology department at Fortis Hospital Delhi is another highlight, providing comprehensive cancer care, including chemotherapy, radiation therapy, and surgical interventions. Patient-Centric Care Fortis Hospital Delhi is committed to providing patient-centric care, focusing on individualized treatment plans that address each patient’s unique needs. The hospital offers a range of support services, including nutritional counseling, psychological support, and rehabilitation programs, to ensure a holistic approach to patient recovery. Fortis Hospital Noida: A Hub of Advanced Medical Care Fortis Hospital Noida , located in the thriving city of Noida, is a key component of the Fortis Healthcare network. Known for its excellence in medical care and patient services, Fortis Noida is an important healthcare provider in northern India. Best Doctors in Fortis Hospitals: Leading Medical Minds Fortis Hospitals are home to some of the most esteemed doctors in India, whose expertise and contributions have set new standards in medical care. These leading professionals are integral to the success of Fortis Healthcare. Dr. Ashok Seth Dr. Ashok Seth, Chairman of Fortis Escorts Heart Institute in Delhi, is a prominent cardiologist known for his groundbreaking work in cardiovascular medicine. His expertise in complex heart surgeries and pioneering techniques has earned him national and international recognition. Dr. Seth’s contributions to cardiac care have significantly advanced the field, making Fortis Escorts Heart Institute a leading destination for heart patients. Dr. Randeep Guleria Dr. Randeep Guleria, Director of Pulmonology at Fortis, is an eminent specialist in respiratory medicine. His extensive research and clinical experience have greatly influenced the treatment of respiratory diseases in India. Dr. Guleria’s approach to patient care combines clinical expertise with a focus on research, contributing to advancements in pulmonology. Dr. IPS Oberoi Dr. IPS Oberoi, a leading orthopedic surgeon at Fortis, is renowned for his skills in joint replacement and spinal surgeries. His innovative techniques and successful outcomes have made him one of the top orthopedic surgeons in the country. Dr. Oberoi’s work has helped countless patients regain mobility and improve their quality of life. Conclusion As medical tourism in India continues to grow, Fortis Hospitals are well-positioned to cater to the increasing demand for high-quality, affordable healthcare. By combining state-of-the-art technology, expert medical professionals, and a patient-centric approach, Fortis Healthcare remains at the forefront of delivering exceptional healthcare services both domestically and internationally.

Medheal Global 댓글 2 좋아요 0 조회수 158

양방향 매핑 제거시 - fetch join/enityGraph

미해결

실전! 스프링 데이터 JPA

[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? 아니요 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 모르겠습니다..ㅜㅜ 안보이더라고요 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/ [질문 내용] 강사님 fetch join과 entityGraph에 대해서 공부를 해서, 연관된 객체에 대해서 가져올때, fetch join을 통해서 한방에 가져오는 법을 배웠는데, 만약 양방향 매핑을 풀고, 단방향 매핑으로 코드를 작성하려고 하는데, @Data @NoArgsConstructor @Entity(name ="team") public class TeamJpaEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name ="team_id") private Long id; private String name; @OneToMany(mappedBy = "myTeamId") private List<MemberJpaEntity> memberJpaEntityList = new ArrayList<>(); } ---------- @Data @NoArgsConstructor @Entity(name = "user") public class MemberJpaEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name ="user_id") private Long id; private String name; @Column(name = "team_id") private Long myTeamId; } 일때, 양방향 매핑을 끊어서, 단반향 매핑만 되게끔 수정을 했는데, 이렇게 되면 패치조인을 못 하지않나여? 궁금해서 질문을 올립니다...ㅜ 순환참조를 삭제하려고 없애고, TeamJpaRepository.findById(teamId)로 팀이 필요할때 조회할 수 있게 만들었는데, 한방으로는 못 가져오나여?

  • java
  • spring
  • spring-boot
  • jpa
wngus4278 댓글 1 좋아요 0 조회수 152

균형 이진 트리 질문 있습니다

미해결

10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트

- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요 균형 이진트리의 경우 모든 노드에서 왼쪽 하위트리와 오른쪽 하위트리의 높이차이가 1이하여야 한다고 이해했습니다. 그러나 이번 영상 5:03초에 아래 그림의 트리구조가 균형 이진트리라고 설명해주셨는데, 제가 빨간색으로 표시한 노드를 기준으로 보았을때 왼쪽 하위트리 높이가 0 오른쪽 하위트리 높이가 2이기 때문에 높이차이가 2나기 때문에 해당 트리 구조가 균형 이진트리가 아니라고 판단하였는데, 제 개념에 오류가 있는것인지 궁금합키다..!

  • c++
  • 코딩-테스트
전수현 댓글 1 좋아요 0 조회수 183

Run JpashopApplication 시간 초과

해결됨

실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발

안녕하세요, 마지막 커리큘럼 웹계층 강의를 따라하면서 JpashopApplication.main()을 실행시켰는데 5분이 지나도 계속 실행중이고 콘솔도 어느 지점에서 멈춰서 해결방법 질문드립니다. https://drive.google.com/file/d/1vK3NAMKt6E7nTU69Rb0F6qELZEF3pCwU/view?usp=drive_link - 실행 중지시키면 아래와 같이 뜨는데 제가 빨간색 강조해놓은 부분이 원인일까요? Execution failed for task ':JpashopApplication.main()'. > Build cancelled while executing task ':JpashopApplication.main()' * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.org. Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.8/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. BUILD FAILED in 5m 56s 3 actionable tasks: 2 executed, 1 up-to-date

  • java
  • spring
  • 웹앱
  • spring-boot
  • jpa
sichelmond 댓글 1 좋아요 0 조회수 142

고생했던? 케이스에 대해 선생님의 코드가 어떻게 들어맞는 지에 대한 질문이 있습니다. ㅠ

해결됨

세계 대회 진출자가 알려주는 코딩테스트 A to Z (with Python)

안녕하세요, 강의를 듣고 계신 여러분! 여러분의 학습을 돕기 위해 질문 안내를 드리고자 합니다. 1. chatGPT를 이용해보기 단순한 의문은 chatGPT를 이용해도 해답을 찾을 수 있는 경우가 종종 있습니다! 2. 강의의 어떤 부분에 대한 질문이고, 어떤 부분이 궁금한지 명확히 알려주세요! 강의의 어느 파트에서 의문을 느끼고, 어떤 부분이 궁금한지 를 명확히 제시해 주시면 답변에 도움이 됩니다! 자신은 어떻게 이해했는지 또한 적어주면 좋습니다! ex) 섹션5의 '그래프 순회 (DFS & BFS) [개념]' 강의 에서 DFS와 BFS 모두 그래프의 모든 노드를 탐색하는 알고리즘이라고 하셨고 시간 복잡도 또한 똑같다고 이해 했습니다. 그러면 DFS와 BFS 중에서 어떤 알고리즘이 더 효율적인지 구별하는 것은 의미가 없는 것일까요? 어느 파트 섹션5의 '그래프 순회 (DFS & BFS) [개념]' 강의 자신은 어떻게 이해했는지 DFS와 BFS 모두 그래프의 모든 노드를 탐색하는 알고리즘이라고 하셨고 시간 복잡도 또한 똑같다고 이해 어떤 부분이 궁금한지 DFS와 BFS 중에서 어떤 알고리즘이 더 효율적인지 구별하는 것은 의미가 없는 것일까요? 안녕하세요! 강의 잘 듣고 있습니다. 백준 1461 그리디 마지막 문제에 대한 질문이 있는데요. 보기 전에 풀어보긴 했는데, 두더지 잡다가 어떻게 된 느낌이긴 해요.. 음,, 아직 습관이 안 고쳐지기는 했는데 정의하고 분석하고 따져보고 그려본 다음에 해야 하는데,, 그 제가 처음 푼 방식은 리스트 요소를 지워가며 해결하는 방식인데요 양/음수가 m으로 떨어지지 않는 나머지 경우를 먼저 따져 합계에 더하고, 제거한 뒤 먼 데부터 다녀오는데, 최댓값을 계속 갱신해서 가장 먼 거리를 나중에 빼주는 방식으로 했어요.. m으로 나누어 떨어지지 않는 경우에 대한 처리를 나중에 추가했는데요 선생님의 코드가 어떻게 그 경우도 잘 처리하는 지 분석이 잘 안되어서.. 설명 부탁 드려요.. 아! 저번 설명 너무 감사합니다 더불어 약간 공부하는 루틴?이랄까? 그런 것도 말씀해 주실 수 있는 게 있다면 혹시 말씀 부탁드려요..(코테 공부도 그렇고 다른 것도 그렇고..) 아래는 제가 처음 정답 받은 코드입니다. (코드가 지저분함에 죄송해요..) import sys input = sys.stdin.readline # 방향을 결정하고 상자 들고 다음에 처음 갈 책 위치를 반환합니다. def getPos(arr): global direction maximum = max(map(abs, arr)) if maximum in arr: if len(arr) > m: direction = False if min(arr) >= 0: direction = True return 0 for i in range(len(arr) - 1, -1, -1): if arr[i] < 0: return i else: direction = True for i in range(len(arr)): if arr[i] >= 0: return i else: if len(arr) > m: direction = True if max(arr) < 0: direction = False return len(arr) - 1 for i in range(len(arr)): if arr[i] >= 0: return i else: direction = False for i in range(len(arr) - 1, -1, -1): if arr[i] < 0: return i return -1 n, m = map(int, input().rstrip().split()) arr = list(sorted(map(int, input().rstrip().split()))) cnt = 0; direction = True; reach = 0; plusCount = 0; minusCount = 0 #양수/음수 따로 헀어야 좋았는데, 하다보니 개수 세는 걸 만들었어요.. def count(): global plusCount, minusCount for i in arr: if i >= 0: plusCount += 1 elif i < 0 : minusCount += 1 count() #양수 m으로 나누어 떨어지지 않을 경우에 대한 처리입니다. if plusCount % m != 0: mini = min(i for i in arr if i >= 0) idx1 = arr.index(mini) idx2 = min(arr.index(mini) + (plusCount % m), len(arr)) reach = arr[idx2 - 1] for i in range(idx1, idx2): arr.remove(arr[idx1]) cnt += reach * 2 #음수 m으로 나누어 떨어지지 않을 경우에 대한 처리입니다. if minusCount % m != 0: maxi = max(i for i in arr if i < 0) idx1 = arr.index(maxi) idx2 = max(arr.index(maxi) - (minusCount % m), -1) far = abs(arr[idx2 + 1]) for i in range(idx1, idx2, -1): arr.remove(arr[idx2 + 1]) cnt += far * 2 reach = max(reach, far) # 이럴 필요 없는데, 돌면서 먼 데 구하고 그 안쪽? 지우는 방식으로 했어요.. while arr: pos = getPos(arr) far = abs(arr[min(len(arr) - 1, pos + m - 1) if direction else max(0, pos - m + 1)]) for i in range(m): if not arr: break arr.remove(arr[pos]) if not direction or pos == len(arr): pos = max(pos - 1, 0) cnt += far * 2 reach = max(reach, far) print(cnt - reach)

  • python
  • 코딩-테스트
  • 알고리즘
zhu 댓글 2 좋아요 0 조회수 275

튜플과 구조체 차이 설명에 관한 질문

해결됨

우아한 고성능 프로그래밍 언어 Rust 입문 및 활용

안녕하세요. 좋은 강의 감사합니다. 12번째 구조체 기초 강의에서 튜플과 구조체의 차이에 대해서 말씀해주셨는데, 여기서 두 가지의 질문이 있습니다. 첫 번째로는 강의에서 튜플과 구조체의 차이에 대한 예시로, "구조체는 이름을 따로 붙여줌으로서 Color가 들어갈 자리에 Point가 들어가거나 Point가 들어갈 자리에 Color가 들어가게 되는 문제를 일으키지 않는다" 라고 하셨습니다. 이때, 앞선 6번째 강의에서 튜플을 정의했던 내용을 활용하여 let point: (i32, i32, i32) = (2, 2, 2); let color: (i32, i32, i32) = (255, 255, 255); 하는 식으로 정의를 한다면 말씀하신 문제에 대해서는 방지가 가능하다고 생각하는데, 제가 어느 부분에서 잘못 이해하고 있는 것인지 궁금합니다. 두 번째로는 일반 Struct를 정의하실 때는 struct User { name: String, email: String, active: bool, } 으로 뒤에 세미콜론을 따로 사용하지 않으셨는데, 튜플 구조체에서는 struct Color(i32, i32, i32); 처럼 뒤에 세미콜론을 사용하신 부분에서, 명령문과 표현식에 있어 세미콜론 유무에 대한 차이가 있다는 것은 어느 정도 알겠지만, 이 부분에선 어떤 이유로 차이가 있는 것인지 궁금합니다. 감사합니다!

  • rust
  • webassembly
이상 댓글 1 좋아요 0 조회수 438

리액트에서 적용할 때 질문있습니다.

해결됨

GraphQL 완전정복 (키오스크를 만들며 배우는 풀스택 과정) - [2024 부분 리뉴얼]

안녕하세요 강사님한테 배운 코스를 리액트에 접목시켜보고 싶은데요 바뀌는 부분이 많을까요? 부족한 제 생각으로는 리액트는 커스텀훅을 작성해줄수있다보니까 로그인, 어드민 관련부분에서도 변경해야하는부분이있을거같고.. stores부분 코드를 그대로 복붙하기에는 무리가 있을까요? 따로 분류해가면서 작성해줘야할까요?

  • mongodb
  • apollo
  • graphql
  • svelte
반가우면반갑다고해 댓글 1 좋아요 0 조회수 268

강의 진행이 어떻게 되는건지 질문드립니다

미해결

이득우의 언리얼 프로그래밍 Part2 - 언리얼 게임 프레임웍의 이해

1강부터 14강까지 잘따라오다가 15강 21분 29초부터 BP_ABPlayerController 블루프린트를 켜보니 이렇게 구현되어있는 화면이 나오는데 강사님하고 전혀 다른화면이 나옵니다. 강사님이 15강에 올려주신 파일에서 가져와서 실습을 진행해야하는건가요 ?

  • unreal-engine
  • ue-blueprint
  • 언리얼-c++
ume6514 댓글 2 좋아요 0 조회수 370

html style 속성 질문입니다!

미해결

[웹 개발 풀스택 코스] HTML&CSS 기초

style 속성 강좌 11:41 초 별도의 .css 파일로 만들어서 사용하는 것을 external style 이 문장이 주석으로 지정된 거 같은데 라이브 채널에 왜 표기되는 지 궁금합니다!

  • HTML/CSS
영균 한 댓글 1 좋아요 0 조회수 211

실습문제 9 쿼리

미해결

[신규 개정판] 코딩 입문자를 위한 파이썬 완벽가이드

문제에 풀어주신 쿼리랑 이 쿼리랑 비교했을 때 많이 비효율적인가요? # 9 while True : password = int(input('비밀번호를 입력하세요.')) if password == 1234 : print('로그인 성공!') break else : print('로그인 실패!')

  • python
dmsal0544 댓글 2 좋아요 0 조회수 238

인기 태그

인프런 TOP Writers

주간 인기글