const f1 = (str) => { let acc = ''; for (let i = 0; i < str.length; i++) { acc += str.slice(0, i + 1) + '\n'; } console.log(acc); }; f1("*****") 먼저 명령형으로 작성한다음 함수형으로 바꾸려하는데.. 변환이 잘 안되네요.. 위 코드는 어떻게 하면 함수형으로 바꿀 수 있을까요?
안녕하세요 판교님, 질문이 있습니다 1. 웹팩4 또는 5 등등 버전마다 호환이 되는 게 있고 안되는 버전이 있는 것 같습니다. npm install css-loader@3 file-loader@5 style-loader@1 각각의 로더들이 호환되는지 여부를 어디서 체크할 수 있나요? (웹팩4에서는 어디까지 호환되는지를 찾고 있는데 공식문서를 봐도 해답을 못찾겠네요)
There are various destinations in India that are well-known for their tourism. Some of the most well-known tourist attractions. Check out WanderersHub , the best India travel blog , if you're serious about planning India travels. India is known for its diverse religious beliefs and traditions, making it one of the most fascinating and unique countries to visit. Here are some of the best offbeat places in Jaipur, such as the famous chai in Jaipur , where you may begin your experience!
프론트엔드 개발자를 목표로 공부하고 있는 학생입니다 개발 공부를 시작한지 이제 3달정도가 지났습니다 html,css,js공부를 하고 to-do-list를 하나 만들어본 상황입니다 공부는 다 mdn보고 공부를 한 상황이고, js는 es6개념까지 비동기 제외하고는 거의 이해는 한 상태인데 제가 문법 공부만 하고 문제는 거의 풀어본적이 없는데 선생님 강의 듣는데 괜찮을까요?
excludePathPatterns( "/error-page/**" ) 자세한 뜻을 잘 모르겠습니다.. 결국 /error-page/** 해주면 '제외하기 쉽게 되어 있기 때문에, 이러한 설정을 사용해서 오류 페이지 경로를 excludePathPatterns 를 사용해서 빼주면 된다.' 라고 알고 있습니다. 그리고 /error-page/** 작성하여 실행 시키면 REQUEST가 두번 출력되지 않는 다는 것과 postHandle() 메서드가 출력되지 않는 다는 것만 알고 있습니다. 반대로 /error-page/** 빼고 실행 한다면 REQUEST가 두번 출력되고, postHandle() 가 호출 된다는 것을 알고는 있는데,, 왜 그렇게 동작하는지 자세히 모르겠습니다. 뭔가,, 답만 알고 풀이는 모르고 있단 생각이 듭니다.. 둘다 똑같은거 같은데, 차이가 뭔지... 하는 마음입니다. 제가 이해하기론 /error-page/** 는 error-page 밑에 있는 모든 파일을 해당한다고 이해하고 있는데, 그렇다면 templates 밑에 있는 /error-page/404.html 와 /error-page/500.html 이 제외 되어 출력 되면 안되는 것이 아닌가 싶습니다. 그리고 둘다 컨트롤러를 통해 잘 동작하는거 같습니다.. 그리고, WAS까지 갔다 두번째 필터에서 제외 된다는 것이 /error-page/** 이렇게 설정하여, 어떻게 필터를 제외한다는 것인지도 모르겠습니다. /error-page/** 설정 함으로써 제외 된다.. 무슨 말인지 잘 모르겠습니다 ...
It can be difficult to sell a scrap car, but it is not impossible. Contact JCPCarParts if you want to get the most money for your car. JCPCarParts is an excellent place to obtain cash for cars Auckland right now. You can sell your scrap car yourself, trade it in at a dealership, or acquire a scrap car. Each choice has its own set of advantages and disadvantages, but for many people, cash for car service is the ideal alternative. If you're looking to sell or buy a used car, Auckland is an excellent choice. Now is the time to call!
현영님 안녕하세요. 함수형 컴포넌트가 매번 재실행된다 / 그래서 props, state 등을 쓰지 않을 함수는 밖으로 빼라 라고 하셨는데 그럼 변수선언 useState 할당도 (예를 들면 const [apple, setApple] = useState("사과");) 매번 다시 일어나게 되는건가요? 그건 아닌것 같은데.. 어떻게 이해하면 좋을지 궁금합니다.
CarRemovals is the place to go if you're looking to sell or buy used cars Auckland , New Zealand. They pay top dollar for cars of all makes and models, and they handle all of the paperwork and removal. So, no matter what kind of vehicle you have, they can assist you in getting rid of it fast and easily. The Best Used Car Buyers Auckland - this is the quickest, simplest, and most profitable solution. Call them today at 0800 392 392 or fill out an online form to find out how much your car is worth.
안녕하세요. redux dev tools 질문드립니다. airbnb 사이트를 보면 redux dev tools를 이용해서 redux state들을 확인할 수 있는데 개발 모드가 아닌 배포 모드에서는 저렇게 state들을 볼 수 있게 하는 것이 좋지 않은건가요? 몇몇 사이트들을 보면 redux state들을 볼 수 있는데 보안에 문제가 되지 않는 state들이면 볼 수 있게 해도 상관없는건지 아니면 그냥 state들 자체를 모두 다 숨기는 게 좋은건지 궁금합니다.
Are you looking for advice on how to get the highest cash for cars in Auckland? You've come to the right place! CarsWreckers will provide you with all the information you need to make an informed decision about your car purchase. Selling your car is a great way to get some extra cash for a down payment on a used car. If you're looking to get an instant junk car removal service, you can do a few things to make the process go as smoothly as possible. Call Now!!
안녕하세요 제로초님 강의 정말 잘 듣고있습니다. 코딩을 하다 궁금한점이 있는데 FollowList.js파일의 renderItem속성부분을 아래 코드와 같이 ()로 감싸지 않으면화면에 출력되지 않더라고요 renderItem={(item) => { <List.Item style={{ marginTop: 20 }}> <Card actions={[<StopOutlined key="stop" />]}> <Card.Meta description={item.nickname} /> </Card> </List.Item> } 그래서 다시 아래 코드처럼 ()로 감싸니까 정상적으로 화면에 출력이 되던데 그 이유에 대해서 알 수 있을까요? renderItem={(item) => ( <List.Item style={{ marginTop: 20 }}> <Card actions={[<StopOutlined key="stop" />]}> <Card.Meta description={item.nickname} /> </Card> </List.Item> )}
안녕하세요 제로초님 항상 감사드립니다. 강의 8:14 에서보면 XCode 오른쪽 탭에서 Target Membership이 FoodDeliveryApp에 체크 되어있는 것으로 보이는데 반면 제 XCode 에서는 disabled로 되어있습니다. 이 때문에 앱 아이콘과 스플래시 스크린이 정상적으로 작동 하지 않는 걸로 추측하고 있는데, 검색해보아도 해결이 안되어서 도움을 요청합니다~! 사진도 같이 첨부합니다 !
listenSocket.Listen(10) 으로 최대 대기수를 10으로 제한해두어서, 만약 20개가 동시에 입장 요청을 하면 앞 10명만 listenSocket의 대기에 넣어두다가,(뒤에 10명은 fail) Socket clientSocket = listenSocket.Accept(); 로 한명씩 입장시키고, recv send 하고 그 후 clientSocket.Close(); 한 후에 다음 대기번이 다시 Socket ClientSocket = listenSocket.Accept(); 되서 순서대로 하나씩 처리하는건가요?
근 3시간동안 다른 분들 비슷한 에러 메시지의 질문을 확인해봤는데 도저히 해결이 안되어 남깁니다.. 에러 메시지는 다음과 같습니다. java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:132) at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:123) at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190) at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132) at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:244) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:246) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97) at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69) at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38) at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'memberRepository': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'javax.persistence.EntityManagerFactory' available at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessProperties(PersistenceAnnotationBeanPostProcessor.java:351) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1415) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:608) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:531) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:923) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:588) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426) at org.springframework.boot.SpringApplication.run(SpringApplication.java:326) at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:122) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124) ... 27 more Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'javax.persistence.EntityManagerFactory' available at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1210) at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findDefaultEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:565) at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:528) at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.resolveEntityManager(PersistenceAnnotationBeanPostProcessor.java:696) at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.getResourceToInject(PersistenceAnnotationBeanPostProcessor.java:669) at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessProperties(PersistenceAnnotationBeanPostProcessor.java:348) ... 44 more 그리고 *************************** APPLICATION FAILED TO START *************************** Description: A component required a bean of type 'javax.persistence.EntityManagerFactory' that could not be found. Action: Consider defining a bean of type 'javax.persistence.EntityManagerFactory' in your configuration. 이게 상부에 떠있구요 Member.java package jpabook.jpashop ; import lombok. Getter ; import lombok. Setter ; import javax.persistence. Entity ; import javax.persistence. GeneratedValue ; import javax.persistence. Id ; @Entity @Getter @Setter public class Member { @Id @GeneratedValue private Long id ; private String username ; } MemberRepository.java package jpabook.jpashop ; import org.springframework.stereotype. Repository ; import javax.persistence.EntityManager ; import javax.persistence. PersistenceContext ; @Repository public class MemberRepository { @PersistenceContext private EntityManager em ; public Long save (Member member) { em .persist(member) ; return member.getId() ; } public Member find (Long id) { return em .find(Member. class, id) ; } } MemberRepositoryTest.java package jpabook.jpashop ; import org.assertj.core.api.Assertions ; import org.junit. Test ; import org.junit.runner. RunWith ; import org.springframework.beans.factory.annotation. Autowired ; import org.springframework.boot.test.context. SpringBootTest ; import org.springframework.test.context.junit4.SpringRunner ; import org.springframework.transaction.annotation. Transactional ; import static org.junit.jupiter.api.Assertions.* ; @RunWith (SpringRunner. class ) @SpringBootTest public class MemberRepositoryTest { @Autowired MemberRepository memberRepository ; @Test @Transactional public void testMember () throws Exception { //given Member member = new Member() ; member.setUsername( "memberA" ) ; //when Long savedId = memberRepository .save(member) ; Member findMember = memberRepository .find(savedId) ; //then Assertions. assertThat (findMember.getId()).isEqualTo(member.getId()) ; Assertions. assertThat (findMember.getUsername()).isEqualTo(member.getUsername()) ; } application.yml spring : # 띄어쓰기 없음 datasource : # 띄어쓰기 2 칸 url : jdbc:h2:tcp://localhost/~/jpashop #4 칸 username : sa password : driver-class-name : org.h2.Driver jpa : # 띄어쓰기 2 칸 hibernate : # 띄어쓰기 4 칸 ddl-auto : create # 띄어쓰기 6 칸 properties : # 띄어쓰기 4 칸 hibernate : # 띄어쓰기 6 칸 # show_sql: true # 띄어쓰기 8 칸 format_sql : true # 띄어쓰기 8 칸 logging.level : # 띄어쓰기 없음 org.hibernate.SQL : debug # 띄어쓰기 2 칸 띄어쓰기는 다 수정해봤고, 오타도 봤는데 잘 모르겠습니다.. H2는 켜져있고, build.gradle은 plugins { id 'org.springframework.boot' version '2.4.1' id 'io.spring.dependency-management' version '1.0.10.RELEASE' id 'java' } group = 'jpabook' version = '0.0.1-SNAPSHOT' sourceCompatibility = '11' configurations { compileOnly { extendsFrom annotationProcessor } } repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-validation' implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-devtools' compileOnly 'org.projectlombok:lombok' runtimeOnly 'com.h2database:h2' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' //JUnit4 추가 testImplementation( "org.junit.vintage:junit-vintage-engine" ) { exclude group : "org.hamcrest" , module : "hamcrest-core" } } test { useJUnitPlatform() } 위와 같습니다. 도움 주시면 감사하겠습니다.
강의에서 jwt방식을 예로 드셨던 세션정책Stateless에서 세션을 사용하지 않는다고 말씀하셨습니다. 궁금한 점은 jwt토큰방식을 사용하더라도 세션은 사용하는 것이 아닐까라는 의문입니다. 이유는 jwt방식으로 인증에 성공하면 Authentication객체를 securityContext에 저장하고 세션에 캐싱을 하며 controller에서 principle이나 @preauthorize 등과같은 기능을 사용할 수 있기 때문입니다.
필터(x) 부분을 설명해 주시는데,, 궁금증이 생겼습니다. 내부에서 다시 요청을 보내는데, dispatchType=ERROR 라고 보낸다고 하셨고, 필터는 dispatchType=REQUEST 로 해 놓으면 호출이 안된다고 하셨습니다. 어디쪽 로직에서 이렇게 검증하는지 알 수 있을까요? 아니면, dispatchType=ERROR 왔기 때문에 필터 검증을 하지 않는 거라고 이해해도 되는건가요?
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? 예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예 [질문 내용] 인텔리제이 얼티메이트 버전 사용중입니다. 선생님 강의대로 진행중인데 타임리프 문법 작성시 글자 색이 바뀌지 않습니다. 전부 초록색으로 나오다보니 괄호 구분이 너무 힘드네요 혹시 설정할 수 있는 방법이 있을까요?