전체 글 (180) 썸네일형 리스트형 [javaScript]자바스크립트 타이머 - setTimeout, setInterval, clearInterval 함수 오늘은 Javascript에서 제공하는 타이머(Timer) 함수 활용에 대한 간단한 포스팅입니다. Javascript 를 이용할 때, 1) 종종 특정 함수나 기능을 페이지가 로드되거나 버튼이 클릭되었을 때, 바로 실행하지 않고, 약간의 시간이 지난후에 실행되게 하고 싶은 경우가 있습니다. 또는 2) 특정 함수를 지속적으로 반복하여 실행하고 싶은 경우도 있구요. 예를 들면 특정 정보를 화면에 표시하여 사용자에게 안내하고, 5초 후에 다른 페이지로 이동시키고 싶은 것이라면 위의 첫번째 경우이겠죠? 그리고 10초마다 새로운 정보를 보여주기 위해 페이지의 특정 영역 프레임을 AJAX호출을 통해 지속적으로 갱신해주고 싶은 경우라면 두번째 경우일 것 같구요. 이런 처리를 위해 Javascript는 어떤 함수를 제공.. [QueryDSL] 검색 조건 쿼리 QueryDSL의 기본 검색 조건 쿼리는 다음과 같이 사용할 수 있습니다. @Test @DisplayName("검색 조건 쿼리 EX") fun testSearchQuery() { val eq: BooleanExpression = member.username.eq("member1") //username = "member1" val ne: BooleanExpression = member.username.ne("member1") //username != "member1" val eq_not: BooleanExpression = member.username.eq("member1").not() //username != "member1 val isNotNull: BooleanExpression = member.us.. [React 에러 일지] Cannot read properties of undefined... Uncaught TypeError: Cannot read properties of undefined (reading 'filter') 자바스크립트 에러 Top 10 🚫 Top 10 JavaScript errors from 1000+ projects (and how to avoid them) Uncaught TypeError: Cannot read property ... TypeError: ‘undefined’ is not an object ... TypeError: null is not an object ... (unknown): Script error TypeError: Object doesn’t support property TypeError: ‘undefined’ is not a function U.. Unexpected use of 'location' no-restricted-globals eslint - 명시적 전역 변수 react 예제를 분석하는 중 clone받은 소스에서는 에러가 나지 않았던 부분인데, 새로 만든 프로젝트에서는 ESLint상에서 에러가 발생하는 걸 발견했다. location이나 history 같은 전역 변수를 ESLint가 참조할 수 있게 주석으로 명시해 주는 것이다. 같은 eslint-config-airbnb-base 패키지를 사용하지만 예제 프로젝트는 v15.1.0이고 내가 설치한 최신 버전은 v16.1.0 이었다. v15.1.0로 설치하고 나니 에러가 사라졌다. 만약 v16.1.0을 사용한다고 하면 eslintrc 설정에 다음 rule을 추가하면 된다. "no-restricted-globals": ["off"] 파일에 주석으로 eslint rule을 변경해주는 방.. [Java] ArrayList 순서바꾸기 * Collections.reverse(list); - Collections : java.util - 자바 기본 라이브러리 함수 - 역순 * Collections.swap(list, index1, index2); - index의 위치를 서로 바꿈 ================================실습================================== // 프론트에서 페이지에 들어가면 마지막 리스트를 보여주게 되어있다 즉 보여주고 싶은 리스트를 마지막 번째로 //바꿔주기 위해 누른 페이지를 마지막으로 swqp 해줬다 Collections.swap(리스트명,리스트명.size()-1, Integer.parseInt(보여줄 페이지)) 출처 : https://ty01059.tistory.com/25 [javascript / 자바스크립트] 시간 지연 함수, delay 방법, 몇 초 후 실행 - setTimeout() 자바 스크립트 함수 딜레이 setTimeout 사용방법 setTimeout()은 시간을 지연시켜주는 메소드다. setTimeout(function(){}, 1000); 위 코드를 실행시키면 1000ms(=1second) 뒤에 function()이 실행된다. setTimeout() 사용예시 3초 후에 "hello"라는 alert 창을 띄우는 자바스크립트 코드 예시 1 2 3 4 // 3초후에 "hello"라는 alert 창 띄우기 setTimeout(function () { alert("hello"); }, 3000); cs 소스파일 & 실행화면 index.html 위와 같이 index.html과 index.js 파일을 작성한 뒤 index.html 파일을 열면 다음과 같이 실행화면이 뜬다. hello라는.. Unable to load class named [io.jsonwebtoken.impl.DefaultHeader] from the thread context, current, or system/application ClassLoaders. All heuristics have been exhausted. Class could not be found. Have you remembered to include the jjwt-impl.jar in yo.. Unable to load class named [io.jsonwebtoken.impl.DefaultHeader] from the thread context, current, or system/application ClassLoaders. All heuristics have been exhausted. Class could not be found. Have you remembered to include the jjwt-impl.jar in your runtime classpath? 로그인 잘 되다가 토큰 생성하는 곳에서 갑자기 에러가 터졌다 찾아보니 .. Springboot에 jwt를 연결하여 토큰을 발급받으려고 하는데 오류가 났다. io.jsonwebtoken.lang.UnknownClassExcept.. Local History Revert 히스토리 되돌리기 깃허브 커밋전 롤백 되돌리기 형상 관리 툴을 쓰면서 왜 버전 관리를 못 하니… 버그 다 고치고 한꺼번에 commit해야지, 했다가 중간에 뭔가 꼬여서 대참사가 일어났다. 가장 최근에 한 commit이 어제 한 거라 거의 울 뻔하다가, Android Studio의 Local History 기능에 대해 알게 되었다. Show History - 히스토리 보기 상단 메뉴에서 VCS - Local History - Show History 좌측 경로나 파일 우클릭 Local History - Show History 에디터에서 코드 우클릭 Local History - Show History 히스토리를 오픈하면 다음과 같은 새 창이 표시된다. 위의 캡처에 표시한 것처럼, 해당 history 우클릭 - Revert, 혹은 이전 코드와 현재(Curr.. 이전 1 ··· 9 10 11 12 13 14 15 ··· 23 다음