묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨[PyTorch] 쉽고 빠르게 배우는 GAN
dcgan, lsgan 질문
dcgan, lsgan 등을 사용하여 이미지 데이터가 아닌 시계열 데이터의 생성도 가능할까요?
-
해결됨[개정판] 파이썬 머신러닝 완벽 가이드
3장의 오차행렬이 잘 이해가 가지 않습니다.
3장 오차행렬에 보면 TN, FP, FN, FP 라는 용어들이 나오는데, 예로들면 TN은 예측값이 Negative고 실제값도 Negative여서 참인 것, FP는 예측값은 Positive인데 실제값은 Negative여서 거짓인 경우. ... 이렇게 이해를 했습니다. 그런데 제가 수학을 못해서 그런지 위의 값들로 정밀도, 재현율이 어떻게 나오는건지 잘 이해가 안갑니다. 또 정밀도, 재현율이 정확히 뭘 뜻하는지도 이해가 안가네요... 답변주시면 정말 감사하겠습니다.
-
미해결홍정모의 따라하며 배우는 C언어
강의 9.1에서 질문있습니다
강의와 똑같이 돌렸는데 "argument of type "const char *" is incompatible with parameter of type char *"라고 뜹니다. 왜 이런 오류가 뜨는건가요?
-
미해결DANO 운동교육 프로그램
레터럴레이즈 할 때 어깨에서 소리가 나는건 왜일까요?
레터럴레이즈 동작을 할 때 팔을 들어올리면(팔꿈치 살짝 구부리고 어깨선 아래까지만 동작) 통증은 없는데 어깨에서 두두둑하는 소리가 나는데 왜 그런걸까요?
-
미해결포토샵 기본기 하루 5분, 3주 만에 끝내기
4강 포토샵 캔버스, 이미지 사이즈강의 2:57초 채우기 문의드립니다.
4강 포토샵 캔버스, 이미지 사이즈강의 2분 57초에 "배경같은 경우에야 다시 채워주면 됩니다" 하셨을떄 어떻게 채우신건가요? 단축키 이신가요? 페이트 툴로 채우곤 햇는데 다른방법이 있는건가요?
-
미해결포토샵 기본기 하루 5분, 3주 만에 끝내기
커맨드 + 옵션 + I 어떻게 하나요?
커맨드 + 옵션 + I 하면 이미지 사이즈 변경된다셨는데. 커맨트 키, 옵션키는 어디에 있나요?
-
미해결프로그래밍, 데이터 과학을 위한 파이썬 입문
python 리스트만의 특징
이해가 잘 안돼요.
-
미해결홍정모의 따라하며 배우는 C언어
8:16초 1차 포인터와 2차원 배열 호환
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 도 안 뜨고 값도 잘 나오는데 왜 이런거죠?
-
미해결파이썬 입문 및 웹 크롤링을 활용한 다양한 자동화 어플리케이션 제작하기
git config 관련 질문
git에서 config user.name 과 user.email을 입력할 때 , 패스워드는 따로 입력할 필요가 없는건가요 ?? 이름과 이메일, remote할 수 있는 url 정보만 있으면 다른 누구도 git에 접근할 권한이 있는 것인가요 ??
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
도와주세요...
계속 붙잡고 있어도 안되서 헬프를 칩니다.. 뭐가 문제인거죠..? 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/\/\P4$$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}; 좋은 강의 항상 감사드립니다.
-
미해결남박사의 파이썬으로 실전 웹사이트 만들기
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
-
미해결파이썬 사용자를 위한 웹개발 입문 A to Z Django + Bootstrap
버전
안녕하세요. 실습에서 사용하시는 파이썬, 장고, 부트스트랩의 버전 공유 부탁드립니다.
-
해결됨[개정판] 파이썬 머신러닝 완벽 가이드
머신러닝 속도 높이는 방법
안녕하세요? 저는 이제 막 머신러닝에 관심을 갖고 공부를 시작했습니다. 한 가지 궁금한 점은 저의 경우 100만개 정도 데이터로 머신러닝을 수행하는 경우도 있을 것으로 예상하는 데 머신러닝 속도를 높이는 방법이 궁금합니다. 배워도 속도 때문에 활용도가 낮아질까 염려되어 미리 질문 드립니다. 좋은 강의 감사합니다.
-
해결됨자바 ORM 표준 JPA 프로그래밍 - 기본편
Insert 할 때 간단하게 하는 방법
테이블에 새로운 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를 넘겨주어서 자동으로 참조되는 객체까지 가져오게 하는 방법이라던지... 좋은 조언 부탁드립니다.
-
미해결야곰의 스위프트 기본 문법 강좌
try!는 어떨 때 쓰게 될까요?
try!는 사용의 의미 자체가 필요 없을 것 같다는 생각이 들어서 궁금하네요~
-
미해결스프링과 JPA 기반 웹 애플리케이션 개발
git alias를 만들기
https://johngrib.github.io/wiki/git-alias/
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
질문입니다.
제가 다른 강의에서 pm2라는 툴을 사용해본 적이 있는데 nodemon과 같은 제품군이라고 생각해도 되는 건가요? 어떤 것이 더 좋은 툴인지 궁금합니다. 여러군데서 배우다 보면 다양한 툴들을 접하곤 하는데 좋은 툴을 보는 안목같은 것이 있을 까요? 항상 강의 잘 보고 있습니다. 이런 강의가 무료라니 정말 나라에서 상줘야합니다. ㅎㅎ
-
프론트엔드 개발환경의 이해와 실습 (webpack, babel, eslint..)
질문
삭제된 글입니다
-
미해결프리다(Frida)를 이용한 안드로이드 앱 모의해킹
프리다 버전을 다시 설치했는데, 사진처럼 이전버전을 물고있는것같아요
말씀하신대로 12.6.11버전 설치했구요. adb push로 녹스앱에 새버전 파일 넣고, 실행시킨 상태입니다. pip install frida-tools==2.2.0 pip install frida==12.6.11 이전에 설치했던 12.8.20버전이 남아있어서 안되는것 같습니다. 깔끔하게 삭제하는 방법이 있나요?
-
미해결파이썬 레시피 - 웹 활용 입문편 (전자책 포함)
#각각 썸네일과 제목 추출하기
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' 문제가 먼지 모르겠어요