본 내용은 정확하지 않을 수 있으며, 어디까지나 제 생각에 의해 정리된 내용입니다.

 

SUN 에서 언급한 string Buffer(http://java.sun.com/j2se/1.4.2/docs/api/java/lang/StringBuffer.html)의 내용을 대충 살펴보자면, String Buffer는 가변성 문자열로 String과 비슷하지만 변경이 가능하며, String Buffer에 포함된 Method를 호출 함으로써 어느 지점의 문자열이든 변경 할 수 있다고 하네요. 또한 쓰레드 상에서 안전하다는 언급이 되어있습니다.

 

.............생략…………….

 

StringBufferappendinsert methods는 어떠한 데이터 타입도 수용가능 하도록 오버로드 되어있으며, 또한 효과적으로 데이터를 String으로 컨버터에서 String Buffer로 보낸다고 합니다. Append메소드는 문자열을 Buffer끝에 추가하며, insert는 지정된 위치에 추가 합니다.

 

A string buffer implements a mutable sequence of characters. A string buffer is like a String, but can be modified. At any point in time it contains some particular sequence of characters, but the length and content of the sequence can be changed through certain method calls.

 

String buffers are safe for use by multiple threads. The methods are synchronized where necessary so that all the operations on any particular instance behave as if they occur in some serial order that is consistent with the order of the method calls made by each of the individual threads involved.

 

.............생략…………….

 

The principal operations on a StringBuffer are the append and insert methods, which are overloaded so as to accept data of any type. Each effectively converts a given datum to a string and then appends or inserts the characters of that string to the string buffer. The append method always adds these characters at the end of the buffer; the insert method adds the characters at a specified point.


 

 
 

그렇다면 String StringBuffer의 차이점은?

String은 불가변성으로 문자열을 저장하게 되면 특정 위치에 입력된 문자열만큼 메모리를 할당 받아 쓰게 됩니다.


StringBuffer
는 가변성으로 문자열을 저장하게 되면 특정 위치에 일정 크기의 메모리를 할당 받아 쓰게 됩니다.

 

, String에 의해서 저장된 문자열은 글에 대한 수정이 안되며 수정이 된다면 그것은 문자열만큼 다시 메모리를 할당 받아 쓰는 것입니다. 하지만 StringBuffer는 문자열이 입력될 때 마다 일정 부분만큼 메모리를 다시 할당 받아 그 글을 입력하게 됩니다.

 

간단히 요약 하자면 String에 의해서 만들어진 변수가 있다고 하면 글이 쓰일 때마다 입력된 글만큼 메모리를 끌어오지만 StringBuffer는 글자가 입력될 때마다 메모리 크기를 늘려간다. StringBuffer는 메모리 위치가 변경 되지 않지만 String은 글이 입력될 때마다 메모리 주소가 바뀐다는 정도로 설명 할 수 있겠다.

 

 

그렇다면 무엇이 더 효율적일까?

String StringBuffer는 건물을 새로 짓는지 아니면 규모를 키워 가는지로 보시면 됩니다. 즉 문자열의 크기가 작을 때는 둘 다 비슷합니다. 오히려 String이 빠를 가능성도 있습니다. 하지만 문자열이 계속 늘어나는 상황이라면 StringBuffer가 빠르다고 생각합니다.

그 이유는 “aaaaaaaaaa” 10자리의 문자열에 “aaaaaaaaaa” 다시 10자리를 붙이는 상황이라면 String 20개의 공간을 다시 잡아야 하지만 StringBuffer 10개의 공간만 늘리면 되기 때문입니다.

 

  

String str = “a”;       위치 1

Str += “b”;             위치 3

Str += “c”;             위치 11

Str += “d”;             위치 50

 

StringBuffer strbf = new StringBuffer();

Strbg.append(“a”);         위치 1

Strbg.append(“b”);         위치 1

Strbg.append(“c”);          위치 1

Strbg.append(“d”);          위1


위 내용 처럼, String은 변수에 내용이 저장될 때 마다 그만큼의 메모리를 받아오며 그때 마다 위치는 달라질 수 있다. 하지만 StringBuffer는 처음 위치에서 메모리 크기만을 늘려가면서 문자열을 더하게 된다.

  

Posted by 케사

 합격자 명단에 귀하의 이름이 없습니다.

충격 100% 막 공부하고 싶어 지지 않는가???

학창 시절 이걸 눈앞에 붙여놓고 있어야 했는데...

이 글은 스프링노트에서 작성되었습니다.

Posted by 케사

MBTI 성격테스트

Gossip 2008/10/20 23:40

사용자 삽입 이미지


학창시절 시험기간을 그렇게 싫어했는데, 취업 하려고 보니 적성검사, 직무검사 별의별 테스트가 다 있다. 물론 만만하게 취업 시켜주겠지 라는 생각은 안 했지만 학창시절에 보는 시험보다 저런 종류의 성격을 보는 테스트가 더 긴장된다.

시험이야 공부를 안 했어 라는 핑계 아닌 핑계가 통한다지만 성격 검사는 그런 핑계가 통할 것 같지도 않고 ㅡ.ㅡ; 태생이 이상한 놈으로 태어났다면 그렇게 평생 살아야 하는 것 아닌가…. 물론 맘먹고 내가 아닌 다른 녀석을 나 인양 문제를 푼다면 어떻게 될지 모르겠지만 그랬다가 진짜 이상한 놈, 또라이, 이런 식의 답이 나올 까봐 더 두렵다.

그래서 인터넷에 돌아다니는 성격 테스트 라는 프로그램을 받아서 실행해봤다. 결론부터 말하자면 미친 놈 쪽은 아닌 듯 하여 맘이 놓인다.^^;


신중하고 조용하며 집중력이 강하고 매사에 철저하며 사리분별력이 뛰어나다.
실제 사실에 대하여 정확하고 체계적으로 기억하며 일 처리에 있어서도 신중하며 책임감이 강하다. 집중력이 강한 현실감각을 지녔으며 조직적이고 침착하다. 보수적인 경향이 있으며, 문제를 해결하는데 과거의 경험을 잘 적용하며, 반복되는 일상적인 일에 대한 인내력이 강하다. 자신과 타인의 감정과 기분을 배려하며, 전체적이고 타협적 방안을 고려하는 노력이 때로 필요하다. 정확성과 조직력을 발휘하는 분야의 일을 선호한다. 즉 회계, 법률, 생산, 건축, 의료, 사무직, 관리직 등에서 능력을 발휘하며, 위기상황에서도 안정되어 있다.


* 일반적인 특성 *
 
오래된 조직을 좋아한다
부하직원을 부모와 자녀관계같이 돌보려고 한다
선입견이 강하다
친숙하지 않은 장소에 나서기를 주저한다
지나고 난 다음에 따지는 편이다
주어진 업무나 책임을 끝까지 완수한다
우리나라에서는 장남 같다, 장녀같다 라는 소리를 잘 듣는다
변화에 적응이 더디다
원리 원칙적이다
교통체증을 미리 계산해서 약속시간을 지킨다
이유없이 돌아다니지 않는다
대인관계 폭이 자꾸 좁아지고 대신 할 일이 늘어 난다
실수 한 것을 참지 못하고 즉각 수정하기를 원한다


* 개발해야할점 *
 
얼굴 표정이 변화가 없어서 사람들 처음 대할 때 힘들어 할 수 있기 때문에 먼저 말을 붙이고, 웃는 연습이 필요
평소에 꼭 필요한 말만하기 때문에 분위기를 썰렁하게 만들 수 있으므로 유머가 필요
공휴일에 집에 있기보다는 가족과 함께 나들이가 필요

남들이 속을 모른다라고 말함
틀에 박힌 규칙적인 일을 좋아한다
휴일에도 집에서 주로 지낸다
평소에 많이 참다가 폭발하면 상당히 무섭다
논리적, 합리적이지 않으면 인정하지 않음 웃음이 적다
반대성향을 지닌 사람과 처음에는 원만히 지내나 결국 멀어짐
잘못했다는 건 인정하면서도 미안하다, 잘못했다는 말을 잘 못한다
정리정돈을 해 놓는 것이 우선이다
직설적인 표현을 많이 하는 편이다

대체적으로 분석 내용은 맞는 것 같은데, 이런 거나 하고 있는 내가 참 우습다. 진짜 내 성격을 몰라서 이런 건지, 아님 고작 이런 작은 프로그램이 내 성격을 판단 해준 다는 게 대단해서 그런 건지ㅡㅡ; 어째든 그리 시간이 많이 걸리는 테스트는 아니니까 한번 해볼만 하다.
Posted by 케사

PHP VERSION
//1번째
while (list($key, $value) = each($HTTP_POST_VARS))
echo 'key=' . $key . ' value=' . $value . '<br>';

//2번째
foreach($_REQUEST as $key => $val) {
$_pass_var .= "&$key=$val";
}

//3번째
foreach( $_REQUEST as $key => $val ) { echo " $key .. $val <br> "; }
exit


JSP VERSION

Enumeration enum = request.getParameterNames();
while(enum.hasMoreElements()) {
   String key = (String)enum.nextElement();
    String value = request.getParameter(key);
    out.println(key + " : " + value+"<br>");
}

배열로 넘어온 값 보기 //checkbox나 폼에서 동일 fields 명으로 여러개를 보내면 배열로 넘어온다.
String test[] = request.getParameterValues("test");
if(test != null) {
    for(int i=0; i < test.length; i++) {
        out.println("test[" + i + "] : " + test[i] + "<br>");
    }
}


Posted by 케사

꽤나 오랫동안 블러그를 잊고 살았는데... 당분간 더 운영이 힘들듯 하네요.
개인적인 블러그... 꼭 즐겁고 좋은 일만 올리는곳은 아닌데...
항상 비슷한 날들의 연속이라...
조만간 좋은일 생기면 또^^ 열심히 포스팅 하겠죠.

휴~ 아자아자 힘내자.*.*!!!

Posted by 케사

사용자 삽입 이미지
South Korea’s President Lee Myung-bak and the U.S. President George W. Bush recently held a summit at the presidential retreat, Camp David in the U.S. The two leaders met three times during the venue. Lee and Bush covered the agenda of cooperation on North Korean policies, ratification of the Korea-U.S. free trade agreement(FTA), and the visa waiver program for South Koreans planning to visit the U.S. The summit took place under the basic assumption that the two nations will reinforce their alliance. Following the three rounds of talks, the two leaders issued a coordinate press release for Korean and U.S. reporters.

On the topic of North Korea, Lee told reporters that he made it clear that Seoul and Washington will resolve the issue only through dialogue. Korea and the U.S. will be working together closely within six-party talks to convince North Korea to fully and completely give up their nuclear weapons programs as soon as possible.

As for the FTA agenda, which received most attention, Lee said the two nations will work toward a speedy passage of the free trade deal, possibly by the end of this year. “Both President Bush and I agreed that the passage of the FTA will benefit not only our two economies, but also act as a catalyst to substantially improve exchange and cooperation in all areas between our two nations,” Lee said. President Bush announced that he will convince the U.S. Congress to pass the FTA as soon as possible.

사용자 삽입 이미지
Furthermore, implementation of the U.S. Visa Waiver Program will also take place by the year’s end. “There were many difficulties for Koreans to visit the U.S. due to the hassle of getting visas to enter the country. Once the visa waiver program starts, our cultural exchange as well as our economic exchange will expand. I have high hopes,” the Korean President said.

Lee became the first Korean president to visit Camp David, an apparent indication of possible closer ties with the U.S. The South Korean President is said to have a lot in common with Bush, including religious beliefs, a strict policy toward North Korea and a commitment to market-based economic policies. Both Presidents expressed to reporters their satisfaction at the successful and fruitful outcome of President Lee’s visit, and shared the belief that the visit was significant in the development in the bilateral relationship.

Another summit talks between Lee and Bush will be held in Korea this summer. During the press conference held after their summit talks at Camp David, Lee said, “I invited Bush to visit Korea this summer. He accepted my proposal.” Bush will attend the G-8 Summit in Hokkaido, Japan on July 7-9. After the meeting, he is likely to visit Seoul on July 10-11, presidential aides announced.


출처: http://www.teentimes.org/2008/newspaper/all_news.html?code=top&page=1&number=392

Posted by 케사

사용자 삽입 이미지


엑셀을 사용 하다 보면 수치가 너무 커서 자릿수를 없애거나 줄여야 하는 경우가 생긴다.
예를 들자면 10,000,000 이런 경우 10 이렇게 표현하고 단위를 “백만”으로 한다면 누구나 저 수치를 천만으로 읽을 것이다.

물론 10,000,000 이렇게 다 써도 되지만 눈에 한번에 들어오지 않는다.
그럼 이 부분을 어떻게 엑셀에서 하면 좋을까?

바로 엑셀 수식을 이용해 간단히 해결 할 수 있다.

먼저 숫자를 입력한 후 서식 에서 “사용자 지정 서식”을 들어가보자.
그 중에서 #,##0 를 찾아보자.

#,##0 부분은 1000단위마다 기호(,)를 넣겠다는 말이다.
이때 콤마를 세자리 마다 지우거나 줄이는 방법이 #,##0, 이렇게 0뒤에 콤마를 넣는 것이다.
콤마 하나당 세 자리가 줄어든다.

1.서식표현
10,000,000 -> 10
여섯 자리를 없애야 하기 때문에 #,##0,, 이렇게 콤마를 두 개 넣는다.^^

2. 서식표현
(10,000,000) -> (10)
#,##0,,_);[빨강](#,##0,,)


Posted by 케사
웹브라우저 월단위 점유율 통계입니다.
http://www.w3schools.com/browsers/browsers_stats.asp
Posted by 케사

주말에 다녀온 꽃놀이 입니다.

사용자 삽입 이미지

첨부된 다른 사진을 보시려면 아래 "사진더보기" 를 클릭해주세요

사진더보기

Posted by 케사
TAG 내장산

영어 자막 사이트

Gossip 2008/04/02 00:08

영어 자막 관련 사이트
꽤 많은 파일이 있네요.

http://www.tvsubtitles.net/

Posted by 케사