목록전체 글 (1528)
오늘도 공부
출처 : http://www.journaldev.com/13792/android-gridlayoutmanager-exampleAndroid GridLayoutManagerWe’ve implemented a RecyclerView using a LinearLayoutManager here. Now let’s use a GridLayoutManagerto layout the RecyclerView as a grid.Following is the constructor for a GridLayoutManager.GridLayoutManager (Context context, int spanCount, int orientation, boolean reverseLayout)reverseLayout if set tr..
These commands are based on a askubuntu answer http://askubuntu.com/a/581497To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.ABSOLUTELY NO WARRANTY. If you are still reading let's carry on with the code. sudo apt-get update && \sudo apt-get install build-essential software-properties-common -y && \sud..
https://blog.lael.be/post/73
출처 : http://drasys.tistory.com/entry/Conoha-%EC%BD%94%EB%85%B8%ED%95%98-%EC%84%9C%EB%B2%84-%EA%B5%AC%EC%B6%95%EA%B8%B0-CentOS-67-%EA%B8%B0%EB%B0%98 Conoha (코노하) 서버 구축기 (CentOS 6.7 기반)컴퓨터 2016.01.16 00:43지인의 부탁도 있고해서 리눅스 기초적인 사용법을 곁들여 Conoha (코노하) VPS 서비스를 이용한 서버 구축기를 정리해 본다. 1) 서버 사양 선택 / OS 설치 카드 결제까지 마치고 나면 서버 추가 메뉴 ( https://manage.conoha.jp/Service/Add/ )에서 추가할 사양 및 설치할 OS를 선택하여 서버를 생성하자. 서버..
Image파일 vectorDrawable 대응하기http://pluu.github.io/blog/android/2016/04/11/android-vector/ http://pngtosvg.com/ 여기서 png -> svg 파일로 변경 http://inloop.github.io/svg2android/ 여기서 svg -> drawable파일로 변경 적용해서 사용하기
extension Array { func mapArray(_ transform: (Array) -> T) -> T { return transform(self) } }Then you can pass in the Set initializer to the new mapArray functionobjectArray .map({ $0.URL }) .mapArray(Set.init)
출처 : http://codeman77.tistory.com/82 import UIKit; // 홀수 집합let oddNumberSet : Set = [ 1, 3, 5, 7, 9 ];// 짝수 집합let evenNumberSet : Set = [ 0, 2, 4, 6, 8 ];// 소수 집합let primeNumberSet : Set = [ 2, 3, 5, 7 ]; // 연산 결과를 저장할 집합var resultNumberSet : Set = Set(); // 교집합(Intersection) : 두 집합의 공통된 요소print("홀수, 짝수 교집합");resultNumberSet = oddNumberSet.intersection(evenNumberSet);// []for i in resultNumberSe..
Creating a concurrent queuelet concurrentQueue = DispatchQueue(label: "queuename", attributes: .concurrent) concurrentQueue.sync { } Create a serial queuelet serialQueue = DispatchQueue(label: "queuename") serialQueue.sync { }Get main queue asynchronouslyDispatchQueue.main.async { }Get main queue synchronouslyDispatchQueue.main.sync { }To get one of the background threadDispatchQueue.global(attr..
출처 : https://stackoverflow.com/a/36839785You may to use ActivityIndicator from RxSwift repo. I using MBProgressHUD in my project. At first you need to create extension for this library:extension MBProgressHUD { /** Bindable sink for MBProgressHUD show/hide methods. */ public var rx_mbprogresshud_animating: AnyObserver { return AnyObserver { event in MainScheduler.ensureExecutingOnScheduler() swi..
es, Swift has the Set class.let array1 = ["a", "b", "c"] let array2 = ["a", "b", "d"] let set1:Set = Set(array1) let set2:Set = Set(array2)Swift 3.0+ can do operations on sets as:firstSet.union(secondSet)// Union of two sets firstSet.intersection(secondSet)// Intersection of two sets firstSet.symmetricDifference(secondSet)// exclusiveOrSwift 2.0 can calculate on array arguments:set1.union(array2..
