Tuesday, January 31, 2006

2005/02/01

Morning dawned.
I haven't been feeling well recently. so I feel tired all the time.
In these day , I suffer from insomnia. Since i had been graduated from school, I had the time before going through training program for samsung company. Now, I am very free. Between morning and afternoon, I usually sleep and wake up around 2:00. As soon as I get up, I often sit the chair on the computer. :-(

Wednesday, January 18, 2006

Amazon.com: The Design and Implementation of the FreeBSD Operating System: Books: Marshall Kirk McKusick,George V. Neville-Neil

Amazon.com: The Design and Implementation of the FreeBSD Operating System: Books: Marshall Kirk McKusick,George V. Neville-Neil

I want to read this book too.

Amazon.com: UNIX(R) Systems for Modern Architectures: Symmetric Multiprocessing and Caching for Kernel Programmers: Books

Amazon.com: UNIX(R) Systems for Modern Architectures: Symmetric Multiprocessing and Caching for Kernel Programmers: Books

I want to read this book.

Tuesday, January 10, 2006

Do you lost the windows dll files ?

DLL-files.com - Download all your missing dll-files.

You can find all dll files about Windows

Monday, January 09, 2006

vim tip

자질구레한 tip
K manpage보기
G 파일의 마지막줄로 커서이동
^6 or :e# 열어봤던 이전파일 열기
zf fold - 한줄로 접기 ex) :23,29zf
zo fold - 펴기
^p or ^n 변수명, 함수명 자동완성
<<>> tab 밖으로 밀기
{ 한 단락 위로 이동
} 한 단락 아래로 이동
[i 함수의 프로토타입보기
한 vi 안에 여러개로 창 나누어(split) 작업하기
:vs <파일명> 세로로 창 나누어 파일열기
:sp <파일명> 가로로 창 나누어 파일열기
:20vs ./ 왼쪽에 파일 탐색기 열기 <탐색기에 대한 도움말 = ?>
O 탐색기 파일 열기
^wn 새로운 창 나누기
^wo 현재 커서가 있는 창을 전체창으로..(여러개 창으로 나뉘어 있을때)
^ww 시계방향으로 창 사이를 이동
^w<방향키> 두개의 창 사이를 방향키의 방향으로 이동
^w+ 창 크게
^w- 창 작게
z<숫자> 창 높이설정
^w= 열려있는 창들의 크기를 모두 같게
^wc or ^w_ 현재창 닫기
:help split 창 나누기에 대한 도움말
열려있는 파일보기
명령) :marks
설명) 원래는 a-z,A-Z,0-9까지의 마크를 각각의 문서에 대해 할수 있는기능
그냥 marks라고 하면 기본적으로 vim이 저장하는 최근 10개 문서(0-9마크)를 보여줌
이동은 `0 또는 `3
명령) :args
설명) 명령행 인자로 여러개의 파일을 열었을 경우, 이들을 보여주고, 문서간 이동시 편리(:N , :n)
명령) :ls
설명) 현재 열려있는 버퍼들을 확인
편집중에 다른 화일들을 여러개 연경우, 이미 열린화일을 찾기 쉽게 함.
이동은 :b1 또는 :b3 등으로.

3.6. 빠른 괄호 이동
C나 C++ 을 사용하다보면 제어문이나 함수에서 많은 괄호('{','(')를 만나게 된다. 이때 괄호의 제일 마지막으로 이동하고 싶을때가 있을것이다. 이럴때는 ']}' 를 사용하면 된다. '[{' 를 사용하면 괄호의 처음으로 이동한다.
3.7. 위치 마크(mark)하기
일종의 북마크기능으로 자주참조할만한 라인을 마킹해두고 필요할때 간단히 해당 마킹지역으로 이동하기 위해서 사용한다. 마킹을 위해서는 명령모드에서 m키를 눌러서 마킹모드로 들어가면 된다. 그리고 영문 [a-zA-Z]키중 아무거나 눌러주면 된다. 만약 a를 눌러주었다면, 현재라인은 a이름으로 마킹된다. 이후 작업을하다가 a마킹라인으로 가고 싶다면 'a 해주면된다. 이상태에서 원래라이으로 되돌아가고 싶다면 ''를 눌려주면 된다.
물론 다중마킹도 허용한다. 마킹할수 있는 문자는 단일영문자이다. 마킹에 사용되는 영문자는 대소문자를 구분함으로 최대마킹가능한 수는 27*2가 될것이다.

Shift+d, d$
현재커서 위치에서 마지막까지 삭제
Shift+j
현재 행의 개행문자를 제거한다. 즉 아래라인을 현재라인에 덧붙인다.

치환
:/pattern/replace/ 현재 줄의 치환
:lines/pattern/replace/ 지정한 줄의 치환
:line,lines/pattern/replace/ 지정한 범위의 치환
:%s/pattern/replace 모든 줄의 치환
위의 팁들을 이용하여 현재 재연이의 .vimrc에 키매핑한 것들..
map K 도움말 보기
map :25vs ./:set nonu 탐색기 열기
map O^Ww 탐색기 안에서 파일 열기
map ^6 이전에 열었던 파일 열기
map v%zf 폴딩 - 함수 접기(함수의 { 위치에서 F5를 눌러야 함)
map zo 폴딩한 것 다시 풀기
map :marks 최근에 열었던 파일 보기
map [i 함수 프로토타입보기
map :set nonu 줄번호 없애기
map :set nu 줄번호 보기

Tuesday, January 03, 2006

STL Series

Lately, I am interested in C++ template. I would make a my kernel with c++ and template. so I am reading the books about template, design pattern and O/S. Today, In stl series, 1st

The concept of the STL is based on a separation of data and operations.

In a way, the STL concept contradicts the original idea of object-oriented programming: The STL separates data and algorithms rather than combining them. However, the reason for doing so is very important. In principle, you can combine every kind of container with every kind of algorithm, so the result is a very flexible but still rather small framework.

Containers

1. Sequence containers are ordered collections in which every element has a certain position. This position depends on the time and place of the insertion, but it is independent of the value of the element. For example, if you put six elements into a collection by appending each element at the end of the actual collection, these elements are in the exact order in which you put them. The STL contains three predefined sequence container classes: vector, deque, and list.
2. Associative containers are sorted collections in which the actual position of an element depends on its value due to a certain sorting criterion. If you put six elements into a collection, their order depends only on their value. The order of insertion doesn't matter. The STL contains four predefined associative container classes: set, multiset, map, and multimap.

In associative container, you can always use a binary search, which results in logarithmic complexity rather than linear complexity.

Vectors
A vector manages its elements in a dynamic array. It enables random access, which means you can access each element directly with the corresponding index. Appending and removing elements at the end of the array is very fast. However, inserting an element in the middle or at the beginning of the array takes time because all the following elements have to be moved to make room for it while maintaining the order.


To write generic code that is as independent of the container type as possible, you should not use special operations for random access iterators. For example, the following loop works with any container: for (pos = coll.begin(); pos != coll.end(); ++pos) { ... }
However, the following does not work with all containers: for (pos = coll.begin() ; pos < coll.end(); ++pos) { ... }
The only difference is the use of operator < instead of operator != in the condition of the loop. Operator < is only provided for random access iterators, so this loop does not work with lists, sets, and maps. To write generic code for arbitrary containers, you should use operator != rather than operator <.
Every algorithm processes half-open ranges. Thus, a range is defined so that it includes the position used as the beginning of the range but excludes the position used as the end. This concept is often described by using the traditional mathematical notations for half-open ranges:
[begin,end)
or
[begin,end[





Expression
Kind of Inserter
back_inserter (container)
Appends in the same order by using push_back()
front_inserter (container)
Inserts at the front in reverse order by using push_front()
inserter (container ,pos)
Inserts at pos (in the same order) by using insert()


If you really want to remove elements in one statement, you can call the following statement: coll.erase (remove(coll.begin(),coll.end(), 3), coll.end());
Why don't algorithms call erase() by themselves? Well, this question highlights the price of the flexibility of the STL. The STL separates data structures and algorithms by using iterators as the interface. However, iterators are an abstraction to represent a position in a container. In general, iterators do not know their containers. Thus, the algorithms, which use the iterators to access the elements of the container, can't call any member function for it.
Manipulation algorithms (those that remove elements as well as those that reorder or modify elements) have another problem when you try to use them with associative containers: Associative containers can't be used as a destination. The reason for this is simple: If modifying algorithms would work for associative containers, they could change the value or position of elements so that they are not sorted anymore. This would break the general rule that elements in associative containers are always sorted automatically according to their sorting criterion. So, not to compromise the sorting, every iterator for an associative container is declared as an iterator for a constant value (or key). Thus, manipulating elements of or in associative containers results in a failure at compile time.

Monday, January 02, 2006

Linux Tip

Good Linux Tip