일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
- forwardref type
- Filter
- map
- Next.js
- set
- 스크롤이벤트
- generic
- app.post
- 슬라이딩윈도우
- 상속
- 배열중복요소제거
- 이진탐색
- Spring
- npm에러
- extends
- err_connection_refused
- interface
- react
- reactnative error
- 리액트네이티브아이콘
- 안드로이드빌드에러
- app:compiledebugkotlin
- 타입스크립트
- array
- reactnative
- TS
- async
- materialicons
- mainapplication.kt
- javascript
- Today
- Total
목록분류 전체보기 (157)
rhanziy
질풍노도의 첫번째 시기 중딩'어린 시절'을 당장 떠올리면 나는 중딩시절이 떠오른다. 동네를 벗어나 새로운 친구들을 만나고, 빠르게 바뀌는 유행을 경험하며 취향 스펙트럼이 확장되는 나이여서 그런 것 같다. 그 때는 또래집단의 power✨가 컸기때문에 정신없이 휩쓸리기도 했지만 혼자만의 시간이 주어졌을 때 내가 몰래 즐겼던 것들이 떠오른다. 일단 혼자만의 시간은 역시 모두가 잠자는 조용한 새벽을 좋아했다. 이때부터 올빼미 기질이 형성되었나... 어린시절의 나는 참 상상력이 풍부했던 것 같다. 그 당시 유행하던 책 시크릿ㅋㅋ을 감명 깊게 읽고는 눈을 감고 미래에 나는 어떤 모습일지를 마음 속으로 생생하게 그려봤는데, 아직도 선명하게 기억나는 건 ‘높은 낭떠러지 도로 위 스포츠카를 타고 달리는 멋진 나!' 였다..
filter를 이용한 배열의 중복 요소 제거 Uniq() { return this.filter((v, i, self) => self.indexOf(v) === i)} 객체 배열 정렬const todos = [ {id:4, content: 'JS'}, {id:1, content: 'HTML'}, {id:2, content: 'CSS'}]//배열 key값 타입에 따라 정렬function compare(key){ // 프로퍼티 값이 문자열일 경우 산술연산으로 비교하면 NaN이 나오므로 비교 연산 사용 // 비교함수는 양수/음수/0을 반환하면 되므로 산술연산 대신 비교연산을 사용할 수 있다. return (a,b) => typeof a[key] === 'string' ? a[key].localeCo..
슬라이딩 윈도우 알고리즘?하나의 특정 범위를 지정해놓고, 윈도우를 이동시키면서 범위 내에 있는 원소들을 계산해주는 원리.배열과 그 배열의 subArray(부분배열)의 원소들을 어떠한 조건하에 계산하는 상황에서 사용된다. O(n)의 시간복잡도.ex. 구간 합 구하기, 일정한 사이즈의 범위 값 계산하기, 가장 긴 부분 문자열 구하기 등. 예제) 사이즈가 K인 부분배열의 최대 합을 구하시오.Function maxSumOfArray(arr: number[], k:number){ let windowSum = 0; let maxSum = -Infinity; // arr에 음수가 포함될 경우 대비 for(let i = 0; i = k-1){ maxSum = Math.max(windowSum, ma..
이진탐색이란 ?divide and conquer(분할 정복) 패턴을 지향하는 탐색 알고리즘. 빠르고 효율적이지만 배열이 정렬되어있어야 한다.시간복잡도는 O(log n) 준비물정렬된 배열 Array A 와 Left, Middle, Right 포인터 동작원리L: 배열의 첫번째, R: 배열의 마지막, M: L 와 R의 평균값If A[M] === target return M If A[M] 미들 다음으로 탐색If A[M] > target, set R to M-1 -> 미들 이전을 최고값으로 탐색 const nums = [1,5,13,17,32,39,45,50]function binarySearch(arr: number[], target: number){ let left = 0; let rignt = arr...
재귀함수란 ? 함수 내부에서 자기자신을 호출하는 것. 재귀함수 조건Stop condition(base case)Recursive case모든 재귀함수는 스택오버플로우를 방지하기위해 실행을 종료할 base case를 정의해야한다. 재귀단계의 연산을 제대로 설정하지않으면 maximum call stack size exceeded 에러 발생function drink(x) { //1. base case if(x 예제1) 문자열을 뒤집는 함수function reverse(str){ //base case if(str == ''){ return "" } else { //recursive case return reverse(str.substr(1)) + str.charAt(0) }}resver..
프로젝트에 간단하게 문의하기 기능을 넣기위해 nodemailer 라이브러리를 설치했다.https://nodemailer.com/ Nodemailer :: NodemailerNodemailer Nodemailer is a module for Node.js applications to allow easy as cake email sending. The project got started back in 2010 when there was no sane option to send email messages, today it is the solution most Node.js users turn to by default. npm inodemailer.comnpm install nodemaileryarn add ..
에러메세지execution failed for task ':app:compiledebugkotlin'. > a failure occurred while executing org.jetbrains.kotlin.compilerrunner.gradlecompilerrunnerwithworkers$gradlekotlincompilerworkaction > compilation error. see MainApplication.kt 파일에 오류가 있었다.에러메세지만보고 처음엔 compile kotlin 버전을 낮추고 난리를 쳤는데 스택오버플로우에서 찾은 결과로는 rn 0.6이상에서는 자동으로 package가 추가된다고한다.new RNConfigPackage()를 주석처리해주자. 그럼 빌드 완뇨
네비게이션 - 스택, 바텀탭네비게이션yarn add @react-navigation/native @react-navigation/native-stackyarn add react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-contextyarn add@react-navigation/bottom-tabs