반응형
- Creative Commons
- 저작자표시 - 적절한 출처와, 해당 라이센스 링크를 표시하고, 변경이 있는 경우 공지해야 합니다. 합리적인 방식으로 이렇게 하면 되지만, 이용 허락권자가 귀하에게 권리를 부여한다거나 귀하의 사용을 허가한다는 내용을 나타내서는 안 됩니다.
- 비영리 - 이 저작물은 영리 목적으로 이용할 수 없습니다.
- 변경금지 - 이 저작물을 리믹스, 변형하거나 2차적 저작물을 작성하였을 경우 그 결과물을 공유할 수 없습니다.
이 글이 도움이 되셨다면, 광고 클릭 한번씩만 부탁드립니다 =ㅂ=ㅋ.
(If this article was helpful, please click the ad once. Thank you. ;)
(If this article was helpful, please click the ad once. Thank you. ;)
Mode: Bright; Font: Noto Sans KR; font-size: 16px; line-height: 1.5;
width: 1280, height: 720, version: 3.3.3
Canonical URI: https://kipid.tistory.com/entry/마지막이-CodeEnd-로-끝나면-error-나는거-해결합시다
dg:plink (Document Global Permanent Link): https://kipid.tistory.com/365
document.referrer: Empty
width: 1280, height: 720, version: 3.3.3
Canonical URI: https://kipid.tistory.com/entry/마지막이-CodeEnd-로-끝나면-error-나는거-해결합시다
dg:plink (Document Global Permanent Link): https://kipid.tistory.com/365
document.referrer: Empty







마지막이 ```/ 로 끝나면 error 나는거 해결합시다.
어랏 에러가 안나네. 뭐가 바뀐거지? =ㅂ=;;;
T1.Codes printed
▼ Show/Hide
On the left side of codes is there a hiden button to toggle/switch scrollability ({max-height:some} or {max-height:none}).
window.m = window.k = {}; // window.m can be asigned another JSON or number/string and so on. But window.k must be kept.
(function (m, $, undefined) {
m.version0 = "2.12";
m.getUTF8Length = function (s) {
let len = 0;
for (let i = 0; i < s.length; i++) {
let code = s.charCodeAt(i);
if (code <= 0x7f) {
len += 1;
}
else if (code <= 0x7ff) {
len += 2;
}
else if (code >= 0xd800 && code <= 0xdfff) {
// Surrogate pair: These take 4 bytes in UTF-8 and 2 chars in UCS-2
// (Assume next char is the other [valid] half and just skip it)
len += 4; i++;
}
else if (code < 0xffff) {
len += 3;
}
else {
len += 4;
}
}
return len;
};
m.getSearchVars = function (searchStr) {
let vars = [];
if (searchStr !== null && searchStr !== undefined && searchStr.length) {
if (searchStr.startsWith("?")) { searchStr = searchStr.substring(1); }
let j = searchStr.indexOf("#");
if (j !== -1) { searchStr = searchStr.substring(0, j); }
let splits = searchStr.replace(/&/ig, "&").split("&");
for (let i = 0; i < splits.length; i++) {
let key = splits[i];
let value = "";
let k = key.indexOf("=");
if (k !== -1) {
value = decodeURIComponent(key.substring(k + 1));
key = key.substring(0, k);
}
key = decodeURIComponent(key);
vars[i] = vars[key] = { key: key, val: value };
}
}
return vars;
};
On the left side of codes is there a hiden button to toggle/switch scrollability ({max-height:some} or {max-height:none}).
////////////////////////////////////////////////////
// Heap sort.
////////////////////////////////////////////////////
m.heapify = function (arr, key, sorted, n, i) {
let largest = i;
let l = 2 * i + 1;
let r = 2 * i + 2;
if (l < n && arr[sorted[l]][key] > arr[sorted[largest]][key]) {
largest = l;
}
if (r < n && arr[sorted[r]][key] > arr[sorted[largest]][key]) {
largest = r;
}
if (largest != i) {
let swap = sorted[i];
sorted[i] = sorted[largest];
sorted[largest] = swap;
m.heapify(arr, key, sorted, n, largest);
}
};
m.heapsort = function (arr, key, sorted, upto) {
let n = arr.length;
for (let i = Math.floor(n / 2) - 1; i >= 0; i--) {
m.heapify(arr, key, sorted, n, i);
}
if (upto) {
upto = upto > n ? n : upto;
}
else {
upto = n;
}
let until = n - upto;
for (let i = n - 1; i >= until; i--) {
let temp = sorted[0];
sorted[0] = sorted[i];
sorted[i] = temp;
m.heapify(arr, key, sorted, i, 0);
}
return until;
};
m.heapsortRest = function (arr, key, sorted, upto, n) {
upto = upto > n ? n : upto;
let until = n - upto;
for (let i = n - 1; i >= until; i--) {
let temp = sorted[0];
sorted[0] = sorted[i];
sorted[i] = temp;
m.heapify(arr, key, sorted, i, 0);
}
return until;
};
////////////////////////////////////////////////////
// URI rendering :: http link itself, videos, images, maps.
////////////////////////////////////////////////////
m.ptnURI = [];
m.ptnURL = /^https?:\/\/[^\s\t\n\r\"\'\`\<\>\{\}\[\]]+/i;
m.ptnFILE = /^file:\/\/\/[^\s\t\n\r\"\'\`\<\>\{\}\[\]]+/i;
m.ptnTag = /^<\w+[\s\S]+>/i;
m.ptnVal = /^([0-9]+(?:\.[0-9]+)?)\/([0-9]+(?:\.[0-9]+)?)$/;
m.uriToA = function (uri) {
if (!uri || typeof uri !== "string") {
uri = String(uri);
}
let exec = m.ptnURL.exec(uri);
if (exec !== null) {
return `<a target="_blank" href="${exec[0]}">${m.escapeOnlyTag(decodeURIComponent(uri).replace(/[\n\s\t\r]/g, " "))}</a>`;
}
else {
exec = m.ptnFILE.exec(uri);
if (exec !== null) {
return `<a target="_blank" href="${exec[0]}">${m.escapeOnlyTag(decodeURIComponent(uri).replace(/[\n\s\t\r]/g, " "))}</a>`;
}
else {
return m.escapeOnlyTag(uri);
}
}
};
})(window.k, jQuery);
▲ Hide







* 홍보/Promoting Recoeve.net (3S | Slow/Sexy/Sincere SNS)
유튜브 음악, K-Pop MV 들을 광고없이 목록재생 해서 보세요.
접속하셔서 가입 후 별점만 드레그 하시면 자신의 페이지에 저장 됩니다.
그리고 자신의 페이지로 이동한 뒤 추천 받기 (단축키 R) 를 누르시면 자신이 점수 메긴것들로 이웃 (이웃보기 단축키 B) 을 자동으로 찾아주고 그 이웃들로부터 추천을 받을 수 있습니다.
접속하셔서 가입 후 별점만 드레그 하시면 자신의 페이지에 저장 됩니다.
그리고 자신의 페이지로 이동한 뒤 추천 받기 (단축키 R) 를 누르시면 자신이 점수 메긴것들로 이웃 (이웃보기 단축키 B) 을 자동으로 찾아주고 그 이웃들로부터 추천을 받을 수 있습니다.
* 홍보/Promoting Recoeve.net (3S | Slow/Sexy/Sincere SNS)
츄츄와 루루 (포메라니안 6세/3.5kg, 3개월/1.2kg) 의 사진/동영상들을 모아 보세요.
접속하셔서 가입 후 별점만 드레그 하시면 자신의 페이지에 저장 됩니다.
그리고 자신의 페이지로 이동한 뒤 추천 받기 (단축키 R) 를 누르시면 자신이 점수 메긴것들로 이웃 (이웃보기 단축키 B) 을 자동으로 찾아주고 그 이웃들로부터 추천을 받을 수 있습니다.
접속하셔서 가입 후 별점만 드레그 하시면 자신의 페이지에 저장 됩니다.
그리고 자신의 페이지로 이동한 뒤 추천 받기 (단축키 R) 를 누르시면 자신이 점수 메긴것들로 이웃 (이웃보기 단축키 B) 을 자동으로 찾아주고 그 이웃들로부터 추천을 받을 수 있습니다.
이 글이 도움이 되셨다면, 광고 클릭 한번씩만 부탁드립니다 =ㅂ=ㅋ.
(If this article was helpful, please click the ad once. Thank you. ;)
(If this article was helpful, please click the ad once. Thank you. ;)
반응형
http/https 링크
및 수식 (\ [ Outline 수식 \ ]
,\ ( inline 수식 \ )
::\
이후 띄어쓰기 없이) 을 넣으실 수 있습니다. 또한 code 는```
시작,```/
마지막으로 감싸 주시면 pretty-printed 되어서 나타납니다.```[.lang-js.scrollable.no-linenums]
같이 언어를 선택해 주실수도 있고, 긴 수식의 경우 scroll bar 가 생기게 만드실 수도 있습니다. .no-linenums 로 line numbering 을 없앨수도 있습니다.댓글 입력 후 rendering 된 형태를 보시려면, Handle CmtZ (단축키: N) 버튼을 눌러주세요. 오른쪽 아래 Floating Keys 에 있습니다. 아니면 댓글 젤 아래에 버튼이 있습니다.