묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결파이썬 알고리즘 문제풀이 입문(코딩테스트 대비)
제가 직접 작성한 코드에서는 중복된 결과가 나오는데 해결방법을 모르겠습니다.
강의코드와는 다르지만 저는 여기서 왜 중복결과가 나오는지 어떻게 중복을 줄여야할 지 모르겠습니다.... t = int(input()) k = int(input()) p = [] n = [] cnt = 0 tmp = [] for i in range(k): a,b = map(int,input().split()) p.append(a) n.append(b) def DFS(i,sum): global cnt global tmp if sum > t: return if i == k: if sum == t: cnt += 1 print(tmp) else: if n[i] > 0: n[i] -= 1 tmp.append(p[i]) DFS(i+1,sum+p[i]) DFS(i,sum+p[i]) n[i] += 1 tmp.pop() DFS(i+1,sum) DFS(0,0) print(cnt) 이렇게 실행하면 이렇게 나옵니다. 해결방법이 필요합니다..
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
게시글,댓글 saga 작성하기에서 에러나왔습니다.
우선 가장 처음 본 에러메세지는 이렇습니다. 상황은 로그인 후 게시글을 작성하려고 입력시 [object Object]라는 문구만 출력이 됩니다 그런 상태에서 게시글을 버튼을 클릭해서 게시하려고 하면 아래처럼 에러가 발생합니다. 아래 같이 PostForm.jsx 언급이 있어서 저 부분의 코드를 확인해봤습니다. 딱히 큰 문제가 없는거 같은대 왜 에러가 나오는지 몰라서 addPostDone 리듀서나 이런 파일이 영상과 다른게 있나 확인해봤습니다. initialState는 이렇게 되어있고 post쪽 리듀서는 이렇게 되어있습니다.. 영상을 다시 돌려보긴했는대 해당 부분에서는 어디가 문제가 되는건지 모르겠습니다
-
미해결[리뉴얼] Node.js 교과서 - 기본부터 프로젝트 실습까지
모듈 임포트가 안되네요
어떻게 해야 할까요?
-
해결됨10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
1068 트리 질문
루트 노드부터 시작해서 자식 노드의 개수 만큼 cnt에 더해주고 그 자식노드 중에 또 자식이 있으면 -1 해주는 방식으로 구현했습니다. 백준에 제출했을 때 78% 에서 틀렸다고 뜨는데 ... 놓친 부분을 잘 모르겠습니다. 아래는 저의 코드입니다. #include<iostream> #include<vector> #include<queue> using namespace std; int n; int cnt; queue<int> q; int root; bool vst[54]; int main(void){ ios::sync_with_stdio(0); cin.tie(0); cin >> n; vector<int> v[n]; for(int i=0; i<n; i++){ int x; cin >> x; if(x == -1){ q.push(i); root = i; } else{ v[x].push_back(i); } } int rn; cin >> rn; if(rn == root){ cout << 0; return 0; } if(n == 2){ cout << 1; return 0; } vst[rn] = 1; for(auto e: v[rn]){ vst[e] = 1; } while(!q.empty()){ auto cur = q.front(); q.pop(); if(vst[cur]) continue; cnt += v[cur].size(); if(!v[cur].empty()) cnt--; for(int j=0; j < v[cur].size(); j++){ if(vst[v[cur][j]]) continue; vst[cur] = 1; q.push(v[cur][j]); } } cout << cnt; return 0; }
-
미해결비전공자를 위한 진짜 입문 올인원 개발 부트캠프
사진이 안 불러와집니다
크롬 콘솔에 저런 오류 문구가 뜨면서 이미지만! 안 불러와집니다 ㅠㅠ 여러 질문들과 답변 확인하면서 JSON문법 검사기에도 돌려봤는데 Valid라고 나왔구요... 웃긴 건 만들어진 상품 목록들에 상품 이름이나 가격, 그리고 샐러 옆에 있는 아이콘까지 잘 나오는데, 딱 상품 사진만 안 나오네요 ㅠㅠㅠㅠ 아래는 VS코드 입력창입니다..!
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
스프링부트 입문 JPA 편에서 MemberServiceIntegerationTest의 회원가입 메서드 테스트 과정에서 에러가 발생합니다 ㅠㅜ
에러 메시지는 이렇습니다. javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not prepare statement at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154) at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1626) at org.hibernate.query.Query.getResultList(Query.java:165) at hello.hellospring.repository.JpaMemberRepository.findByName(JpaMemberRepository.java:33) at hello.hellospring.service.MemberService.validateDuplicateMember(MemberService.java:32) at hello.hellospring.service.MemberService.join(MemberService.java:27) at hello.hellospring.service.MemberService$$FastClassBySpringCGLIB$$530c61b7.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at hello.hellospring.service.MemberService$$EnhancerBySpringCGLIB$$a533e7bf.join(<generated>) at hello.hellospring.service.MemberServiceIntegrationTest.회원가입(MemberServiceIntegrationTest.java:28) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725) at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84) at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115) at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37) at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104) at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:214) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:210) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86) at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86) at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53) at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:220) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53)Caused by: org.hibernate.exception.SQLGrammarException: could not prepare statement at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:63) at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:37) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:186) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement(StatementPreparerImpl.java:151) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:2122) at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2059) at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2037) at org.hibernate.loader.Loader.doQuery(Loader.java:956) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:357) at org.hibernate.loader.Loader.doList(Loader.java:2868) at org.hibernate.loader.Loader.doList(Loader.java:2850) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2682) at org.hibernate.loader.Loader.list(Loader.java:2677) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:540) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:400) at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:219) at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1459) at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1649) at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1617) ... 84 moreCaused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Column "MEMBER0_.USERNAME" not found; SQL statement:select member0_.id as id1_0_, member0_.username as username2_0_ from member member0_ where member0_.username=? [42122-200] at org.h2.message.DbException.getJdbcSQLException(DbException.java:453) at org.h2.message.DbException.getJdbcSQLException(DbException.java:429) at org.h2.message.DbException.get(DbException.java:205) at org.h2.message.DbException.get(DbException.java:181) at org.h2.expression.ExpressionColumn.getColumnException(ExpressionColumn.java:163) at org.h2.expression.ExpressionColumn.optimize(ExpressionColumn.java:145) at org.h2.expression.Alias.optimize(Alias.java:52) at org.h2.command.dml.Select.prepare(Select.java:1206) at org.h2.command.Parser.prepareCommand(Parser.java:744) at org.h2.engine.Session.prepareLocal(Session.java:657) at org.h2.server.TcpServerThread.process(TcpServerThread.java:278) at org.h2.server.TcpServerThread.run(TcpServerThread.java:183) at java.base/java.lang.Thread.run(Thread.java:833) at org.h2.message.DbException.getJdbcSQLException(DbException.java:502) at org.h2.engine.SessionRemote.readException(SessionRemote.java:637) at org.h2.engine.SessionRemote.done(SessionRemote.java:606) at org.h2.command.CommandRemote.prepare(CommandRemote.java:78) at org.h2.command.CommandRemote.<init>(CommandRemote.java:50) at org.h2.engine.SessionRemote.prepareCommand(SessionRemote.java:480) at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1116) at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:92) at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:288) at com.zaxxer.hikari.pool.ProxyConnection.prepareStatement(ProxyConnection.java:337) at com.zaxxer.hikari.pool.HikariProxyConnection.prepareStatement(HikariProxyConnection.java) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$5.doPrepare(StatementPreparerImpl.java:149) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:176) ... 100 more
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
안녕하세요. 로드맵에서 궁금한 점이 있습니다.
해당 로드맵을 듣고 JPA관련 로드맵을 들으면 될까요?
-
미해결스프링과 JPA 기반 웹 애플리케이션 개발
컨트롤러 관련 질문 드립니다.
@PostMapping("/settings/profile") ... return "redirect:/profile/" + account.getNickname(); 이러한 방식으로 프로필 창으로 바로 넘어가고 싶은데 닉네임이 한글일 경우 ???로 깨짐 현상이 일어납니다. 해결방법을 찾아봐도 해결되지 않아 질문드립니다ㅠ 어느 부분을 수정해야할지 알려주실 수 있을까요?
-
미해결
노션 권한 부탁드립니다!
kaaang@kakao.com 입니다!
-
해결됨실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화
1번 강의 소스코드
안녕하세요? JPA 강의 2번 부터 수강하고 있습니다. 실제 코드를 작성하면서 따라하는데, 1번 강의의 소스코드를 이어서 실습을 하다보니 제한이 되는 부분이 있네요. 이전 강의 자료(pdf)에 없는 코드도 있는거 같은데 이부분은 제공이 불가능할까요? 당장 회원등록 API 부터 MemberService.등이 없으니 진행이 안되네요ㅠ
-
미해결PHP 7+ 프로그래밍
php 에러발생..
Cannot load Xdebug - it was already loadedPHP Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: /opt/homebrew/lib/php/pecl/20210902/curl (dlopen(/opt/homebrew/lib/php/pecl/20210902/curl, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/curl' (no such file), '/usr/local/lib/curl' (no such file), '/usr/lib/curl' (no such file)), /opt/homebrew/lib/php/pecl/20210902/curl.so (dlopen(/opt/homebrew/lib/php/pecl/20210902/curl.so, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/curl.so' (no such file), '/usr/local/lib/curl.so' (no such file), '/usr/lib/curl.so' (no such file))) in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: /opt/homebrew/lib/php/pecl/20210902/curl (dlopen(/opt/homebrew/lib/php/pecl/20210902/curl, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/curl' (no such file), '/usr/local/lib/curl' (no such file), '/usr/lib/curl' (no such file)), /opt/homebrew/lib/php/pecl/20210902/curl.so (dlopen(/opt/homebrew/lib/php/pecl/20210902/curl.so, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/curl.so' (no such file), '/usr/local/lib/curl.so' (no such file), '/usr/lib/curl.so' (no such file))) in Unknown on line 0PHP Warning: PHP Startup: Unable to load dynamic library 'fileinfo' (tried: /opt/homebrew/lib/php/pecl/20210902/fileinfo (dlopen(/opt/homebrew/lib/php/pecl/20210902/fileinfo, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/fileinfo' (no such file), '/usr/local/lib/fileinfo' (no such file), '/usr/lib/fileinfo' (no such file)), /opt/homebrew/lib/php/pecl/20210902/fileinfo.so (dlopen(/opt/homebrew/lib/php/pecl/20210902/fileinfo.so, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/fileinfo.so' (no such file), '/usr/local/lib/fileinfo.so' (no such file), '/usr/lib/fileinfo.so' (no such file))) in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'fileinfo' (tried: /opt/homebrew/lib/php/pecl/20210902/fileinfo (dlopen(/opt/homebrew/lib/php/pecl/20210902/fileinfo, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/fileinfo' (no such file), '/usr/local/lib/fileinfo' (no such file), '/usr/lib/fileinfo' (no such file)), /opt/homebrew/lib/php/pecl/20210902/fileinfo.so (dlopen(/opt/homebrew/lib/php/pecl/20210902/fileinfo.so, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/fileinfo.so' (no such file), '/usr/local/lib/fileinfo.so' (no such file), '/usr/lib/fileinfo.so' (no such file))) in Unknown on line 0PHP Warning: PHP Startup: Unable to load dynamic library 'mbstring' (tried: /opt/homebrew/lib/php/pecl/20210902/mbstring (dlopen(/opt/homebrew/lib/php/pecl/20210902/mbstring, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/mbstring' (no such file), '/usr/local/lib/mbstring' (no such file), '/usr/lib/mbstring' (no such file)), /opt/homebrew/lib/php/pecl/20210902/mbstring.so (dlopen(/opt/homebrew/lib/php/pecl/20210902/mbstring.so, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/mbstring.so' (no such file), '/usr/local/lib/mbstring.so' (no such file), '/usr/lib/mbstring.so' (no such file))) in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'mbstring' (tried: /opt/homebrew/lib/php/pecl/20210902/mbstring (dlopen(/opt/homebrew/lib/php/pecl/20210902/mbstring, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/mbstring' (no such file), '/usr/local/lib/mbstring' (no such file), '/usr/lib/mbstring' (no such file)), /opt/homebrew/lib/php/pecl/20210902/mbstring.so (dlopen(/opt/homebrew/lib/php/pecl/20210902/mbstring.so, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/mbstring.so' (no such file), '/usr/local/lib/mbstring.so' (no such file), '/usr/lib/mbstring.so' (no such file))) in Unknown on line 0PHP Warning: PHP Startup: Unable to load dynamic library 'mysqli' (tried: /opt/homebrew/lib/php/pecl/20210902/mysqli (dlopen(/opt/homebrew/lib/php/pecl/20210902/mysqli, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/mysqli' (no such file), '/usr/local/lib/mysqli' (no such file), '/usr/lib/mysqli' (no such file)), /opt/homebrew/lib/php/pecl/20210902/mysqli.so (dlopen(/opt/homebrew/lib/php/pecl/20210902/mysqli.so, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/mysqli.so' (no such file), '/usr/local/lib/mysqli.so' (no such file), '/usr/lib/mysqli.so' (no such file))) in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'mysqli' (tried: /opt/homebrew/lib/php/pecl/20210902/mysqli (dlopen(/opt/homebrew/lib/php/pecl/20210902/mysqli, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/mysqli' (no such file), '/usr/local/lib/mysqli' (no such file), '/usr/lib/mysqli' (no such file)), /opt/homebrew/lib/php/pecl/20210902/mysqli.so (dlopen(/opt/homebrew/lib/php/pecl/20210902/mysqli.so, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/mysqli.so' (no such file), '/usr/local/lib/mysqli.so' (no such file), '/usr/lib/mysqli.so' (no such file))) in Unknown on line 0PHP Warning: PHP Startup: Unable to load dynamic library 'openssl' (tried: /opt/homebrew/lib/php/pecl/20210902/openssl (dlopen(/opt/homebrew/lib/php/pecl/20210902/openssl, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/openssl' (no such file), '/usr/local/lib/openssl' (no such file), '/usr/lib/openssl' (no such file)), /opt/homebrew/lib/php/pecl/20210902/openssl.so (dlopen(/opt/homebrew/lib/php/pecl/20210902/openssl.so, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/openssl.so' (no such file), '/usr/local/lib/openssl.so' (no such file), '/usr/lib/openssl.so' (no such file))) in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'openssl' (tried: /opt/homebrew/lib/php/pecl/20210902/openssl (dlopen(/opt/homebrew/lib/php/pecl/20210902/openssl, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/openssl' (no such file), '/usr/local/lib/openssl' (no such file), '/usr/lib/openssl' (no such file)), /opt/homebrew/lib/php/pecl/20210902/openssl.so (dlopen(/opt/homebrew/lib/php/pecl/20210902/openssl.so, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/openssl.so' (no such file), '/usr/local/lib/openssl.so' (no such file), '/usr/lib/openssl.so' (no such file))) in Unknown on line 0PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /opt/homebrew/lib/php/pecl/20210902/pdo_mysql (dlopen(/opt/homebrew/lib/php/pecl/20210902/pdo_mysql, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/pdo_mysql' (no such file), '/usr/local/lib/pdo_mysql' (no such file), '/usr/lib/pdo_mysql' (no such file)), /opt/homebrew/lib/php/pecl/20210902/pdo_mysql.so (dlopen(/opt/homebrew/lib/php/pecl/20210902/pdo_mysql.so, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/pdo_mysql.so' (no such file), '/usr/local/lib/pdo_mysql.so' (no such file), '/usr/lib/pdo_mysql.so' (no such file))) in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /opt/homebrew/lib/php/pecl/20210902/pdo_mysql (dlopen(/opt/homebrew/lib/php/pecl/20210902/pdo_mysql, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/pdo_mysql' (no such file), '/usr/local/lib/pdo_mysql' (no such file), '/usr/lib/pdo_mysql' (no such file)), /opt/homebrew/lib/php/pecl/20210902/pdo_mysql.so (dlopen(/opt/homebrew/lib/php/pecl/20210902/pdo_mysql.so, 0x0009): tried: '/opt/homebrew/lib/php/pecl/20210902/pdo_mysql.so' (no such file), '/usr/local/lib/pdo_mysql.so' (no such file), '/usr/lib/pdo_mysql.so' (no such file))) in Unknown on line 0Xdebug: [Config] The setting 'xdebug.remote_enable' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_enable (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)Xdebug: [Config] The setting 'xdebug.remote_host' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_host (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)Xdebug: [Config] The setting 'xdebug.remote_port' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_port (See: https://xdebug.org/docs/errors#CFG-C-CHANGED) php -version 등 php 명령어를 치기만 하면 이런 오류가 같이 나오네요 왜 그런걸까요?
-
미해결실전! 스프링 데이터 JPA
save 할 때 트랜잭션 관련 질문
save같이 persist가 날라가는 기능들은 트랜잭션 안에서 동작해야 작동하고 @PostConstruct에서는 @Transection이 적용이 안돼서 별도의 클래스를 만들어서 @PostConstruct를 활용하는 걸로 알고있었는데 강의 보니까 @PostConstruct에서 @Transactional없이 그냥 save해도 insert가 되던데 이유가 궁금합니다!
-
미해결호돌맨의 요절복통 개발쇼 (SpringBoot, Vue.JS, AWS)
안녀하세요 질문이 있습니다.
안녕하세요 강의 잘보고 있습니다. 궁금증이 있어 질문 남기게 되었습니다. 예시 상황) 1)게시글 목록 보기 -글 제목 -글 작성자 -글 작성날짜 2)게시글 상세보기 -글 제목 -글 작성자 -글 내용 -글 작성날짜 -조회수 1.각 작업에서 위와 같은 데이터를 내려준다고 가정할 때, 실무에서는 응답용 DTO를 각각 만들어서 사용하는 편인가요?? (위와 같이 간단할 경우와 필드수가 무수히 많을 경우 2가지 상황 모두에 대한 말씀을 해주시면 감사하겠습니다) 1-1 . 만일 따로 만들지 않을 경우. 예시 상황) private String 제목; private String 내용; private String 작성자; pirvate LocalDateTime 작성날짜; private Integer 조회수; 만일 위와 같이 하나의 DTO로 처리할 경우, 목록 보기에서는 조회수와 내용이 필요하지 않습니다. 이때 postman으로 조회해보면 , 내용 필드와 조회수 필드는 필요하지 않기 때문에 초기화 해주지 않았으므로 , 필드는 표시되고 값은 null로 표시됩니다. 혹여 이때 , 클라이언트 입장에서는 이게 필요한 데이터이지만 , 선택적값이라서 null인건가와 같은 착각을 일으키지 않을까 생각이 듭니다. 이럴 경우 어떤식으로 대처하시는지요??
-
미해결풀스택을 위한 도커와 최신 서버 기술(리눅스, nginx, AWS, HTTPS, 배포까지) [풀스택 Part3]
docker-compose up -d 명령 실행 후 커서 작동 안함
안녕하세요 강사님, docker-compose up -d 실행후 lock이 걸린듯 아무 key 먹지 않습니다. 그래서 강제로 터미널을 종료하고 다시 ssh -i ~ 명령으로 ubuntu로 들어가려고 하면 ubuntu로 못 넘어가네요.. docker도 restart 해보고 AWS 인스턴스도 재부팅을 해 보았는데 똑 같은 상태 입니다. AWS 인스턴스를 중지하고 다시 기존 보안코드로 시작을 하였더니, ubuntu로 다시 들어 갈 수 있었고 docker-compose up -d 를 실행 할 수 있었습니다. docker-compose up -d 실행 때 갑자기 이런 현상이 또 발생할 경우 순조롭게 하려면 어떻게 하면 좋은지 알려 주시면 감사하겠습니다.
-
미해결웹 게임을 만들며 배우는 React
onClickRedo함수
onClickRedo = () =>{ this.setState({ winNumbers: getWinNumbers(), winBalls: [], bonus: null, redo: false, }) this.timeouts = []; } 이렇게 초기화 작업 코드를 작성하는데 첫 랜더링때 timeouts[]에 담는 setTimeout()을 클리어하는 clearTimeout()을 초기화 작업에서는 안하는데 예를들어 "한 번더" 버튼을 많이 클릭할 경우에 문제가 없는지 궁금합니다. 없다면 왜 그런지 궁금합니다. 혹시 아니면 Lotto컴포넌트가 삭제된게 아니기 때문에 clearTimeout()을 따로 처리 안 하는건가요? 삭제 될때만 clear처리해주면 되나요?
-
미해결10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
질문있습니다!
c.second()에 +1은 왜 하는건가요?
-
미해결자바스크립트 알고리즘 문제풀이 입문(코딩테스트 대비)
while문 질문
let sum=0, tmp=x; while(tmp){ sum+=(tmp%10) console.log('(1)tmp 값',tmp); console.log('(1)sum 값',sum); tmp=Math.floor(tmp/10); console.log('(2)tmp 값',tmp); console.log('(2)sum 값',sum); } console.log('sum의 값',sum); 강의 잘 보고 있습니다. 위 코드에서 while문 질문입니다. 128(tmp)을 10으로 %하면 sum은 8, 다시 tmp를 10으로 나누면 이때 tmp는 12가 되는 것인가요?
-
미해결한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
diaryList 길이 질문!
강사님 안녕하세요! 16분 50초경에 출력이 2번된다 말씀하시면서 diaryList 의길이가 0일때는 수행할 필요가 없다고 말씀하시면서 if(diaryList.length >= 1) 안에 넣어주셨는데.. 이부분이 잘 이해가 가지않습니다. 콘솔로 찍어보면 항상 length는 5가 나오구 if(diaryList.length >= 1) 를 넣어주지않아도 달력 다음버튼이나 이전 버튼을 누르면 똑같이 1번만 찍히는데 어째서 해주신걸까용..?
-
해결됨실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
BeanCreationException 질문드립니다.
Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.AnnotationException: Use of @OneToMany or @ManyToMany targeting an unmapped class: jpabook.jpashop.domain.item.Item.categories[jpabook.jpashop.domain.Category] 이런 에러가 발생합니다. 코드 첨부합니다. 해당 부분을 지우면 문제없이 돌아가요.. package jpabook.jpashop.domain;import jpabook.jpashop.domain.item.Item;import lombok.Getter;import lombok.Setter;import javax.persistence.*;import java.util.ArrayList;import java.util.List;@Embeddable@Getter@Setterpublic class Category { @Id @GeneratedValue @Column(name = "category_id") private Long id; private String name; @ManyToMany @JoinTable(name = "category_item", joinColumns = @JoinColumn(name = "category_id"), inverseJoinColumns = @JoinColumn(name = "item_id")) private List<Item> items = new ArrayList<>(); @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "parent_id") private Category parent; @OneToMany(mappedBy = "parent") private List<Category> child = new ArrayList<>(); public void addChildCategory(Category child) { this.child.add(child); child.setParent(this); } protected Category(){}} package jpabook.jpashop.domain.item;import jpabook.jpashop.domain.Category;import lombok.Getter;import lombok.Setter;import javax.persistence.*;import java.util.ArrayList;import java.util.List;@Entity@Inheritance(strategy = InheritanceType.SINGLE_TABLE)@DiscriminatorColumn(name = "dtype")@Getter @Setterpublic abstract class Item { @Id @GeneratedValue @Column(name = "item_id") private Long id; private String name; private int price; private int stockQuantity; @ManyToMany(mappedBy = "items") private List<Category> categories = new ArrayList<Category>();}
-
미해결코딩으로 학습하는 리팩토링
stream으로 변경 시 성능 문제
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요 기선님. 리팩토링 이전 코드인 `for문`을 사용한 코드는 반복문이 한번으로 보여지는데 리팩토링 이후 코드는 `filter`, `map`, `filter`, `collect` 네번의 반복문이 도는 것일까요?