2019. 11. 13. 09:50

[IntelliJ] TypeError: this.cliEngine is not a constructor

webstorm에서 eslint 적용 후 

TypeError: this.cliEngine is not a constructor

위와 같은 에러 발생



출처: https://tristan91.tistory.com/516 [개발모음집]

webstorm에서 eslint 적용 후 

TypeError: this.cliEngine is not a constructor

위와 같은 에러 발생



출처: https://tristan91.tistory.com/516 [개발모음집]

webstorm에서 eslint 적용 후 

TypeError: this.cliEngine is not a constructor

위와 같은 에러 발생



출처: https://tristan91.tistory.com/516 [개발모음집]

IntelliJ에서 eslint 사용 시 아래와 같은 오류가 발생하는 경우.

TypeError: this.cliEngine is not a constructor


문제는 IntelliJ의 node(eslint) 버전이 낮은 버전(eslint v5)에 맞춰져 있는데 설치된 버전(eslint v6)이 높아서 발생함


IntelliJ를 2019.1.2 이상으로 업데이트 하던지 아래 방법을 사용할 것


1. node_modules/eslint 와 eslint*에 관련된 디렉토리 삭제


2. package.json 에서 eslinkt 버전을 ^5.16.0 으로 변경한 후 npm install을 실행

2019. 11. 4. 08:45

[MSSQL] IDENTITY Column (PK)의 값을 insert 하기

Identity로 설정된 column의 값은 임의로 변경하지 못함.

자동으로 증가되는 값 이외의 수치로 변경(0, -1등등)하기 위해서는 IDENTITY_INSERT를 변경해 주어야 함.

update는 delete 후 insert 하는 수 밖에 없음

SET IDENTITY_INSERT [table] ON
INSERT INTO [table] (PK) VALUES (-1)
SET IDENTITY_INSERT [table] OFF

 

2019. 9. 19. 12:44

[MSSQL] 현재의 Isolation Level 확인

SELECT
CASE transaction_isolation_level
WHEN 0 THEN 'Unspecified'
WHEN 1 THEN 'ReadUncommitted'
WHEN 2 THEN 'ReadCommitted'
WHEN 3 THEN 'Repeatable'
WHEN 4 THEN 'Serializable'
WHEN 5 THEN 'Snapshot'
END AS TRANSACTION_ISOLATION_LEVEL
FROM sys.dm_exec_sessions
WHERE session_id = @@SPID


2019. 9. 16. 16:18

[Coldfusion] 같은 이름의 form element 처리 방법

Coldfusion에서 같은 이름의 form element를 전송하면 자동으로 list 형태(,콤마 구분)으로 만들어주는데..

이게 아주 병신같다. form value에 comma가 들어가면 100% 오작동 한다. 아주 쓰레기 언어임.

 

일반 form 전송인 경우 아래와 같이 하면 array로 받아 올 수 있다.

<cfdump var="#getPageContext().getRequest().getParameterValues('변수명')#"/>

 

multipart/form-data 인 경우에는 form.getPartsArray()를 사용해야한다.

 

Coldfusino 서버인 경우

<cfset tmpPartsArray = Form.getPartsArray() />
<cfif IsDefined("tmpPartsArray")>
    <cfloop array="#tmpPartsArray#" index="tmpPart">
        <cfif tmpPart.isParam() AND tmpPart.getName() eq '변수명'>
            <cfoutput>#EncodeForHTML(tmpPart.getStringValue())#</cfoutput>
        </cfif>
    </cfloop>
</cfif>

 

Lucee 서버인 경우

var tmpPartsArray = form.getFileItems();
if(!isNull(tmpPartsArray)) {
    for(var file in tmpPartsArray) {
        if(arguments.formFieldName eq file.getFieldName()) {
            return file.getName();
        }
    }
}