Java
1. ssh-key를 먼저 생성한다. 1)키생성 2) ssh-key 확인(id_rsa.pub) 3) ssh-key주소 복사 2. Gitea 에 ssh-key를 추가한다. -컨텐츠에 id_ras_pub 내용 복사 3. Source Tree에 Gitea에 추가한 ssh-key로 연결한다. 1) gitea ssh 주소 복사 2) Clone에 붙혀넣기 (Frile -> Clone/new 클릭) Browse 클릭 후 원하는 폴더 선택 4. SourceTree와 Eclipse 연결 1) File -> Import -> Projects form Git -> existing local repository 2) Select a git Repository -> Browse... -> 소스트리에서 연동한 폴더 클릭 번외) ..
클라이언트의 IP 주소는 HttpServletRequest에 있는 getRemoteAddr() 메서드를 이용하여 알아낼 수 있다. Ip주소가 프록시나 로드밸런서를 통해 호출되는 경우 로드밸런서의 IP가 나온다 이 경우를 방지하기 위해 X-Forwarded-For 값을 확인하고 없을 경우 getRemoteAddr()을 사용한다. import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; @Controller public class HomeController { @RequestMapping(value = "/", m..
가끔 파일을 수정하고 저장까지 했는데 서버를 재시작해도 소스 수정이 반영 안되있을 때가 있다 자바 소스가 수정이 안될 때는 라이브러리에서 경로가 맞게 설정되어있는지 봐야한다. 1. eclipse 상단 Project -> Properties 2. Java Build Path -> Libraries -> Add external JARs.. 빨간불이 들어와 있는 jar 파일을 Add External JARs... 누르면 경로가 잘못 설정되어 있다. 나와있는 올바른 경로로 다시 지정해준다.
leetcode.com/problems/implement-strstr/ Implement strStr() - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. Problem Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Clarification: What should we return ..
leetcode.com/problems/remove-duplicates-from-sorted-array-ii/ Remove Duplicates from Sorted Array II - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. Problem Given a sorted array nums, remove the duplicates in-place such that duplicates appeared at most twice and return the new..
leetcode.com/problems/remove-duplicates-from-sorted-array/ Remove Duplicates from Sorted Array - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. Problem Given a sorted array nums, remove the duplicates in-place such that each element appears only once and returns the new length...
leetcode.com/problems/remove-element/ Remove Element - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. Problem Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space for another array, you must do t..
leetcode.com/problems/longest-common-prefix/ Longest Common Prefix - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. Problem Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string "". Example 1:..
leetcode.com/problems/merge-two-sorted-lists/ Merge Two Sorted Lists - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. Problem Merge two sorted linked lists and return it as a new sorted list. The new list should be made by splicing together the nodes of the first two lists. Exa..



