'잡동사니'에 해당되는 글 12660건

  1. 2014.03.20 java 8 released!!
  2. 2014.03.20 java assert
  3. 2014.03.19 java thread
  4. 2014.03.19 java 날짜 관련 패키지
  5. 2014.03.19 뭘 보냐 닝겐 2
  6. 2014.03.19 umid mbook m1 배터리 교체 2
  7. 2014.03.19 2중 포인터 사용이유
  8. 2014.03.19 python이 인기라는데..
  9. 2014.03.19 MDK 할인!
  10. 2014.03.18 java collection
Programming/Java2014. 3. 20. 16:28
여전히 감이 안오는 람다이긴 하지만.
JDK1.8 부터 지원을 한다는데..

1.5 처럼의 대격변은 아니라서 다행인지도?

Java Programming Language

Lambda Expressions, a new language feature, has been introduced in this release. They enable you to treat functionality as a method argument, or code as data. Lambda expressions let you express instances of single-method interfaces (referred to as functional interfaces) more compactly.

Method references provide easy-to-read lambda expressions for methods that already have a name.

Default methods enable new functionality to be added to the interfaces of libraries and ensure binary compatibility with code written for older versions of those interfaces.

Repeating Annotations provide the ability to apply the same annotation type more than once to the same declaration or type use.

Type Annotations provide the ability to apply an annotation anywhere a type is used, not just on a declaration. Used with a pluggable type system, this feature enables improved type checking of your code.

Improved type inference.

Method parameter reflection.

Collections

Classes in the new java.util.stream package provide a Stream API to support functional-style operations on streams of elements. The Stream API is integrated into the Collections API, which enables bulk operations on collections, such as sequential or parallel map-reduce transformations.

Performance Improvement for HashMaps with Key Collisions


[링크 : http://www.oracle.com/technetwork/java/javase/8-whats-new-2157071.html] 

'Programming > Java' 카테고리의 다른 글

Java Input/OutputStream 관련  (0) 2014.03.21
java 8을 윈XP에 설치하자?  (2) 2014.03.20
java assert  (0) 2014.03.20
java thread  (0) 2014.03.19
java 날짜 관련 패키지  (0) 2014.03.19
Posted by 구차니
Programming/Java2014. 3. 20. 13:40
c에서의 assert 문 처럼
특정 조건에 대해서 참/거짓 시에 강제로 종료하는 역활을 한다.

[링크 : http://docs.oracle.com/javase/7/docs/technotes/guides/language/assert.html]

assert는 디버깅 용도이기 때문에
assertion mode가 꺼져있어
-ea 옵션(Enable Assertion)을 통해 디버깅 모드로 작동하도록 설정해야 한다.


[링크 : http://javacan.tistory.com/70]
[링크 : http://stackoverflow.com/questions/5509082/eclipse-enable-assertions]

'Programming > Java' 카테고리의 다른 글

java 8을 윈XP에 설치하자?  (2) 2014.03.20
java 8 released!!  (0) 2014.03.20
java thread  (0) 2014.03.19
java 날짜 관련 패키지  (0) 2014.03.19
java collection  (0) 2014.03.18
Posted by 구차니
Programming/Java2014. 3. 19. 21:09
Thread는 Runnable interface를 구현한 클래스이다.
Runnable에는 run() 메소드 하나가 있으며
thread에서 오버라이딩한 run() 을 통해 쓰레드를 실행하게 된다.

 public class Thread extends Object implements Runnable 

[링크 : http://docs.oracle.com/javase/7/docs/api/java/lang/Runnable.html]
[링크 : http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html]
 
Thread에는 쓰레드 제어관련 명령어들이 있으나
thread-safe 하지 않아서 인지 deprecated method가 많이 있다.
(이것들이 모두 deprecated되면 쓰레드는 실행하고 양보하는 것 외에는 제어가능한 게 없다?)

run() - 태스크에서 실행할 내용 구현
join() - 호출한 태스크만 실행함(해당 태스크 종료시 까지 싱글 태스크로 전환, 나머지는 sleep)
sleep() - 지정한 시간 만큼 태스크를 실행하지 않음
start() - 멀티태스크를 시작함
yield() - ?

'Programming > Java' 카테고리의 다른 글

java 8 released!!  (0) 2014.03.20
java assert  (0) 2014.03.20
java 날짜 관련 패키지  (0) 2014.03.19
java collection  (0) 2014.03.18
java generic  (0) 2014.03.18
Posted by 구차니
Programming/Java2014. 3. 19. 20:21
Date는 1.0부터
Calendar는 1.1부터 JDK에 추가되었으나
하위호환성으로 인해 Date를 주로 사용한다.

import java.util.Calendar; // 1.1 이후
import java.util.Date; // 1.0  + 호환성으로 인해 주로 사용

[링크 : http://docs.oracle.com/javase/7/docs/api/java/util/Date.html]
[링크 : http://docs.oracle.com/javase/7/docs/api/java/util/Calendar.html]

'Programming > Java' 카테고리의 다른 글

java assert  (0) 2014.03.20
java thread  (0) 2014.03.19
java collection  (0) 2014.03.18
java generic  (0) 2014.03.18
java static import  (0) 2014.03.17
Posted by 구차니
동네 놀이터에 고양이 두마리가 있어서 미친듯이 대놓고 촬영 ㅋㅋ
철망이 있어서 그런지 1m 가까이 가도 도망가지 않는 패기




냥이 : 솔로 닝겐 주제에 멀 보냐
닝겐 : 나 커플인데?
냥이 : ...


Posted by 구차니
개소리 왈왈/컴퓨터2014. 3. 19. 14:45
배터리 셀이 파괴되어 구매!
운좋게도 옥션에서 2만원에 판매중!! (개인 판매자로 추측)


유래없는 투톤 엠북 ㅋㅋㅋㅋ


원래 배터리


나쁘지 않은거 같은 투톤 ㅋㅋㅋ


그래도 흰색으로만 있는게 더 나은거 같기도 하고 ㅋㅋ


'개소리 왈왈 > 컴퓨터' 카테고리의 다른 글

umid mbook m1 랜카드(marvell sd868)  (0) 2014.03.28
엠북 180도 펼치기 개조  (0) 2014.03.26
umid mbook 관련 파일방  (2) 2014.03.14
umid mbook m1 lcd 구매 + 분해기  (0) 2014.03.12
생일선물? ㅋㅋ  (2) 2014.02.01
Posted by 구차니
Programming/C Win32 MFC2014. 3. 19. 14:15
2중 포인터는 포인터에 대한 포인터 이다.
라고 하면 먼가 중의적인 설명인데...

간단하게
포인터 변수를 다른 함수에게 포인터로 넘겨주어
포인터 변수의 값(다르게 말하면 malloc()한 주소)을
변경(용량 부족으로 realloc() 하거나 새롭게 malloc() 하거나) 하는데 사용한다.

예전에 linked list를 하면서 알았던거 같은데 왜 까먹었을까 ㅠㅠ

[링크 : http://eirenehue.egloos.com/1000688]
[링크 : http://debugjung.tistory.com/258]
[링크 : http://www.devpia.com/Maeul/Contents/Detail.aspx?BoardID=50&MaeulNo=20&no=794484&ref=794461

'Programming > C Win32 MFC' 카테고리의 다른 글

vc++ vector와 Vector 차이점?  (0) 2014.07.03
순열생성관련  (0) 2014.06.27
typeof  (0) 2014.03.11
const / pointer  (0) 2014.02.25
assert()  (0) 2013.12.18
Posted by 구차니
한동안 죽어있다가 이제야 조금 살아나는 기미가 보이긴 한데
학원이나 아는 사람들에게 이야기를 들으면
요즘 각광받는 언어라고 해서 참으로 의아한..

python2 2.7.x 에서 한동안 3.x 대로의 이전이 쉽지 않았는지 거의 3년 가량을 죽어 있다가
2014년 3월 16일 3.4.0이 릴리즈 된 걸 봐서는 이제 이 언어도 살아 날지도 모르겠다.

[링크 : https://www.python.org/download/releases/]

'Programming > python(파이썬)' 카테고리의 다른 글

python sqlite3  (0) 2017.03.30
python smtplib의 신비..?  (0) 2016.12.30
python2 vs python3  (0) 2013.01.02
PyOpenGL  (0) 2011.10.04
python 3.2.2 64bit 버전 설치  (4) 2011.09.13
Posted by 구차니
중학교 때였나 고등학교 때였나
꽤나 즐겼던 게임인데 불법복제로 했었으니
이것도 질러야... 겠지? ㅋㅋㅋㅋ


Posted by 구차니
Programming/Java2014. 3. 18. 18:17
collection은 cpp로 치면.. STL?
제너릭스(generics)를 이용해서 만든 자료구조이다.

Set  / List / Queue / Map이 주로 사용되며,
4개는 interface로 implement 되어 각각에 대해 패키지를 제공하게 된다.
Set - HashSet / TreeSet
List - Stack / Vector / ArrayList
Queue - LinkedList
Map - HasMap

[링크 : http://docs.oracle.com/javase/7/docs/api/java/util/Set.html]
    [링크 : http://docs.oracle.com/javase/7/docs/api/java/util/HashSet.html]
[링크 : http://docs.oracle.com/javase/7/docs/api/java/util/List.html]
    [링크 : http://docs.oracle.com/javase/7/docs/api/java/util/Stack.html]
    [링크 : http://docs.oracle.com/javase/7/docs/api/java/util/Vector.html]
    [링크 : http://docs.oracle.com/javase/7/docs/api/java/util/ArrayList.html]
[링크 : http://docs.oracle.com/javase/7/docs/api/java/util/Queue.html]
    [링크 : http://docs.oracle.com/javase/7/docs/api/java/util/LinkedList.html]
[링크 : http://docs.oracle.com/javase/7/docs/api/java/util/Map.html]
    [링크 : http://docs.oracle.com/javase/7/docs/api/java/util/HashMap.html]

[링크 : http://docs.oracle.com/javase/tutorial/collections/interfaces/index.html]
[링크 : http://docs.oracle.com/javase/tutorial/collections/implementations/index.html]


>>>>
set(interface)
-> HashSet / TreeSet(implements)
set - 정렬되지 않음 / 중복 허용하지 않음 (대소문자 구별함)

>>>>
 List(가장 많이 씀 / array와 유사함)
- Stack / Vector / ArrayList (stack은 별로 사용하지 않음)

Stack - push / pop

Vector
 new Vector<String>(2,5) // 초기 2개, 확장 시 5개씩 확장
contains() remove() cacacity() size()
trimToSize() // 메모리 공간 줄이기

>>>>
Queue
- LinkedList 
offer() // push() 개념
poll() // pop() + 삭제

collection - interface
collections - class

>>>>>>
Map
-  HashMap
put()// 저장
get() // 꺼내기

ArrayList / HashMap을 많이 씀

Iterator(반복자)
- hasNext() remove()

---
2014.03.21 추가
결국에 Collection 하위는 Collection과 Iterable의 상속관계이며
toArray를 통하거나 Iterator를 통해서 상호 변환이 가능하다.

public interface Collection<E> extends Iterable<E>
- Object[] toArray()
- <T> T[] toArray(T[] a)
Iterator<E> iterator()
=======================================================
public interface Iterator<E>
- boolean hasNext()
- E next()
- void remove()
=======================================================


public interface Set<E> extends Collection<E>
public interface List<E> extends Collection<E>
public interface Queue<E> extends Collection<E>
public interface Deque<E> extends Queue<E>
public interface Map<K,V>
=======================================================
>> public interface Set<E> extends Collection<E>
public abstract class AbstractSet<E> extends AbstractCollection<E> implements Set<E>
public class HashSet<E> extends AbstractSet<E> implements Set<E>, Cloneable, Serializable
public class TreeSet<E> extends AbstractSet<E> implements NavigableSet<E>, Cloneable, Serializable
public class LinkedHashSet<E> extends HashSet<E> implements Set<E>, Cloneable, Serializable

>> public interface List<E> extends Collection<E>
public class Vector<E> extends AbstractList<E> implements List<E>, RandomAccess, Cloneable, Serializable
public class Stack<E> extends Vector<E>
public class ArrayList<E> extends AbstractList<E> implements List<E>, RandomAccess, Cloneable, Serializable
public class LinkedList<E> extends AbstractSequentialList<E> implements List<E>, Deque<E>, Cloneable, Serializable 


 

'Programming > Java' 카테고리의 다른 글

java thread  (0) 2014.03.19
java 날짜 관련 패키지  (0) 2014.03.19
java generic  (0) 2014.03.18
java static import  (0) 2014.03.17
java inner class / anonymous class  (0) 2014.03.17
Posted by 구차니