Development (302) 썸네일형 리스트형 객체에는 메서드가 포함되지 않는다? 객채가 생성되면 인스턴스 변수는 포함이 되지만 메서드는 포함되지 않는다.왜냐고??인스턴스 변수는 인스턴스마다 다른 값을 가질수 있어야 하기 때문에 별도의 메모리 공간이 필요하다.그런데 메서드는 변하는게 아니다.그래서 메모리를 낭비해 가면서 인스턴스를 포함시킬 이유가 없다... 라고 오늘 책에서 봤다...처음 알았네 -_-;;; [Hacker Cup]Find the Min After sending smileys, John decided to play with arrays. Did you know that hackers enjoy playing with arrays? John has a zero-based index array, m, which contains n non-negative integers. However, only the first k values of the array are known to him, and he wants to figure out the rest.John knows the following: for each index i, where k [Hacker Cup]Balanced Smileys 흠... 왜 이렇게 생각을 못했을까 Balanced SmileysYour friend John uses a lot of emoticons when you talk to him on Messenger. In addition to being a person who likes to express himself through emoticons, he hates unbalanced parenthesis so much that it makes him go :(Sometimes he puts emoticons within parentheses, and you find it hard to tell if a parenthesis really is a parenthesis or part of an emoticon.A me.. 파일 입출력. 가끔 찾아보기가 귀찮아서.. ㅡㅡ; try { BufferedReader in = new BufferedReader(new FileReader("src/input")); String s; while ((s = in.readLine()) != null) { System.out.println(s); } in.close(); } catch (IOException e) { System.err.println(e); System.exit(1); }} [Unix]tar 명령어 tar cvf 만들파일명 만들대상 ex) tar cvf test.tar test test 디렉터리 안에 내용을 test.tar 파일로 만든다 c - 파일 생성 v - 작업내용 표시 f - 대상 지정 [Spring]Spring Annotation 1. 속성 정의 XML 파일에 추가되어야 하는 정의 xmlns:context="http://www.springframework.org/schema/context“ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> Spring Container가 Annotation을 인식하기 위해서는 Spring Container에 BeanPostProcessor들이 등록되어있어야한다. 을 추가하면 내부적으로 자동 등록된다. 2. Stereotype - @Service : Business Layer를 구성하는 서비스 클래스 대상 - @Repository : Data.. [Spring]SpEL(Spring Expression Language) SpEL - Expression Languege중 하나, 런타임시 특정 객체의 정보에 접근하거나 조작할수 있도록 지원. 1. XML 기반 Bean 정의시 classpath상에 존재하는 context.properties파일을 로드하여 bean으로 정의한 후 driver, url 등의 정보를 추출함. 2. Annotation 기반 Bean 정의시@Repository(“movieDao")public class MovieDao extends SimpleJdbcDaoSupport { @Value("#{contextProperties['pageSize'] ?: 10}") int pageSize; @Value("#{contextProperties['pageUnit'] ?: 10}") int pageUnit; @Inj.. [Spring]Autowiring - Autowiring 이란 Spirng container가 bean 간의 참조관계를 자동으로 연결해주는 기능- 속성값 1. no : 기본값 2. byName : property 명과 동일한 id 또는 name을 가진 bean 3. byType : 동일한 클래스타입,(같은 타입 여러개 존재시 exception 발생) 4. constructor : byType과 비슷하나 생성자인자에 적용 5. autodetect : constructor 모드 수행후 byType 모드 수행 6. default : 최상위 태그인 에 셋팅한 모드가 수행됨. (default-autowire 속성) Setter Injection 사용시 Autowire 사용시 특정 bean을 autowiring 제외시키려면 [Unix]vi 편집기 1. 커서이동- 왼쪽, 오른쪽, 위, 아래 : h, i, k, l - 다음라인 첫문자로 이동 : + - 위라인 첫문자로 이동 : - - 현재라인 맨 첫문자로 이동 : 0 - 현재라인 맨 뒷문자로 이동 : $ - 제일 마지막 라인 맨 첫문자로 이동 : G2. 입력- 현재 커서 위치에 입력 : i - 현재 커서 위치에 오른쪽에 입력 : a - 현재 라인 아래 새로운 라인 추가 : o - 현재 라인 첫문자 앞에 입력 : ㅣ - 현재 라인 마지막에 입력 : A - 현재 라인 앞에 새로운 라인 추가 : O3. 삭제- 현재 커서 위치에 있는 1개 문자 삭제 : x - 현재 커서 앞에 있는 1개 문자 삭제 : x - 현재 커서 위치부터 단어 끝가지 삭제 : dw - 현재커서 위치부터 단어 처음까지 삭제 : db - .. [Unix]기본명령어 - chmod : 권한 변경 chmod 8진수 표기 filename u:사용자 허가권 g:그룹 허가권, o:타 사용자 허가권, a:모두 + : 허가권 추가 - : 허가권 삭제 = : 허가권 절대적 할당 r:읽기 w:쓰기 x:실행- chown : 파일 소유자 변경 chown user_id filename- touch : 파일 날짜 및 시간을 현재시간으로 변경 touch filename- mv : 파일을 이동하거나 이름변경 mv sourcefile targetfile-cp :파일 복사 cp[option] sourcefile targetfile option -i : 이미 존재할경우 덮어쓸지 물어봄 -p : 이미 존재할 경우 기존 파일의 속성 시간 그대로 유지 -r : 하부 디렉토리 까지 복사-rm : 파일 삭.. 이전 1 ··· 24 25 26 27 28 29 30 31 다음