일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- it
- 개발자
- ubuntu
- NGINX
- MySQL
- android
- H2O
- server
- caddy
- 자바
- 한글
- techEmpower
- 안드로이드
- 컴퓨터과학총론
- unity
- 번역
- java
- C
- C lanuage
- 구글
- centOS7
- 개발
- kakao
- 해석
- php
- 프래그먼트
- error
- Portfolio
- javascript
- mariadb
- Today
- Total
목록전체 글 (395)
개발모음집
// input 태그에 autocomplete="off" 삽입 출처 : https://stackoverflow.com/questions/38799096/clear-input-fields-on-page-refresh-microsoft-edge
원래는 searchInput.addEventListener('keypress', async e => { if (e.keyCode === 13) console.log('enterEvent') }) 위와 같이 e.keyCode로 엔터인지 확인했으나 keyCode가 deprecated되면서 아래와 같이 e.code로 사용하는 것을 권장함 searchInput.addEventListener('keypress', async e => { if (e.code === 'Enter') console.log('enterEvent') }) 출처 : https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode
다른 js파일들은 js로 인식하는데 posts.js 파일만 DTD 형식으로 인식했다. 다른 프로젝트를 생성하여 posts.js로 만들어도 동일하게 문제가 발생했다. 위 이미지와 같이 preference - Editor - File Types - XML Document Type Definition에 가니 위와 같이 posts.js가 있었다. posts.js를 제거하니 posts.js 파일을 js로 인식했다. 출처 : https://intellij-support.jetbrains.com/hc/en-us/community/posts/207062135-One-js-file-not-recognized-as-javascipt-others-ok
js 파일을 인크루드했는데, 파일경로를 찾을 수 없을 때 생기는 에러였다. // apache root 경로 밖의 파일을 root로 옮기고 // 아래와 같이 변경
let params = { "param1": "value1", "param2": "value2" }; let query = Object.keys(params) .map(k => encodeURIComponent(k) + '=' + encodeURIComponent(params[k])) .join('&'); let url = 'https://example.com/search?' + query; fetch(url) .then(data => data.text()) .then((text) => { console.log('request succeeded with JSON response', text) }).catch(function (error) { console.log('request failed', error..
arrow function이 error 나서 아래와 같이 해결 npm i -D eslint babel-eslint // .eslintrc.js module.exports = { //... parser: 'babel-eslint', }
width = 500; height = 500; const svg = d3 .select("#chart") .append("svg") .attr("viewBox", `0 0 ${width} ${height}`) 위코드처럼 viewBox를 추가해주면 된다. 출처 : https://stackoverflow.com/questions/9400615/whats-the-best-way-to-make-a-d3-js-visualisation-layout-responsive
1) for ~ each : for문이랑 같은 내용 사전적 의미 for each : ~마다, 제각기, 각각의 고유명사 forEach()는 주어진 callback을 배열에 있는 각 요소에 대해 오름차순으로 한 번씩 실행합니다. 삭제했거나 초기화하지 않은 인덱스 속성에 대해서는 실행하지 않습니다. (예: 희소 배열) forEach() 메서드는 주어진 함수를 배열 요소 각각에 대해 실행합니다 Array.prototype.forEach(callback[, thisArg]) - callback : function (currentValue[, index[, originalArray]]) - currentValue`: 현재값 - index: 현재 인덱스 - originalArray: 원본 배열 - thisArg: t..