목록Computer Science (20)
뭐해먹고 살지
UITextView Scroll-to-Typing Bug As I’ve said many times, I’m a huge fan of Text Kit. It’s a big deal for Vesper. Among other things, it lets us do bolding/un-bolding in a way that didn’t work reliably or efficiently in iOS 6. But with Text Kit came a new UITextView. The old one was based on WebView, and this one isn’t. That makes it a 1.0 version of UITextView, since it’s a new thing. And it has..
MySQL 4.1 이후부터는 CHAR(n), VARCHAR(n)에서 n은 바이트가 아니라, 글자 수를 의미. 즉, 캐릭터 셋의 영향을 받는다.
Integer.valueOf(null)의 Exception 은 NullPointerException 일까 NumberFormatException 일까? Test Code @Test public void test() { class A { String n; } A a = new A(); a.n = null; try { Integer.valueOf(a.n); } catch (Exception e) { e.printStackTrace(); } } 결과는.. java.lang.NumberFormatException: null 끝!
Java Serialization :Java Serializatoin은 자바 객체를 저장하거나 전송하기 위하여 자바 객체의 코드를 다시 복원가능한 형태의 Stream으로 직렬화 시켜주는 것을 말한다. transient : IO에서 어떤 객체를 객체직렬화(Serializable)하여 처리할시 모든 인스턴스 변수는 기본적으로 Serializable 상태이다. 만약 인스턴스변수중 직렬화를 원하지 않는 변수가 있다라고 가정할때 해당 변수를 transient로 선언해 주면 된다. ex ) private transient int id;
How do I unzip multiple / many files under Linux?Q. I’ve lots of files in a directory called /disk2/images. All files are zip file format , so I am using following command: unzip *.zip Which is result into an error as follows: caution: filename not matched How do I unzip multiple / many files under Linux? A. Linux or UNIX unzip command will list, test, or extract files from a ZIP archive, common..
1. 이클립스 업데이트 메뉴에 http://java.decompiler.free.fr/jd-eclipse/update 를 입력하여 플러그인을 설치하면 된다. 2. jad 파일을 다운 받는다 http://www.varaneckas.com/jad 3. Window - Preferences - Java - JadClipse 의 Path to decompiler 에 jad 파일의 위치를 잡아주면 끝!
Linux에서 Symbolic link 거는법 매번 잊어버려서 기록해둔다 ln -s [원본경로] [심볼릭경로]
# 이글은 mysql document 의 7.2.1 Explain Syntax 를 대~충 번역한 것입니다. # 틈틈이 번역하고 있으나 언제 완료될지 모릅니다.. EXPLAIN 을 사용함으로써 인덱스가 적절히 사용되고 있는지 검토할 수 있다. 인덱스가 잘못 사용되고 있다면 ANALYZE TABLE 을 사용하여 테이블을 점검하라. 이것은 테이블의 상태를 갱신하며 옵티마이저의 동작에 영향을 준다. 옵티마이저가 SELECT 에 기록된 순서대로 조인을 행하게 강제하려면 SELECT 대신에 SELECT STRAIGHT_JOIN 을 사용하라. EXPLAIN 은 SELECT 문에 사용된 각 테이블당 하나의 행을 리턴한다. 나열된 순서는 MYSQL 이 쿼리처리에 사용하는 순서대로 출력된다. MYSQL 은 모든 조인을 s..
1. response.sendRedirect("/contextName/helloWorld.jsp"); 전송되는 페이지의 HTTP HEADER에 리다이렉트 정보를 담아 보낸다. 브라우저가 HEADER 정보를 분석한 후 원하는 URL로 리다이렉트 시킨다. sendRedirect 이후에 세션, 쿠키, 헤더 정보를 조작하는 로직이 있다면 Cannot create a session after the response has been committed 에러를 내뱉는다. 비지니스 로직에서 sendRedirect를 하게 된다면 과감하게 return 시키자. 경로에는 컨텍스트명을 포함한 절대 경로(/로 시작하거나 http로 시작하는 풀 주소)로 적어주어야 한다. 2. request.getRequestDispatcher("..
신기하네.. ㅎㅎ