본문 바로가기
[Kotlin Tutorial] Annotation 과 Reflection #1 - Chap 10. Annotations and reflection [Kotlin Tutorial] Annotation 과 Reflection #1 - Chap 10. Annotations and reflection 참조 : Kotlin in action 10.1. Declaring and applying annotations. 10.1.1. Applying annotations -Annotation 사용법은 Java 와 동일하다. @ 를 prefix 로 하고 annotation name 을 써주면 된다. -@Deprecated 의 경우 Kotlin 은 Java 의 것에서 향상되었다.replaceWith parameter 가 추가되어, 새로운 version 의 API 에 연결될 수 있다.@Deprecated(“Use removeAt(index) instead.”, Rep.. 2017. 9. 7.
[Kotlin Tutorial] 한 차원 높은 함수 : 람다를 parameter 와 return value 로 - Chap8. Higher-order functions: lambdas as parameters and return values [Kotlin Tutorial] 한 차원 높은 함수 : 람다를 parameter 와 return value 로 - Chap8. Higher-order functions: lambdas as parameters and return values 참조 : Kotlin in action 8.1. Declaring higher-order functions -Higher-order function 이란 argument 와 return 으로 다른 function 을 갖는 것을 의미한다.Kotlin 에서는 function 이 lambda 나 function reference 로 표시된다. 8.1.1. Function types -val sum = { x:Int, y:Int -> x+y }val action = { pr.. 2017. 8. 31.
[Kotlin Tutorial] 람다로 프로그래밍 하기 - Chap5. Programming with Lambdas [Kotlin Tutorial] 람다로 프로그래밍 하기 - Chap5. Programming with Lambdas 참조 : Kotlin in Action 5.1. Lambda expressions and member references 5.1.1. Introduction to lambdas : blocks of code as function parameters 5.1.2. Lambdas and collections -val people = listOf(Person(“Alice”, 29), Person(“Bob”, 31))println( people.maxBy{ it.age } ) // function 을 argument 로 받는다. { } 는 lambda syntax lambda 가 단순 functio.. 2017. 8. 16.
[Kotlin Tutorial] 함수 정의하고 호출하기 #2 [Kotlin Tutorial] 함수 정의하고 호출하기 #2 참조 : Kotlin in Action 3.4. Working with collections: Varargs, Infix calls, and Library support 3.4.1. Extending the Java collections API -val strings: List = listOf(“first”, “second”, “thrid”)strings.last() val numbers: Collection = setOf(1, 14, 2)numbers.max() last 와 max 는 extension 이다.이 외에도 많이 있으니 IDE 의 code completion 을 잘 활용해보시라~ 3.4.2. Varargs: functions tha.. 2017. 8. 3.
[iOS Study] 병렬 프로그래밍 가이드 ( dispatch source ) [iOS Study] 병렬 프로그래밍 가이드 ( dispatch source ) https://developer.apple.com/library/ios/documentation/General/Conceptual/ConcurrencyProgrammingGuide/GCDWorkQueues/GCDWorkQueues.html#//apple_ref/doc/uid/TP40008091-CH103-SW1 About dispatch source -dispatch source 는 low-level system event 를 처리하기 위한 data type 이다. -Timer dispatch source 는 주기적인 noti 를 만든다. -Signal dispatch source 는 UNIX signal 이 도착하면 not.. 2017. 7. 3.
[android] Uri.getQueryParameter 에 # 들어가면 제대로 파싱 못합니다. [android] Uri.getQueryParameter 에 # 들어가면 제대로 파싱 못합니다. #안쪽 소스를 들여다보면 어떻게 작동하는지 알 수 있다. #static String parsePath(String uriString, int ssi) { int length = uriString.length(); // Find start of path. int pathStart; if (length > ssi + 2 && uriString.charAt(ssi + 1) == '/' && uriString.charAt(ssi + 2) == '/') { // Skip over authority to path. pathStart = ssi + 3; LOOP: while (pathStart < length) { swi.. 2017. 5. 15.
[Django] 파이썬 웹 프로그래밍 - 웹 프로그래밍의 이해 [Django] 파이썬 웹 프로그래밍 - 웹 프로그래밍의 이해 -책을 읽으며 Remind 하는 내용, 핵심 내용, 모르던 내용을 정리한 것입니다. 예문 및 자세한 설명은 책을 구매하여 보세요~ * 1.2.1. 웹 브라우저를 사용하여 요청 * 1.2.2. 리눅스 curl 명령을 사용하여 요청 -curl 명령은 HTTP/HTTPS/FTP 등 여러 가지의 프로토콜을 사용하여 데이터를 송 수신할 수 있는 명령이다. * 1.2.3. Telnet 을 사용하여 요청 -telnet 명령은 터미널 창에서 입력하는 내용을 그대로 웹 서버에 전송한다.telnet 명령모드에서 나가려면 아래 두 라인을 입력해야 한다. ^] ( Ctrl + ] )quit .. 2016. 12. 6.
[Java] Unbounded Wildcards [Java] Unbounded Wildcards 참조 : http://docs.oracle.com/javase/tutorial/java/generics/unboundedWildcards.html - Unbounded Wildcard 는 List 와 같이 type 을 ? 로 사용하는 경우를 이야기한다. - Unbounded Wildcard 는 다음 상황에서 유용하게 쓰인다. 1. Object class 를 넣는 것과 같은 용도인 경우. 2. Collection 을 parameter 로 받으면서 List.size, List.clear 등과 같이 type 에 dependency 가 없는 Collection 자체의 함수들만 호출하는 경우. - List 는 List 의 subtype 이다. - List 는 Lis.. 2016. 11. 23.
Class Diagram 에 대한 구체적인 내용들. Class Diagram 에 대한 구체적인 내용들. 참조 : http://www.nextree.co.kr/p6753/ > - UML 에서 제공하는 기본 요소 외 추가적인 확장요소. - 으로 class 이름에 앞서 마킹한다. - 주로 사용되는 stereotype 은 , , , 등이 있다. - interface 의 경우 interface component 가 따로 있어 stereotype 을 사용하지 않아도 되며, abstract 의 경우도 stereotype 보다는 {abstract} 를 class 나 method 뒤에 붙이는 형태를 사용하는 것이 일반적이라고 한다. ( 일반적인지 검증 필요 ) > - abstract 메소드들은 italic 체로 표기하거나, {abstract} 를 class 이름 다음 혹.. 2015. 6. 28.
반응형