Skip to content

Instantly share code, notes, and snippets.

View seaofnight's full-sized avatar

kim youngjin seaofnight

  • 경기도 용인시 어딘가에 거주함.
View GitHub Profile
@seaofnight
seaofnight / simple_builder_patten.java
Last active August 29, 2015 14:21
builder patten
package simple.examples;
public class Person{
private final String lastName;
private final String firstName;
private final boolean isHomewOwner;
public Person(
@seaofnight
seaofnight / gist:cbda16b111229bc11002
Created May 15, 2015 05:08
jquery validater dynamic message
//excel 일경우 조회 조건이 1개월 미만
//그냥 조회일경우 조회조건이 15일
f = $('form#form');
f.validate({
rules:{
startDate :{required:true, dateCheck:[$('#startDate'),$('#endDate'),$('#isExcel')]}
},
messages:{
@seaofnight
seaofnight / test.jsp
Last active August 29, 2015 14:20
simple jquery validater example
<html>
<head>
<title>test</title>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/jquery.validate.min.js"></script>
<script>
$(function(){
$("#form").validate({
rules: {
name: {
@seaofnight
seaofnight / pom.xml
Created April 30, 2015 07:18
spring validater with out model class
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.1.0.Final</version>
</dependency>
@seaofnight
seaofnight / pageUtil.java
Created April 30, 2015 07:07
java bbs pageer example
package org.seaofnight.common.util;
import java.util.Map;
public class pageUtil {
public static void pager(Map param){
int curNo = 1;
int totCnt = 0;
int perRecord = 10;
@seaofnight
seaofnight / pom.xml
Last active August 29, 2015 14:20
apache httpCompont Example with ssl
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.1.1</version>
</dependency>
@seaofnight
seaofnight / test.java
Last active August 29, 2015 14:20
thread pool Executor simple Example
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
public class test {
BlockingQueue<model> model;
boolean flag = true;
@seaofnight
seaofnight / controller.java
Created April 30, 2015 06:33
junit4 unit Test with spring single controller
package com.cas.test.main;
import org.json.simple.JSONObject;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.MockitoAnnotations;
import org.springframework.http.HttpHeaders;
import org.springframework.test.context.ContextConfiguration;
@seaofnight
seaofnight / applicationContext.xml
Created April 30, 2015 06:13
simple Spring MVC Source
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">