일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
- ML
- function
- texttheme
- 함수
- Android
- 파이썬
- crawler
- 플러터
- map
- 크롤러
- Flutter
- 웹크롤러
- text
- 코틀린
- kotlin
- set
- 클래스
- package
- import
- pushnamed
- variable
- Class
- animation
- Collection
- List
- 콜렉션
- 다트
- python
- textstyle
- DART
- Today
- Total
목록전체 글 (125)
조용한 담장

코틀린의 collection 의 List Specific Operations 에 대해 살펴보자. 원문 https://kotlinlang.org/docs/reference/list-operations.html 을 보며 정리. Retrieving elements by index index 가 list 의 크기보다 클때 발생하는 exception 을 피하는 함수 getOrElse() getOrNull() val numbers = listOf(1, 2, 3, 4) println(numbers.get(0)) // 1 println(numbers[0]) // 1 //numbers.get(5) // exception! println(numbers.getOrNull(5)) // null println(numbers.g..
Announcing Flutter 1.17 Announcing Flutter 1.17 Includes Metal support for faster iOS performance, new Material components, new Network tracking tooling and more! medium.com 기본 네비게이션의 경우 20~37% 성능향상 단순 iOS 애니메이션의 경우 CPU/GPU 의 40% 사용 감소 app 크기 감소, 예제 Flutter Gallery 안드로이드앱의 경우 9.6MB 에서 8.1MB 18.5% 축소 큰 이미지를 빠르게 스크롤링 하는 경우 70% 메모리 사용 감소 iOS 앱은 Metal 을 지원하는 기기인 경우 OpenGL 대신 기본으로 사용. 50% 까지 렌더링 성능향상..
python 3.6 이후에는 f-String 을 쓰면 좋다. 이전엔 % format >>> world = "world" >>> "Hi, %s!" % world 'Hi, world!' >>> new = "new" >>> "Hi, %s %s!" % (new, world) 'Hi, new world!' 문자열과 변수가 따로 놀아 한눈에 안들어온다. 변수가 많아지면 더 복잡해진다. str.format() >>> "Hi, {} {}".format(new, world) 'Hi, new world' >>> "Hi, {1} {0}".format(new, world) 'Hi, world new' 여전히 따로 놀아서 보기 어렵다. >>> "Hi, {string1} ..

코틀린의 collection 의 Write Operations 에 대해 살펴보자. 원문 https://kotlinlang.org/docs/reference/collection-write.html 을 보며 정리. Mutable collections 의 내용을 변경하는 동작을 살펴보자. Adding elements add() 를 사용한다. val numbers = mutableListOf(1, 2, 3, 4) numbers.add(5) println(numbers) // output: // [1, 2, 3, 4, 5] addAll()는 argument collection 의 모든 element 를 추가한다. argument 로는 Set, List 외에도 Iterable, Sequence, Array 가 올 ..