jsp jquery 해당 테이블의 tr개수 (로우수) 구하기

$("#tablename tr").length 테이블의 tr 개수가 나옴 로우수 구할때 사용

이클립스 네비게이터에 SVN label 표시하기

이미지
* 네비게이터에 SVN 정보 표시하기 Window > Preferences > General > Label Decorations > SVN 체크 * 네비게이터에 원하는 문자열로 SVN label 표시하기 Window > Preferences > Team > SVN > Label Decorations > Text Decorations > Outgoing flag > 지정

오라클 DB 특정 컬럼의 특정 값만 카운트 하는 법

이미지
decode함수나 case when함수 둘중 선택해서 사용 select  count(decode(a.tmp, 0, 1)) as cnt_0 --a.tmp의 값이 0일 경우 카운트 , count(decode(a.tmp, 1, 1)) as cnt_1 --a.tmp의 값이 1일 경우 카운트 , count(decode(a.tmp, 2, 1)) as cnt_2 --a.tmp의 값이 1일 경우 카운트 from table a where (where절 필요 시 사용) group by (그루핑 필요 시 사용) 결과값은 이런식으로 나옴

jsp 오늘 날짜 세팅하기

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page import ="java.util.*,java.text.SimpleDateFormat"%> <% SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd"); Date startDate = new Date(); String sDate = sf.format(startDate); %> <script type="text/javascript"> var today = "<%=sDate%>"; alert("오늘 날짜는 "+today); </script>

jsp submit에 들어가는 readonly

input 태그의 text type을 사용할 때 읽을 수 만 있도록 하는 기능중에 disabled가 있는데 이 속성은 submit 시에 값이 넘어가지 않는다. 이 때 readonly="readonly" 를 넣어주면 입력은 막아지고 값도 넘어간다. 예) <input type="text" value="테스트" readonly="readonly" />

java 구분자(split)로 구별해서 LIST에 넣어주기

public static ArrayList convertStrToArr(String str) { String[] item = str.split(","); ArrayList arrItem = new ArrayList(); if(str!=null && !str.equals("") ) { if(str.lastIndexOf(",")!=-1) { for(int i=0;i<item.length;i++){ arrItem.add(item[i]); } } else { arrItem.add(str); } } return arrItem; }

input 라디오 선택된 값 가져오기

$("input:radio[name=라디오name]:checked").val();