본문 바로가기

Development

[Gradle] Test 제외하고 Build하기 gradle build -x test 출처 : https://stackoverflow.com/questions/4597850/gradle-build-without-tests
[Momentjs] format 이것도 스프링 Query Method처럼 참고용으로 올려놓는다. 은근 자주 쓰는데 잊어먹어서..ㅠㅠ TokenOutputMonthM1 2 ... 11 12Mo1st 2nd ... 11th 12thMM01 02 ... 11 12MMMJan Feb ... Nov DecMMMMJanuary February ... November DecemberQuarterQ1 2 3 4Qo1st 2nd 3rd 4thDay of MonthD1 2 ... 30 31Do1st 2nd ... 30th 31stDD01 02 ... 30 31Day of YearDDD1 2 ... 364 365DDDo1st 2nd ... 364th 365thDDDD001 002 ... 364 365Day of Weekd0 1 ... 5 6do0th 1s..
[Spring] Data Query Method 쿼리 메소드. 쿼리 자동 생성. 자주 참고하는 거라 따로 발췌해서 저장한다.출처: https://docs.spring.io/spring-data/jpa/docs/current/reference/html/ Table 4. Supported keywords inside method names Keyword Sample JPQL snippet And findByLastnameAndFirstname … where x.lastname = ?1 and x.firstname = ?2 Or findByLastnameOrFirstname … where x.lastname = ?1 or x.firstname = ?2 Is,Equals findByFirstname,findByFirstnameIs,findByFirstname..
[IntelliJ] 자동으로 static import 선언하기 더 좋은 다른 방법이 있는지는 모르겠지만 일단 기억하려고 적어놓는다. 상수나 enum을 사용할 때 해당 클래스명이나 enum명을 사용하지 않고 바로 변수를 사용할 수 있게 해주는 게 static import이다. 그런데 이게 귀찮은 게 Auto-Complete(Control + Space) 기능으로 import를 추가하면 static으로 추가하지 않고 '클래스명.변수명'으로 바꿔버린다. 그래서 static import로 자동완성하고 싶을 때는 Quick Fix( Alt + Enter ) 기능을 통해 static import를 사용하면 된다.public static enum MetricType { TEMPERATURE( "1" ) }이런 enum이 있을 때, 사용하는 코드에서 TEMPERATURE를 치고 ..
[Angular] formGroup 관련 에러 Error : ERROR Error: ngModel cannot be used to register form controls with a parent formGroup directive. Try using formGroup's partner directive "formControlName" instead. Example: In your class: this.myGroup = new FormGroup({ firstName: new FormControl() }); Or, if you'd like to avoid registering this form control, indicate that it's standalone in ngModelOptions: Example: Solution:이 에러가 참 어렵다. ..
공백(xA0)을 정규표현식으로 찾는 방법 Javascript에서는 정규표현식 \s을 사용하면 \20공백 말고 xA0공백도 찾아주지만 Java에서는 찾아주지 않는다. 기본적으로 정규표현식은 스펙이기 때문에 각 언어에서 자체적으로 구현한다. 그러다보니 언어마다 정규표현식이 조금씩 다를 수 있다. 여튼 Java에서 xA0공백을 찾으려면 어떻게 하면 좋을까? 그냥 추가해주면 된다. 이렇게. [\s\xA0]이렇게 쓰면 32공백도 찾고 160공백도 찾을 수 있다.
[Angular] File에서 값 가져오기. 출처: https://stackoverflow.com/questions/35399617/angular-2-file-upload-from-input-type-file
[Windows10] 시작 프로그램 폴더 찾기 Windows 10에서는 시작 버튼 눌렀을 때 시작 프로그램 폴더가 나오지 않는다. 그래서 따로 찾아가야 하는데 간단하게 갈 수 있는 방법이 있다. 실행창( Windows Key + R ) -> shell:startup 입력 후 Enter Key하면 끝!!!
[IntelliJ] 대소문자 안 가리고 자동완성 기능 사용하기 Settings -> Editor -> General -> Code Completion -> Case sensitive completion을 None으로 설정하면 된다. 단축키는 Windows의 경우 Control + Alt + S 누르고(Settings) -> Control + F -> Case sensitive 검색
[Angular] TS2339:Property 'curveBasis' does not exist on type 'typeof d3'. Error: Error:(103, 13) TS2339:Property 'curveBasis' does not exist on type 'typeof d3'. Solution: npm install @types/d3 --save-dev
Scoop 설치 먼저 Powershell을 띄우고 $psversiontable.psversion.major # should be >= 3 set-executionpolicy remotesigned -scope currentuser iex (new-object net.webclient).downloadstring('https://get.scoop.sh') 이렇게 치면 자동으로 scoop이 설치된다 ㅎ 이제 귀찮게 사이트에 들어가서 하나씩 받아 설치하지 말고 커맨드 하나로 간편하게 설치 ㄱㄱ
[NPM] macOS에서 npm install 중에 발생하는 에러 언젠가부터 npm install을 하면 이런 에러가 났다. 구글링을 해보니 해결방법은 재설치하면 된다고 한다 ㅎㅎ;;Error :$ yarn --version 0.27.5 $ npm install module.js:487 throw err; ^ Error: Cannot find module 'semver' at Function.Module._resolveFilename (module.js:485:15) at Function.Module._load (module.js:437:25) at Module.require (module.js:513:17) at require (internal/module.js:11:18) at Object. (/usr/local/lib/node_modules/npm/lib/util..