본문 바로가기

DataStructure

(75)
Aracade Intro #41 digitDegree. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Aracade Intro #41 digitDegree. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Q. Let's define digit degree of some positive integer as the number of times we need to replace this number with the sum of its digits until we get to a one digit number. Given an integer, find its digit degree. 양의 정수의 자릿수를 찾아보는데, 한자리 숫자가 나올 때까지 각 자리 수들의 합을 구하는 동작을 반복한다. 주어진 정수에서..
How to check ongoing live process on Linux cmd, 리눅스 커맨드창에서 어떤 프로세스가 실행중인지 확인하기, java, ubuntu, cpp How to check ongoing live process on Linux cmd, 리눅스 커맨드창에서 어떤 프로세스가 실행중인지 확인하기, java, ubuntu, cpp 리눅스 cmd 창에서 검색할 프로세스명을 grep 명령어를 써서 골라낸다. Check process name using "grep" command in linux cmd e.g. ps -ef | grep "java" ps -ef | grep "chromium" Something else you might like... 2018/12/13 - [Programming/Java] - How to change color theme in JavaFx example, 자바Fx 전체적인 색 테마 바꾸기 예제, ui, 디자인 2018/12/11 ..
How to change color theme in JavaFx example, 자바Fx 전체적인 색 테마 바꾸기 예제, ui, 디자인 How to change color theme in JavaFx example, 자바Fx 전체적인 색 테마 바꾸기 예제, ui, 디자인 JavaFx UI 구조는 -> Stage 1 - Scene 1 - Components (0..*) 로 이루어져 있는데, 아래 예제와 같이 Pane 종류의 Component 에 setStype을 해준다.베이스가 되는 rgba 색 값을 바꿔준다. 참고로 BaseStageView.fxml 파일은 borderPane 하나 있는 fxml 파일 Do setStyle to the sort of Pane components like the example below.Change base rgba color Notice : BaseStageView.fxml file has just one..
Aracade Intro #40 longestDigitsPrefix. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Aracade Intro #40 longestDigitsPrefix. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Q. Given a string, output its longest prefix which contains only digits. 주어진 string에서, 맨 앞쪽에서 숫자로만 된 prefix 를 출력해서 e.g. Input -> inputString="123aa1" Output -> longestDigitsPrefix(inputString) = "123" 맨 앞 prefix 123 // Process// 1. Input mixed string// 2. Iterate from beg..
Aracade Intro #39 knapsackLight. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Aracade Intro #39 knapsackLight. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Q. You found two items in a treasure chest! The first item weighs weight1 and is worth value1, and the second item weighs weight2 and is worth value2. What is the total maximum value of the items you can take with you, assuming that your max weight capacity is maxW and you can'..
Aracade Intro #36 differentSymbolsNaive. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Aracade Intro #36 differentSymbolsNaive. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Q. Given a string, find the number of different characters in it. 주어진 string에서, 각자 다른 character 의 개수를 찾아봐라 e.g. Input -> s = "cabca" Output -> differentSymbolsNaive(s) = 3 There are 3 different characters a, b and c. // Process// 1. Input string s// 2. Iterate from begi..
OpenCV How to get min/max value from matrix, 매트릭스 최소값/최대값. Java,c++,cpp,imageprocessing - Core 함수에서 minMaxLoc(Matrix) 를 호출하면 MinMaxLocResult 객체를 반환한다. 반환받은 객체에서 다양한 값들을 뽑아낼 수 있는데, 최소/최대 값을 뽑는 것은.. If you call "minMaxLoc(Matrix)" method in Core class, you could get MinMaxLocResult instance. And we could get various val from it, anyway, the way to get min/max val... 코드.. 코드를 보자!!!! Code.. lemme see code!!!!!! example public double getMax(final Mat inputMat) { return Core.minMaxLoc(in..
OpenCV How to handle single channel image matrix each pixel, add/subtract/multiply/division (1), 이미지 매트릭스 각 픽셀단위 값 조정하기 (영상처리, image processing) (1) OpenCV How to handle single channel image matrix each pixel, add/subtract/multiply/division (1) 이미지 매트릭스 각 픽셀단위 값 조정하기 (영상처리, image processing) (1) Handling each pixel in matrix using put/get in OpenCV 1) / 2) both worked well, but second one did better performance. I changed to 3) using Core in OpenCV, and i'll post later. You can use any operator, but example code is about append. 1/2 둘다 동작하고,..