일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 오픈소스
- spring
- PostgreSQL
- STS
- jpa
- IntelliJ
- Open Source
- 문서
- git
- 설정
- AJAX
- Core Java
- myBatis
- ubuntu
- Exception
- MySQL
- Source
- SpringBoot
- Thymeleaf
- error
- Python
- MSSQL
- JDBC
- oracle
- JavaScript
- Eclipse
- Tomcat
- maven
- Docker
- Spring Boot
- Today
- Total
목록Core Java (19)
헤르메스 LIFE
String strSplit = "2010|10"; String yy = strSplit.split("\\|")[0]; String mm = strSplit.split("\\|")[1];
public class SortString { /** * Double 형 배열 정열 * @param nums 정열될 배열 * @return double[] 정열된 배열 */ static double[] sortDouble(double[] nums) { for(int i = 0; i < nums.length; i++) { int min = i; for(int j = i; j < nums.length; j++) { if (nums[j] < nums[min]) min = j; } double tmp; tmp = nums[i]; nums[i] = nums[min]; nums[min] = tmp; } return nums; } /** * String 형 배열 정열 * @param nums 정열될 배열 * @ret..
/** * 현재 oracle 7 버전대는 unicode 1.2를 사용하고, * oracle 8.1.5 버전부터 unicode 2.0을 사용합니다. * 그리고 jdk1.2버전은 unicode 2.0을 사용하지요 * 그래서 oracle 8.1.5에서 읽어들인 한글은 보이지만, * 7버전에서 읽어들인 한글은 unicode 버전차이로 ?표로 표시됩니다. * 때문에 oracle 7버전에서 한글을 지원받으려면 * DB에서 read할때는 unicode 1.2를 2.0으로, DB로 write할때는 unicode 2.0을 1.2로 * conversion 해주는 class를 만들어서 import하여 사용하면 됩니다. * * UniCode 1.2 을 UniCode 2.0 로 변환 * @param uni12 변환할 문자 (U..
/** * 현재 oracle 7 버전대는 unicode 1.2를 사용하고, * oracle 8.1.5 버전부터 unicode 2.0을 사용합니다. * 그리고 jdk1.2버전은 unicode 2.0을 사용하지요 * 그래서 oracle 8.1.5에서 읽어들인 한글은 보이지만, * 7버전에서 읽어들인 한글은 unicode 버전차이로 ?표로 표시됩니다. * 때문에 oracle 7버전에서 한글을 지원받으려면 * DB에서 read할때는 unicode 1.2를 2.0으로, DB로 write할때는 unicode 2.0을 1.2로 * conversion 해주는 class를 만들어서 import하여 사용하면 됩니다. * * UniCode 2.0 을 UniCode 1.2 로 변환 * @param uni20 변환할 문자 (U..
/** * Character Set를 ISO-8859-1로 컨버전 * @param str 변환할 문자 * @return String 변환문자 */ public String convISO(String str) { String tmp = new String(""); if(str==null||str.length()==0) return ""; try { tmp = new String(str.getBytes("EUC-KR"), "ISO-8859-1"); } catch (UnsupportedEncodingException uee) { log(CLASS_NAME + ".convISO()","Character Set변환을 실패했습니다."+uee.toString()); } catch (Exception e) { log(..
public class StringToUni { public static void main(String[] args) { String str = "아름다운"; StringBuffer strVal = new StringBuffer(); for(int i = 0; i < str.length();I++) { char c= str.charAt(i); strVal.append("\\u" + Integer.toHexString(c)); } System.out.println(strVal.toString()); // 결과 : \uc544\ub984\ub2e4\uc6b4 } }
import java.io.UnsupportedEncodingException; public class UniToString { public static void main(String[] args) { String hexStr = "\uc544\ub984\ub2e4\uc6b4"; String ls = null; try { ls = new String(hexStr.getBytes(), "UTF-8"); } catch(UnsupportedEncodingException e) { e.printStackTrace(); } System.out.println(ls); // 결과 : 아름다운 } }
프로젝트는 이제 대부분 Eclipse를 사용하게 됩니다. 다른 프로젝트를 하다가 그 프레임워크를 그대로 옮겨와서 사용하게 되는 경우 CVS를 사용하게 되면 그 이하의 폴더까지 옮겨 오게 되고 CVS 폴더의 환경자체가 이동되어 귀찮은 작업을 할 경우가 있습니다. 이 때 CVS의 폴더를 완전히 삭제하고 새롭게 CVS나 SVN에 연결하기 위해 만들었습니다. package cruise.util; import java.io.File; public class DeleteCVSFolder { public static void main(String[] args) throws Exception { File srcDir = new File("C:\\project\\workspace"); // Workspace 폴더 fin..
Apach FTPClient 를 이용한 FTP Client Source package com.study.springboot.utils; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import org.apache.commons.net.ftp.FTPClient; import org.apache.commons.net.ftp.FTPReply; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * * Reply Codes ***************************************************************** * 20..