본문 바로가기

Programming

(45)
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..
Aracade Intro #52 longestWord. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Aracade Intro #52 longestWord. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Q. Define a word as a sequence of consecutive English letters. Find the longest word from the given string. 단어를 일련된 영문자들의 연속으로 정의해라. 주어진 문자열에서 가장 긴 단어를 찾아라. e.g. Input -> text = "Ready, steady, go!" Output -> longestWord(text) = "steady" //Process //1. Input text//2. Iterate from..
Aracade Intro #50 chessKnight. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Aracade Intro #50 chessKnight. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Q. Given a position of a knight on the standard chessboard, find the number of different moves the knight can perform. The knight can move to a square that is two squares horizontally and one square vertically, or two squares vertically and one square horizontally away from it. T..
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 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..
Aracade Intro #32 absoluteValuesSumMinimization. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Aracade Intro #32 absoluteValuesSumMinimization. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Q. Given a sorted array of integers a, find an integer x from a such that the value of abs(a[0] - x) + abs(a[1] - x) + ... + abs(a[a.length - 1] - x) is the smallest possible (here abs denotes the absolute value).If there are several possible answers, output the..