본문 바로가기

전체 글57

유클리드 호제법: 최대공약수 알고리즘(Java, Python) 두 자연수의 최대공약수를 구하는 알고리즘이다. 재귀함수를 사용한다. # 유클리드 호제법 A, B(자연수, A>B) 이고 A%B=R 일 때, gcd(A,B) = gcd(B,R) #Java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 public class gcd { public static int gcd(int a, int b) { if(a % b == 0) return b; else return gcd(b, a % b); } public static void main(String[] args) { int result = 0; result = gcd(192,162); System.out.println(result); } } Colored by Color Scripter cs .. 2021. 5. 14.
[Spring] 프로젝트 과정 정리_(1)초기설정 1. Maven 프로젝트 초기설정(공통) 1) Java 버전 설정: 프로젝트명 우클릭>properties 2) src>main>webapp>WEB-INF에 lib파일을 만든 후 ojdbc14.jar 세팅 3) pom.xml에 필요한 라이브러리 설정 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 9.. 2020. 11. 26.
[MongoDB] 스프링을 통해서 데이터 넣기 웹을 사용하는 게 아니므로 application-context.xml의 위치를 src/main/java 아래로 옮김 2020. 11. 18.
[Spring] 컨테이너 / DI / AOP 1. Spring Container: 사용자 정의 클래스 관리(생성, 소멸) =ApplicationContext =WebApplicationContext =AnnotationConfigApplicationContext 2. 생성시에 필요한 데이터 전송 DI==>setXxx(), 생성자의 매개변수 p: c: 3. AOP: 중복 제거(자동호출) =>시점(JoinPoint), 메소드 호출(PointCut) Aspect: 공통모듈 ex) public MovieVO movieData(){ =>PointCut getConnection(); :@Before try{ setAutoCommit(false) :@Around insert(); update(); commit(); }catch(Exception ex){ rol.. 2020. 11. 18.
[React] 1일차 ▶app.js에 코딩한 내용 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 import React,{Component} from 'react' import axios from 'axios' class App extends Component{ constructor(props) { super(props); this.state={ recipe:[], detail:{}, totalpage:1, page:1 } } componentDidMount() { axios("http://localhost/web/recipe/list.do",{ params:{ page.. 2020. 11. 17.
[다운로드] R, R studio 1. R 3.6.0 + KoNLP(형태소 분석) Download R-3.6.0 for Windows. The R-project for statistical computing. If you want to double-check that the package you have downloaded matches the package distributed by CRAN, you can compare the md5sum of the .exe to the fingerprint on the master server. You will need a version of md5sum for windows: both graphical and comm cran.r-project.org 형태소 분석 라이브러리를 사용하기 위해서 R.. 2020. 11. 17.