1. By Direct Assignment var myApp = {} myApp.id = 0; myApp.next = function() { return myApp.id++; } myApp.reset = function() { myApp.id = 0; } window.console && console.log( myApp.next(), myApp.next(), myApp.reset(), myApp.next() ); //0, 1, undefined, 0 var myApp = {} myApp.id = 0; myApp.next = function() { return this.id++; } myApp.reset = function() { this.id = 0; } myApp.next(); //0 myApp.nex..
* Javascript RegEx Api The RegExp object RegExp 글로벌 오브젝트는 3가지 사용을 제시한다. var a = new RegExp("\\b[\\w]{4}\\b","g"); //match all four letter words //same as... a = /\b\w{4}\b/g; a.constructor //RegExp() "(penalty)Lampard, Frank(1-0)".match(/\b([\w]+),\s?([\w]+)/g); RegExp.leftContext //"(penalty)" RegExp.rightContext //"(1-0)" RegExp.$1 //"Lampard" RegExp.$2 //"Frank" var a = /\b[a-z]{10,}\b/i; //m..
Invoke a property alert(this); //window var a = { b : function(){ return this; } }; a.b(); //a; a['b'](); //a; var c = {}; c.d = a.b; c.d() //c Invoke a variable var a = { b : function() { return this; } }; var foo = a.b; foo() // window var a = { b: function(){ var c = function() { return this; } return c(); } }; a.b(); //window var a = { b : function() { return (function() { return this;})() }..
String.prototype.split(separator, limit) "85@@86@@53".split("@@"); //['85', '86', '53']; "bannana".split(); //["banana"]; "원,투,쓰리".split(",",2); // ["원","투"] Array.prototype.join(separator) 배열을 스트링으로 변환 합니다. ["slugs","snails","puppy dog's tails"].join(' and '); //"slugs and snails and puppy dog's tails" ['Giants', 4, 'Rangers', 1].join(' '); //"Giants 4 Rangers 1" [1962,1989,2002,2010].join(); /..
Fence - 바탕화면 정리 프로그램 http://www.stardock.com/products/fences/index.asp 이 분야에서 최강자인 것 같습니다. 바탕화면 아이콘 정리 및 숨기기가 가능해서 정신건강에도 도움이 좀 되는 유틸리티입니다. WinDirStat - 하드디스크 사용량을 GUI로 나타냄. http://windirstat.info/ 하드디스크의 드라이브별, 디렉토리별, 파일별 사용량을 아주 직관적으로 알 수 있게 해주는 프로그램입니다. 용량문제로 하드 정리할 때 매우 좋습니다. 영어 단어 검색 다운로드 : http://alldic.daum.net/dic/utility.do?utkd=dic 설명 : http://mainia.tistory.com/565