Skip to content

Instantly share code, notes, and snippets.

View arahansa's full-sized avatar

arahansa arahansa

  • Seoul, South Korea
View GitHub Profile
@arahansa
arahansa / NewParser.java
Last active August 29, 2015 14:27
mybatis xml statement reader for making html form
package testDate;
import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@arahansa
arahansa / ClassInfoGenerator.java
Created August 23, 2015 02:38
Java Class Reader for making jstl statement and request information.
package test;
import java.lang.reflect.Field;
public class ClassInfoGenerator {
public static void main(String[] args) {
// first parameter : Target Class name
// second parameter : variable name
ClassInfoGenerator.showMsg(Article.class, "article");
}
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html ng-app="testApp">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Happy coding : Angular</title>
<style>
div.reply { margin-bottom: 10px; }
</style>
@arahansa
arahansa / PagingInfo.java
Last active September 7, 2015 23:12
Pagination helper for Mysql... (exception is not implemented yet)
package test;
import java.util.Arrays;
public class PagingInfo {
private static final int ARTICLE_PER_PAGE = 10;
private static final int PAGE_LIST_SIZE = 10;
// Spring Data Page Object variables
function caculateLimitDay(elaspedDay){
//parseInt("10")
var today = new Date();
var t = new Date(today);
t.setDate(today.getDate()+elaspedDay);
var text = t.getFullYear() + "."+(t.getMonth() + 1) + "." + t.getDate() +" " + t.getHours() +":"+t.getMinutes()+"까지";
return text;
}
@arahansa
arahansa / google_login_sample.html
Created September 17, 2015 02:22
구글 소셜 로그인 실험
<span id="signinButton">
<span
class="g-signin"
data-callback="signinCallback"
data-clientid="제 클라이언트 아이디 넣는 곳입니다. "
data-cookiepolicy="single_host_origin"
data-requestvisibleactions="http://schemas.google.com/AddActivity"
data-scope="https://www.googleapis.com/auth/plus.login">
</span>
@arahansa
arahansa / cut_won.js
Created September 21, 2015 03:42
javascript 원단위 절사 연습
var lastStaus = false;
function myFunction(){
console.log("체인지");
var currentMoney = $("#criteria").val();
if (currentMoney % 100 != 0 ){
alert("100원 단위로 돈을 입력하셔야 합니다");
lastStaus = false;
return false;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>linenumber</title>
<script src="https://code.jquery.com/jquery-1.11.3.js"></script>
<script>
$(function(){
$("#changeBtn").click(function() {
var source = $("#source").val();
public class ArahanThreadExecutor {
public static void main(String[] args) throws InterruptedException, ExecutionException {
ExecutorService executor = Executors.newFixedThreadPool(1);
Future taskTwo = executor.submit(new ArahansaThread("TaskTwo", 4));
System.out.println("waiting...시작 !?");
//============================
if(taskTwo.get() == null) {
System.out.println(" 태스크가 종료되었다. ");
} else {
@arahansa
arahansa / image_upload.html
Created November 23, 2015 10:29
이미지 업로드 테스트
<!DOCTYPE html>
<html ng-app="app">
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
</head>
<body>