React 를 처음 접하는 학생에게도 좋은 강좌 만들어주셔서 감사합니다. 다름이 아니라, 앞에 설정부분까지 잘 따라오다가 제3강 비디오 업로드 FORM 만들기 (1) 강의에서 npm run dev 명령어를 VSCode Terminal에 입력한 뒤, http://localhost:3000/register 까지 화면이 잘 로딩되었습니다. 다만, 회원가입을 위해 정보를 모두 입력하고 submit을 하면 다음 페이지로 넘어가지지 않습니다. redux extension tool로 확인해본 (1) response 결과 사진과 (2) VSCode Terminal에서 오류가 난듯한 부분, 그리고 (3) root directory와 client 에서 실행한 npm install 결과 로그를 첨부해서 드립니다. 참고로 제 root directory의 이름은 happytube입니다. (gitHub에 올려주신걸 clone 해올 때 저렇게 설정하였습니다.) 혹시 검토해보시다가 다른 자료가 필요하시다면 추가적으로 공유해드리겠습니다. 감사합니다.
안녕하세요! 재밌게 잘 듣고 있습니다. actions의 역할이 state의 변수에 대한 계산을 담당하는 것이라 이해를 하였습니다. 그렇다면 actions에 비즈니스 로직이 담겨지는 것인가요? 예를 들어 input 값을 바탕으로 어떠한 계산을 한다고 할 경우 이 어떠한 계산을 하는 부분이 컴포넌트의 method에 담겨지는 것인지, 아니면 actions에 담겨지는 것인지 궁금합니다. 만약 actions에 담기지 않고 컴포넌트의 method에 담긴다고 할 경우에는 계산(component,-methods) 후 바로 mutation을 호출 하면 될 것 같거든요.
성별 선택 폼 이렇게 알려주ㅅ셨는데요, <p> <span> 성별 </span> <label for="male">남자</label> <input type="radio" id="male" name="choice" value="male"> <label for="female">여자</label> <input type="radio" id="female" name="choice" value="female"> </p> 혹시 아래와 같이 label 안에 input 두 가지를 다 넣고 id 없이 name만 같게 해줘도 html 규칙상 문제가 안생기나요? 일단 브라우저에서는 동일하게 기능하더라고요! <p> <label for="">성별은?<input type="radio" name="gender" value="1">남자 <input type="radio" name="gender" value="2">여자</label> </p>
Downloading... Error: Truffle Box at URL https://github.com/truffle-box/bare-box.git doesn't exist. If you believe this is an error, please contact Truffle support. at Request._callback (C:\Users\hwily\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\truffle-box\lib\utils\unbox.js:50:1) at Request.self.callback (C:\Users\hwily\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\request\request.js:185:1) at Request.emit (events.js:210:5) at Request.<anonymous> (C:\Users\hwily\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\request\request.js:1157:1) at Request.emit (events.js:210:5) at IncomingMessage.<anonymous> (C:\Users\hwily\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\request\request.js:1079:1) at Object.onceWrapper (events.js:299:28) at IncomingMessage.emit (events.js:215:7) at endReadableNT (_stream_readable.js:1184:12) at processTicksAndRejections (internal/process/task_queues.js:80:21) 현재 truffle 4.1.14버전으로 사용 시, truffle init 할 때 위와 같은 에러가 발생하였습니다. 검색해보니 4.1.14 버전에서 무언가 에러가 있는 것 같습니다. ( https://ethereum.stackexchange.com/questions/64358/truffle-box-at-url-https-github-com-truffle-box-bare-box-git-doesnt-exist) 그래서 4.1.15버전으로 업그레이드하여 사용하였습니다. npm i -g truffle@4.1.15 이상입니다.
강의해주신 내용과 같이 코딩을 했는데, 마우스 버튼을 눌렀다가 떼었을 때 세로 방향으로 돌지 않습니다. 단계별로 state가 넘어가는지 확인하기 위해 디버그.로그 코드를 넣어 놓았습니다. 제가 무엇을 잘못해서 동작하지 않는 것일까요? 답변 부탁드립니다. using System.Collections; using System.Collections.Generic; using UnityEngine; public class ShooterRotator : MonoBehaviour { private enum RotateState { Idle,Vertical,Horizontal,Ready } private RotateState state = RotateState.Idle; public float verticalRoteteSpeed = 360f; public float horizontalRoteteSpeed = 360f; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { if(state == RotateState.Idle) { if(Input.GetButtonDown("Fire1")) { state = RotateState.Horizontal; } } else if(state == RotateState.Horizontal) { if(Input.GetButton("Fire1")) { transform.Rotate(new Vector3(0,horizontalRoteteSpeed * Time.deltaTime,0)); } else if(Input.GetButtonUp("Fire1")) { state = RotateState.Vertical; Debug.Log("1"); } else if(state == RotateState.Vertical) { if(Input.GetButton("Fire1")) { transform.Rotate(new Vector3(-verticalRoteteSpeed * Time.deltaTime,0,0)); Debug.Log("2"); } else if(Input.GetButtonUp("Fire1")) { state = RotateState.Ready; Debug.Log("3"); } } } } }
4.4 Random Forest에서 아래 코드를 입력하면 File b'./human_activity/features.txt' does not exist: b'./human_activity/features.txt' 에러가 나오는데요...왜 이런건지 궁금합니다. import pandas as pd def get_human_dataset( ): # 각 데이터 파일들은 공백으로 분리되어 있으므로 read_csv에서 공백 문자를 sep으로 할당. feature_name_df = pd.read_csv('./human_activity/features.txt',sep='\s+', header=None,names=['column_index','column_name']) # 중복된 feature명을 새롭게 수정하는 get_new_feature_name_df()를 이용하여 새로운 feature명 DataFrame생성. new_feature_name_df = get_new_feature_name_df(feature_name_df) # DataFrame에 피처명을 컬럼으로 부여하기 위해 리스트 객체로 다시 변환 feature_name = new_feature_name_df.iloc[:, 1].values.tolist() # 학습 피처 데이터 셋과 테스트 피처 데이터을 DataFrame으로 로딩. 컬럼명은 feature_name 적용 X_train = pd.read_csv('./human_activity/train/X_train.txt',sep='\s+', names=feature_name ) X_test = pd.read_csv('./human_activity/test/X_test.txt',sep='\s+', names=feature_name) # 학습 레이블과 테스트 레이블 데이터을 DataFrame으로 로딩하고 컬럼명은 action으로 부여 y_train = pd.read_csv('./human_activity/train/y_train.txt',sep='\s+',header=None,names=['action']) y_test = pd.read_csv('./human_activity/test/y_test.txt',sep='\s+',header=None,names=['action']) # 로드된 학습/테스트용 DataFrame을 모두 반환 return X_train, X_test, y_train, y_test X_train, X_test, y_train, y_test = get_human_dataset()