기본 콘텐츠로 건너뛰기

9월, 2016의 게시물 표시

Your First Java Program: Hello World

1. java 설치  (1) http://www.oracle.com/technetwork/java/index.html      다운후 설치: jdk, jre  (2) 환경 설정( 윈도우)     시스템 변수      변수 이름 : JAVA_HOME      변수 값 : jdk 설치 경로 \bin;   (C:\Program Files\Java\jdk1.7.0_45\bin;)    path 등록       기본 경로로 설치했으면 아래와 같다.       JDK : C:\Program Files\Java\jdk.1.7.0_45\bin;       JRE : C:\Program Files\Java\jre7\bin;       그림이 필요하면 : http://hyeonstorage.tistory.com/131 2. HelloWorld.java 작성 public class HelloWorld {    public static void main(String[] args) {       // Prints "Hello, World" in the terminal window.       System.out.println("Hello, World");    } } 3. 컴파일 : javac HelloWorld.java 4. 실행: java HelloWorld

error C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

scanf 는 안전하지 않으니, scanf_s를 사용하거나 _CRT_SECURE_NO_WARNINGS을 사용하라는 내용인데, 저  혼자 테스트 하는 프로젝트라서 _CRT_SECURE_NO_WARNINGS을 추가했습니다. 구성속성-> C/C++->전처리기->전처리기 정의 _CRT_SECUR E_NO_WARNINGS

Error 1 error C4996: 'std::_Copy_impl': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' c:\program files (x86)\microsoft visual studio 12.0\vc\include\xutility 2132 1 ProtobufTest

Error   1   error C4996: 'std::_Copy_impl': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'   c:\program files (x86)\microsoft visual studio 12.0\vc\include\xutility 2132    1   ProtobufTest You should define this as simply  _SCL_SECURE_NO_WARNINGS . It's best to do this in  Project Properties -> C++ -> Preprocessor , to have it consistent across all your code.

RDMA(Remote direct memory access)

RDMA supports zero-copy networking by enabling the network adapter to transfer data directly to or from application memory, eliminating the need to copy data between application memory and the data buffers in the operating system. Such transfers require no work to be done by CPUs, caches, or context switches, and transfers continue in parallel with other system operations. When an application performs an RDMA Read or Write request, the application data is delivered directly to the network, reducing latency and enabling fast message transfer. However, this strategy presents several problems related to the fact that the target node is not notified of the completion of the request (single-sided communications).

Java jsoup 이용 HTML 파싱

Jsoup 추가 https://jsoup.org/download HttpClient 추가 http://hc.apache.org/downloads.cgi 소스: import java.io.IOException; import java.util.Iterator; import org.apache.http.HttpResponse; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.HttpClient; import org.apache.http.client.HttpResponseException; import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.BasicResponseHandler; import org.apache.http.impl.client.DefaultHttpClient; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; public class Main {  public static void main(String args[]) {    HttpClient httpClient = new DefaultHttpClient();    HttpGet httpget = new HttpGet("http://kbodata.news.naver.com/m_rank/rank_team.asp");    try {      httpClient.execute(httpget, new BasicResponseHandler() {        @Override        public String handleResponse(HttpRespons

우분투 버전 변경

vim /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=14.04 DISTRIB_CODENAME=trusty DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS" vim /etc/issue Ubuntu 14.04.2 LTS \n \l vim /etc/os-release NAME="Ubuntu" VERSION="14.04.2 LTS, Trusty Tahr" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 14.04.2 LTS" VERSION_ID="14.04" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="http://help.ubuntu.com/" BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/" vim /etc/issue.net Ubuntu 14.04.2 LTS

Mac 에서 안드로이드 폰 usb 테더링 하기

* 삼성 스마트폰 Mac에서 공유 하기 1. 삼성 드라이버 홈페이지로 이동(http://www.samsung.com/sec/support/smartswitch/smartswitch.html) 2. SmartSwitch를 다운 받기(Mac 용 확인) 3. 다운로드 완료후 설치 하기 *  USB 테더링 http://joshuawise.com/horndis 1. 이 사이트에 들어가서 다운받은후 드라이버를 설치. 2. 설치후 재부팅 3. 부팅후 네트웍 설정 화면으로 이동 4. 휴대폰 USB 연결 5. 스마트폰 화면에서 USB 테더링 클릭 6. MAC 네트웍 화면에 새로운 연결 설정이 뜨면 성공

Mac 패스워드 재설정

※ 본 방법은 라이언 이후에서만 가능합니다. 1. 맥 부팅시 [Option] 키를 누르고 있으면 부팅 디스크 선택 화면이 뜹니다. 2. Recovery를 선택합니다. 3. [메뉴 > 유틸리티 > 터미널]을 선택합니다. 4. 터미널 화면에서 'resetpassword'를 입력하고 엔터를 칩니다. 5. 암호 변경 창이 뜨고, 여기서 맥설치 볼륨 및 사용자를 선택한 후 변경할 비밀번호를 입력 6. 재부팅 7. 로그인 창에서 변경한 비밀번호 입력 8. 키체인 관련 창이 뜨면 [키체인 새로 생성]을 선택 (비밀번호를 리셋하였기 때문에 기존 키체인은 사용하지 못함) 9. 키체인이 새로 만들어졌기 때문에 모든 계정 관련 암호를 다시 입력해줘야 함(iCloud, 이메일 등...)