목록전체 글 (1524)
오늘도 공부
Using코틀린에서 기본적으로 Use을 제공한다.myStream.use { // 자동으로 열고 닫는다. val line = readLine()}하지만 Rx에도 자원관리를 할 수 있는 방법이 있다. 바로 Using 이다.공식문서는 http://reactivex.io/documentation/operators/using.html 그럼 우선 RxKotlin 에서 어떻게 보이는 지 살펴보자.fun using(resourceSupplier: Callable, //첫번째 인자 (열고)sourceSupplier: Function, //세번째 인자 (닫기) disposer: Consumer): Observable { return using(resourceSupplier, sourceSupplier, disposer, ..
task deleteBuild(type: Delete) { delete 'build/generated/' delete project(':mobile-ui').file('build/') delete project(':domain').file('build/') delete project(':cache').file('build/') delete project(':presentation').file('build/') delete project(':data').file('build/') delete project(':remote').file('build/') } mobile-ui -> app 모듈로 변경..
https://www.raywenderlich.com/183588/introduction-google-maps-api-android-2
https://blog.coderifleman.com/2017/12/18/the-clean-architecture/?utm_medium=social&utm_source=gaerae.com&utm_campaign=%EA%B0%9C%EB%B0%9C%EC%9E%90%EC%8A%A4%EB%9F%BD%EB%8B%A4
MIME-TypeDescriptionFile Extensionapplication/acadAutoCAD drawing filesdwgapplication/clariscadClarisCAD filesccadapplication/dxfDXF (AutoCAD)dxfapplication/msaccessMicrosoft Access filemdbapplication/mswordMicrosoft Word filedocapplication/octet-streamUninterpreted binarybinapplication/pdfPDF (Adobe Acrobat)pdfapplication/postscriptPostscript, encapsulated Postscript,ai, ps, epsAdobe Illustrato..
task copyTestClasses(type: Copy) { from "build/tmp/kotlin-classes/debugUnitTest" into "build/intermediates/classes/debug" } task copySdkClasses(type: Copy) { from "build/tmp/kotlin-classes/debug" into "build/intermediates/classes/debug" } 추가 후에 Run 설정에서 defaults 에서 junit 과 Instrumented test 에 2개를 추가해준다.
출처 : http://thinkerodeng.tistory.com/227 1. Android Studio는 Intellij 기반이다. 2. 클래스와 자동 주석을 달기 위해서 /** 을 사용하면 자동으로 뭔가 정보가 입력되었으면 좋겠는데, 그게 안된다. (클래스 주석 그리고 메소드 주석 수정/추가 기능이 안된다) 3. 다른 방법을 찾아보니 Live Templates 라는 기능이 있었다. 나름 찾은 방법이니 정답은 아니다. 4. File -> Settings 이동 5. Editor -> Live Templates -> AndroidComments 선택 후 -> + 버튼 클릭 -> 1.Live Template 클릭 6. 으로 포커스가 잡힌다. 7. 정보를 입력한다. 필자의 경우는 Abbreviation : c..
fun appendList(listOfLists: List, toAppend: List): List { }Of course both of the following work:fun appendList(listOfLists: List, toAppend: List): List { // Use spread operator return listOf(*listOfLists.toTypedArray(), toAppend); } fun appendList(listOfLists: List, toAppend: List): List { // Turn to mutable list val ret = listOfLists.toArrayList() ret.add(toAppend) return ret } But this is conf..
요 며칠 Firestore 관련해서 삽질을 많이 했다. 느낀 점을 정리해본다. 1. 읽고 , 쓰기 속도는 좀 걸린다. - 최소 1~2초정도 걸린다. 이점을 고려해서 설계를 해야 할것 이다. 2. 모델링시 방법이 많은데 대략 3가지를 소개하고 있다. https://firebase.google.com/docs/firestore/manage-data/structure-data?hl=ko문서의 중첩 데이터문서 내에 배열(맵) 등의 복합 개체를 중첩할 수 있습니다.장점: 문서 안에 단순한 고정 데이터 목록을 보관하려는 경우 데이터 구조를 손쉽게 설정하고 간소화할 수 있습니다.한계: 중첩 목록에 대해 쿼리를 실행할 수 없습니다. 또한 시간에 따라 데이터가 증가하는 경우 다른 옵션보다 확장성이 부족합니다. 목록이 커..
You have two choices:The first and most performant is to use associateBy function that takes two lambdas for generating the key and value, and inlines the creation of the map:val map = friends.associateBy({it.facebookId}, {it.points})The second, less performant, is to use the standard map function to create a list of Pair which can be used by toMap to generate the final map:val map = friends.map..
