This file contains 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 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 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 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 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 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 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 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 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 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