[Javascript] Trim()

if (!String.prototype.trim) {
  String.prototype.trim = function () {
    return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
  };
}
2022. 10. 27. 08:21

[Coldfusion] Header Override

header (CFHEADER) 를 사용 하면 header에 동일한 property가 존재해도 추가만 된다.

아래와 같이 사용하면 기존의 property 를 변경할 수 있다.

<cfscript>
    pc = getPageContext().getResponse();
    pc.setHeader("content-security-policy", "");
</cfscript>
2022. 10. 6. 10:58

procedure/function/trigger 의 내용 찾기

일반 적인 문자열

SELECT DISTINCT
       o.name AS Object_Name,
       o.type_desc
FROM sys.sql_modules m
       INNER JOIN
       sys.objects o
         ON m.object_id = o.object_id
WHERE m.definition Like '%totalRevenue%'

ESACPE 처리 해야 하는 문자열

SELECT DISTINCT
       o.name AS Object_Name,
       o.type_desc
FROM sys.sql_modules m
       INNER JOIN
       sys.objects o
         ON m.object_id = o.object_id
WHERE m.definition Like '%\[totalRevenue\]%' ESCAPE '\'
2022. 10. 5. 10:07

[Coldfusion] EncodeForHTML 이후 개행이 필요 할 때.

rereplace(EncodeForHTML("내용"), "&##xa;&##xd;|&##xd;&##xa;|&##xa;|&##xd;", "<br>", "all")