묻고 답해요
158만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
3-G 맞왜틀 질문입니다.
http://boj.kr/81a1ae0b49434b32aa98a3a34c0c8f42 반례를 찾는 것에 어려움을 느껴 질문드립니다.좋은 강의 감사드립니다!
-
미해결자바(Java) 알고리즘 문제풀이 입문: 코딩테스트 대비
이번 문제 접근방식 질문드립니다.
저도 배열로 접근했고 cnt와 answer 2가지 변수를 선언한 것까지는 동일했지만...solution은 전혀 달랐습니다. 현재 문제의 정답여부와 이전 문제의 정답여부를 비교하면...총 4가지 케이스가 있다는 걸 알게 되어..1 1 현재 문제도 맞고 이전 문제도 맞은 경우1 0 현재 문제가 맞고 이전 문제는 틀린 경우0 1 현재 문제는 틀리고 이전 문제는 맞은 경우0 0 현재 문제도 틀리고 이전 문제도 틀린 경우로..코딩하였더니 소스도 길어지고..답도 틀렸습니다.... 명쾌한 영상을 보고 나니왜 단순하게 선생님처럼문제가 정답일 때만 코드를 작동하도록생각하지 못 했을 가요...? 사고방식에 문제가 있는 건 아닌지..문제를 파악하는 노하우가 있을 가요?
-
해결됨독하게 되새기는 C 프로그래밍
자료구조
연결리스트를 보면서 만든적은 있으나 머리속에서 참고자 없이 만든적은 없네요 구매는 했는데 자료구조 수업 듣고 와야겠네요. 혹시 수업이 따로 있을까요?
-
미해결배달앱 클론코딩 [with React Native]
x Installing Ruby Gems
mac에서 안드로이드 쪽 설치하는 부분은 잘 완료하여 simulator가 잘 작동하는 것도 확인하였습니다.xcode, cocoapods 설치 후 프로젝트 생성도중 에러가 발생하였습니다.버전은 1.12.1 입니다.버전 관련하여 에러인 것 같은데 해결이 잘 안됩니다.
-
미해결스프링 핵심 원리 - 고급편
joinPoint.proceed() 실행결과인 result 에 관한 질문
안녕하세요강의 정말 감사히 잘 듣고 있습니다.다름이 아니라 예전부터 궁금했던 건데 Object result = joinPoint.proceed();여기서 각 비즈니스 로직(target) 을 실행시키고 난 뒤에 항상 result 를 받습니다.그러나 정작 result 를 활용하여 어떤 동작을 하는 것은 보지를 못해서요....이 result 를 항상 return 시켜주는 데 1) 어떠한 상황에서 result 값을 유용하게 사용할 수 있는지?2) result 를 return 하는데 어디로 return 하는지?가 궁금합니다.혹시 제가 놓친 부분이 있는지 지적해주시면 감사하겠습니다.(항상 감사합니다. 소중한 강의 정말 잘 보고 있습니다)
-
미해결Slack 클론 코딩[백엔드 with NestJS + TypeORM]
dataSource
AND `TABLE_NAME` = 'channels' UNION SELECT * FROM `INFORMATION_SCHEMA`.`REFERENTIAL_CONSTRAINTS` WHERE `CONSTRAINT_SCHEMA` = 'sleact' AND `TABLE_NAME` = 'channelchats' UNION SELECT * FROM `INFORMATION_SCHEMA`.`REFERENTIAL_CONSTRAINTS` WHERE `CONSTRAINT_SCHEMA` = 'sleact' AND `TABLE_NAME` = 'users' ) `rc` ON `rc`.`CONSTRAINT_SCHEMA` = `kcu`.`CONSTRAINT_SCHEMA` AND `rc`.`TABLE_NAME` = `kcu`.`TABLE_NAME` AND `rc`.`CONSTRAINT_NAME` = `kcu`.`CONSTRAINT_NAME` query: SELECT VERSION() AS `version` query: SELECT * FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `TABLE_SCHEMA` = 'sleact' AND `TABLE_NAME` = 'typeorm_metadata' query: DROP INDEX `UserId` ON `workspacemembers` query failed: DROP INDEX `UserId` ON `workspacemembers` error: Error: Cannot drop index 'UserId': needed in a foreign key constraint query: ROLLBACK [Nest] 81848 - 2023. 09. 20. 오전 12:47:04 ERROR [TypeOrmModule] Unable to connect to the database. Retrying (9)... QueryFailedError: Cannot drop index 'UserId': needed in a foreign key constraint at Query.onResult (/Users/yujinseung/Desktop/Slack/slack_s/src/driver/mysql/MysqlQueryRunner.ts:222:33) at Query.execute (/Users/yujinseung/Desktop/Slack/slack_s/node_modules/mysql2/lib/commands/command.js:36:14) at PoolConnection.handlePacket (/Users/yujinseung/Desktop/Slack/slack_s/node_modules/mysql2/lib/connection.js:478:34) at PacketParser.onPacket (/Users/yujinseung/Desktop/Slack/slack_s/node_modules/mysql2/lib/connection.js:97:12) at PacketParser.executeStart (/Users/yujinseung/Desktop/Slack/slack_s/node_modules/mysql2/lib/packet_parser.js:75:16) at Socket.<anonymous> (/Users/yujinseung/Desktop/Slack/slack_s/node_modules/mysql2/lib/connection.js:104:25) at Socket.emit (node:events:513:28) at addChunk (node:internal/streams/readable:324:12) at readableAddChunk (node:internal/streams/readable:297:9) at Socket.Readable.push (node:internal/streams/readable:234:10) [Nest] 81848 - 2023. 09. 20. 오전 12:47:04 ERROR [ExceptionHandler] Cannot drop index 'UserId': needed in a foreign key constraint QueryFailedError: Cannot drop index 'UserId': needed in a foreign key constraint at Query.onResult (/Users/yujinseung/Desktop/Slack/slack_s/src/driver/mysql/MysqlQueryRunner.ts:222:33) at Query.execute (/Users/yujinseung/Desktop/Slack/slack_s/node_modules/mysql2/lib/commands/command.js:36:14) at PoolConnection.handlePacket (/Users/yujinseung/Desktop/Slack/slack_s/node_modules/mysql2/lib/connection.js:478:34) at PacketParser.onPacket (/Users/yujinseung/Desktop/Slack/slack_s/node_modules/mysql2/lib/connection.js:97:12) at PacketParser.executeStart (/Users/yujinseung/Desktop/Slack/slack_s/node_modules/mysql2/lib/packet_parser.js:75:16) at Socket.<anonymous> (/Users/yujinseung/Desktop/Slack/slack_s/node_modules/mysql2/lib/connection.js:104:25) at Socket.emit (node:events:513:28) at addChunk (node:internal/streams/readable:324:12) at readableAddChunk (node:internal/streams/readable:297:9) at Socket.Readable.push (node:internal/streams/readable:234:10)이런오류가 뜹니다..! 뭐가 문제인지 모르겠습니당..https://github.com/jinseung0327/slack_clone혹시나 해서 깃허브 주소까지 올립니닷..!
-
미해결
textarea 혹은 p 태그 입력 시 안의 HTML태그 지우는 방법 문의
안녕하세요 <p>{data?.fetchUseditem.contents}</p> 입력 시 <h1><span style="color: rgb(0, 138, 0);">맥북!!!!!!!!!1</span></h1>처럼 html태그들이 다 보입니다. 안보이게 하는 방법이 있을까요?
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
createBoard 질문있습니다
const 나의그래프큐엘셋팅 = gql` mutation createBoard($createBoardInput: CreateBoardInput!) { createBoard(createBoardInput: $createBoardInput) { _id } } `;처음에 단순히 결과값을 _id 만을 받도록 코딩했었는데 이 결과 등록하기 버튼을 누르면 create 된 값이 화면에 리렌더링 되기는 했지만 글의 갯수가 10개로 고정이 됬습니다. 예를들어 이미 1,2,....,9,10 이라는 글이 화면에 보이는 상황에서 a라는 글을 추가하면 a,1,2,...,9,10 으로 화면이 보이는 것이 아니라 a,1,2...,8,9 까지만 보입니다.const 나의그래프큐엘셋팅 = gql` mutation createBoard($createBoardInput: CreateBoardInput!) { createBoard(createBoardInput: $createBoardInput) { _id writer title contents } } `;그리고 다음과 같이 코드를 수정하게 되면 원하는 결과가 나오게 되었는데 무슨 차이가 있는 것일까요?
-
미해결
collection framework 질문
(사진)
-
해결됨버그헌팅과 시나리오 모의해킹 전문가 되기
wpscan 결과가 안나와요!ㅠ
해당 secret 까지 정상적으로 접근이 되는데,wpscan을 사용하면Scan Aborted: Unable to get https://data.wpscan.org/metadata.json.sha512 (Couldn't resolve host name)라는 문구와 함께 출력되지 않습니다. 왜 이러는 건가요?ㅠ
-
해결됨[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)
프래그먼트 오류가 납니다!
5강의 내비게이션 프래그먼트 강의 수강 중 오류가 납니다.코드 작성 시 빨간 줄 뜨는 건 없었는데 실행 시키면 arr metadata 체크 할 때 8개의 오류가 난다고 뜹니다 8 issues were found when checking AAR metadata: 1. Dependency 'androidx.navigation:navigation-common:2.7.2' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 34. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 2. Dependency 'androidx.navigation:navigation-common-ktx:2.7.2' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 34. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 3. Dependency 'androidx.navigation:navigation-runtime:2.7.2' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 34. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 4. Dependency 'androidx.navigation:navigation-ui:2.7.2' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 34. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 5. Dependency 'androidx.navigation:navigation-runtime-ktx:2.7.2' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 34. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 6. Dependency 'androidx.navigation:navigation-ui-ktx:2.7.2' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 34. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 7. Dependency 'androidx.navigation:navigation-fragment-ktx:2.7.2' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 34. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 8. Dependency 'androidx.navigation:navigation-fragment:2.7.2' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 34. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 이건 33으로 되어 있는데 34로 바꾸면 실행 버튼이 비활성화 됩니다.이것도 제대로 되어 있는 거 같은데 뭐가 문젤까요ㅠ
-
미해결유니티 Addressable 을 이용한 패치 시스템 구현
안녕하세요 빌드시... 용량이 줄지 않습니다.
안녕하세요.어드레시블을 사용하여 빌드를 하였는데요.빌드용량이 줄어들지 않아 문의드립니다. 참고 : 리소스 폴더는 없습니다.
-
해결됨이득우의 언리얼 프로그래밍 Part1 - 언리얼 C++의 이해
ReferenceObject를 매 GCCycle마다 등록해주어야 하는건가요?
강의를 듣고 ReferencedObject로 등록되는 시점이 궁금하여 디버깅을 해보았습니다. 디버깅을 해보니 GCCycle마다FStudentManager::AddReferencedObjects()가 호출되던데, 이를 그냥 GUObjectArray에 매번 새로 등록하고 있다는 뜻으로 받아들이면 될까요? 만약 그렇다면 매번 새로 등록해주는 이유가 궁금합니다.
-
미해결[초중급편] 안드로이드 데이팅 앱 만들기(Android Kotlin)
핸드폰 이미지 불러오기 방법들
현재 '핸드폰 이미지 불러오기' 강의를 듣고있는데 저번에 '안드로이드 커뮤니티 앱 만들기'에서는 핸드폰의 이미지를 불러올때 fun getProfileImg() { joinBinding.imageArea.setOnClickListener { val gallery = Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI) startActivityForResult(gallery, 100) } } override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { super.onActivityResult(requestCode, resultCode, data) if (resultCode == AppCompatActivity.RESULT_OK && requestCode == 100) { joinBinding.imageArea.setImageURI(data?.data) } }이런식으로 하셨잖아여. 이번에도 이렇게 하니까 정상 작동하더라고요! 이번에는 fun getProfileImg() { val getAction = registerForActivityResult( ActivityResultContracts.GetContent(), ActivityResultCallback { uri -> joinBinding.imageArea.setImageURI(uri) } ) joinBinding.imageArea.setOnClickListener { getAction.launch("image/*") } }이런식으로 하고계시잖아요. 두방법간의 차이가 뭔가요? 아니면 더 좋은방법을 알아내신건가요?
-
해결됨만들면서 배우는 리액트 : 기초
react에서 컴포넌트 만들 때 대문자를 쓰는 이유
react에서 컴포넌트 만들 때 대문자를 쓰는 특정한 이유가 있을까요?(소문자로 시작하면 절대 컴포넌트로 받아올 수 없는 건가요?)
-
해결됨10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
1-G 문제 질문입니다.
안녕하세요 1-G 문제를 풀었는데일단 게시판에 있는 반례를 다 적용하여도 틀렸다고 하는데 알고리즘 부분에서 복잡해서 그런거 같은데 어떤 문제점이 있는가요?http://boj.kr/7c33677aa106459385854be91d02ac26아.... 제가 다시 보니 asterisk가 한 개이군요,,,, 저는 asterisk 갯수도 제한 없는 줄 알았네요.. ㅎㅎㅎ;
-
미해결[초중급편] 안드로이드 데이팅 앱 만들기(Android Kotlin)
상황별 어떤 레이아웃을 쓰는게 좋을까요?
'유저 정보 받아오기' 강의를 들으면서 item_card.xml의 layout_height 가 500dp 로 되어있어서<ImageView android:id="@+id/profileImageArea" android:layout_width="match_parent" android:layout_height="500dp"/>이런식으로 지역이 가려지더라고요결국 그부분을 450dp로 줄여서 해결하긴했는데,만약 핸드폰 비율에 따라서 똑같은 비율로 적용을 하려면 constraintlayout 을 사용해야되는거죠?제가 느끼기로는 constraintlayout 이 LinearLayout보다 비율맞추기도 쉽고 디자인탭에서만으로도 정렬이 되는거 같아서 편해서, 혼자 앱만들다보면 constraintlayout을 남발할꺼같은데 실무에서는 어떤 레이아웃들이 많이 쓰이나요?지금은 혼자 만들어볼때 특별한 기준없이 그냥 손에 잡히는 레이아웃으로 하고있는데, 어느 상황때 무슨 레이아웃을 쓰는 습관을 들여야 좋을지할지 궁금합니다!
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
디렉터리에 있는 / 관련해서 질문드립니다
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예)[질문 내용]@GetMapping("/members/new") public String createForm() { return "members/createMemberForm"; } 강의에선 이렇게 되어 있는데@GetMapping에선 /members/new이고return에선 members/createMemberForm인데전자는 members 앞에 /가 있고 후자엔 members 앞에 /가 없는데 맨 앞에 /를 붙이나 안 붙이나 상관없다고 보면 되나요?제가 실행할 땐 /를 뺐다가 안 뺐다가 해도 정상 동작하는 것 같긴 해서요.. 아니면 권장하는 표기법이 따로 있나요? 그리고 자바에선 디렉터리 구분은 .로 하잖아요com.example.car 이런 식으로 .으로 구분하는데위에서 .가 아닌 /인 이유는 해당 디렉터리가 HTML 파일들에 대한 디렉터리라서 그런 건가요?그래도 위 코드 자체는 자바 코드라서 .일 줄 알았었어요
-
해결됨[파이썬/Python] 문과생도 이해하는 DFS 알고리즘! - 입문편
연결되어 있고 아직 방문하지 않은 노드에 대한 방문 순서 관련
제가 경험이 부족해서 그런 것 같은데요, 이 문제는 'x < y'라는 조건이 없다면 DFS로 풀 수 있는 문제가 아닌 것 같다는 생각이 들었습니다.https://www.acmicpc.net/problem/2644에서 '입력' 파트를 보면, '번호 x는 뒤에 나오는 정수 y의 부모 번호를 나타낸다.'라고만 나와있습니다. 즉, 'x < y'라는 조건이 주어져 있지 않습니다. 부모 노드 번호가 자식 노드 번호보다 작다는 조건이 주어져 있지 않는 것입니다.그래서 저는 이 문제가 DFS로 풀리는 문제가 아닐 것 같다고 생각했었습니다. 위 그림에서는 노드2의 부모가 1이지만, 2보다 값이 큰 3이 될 수도, 4가 될 수도 있을 것이라 생각했습니다. 따라서 노드2를 방문한 이후에, 노드2와 연결된 노드 중 아직 방문하지 않은 노드들 중 어떻게 부모 노드를 찾아야하지? '부모 노드 번호 < 자식 노드 번호'라는 조건이 없으면, 부모 노드를 찾을 수 없을 것 같은데?하는 생각이 들었습니다. 문제에서 x<y라는 조건이 없는 것 같은데, 어떻게 '나와 연결되어 있고 아직 방문하지 않은 노드 중 번호가 가장 작은 노드를 방문해야겠다'는 생각을 하신 것인지 궁금합니다..
-
해결됨[C++과 언리얼로 만드는 MMORPG 게임 개발 시리즈] Part1: C++ 프로그래밍 입문
StrCmp 질문 있습니다
char a[BUF_SIZE] = "Hello";char b[BUF_SIZE] = "Helloa";일 때StrCmp를 실행 하고 난 후 이 부분에서 i 가 5일 때 a[i] 의 값이 '\0' 인데 왜 while 문을 한번 더 도는지 잘 모르겠습니다