본문 바로가기

전체 글152

사용자 함수 만들기 2가지 방법 1. 일반 메소드 형식 // 사용방법 : $.test("test"); // test 메소드 만들기 (function($){ $.test = function(text){ alert(text); } })(jQuery); 2. 체인 메소드 형식 // 특징 : this 객체를 사용 할수 있다. // 사용방법 : $(object).test("test"); // test 체인 메소드 만들기 (function($){ $.extend($.fn,{ test : function(text){ alert(text); alert(this); // this - > $(object) 를 말한다. } }); })(jQuery); 2013. 3. 25.
오라클, start with connect by prior. 계층구조로 정렬하기. 1. 테이블 데이터 id=시퀀스, parent_id=부모키, name=자신의 이름, parent_name=부모의 이름, depth=단계 IDPARENT_IDNAMEPARENT_NAMEDEPTH30root1null140root2null153root1-1root1263root1-2root1273root1-3root1283root1-4root1298root1-4-1root1-43104root2-1root22114root2-2root222. 계층형 쿼리 SELECT ID, PARENT_ID, NAME, PARENT_NAME, TYPE FROM SITE_LIST START WITH PARENT_ID = 0 /* 부모의 시작 조건 */ CONNECT BY PRIOR ID = PARENT_ID /* 자신의 키와 부모.. 2013. 3. 25.
데스크탑 크롬 => 모바일 크롬으로 만들기. How to make Desktop Chrome to Mobile version. 데스크탑 크롬 브라우저를 모바일 버젼으로 만들기. Makes PC chrome to mobile. 1. Make shortcut - 바로가기 만들기 2. mouse R-button on the icon. - 마우스 우 클릭 3. Select properties - 속성 선택 4. copy below --user-agent="Mozilla/5.0 (Linux; U; Android 2.3.4; en-us;Nexus S Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko)Version/4.0 Mobile Safari/533.1" paste "here". You should put after chrome.exe. - 위에 옵션을 카피해서 "here" 에 붙여넣기 한다. 반드.. 2013. 3. 25.
RANK() 함수 오라클 정리 RANK() 함수 partition by 그룹 order by 정렬 대상 select department_id, score, rank() over(partition by department_id order by score) rnk from (select 'a' department_id, 10 score from dual union all select 'b' department_id, 20 score from dual union all select 'a' department_id, 30 score from dual union all select 'b' department_id, 15 score from dual union all select 'a' department_id, 50 score f.. 2013. 3. 25.