묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨홍정모의 따라하며 배우는 C언어
[04:50] 음성 status가 원일 때 -> status가 0일 때
안녕하세요? 1.================================= [04:50] 음성 status가 원일 때 -> status가 0일 때로 바뀌어야 할 거 같습니다. 2.================================ 이 예제에서 공용체가 없었다면 car_data구조체 안에 두 개의 구조체를 사용해야하지만 (po, co 두 구조체를 묶은)공용체가 있어서 사용하기에 더 편리해진거죠? 감사합니다. <전체코드> /* by neuezeal. */ #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> struct personal_owner { char rrn1[7]; //Resident Registration Number char rrn2[8]; //ex: 830422-1185600 }; struct company_owner { char crn1[4]; //Company Registration Number char crn2[3]; // ex: 111-22-33333 char crn3[6]; }; union data { struct personal_owner po; struct company_owner co; }; struct car_data { char model[15]; int status; /* 0 = personal, 1 = company */ union data ownerinfo; }; void print_car(struct car_data car) { printf("-----------------------\n"); printf("Car model : %s\n", car.model); if (car.status == 0) /* 0 = personal, 1 = company */ printf("Personal owner : %s-%s\n", car.ownerinfo.po.rrn1, car.ownerinfo.po.rrn2); else printf("Company owner : %s-%s-%s\n", car.ownerinfo.co.crn1, car.ownerinfo.co.crn2, car.ownerinfo.co.crn3); printf("-----------------------\n"); } int main() { struct car_data my_car = { .model = "Avante",.status = 0, .ownerinfo.po = {"830422", "1185600"} }; struct car_data company_car = { .model = "Sonata", .status = 1,.ownerinfo.co = {"111", "22", "33333"} }; print_car(my_car); print_car(company_car); return 0; }
-
해결됨[개정판] 파이썬 머신러닝 완벽 가이드
도서 구매 관련 문의
안녕하세요 ! 파이썬 머신러닝 완벽가이드 책을 구매하려고 하는데 절판이 되었드라구요 ㅠㅠ 혹시 이 책이 다시 나오나요!?
-
미해결R프로그래밍 기초 다지기
if 문 결과가 다름
m <- matrix(1:15, ncol = 3, byrow = T) m2 <- data.frame(m) m2 m3 <- NULL for (i in 1:10) { if(i %% 2 == 0){ next; } m3 <- rbind(m3, m2) cat('\n', i) } for (i in 1:10) { if(i %% 2 == 0){ }else{} m3 <- rbind(m3, m2) cat('\n', i) } 순차적으로 따라서 실행했으나 강의에서는 최종 dim(m3)가 25행으로 나오고 실행결과 75행이 됩니다.
-
미해결남박사의 파이썬 기초부터 실전 100% 활용
무슨소리인지 모르겠어요
크롤링 개념이 너무 추상적이에요 각각의 다운받은 라이브러리가 뭘하는건지 모르겠구요 너무 어렵습니다
-
실전! 스프링 데이터 JPA
상속받는 엔티티 질문(outer join)
삭제된 글입니다
-
미해결Java TPC 실전프로젝트 (Java API 활용)
5강 질문입니다..
안녕하세요 강사님, 강의 잘 보고 있습니다. 5강에서 info.json파일을 getResourceAsStream로 찾아서, inputStream으로 가져오는 부분이 계속 에러가 나서요.. 뭐가 문제인지 애매합니다. debug찍어보니 NullPointer에서 문제가 있다고 나오긴 하는데, File도 강의 상에 있는 경로로 만들었고 다른걸로 메서드 import를 다른걸로 입력시킨 것도 아닌데.. 뭐가 문젠지 잘 모르겠네요.. 혹시몰라, 코딩 내용과 폴더 구조 올립니다.. 답변 부탁드립니다.. ㅠㅠ
-
해결됨웹퍼블리셔가 알려주는 실무 웹사이트 따라만들기 Season1
default.css
2번째 강의에서 header 잡는데 default.css를 갑자기 쓰시네요... 어디서 나타난건가요...
-
미해결Vue.js 시작하기 - Age of Vue.js
vue cli 설치 error
The default interactive shell is now zsh. To update your account to use zsh, please run `chsh -s /bin/zsh`. For more details, please visit https://support.apple.com/kb/HT208050. yun-aliui-MacBook-Pro:learn-vue-js-master yun-ali$ npm install -g @vue/cli npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3. npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules npm ERR! code EACCES npm ERR! syscall access npm ERR! path /usr/local/lib/node_modules npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules' npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] { npm ERR! stack: "Error: EACCES: permission denied, access '/usr/local/lib/node_modules'", npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib/node_modules' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator. npm ERR! A complete log of this run can be found in: npm ERR! /Users/yun-ali/.npm/_logs/2020-01-28T07_36_11_027Z-debug.log yun-aliui-MacBook-Pro:learn-vue-js-master yun-ali$ yarn global add @vue/cli bash: yarn: command not found yun-aliui-MacBook-Pro:learn-vue-js-master yun-ali$ npm install -g @vue/cli npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3. npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules npm ERR! code EACCES npm ERR! syscall access npm ERR! path /usr/local/lib/node_modules npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules' npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] { npm ERR! stack: "Error: EACCES: permission denied, access '/usr/local/lib/node_modules'", npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib/node_modules' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator. npm ERR! A complete log of this run can be found in: npm ERR! /Users/yun-ali/.npm/_logs/2020-01-28T07_39_49_648Z-debug.log yun-aliui-MacBook-Pro:learn-vue-js-master yun-ali$
-
미해결트렐로 개발로 배우는 Vuejs, Vuex, Vue-Router 프론트엔드 실전 기술
로컬서버 오류 발생이요ㅜㅜㅜ
아래분은 11일인데 아직 해결이 안된건가요ㅜㅜㅜ node-pre-gyp WARN Using request for node-pre-gyp https download node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.0.2/node-v72-win32-x64.tar.gz node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.0.2 and node@12.14.0 (node-v72 ABI, unknown) (falling back to source compile with node-gyp) node-pre-gyp WARN Pre-built binaries not installable for sqlite3@4.0.2 and node@12.14.0 (node-v72 ABI, unknown) (falling back to source compile with node-gyp) node-pre-gyp WARN Hit error Connection closed while downloading tarball file gyp ERR! find Python gyp ERR! find Python Python is not set from command line or npm configuration gyp ERR! find Python Python is not set from environment variable PYTHON gyp ERR! find Python checking if "python" can be used gyp ERR! find Python - "python" is not in PATH or produced an error gyp ERR! find Python checking if "python2" can be used gyp ERR! find Python - "python2" is not in PATH or produced an error gyp ERR! find Python checking if "python3" can be used gyp ERR! find Python - "python3" is not in PATH or produced an error gyp ERR! find Python checking if the py launcher can be used to find Python 2 gyp ERR! find Python - "py.exe" is not in PATH or produced an error gyp ERR! find Python checking if Python is C:\Python27\python.exe gyp ERR! find Python - "C:\Python27\python.exe" could not be run gypgyp ERR! find Python checking if Python is C:\Python37\python.exe ERR!gyp find PythonERR! gypfind Python - "C:\Python37\python.exe" could not be run ERR!gyp find PythonERR! Python is not set from command line or npm configuration gypfind Python ERR!gyp find Python Python is not set from environment variable PYTHON ERR!gyp find PythonERR! ********************************************************** gypfind Python checking if "python" can be used gypERR! ERR!find Python You need to install the latest version of Python. find Pythongyp - "python" is not in PATH or produced an error gypERR! ERR!find Python find Python Node-gyp should be able to find and use Python. If not, checking if "python2" can be used gypgyp ERR!ERR! find Pythonfind Python you can try one of the following options: - "python2" is not in PATH or produced an error gypgyp ERR! ERR!find Python - Use the switch --python="C:\Path\To\python.exe" find Pythongyp checking if "python3" can be used gypERR! ERR!find Python (accepted by both node-gyp and npm) find Pythongyp - "python3" is not in PATH or produced an error gyp ERR!ERR! find Pythonfind Python - Set the environment variable PYTHON checking if the py launcher can be used to find Python 2 gypgyp ERR!ERR! find Pythonfind Python - Set the npm configuration variable python: - "py.exe" is not in PATH or produced an error gypgyp ERR!ERR! find Pythonfind Python npm config set python "C:\Path\To\python.exe" checking if Python is C:\Python27\python.exe gyp gypERR! ERR!find Python For more information consult the documentation at: find Pythongyp - "C:\Python27\python.exe" could not be run gypERR! ERR!find Python https://github.com/nodejs/node-gyp#installation find Pythongyp checking if Python is C:\Python37\python.exe gypERR! ERR! find Pythonfind Python ********************************************************** - "C:\Python37\python.exe" could not be run gypgyp ERR!ERR! find Python find Python gyp gyp ERR!ERR! find Pythonconfigure error ********************************************************** gyp ERR!gyp find PythonERR! You need to install the latest version of Python. gypstack Error: Could not find any Python installation to use ERR!gyp find PythonERR! Node-gyp should be able to find and use Python. If not, gypstack at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47) ERR!gyp find PythonERR! you can try one of the following options: stackgyp at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21) gypERR! ERR! find Pythonstack - Use the switch --python="C:\Path\To\python.exe" gyp at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16) gypERR! ERR!find Python (accepted by both node-gyp and npm) stackgyp at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16) gyp ERR! ERR!find Python - Set the environment variable PYTHON stackgyp at exithandler (child_process.js:302:5) gypERR! ERR!find Python - Set the npm configuration variable python: stackgyp at ChildProcess.errorhandler (child_process.js:314:5) gypERR! ERR!find Python npm config set python "C:\Path\To\python.exe" stackgyp at ChildProcess.emit (events.js:210:5) gypERR! ERR!find Python For more information consult the documentation at: stackgyp at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12) gypERR! ERR!find Python https://github.com/nodejs/node-gyp#installation stackgyp at onErrorNT (internal/child_process.js:456:16) gypERR! ERR!find Python ********************************************************** stackgyp at processTicksAndRejections (internal/process/task_queues.js:80:21) ERR! find Python gyp ERR! System Windows_NT 10.0.18362 gypgyp ERR!ERR! commandconfigure error "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\user\\lecture-vue-trello-server\\node_modules\\sqlite3\\lib\\binding\\node-v72-win32-x64\\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\\Users\\user\\lecture-vue-trello-server\\node_modules\\sqlite3\\lib\\binding\\node-v72-win32-x64" "--napi_version=5" "--node_abi_napi=napi" gyp ERR!gyp cwdERR! C:\Users\user\lecture-vue-trello-server\node_modules\sqlite3 gypstack Error: Could not find any Python installation to use ERR!gyp node -vERR! v12.14.0 gypstack at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47) ERR!gyp node-gyp -v ERR! v5.0.5 stackgyp at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21) gypERR! ERR! not okstack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16) gyp ERR! stack at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16) gyp ERR! stack at exithandler (child_process.js:302:5) gyp ERR! stack at ChildProcess.errorhandler (child_process.js:314:5) gyp ERR! stack at ChildProcess.emit (events.js:210:5) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12) gyp ERR! stack at onErrorNT (internal/child_process.js:456:16) node-pre-gypgyp ERR! ERR!build error stack at processTicksAndRejections (internal/process/task_queues.js:80:21) node-pre-gyp gyp ERR!ERR! stackSystem Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\user\lecture-vue-trello-server\node_modules\sqlite3\lib\binding\node-v72-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\user\lecture-vue-trello-server\node_modules\sqlite3\lib\binding\node-v72-win32-x64 --napi_version=5 --node_abi_napi=napi' (1) node-pre-gyp Windows_NT 10.0.18362 gypERR! ERR!stack at ChildProcess.<anonymous> (C:\Users\user\lecture-vue-trello-server\node_modules\node-pre-gyp\lib\util\compile.js:83:29) commandnode-pre-gyp "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\user\\lecture-vue-trello-server\\node_modules\\sqlite3\\lib\\binding\\node-v72-win32-x64\\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\\Users\\user\\lecture-vue-trello-server\\node_modules\\sqlite3\\lib\\binding\\node-v72-win32-x64" "--napi_version=5" "--node_abi_napi=napi" ERR!gyp ERR!stack at ChildProcess.emit (events.js:210:5) cwdnode-pre-gyp C:\Users\user\lecture-vue-trello-server\node_modules\sqlite3 gypERR! ERR!stack at maybeClose (internal/child_process.js:1021:16) node-pre-gyp node -vERR! v12.14.0 gyp stackERR! at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) node-gyp -vnode-pre-gyp v5.0.5 gypERR! System Windows_NT 10.0.18362 ERR!node-pre-gyp not okERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\user\\lecture-vue-trello-server\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd C:\Users\user\lecture-vue-trello-server\node_modules\sqlite3 node-pre-gyp ERR! node -v v12.14.0 node-pre-gyp ERR! node-pre-gyp -v v0.10.3 node-pre-gyp ERR! not ok Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\user\lecture-vue-trello-server\node_modules\sqlite3\lib\binding\node-v72-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\user\lecture-vue-trello-server\node_modules\sqlite3\lib\binding\node-v72-win32-x64 --napi_version=5 --node_abi_napi=napi' (1) npm WARN lecture-vue-trello-server@1.0.0 No description npm WARN lecture-vue-trello-server@1.0.0 No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! sqlite3@4.0.2 install: `node-pre-gyp install --fallback-to-build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the sqlite3@4.0.2 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\user\AppData\Roaming\npm-cache\_logs\2020-01-28T07_36_52_640Z-debug.log
-
미해결Angular(2+) Front에서 Back까지 - Nest js를 알려면 Angular 모듈을 알아야한다!
Angular Injector 관련 질문있습니다.
좋은 강의, 친절한 답변 너무 감사드립니다! 다름이 아니라, Angular의 서비스는 싱글톤으로 알고있는데, 부모 컴포넌트와 하위 컴포넌트가 각각 자신의 Injector로 서비스를 주입받으면, 별개의 서비스 객체를 참조하게 되는 것 같은데, 그러면 완전한 싱글톤이라기보다 injector별로 서비스 객체가 생성된다고 이해해도 괜찮은걸까요?
-
미해결홍정모의 게임 만들기 연습 문제 패키지
실행 문제.
opengl 사용법을 보고 다정확하게 깔았는데 이부분만 빨간색으로 표시가 나타납니다. 혹시 몰라 다운받은 파일에 glew,glfw파일이 있는지도 봤는데 파일도 다있는 상태입니다. 파일 소스를 열수 없다는 에러는 왜 뜨는 걸까요? 답변주시면 감사드립니다
-
미해결남박사의 파이썬 기초부터 실전 100% 활용
사용법에 대한 문의
try catch를 명확하게 언제쯤 사용하는지 잘 몰라서요.. 제가 봤을때는 이게 if else 문과 별다른 차이가 없어 보이는데 어떠한 용도로 어떤식으로 처리를 해야하는건지 어렵네요..ㅠㅠ
-
미해결실습 UI 개발로 배워보는 순수 javascript 와 VueJS 개발
vue, vue component
app.js에서 vue객체를 만들고 그안에 데이터를 정의할 때에는 data : { query: ''} 이런식으로 키-값 형식으로 정의하셨는데, vue compoment에서는 data(){ return{query:''}} 이런식으로 함수 형식으로 정의하셨더라구요. 왜그런지 알 수 있을까요?
-
미해결파이썬 알고리즘 문제풀이 입문(코딩테스트 대비)
2번 항목 채점
안녕하세요 채점중 2번 항목만 411이 나와 오답으로 채점되었습니다. 정답으로 443이 나올 수 있나요?
-
미해결Angular(2+) Front에서 Back까지 - Nest js를 알려면 Angular 모듈을 알아야한다!
Dependency Injection 관련해서 질문있습니다.
안녕하세요, 우선 좋은강의 너무 감사드립니다. 많은 도움이 되고있습니다. 다름이 아니라 DI강의에서 예시로 Car 를 들어주셨는데 1. 기존에 Car 클래스 내부에서 Tire와 Handle객체를 직접 만들어놓았다. Tire와 Handle의 종류가 바뀌면 해당 Class로 가서 다른 타입의 Tire/Handle객체를 만들어야하는 번거로움이 있다. 2. 클래스의 생성자에 필요한 Tire와 Handle을 매개변수로 받도록하고, 팩토리에서 부품들을 모아놓고, 객체를 생성할 때 필요한 부품을 넣어 조립해준다. 1번의 번거로움을 해결하기위해 2번의 방법이 나왔다. 그런데, 2번 또한 생성자에 필요한 Tire와 Handle의 Type을 선언해놓았기 때문에, 결국 Tire와 Handle종류가 바뀌면 1번과 마찬가지로 Car 클래스로 가서 생성자에 선언되어있는 Tire와 Handle에 Type을 바꿔주어야하고, 실제 조립하는 부분도 변경해주어야하는 번거로움이 생기는거 아닌가요?? 1번과 크게 다르지 않다는 생각이 들어서요.. 물론 1번과 다르게 직접 객체는 생성하지 않겠지만요..
-
미해결React로 NodeBird SNS 만들기
SSR 질문 있습니다.
posts api로 mainPosts SSR으로 불러 올때, post.User.id, post.User.nickName, mainPosts 데이터도 잘 가지고 오고 있는데요. avatar에 post.User.nickName[0] 한 부분만 자꾸 리렌더링 되는데 따로 설정해야 하는게 있나요?? SSR이 안되는 건가요?
-
미해결리눅스 IPC 프로그래밍 - 이론과 실습
shared memory(14강) live programming file mapping 에 관한 질문입니다.
monitor( ) 코드에서 ' close(fd); ' 가 while 문 전에 위치하는데, 이 부분이 잘 해석이 안됩니다. 얼핏 생각해서는 munmap( ) 처럼 모든 일을 마무리하고 함수를 빠져 나가기 직전에 해 주는 것이 '더 적절한' 것이라 생각했는데, 실제 코드는 별 무리없이 작동하기에 더 해석이 안되는 것 같습니다. file mapping 을 통한 shared memory 방식은 실제로는 file I/O 이므로, mmap( ) 이후에 함수 빠져나가기 직전까지 계속해서 스트림이(이 표현이 맞는건지는 잘 모르겠네요..) 살아 있어야 할 것 같은데, 실제로는 그렇게 하지 않아도 코드가 잘 실행되서 잘 이해가 안됩니다.
-
미해결[개정판] 파이썬 머신러닝 완벽 가이드
evaluation dataset 질문
evaluation은 검증단계이므로 test dataset을 사용하면 안된다고 하셨는데, 강의에서 evals = [(X_test, y_test)]로 하는 것은 test dataset을 사용하는 것이 아닌가요? 여기선 왜 test dataset을 사용하는지 궁금합니다.
-
미해결프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)
예제 4번 창작 오류
예제 4번 만들어 봤는데 실행 값이 안 나옵니다 T T sub3 __init__ 'module3' 라고 지정하고 예제4에 add로 임의의 값을 넣어서 실행해봤는데 아무 변화가 없습니다. T _T
-
미해결홍정모의 따라하며 배우는 C언어
[04:15] 교수님 이 예제에서 free 해주는 부분이 없네요.
안녕하세요? 강의 내용과 크게 관련은 없는데요. 동적할당을 사용하는 부분으로 바꿔서 마지막에 free(my_books); 가 들어가야 할 것 같습니다. 아마 다들 알고 계실 거 같지만 남겨봅니다. 감사합니다.