๐คก
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(un){ | |
| var versions = {} | |
| , defer = function(context){ | |
| this.fn = {}; | |
| this.context = context; | |
| this.set = function(key, fn){defer.isF(fn) ? this.fn[key] = fn : defer.noF;}; | |
| this.get = function(key){return defer.isF(this.fn[key]) ? this.fn[key] : defer.noF;}; | |
| this.one = function(key){var fn = this.get(key); delete this.fn[key]; return fn;}; | |
| this.is = function(key){return key in this.fn;}; | |
| }, keygen = function(){ |
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
| Object.defineProperty(document, "all", { | |
| get: function(){ | |
| var dup = {}; | |
| return (function(all){ | |
| for(var i=0,len=all.length;i<len;i++){ | |
| var id = all[i].id, name = all[i].name; | |
| if(id && dup[id] != 'id'){ | |
| all[id] = all[i]; | |
| dup[id] = 'id'; | |
| } |
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 pad1(str,char,loop){ | |
| var result = ''; | |
| for(var i=0;i<loop;i++) result+=char; | |
| return (result+str).slice(-loop); | |
| } | |
| function pad2(str,char,loop){ | |
| for(var i=0,len=loop-str.length;i<len;i++) | |
| str = char + str; | |
| return str; | |
| } |
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 JSON_stringify(s, emit_unicode) | |
| { | |
| var json = JSON.stringify(s); | |
| return emit_unicode ? json : json.replace(/[\u007f-\uffff]/g, | |
| function(c) { | |
| return '\\u'+('0000'+c.charCodeAt(0).toString(16)).slice(-4); | |
| } | |
| ); | |
| } |
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
| /** | |
| * Web SQL Database ๋ฅผ ์ฌ์ฉํ๊ธฐ ์ฝ๊ฒ ์ ์ํ ํด๋์ค | |
| * | |
| * ์ด๊ธฐํ: | |
| * var db = new Database('dbname', 10*1024*1024); | |
| * ๋จ์ผ ์ง์: (ํ์ฌ ํธ๋์ญ์ ์ด ํน์ฑ์ ํ๊บผ๋ฒ์ ์ํ ๋ชปํ๋ ๋ฌธ์ ์์.) | |
| * db.query('select * from table').then(successFunc); | |
| * ๋ฐฐ์น ์ง์: (ํ๊บผ๋ฒ์ ์ํํ ์ ๋ฐ๋์ ์ถ์ฒ.) | |
| * db.begin() | |
| * .query('insert into table values (?)', 1) |
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
| /** | |
| * ์ฃผ๋ฏผ๋ฒํธ ์์ฑ๊ธฐ | |
| * ์ฌ์ฉ์) jumin() | |
| * jumin({year:1990, month:3, day: 12, loop: 10}); //1990๋ 3์ 12์ผ์ 10๊ฐ ์ฃผ๋ฏผ๋ฒํธ ์์ฑ. | |
| * ํ์ธ์) jumin.verify(ํ์ธํ ์ฃผ๋ฏผ๋ฒํธ) ํ์ธํ ์ฃผ๋ฏผ๋ฒํธ๋ - ์์ด๋ ์์ด๋ ๋ฌด๊ด. 13์๋ฆฌ๋ง ๋ง์ถ๋ฉด ๋จ. | |
| * @param {object} options ์ต์ | |
| * year: ๋ ๋, ๋น ๊ฐ์ผ๋ฉด ๋๋ค | |
| * month: ์, ๋น ๊ฐ์ด๋ฉด ๋๋ค | |
| * day: ์ผ, ๋น ๊ฐ์ด๋ฉด ๋๋ค | |
| * loop: ์์ฑ๊ฐ์, ๋น ๊ฐ์ด๋ฉด 1๊ฐ ์์ฑ. |
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
| FROM a LEFT JOIN b ON a.key = b.key AND a.val = '460' | |
| --์ Ansi Outer Join์ ๊ฐ์ ๊ฒฐ๊ณผ๋ฅผ ๋ด๋ ์ค๋ผํด ์กฐ์ธ์ผ๋ก ๋ฐ๊พธ์ด ๋ณด๋ฉด ์๋์ ๊ฐ์ต๋๋ค. | |
| FROM a, b WHERE DECODE(a.val,'460',a.key) = b.key(+) |
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
| --BEAN CLASS ๋ง๋ค๊ธฐ | |
| select | |
| 'private String ' || lower(SUBSTR(a.COLUMN_NAME, 1,1))||SUBSTR(replace(INITCAP(lower(a.COLUMN_NAME)), '_',''), 2) || ' = "";' | |
| || ' //' || NVL(b.COMMENTS, '') | |
| as ๋น์์ค | |
| FROM USER_TAB_COLS a | |
| , USER_COL_COMMENTS b | |
| WHERE a.TABLE_NAME = b.TABLE_NAME | |
| and a.COLUMN_NAME = b.COLUMN_NAME | |
| AND a.TABLE_NAME=upper('ez_user'); |
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
| SELECT A.TABLE_NAME TABLE_NAME | |
| ,B.COMMENTS TAB_COMMENTS | |
| ,C.COLUMN_ID COLUMN_ID | |
| ,C.COLUMN_NAME COLUMN_NAME | |
| ,D.COMMENTS COL_COMMENTS | |
| ,C.DATA_TYPE DATA_TYPE | |
| ,DECODE(C.DATA_TYPE,'CHAR', TO_CHAR(C.DATA_LENGTH) | |
| ,'VARCHAR', TO_CHAR(C.DATA_LENGTH) | |
| ,'VARCHAR2', TO_CHAR(C.DATA_LENGTH) | |
| ,'NUMBER', TO_CHAR(C.DATA_PRECISION)||DECODE(NVL(C.DATA_SCALE,''),0,'',',' |
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
| WITH TABLE_NM AS | |
| ( SELECT 'TABLE_NAME' as TABLE_NM | |
| ,'/* ' as desc01 | |
| ,' */' as desc02 | |
| FROM DUAL) | |
| SELECT col_comments | |
| FROM ( | |
| SELECT -1 AS COLUMN_ID, | |
| 'DELETE FROM ' || TABLE_NM AS col_comments | |
| FROM DUAL, TABLE_NM |