배우고픈 공돌이
You have been given a string s, which is supposed to be a sentence. However, someone forgot to put spaces between the different words, and for some reason they capitalized the first letter of every word. Return the sentence after making the following amendments:Put a single space between the words.Convert the uppercase letters to lowercase.ExampleFor s = "CodefightsIsAwesome", the output should ..
java FX 개발 환경 구축 포스팅에 이어서 디바이스의 블루투스를 java로 제어하는 것을 해보려한다. 이 역할을 하는 라이브러리가 bluecove이다. 여기서 다운 받으면 되지만 FTFP로 옮겨야함으로 SSH커맨드로 받기로 한다. 참조 : https://stackoverflow.com/questions/12597986/my-java-bluetooth-server-on-raspberry-pi-running-debian-wheezy-needs-bluecove-na 위의 과정이 끝나면 ./target 안에 libbluecove_arm.so파일, bluecove-2.1.1-SNAPSHOT.jar 등이 존재한다. ../../bluecove/target/bluecove-2.1.1-SNAPSHOT.jar가 존재한..
자바에서 하드웨어를 다루기 위해서는 래핑된 c/c++ 과정을 거친다. 즉, 하드웨어를 다루는 low level에서는 c/c++로 컨트롤하고, 위의 레이어(자바)에서 사용할 수 있도록 셋팅한다. 그 것을 JNI(JAVA Native Interface)라 한다. 일단 호스트에서 arm i2c를 접근하기 위해 jna를 사용하여 이클립스로 개발한다. 1) JNA로 이클립스에서 ARM i2c(를 포함한 하드웨어 장치)를 개발할 수 있도록 환경 설정 jna.jar를 다운로드하고, 이클립스 자바 프로젝트에 넣는다. jar의 압축을 풀고, 풀어진 라이브러리의 경로를 설정해주어야한다. 2) 이클립스에서 프로그램 코드를 작성하자. 2 - 1) src에 Main 패키지를 만들고, 그 안에다 클래스를 생성한다. 2 - 2 )..