전체 글 (61) 썸네일형 리스트형 [git] cash 삭제 git rm -r --cached . git add . git commit -m "clear git cache" [백준 2445번] 별 찍기 - 8 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 import java.util.Scanner; class MainClass{ public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int num = scanner.nextInt(); for(int i = 0; i [백준 - 1316] 그룹 단어 체커 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 import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int test = scanner.nextInt.. 예제 : 수열의 빠른 합 1 2 3 4 5 6 7 8 9 10 11 12 13 public class FastSum { public static void main(String[] args) { System.out.println(fastSum(10)); } public static int fastSum(int n) { if(n == 1) { return 1; } if(n%2 == 1) return fastSum(n-1) + n; return 2*fastSum(n/2)+n/2*n/2; } } Colored by Color Scripter cs 1 + 2 + 3 + 4 + 5 + ... + n 을 반으로 나누어서 계산해 보자 1 + 2 + 3 + ... n/2 + (n/2+2) + (n/2+3) + (n/2+4) + (n/2+n/2).. 문제 ID : CLOCKSYNC, 난이도: 중 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 package main; import java.util.ArrayList; import java.util.Scanner; public class MainClass { final static int INF = 9999; final static int SWITCHES = 10; final stat.. [자료구조] HashMap/HashTable 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899package hashmap; import java.util.LinkedList; class HashTable{ class Node{ String key; String value; public Node(String key, String value) { this.key = key; this.value = value; } public String getValue() { ret.. [Git] .gitignore가 작동하지 않을때 .gitignore에 추가했지만 적용이 되지 않을때는 이미 commit이나 add를 해서 캐쉬에 저장되어 있기 때문이다. 캐쉬를 다 지우고 다시 add하고 commit하면 .gitignore가 정상 작동하는것 을 알 수 있다. .git rm -r --cached . git add . git commit -m "fixed untracked files" [Docker] spring 프로젝트 배포 배포를 하기 위해서는 war파일을 만들어 주어야 한다. 그전에 수정해 줘야할 것이 있는데 바로 데이터베이스 주소이다. 우리가 로컬에서 사용하던 데이터베이스가 아니라 데이터베이스 서버에 연결을 시켜야 한다. root-context.xml 파일에서 저번에 구축한 rds 엔드포인트 주소를 노랑색 위치에 데이터베이스 이름과 같이 넣어준다. id와 pw도 알맞게 설정해 준다. 프로젝트 우클릭 Export를 클릭해 준다. war 파일을 만들어서 저장할 Destination을 지정해 주고 반드시 war파일의 이름을 ROOT.war 파일로 설정해 준다. 톰캣에서 실행할때 기본설정이 ROOT.war파일을 실행하도록 되어있기 때문에 그렇다. war파일을 성공적으로 만들었다면 그 파일을 ubuntu server에 전송해야한.. 이전 1 2 3 4 5 ··· 8 다음