티스토리 툴바


Posted by jjongz

트랙백 주소 :: http://jjongz.tistory.com/trackback/88 관련글 쓰기

댓글을 달아 주세요

Understanding JDBC Metadata

http://members.aol.com/kgb1001001/Articles/JDBCMetadata/JDBC_Metadata.htm



Common SQL Types--Standard Retrieval Methods
SQL Type Java Method
BIGINT getLong()
BINARY getBytes()
BIT getBoolean()
CHAR getString()
DATE getDate()
DECIMAL getBigDecimal()
DOUBLE getDouble()
FLOAT getDouble()
INTEGER getInt()
LONGVARBINARY getBytes()
LONGVARCHAR getString()
NUMERIC getBigDecimal()
OTHER getObject()
REAL getFloat()
SMALLINT getShort()
TIME getTime()
TIMESTAMP getTimestamp()
TINYINT getByte()
VARBINARY getBytes()
VARCHAR getString()



SQL3 Types--Retrieval Methods
SQL Type Java Method
ARRAY getArray()
BLOB getBlob()
CLOB getClob()
DISTINCT getUnderlyingType()
REF getRef()
STRUCT (castToStruct)getObject()
JAVA_OBJECT (castToObjectType)getObject()
Posted by jjongz

트랙백 주소 :: http://jjongz.tistory.com/trackback/82 관련글 쓰기

댓글을 달아 주세요

http://www.openjs.com/scripts/events/keyboard_shortcuts/
Posted by jjongz

트랙백 주소 :: http://jjongz.tistory.com/trackback/81 관련글 쓰기

댓글을 달아 주세요

Template Engine

분류없음 2007/10/14 09:27
정의
http://en.wikipedia.org/wiki/Template_engine_%28web%29

freemaker
http://freemarker.sourceforge.net/


velocity
http://velocity.apache.org/

java source code generation suite based on Velocity
http://www.dishevelled.org/codegen/




JDT

Java model

The Java model is the set of classes that model the objects associated with creating, editing, and building a Java program. The Java model classes are defined in org.eclipse.jdt.core.  These classes implement Java specific behavior for resources and further decompose Java resources into model elements.

Java elements

The package org.eclipse.jdt.core defines the classes that model the elements that compose a Java program. The JDT uses an in-memory object model to represent the structure of a Java program. This structure is derived from the project's class path. The model is hierarchical. Elements of a program can be decomposed into child elements.

Manipulating Java elements is similar to manipulating resource objects.  When you work with a Java element, you are actually working with a handle to some underlying model object.  You must use the exists() protocol to determine whether the element is actually present in the workspace.

The following table summarizes the different kinds of Java elements.

Element Description
IJavaModel Represents the root Java element, corresponding to the workspace. The parent of all projects with the Java nature. It also gives you access to the projects without the java nature.
IJavaProject Represents a Java project in the workspace. (Child of IJavaModel)
IPackageFragmentRoot Represents a set of package fragments, and maps the fragments to an underlying resource which is either a folder, JAR, or ZIP file. (Child of IJavaProject)
IPackageFragment Represents the portion of the workspace that corresponds to an entire package, or a portion of the package. (Child of IPackageFragmentRoot )
ICompilationUnit Represents a Java source (.java) file. (Child of IPackageFragment )
IPackageDeclaration Represents a package declaration in a compilation unit. (Child of ICompilationUnit )
IImportContainer Represents the collection of package import declarations in a compilation unit. (Child of ICompilationUnit )
IImportDeclaration Represents a single package import declaration. (Child of IImportContainer )
IType Represents either a source type inside a compilation unit, or a binary type inside a class file.
IField Represents a field inside a type. (Child of IType )
IMethod Represents a method or constructor inside a type. (Child of IType )
IInitializer Represents a static or instance initializer inside a type. (Child of IType )
IClassFile Represents a compiled (binary) type.  (Child of IPackageFragment )
ITypeParameter Represents a type parameter.  (Not a child of any Java element, it is obtained using IType.getTypeParameter(String) or IMethod.getTypeParameter(String))
ILocalVariable Represents a local variable in a method or an initializer.  (Not a child of any Java element, it is obtained using ICodeAssist.codeSelect(int, int))

All Java elements support the IJavaElement interface.

Some of the elements are shown in the Packages view.  These elements implement the IOpenable interface, since they must be opened before they can be navigated. The figure below shows how these elements are represented in the Packages view.

Packages View showing elements implementing the IOpenable interface

The Java elements that implement IOpenable are created primarily from information found in the underlying resource files.  The same elements are represented generically in the resource navigator view.

Resource Navigator showing elements implementing the IOpenable interface

Other elements correspond to the items that make up a Java compilation unit. The figure below shows a Java compilation unit and a content outliner that displays the source elements in the compilation unit.

An editor and a content outliner illustrating the relation between corresponding source elements

These elements implement the ISourceReference interface, since they can provide corresponding source code. (As these elements are selected in the content outliner, their corresponding source code is shown in the Java editor).



Manipulating Java code

The first snippet is the generated output:

	package example;
	import java.util.*;
	public class HelloWorld {
		public static void main(String[] args) {
			System.out.println("Hello" + " world");
		}
	}

The following snippet is the corresponding code that generates the output.

AST ast = new AST();
CompilationUnit unit = ast.newCompilationUnit();
PackageDeclaration packageDeclaration = ast.newPackageDeclaration();
packageDeclaration.setName(ast.newSimpleName("example"));
unit.setPackage(packageDeclaration);
ImportDeclaration importDeclaration = ast.newImportDeclaration();
QualifiedName name = 
	ast.newQualifiedName(
		ast.newSimpleName("java"),
		ast.newSimpleName("util"));
importDeclaration.setName(name);
importDeclaration.setOnDemand(true);
unit.imports().add(importDeclaration);
TypeDeclaration type = ast.newTypeDeclaration();
type.setInterface(false);
type.setModifiers(Modifier.PUBLIC);
type.setName(ast.newSimpleName("HelloWorld"));
MethodDeclaration methodDeclaration = ast.newMethodDeclaration();
methodDeclaration.setConstructor(false);
methodDeclaration.setModifiers(Modifier.PUBLIC | Modifier.STATIC);
methodDeclaration.setName(ast.newSimpleName("main"));
methodDeclaration.setReturnType(ast.newPrimitiveType(PrimitiveType.VOID));
SingleVariableDeclaration variableDeclaration = ast.newSingleVariableDeclaration();
variableDeclaration.setModifiers(Modifier.NONE);
variableDeclaration.setType(ast.newArrayType(ast.newSimpleType(ast.newSimpleName("String"))));
variableDeclaration.setName(ast.newSimpleName("args"));
methodDeclaration.parameters().add(variableDeclaration);
org.eclipse.jdt.core.dom.Block block = ast.newBlock();
MethodInvocation methodInvocation = ast.newMethodInvocation();
name = 
	ast.newQualifiedName(
		ast.newSimpleName("System"),
		ast.newSimpleName("out"));
methodInvocation.setExpression(name);
methodInvocation.setName(ast.newSimpleName("println")); 
InfixExpression infixExpression = ast.newInfixExpression();
infixExpression.setOperator(InfixExpression.Operator.PLUS);
StringLiteral literal = ast.newStringLiteral();
literal.setLiteralValue("Hello");
infixExpression.setLeftOperand(literal);
literal = ast.newStringLiteral();
literal.setLiteralValue(" world");
infixExpression.setRightOperand(literal);
methodInvocation.arguments().add(infixExpression);
ExpressionStatement expressionStatement = ast.newExpressionStatement(methodInvocation);
block.statements().add(expressionStatement);
methodDeclaration.setBody(block);
type.bodyDeclarations().add(methodDeclaration);
unit.types().add(type);
Posted by jjongz

트랙백 주소 :: http://jjongz.tistory.com/trackback/80 관련글 쓰기

댓글을 달아 주세요

  1. BlogIcon ass cum swallow 2008/03/13 05:42  댓글주소  수정/삭제  댓글쓰기

    너는 아름다운 웹사이트가 있는다!

2007/03/20

A : That was quite a storm last night.
B : Well, We need the rain.
A : Crazy weather, It's so unpredictable.
B : Oh, it's not so bad.
A : There're report up hail the size of golf ball.
B : Hail?, This time of year.
A : Look out side if you don't believe me.
B : Oh, my pool litte tulips. what a crazy weather.
Posted by jjongz

트랙백 주소 :: http://jjongz.tistory.com/trackback/76 관련글 쓰기

댓글을 달아 주세요

11 week : Sickness

2007/03/12
A : Good morning.
B : What's good about it.
A : Something Happen?
B : Stinky is sick.
A : No. Is she going to be okay?
B : My vet(veterinarian) says she has Fifty-Fifty chance of making it.
A : You must be so worried.
B : Look! she stretching.
A : I think she will be fine.

2007/03/13
A : I'm Homesick. I miss my family and my friends. ( Home is where the heart is.. )
B : Hey, I'm a friend.
A : Yes, You are.
B : I have the opposite problem. I'm sick of my home. No one appreciates me.
A : I appreciate you.
B : You do.
A : Of course.

2007/03/14
A : Have you been under any stress lately.
B : Well, No more than usual.
A : Did you drink coffee.
B : Oh yes, I love coffee.
A : How many cups a day?
B : I don't know. maybe eight.
A : That could be the problem. try to cut down.
B : I don't know If I can? I drink to relax.

Posted by jjongz

트랙백 주소 :: http://jjongz.tistory.com/trackback/74 관련글 쓰기

댓글을 달아 주세요

  1. BlogIcon vintage guitar amp 2008/05/23 04:17  댓글주소  수정/삭제  댓글쓰기

    많은 감사 위치! 우수한 나는 너의.

  2. BlogIcon playboy collectables 2008/05/23 04:45  댓글주소  수정/삭제  댓글쓰기

    정말 같지 않는 블로그!


영문

Sun에서 제공하는 Overview

http://java.sun.com/j2se/1.5.0/docs/guide/language/index.html
 
간단하지만 한눈에 들어오는 PPT 제일 먼저 보자.
http://java.sun.com/j2se/1.5/pdf/Tiger-lang.pdf 

한글
http://www.dev2dev.co.kr/pub/a/2005/12/java_5_features.jsp
블로그에서 찾은 글(Generics에 대해 좀더 자세한 내용)
http://blog.naver.com/sleepman0408?Redirect=Log&logNo=20022946224


ppt 내용중.. 감동적인.. 소스..

public class Freq {
    private static final Integer ONE = new Integer(1);
    public static void main(String[] args) {
        // Maps word (String) to frequency (Integer)
        Map m = new TreeMap();
        for (int i=0; i<args.length; i++) {
            Integer freq = (Integer) m.get(args[i]);
            m.put(args[i], (freq==null ? ONE :
            new Integer(freq.intValue() + 1)));
        }
    System.out.println(m);
    }
}

거지 같은 자바 소스가... 이렇게 깔끔하게 바꼈네요..

    public class Freq {
    public static void main(String[] args) {
        Map<String, Integer> m = new TreeMap<String, Integer>();
        for (String word : args) {
            Integer freq = m.get(word);
            m.put(word, (freq == null ? 1 : freq + 1));
        }
        System.out.println(m);
    }
}
Posted by jjongz
TAG Java

트랙백 주소 :: http://jjongz.tistory.com/trackback/73 관련글 쓰기

댓글을 달아 주세요

  1. BlogIcon goeasylife 2007/01/24 09:05  댓글주소  수정/삭제  댓글쓰기

    자바5 공부도 좀 해야 하는데 저번에 온라이스터디 참여 했다가 탈퇴 당하고.... 이제 시간이 좀 나시나 봐요 ^^

  2. 윤보람 2007/01/28 22:53  댓글주소  수정/삭제  댓글쓰기

    ㅋㅋ 제네릭이네요.. <> 이게 잘 느낌이 안오네요.
    그리고 Queue 클래스가 생긴것 같던데, 메소드는
    많지 않았던듯..

  3. BlogIcon 윤보람 2007/01/28 23:06  댓글주소  수정/삭제  댓글쓰기

    http://kwon37xi.egloos.com/2510988

    쿄쿄 저기 보시고, 저좀 알려주삼~!!

  4. BlogIcon extreme mini micro bikini 2008/05/23 04:55  댓글주소  수정/삭제  댓글쓰기

    나는 합의한다 너에 이다. 그것은 이렇게 이다.

php에서 디버깅 할때 많이 사용하는 echo 문을 리얼에 반영하기 전에 검수단계를 거치기 위해 필요하다.

\n\s[^\/\/]+\s*echo.*$

설명 : 뉴라인부터 // 이 없는 echo문장 찾기
Posted by jjongz

트랙백 주소 :: http://jjongz.tistory.com/trackback/72 관련글 쓰기

댓글을 달아 주세요

오랜만에 업데이트 되었다..

아직 완변하지는 않지만..

아쉬운데로 충분히 활용가능하다..

EBS 영어 청취목록

7:20 EASY ENGLISH
7:40 POWER ENGLISH
8:00 MORNING SPEICAL

http://rodream.net

Posted by jjongz
TAG EBS

트랙백 주소 :: http://jjongz.tistory.com/trackback/71 관련글 쓰기

댓글을 달아 주세요

  1. BlogIcon butthole gaping largest 2008/05/23 05:01  댓글주소  수정/삭제  댓글쓰기

    너는 위치가 우수한 있는다!

하루 8시간을 넘어 답답한 사무실에서 일을 하다보면 의욕도 떨어지고 집중력도 떨어져서 지금 무슨일을 하고 있었는지 잊어버리는 경우가 종종있다. 흐물흐물해진 몸과 머리에 산듯한 자극을 주고, 적극적인 직장생활을 위해 답답한 사무실을 벗어나자.

점심시간 식사를 하고 하루 30분 정도 산책을 한다. 좋은 경치과 좋은 사람과 부담없는 대화로 즐거운 시간을 보내면 보다 집중력있는 일처리가 가능하다.

저랑 walking mate 하실분... 손!! ^^;

구글에서도??
http://googlekoreablog.blogspot.com/2006/04/google-weekly-walk.html

Posted by jjongz
TAG 산책

트랙백 주소 :: http://jjongz.tistory.com/trackback/69 관련글 쓰기

댓글을 달아 주세요

  1. BlogIcon coordinator 2006/11/28 09:10  댓글주소  수정/삭제  댓글쓰기

    저요!! 어디서 할까요?

  2. BlogIcon jjongz 2006/11/28 21:40  댓글주소  수정/삭제  댓글쓰기

    에궁~!! 그때가 그립네요.. 쪼금만 기다리세요~!! 다시 한번 같이 일해봅시다~!! ^^;