본문 바로가기

Algorithm

(177)
Aracade Intro #13 ReverseParentheses, Codefights, CodeSignal, 코드파이트, 알고리즘, algorithm Aracade Intro #13 ReverseParentheses, Codefights, CodeSignal, 코드파이트, 알고리즘, algorithm 이거 진짜 재귀로 풀기 젼나 빡쎘슴.. It was hella hard to solve using recursive.. Q. You have a string s that consists of English letters, punctuation marks, whitespace characters, and brackets. It is guaranteed that the parentheses in s form a regular bracket sequence. Your task is to reverse the strings contained in each pai..
OpenCV - CvType (Mat datatype) 오픈cv 매트릭스 데이터타입 OpenCV - CV_Type (Mat datatype) 오픈cv - CV_Type 매트릭스 데이터타입 Mat 으로 반환되는 함수의 경우는 바로 Mat 에 변수명으로 받아도 되지만..가끔 Mat 자체를 정해진 사이즈로 미리 만들어놓고 수정해가며 사용하는 경우가 많다. Mat.ones or Mat.zeros 를 쳐보면 뒤에 Size 객체를 넣는 함수와, 가로세로 길이를 직접 입력하는 두가지가 있다. 난 가로세로 직접 넣는게 편한 듯.e.g.Mat.ones(rows, cols, datatype); // rows * cols 사이즈의 matrix를 만들고 1로 채워준다. 들어가는 데이터타입은 CvType.CV_${해당비트} 로 정한다.Mat.zeros(rows, cols, datatype);// rows * ..
OpenCV (Java) How to change Mat to Image, and save (OpenCV Mat 에서 Image 변환, 저장) OpenCV (Java) How to change Mat to Image, and save (OpenCV Mat 에서 Image 변환, 저장) 일반적인 Mat 타입을 Image (JavaFx)로 변환하는 순서를 보면.. 2가지 종류가 있는데 1. Mat Byte 버퍼를 만든다. 2. PNG 포맷으로 mat을 encoding 하면서 버퍼에 넣는다. 3. 버퍼를 배열로 만들면서 inputstream을 붙여서 읽은 값을 Image로 만든다 or 1. Mat 을 BufferedImage로 변환한다. 2. BufferedImage 를 Image (fx) 로 변환한다. It's the general order of converting Mat type to Image (javaFx), there are two way..
Java enum class 자바 이넘 클래스 (Singleton design pattern 처럼 사용방법) 앞에서 자바 싱글턴 디자인패턴을 썼는데.. ( 여 기 ) 이어서 자바 enum 자료형 클래스에 대한 내용을 쓴다.. enum 자료형을 잘 써서 이런저런 경우에 대입하는 경우가 많은데, 일단은 이펙티브 자바에서 나온 싱글턴을 대체하는 enum 클래스 예제만 보자? I posted Java singleton pattern ( here ) Continue to post this enum class in Java.. There are many usage to use enum datatype in Java, for the first, Imma write enum class for singleton in effective java book. Let's get started? 특이사항으로는.. 클래스 입구에 TEST..
티스토리 (구글/네이버 검색 노출) 사이트맵 생성 - How to make sitemap xml file 티스토리 (구글/네이버 노출) 사이트맵 생성 - How to make sitemap xml file Online XML Sitemap Generator접속한다. http://www.web-site-map.com/ 오른쪽 상단에 url 입력하는 부분에 본인 블로그 주소를 입력하고 -> Get free XML Sitemap 버튼을 누른다. -> 내용 입력 ->-> 1. url 은 입력되어서 들어온다. ->-> 2. 보안코드를 보고 똑같이 입력한다. ->-> 3. 다른 곳은 건드리지 않아도 되고, 맨 아래에 체크박스에 체크를 해준다. (아래) Include sub-domains (all subdomains must be added in Google Webmaster Tools as well) ->-> 4. C..
Design pattern - Singleton (디자인패턴 - 싱글턴) Design pattern - Singleton (디자인패턴 - 싱글턴) It's used alot because it's easy to use. Example would be written in Java or C++, maybe in Java. And it's simple if you understand the whole context. If you wonder the classdiagram, then just search. Important things.. 1. It's the only instance using specific class, in heap memory 2. This class has a self instance as a attribute(static) 3. Private constru..
Java parse double dataType after dot, 자바 소수점 이하 출력개수 조절 자바 소수점 이하 출력개수 조절 Java parse double dataType after dot 자바의 기본 자료형 doubleDouble class 의 parseDouble 메소드와 String class 의 format 메소드를 사용한다. primitive data type "double" in java.Use Double class to use parseDouble method, and String class to use format method. - 문자로 나오는 소수점을 원하는 만큼 잘라내고 파싱해서 double 값을 얻어낸다. - Get double value after parsing from string format double which you wanna get e.g. public st..
Windows 10에서 부팅시 계정 암호를 입력하지 않는 방법(How to Skip the Windows 10 Login Screen and Login) Windows 10에서 부팅시 계정 암호를 입력하지 않는 방법(How to Skip the Windows 10 Login Screen and Login) 1. Windows 키 + R을 눌러서 실행 창에 netplwiz를 입력합니다.2. 사용중인 계정의 이름을 확인한 후 [사용자 이름과 암호를 입력해야 이 컴퓨터를 사용할 수 있음]을 체크 해제합니다. 1. Windows Key + R, and execute "netplwiz"2. uncheck the box labeled “Users must enter a user name and password to use this computer.” Something else... 2018/10/10 - [Computer general/Windows] - GPU G..