Skip to content

Instantly share code, notes, and snippets.

@RequestMapping(value="/member/insert", method=RequestMethod.GET)
@RequestMapping(value="/member/insert", method=RequestMethod.POST)
@springcome
springcome / RssBean.java
Last active December 26, 2015 02:29
RSSReader, java
// Bean
public class RssBean {
private String title;
private String description;
private String link;
public String getTitle() {
return title;
}
public void setTitle(String title) {
@springcome
springcome / rank.sql
Created October 21, 2013 02:09
rank(), oracle
-- RANK
-- 순위를 정할때 같은값이 있을경우 같은 RANK값을 가지게 된다.
-- 다음 랭크는 중복된 값을 건너뛰게된다.
-- EX ) 1, 2, 2, 4, 4, 6
SELECT MEMBER_ID, MEMBER_NAME, MEMBER_GROUP_CODE
, RANK() OVER (ORDER BY MEMBER_SEQ DESC) AS RANK
FROM MEMBER
-- DENSE_RANK
-- 순위를 정할때 같은값이 있을경우 같은 RANK값을 가지게 된다.
@springcome
springcome / merge.sql
Created October 21, 2013 01:47
merge into, oracle
MERGE INTO MEMBER M
USING DUAL
-- 업데이트를 할것인지 인서트를 할것인지의 조건
ON (M.MEMBER_ID = ?)
WHEN MATCHED THEN
-- 조건에 맞으면 업데이트
UPDATE SET MEMBER_UPDATE = ?
WHEN NOT MATCHED THEN
-- 조건에 맞지 않으면 인서트
INSERT (
@springcome
springcome / ckeditor_base_style.js
Created October 21, 2013 00:45
CKEditor Base Style
CKEDITOR.replace('textarea', {
width : '100%',
height : '100px',
toolbar : [
[ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink' ],
[ 'FontSize', 'TextColor', 'BGColor' ]
]
});
@springcome
springcome / json.js
Created October 18, 2013 02:27
json, jquery
// json객체를 문자열로 변환
$.toJSON(object);
// json배열을 만들어 데이터 넣기
var jsonArr = {'info':[]};
jsonArr.info.push(
{'name':'kim'},
{'age':26}
);
jsonArr.info.push(
@springcome
springcome / not.js
Created October 18, 2013 02:21
.not, jquery
// selector를 사용할때 원하지 않는 요소를 빼는 방법으로 사용한다.
// type이 button, image를 제외한 요소를 알고자 할때는
$('#contents').not('[type=button],[type=image]').each(function(){
console.log($(this).val());
});
// input에 disabled가 아닌 요소만 알고자 할때
$('#contents').not(':input:disabled').each(function(){
console.log($(this).val());
@springcome
springcome / change.html
Created October 18, 2013 02:15
.change, jquery
<select id="selectId">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
@springcome
springcome / radio.html
Created October 18, 2013 02:11
radio, jquery
<input type="radio" name="rdo" value="1">1번
<input type="radio" name="rdo" value="2">2번
<input type="radio" name="rdo" value="3">3번
@springcome
springcome / select.html
Created October 18, 2013 02:01
select, jquery
<select name="selectName" id="selectId">
<option value="1">1번</option>
<option value="2">2번</option>
<option value="3">3번</option>
</select>