분류 전체보기91 [ 프로그래머스 ] DFS | 타겟 넘버 javascript 타겟 넘버 문제 설명 n개의 음이 아닌 정수들이 있습니다. 이 정수들을 순서를 바꾸지 않고 적절히 더하거나 빼서 타겟 넘버를 만들려고 합니다. 예를 들어 [1, 1, 1, 1, 1]로 숫자 3을 만들려면 다음 다섯 방법을 쓸 수 있습니다. -1+1+1+1+1 = 3 +1-1+1+1+1 = 3 +1+1-1+1+1 = 3 +1+1+1-1+1 = 3 +1+1+1+1-1 = 3 사용할 수 있는 숫자가 담긴 배열 numbers, 타겟 넘버 target이 매개변수로 주어질 때 숫자를 적절히 더하고 빼서 타겟 넘버를 만드는 방법의 수를 return 하도록 solution 함수를 작성해주세요. 제한사항 주어지는 숫자의 개수는 2개 이상 20개 이하입니다. 각 숫자는 1 이상 50 이하인 자연수입니다. 타겟 넘버는 1 .. 2023. 6. 14. antd table column 에 align: 'center' 속성 넣기 에러 Type '{ title: string; dataIndex: string; key: string; align: string; }[]' is not assignable to type '(ColumnGroupType | ColumnType)[]'. Type '{ title: string; dataIndex: string; key: string; align: string; }[]' is not assignable to type '(ColumnGroupType | ColumnType)[]'. Type '{ title: string; dataIndex: string; key: string; align: string; }' is not assignable to type 'ColumnType'. Types of.. 2023. 6. 14. antd table 사용할 때 Warning: Each child in a list should have a unique "key" prop. Check the render method of `Body`. 에러 https://github.com/ant-design/ant-design/issues/7623 Each record in table should have a unique `key` prop,or set `rowKey` to an unique primary key. · Issue #7623 · ant-design/ant- I'm trying to figure out how can I get unique keys for each record. So far, my code looks like this: let lastIndex = 0 const updateIndex = () => { lastIndex++ return lastIndex } ... constructor() {... github.com antd t.. 2023. 5. 24. [ TIL ] React Hook "useState" is called in function "control" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".eslintr.. 코드 리팩토링을 하다가 react function component 도 react custom hook 도 아닌 일반 ts함수에서 useState와 useEffect 를 쓰려고 하니 해당 에러가 났다. 이유는 useState, useEffect 같은 react hook 을 쓰려면 react hook 을 오직 react 함수 내에서 호출해야하기 때문이다. react hook 을 사용할 때는 아래 두가지 규칙을 준수해야한다. 최상위(at the Top Level)에서만 Hook을 호출해야 합니다 반복문, 조건문 혹은 중첩된 함수 내에서 Hook을 호출하지 마세요. 대신 early return이 실행되기 전에 항상 React 함수의 최상위(at the top level)에서 Hook을 호출해야 합니다. 이 규.. 2023. 4. 27. 이전 1 ··· 5 6 7 8 9 10 11 ··· 23 다음