Jquery returns its length even though it hasn't created yet.
$("#id").length = 0 means there's no element for '#id'
if($("#id").length > 0 ) {
// to do something...
}
2009년 7월 29일 수요일
how to exit from each loop - jQuery
"If you wish to break the each() loop at a particular iteration you can do so by making your function return false. Returning non-false is the same as a
$("#element-name").each(function(i){
if(this.val() == ''){
alert("null");
return false;
}
});
if jQuery is surrounded by another function, how can you do it?
i.e
function test() {
$("#element-name").each(function(i){
if(this.val() == ''){
alert("null");
return false;
}
});
// do something more
}
probably you can't avoid below logic.
Any idea to exit at once from whole function?
continue
statement in a for loop, it will skip "$("#element-name").each(function(i){
if(this.val() == ''){
alert("null");
return false;
}
});
if jQuery is surrounded by another function, how can you do it?
i.e
function test() {
$("#element-name").each(function(i){
if(this.val() == ''){
alert("null");
return false;
}
});
// do something more
}
probably you can't avoid below logic.
Any idea to exit at once from whole function?
2009년 7월 28일 화요일
Add this to context.xml
Resource name="poolname" auth="Container"
type="oracle.jdbc.pool.OracleDataSource"
factory="oracle.jdbc.pool.OracleDataSourceFactory"
connectionCachingEnabled="true"
user="DB" password="DB"
driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@192.168.100.1:1521:ORCL"
removeAbandoned="true"
removeAbandonedTimeout="30"
maxActive="20"
maxIdle="10" maxwait="-1"
Resource name="poolname" auth="Container"
type="oracle.jdbc.pool.OracleDataSource"
factory="oracle.jdbc.pool.OracleDataSourceFactory"
connectionCachingEnabled="true"
user="DB" password="DB"
driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@192.168.100.1:1521:ORCL"
removeAbandoned="true"
removeAbandonedTimeout="30"
maxActive="20"
maxIdle="10" maxwait="-1"
getting Eclipse console encoding
If you got any problem on console message.
Add this to xxx.ini file.
I hope this will help you.
-Dfile.encoding=UTF-8
Add this to xxx.ini file.
I hope this will help you.
-Dfile.encoding=UTF-8
2009년 7월 21일 화요일
cvs 관리
*** create new account
1. log in as a admin
c:\> set cvsroot=:pserver:administrator@127.0.0.1/repo_name
c:\>cvs login
2. Create
c:\>cvs passwd -r admin_account -a new_name
3. try to log in with new account
c:\>set cvsroot=:pserver:new_name@127.0.0.1/repo_name
c:\>cvs login
**Delete account
1.log in with admin account
c:\>cvs login
c:\>cvs passwd -X account_name
* replace password
1.log in with admin or account
c:\>cvs login
c:\>cvs passwd user_name
1. log in as a admin
c:\> set cvsroot=:pserver:administrator@127.0.0.1/repo_name
c:\>cvs login
2. Create
c:\>cvs passwd -r admin_account -a new_name
3. try to log in with new account
c:\>set cvsroot=:pserver:new_name@127.0.0.1/repo_name
c:\>cvs login
**Delete account
1.log in with admin account
c:\>cvs login
c:\>cvs passwd -X account_name
* replace password
1.log in with admin or account
c:\>cvs login
c:\>cvs passwd user_name
2009년 7월 9일 목요일
SVN + android + code.google.com
피드 구독하기:
글 (Atom)