로그인

이메일
비밀번호
DaeYoung's Blog : 위치로그 : 태그 : 방명록 : 관리자 : 새글쓰기
'java'에 해당되는 글 10건
Java 7 (or 1.7)
에서 oracle sysdate를 사용하여 현재 시간을 구하기 위하여
java.sql.Date를 사용하였다

select sysdate as time from dual

결과를 받아서
java.sql.Date을 사용하였는데 '년,월,일' 정보만 가지고 있어서
실제 필요한 시간 정보는 알수가 없었다

그래서 java.sql.Timestamp를 사용. 시간까지 알 수 있게 되었다
Timestamp ts = Timestamp.valueOf(result.get(0).get("time")

(상세 예제는 나중에 추가 하도록하자)

! java.sql.Date에서 시간정보를 알 수 없는 이유는 아래와 같다
public int getHours()
Deprecated. 
This method is deprecated and should not be used because SQL Date values do not have a time component.
( 대략 - 이 방법은 더 이상 사용되지 않으며 SQL Date 값은 시간 컴퍼넌트를 가지지 않기 때문에, 사용하지 말아주세요.)
원문 참조
http://docs.oracle.com/javase/7/docs/ap ··· gethours()
http://laedu.net/trackback/39
From. Where To Buy Single Quest Bars 2014년 10월 06일 13시 12분Delete / Modify
Where To Buy Single Quest Bars
DaeYoung's Blog ::
From. quest protein bars 2014년 10월 07일 11시 47분Delete / Modify
quest protein bars
DaeYoung's Blog ::
From. quest protein bars 2014년 10월 10일 03시 50분Delete / Modify
quest protein bars
DaeYoung's Blog ::

인터넷 예제는 대부분 XPath로 구현 되어 있어
Eclisp에서 사용하니 XPath 로 표시되는게 아닌가

JDOM2가 되면서 XPath 를 반대하기 시작했다(뭔소리??)
원문: JDOM API http://www.jdom.org/docs/apidocs/org/jd ··· ath.html
Class XPath
Deprecated. Use XPathFactory/XPathExpression/XPathBuilder instead.

어 정말이네. XPathFactory에 가보면 더 이상 확장 안한다고 한다
원문:JDOM API http://www.jdom.org/docs/apidocs/org/jd ··· ory.html
Class XPathFactory
JDOM does not extend the core Java XPath API (javax.xml.xpath.XPath).

그럼 XPath 대신 XPathFactory, XPathExpression 쓰기로 하고
다시 조사 시작


/**
  * XML Document에서 xPath에 해당 하는 모든Element을 반환한다.
  * @param doc
  * @param xPath (ex."/root/Items/Item")
  * @return List<Element>
  */
 public static List<Element> getElements(Document doc, String xPath) {
  XPathExpression<Element> compile = XPathFactory.instance().compile(
    xPath, Filters.element());
  return compile.evaluate(doc);
 }
/**
  * XML Document에서 xPath에 첫 번째Element을 반환한다.
  * @param doc
  * @param xPath
  * @return
  */
 public static Element getElement(Document doc,String xPath) {  
  org.jdom2.xpath.XPathExpression<Element> compile = XPathFactory.instance().compile(
    xPath, Filters.element());
  return compile.evaluateFirst(doc);
 }

/**
  * XML Document에서  xPath에 해당하는 Element의 Value를 변경한다.
  * @param doc
  * @param locationPath
  * @param value
  */
 public static void setXmlData(Document doc, String xPath,   String value) {

  try {  
   Element element = getElement(doc, xPath);
   if (element != null)
    element.setText(value);

  } catch (Exception e) {
   logger.debug("", e);
  }

 }

http://laedu.net/trackback/34
[Link] JavaDoc 한글 깨질때
Developer Tool/Eclipse, (2013년 10월 11일 15시 15분)

Eclispe로 JavaDoc을 만들려고 Export를 했는데
한글 깨짐이 발생하며 안 만들어 지더라 ㅜㅜ

검색을 했더니
http://blog.lul.kr/5
이분 블러그가 잘되어 있어 그대로 따라했더니 잘되었다. ㅎㅎ

핵심은
Project Properties에서 endcoding UTF-8 으로변경

사용자 삽입 이미지





















JavaDoc Generation Vm Oprtion 주기
-locale ko_KR -encoding UTF-8 -charset UTF-8 -docencoding UTF-8
사용자 삽입 이미지
사용자 삽입 이미지

http://laedu.net/trackback/33

요즘 JDOM으로 XML 파서를 만들고 있다
JDOM은 예제도 많아서 쉽게 될거라 생각했는데
시작부터

사용자 삽입 이미지
















org/jaxen/NamespaceContext 검색해 보니 JAXEN이 없단다.
확인해 보니 없네
(Maven 사용중이라 pom.xml 확인하였음)
사용자 삽입 이미지
























Jaxen을 추가해 보자
Maven Repository : http://mvnrepository.com/
(Maven 사용 하지 않을 경우 Jaxen.jar 다운 받아서 추가해 보자)
사용자 삽입 이미지



















Eclispe
사용자 삽입 이미지



















이제 Build하여 실행

음 잘되는구만 ㅎㅎ

http://laedu.net/trackback/32
Eclipse를 사용하다보면 강제 종료후 다시 실행할때
Failed to create the Java Virtual Machine 라는 오류가 발생할때가 있다

이럴때 Eclipse 폴더에 들어가서 eclipse.ini를 수정하면 된다
-Xmx512m
=>  -Xmx256m

http://laedu.net/trackback/31
DaeYoung's Blog 블로그에 오신것을 환영해요^^
웹기반 프로그래밍에 관한 것들을 모을 예정이었는데..
«   2024년 10월   »
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
Javax.mail 참고 사이트.
C# TextBox KeyDown, KeyPr...
SID가 여러개 있을때 'ORA...
https://scrapingmaster.blogg...
https://scrapingmaster.blogg.. 2023년
expertdecoders.com.
expertdecoders.com 2023년
expertdecoders.
expertdecoders 2023년
best decaptcha service.
best decaptcha service 2023년
capcher.
capcher 2023년
129
104
1023667