이클립스에 node.js를 설치하기 위해 삽질을 좀 했습니다. 사실 엄청 간단한건데 인터넷에 의지하다 보니 다 비슷 비슷한 내용을 보여주고 있어 서버시작을 못하는 부분에 대해서는 참고할 만한 내용이 없었습니다. 진행하기 위해서는 우선은 윈도우에 node.js가 설치되어 있어야합니다. 그리고 cmd창에 npm install -g nodeclipse npm install -g express npm install -g coffee-script 를 입력해줘서 설치해줘야 합니다. 1. 이클립스 마켓플레이스에 들어갑니다. node를 검색해서 아래 보이는 것을 인스톨합니다. 2. 인스톨이 끝나고 재부팅을 하면 이제 이클립스창의 window - preferences - nodeclipse 에서 node.js path를..
프로그래밍에서 다뤄지는 모든데이터는 결국 byte데이터 입니다.프로그래밍 하시는 분들은 아시겠지만 1byte는 8개의 bit를 가지고 한개의 bit는 이진수로 1과 0의 값을 가집니다.일련의 데이터를 바이트배열로 변환하는 작업을 직렬화, 다시 그 바이트배열을 원래 형태의 데이터로 복원하는 작업을 역직렬화라고 합니다. System.BitConverter BitConverter클래스는 getBytes함수를 통해 바이트 배열로 변환을 해줍니다. 다시 역직렬화를 위해서는 ToBoolean등의 함수를 사용하여 하면 됩니다. byte[] ibytes = BitConverter.GetBytes(450000); byte[] bbytes = BitConverter.GetBytes(true); byte[] dbytes =..
호스트OS인 윈도우에서 NAT환경의 게스트OS인 리눅스에 접속하는 방법 우선 NAT환경으로 리눅스에 셋팅되어 네트워크 연결이 가능하다는 가정하에 정리한다. Edit - Virtual Network Editor - Nat Settings.. 에서 Port Forwarding에 추가를 해야한다.타입은 TCP로 호스트 포트는 윈도우에서 접속할 포트를 적어준다. 1024이상을 적는다. 나는 9999포트를 넣었다. 아이피는 해당 게스트OS 리눅스의 ifconfig의 ip를 적는다. 버츄얼 머신 포트는 게스트OS로 접속될때 포워딩 될 포트를 적는다. SSH의 포트인 22를 넣었다. 이제 호스트OS인 윈도우의 방화벽 포트를 열어줘야 된다. NAT Settings..에서 설정한 포트인 9999를 열어준다.제어판 - 방..
자바 7 (Diamond)지시자 제네릭스를 사용할 때 기존의 list1변수처럼 인스턴스 생성을 해왔지만, 자바7 부터는 지시자로 new연산자 부분을 함축할 수 있게 되었다. 자바7 부터는 정수형․실수형 리터럴에 _구분자를 넣을 수 있게 되어 숫자를 구분하기가 수월해졌다. switch문의 인자로 String타입의 값을 사용할 수 있게 되었다. try~catch문의 catch문에서 익셉션타입을 여러개 정의 할 수 있게 되었다. 기존에 파일 입출력을 사용하기 위해서는 자원을 가져다 쓰고 나면 finally부분에서 자원을 해제해줘야만 했다. 자바 7부터는 위와 같은 표현이 가능하다 try키워드문의 인자에 자원을 할당하는 코드를 생성하면 자원해제는 자동으로 관리해준다. try블록에 존재하는 기능이 한번에 자동으로..