'^02.{0}|^01.{1}|[[:digit:]]{3})([[:digit:]]+)([[:digit:]]{4})', '\1-\2-\3'
뭐 보면 금방 이해할것이고 문제는 어디서 봤는지 원본 url을 못찾겠다는게 문제네요.
REGEXP_REPLACE를 이용하면 해결 됨.
암튼 좋은 정보 주신분 감사합니다.
2012년 6월 19일 화요일
oracle 전화번호에 '-' 삽입하기
2011년 8월 31일 수요일
oracle dbms_job
dbms_job을 이용해서 dblink가 되있는 oracle server에 특정 쿼리를 날려야 된다.
5분 단위로 select 쿼리를 날린다.
참고 url : http://www.oracleclub.com/article/32789
5분 단위로 select 쿼리를 날린다.
check.sql
begin
dbms_job.submit(:jobno,'begin declare aaa number := 0; begin select 1 into aaa from dual@aaa; end; end;',sysdate,'sysdate + 5/24/60');
end;
/
sqlplus test/test
@check
print jobno
111 -- jobno 확인
exec dbms_job.run(jobno);
commit;
exec dbms_job.run(jobno); -- 다시시작
exec dbms_job.broken(jobno, TRUE); -- disable
exec dbms_job.remove(jobno); -- 삭제
참고 url : http://www.oracleclub.com/article/32789
2011년 3월 17일 목요일
jquery 이것저것
전체 체크박스 전체 선택-해제
동일한 이름의 input name="test"인걸 하나의 문자열로 변환
select box 관련
input box 추가 및 삭제
$('#allcheck').click(function() {
if ($('#allcheck:checked').length > 0) {
$('.delcheck').attr('checked', 'checked');
} else {
$('.delcheck').attr('checked', '');
}
});
동일한 이름의 input name="test"인걸 하나의 문자열로 변환
var ret = [];
var cnt = 0;
$('input[name*=test]').each(function() {
ret[cnt] = $(this).val();
cnt += 1;
});
alert(ret.join());
select box 관련
var testcode = 2;
$('#testid option:eq('+testcode+')').attr('selected', 'selected');
alert($('#testid option:selected').val());
alert($('#testid option:selected').text());
input box 추가 및 삭제
input type="button" value="추가" id="addButton"
var addhtml = "div id=\"addHtml\"
input type=\"text\" name=\"test\" value=\"\" input type=\"button\" value=\"삭제\" class=\"delhtml\"
/div
";
$('#addButton').click(function () {
$('#addHtml').append(addhtml);
$('.delhtml').bind('click', function () {
$(this).parent().remove();
});
});
jquery autocomplete
jquery autocomplete 간단한 사용법
우선 사용하고자 하는 페이지의 자바스크립트
uid가 있는 자바스크립트
name id를 가지고 있는 곳에서 입력하면 uid의 name과 일치하는 것들이 나타난다.
이때 해당하는 것을 선택하면 result 함수를 호출하게 된다.
여기서 필요한 작업을 하면 끝.
참조 url : http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/
우선 사용하고자 하는 페이지의 자바스크립트
$('#name').autocomplete(uid, {
minChars: 1,
width: 210,
max: 50,
matchContains: true,
autoFill: false,
formatItem: function(row, i, max) {
return i + "/" + max + ": \"" + row.name + "\" [" + row.to + "]";
},
formatMatch: function(row, i, max) {
return row.name + " " + row.to;
},
formatResult: function(row) {
return row.name;
}
});
$('#name').result(function(event, row, formatted) {
$('#to').val(row.to);
});
uid가 있는 자바스크립트
var uid = [
{ name: "Peter Pan", to: "peter@pan.de" },
{ name: "Molly", to: "molly@yahoo.com" },
{ name: "Forneria Marconi", to: "live@japan.jp" },
{ name: "Master Sync", to: "205bw@samsung.com" },
{ name: "Dr. Tech de Log", to: "g15@logitech.com" },
{ name: "Don Corleone", to: "don@vegas.com" },
{ name: "Mc Chick", to: "info@donalds.org" },
{ name: "Donnie Darko", to: "dd@timeshift.info" },
{ name: "Quake The Net", to: "webmaster@quakenet.org" },
{ name: "Dr. Write", to: "write@writable.com" }
];
name id를 가지고 있는 곳에서 입력하면 uid의 name과 일치하는 것들이 나타난다.
이때 해당하는 것을 선택하면 result 함수를 호출하게 된다.
여기서 필요한 작업을 하면 끝.
참조 url : http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/
2010년 11월 30일 화요일
php soap
lighttpd냐 nginx냐 고민하다가 lighttpd로 결정했다. 이유는 nginx는 사용해 보지 않아서...
lighttpd + php5.2 + pear soap으로 서비스를 하는데 pear soap에서 complex type 선언할때
방법을 찾는데 좀 헤맸다.
요런식으로 선언하면 c# 에서는 StringOfHello 로 받아서 처리하면된다. 편하다 -_-;
lighttpd + php5.2 + pear soap으로 서비스를 하는데 pear soap에서 complex type 선언할때
방법을 찾는데 좀 헤맸다.
$this->__dispatch_map['hello'] = array( 'in' => array('name' => 'string'), 'out' => array('ret' => '{'.$this->__ns.'}ArrayOfIHello'));
$this->__typedef['{'.$this->__ns.'}StringOfHello'] = array( 'a' => 'int', 'b' => 'string', 'c' => 'string', 'd' => 'string', 'e' => 'string' );
$this->__typedef['{'.$this->__ns.'}ArrayOfHello'] = array(array('StringOfHello'=>'{'.$this->__ns.'}StringOfHello'));
요런식으로 선언하면 c# 에서는 StringOfHello 로 받아서 처리하면된다. 편하다 -_-;
aaa.StringOfHello[] strs = svr.hello(tname);
String[] temp = new String[5];
foreach (aaa.StringOfHello str in strs)
{
temp[0] = str.a.ToString();
temp[1] = str.b;
temp[2] = str.c;
temp[3] = str.d;
temp[4] = str.e;
// dataGridView1.Rows.Add(temp);
}
피드 구독하기:
글 (Atom)