vi editor 처음 시작

기타 2014. 3. 19. 10:31

vi hello.c   <- hello.c를 생성함과 동시에 편집을 시작.


그 안에서는 세가지 모드가 있다.------------------------


i(insert) : 입력 모드

a(append): 위치 이동 모드 

이때 이동키는 h j k l 다.

esc: 명령모드

:wq(write and quit)

:q!( quit without save)


------------------------------------------------------

빠져나온 후 컴파일을 해야 한다.


gcc hello.c -o hello.exe   (생성되었다)

./hello.exe  (잘 작성됐는지 런해서 확인한다)


수정하고 싶으면

vi hello.c


'기타' 카테고리의 다른 글

[oracle] 2. where문으로 조건부 출력하기  (0) 2014.03.26
[oracle] 1. query 기초  (0) 2014.03.26
Posted by jeff제프
,

http://blog.naver.com/ntzkimy?Redirect=Log&logNo=50189247881


http://narsisse.com/201



Posted by jeff제프
,

thread를 구현하는 방법은 두가지다. 



첫번째는 Runnable() 인터페이스를 상속받아서 쓰는 것이고


두번째는 Thread 클래스를 상속받아서 직접 구현하는 것이다



첫번째 사용방법의 예)






public class myThread implements Runnable(){


public void run(){


//쓰레드 돌아갈 때 수행할 내용


}


public static void main(String args[])

{

myThread myObj = new myThread();

Thread TrdObj = new Thread(myObj);

TrdObj.start();



}


//////////////////////////////


두번째, 상속받아서 쓰는 방법 : thread를 쓸 일이 많을 때 더 유용하다.


class DerivedClass extends Thread{


public void run(){

 //내용

}


}


public class mainClass{


public static void main(String[] args){


DerivedClass threadObj = new DerivedClass();

threadObj.start();


}



}




Posted by jeff제프
,