본문 바로가기
[Kotlin] Kotlin 의 숨겨진 비용 #3 [Kotlin] Kotlin 의 숨겨진 비용 #3 https://medium.com/@BladeCoder/exploring-kotlins-hidden-costs-part-3-3bf6e0dbf0a4 Delegated property -class Example{ var p: String by Delegate()} property 에 delegate 를 사용할 경우에 해당 delegate 는 operator function 인 getValue 와 setValue 를 구현해야 한다.해당 function 들은 object instance 와 property metadata 를 받는다. public final class Example{ @NonNull private final Delegate p$delegate =.. 2018. 1. 18.
[Effective Objective-C] #48 반복문에는 블록 열거를 사용하라 [Effective Objective-C] #48 반복문에는 블록 열거를 사용하라 출처 : Effective Objective-C -최신 오브젝티브-C 에는 열거하는 방법이 많다.표준 C 반복문부터 오브젝티브-C 1.0의 NSEnumerator, 그리고 오브젝티브-2.0 의 빠른 열거자(fast enumeration)도 있다. for 루프 -컬렉션을 열거하는 첫 번째 메서드는 훌륭하고 오래된 방법인 for 루프다.NSArray *anArray = …;for (int i=0; i < anArray.count; i++){ id object = anArray[i]; // do something} 이 방법은 쓸만하지만 사전이나 집합을 반복하면 훨씬 복잡해진다.NSDictionary *aDictionary = ….. 2017. 10. 15.
[Kotlin Tutorial] Operator overload 와 convention #2 [Kotlin Tutorial] Operator overload 와 convention #2 출처 : Kotlin in action 7.3. Destructuring declarations and component functions -val p = Point(10, 20)val (x, y) = p // destructuringprintln(x)println(y) -destructuring 도 convention 을 사용한다.componentN 이 호출된다. ( N 은 숫자 )val (a, b) = p // val a = p.component1()// val b = p.component2() -data class 는 compiler 가 primaryConstructor 에 정의된 모든 property 에 .. 2017. 8. 29.
[Kotlin Tutorial] Kotlin 기초 #2 - Chap2. Kotlin basics [Kotlin Tutorial] Kotlin 기초 #2 - Chap2. Kotlin basics 참조 : Kotlin in Action 2.4. Iterating over things: "While" and "For" loops -Kotlin 에서 for loop 은 for-each loop 하나밖에 없다. 2.4.1. The “while” loop -Java 와 동일 2.4.2. Iterating over numbers: ranges and progressions -일반적인 for loop 를 쓰려면 range 를 쓰면 된다.Range 는 closed, inclusive 하다 즉 아래의 예에서는 1과 10 모두를 포함한다.val oneToTen = 1..10 -val hundredToOneWithSte.. 2017. 7. 25.
[android] TextSwitcher ( from API level 1 ) [android] TextSwitcher ( from API level 1 ) http://developer.android.com/reference/android/widget/TextSwitcher.html -TextView 들만을 child 로 가지는 ViewGroup 이다.Label 을 animation 하는 데 유용하다.setText 가 불릴때마다 animation 을 해서 현재 text 를 out 시키고, 새로운 text 를 in 시킨다. -inAnimation 과 outAnimation 을 지정하여 사용한다. -setText 는 animation 을 하지만, setCurrentText 를 하면 현재 보여지고 있는 text 를 그냥 update 하기 때문에 animation 이 없다. -TextS.. 2017. 7. 9.
[Django] 파이썬 웹 프로그래밍 - Django 의 핵심 기능 #1 [Django] 파이썬 웹 프로그래밍 - Django 의 핵심 기능 #1 -책을 읽으며 Remind 하는 내용, 핵심 내용, 모르던 내용을 정리한 것입니다. 예문 및 자세한 설명은 책을 구매하여 보세요~ * 4.1.1. 데이터 입력 및 수정 * 4.1.2. 필드 순서 변경하기 -테이블 데이터 변경이 아닌 테이블을 보여주는 UI 양식 변경은 admin.py 파일을 변경하면 된다.아래와 같이 순서에 대해 정의하는 admin.ModelAdmin 을 상속하는 녀석을 만들고, register 할 때 이 class 를 함께 전달하면 된다. class QuestionAdmin(admin.ModelAdmin): fields = [‘pub_date’, ‘qestion_text’].. 2016. 12. 13.
Objective-C 고급 ( Advanced Objective-C ) Objective-C 고급 ( Advanced Objective-C ) 출처 : http://www.tutorialspoint.com/objective_c/objective_c_classes_objects.htm > - class 는 @interface 와 @implementation 의 두 파트로 나뉘어 정의된다. - 대부분이 objects 를 상속한다. - objects 는 메세지를 받기 때문에 receiver 로 불리기도 한다. - Properties 는 다른 class 에서의 access 를 접근하도록 도와준다. - ex) @interface Box:NSObject { double length; double breadth; } @property(nonatomic, readwrite) double .. 2015. 6. 18.
android language code ( extension of values folders ) Country Name Introduced Version. English, US (en_US) 1.1German, Germany (de_DE) 1.1Chinese, PRC (zh_CN) 1.5Chinese, Taiwan (zh_TW) 1.5Czech, Czech Republic (cs_CZ) 1.5Dutch, Belgium (nl_BE) 1.5Dutch, Netherlands (nl_NL) 1.5English, Australia (en_AU) 1.5English, Britain (en_GB) 1.5English, Canada (en_CA) 1.5English, New Zealand (en_NZ) 1.5English, Singapore(en_SG) 1.5French, Belgium (fr_BE) 1.5Fr.. 2015. 2. 27.
토스 노하우 - Unit 4. 제공된 정보를 사용하여 질문에 답하기. 토스 노하우 - Unit 4. 제공된 정보를 사용하여 질문에 답하기. 30초의 도표 읽는 시간이 주어지고,3가지 질문을 음성으로 듣고, 각각 15, 15, 30초의 대답 시간이 주어진다.질문은 화면에 프린트 되지 않으므로 잘 들어야 한다. ~ prior / in advance~전의you should get to the airport 2 hour prior. be scheduled for ~~로 예정되어 있다. 주어 take flight 편명 at 구체적 시간 on 구체적 날짜 present, talk about, review, go over, discuss 주제명 be located in 도시이름/지역at 주소on 거리 이름 주어 range from 최하 가격 to 최상 가격 travel agency c.. 2014. 7. 15.
반응형