묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결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 문을 한번 더 도는지 잘 모르겠습니다
-
미해결자바 ORM 표준 JPA 프로그래밍 - 기본편
ex1-hello-jpa 프로젝트 소스 코드 공유 문의
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? 예2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예[질문 내용]해당 강의의 ex1-hello-jpa 프로젝트 소스 코드가 다 날라갔는데, 혹시 github이나 다른 공유 사이트에서 소스 코드를 받아 볼 수 있을까요?
-
미해결[라이브 멘토링] 유니티 뱀파이어 서바이벌 장르 모작
UI_gameoverpopup 관련
안녕하세요,강의 너무 감사합니다.게임을 진행하다보면 게임오버 팝업이 발동 후 종료를 클릭하게 되면 게임오버 팝업이 먼저 사라지고 scene 전환 애니메이션 활성화 후 마지막에 게임 배틀 장면 scene 이 노출되고 로비 scene으로 이동하게 됩니다. 혹시 마지막 게임 배틀 장면 scene을 노출 안되게 하는 방법이 있을까요?항상 감사합니다.
-
미해결따라하며 배우는 리액트 테스트 [2023.11 업데이트]
안녕하세요! 로딩 상태 테스트에 관련된 질문입니다.
제 나름대로 강의를 응용해서 테스트를 짜보려고 강의 시점과 다른 userEvent 버전을 쓰고 있기는 하는데요. 로딩 상태를 테스트할때 마치 로딩 상태를 건너뛰고 바로 리스폰스를 받은 듯이 작동하고 있습니다.... 혹시 userEvent 버전이 달라서 동작이 달라진걸까요? 강의와 코드 내용이 조금 달라진 것에 대한 질문이라 죄송합니다만 아무리 찾아도 이유를 모르곘네요..ㅠㅠㅠimport { screen, render } from '@testing-library/react'; import App from './App'; import userEvent from '@testing-library/user-event'; describe('MainPage', () => { it('should change page when click buttons', async () => { const user = userEvent.setup(); render(<App />); const americaInput = await screen.findByRole('spinbutton', { name: /america/i, }); await user.clear(americaInput); await user.type(americaInput, '2'); const englandInput = await screen.findByRole('spinbutton', { name: /england/i, }); await user.clear(englandInput); await user.type(englandInput, '1'); const dinnerCheckbox = await screen.findByText(/dinner/i); await user.click(dinnerCheckbox); const orderButton = screen.getByRole('button', { name: '주문하기' }); await user.click(orderButton); const summeryHeading = screen.getByRole('heading', { name: '주문 확인' }); expect(summeryHeading).toBeInTheDocument(); const productHeading = screen.getByRole('heading', { name: '여행상품: 3000', }); expect(productHeading).toBeInTheDocument(); const americaLi = screen.getByText('2 America'); const englandLi = screen.getByText('1 England'); expect(americaLi).toBeInTheDocument(); expect(englandLi).toBeInTheDocument(); const optionHeading = screen.getByRole('heading', { name: '옵션: 500' }); const dinnerLi = screen.getByText('Dinner'); expect(optionHeading).toBeInTheDocument(); expect(dinnerLi).toBeInTheDocument(); const confirmCheckbox = screen.getByRole('checkbox'); const submitButton = screen.getByRole('button'); await user.click(confirmCheckbox); await user.click(submitButton); const loading = screen.getByText(/loading/i); expect(loading).toBeInTheDocument(); const completeDiv = await screen.findByRole('heading', { name: '주문이 성공했습니다!', }); const subHeadingDiv = await screen.findByRole('heading', { name: '지금까지 모든 주문', }); const loadingAfterResponse = screen.queryByText(/loading/i); expect(completeDiv).toBeInTheDocument(); expect(subHeadingDiv).toBeInTheDocument(); expect(loadingAfterResponse).not.toBeInTheDocument(); const priceDiv = await screen.findByText('3500', { exact: false }); expect(priceDiv).toBeInTheDocument(); const backBtn = await screen.findByRole('button'); await user.click(backBtn); const newAmericaInput = await screen.findByRole('spinbutton', { name: /america/i, }); expect(newAmericaInput).toBeInTheDocument(); expect(newAmericaInput).toHaveValue(0); }); });
-
미해결PySide6 GUI & EXE 프로그램 개발 강의 (PyQt5)
login.py 내부 코드 오
self.buttonBox.accepted.connect(Dialog.accept) AttributeError: 'login_Window' object has no attribute 'accept' 오류 떠서 질문합니다. login.py 에 아래 두줄이 에러 발생합니다지우면 잘 작동하는데 지워도 상관 없는 부분인가요? self.buttonBox.accepted.connect(Dialog.accept) self.buttonBox.rejected.connect(Dialog.reject)
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
실제 핸드폰을 연결해 확인해보니 폰트 사이즈가 틀린 문제
안녕하세요!현재 서비스 개발중인데요, 기획과 디자인을 업무로 시작해 사정상 개발까지 하게되었는데요, 선생님 강의가 정말 많이 도움이 되고 있습니다! 감사합니다. 작업을 하다 보니 실제 폰에 연결해서 확인해보고 싶어 연결을 해보았습니다. (애플 아이폰 12 프로) 그런데 플러터 ios 시뮬레이터 아이폰 12 프로 보는것 폰트사이즈가 다르게 나옵니다. 어떻게 하면 시뮬레이터에와 동일하게 실제 핸드폰에서 확인할 수 있을까요?동일한 문제를 겪고 있는 유저를 찾았는데요, 댓글 어떤 유저는 이렇게 해결 했다고 하는데 이렇게 하면되는걸까요? 이해를 하고 싶은데 잘 안되서요!MediaQeury.of(context).copyWith(texScaleFactor: 1.0), child: child!, 이렇게 작성하니 해결 되었다고 해서 적용해보니 해결이 되긴 합니다. ㅠㅠ깃헙원문https://github.com/flutter/flutter/issues/55956void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return ScreenUtilInit( designSize: Size(390, 844), minTextAdapt: true, builder: (_, child) { return MaterialApp( builder: (context, child) { return MediaQuery( data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0), child: child!, ); }, title: 'BOOTHAPP', theme: ThemeData( appBarTheme: const AppBarTheme( color: ColorStyle.backGround, )), home: Realhome2(), ); }, ); } }