May 31, 2012 - Ext Js 에서 text 는 중앙정렬, 컬럼내용은 좌우정렬하는 방법

text : '<span style="padding: 0px 0px 0px 60px">Country Name</span>',
width : 200, 
align : 'left',
sortable : true,
dataIndex: 'SHORT_COUNTRY_NM'

기존에는 이런식으로 중앙 좌측 정렬인데 중앙 정렬을 하기 위해서는 text 안에 옵션을 주었다. 이게 엄청나게 짜증이 난다. 1px 단위로 수정하고나서 실제로 변경되었는지 확인해야하기 때문이다.

그런데 이 방법이 말고, text는 중앙정렬이 되면서, 컬럼안에 들어있는 값은 좌측, 우측으로 정렬이 가능한 방법이 있었다.

바로

style: 'text-align:center'

을 주는 방법이었다.

text : 'Country Name',
style : 'text-align:center',
width : 200, 
align : 'left',
sortable : true,
dataIndex: 'SHORT_COUNTRY_NM'

그렇게 되면 정상적으로 “Country Name”이라는 헤더값이 중앙정렬이 되면서, 출력되는 컬럼값들은 전부 좌측정렬이 된다.

May 29, 2012 - RestLet (RestFul) 에서 헤더값을 대소문자

출처 : http://www.restlet.org/documentation/2.0/jse/api/org/restlet/util/Series.html

String getFirstValue(String name, boolean ignoreCase) Returns the value of the first parameter found with the given name. String getFirstValue(String name, boolean ignoreCase, String defaultValue) Returns the value of the first parameter found with the given name. String getFirstValue(String name, String defaultValue) Returns the value of the first parameter found with the given name.

getFirstValue(String name, boolean ignoreCase)

import org.restlet.data.Form;
Form headers = new Form();
headers.add("test", "test입니다.");
System.out.println(headers.getFirstValue("Test",true));

결론 : test입니다.

getFirstValue(String name, boolean ignoreCase, String defaultValue)

 import org.restlet.data.Form;
 Form headers = new Form();
 headers.add("test", "test입니다.");
 System.out.println(headers.getFirstValue("Test",false));

결론 : null

getFirstValue(String name, String defaultValue)

import org.restlet.data.Form;
Form headers = new Form();
headers.add("test", "test입니다.");
System.out.println(headers.getFirstValue("Test",false, "test입니까?"));

결론 : test입니까?

만약 대소문자를 구분하려고 하면 false, 대소문자를 구분하지 않기 위해서는 true를 설정하면 됩니다.

May 14, 2012 - IMP-00013: DBA만이 다른 DBA가 엑스포트한 파일을 임포트할 수 있습니다

Import: Release 11.1.0.6.0 - Production on 월 5월 14 11:21:47 2012
Copyright (c) 1982, 2007, Oracle.  All rights reserved. 

다음에 접속됨: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

엑스포트 파일은 규정 경로를 거쳐 EXPORT:V10.02.01 에 의해 생성되었습니다

IMP-00013: DBA만이 다른 DBA가 엑스포트한 파일을 임포트할 수 있습니다
IMP-00000: 임포트가 실패로 끝났습니다

Export 시에 시스템권한까지 포함하여 익스포트를 한 경우 임포트 대상도 시스템권한이 부여되어야합니다.

보통은 Grant connect, resource to DB_ID 로 권한을 부여해주는데 DBA권한을 추가해주기 위해서 한가지 조건을 더 붙입니다.

GRANT CONNECT, RESOURCE, DBA TO DB_ID

이렇게 할 경우 정상적으로 임포트가 가능합니다. 익스포트할때 시스템권한으로 익스포트하지 않는게 가장 중요하겠지만요.