본문 바로가기

Java

(56)
How to setup/install Oracle Java OpenJDK with OpenJFX and Eclipse IDE, whole development environment. 오라클 자바 OpenJDK, OpenJFX, Eclipse 전체 개발환경 설치 방법 / javafx, ojdk, ojfx, sceneBuilder How to setup/install Oracle Java OpenJDK with OpenJFX and Eclipse IDE, whole development environment. 오라클 자바 OpenJDK, OpenJFX, Eclipse 전체 개발환경 설치 방법 / javafx, ojdk, ojfx, sceneBuilder 작년부터 openJdk 와 openJfx 를 쓰다가 최근 이클립스에서 뭔지 모르게 에러가 생겨서 전부 지우고 개발환경 재설치를 하면서 순서를 적어보았다. I used openJDK and openJFX last year, but recently eclipse got some errors so I removed all and setup development environment ag..
Aracade Intro #55 differentSquares. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제,문제해결능력,example, c++ java c# scalar Aracade Intro #55 differentSquares. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제,문제해결능력,example, c++ java c# scalar Q. Given a rectangular matrix containing only digits, calculate the number of different 2 × 2 squares in it. 숫자만 들어있는 주어진 매트릭스에서, 각기 안에 다른 숫자를 가진 2x2 사이즈 사각형의 개수를 구하여라. e.g. Input -> matrix = [[1, 2, 1], [2, 2, 2], [2, 2, 2], [1, 2, 3], [2, 2, 1]] Output -> differentSq..
Perfecting OO's Small Classes and Short Methods. 완벽한 객체지향의 작은 클래스와 짧은 메소드, Book:ThoughtWorks Anthology, Java,cpp,자바,oop,좋은코드,객체지향프로그래밍 - (#9, Tell, Don't Ask) Perfecting OO's Small Classes and Short Methods. 완벽한 객체지향의 작은 클래스와 짧은 메소드, Book:ThoughtWorks Anthology, Java,cpp,자바,oop,좋은코드,객체지향프로그래밍 - (#9, Tell, Don't Ask) 원글 ( 여기 )Origin ( Here ) TellDontAsk 말해라, 묻지말고 Tell-Don't-Ask is a principle that helps people remember that object-orientation is about bundling data with the functions that operate on that data. It reminds us that rather than asking an o..
JavaFx, how to show actual size image bigger than pane using scroll, 실제 크기 이미지를 스크롤바 사용하여 보여주는 방법, Java/cpp/kotlin/gui JavaFx, how to show actual size image bigger than pane using scroll, 실제 크기 이미지를 스크롤바 사용하여 보여주는 방법, Java/cpp/kotlin/gui -기본틀 / imageview-image / translate -> tomorrow 기본적으로 JavaFx를 SceneBuilder 를 사용해서 최초 레이아웃을 만들어두고 열었다고 가정..안되어 있다면 ( 여기 ) 내일 포스팅 예정 JavaFx ui 쌓이는 순서가 Stage 위에 Scene 위에 각종 Component(Pane, Button etc..) 이 올라가는데, 위의 기본 틀은 Stage -> Scene -> Pane 이 올라가서 최초 바탕을 띄운 것 까지이다. 이제 ImageView 위..
How to convert file to byte array (byte[]) example, 파일 객체 바이트로 변환하기 예제코드, java/cpp/c++/scalar How to convert file to byte array (byte[]) example, 파일 객체 바이트로 변환하기 예제코드, java/cpp/c++/scalar 파일 객체를 만들어주고, 파일객체의 path를 java.nio.file.Files 의 readAllBytes 함수에 넣어 사용한다. Make file object first, and use that file path in readAllBytes method in java.nio.file.Files Example code...예제코드 byte[] array = Files.readAllBytes(new File("file/path.txt").toPath()); Something else you might like..? 2018/12/18 - ..
How to access controller from existing Pane in JavaFX, pane에서 해당 controller로 접근하기, java/cpp/c++/fx/gui How to access controller from existing Pane in JavaFX, pane에서 해당 controller로 접근하기, java/cpp/c++/fx/gui Q. Pane에서 직접 해당 Controller를 뽑아낼 수 없다.Pane 에서 Scene을 통해 FxmlLoader를 뽑아내는 방법이 있고, 그 후 loader를 통해서Controller를 가져올 수 있다. 예제 코드를 보자 We cannot get Controller from Pane directly, so i struggled some. After bringing Scene, then we could get FxmlLoader from Scene. So it can get Controller. e.g. FXMLLoad..
Aracade Intro #43 isBeautifulString. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Aracade Intro #43 isBeautifulString. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Q. A string is said to be beautiful if b occurs in it no more times than a; c occurs in it no more times than b; etc. Given a string, check whether it is beautiful. 아름다운 문자열은... b의 개수가 a보다 많지 않고, c의 개수가 b보다 많지 않고, 등등... 주어진 문자열이 아름다운지 확인해봐라 (a, b, c, 알파벳 순서가 다 채워져 있어야함, 앞의 ..
Aracade Intro #42 bishopAndPawn. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Aracade Intro #42 bishopAndPawn. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Q. Given the positions of a white bishop and a black pawn on the standard chess board, determine whether the bishop can capture the pawn in one move. The bishop has no restrictions in distance for each move, but is limited to diagonal movement. Check out the example below to se..