This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<component | |
:is="tag" | |
:contenteditable="true" | |
@input="update" | |
@blur="update" | |
@paste="paste"/> | |
</template> | |
<script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p class="target">text message example</p> | |
<button type="button" id="play">play</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import json | |
''' | |
Convert icon svg to vue | |
svg ํ์ผ์ vue ํ์ผ๋ก ๋ฐ๊ฟ์ฃผ๋ ์คํฌ๋ฆฝํธ์ ๋๋ค. | |
๋ณํ์์ ์ด ์ข ๋ง์ํธ์ด๋ผ์ ํ์ด์ฌ์ผ๋ก ์คํฌ๋ฆฝํธ๋ฅผ ์์ฑํ๊ฒ ๋์์ต๋๋ค. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ajax | |
* ๋น๋๊ธฐ ํต์ ์ ์ํ `XMLHttpRequest` ๊ฐ์ฒด์ ์ธํฐํ์ด์ค | |
* | |
* @param {string} url | |
* @param {string} method | |
* @param {object} data `xhr.send()` ๋ฉ์๋์ ์ธ์๊ฐ. `formData`๊ฐ์๊ฐ์ ๋ฃ์ | |
* @param {function} progress ํต์ ์ค์ ํธ์ถ๋๋ ํจ์ | |
* @param {function} before ํต์ ์ ์์ํ๊ธฐ์ xhr ๊ฐ์ฒด๋ฅผ ์ถ๊ฐ ์กฐ์์ ์ํ ์ค๊ฐ์ ์คํํ๋ ํจ์๋ก ์ฌ์ฉํ ์ ์๋ค. | |
* @return {promise} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* printf | |
* | |
* @param {String} str | |
* @param {String} values | |
* @return {String} | |
*/ | |
export function printf(str, ...values) | |
{ | |
for (let i = 0; i < values.length; i++) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* find index with key in array | |
* ๋ฐฐ์ด์์ ๋ค์ด์๋ ๊ฐ์ฒด์ ๊ฐ์์ฐพ๋ ํจ์ | |
* | |
* @param {Array} array | |
* @param {String} key key name | |
* @param {String} search search value | |
* @return {Number} | |
*/ | |
function findIndexWithKey(array=[], key='', search='') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section> | |
<h1>Command</h1> | |
<pre class="source">printf('apple:{0}, banana:{1}, mango:{2}', 'red', 'yellow', 'green');</pre> | |
</section> | |
<section> | |
<h1>Result</h1> | |
<pre class="result"></pre> | |
</section> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function log(o) {console.log(o);} | |
function Canvas(width, height, bgColor) | |
{ | |
this.el = document.createElement('canvas'); | |
this.ctx = this.el.getContext('2d'); | |
var size = { | |
width : (width) ? width : 150, | |
height : (height) ? height : 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Disabled touch scroll for ios | |
* ios ๋๋ฐ์ด์ค์์์ ์คํฌ๋กค์ ํ๊ธฐ๋ ๋ฐฉ์ ๋๋ฌธ์ html,body์๋ฆฌ๋จผํธ์์ overflow:hidden์ ์ ์ฉํด๋ดค์ ํ๊ธฐ๋ ์คํฌ๋กค์ ๋ง์ ํ์๊ฐ ์์๋๋ฐ ์คํฌ๋ฆฝํธ๋ก ํฐ์น๋ฅผ ๋ง์๋ฒ๋ฆฌ๋ ๋ฐฉ๋ฒ์ผ๋ก ์ธํฐํ์ด์ค๋ฅผ ๋ง๋ค๊ฒ ๋์๋ค. | |
* ํนํ ์ฌ์ด๋๋ฐ ๋ค๋น๊ฒ์ด์ ์ ์ฌ์ฉํ ๋ ์ฌ์ฉํ๋ฉด ๋์์ด ๋ ๊ฒ์ด๋ค. | |
* body ์๋ฆฌ๋จผํธ ์คํฌ๋กค์ ๋ง๋ ์ญํ ์ ํ๋ค. ๋ค๋ฅธ ํน์ ์๋ฆฌ๋จผํธ๋ -webkit-overflow-scrolling: auto;๋ก ์ฒ๋ฆฌ๊ฐ ๊ฐ๋ฅํ๋ค๊ณ ๋ด | |
*/ | |
function DisabledTouchscroll() | |
{ | |
var self = this; | |
var $body = $(document.body); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* CSS3 class | |
*/ | |
var CSS3 = { | |
eventNames : { | |
WebkitTransition : 'webkitTransitionEnd', | |
MozTransition : 'transitionend', | |
OTransition : 'oTransitionEnd otransitionend', | |
transition : 'transitionend' |
NewerOlder