본문 바로가기

2013/10

PHP-include 와 require 의 차이점 출처: require: http://php.net/manual/en/function.require.php include: http://php.net/manual/en/function.include.php require 원문: require is identical to include except upon failure it will also produce a fatal E_COMPILE_ERROR level error. In other words, it will halt the script whereas include only emits a warning (E_WARNING) which allows the script to continue. require 는 에러가 발생될 때 E_COMPILE_ERROR ..
Eclipse-SVN 특정 파일 제외하기-setup ignore file list Eclipse 에서 maven project 를 하게 되면 build 후 target 폴더가 project 하위에 기본적으로 생기게 됩니다. 위의 이미지와 같이 ?(알 수 없는 새로운 파일/폴더) 로 앞으로 svn 에 적용할 파일이라고 표시가 됩니다. 그러나 target 과 같은 폴더를 굳이 버전관리를 할 필요가 없으며, 이로 인해 svn Synchronize 를 할 때 속도도 많이 느려지게 됩니다. Eclipse 에서는 다음과 같이 특정 파일 명(규칙) 혹은 폴더 명을 지정하여 제외시킬 수 있습니다. Window –> Preferences 를 접근합니다. Team –> Ignored Resources 를 선택하고 Add Pattern… 을 클릭합니다. 제외할 파일 이름(규칙: *= 모든 문자, ?= 특..
Java-HTTPS 통신 (링크) http://tjjava.blogspot.kr/2012/03/https.html http://java2go.net/blog/197 간단한 예제 HTTPS Client 프로그램입니다. 물론 아래의 예제를 사용하면 인증서 관련 에러가 발생될 수 있습니다. 이에 관련하여 아래의 포스팅을 참고해 주세요. http://devbada.tistory.com/366 package foo; import java.net.URL; import java.io.*; import javax.net.ssl.HttpsURLConnection; public class JavaHttpsExample { public static void main(String[] args) throws Exception { String httpsURL =..
Java-HTTPS 주소의 파일 다운로드 HTTPS 건 HTTP건 일반적인 환경에서 URL 접속은 대게 아래와 같이 사용하고 있습니다. URL url = new URL("https://hostname:port/file.txt"); URLConnection connection = url.openConnection(); InputStream is = connection.getInputStream(); // .. then download the file 하지만 HTTPS 환경에서는 server 인증서가 없거나 지정하지 않을 경우 아래와 같은 오류를 만나게 됩니다. avax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed:..
MySQL-Concat 사용 시 한글 깨짐 현상 MYSQL을 사용 시 CONCAT 을 사용할 때 한글 깨짐 현상. * 테이블 A 가 있습니다. * 컬럼 colA, colB 가 있습니다. * 컬럼 colA = varchar, colB = number 입니다. 두 개의 컬럼은 서로 유형이 다릅니다. SELECT colA, colB FROM A; 정상 출력 됩니다. SELECT CONCAT(colA, colB) FROM A; 출력 시 한글이 깨지게 됩니다.(일부 툴에서는 정상적으로 출력됨을 확인) 해결방법 CONCAT 을 할 때, number 유형이나 각기 다른 유형의 컬럼을 합치고자 할 때 CAST 를 해주시면 됩니다. SELECT CONCAT(colA, CAST(colB AS CHAR)) FROM A; 끝 참고사이트: http://srzero.tisto..