목록IT (1045)
올해는 머신러닝이다.
출처 : 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..
close XcodeConsole:rm -rf Pods/ Podfile.lock pod install Open project in XcodeMenu: Product -> CleanBuild or Run project. If it is not work, then you have same other issue. Or are you have warning about file "Pods-MyProject.debug.xcconfig" too?
Android 베타 테스트시 여러가지 방법이 있다. 1. 구글 배타에 등록해서 테스트 한다2. zenkis등을 이용한 CI 방식으로 서버쪽에서 git을 푸시받아 자동으로 apk 배포 한다. 3. deploygate방식으로 스튜디오에서 쉽게 올릴수 있다. (링크 . QR 코드 제공)4. 직접 서버에 올리고 링크 보낸다. 이중에 3번째 방법을 소개하고자 한다. 1. https://deploygate.com/ 에 가서 가입 진행2. https://github.com/DeployGate/gradle-deploygate-plugin/blob/master/README.md 에서 그래들 방식 하나씩 적용.3. http://qiita.com/henteko/items/7ffc8f15223c463683f4 마지막으로 설정..
우선 마이크 인덱스 번호를 추출해야 한다. import pyaudiopo = pyaudio.PyAudio()for index in range(po.get_device_count()): desc = po.get_device_info_by_index(index) #if desc["name"] == "record": print "DEVICE: %s INDEX: %s RATE: %s " % (desc["name"], index, int(desc["defaultSampleRate"])) 그리고 인덱스번호가 출력되는 걸 확인 후 ... 녹음 진행한다. import pyaudioimport wave FORMAT = pyaudio.paInt16CHANNELS = 1RATE = 16000CHUNK = 1024RECORD..
출처 : http://mtsparrow.blogspot.kr/2016/02/swift-5-days-ago.html 몇일전 몇시간전 몇분전 등등... 이런 정보를 표시해야 하는 경우가 있다. NSDate의 extension으로 다음과 같이 구현 한다음 이를 이용하면 가능 하다. import Foundation extension NSDate { func yearsFrom(date:NSDate) -> Int{ return NSCalendar.currentCalendar().components(.Year, fromDate: date, toDate: self, options: []).year } func monthsFrom(date:NSDate) -> Int{ return NSCalendar.currentCale..
출처 : http://stackoverflow.com/questions/27963410/cant-create-backup-to-sd-card 메뉴 및 버튼을 둬서 sqliteExport 메소드가 실행되도록 하면 SDcard에 데이터베이스명.sqlite로 저장된다. 이 파일을 FireFox 의 database manager 이용해서 열어보면 쿼리 도 가능하고 csv 저장도 가능하고 기타 등등이 가능하다. permission은 아래와 같다. public void sqliteExport(){ try { File sd = Environment.getExternalStorageDirectory(); File data = Environment.getDataDirectory(); if (sd.canWrite()) {..
https://medium.com/ios-os-x-development/libraries-used-in-the-top-100-ios-apps-5b845ad927b767facebook-ios-sdk 48Bolts-iOS 39AFNetworking 38Google-Mobile-Ads-SDK 38Reachability (Apple) 37Crashlytics 31Flurry-iOS-SDK 30CocoaPods 29GoogleConversionTracking 26SDWebImage 25Fabric 25mopub-ios-sdk 23Unity 22AdColony 20GoogleAnalytics 19GTMLogger 18comScore-iOS-SDK 18google-plus-ios 17OpenUDID 17CocoaLu..
출처 : http://blog.daum.net/hans1991/3최근에 업데이트 된 xcode 8로 앱을 앱스토에 업로드할 경우 앱에서 사용되는 권한을 info.plist에 반드시 지정해야 합니다.이를 설정하지 않고 1. 앱을 itunesconnect에 업로드할 경우 오류로 인하여 정상등록되지 않고 해당 애플 계정으로 오류 메일이 전송됩니다. 2. iOS 10 디바이스에서 실행할 경우 권한을 필요로 하는 곳에서 앱이 죽는 현상이 발생합니다. * info.plist에 권한 추가하기 1) 포토앨범 사용하는 경우 : "Privacy - Photo Library Usage Description" 키 추가 2) 카메라를 사용하는 경우 : "Privacy - Camera Usage Description" 키 추가 ..
출처 : https://makeapppie.com/2016/06/28/how-to-use-uiimagepickercontroller-for-a-camera-and-photo-library-in-swift-3-0/ import UIKit class ViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate{ let picker = UIImagePickerController() @IBOutlet weak var myImageView: UIImageView! @IBAction func photoFromLibrary(_ sender: UIBarButtonItem) { picker.allowsEdi..
storyboard 를 사용해서 간단하게 화면이동이 가능하지만, 조건문과 함께 사용할때는 코드로 이동하는 것이 편할때가 있다. 같은 스토리보드내에 있는 다른 뷰로 이동하는 경우// nextViewController.swift 인 경우let storyboard: UIStoryboard = self.storyboard!let nextView = storyboard.instantiateViewController(withIdentifier: "nextViewController")self.present(nextView, animated: true, completion: nil) 현재와 다른 스토리보드에 있는 뷰로 이동하는 경우xcode 상에서 is Initial View Controller 에 체크를 해도 되지만..
https://gitlab.com/yogeshc/awesome-ios
링크 http://minsone.github.io/programming/reactive-swift-flatmap-flatmapfirst-flatmaplatest
스위프트 공부 가이드Apple 공식 Swift 언어 가이드를 보시면 언어 자체를 공부하시는데 이보다 좋은 문서는 없을 듯 싶구요.https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_LanguageSwift를 이용한 iOS 개발 공부에 집중적으로 초점을 맞추신다면, Raywenderlich Tutorials을 추천합니다.https://www.raywenderlich.com/category/swift맛보기 정도로 가볍게 배워보고 싶으시면, CodeSchool의 Swift 코스를 추천합니다.https://www.codeschool.com/courses/app-evolution-with-swift그 외에도..
출처 : https://swifter.kr/2016/09/03/swifter%EA%B0%80-%EC%B6%94%EC%B2%9C%ED%95%98%EB%8A%94-%EC%95%8C%EB%A9%B4-%EC%A2%8B%EC%9D%80-%EA%B0%9C%EB%B0%9C%EC%9A%A9-%EB%9D%BC%EC%9D%B4%EB%B8%8C%EB%9F%AC%EB%A6%AC/기본1. Realm모바일 로컬 데이터베이스로 개인적으로 sqlite보단 빠르고 안정적이라고 생각한다. 그외 iOS자체적으로 제공하는 CoreData등이 있다.2. FirebaseMBaaS로 Parse가 없어지면서 대체할 수 있는 백엔드서비스로 각종 분석서비스등을 쉽고 저렴하게 이용할 수 있다.3. SDWebImage Objective-C시절부터 유명했..
안녕하세요, Realm World Tour 참가자/대기자 여러분.이번 Realm World Tour 2017 행사는 여러 도시에서 열리는 Realm 소개 행사로써, 한국에서는 서울과 부산에서 진행됐습니다. 서울에서 진행된 세션 동영상과 슬라이드 링크를 포함한 내용이 https://realm.io/kr/news에 정리되어 올라갔으니 확인해 주세요. --- 강연 영상 및 슬라이드 --- 1. Realm을 소개합니다! - Realm World Tour 2017 Seoul - https://www2.realm.io/e/210132/oducing-realm-would-tour-2017-/2q1vb/35873041 - 회사로서의 Realm과, Realm 모바일 데이터베이스와 Realm 모바일 플랫폼을 소개합니다. ..
유효성 체크https://github.com/Ilhasoft/data-binding-validator
출처 : http://dktfrmaster.blogspot.kr/2016/09/glide.htmlGlide란 무엇인가??구글에서 공개한 이미지 라이브러리기존의 Bump앱이 만들어 사용하던 라이브러리였는데 구글이 Bump앱을 인수하여 라이브러리를 공개웹 상의 이미지를 로드하여 보려주기 위해 고려해야 할 사항들을 미리 구현하여, 사용자가 이용하기 쉽게 만든 라이브러리Glide 추가하기Dependency 추가build.gradle의 dependencies에 다음을 추가한다.compile 'com.github.bumptech.glide:glide:3.7.0' 혹시 maven을 이용한다면 다음을 추가한다. com.github.bumptech.glide glide 3.7.0 aar 기본 이미지 로딩Glide 클래스..
https://github.com/ihsanbal/LoggingInterceptor
FLAG_ACTIVITY_CLEAR_TOP|FLAG_ACTIVITY_SINGLE_TOP 하단에 이미 스택에 있는 activity 일 경우 onCreate 를 방지하기 위해선 필요..
Retrofit 사용시 NumberformatException 발생시.. 간혹 숫자로 변환시 빈값으로 들어오는 경우 뱉는 오류 중 하나가 NumberformatException 이다. 이럴경우 Adapter를 하나 등록하면 된다. public class EmptyStringToNumberTypeAdapter extends TypeAdapter { @Override public void write(JsonWriter jsonWriter, Number number) throws IOException { if (number == null) { jsonWriter.nullValue(); return; } jsonWriter.value(number); } @Override public Number read(Jso..
출처 : http://www.cnblogs.com/zhaoyanjun/p/5535651.htmlButton 防抖处理 button = (Button) findViewById( R.id.bt ) ; RxView.clicks( button ) .throttleFirst( 2 , TimeUnit.SECONDS ) //两秒钟之内只取一个点击事件,防抖操作 .subscribe(new Action1() { @Override public void call(Void aVoid) { Toast.makeText(MainActivity.this, "点击了", Toast.LENGTH_SHORT).show(); } }) ; 按钮的长按时间监听 button = (Button) findViewById( R.id.bt ) ; //监听长按时..
Rx CheetSheet] 다중 터치 방지하기 - throttleFirst() http://kunny.github.io/tip/rx/2016/04/08/rx_cheatsheet_throttle_first/
http://eyeahs.github.io/rxjava/blog/2016/10/11/rxjava-wiki-backpressure/
출처 : http://beust.com/weblog/2015/06/01/easy-sqlite-on-android-with-rxjava/Easy SQLite on Android with RxJavaWhenever I consider using an ORM library on my Android projects, I always end up abandoning the idea and rolling my own layer instead for a few reasons:My database models have never reached the level of complexity that ORM’s help with.Every ounce of performance counts on Android and I can..