_go( products, _filter(p => p.price < 20000), _map(p => p.price), _reduce(add), console.log ) const _go = (...args) => _reduce((a, fns) => fns(a), args 여기에서 args 를 명시하지 않아도 되기 때문에 간결한 코드가 나오게 되었는데, curry 함수의 어떤 부분이 iter 될 args 가 없음에도 작동하는지 알고싶습니다.
break, continue가 block을 escape 혹은 skip 하는거라고 강의중에 설명해주셨는데, 이것들이 switch, for, while문에서만 해당하는 것인가요? 일반 block에서도 사용하는 사례가 있는지 궁금합니다. 다음은 a++ vs ++a 질문입니다. int count( 0 ) ; do { if (count== 5 ) continue ; cout << count << endl ; } while (++count< 10 ) ; // ++count vs count++; 위와 같은 경우에는 0 ~ 9 가 출력이되고 (5제외) int count( 0 ) ; do { if (count== 5 ) continue ; cout << count << endl ; } while (count++< 10 ) ; // ++count vs count++; 위의 경우에는 0~10이 출력이 됩니다. (5제외) debugger를 통해서도 확인해보았으나 아직 조금 헷갈리는 것 같습니다. operator priority는 a++ , ++a, > 이 순서라 일단 증가 되는게 둘다 먼저고 10과 비교 해서 되는 것 같은데, count++ <10의 경우에는 10까지 나오는지 잘 모르겠습니다. count 가 9일때 count++하면 10이되고 10<10 : false 이므로 count 10은 프린트가 안되야 할것 같거든요. 감사합니다.
안녕하세요. 강의중에 switch (op){ case '+' : cout << x+y << endl ; case '-' : cout << x-y << endl ; 위와 같은 방식으로 일일이 하지 않고 곱하기랑 나누기 케이스도 해보라고 하셨는데, 검색을 해봐도 쉽지않네요. 혹시 제가 아이디어를 얻을 수 있을 곳이 있을까요?
백선장님이 알려주신 코드만 단독 테스트 하면 오류가 나지 않는데 위와 같은 파일들과 백선장님 코드가 존재하는 상태에서 테스트 하니깐 에러가 발생합니다 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'postRepo': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Failed to create query for method public abstract java.util.List com.example.demo.demo.repo.PostCustomRepo.findMyPost()! No property findMyPost found for type Post! [에러 메시지] --------------- 왜 프러퍼티를 찾지 못한다고 하는지 잘 모르겠습니다.
Querybox에서 아래 메시지 박스가 나오고 접속이 안됩니다. unable to load authentication plugin 'caching_sha2_password' 해결책을 인터넷으로 검색해서 실행하니 mysql> ALTER USER 'python'@'localhost' identified with mysql_native_password by 'silly0202!'; 아래와 같은 메시지만 나옵니다. ERROR 1819 (HY000): Your password does not satisfy the current policy requirements 해결책이 없을까요? 질문만 드려 죄송합니다.ㅜ.ㅜ 강의 잘 듣고 있습니다. 감사합니다.
마인크레프트와 파이썬 연결할 때 from mcpi.minecraft import Minecraft 를 했을때까진 괜찮았는데, mc=Minecraft.create()를 하니까 [WinError 10061] 대상 컴퓨터에서 연결을 거부했으므로 연결하지 못했습니다 라고 에러가 떠요 어떻게해야 할까요??
PS C:\마인크래프트파이썬\install_files> py -3 -m pip install py3minepi-master.zip Processing c:\마인크래프트파이썬\install_files\py3minepi-master.zip Requirement already satisfied (use --upgrade to upgrade): py3minepi==0.0.1 from file:///C:/%EB%A7%88%EC%9D%B8%ED%81%AC%EB%9E%98%ED%94%84%ED%8A%B8%ED%8C%8C%EC%9D%B4%EC%8D%AC/install_files/py3minepi-master.zip in c:\users\cmc05\appdata\local\programs\python\python35-32\lib\site-packages You are using pip version 9.0.1, however version 19.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command. PS C:\마인크래프트파이썬\install_files> 이렇게 메세지가 뜹니다 진행이 더이상 안됩니다.해결방법알려주세요
mysql을 맥에서 설치시 현재 버전은 임시비밀번호를 발급안하는 것 같습니다. 터미널에서 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) 메시지가 나옵니다. ./mysql_secure_installation 로 설정해서 ./mysql -u root -p 로 접속해서 들어갔습니다. CREATE USER python@localhost IDENTIFIED BY '비밀번호'; 터미널 재접속 : ./mysql -u python -p비밀번호 접속후 status; 명령을 했더니 ./mysql Ver 8.0.16 for macos10.14 on x86_64 (MySQL Community Server - GPL) Connection id: 17 Current database: Current user: python@localhost SSL: Not in use Current pager: stdout Using outfile: '' Using delimiter: ; Server version: 8.0.16 MySQL Community Server - GPL Protocol version: 10 Connection: Localhost via UNIX socket Server characterset: utf8mb4 Db characterset: utf8mb4 Client characterset: utf8mb4 Conn. characterset: utf8mb4 UNIX socket: /tmp/mysql.sock Uptime: 15 min 52 sec 했는데 제대로 했는지 궁금합니다.ㅜ.ㅜ
signup은 정상적으로 동작하지만 login을 진행할 때 "TypeError: Cannot read property 'findOne' of undefined"가 발생합니다. 디버깅을 해보니까 passport.authenticate('local', (authError, user, info) => { console.log(user) }) 안에서 user가 undefined입니다. 결국 passport의 localStrategy에서 문제가 발생하는 것 같습니다. 또 localStrategy에서 { usernameField: 'email', passwordField: 'password' } 를 지우면 findOne 에러는 발생하지 않습니다. 하지만 이 경우에는 passport.authenticate 안에서 user를 찍어보면 false가 발생합니다. 디비는 몽고디비를 사용중입니다.
인프런 개인개정으로 Restful API 강좌 듣고 큰 도움 받았습니다. 사내 프로젝트 진행하면서 JPA 가 필요해 이 강좌를 듣고 있는데요. 아직 전부 강좌를 보진 못했습니다. 프로젝트 진행하면서 막막한 부분이 있어 고민하다고 기선님께 여쭤봅니다. 조언 좀 부탁드려도 될까요? Event 클래스와 Account 계정이 매핑관계가 있습니다. ( 아마 기선님이 manager 필드로 선언했던 걸로 기억합니다. ) 저는 JWT 토큰을 이용해 리소스서버를 인증서버와 분리해서 구축했습니다. 토큰에 필요한 정보를 담아 리소스 서버를 호출합니다. JWT 의 경우 별도의 토큰스토어가 없어 Account 객체를 저장할 수 없습니다. 일단, 대안으로 인증시 Client 에게 JWT 안에 account Id 를 담아 응답했습니다. Client 는 인증서버에서 받은 이 JWT 토큰으로 리소스서버의 create-event API 를 호출하는데요. 이 경우 리소스 서버에서 @AuthenticationPrincipal 로 Account 객체를 추출할 수 없어, JWT 안에 있는 account Id 로 repository 통해 DB에서 Account 객체를 얻어, Event 에 주입하고 Event 를 생성합니다. Account 객체를 맵핑관계로 갖고 있는 모든 Entity( Event 같은 ) 는 리소스 서버 호출 시 항상 이렇게 DB 에서 Account 를 얻어 와야 하는 상황인데요. Event 클래스에 Account '객체' 를 매핑하지 않고 Account 의 'id' 만 매핑 관계로 설정할 순 없을까요? 그럼 리소스서버에서 Event 생성시에 Account 객체를 매번 쿼리하지 않고 요청 JWT 에 들어있는 'id' 만 Event 에 설정하고 생성할 수 있을텐데요. 혹시 이런 매핑관계를 설정할 수 있을까요? ( 객체가 아닌 객체의 id 로 매핑관계를 설정 ) 혹시 이런경우 Account 객체를 id 만 설정해서 생성하고 Event 객체에 주입한 후 Event 를 생성하기도 하나요??? 조언 부탁드립니다. 감사합니다.
안녕하세요. xxx-spring-boot-starter 를 커스텀하여 만들었는데요. 이 경우 강의와 같이 아래 dependencies를 추가해주었는데 <dependencies> <dependency> <groupId> org.springframework.boot </groupId> <artifactId> spring-boot-autoconfigure </artifactId> </dependency> <dependency> <groupId> org.springframework.boot </groupId> <artifactId> spring-boot-autoconfigure-processor </artifactId> <optional> true </optional> </dependency> </dependencies> 이걸 없이 빌드해도 다른 project에서 해당 starter의 jar파일을 가져와 자동으로 bean으로 등록해주는데 문제가 없더라구요. 그럼 이 경우, 이걸 추가해주는 이유가 무엇인가요? 궁금합니다~!
HOC를 사용하게 되면 ListView를 렌더링에 넣어서 때문에 Mixin보다 레벨이 한 단계 더 깊어진다고 말씀 하셨는데 그러면 아래 랜더에 ListView 대신에 export default function createListView ( name ) { return { name , created () { bus . $emit ( ' start:spinner ' ) this . $store . dispatch ( ' FETCH_LIST ' , this . $route . name ) . then ( () => { console . log ( ' fetched ' ) bus . $emit ( ' end:spinner ' ) }) . catch ( error => { console . log ( error ) }) } , render ( createElement ) { return createElement ( ListView ) } } } render(createElement) { return createElement(ListItem) 을 넣으면 Mixin하고 컴포넌트 간의 레벨이 같아지는데. 만약에 이렇게 하게되면 어떤 문제점이 있는지 궁금합니다.