inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

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

python 리스트만의 특징

미해결

프로그래밍, 데이터 과학을 위한 파이썬 입문

이해가 잘 안돼요.

  • python
  • bigdata
CJH 댓글 1 좋아요 0 조회수 218

8:16초 1차 포인터와 2차원 배열 호환

미해결

홍정모의 따라하며 배우는 C언어

10.16강 코드를 혼자 짜보다가 실수로 1차 포인터와 2차 배열을 같이 놨는데 호환이 되더라구요? int main() { int arr[3][4] = { {1,2,3,4}, {5,6,7,8},{9,10,11,12}}; int* ptr; ptr = arr; printf("%d \n", sum2d_2(ptr,ROW, COL)); //78 printf("%d", *(ptr+1)); //2 } warning 도 안 뜨고 값도 잘 나오는데 왜 이런거죠?

  • c
활성산소 댓글 2 좋아요 0 조회수 284

git config 관련 질문

미해결

파이썬 입문 및 웹 크롤링을 활용한 다양한 자동화 어플리케이션 제작하기

git에서 config user.name 과 user.email을 입력할 때 , 패스워드는 따로 입력할 필요가 없는건가요 ?? 이름과 이메일, remote할 수 있는 url 정보만 있으면 다른 누구도 git에 접근할 권한이 있는 것인가요 ??

  • 웹-크롤링
  • python
gml5815 댓글 1 좋아요 0 조회수 155

도와주세요...

미해결

따라하며 배우는 노드, 리액트 시리즈 - 기본 강의

계속 붙잡고 있어도 안되서 헬프를 칩니다.. 뭐가 문제인거죠..? auth.js 파일에서 findbytoken을 만드는데 계속 안되기만 합니다. TypeError: User.findByTokenis not a function at auth (C:\Users\AndrewLee\Desktop\node_basic\boilerPlate\middleware\auth.js:8:10) at Layer.handle [as handle_request] (C:\Users\AndrewLee\Desktop\node_basic\boilerPlate\node_modules\express\lib\router\layer.js:95:5) at next (C:\Users\AndrewLee\Desktop\node_basic\boilerPlate\node_modules\express\lib\router\route.js:137:13) at Route.dispatch (C:\Users\AndrewLee\Desktop\node_basic\boilerPlate\node_modules\express\lib\router\route.js:112:3) at Layer.handle [as handle_request] (C:\Users\AndrewLee\Desktop\node_basic\boilerPlate\node_modules\express\lib\router\layer.js:95:5) at C:\Users\AndrewLee\Desktop\node_basic\boilerPlate\node_modules\express\lib\router\index.js:281:22 at Function.process_params (C:\Users\AndrewLee\Desktop\node_basic\boilerPlate\node_modules\express\lib\router\index.js:335:12) at next (C:\Users\AndrewLee\Desktop\node_basic\boilerPlate\node_modules\express\lib\router\index.js:275:10) at cookieParser (C:\Users\AndrewLee\Desktop\node_basic\boilerPlate\node_modules\cookie-parser\index.js:71:5) at Layer.handle [as handle_request] (C:\Users\AndrewLee\Desktop\node_basic\boilerPlate\node_modules\express\lib\router\layer.js:95:5) at trim_prefix (C:\Users\AndrewLee\Desktop\node_basic\boilerPlate\node_modules\express\lib\router\index.js:317:13) at C:\Users\AndrewLee\Desktop\node_basic\boilerPlate\node_modules\express\lib\router\index.js:284:7 at Function.process_params (C:\Users\AndrewLee\Desktop\node_basic\boilerPlate\node_modules\express\lib\router\index.js:335:12) at next (C:\Users\AndrewLee\Desktop\node_basic\boilerPlate\node_modules\express\lib\router\index.js:275:10) at C:\Users\AndrewLee\Desktop\node_basic\boilerPlate\node_modules\body-parser\lib\read.js:130:5 at invokeCallback (C:\Users\AndrewLee\Desktop\node_basic\boilerPlate\node_modules\raw-body\index.js:224:16) ㄱ계속 이 문구만 뜨고요 함수가 아니라는데 저는 함수를 user.js에 만들었고.. 아 이게 무슨 문제일까요.. auth.js const { User } = require ( '../models/user' ); let auth = ( req , res , next ) => { // 이곳에서 인증처리를 하는 곳 // 클라이언트 쿠리에서 토큰을 가져온다 ==> 쿠키 파서를 이용한다. let token = req . cookies . x_auth ; console . log ( 'auth/token :' + token ); // 토큰을 복호화한 후 유저를 찾는다. User . findByToken ( token , ( err , user ) => { if ( err ) throw err ; if (! user ) { return res . json ({ isAuth : false , error : true }) // 유저가 없으니까 } else { // 유저가 있으면 req . token = token ; // 이렇게 설정해주는 이유는 콜러에서 req.token , req.user와 같이 사용할 수 있게 하기 위해서이다. req . user = user ; next (); } }); // 유저가 있으면 인증 오케이 // 유저가 없으면 인증 노노 } module . exports = { auth }; user.js const mongoose = require ( '../node_modules/mongoose' ); const bcrypt = require ( 'bcrypt' ); const saltRounds = 10 ; const myPlaintextPassword = 's0/ \/\P 4$$w0rD' ; const someOtherPlaintextPassword = 'not_bacon' ; var jwt = require ( 'jsonwebtoken' ); const userSchema = mongoose . Schema ({ name : { type : String , maxlength : 50 }, email : { type : String , trim : true , //스페이스를 없앤다 unique : 1 // 유일한 특성 }, password : { type : String , minlength : 5 }, lastname : { type : String , maxlength : 50 }, role : { // 롤을 주는 이유는 유저의 관리권한을 부여하기 위해서 type : Number , defalut : 0 }, image : String , token : { // 토큰을 이용해서 유효성등을 나중에 관리함 type : String }, tokenExp : { // 토큰의 유효기간 type : Number } }) userSchema . pre ( 'save' , function ( next ) { var user = this ; console . log ( '1' ); if ( user . isModified ( 'password' )) { console . log ( '2' ); bcrypt . genSalt ( saltRounds , function ( err , salt ) { console . log ( '3' ); if ( err ) return next ( err ); console . log ( '4' ); bcrypt . hash ( user . password , salt , function ( err , hash ) { console . log ( '5' ); if ( err ) return next ( err ); console . log ( '6' ); console . log ( hash ); user . password = hash ; next (); }); }); } else { next (); } }) userSchema . methods . comparePassword = function ( planPassword , cb ){ bcrypt . compare ( planPassword , this . password , function ( err , isMatch ){ if ( err ) return cb ( err ); cb ( null , isMatch ); } ); } userSchema . methods . generateToken = function ( cb ){ var user = this ; // json웹토큰을 이용해서 토큰을 생성하기 var token = jwt . sign ( user . _id . toHexString (), 'hihello' ); // 이렇게 토큰을 만들면 ,, // user._id + hihello = token이 되고, 나중에는 token과 hihello로 user._id를 만들 수 있다. user . token = token ; user . save ( function ( err , user ){ if ( err ) return cb ( err ); // 에러가 났으면 에러를 전달 cb ( null , user ); // 문제가 없으면 에러는 없고 유저를 전달 자 그럼 index.js로 넘어가서~ }); } userSchema . methods . B = function ( token , cb ){} userSchema . methods . findByToken = function ( token , cb ){ var user = this ; // 토큰을 디코드 한다. user_id + '' = token console . log ( "1 : " + token ); jwt . verify ( token , 'hihello' , function ( err , decoded ){ // 유저 아이디를 이용해서 유저를 찾은 다음에 // 클라이언트에서 가져온 token과 db에 보관된 토큰이 일치하는지 확인 user . findOne ({ "_id" : decoded , "token" : token }, function ( err , user ){ if ( err ){ return cb ( err ); } else { cb ( null , user ); } }) }) } const User = mongoose . model ( 'User' , userSchema ); console . log ( User . comparePassword ); module . exports = { User }; 좋은 강의 항상 감사드립니다.

  • nodejs
  • react
andrewlee 댓글 7 좋아요 2 조회수 944

ModuleNotFoundError: No module named 'run'

미해결

남박사의 파이썬으로 실전 웹사이트 만들기

강사님, 우분투 서버셋업후, nginx, myweb 서비스를 올린후, 아래와 같은 log와 함께 실행이 안됩니다. port나 폴더를 제외하고 모두 동일하게 진행 및 확인했는데 어떤부분을 확인해야할지 모르겠습니다. 어디를 더 확인해야 할지 조언 부탁드려요~ *** Operational MODE: preforking *** ModuleNotFoundError: No module named 'run' unable to load app 0 (mountpoint='') (callable not found or import error) *** no app loaded. going in full dynamic mode *** *** uWSGI is running in multiple interpreter mode *** spawned uWSGI master process (pid: 11113) spawned uWSGI worker 1 (pid: 11114, cores: 1) spawned uWSGI worker 2 (pid: 11115, cores: 1) spawned uWSGI worker 3 (pid: 11116, cores: 1) spawned uWSGI worker 4 (pid: 11117, cores: 1) spawned uWSGI worker 5 (pid: 11118, cores: 1) SIGINT/SIGQUIT received...killing workers... worker 1 buried after 1 seconds worker 2 buried after 1 seconds worker 3 buried after 1 seconds worker 4 buried after 1 seconds worker 5 buried after 1 seconds goodbye to uWSGI. VACUUM: unix socket myweb.sock removed. 전체 log 및 경로명 uwsgi.log 직접 터미널에서 실행하면 정상적으로 실행됩니다. python3 run.py http://172.17.190.71:9001/member/login

  • python
아망풀로 댓글 1 좋아요 1 조회수 828

버전

미해결

파이썬 사용자를 위한 웹개발 입문 A to Z Django + Bootstrap

안녕하세요. 실습에서 사용하시는 파이썬, 장고, 부트스트랩의 버전 공유 부탁드립니다.

  • django
  • bootstrap
  • python
Seung-hee Han 댓글 1 좋아요 0 조회수 220

머신러닝 속도 높이는 방법

해결됨

[개정판] 파이썬 머신러닝 완벽 가이드

안녕하세요? 저는 이제 막 머신러닝에 관심을 갖고 공부를 시작했습니다. 한 가지 궁금한 점은 저의 경우 100만개 정도 데이터로 머신러닝을 수행하는 경우도 있을 것으로 예상하는 데 머신러닝 속도를 높이는 방법이 궁금합니다. 배워도 속도 때문에 활용도가 낮아질까 염려되어 미리 질문 드립니다. 좋은 강의 감사합니다.

  • 통계
  • 머신러닝 배워볼래요?
  • python
Neo 댓글 2 좋아요 0 조회수 4564

Insert 할 때 간단하게 하는 방법

해결됨

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

테이블에 새로운 Row 를 추가하기 위해서 Entity 객체를 생성하고 persist 합니다. 그런데 Entity가 다른 Entity를 참조(@ManyToOne) 하는 경우, 새로운 Entity 객체를 생성하면서 그 참조하는 객체까지 넣어 줘야하는 상황에 대해 질문드립니다. 예를 들면 아래와 같은 케이스 입니다. public class User{ @Id private String userId; @ManyToOne private Team team; } public class Team{ @Id private String teamId; } 새로운 사용자를 하나 추가하기 위해서 Team 객체가 필요합니다. 이럴 때 Team 객체를 수작업으로 생성하지 않기 위해 TeamRepository에서 findById 와 같은 메소드로 객체를 가져온 뒤 User Entity를 만들때 넣어 줄 수 있습니다. 하지만 이렇게 되면 코드도 길어지고 User를 만드는 도메인 객체에서 Team Repository 까지 알아야 하는 상황이 생기는데 더 간단하게 User Entity를 만들수 있는 방법이 있을까해서 질문드립니다. 예를 들면 new User() 할 때 teamId를 넘겨주어서 자동으로 참조되는 객체까지 가져오게 하는 방법이라던지... 좋은 조언 부탁드립니다.

  • java
  • JPA
cothe 댓글 1 좋아요 0 조회수 269

try!는 어떨 때 쓰게 될까요?

미해결

야곰의 스위프트 기본 문법 강좌

try!는 사용의 의미 자체가 필요 없을 것 같다는 생각이 들어서 궁금하네요~

  • swift
Dongbin Im 댓글 0 좋아요 0 조회수 306

git alias를 만들기

미해결

스프링과 JPA 기반 웹 애플리케이션 개발

https://johngrib.github.io/wiki/git-alias/

  • spring
  • JPA
  • spring-boot
  • java
  • thymeleaf
castinglife 댓글 1 좋아요 0 조회수 202

질문입니다.

미해결

따라하며 배우는 노드, 리액트 시리즈 - 기본 강의

제가 다른 강의에서 pm2라는 툴을 사용해본 적이 있는데 nodemon과 같은 제품군이라고 생각해도 되는 건가요? 어떤 것이 더 좋은 툴인지 궁금합니다. 여러군데서 배우다 보면 다양한 툴들을 접하곤 하는데 좋은 툴을 보는 안목같은 것이 있을 까요? 항상 강의 잘 보고 있습니다. 이런 강의가 무료라니 정말 나라에서 상줘야합니다. ㅎㅎ

  • react
  • nodejs
andrewlee 댓글 1 좋아요 0 조회수 139

질문

프론트엔드 개발환경의 이해와 실습 (webpack, babel, eslint..)

삭제된 글입니다

  • 웹팩
  • babel
  • eslint
  • nodejs
andrewlee 댓글 1 좋아요 0 조회수 64

프리다 버전을 다시 설치했는데, 사진처럼 이전버전을 물고있는것같아요

미해결

프리다(Frida)를 이용한 안드로이드 앱 모의해킹

말씀하신대로 12.6.11버전 설치했구요. adb push로 녹스앱에 새버전 파일 넣고, 실행시킨 상태입니다. pip install frida-tools==2.2.0 pip install frida==12.6.11 이전에 설치했던 12.8.20버전이 남아있어서 안되는것 같습니다. 깔끔하게 삭제하는 방법이 있나요?

  • 모의해킹
  • android
  • frida
대진이 댓글 3 좋아요 0 조회수 3146

#각각 썸네일과 제목 추출하기

미해결

파이썬 레시피 - 웹 활용 입문편 (전자책 포함)

Traceback (most recent call last): File "C:/Users/karma/PycharmProjects/pychamwebcrawling/01_web_crawling_naver_test/naver_webtoon_thumbnail.py", line 24, in <module> img_src = img['scr'] File "C:\Users\karma\PycharmProjects\pychamwebcrawling\venv\lib\site-packages\bs4\element.py", line 1321, in __getitem__ return self.attrs[key] KeyError: 'scr' 문제가 먼지 모르겠어요

  • python
송인후 댓글 1 좋아요 0 조회수 406

터미널 스타일러

미해결

테스트주도개발(TDD)로 만드는 NodeJS API 서버

안녕하세요, 강의 잘듣고 있습니다. ㅎㅎ 혹시 강의에 나오는 맥 터미널에 설치하신 터미널 스타일러가 어떤것인지 궁금합니다!

  • nodejs
  • express
  • tdd
  • rest-api
Junhee Park 댓글 2 좋아요 0 조회수 331

네비게이터 가이드 실습 중 페이지렌더링 이상

미해결

Vue.js 완벽 가이드 - 실습과 리팩토링으로 배우는 실전 개념

페이지가 /jobs 에서 'news' 를 클릭하여 '/news'로 렌더링 될때, /jobs 인 상태에서 /news 로 이동하기 전에 미리 list가 news 데이터로 변경이 된 상태에서 /news로 이동하고 스피너가 돌면서 또 news 데이터를 렌더링 해요. 로그를 보면 5와 6 사이에 computed_/jobs 가 찍히는 시점에서 ListItem.vue 의 computed가 호출되고 this.$store.state.list 에는 news 데이터가 바인딩되어있는 거 같아요. //store/action.js FETCH_LIST({commit}, pageName){ //context.commit return fetchList(pageName) .then(({data}) =>{ //response.data console.log(4) commit('SET_LIST', data) console.log(5) return data; }) .catch(error => console.log(error)); }, //components/ListItem.vue computed: { listItems() { console.log('computed_'+this.$route.path) return this.$store.state.list; } } //routes/index.js beforeEnter: (to, from, next) =>{ bus.$emit('start:spinner') store.dispatch('FETCH_LIST', to.name) .then(() => { console.log(6); console.log(`fetched ${to.name} Data`); // bus.$emit('end:spinner') next(); }) .catch((error)=> console.log(error)); }

  • javascript
  • vuejs
Sera Lee 댓글 1 좋아요 1 조회수 203

[] 혹은 none으로 나올때

미해결

[리뉴얼] 파이썬입문과 크롤링기초 부트캠프 [파이썬, 웹, 데이터 이해 기본까지] (업데이트)

안녕하세요! select 혹은 select_one 을 사용해 특정 태그를 출력했을때 none 혹은 []으로 출력되는건 어떤 현상일까요? 소스보기를 했을떄 텍스트가 분명히 존재하는걸 확인해서 추출하면 none 혹은 []으로 나옵니다.

  • 웹-크롤링
  • python
Seungmin Chu 댓글 1 좋아요 0 조회수 322

공유 링크에 권한이 없다고 나옵니다

미해결

데브옵스(DevOps)를 위한 쿠버네티스 마스터

go.main 소스 코드 링크가 권한이 없다고 나옵니다.

  • docker
  • kubernetes
최선을 다하자 댓글 1 좋아요 0 조회수 166

Terminal 에러

미해결

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

안녕하세요. 강의를 듣는 내내 초록색 실행 버튼을 눌러서 실행하면서 진행해 왔는데요, 코드의 틀린 부분을 못 찾겠는데도 갑자기 invalid syntax 라고 에러가 떠서요. 당황해서 이것저것 만지다가 split terminal 을 눌렀는데 그렇게 나눠진 터미널에 대고 마우스 오른쪽 키를 누르니 저렇게 빨간 글씨로 에러가 떠요. Run -> Start Debugging 방식으로 프로그램을 실행하면 정상적으로 작동합니다. 원래대로 돌리려면 어떻게 해야 할까요?

  • python
Jeongin Lee 댓글 1 좋아요 0 조회수 296

해상도 질문

미해결

[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part1: C# 기초 프로그래밍 입문

강의중 어느 순간 부터 해상도가 720으로 떨어지는데 원래 그런건가요??

  • C#
허원재 댓글 1 좋아요 0 조회수 190

인기 태그

인프런 TOP Writers

주간 인기글