java 스레드덤프(thread dump) 분석
* jstack [PID] > dump.txt 로 스레드덤프 추출 * 일단 BLOCK이 있는지 검사해 보자
* jstack [PID] > dump.txt 로 스레드덤프 추출 * 일단 BLOCK이 있는지 검사해 보자
ajax option에 xhrfields : {withCredentials : true} 를 주자 서버사이드에서는 (ex: 웹서버) 아래의 Http Header 설정도 필요하다. Access-Control-Allow-Credentials : true Access-Control-Allow-Origin : http://aaa.com => withCredentials의 true인 경우에는 asterisk(*)를 사용할 수 없고 도메인을 명시/나열해야 한다. 쿠키를 생성했다고 해도, CORS 요청일 경우에는 쿠키가 전혀 전송되지 않음에 주의하자.
tree -d 디렉토리명 tree -f 디렉토리명 tree가 설치되어 있지 않을 경우, yum install tree 등으로 설치하자.
– 출처 : http://askubuntu.com/questions/99142/how-to-set-svn-info-response-call-result-language – 전역적인 언어설정을 바꾸면 되기는 하지만, (ex: LANG=ko_KR.utf8) 그것보다는, svn cli 명령에 특화된 환경변수(LC_MESSAGES)를 셋팅해 주면 깔끔하게 해결된다. 예) $ export LC_MESSAGES=en_US
– 출처 : http://stackoverflow.com/questions/12922157/copy-and-unzip-files-to-remote-machine-ant – <!– unzip transfered zip file –> <target name=”remoteUnzip”> <sshexec host=”111.222.333.444″ username=”admin” password=”1111″ command=”/bin/sh -c ‘ for zipfile in /aaa/*.zip; do /usr/bin/unzip -d /aaa/unzip $$zipfile ; done ‘” /> </target>
http://www.tecmint.com/scp-commands-examples/ scp source_file_name username@destination_host:destination_folder
* jQuery ajax 로 jsonp 요청시 크롬 개발자도구 상태 Content-type 없음 Accept는 */* 이 됨 network 탭에서 xhr이 아닌 script로 조회됨. method type에 관계 없이 get 요청이 됨.
http://stackoverflow.com/questions/957700/how-to-set-the-java-library-path-from-eclipse
이클립스를 재기동하자 (^ ^ )
* 접근 불가능한 필드에 접근하기 Map<String, Field> fieldMap = new HashMap<String, Field>(); Field[] fields = Example.class.getDeclaredFields(); for(Field f : fields) { fieldName = f.getName(); f.setAccessible(true); fieldMap.put(fieldName, f); } * 필드에 접근해서 값 셋팅하기 //this는 fieldMap에 해당하는 멤버를 지닌 객체 fieldMap.get(“returnMsg”).set(this, “success”);
nc -z 아이피 포트 * 참고 링크 리눅스 포트 체크 프로그램 – nc
프로젝트 우클릭 > Properties > Builders 에서 빌드하고 싶지 않은 항목들을 (ex: Java Builder) 를 체크 해제 한다.
Java project 를 web application 구현시 셋팅하는 Dynamic Web Project 로 변환하기 요점은 Project 우클릭 > Properties > Project Facets 이군!
잘은 모르지만…. 제목과 같다고 한다… (현재 내가 아는 바로는….) 그래서 RawCap.exe를 사용하여 캡쳐하는 방법을 사용해 보았다. * 참고 링크 http://www.hackthepacket.com/56
* 특정파일에서 검색 grep 검색어 파일 * 여러파일에서 찾고 싶다! find . -name 파일명 | xargs grep 검색어 * 카운트를 알고 싶다! find . -name 파일명 | xargs grep 검색어 | wc -l * 양념… -n : 행번호 표시 정규식(regex)을 사용한 AND 조건 검색 – 기본적으로 아무 옵션이 없으면 일반 정규식, -E… Read More »
[Linux] DNS 서버 설정 및 resolv.conf 나는 service network restart 를 해도 resolv.conf 가 초기화 안되고 남아 있었는데 -_-…
– 출처 : https://grox.net/utils/encoding.html – Character Encoding (ascii chart) character encoding decimal NULL %0 0 %1 1 %2 2 %3 3 %4 4 %5 5 %6 6 %7 7 %8 8 TAB %9 9 CR %A 10 %B 11 %C 12 LF %D 13 %E 14… Read More »
curl 실행방법 (http scripting) curl 매뉴얼 * http basic authentication 이 필요했던 curl 호출 예시 (jk-status 상태변경 명령 호출) curl -u admin:abcd1234\!@ “http://111.222.333.444/jkstatus?cmd=update&mime=txt&from=list&w=lb_Mobile$1&sw=Mobile11&vwn=Mobile11&vwf=1&vwa=0” (!가 쉘스크립트 이상동작을 발생시켜서 \로 escape 처리해 주었다.)
– 화면 입력값 유효성 검사 – 화면 입력값 형태 가공 및 변환 – 서비스 호출 결과를 화면에 출력해 주기 위한 데이터 가공 및 변환, 바인딩 … 생각 나는대로 계속 나열해 보자~
public class NumberUtility { private static final Log LOG = LogFactory.getLog(NumberUtility.class); public static final BigDecimal INT_MIN_IN_BIGDECIMAL = new BigDecimal(Integer.MIN_VALUE); public static final BigDecimal INT_MAX_IN_BIGDECIMAL = new BigDecimal(Integer.MAX_VALUE); public static final BigDecimal LONG_MIN_IN_BIGDECIMAL = new BigDecimal(Long.MIN_VALUE); public static final BigDecimal LONG_MAX_IN_BIGDECIMAL = new BigDecimal(Long.MAX_VALUE); /** * 생성 금지 */ private NumberUtility(){} /** * Object를… Read More »