묻고 답해요
167만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨Node.js 교과서 - 기본부터 프로젝트 실습까지
mongoDB local 로그인 질문입니다
mongoDB를 사용해서 local로그인을 구현하려고 하고 있습니다. 1. mongoose로 연결을 시킬때 admin을 꼭 사용해야 하는건가요? 아래를보면 admin부분에 dbName을 넣어도 되는데 admin을 사용하는 이유가 궁금합니다. admin을 사용하고 안하고의 차이점이 무엇인가요? 2. 강의 내용을 토대로 local로그인을 구현중인데 몇시간째 계속 달리지지 않아 제가 방향성이 잘못된것인지 질문드립니다. 제가 user를 findOne을 할 때 .then() 안에서는 user가 null 입니다. 음.. 제가 잘못된 방향으로 구현하고 있는 중인가요? mongoose.connect('mongodb://localhost:27017/admin', { dbName: 'nodeJS', }) -------------- 아래는 ----------------------------- router.post('/join', async (req, res, next) => { const { submitEmail, submitPassword } = req.body; try { const user = User.findOne({ email_id: submitEmail }) console.log('-----------user-------',user) if(user) { req.flash('joinError', '이미 가입된 회원입니다.'); return res.redirect('/login'); } else { console.time('암호화 시간') await bcrypt.hash(password, 12); // 숫자가 높을수록 안정성이 높고 시간이 느려진다. console.timeEnd('암호화 시간') // 시간이 1초정도 걸릴때 까지 숫자를 늘리거나 줄여본다. await new User({ email_id: submitEmail, password: submitPassword }).save().then(()=>{ return res.redirect('/login'); }); // return res.redirect('/login'); } } catch (err) { console.log(err); next(err); } });
-
미해결it 취업을 위한 알고리즘 문제풀이 입문 (with C/C++) : 코딩테스트 대비
dev c++ 컴파일 에러
문제를 풀고 f9,f10을 누르면 현재 코드를 작성한대로 나오는게 아니라 이전 코드로 컴파일한 내용이 나옵니다. 컴파일러 설정에서 -static-libgcc를 추가해봐도 해결되지 않습니다.. 이런 경우는 어떻게 해결해야되는지 질문 남깁니다.
-
해결됨실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
서비스계층에서 의존성에 대해 질문입니다.
안녕하세요 항상 정말 강의 잘듣고 있고 평소에 쓰면서 고민했던 부분을 설명해주시고 그리고 질문으로 답해주셔서 정말 도움이 많이 되고 있습니다. orderService에서 orderRepository,memberRepository,itemRepository 처럼 서비스 계층에서 의존성으로 다른 레파지토리를 가지는게 나은건지 아님 서비스로(orderService,,) 가져가는게 나은건지 고민이 됩니다.혹시 실무에서 보통 서비스와 레파지토리 둘중 선택하는 기준이나 각각의 장단점이 있을까요?
-
미해결C로 배우는 자료구조 및 여러가지 예제 실습
realloc함수 쓰지 않는이유
realloc함수로 메모리를 재할당하지않고 reallocate함수를 따로 만드는이유가 뭔가요?
-
미해결[백문이불여일타] 데이터 분석을 위한 중급 SQL
제코드에 오류가 있었을까요??
select E.Name as Employee from Employee as E inner join Employee as M on E.id = M.id where E.salary > M.salary ; 실행해도 values가 빈리스트로 나오더라구요. Output {"headers": ["Employee"], "values": []} Diff Expected {"headers": ["Employee"], "values": [["Joe"]]}
-
미해결[개정판] 파이썬 머신러닝 완벽 가이드
실무에서 분석가로 활동하기 위한 수학, 통계 역량?
안녕하세요 강사님 강의 잘 보았습니다. 다름이 아니라 실무에서 분석가로 활동하기 위한 수학적 역량은 어느 정도가 필요할까요? 통계 혹은 미적분학에 대한 지식이 필요한 것 같은데, 어느 정도 깊이로 공부해야 도움이 될지 궁금합니다. 답변 미리 감사드립니다.
-
미해결C 와 C++ 을 동시에 배워보자 - 두들낙서의 C/C++
배열 질문
입력받은 문자열을 거꾸로 출력해주는 함수는 어떻게 만드는지 궁금합니다..!
-
미해결[OpenCV] 파이썬 딥러닝 영상처리 프로젝트 - 손흥민을 찾아라!
안녕하세요 질문 있습니다.
dlib을 설치하는데 계속 이런 에러가 떠서 찾아보고 해봤는데 계속 안되는데 왜 그런지 알려주실 수 있을까요.. (ComputerVision) usang-in-ui-MacBook-Pro:~ usang-in$ pip3 install dlib Collecting dlib Using cached https://files.pythonhosted.org/packages/63/92/05c3b98636661cb80d190a5a777dd94effcc14c0f6893222e5ca81e74fbc/dlib-19.19.0.tar.gz Building wheels for collected packages: dlib Running setup.py bdist_wheel for dlib ... error Complete output from command /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-wheel-ecxo61rx --python-tag cp36: running bdist_wheel running build running build_py package init file 'dlib/__init__.py' not found (or not a regular file) running build_ext Building extension for Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 03:02:14) Invoking CMake setup: 'cmake /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/build/lib.macosx-10.9-x86_64-3.6 -DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -DCMAKE_BUILD_TYPE=Release' -- The C compiler identification is unknown -- The CXX compiler identification is unknown -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- broken CMake Error at /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message): The C compiler "/usr/bin/cc" is not able to compile a simple test program. It fails with the following output: Change Dir: /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/make cmTC_475b6/fast && xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:3 (project) -- Configuring incomplete, errors occurred! See also "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeOutput.log". See also "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeError.log". Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/setup.py", line 261, in <module> 'Topic :: Software Development', File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup return distutils.core.setup(**attrs) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 188, in run self.run_command('build') File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/setup.py", line 135, in run self.build_extension(ext) File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/setup.py", line 172, in build_extension subprocess.check_call(cmake_setup, cwd=build_folder) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 291, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/build/lib.macosx-10.9-x86_64-3.6', '-DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1. ---------------------------------------- Failed building wheel for dlib Running setup.py clean for dlib Failed to build dlib Installing collected packages: dlib Running setup.py install for dlib ... error Complete output from command /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-record-m5vnrry6/install-record.txt --single-version-externally-managed --compile: running install running build running build_py package init file 'dlib/__init__.py' not found (or not a regular file) running build_ext Building extension for Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 03:02:14) Invoking CMake setup: 'cmake /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/build/lib.macosx-10.9-x86_64-3.6 -DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -DCMAKE_BUILD_TYPE=Release' -- The C compiler identification is unknown -- The CXX compiler identification is unknown -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- broken CMake Error at /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message): The C compiler "/usr/bin/cc" is not able to compile a simple test program. It fails with the following output: Change Dir: /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/make cmTC_0561c/fast && xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:3 (project) -- Configuring incomplete, errors occurred! See also "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeOutput.log". See also "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeError.log". Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/setup.py", line 261, in <module> 'Topic :: Software Development', File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup return distutils.core.setup(**attrs) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/install.py", line 545, in run self.run_command('build') File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/setup.py", line 135, in run self.build_extension(ext) File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/setup.py", line 172, in build_extension subprocess.check_call(cmake_setup, cwd=build_folder) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 291, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/build/lib.macosx-10.9-x86_64-3.6', '-DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1. ---------------------------------------- Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-record-m5vnrry6/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/ You are using pip version 10.0.1, however version 20.0.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command.
-
미해결디지털 포렌식 기초
디지터포렌식전문가 자격증 준비하는 사람입니다
계속 영상을 만들고 계신가요?
-
해결됨파이썬 레시피 - 웹 활용 입문편 (전자책 포함)
파싱이 안 되는것 같아요.
requests.get함수로 가져온 결과를 파싱한 결과가 제대로 나오지 않는것 같습니다.왜 그럴까요?
-
미해결Tip으로 배우는 엑셀(Excel)
엑셀 함수 입력시 절대참조 사용 방법
안녕하세요~ 주말을 맞이하여 엑셀 공부중인데 궁금한 점이 있어 문의 드립니다. 엑셀 함수 입력할때 절대 참조는 무엇을 눌러야 바로 서식이 걸리나요? 인터넷에 찾아봐도 안나오네요ㅠㅠ 좋은 수업 감사합니다.
-
미해결윤재성의 스프링 프레임워크 개발자를 위한 실습을 통한 입문 과정
수업자료(PPT)도 올려주세요~~~~
수업자료(PPT)도 올려주셨으면 좋겠습니다.
-
미해결C# 프로그래밍 기초
업,다운캐스팅
13:48 Human h1 = st; //h1은 자식인 student를 가리키고 있다 라고하셨는데 st ->h1으로 대입 즉, student가 Human으로 아닌가 싶습니다. 업캐스팅이라고 하죠 자식이 부모클래스에 접근하는 방식이니까요. Student st2 = h1 as Student; // h1 -> st2 즉, Human이 stduent으로 부모클래스에서 자식 클래스로 다운캐스팅 이라고 알고있습니다. 궁금한걸 정리하자면, 부모클래스가 자식클래스로의 접근이 가능하다고 하시고 자식클래스가 부모클래스로 접근이 불가능하다고 하셨는데 반대가 아닌가 싶습니다. 제가 지식이 짧아서 이해가 부족합니다. 어떤 표현이 맞는지 알려주세요.
-
미해결[백문이불여일타] 데이터 분석을 위한 중급 SQL
group by에 두 개 이상의 column을 쓰는 경우
마지막 hackerrank 상위 문제에서 (union 문제) -- SELECT x,y From Functions WHERE x=y GROUP BY x, y HAVING COUNT(x)=2 -- 이 부분의 group by를 해결하는 데에 어려움을 겪었습니다 group by에 두 개 이상의 column을 쓰는 것이 잘 이해가 되지 않아 검색하다가 해당 링크를 찾았는데요 https://dev.mysql.com/doc/refman/8.0/en/group-by-modifiers.html 제가 판단하기로는 group by에 복수 column을 쓰는 경우 곱진법(모든 경우의 수..?)에 의해 모든 가능한 수가 다 나오므로 가능한 것 같더라고요.. 해당 문제에서 ' group by x,y ' 를 쓴 이유도 마찬가지인가요..?? 모든 가능한 수를 중복되지 않게 보이기 위해..???
-
누구나 할 수 있는 안드로이드 앱 개발 - 1 (Kotlin)
선생님 질문이있습니다
삭제된 글입니다
-
미해결처음시작하는 Google 공식 개발 언어 Kotlin
this가 무슨 의미인지 궁금합니다.
코딩 생초보인데요 캡슐화 강의 중에 나온 this의 역할과 의미가 정확히 무엇인지 알려주시면 감사하겠습니다 var value1 : int set(v1){ println("setter가 호출되었습니다") this.a1 = v1 }
-
미해결React로 NodeBird SNS 만들기
안녕하세요
제가 위 강좌를 토대로 제 개인프로젝트를 만들었는데 다른점은 백엔드를 express로 안쓴다는점입니다. spring boot를 사용했는데 궁금한점이 있습니다. _app.js에 getInitialProps에서 isServer인경우 axios.defaults.headers.Cookie = cookie; 이런식으로 저장했는데 제 크롬에서 cookie가 날리고 완전새로고침을 해서 접속해도 axios.default.headers.Cookie값에는 cookie값이 남아있고 (ctx.req.headers.cookie에는 cookie값이 undefined입니다. 오직 axios값에만 저장되어있네요) 다른 기기로 처음접속해도 위 값이 찍히는데 위 같은경우는 왜 발생하는것인가요? 어떻게 해결해야할까요?
-
해결됨나도 할 수 있다! SW강사!
강사등록
처음 강사를 시작하면 등록이 안되더라구요. 한번이라도 학교에서 강의를 해본 분들만 등록이 되는거 같은데 제가 잘못 알고 있는건가요?ㅠㅠ 이 부분에 대한 언급도 필요할 것 같습니다.
-
미해결프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)
메소드 관련 질문
aaa.bbb로 적으면 bbb가 붉은색 aaa.bbb()로 적으면 bbb가 파란색이 됩니다. 둘 다 메소드라 생각했는데 차이가 무엇인지 궁금하고, 붉은색/파란색 글자의 의미도 설명해주시면 감사드리겠습니다.
-
미해결쉽게 따라하는 Vray For SketchUP
v ray bump 질문드립니다
강의에 맞게 v ray를 설정하였는데, bump랑 displacement가 렌더링을 하면 적용이 되질 않습니다. asset editor 에선 적용이 되어있구요... 버전은 스케치업 2019입니다.