묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨대세는 쿠버네티스 (초급~중급편)
istio 문의드립니다
강의 잘 보고 있습니다. gcp gke에서 istio 옵션을 넣어서 테스트를 해 보고 싶은데요, 혹시 istio에 대한 강의 계획은 없으신가요?
-
코딩의민족 앱 제작 (Android kotlin)
리스트뷰
삭제된 글입니다
-
해결됨따라하며 배우는 노드, 리액트 시리즈 - 유튜브 사이트 만들기
비디오 업로드 시에 file change 이벤트 시에 서버 로컬에 파일을 업로드 하잖아요!
안녕하세요 강의 열심히 수강 중인 학생입니다! 좋은 강의 감사합니다. 강의의 비디오 업로드 페이지에서 파일을 선택함으로써 change 감지를 하여 해당 파일을 핸들링하는 이벤트 함수를 정의하였잖아요! const onFileChange = (e) => { let files = e.currentTarget.files; let formData = new FormData; formData.append('file', files[0]); const config = { header: {'content-type': 'multipart/form-data'} }; axios.post('/api/image/uploadfiles', formData, config) .then(response => { if(response.data.success) { console.log(response.data); setFilePath(response.data.url); } else { alert('이미지 업로드를 실패했습니다.'); setFilePath(undefined); } }) .catch(error => { console.log(error); }); }; 그런데 이 부분에서 문제가 submit 이벤트가 아닌, change 이벤트에서 서버 로컬에 파일을 저장한다는 것입니다. 만일 클라이언트 사용자가 파일을 한 번 선택하고서 잘못 선택했네? 이러면서 다시 다른 파일을 선택 후에 form을 제출하게 되면 DB에는 마지막으로 선택한 파일 정보가 저장이 되지만, 서버를 돌리는 로컬 폴더에는 그 전에 선택한 파일까지도 올라가는 현상이 발행하게 됩니다. 물론, DB 정보만으로 클라이언트 상에 데이터가 뿌려지지만 서버 로컬 폴더에는 클라이언트에 보내지 않을 파일이 잔류하게 됩니다... 이 경우를 어떻게 처리할까요?!
-
미해결[라즈베리파이] IoT 딥러닝 Computer Vision 실전 프로젝트
ValueError
(cv) pi@raspberrypi:~/rbp_dnn $ python3 RBP_DL15_MNIST_PiCamera.py 실행 에러 ------------------------------------------------- /home/pi/.virtualenvs/cv/lib/python3.7/site-packages/picamera/encoders.py:544: PiCameraResolutionRounded: frame size rounded up from 300x300 to 304x304 width, height, fwidth, fheight))) Traceback (most recent call last): File "RBP_DL15_MNIST_PiCamera.py", line 78, in <module> result = model.predict(np.array([num])) File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training.py", line 909, in predict use_multiprocessing=use_multiprocessing) File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2.py", line 462, in predict steps=steps, callbacks=callbacks, **kwargs) File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2.py", line 396, in _model_iteration distribution_strategy=strategy) File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2.py", line 594, in _process_inputs steps=steps) File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training.py", line 2472, in _standardize_user_data exception_prefix='input') File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_utils.py", line 565, in standardize_input_data 'with shape ' + str(data_shape)) ValueError: Error when checking input: expected conv2d_1_input to have 4 dimensions, but got array with shape (1, 28, 28) 에러 어디서 부터 참조해서 해결을 해야 하나요.
-
해결됨Java TPC 실전프로젝트 (Java API 활용)
엑셀 프로그램이 없는 경우
4.12 최신버전으로 다운로드 아래 다운로드 http://commons.apache.org/proper/commons-compress/download_compress.cgi 아래 다운로드https://mvnrepository.com/artifact/org.apache.commons/commons-collections4/4.1 package com.company;import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;import org.apache.poi.hssf.usermodel.HSSFCell;import org.apache.poi.hssf.usermodel.HSSFRow;import org.apache.poi.hssf.usermodel.HSSFSheet;import org.apache.poi.hssf.usermodel.HSSFWorkbook;import org.apache.poi.ss.usermodel.Cell;//import org.apache.poi.ss.usermodel.CellType;import org.apache.poi.ss.usermodel.CellType;import org.apache.poi.ss.usermodel.Row;import org.apache.poi.xssf.usermodel.XSSFCell;import org.apache.poi.xssf.usermodel.XSSFRow;import org.apache.poi.xssf.usermodel.XSSFSheet;import org.apache.poi.xssf.usermodel.XSSFWorkbook;import java.io.FileInputStream;import java.util.Iterator;public class Project03_C { public static void main(String[] args) { String fileName = "cellDataType.xlsx"; try(FileInputStream fis = new FileInputStream(fileName)) {// HSSFWorkbook workbook = new HSSFWorkbook(fis); // xls// HSSFSheet sheet = workbook.getSheetAt(0); // xls XSSFWorkbook workbook = new XSSFWorkbook(fis); // xlsx XSSFSheet sheet = workbook.getSheetAt(0); // xlsx Iterator<Row> rows = sheet.rowIterator(); while (rows.hasNext()) {// HSSFRow row = (HSSFRow) rows.next(); // xls XSSFRow row = (XSSFRow) rows.next(); Iterator<Cell> cells = row.cellIterator(); while (cells.hasNext()) {// HSSFCell cell = (HSSFCell) cells.next(); // xls XSSFCell cell = (XSSFCell) cells.next(); // xlsx CellType type = cell.getCellType(); if(type == CellType.STRING) { System.out.println("[" + cell.getRowIndex() + "," + cell.getColumnIndex() + "] = STRING; Value=" + cell.getRichStringCellValue().toString()); } else if(type == CellType.NUMERIC) { System.out.println("[" + cell.getRowIndex() + "," + cell.getColumnIndex() + "] = NUMERIC; Value=" + cell.getNumericCellValue()); } else if(type == CellType.BOOLEAN) { System.out.println("[" + cell.getRowIndex() + "," + cell.getColumnIndex() + "] = BOOLEAN; Value=" + cell.getBooleanCellValue()); } else if(type == CellType.BLANK) { System.out.println("[" + cell.getRowIndex() + "," + cell.getColumnIndex() + "] = BLANK CELL"); } } } } catch (Exception e) { e.printStackTrace(); } }}
-
미해결대세는 쿠버네티스 (초급~중급편)
deployment rollback
안녕하세요. 태민님 Deployment 강좌에서 rollback 명령을 보여주셨는데요. Deployment yaml 에서 버전을 v3 에서 v2 로 수정하여 다시 v2 로 돌아가는 것과 rollback 명령을 통해 v2 로 돌아가는 것의 차이가 무엇인지 궁금합니다.
-
해결됨스프링 기반 REST API 개발
org.hamcrest.Matchers 에서 Junit Test가 실패 하고 있습니다.
java.lang.SecurityException: class "org.hamcrest.Matchers"'s signer information does not match signer information of other classes in the same package 이라는 오류가 발생 하고 잇습니다. 결과 값은 예상한것과 마찬가지로 Body = {"id":1,"name":"Spring","description":"REST API Development with Spring","beginEnrollmentDateTime":"2018-11-23T14:21:00","closeEnrollmentDateTime":"2018-11-24T14:21:00","beginEventDateTime":"2018-11-25T14:21:00","endEventDateTime":"2018-11-26T14:21:00","location":"ê°ë¨ì D2 ì¤íí í©í 리","basePrice":100,"maxPrice":200,"limitOfEnrollment":100,"offline":false,"free":false,"eventStatus":"DRAFT"} 정상적으로 값이 떨어지고 있어서 맞게는 따라간거 같은데... 왜 SecurityException 이 발생 하는지 알수 있을까요? 번역을 돌려보니 서명자정보가 동일한 패키지에 있는 다른 클래스의 서명자 정보와 일치 하지 않습니다, 라고 나오네요.
-
미해결데브옵스(DevOps)를 위한 쿠버네티스 마스터
kubectl run 실행시 문의 사항
kubectl run --image 로 만들 때 실습 동영상을 보면 바로 deployment가 만들어지는데 저 같은 경우는 kubctl run으로 만들면 pod로 만들어 집니다. 그래서 kubectl run --image alpine:3.4 alpine-deploy --dry-run -o yaml > alpine-deploy.yaml 실습을 진행할 때 kind: pod로 만들어지는데 왜 그런지 알 수 있을까요?
-
미해결윤재성의 Bootstrap 4 & 3 Framework Tutorial
오라클 꼭 깔아야하나요?
오라클 무료로 깔기하는데 오라클 인증이 안되서 안되네요 ㅠㅠ 여기서부터 오라클 이클립스 막히네요 -_-;
-
해결됨React로 NodeBird SNS 만들기
싱글태그로 바꿀때 단축키가 있나요?
3분 19초쯤 보면, List 태그에 닫는태그 바로 지우면서 싱글태그로 바꾸시는데, 단축키가 따로 있으신건가요?
-
미해결윤재성의 Bootstrap 4 & 3 Framework Tutorial
맥북에서는 이클립스 설치가 안되네요
무엇인지 경고문구 뜨면서 잘 안되서 저는 예전에 맥용 에스프레소라는 프로그램으로 사용하려고하는데 괜찮을까요?
-
해결됨파이썬 무료 강의 (기본편) - 6시간 뒤면 나도 개발자
shuffle은 굳이 안써도 되는건가요?
sample(users,4) 에서 리스트로 변환된 users의 4개를 랜덤으로 뽑는거니, shuffle(users)는 굳이 쓸 필요 없는 것 맞나요?
-
미해결윤재성의 Java 기반 Android 9.0(pie) App 개발 고급 3단계
리스트 뷰 네트워크 동기 할때 오류 관련 질문 드립니다.
java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. Make sure your adapter calls notifyDataSetChanged() when its content changes. 요즘 이 오류가 계속 떠서 해결하려고 노력중입니다.구글검색해서 알려주는대로 시도 해봤는데 잘 되지 않네요.가끔씩 저 오류가 떠서 튕기는데 아마도 쓰레드가 동시에 여러개 작동하다 보니 생기는 오류인것 같습니다.혹시 해결방법이 있을까요?
-
미해결윤재성의 Java 기반 Android 9.0(pie) App 개발 기본 1단계
여러개의 다이얼로그 버튼(positive negative 등등)에 리스너 다는것 질문 드립니다.
2개 다이얼로그를 만들었습니다. 그리고 각각 positive,negative 버튼이 있는데요. 이 버튼마다 동작하는 것이 다 다르게 하고 싶습니다. 1번 다이얼로그의 positive 버튼 따로 동작하고 2번 아이얼로그 positive동작 따로 이런식으로요. 그래서 리스너 클래스를 2개 만들었는데요. 중복된다는 생각이 들어서요. 1개의 클래스만 만들어서 분기 할수 있는 방법이 혹시 있는지 질문 드립니다.
-
미해결[라즈베리파이] IoT 딥러닝 Computer Vision 실전 프로젝트
NameError
# cv2.findCountours() function changed from OpenCV3 to OpenCV4: now it have only two parameters instead of 3 cv2MajorVersion = cv2.__version__.split(".")[0] print('openCV version : ', cv2MajorVersion) # check for contours on thresh if int(cv2MajorVersion) >= 4: contours, hierarchy = cv2.findContours(thresh, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE) else: imageContours, contours, hierarchy = cv2.findContours(thresh, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE) --------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-9-5caa6544b17f> in <module> 4 # check for contours on thresh 5 if int(cv2MajorVersion) >= 4: ----> 6 contours, hierarchy = cv2.findContours(thresh, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE) 7 else: 8 imageContours, contours, hierarchy = cv2.findContours(thresh, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE) NameError: name 'thresh' is not defined
-
미해결[라즈베리파이] IoT 딥러닝 Computer Vision 실전 프로젝트
NameError: name 'plt' is not defined
# Draw digit image fig = plt.figure() ax = fig.add_subplot(1, 1, 1) # Major ticks every 20, minor ticks every 5 major_ticks = np.arange(0, 29, 5) minor_ticks = np.arange(0, 29, 1) ax.set_xticks(major_ticks) ax.set_xticks(minor_ticks, minor=True) ax.set_yticks(major_ticks) ax.set_yticks(minor_ticks, minor=True) # And a corresponding grid ax.grid(which='both') # Or if you want different settings for the grids: ax.grid(which='minor', alpha=0.2) ax.grid(which='major', alpha=0.5) ax.imshow(x_test[selected_digit], cmap=plt.cm.binary) plt.show()--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-24-1e41385f9397> in <module> 1 # Draw digit image ----> 2 fig = plt.figure() 3 ax = fig.add_subplot(1, 1, 1) 4 5 # Major ticks every 20, minor ticks every 5
-
미해결[라즈베리파이] IoT 딥러닝 Computer Vision 실전 프로젝트
NameError: name 'model' is not defined
# Show History model.evaluate(x_test, y_test, verbose=2) import matplotlib.pyplot as plt fig, loss_ax = plt.subplots() fig, acc_ax = plt.subplots() loss_ax.plot(history.history['loss'], 'ro', label='train loss') loss_ax.plot(history.history['val_loss'], 'r:', label='val loss') loss_ax.set_xlabel('epoch') loss_ax.set_ylabel('loss') loss_ax.legend(loc='upper left') acc_ax.plot(history.history['accuracy'], 'bo', label='train accuracy') acc_ax.plot(history.history['val_accuracy'], 'b:', label='val accuracy') acc_ax.set_ylabel('accuracy') acc_ax.legend(loc='upper left') plt.show() --------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-22-ba2619a0447f> in <module> 1 # Show History ----> 2 model.evaluate(x_test, y_test, verbose=2) 3 4 import matplotlib.pyplot as plt 5 NameError: name 'model' is not defined
-
Vue.js 시작하기 - Age of Vue.js
vue cli 설치 error 질문입니다
삭제된 글입니다
-
미해결자바 프로그래밍 입문 강좌 (renew ver.) - 초보부터 개발자 취업까지!!
업데이트를 하고 나서 이클립스가 실행이 안되는데 어떻게 해야 할까여??
이것때문에 아예 열리지 않아요ㅜㅜㅜ
-
미해결[라즈베리파이] IoT 딥러닝 Computer Vision 실전 프로젝트
NameError
# convert class vectors to binary class matrices y_train = tf.keras.utils.to_categorical(y_train, num_classes) y_test = tf.keras.utils.to_categorical(y_test, num_classes) --------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-17-1f535d7b0dc0> in <module> 1 # convert class vectors to binary class matrices ----> 2 y_train = tf.keras.utils.to_categorical(y_train, num_classes) 3 y_test = tf.keras.utils.to_categorical(y_test, num_classes) NameError: name 'num_classes' is not defined