목록IT (1358)
오늘도 공부
자바스크립트 학습 방법에 대해서 쓴 글입니다. 한번 쯤 읽어볼만합니다. 페이지 방문
http://mommoo.tistory.com/61
vsftpd.conf 설정 설명# anonymous 사용자의 접속 허용 여부, 즉 anonymous ftp (default = YES) # 공개된 형태의 FTP 서버로 운영할 것이 아니라면 NO로 한다. anonymous_enable=NO # 로컬 계정 사용자의 접속 허용 여부 (default = NO) local_enable=YES # write 명령어 허용 여부 (defualt = NO) write_enable=YES # 로컬 계정 사용자용 umask (default = 077) local_umask=022 # anonymous 사용자가 파일을 업로드 할 수 있는지 여부 (default = NO) # anon_upload_enable=YES # anonymous 사용자의 디렉토리 생성 허용 여부 (d..
@Override public void onLowMemory() { super.onLowMemory(); Glide.get(this).clearMemory(); } @Override public void onTrimMemory(int level) { super.onTrimMemory(level); Glide.get(this).trimMemory(level); } 을 넣어주는 센스~
출처 : https://rongi.github.io/kotlin-blog/rxjava/rx/2017/08/01/error-handling-in-rxjava.html?utm_source=Android+Weekly&utm_campaign=51f4814861-android-weekly-269&utm_medium=email&utm_term=0_4eb677ad19-51f4814861-338106413Once you start writing RxJava code you realize that some things can be done in different ways and sometimes it’s hard to identify best practices right away. Error handling is one..
1down vote어댑터 내부에서 리스너 추가시 포지션 값이 잘못 되는 경우가 많음..아래와 같이 하면 됨...class MyOnClickListener implements View.OnClickListener { @Override public void onClick(View v) { int itemPosition = mRecyclerView.getChildAdapterPosition(v); myResult = results.get(itemPosition); } }And in the adapter@Override public MyAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View v = LayoutInflater.fro..
스토리 보드 팁 스토리보드 사용시 깔끔하게 나누는 방법https://brunch.co.kr/@joonwonlee/5 http://theeye.pe.kr/archives/2292
출처 : http://blog.naver.com/PostView.nhn?blogId=sukjun40&logNo=100171180154 AudioTrack, AudioRecord 클래스를 활용하여 목소리 자동 감지 프로그램을 만들어 보았습니다. 이 소스는 code.google.com 의 sounddemodulation 원본소스 링크http://code.google.com/p/sounddemodulation/downloads/detail?name=AudioDemodulator.zip&can=2&q= 예제를 그대로 가져와 약간만 변형한 것입니다. 녹음 플레이 코드는 대부분 같고 자동으로 녹음저장과 끝을 맺는것만 다릅니다. 따로 녹음 버튼과 녹음 중지 버튼이 있는것이 아니라 목소리가 커지는 시점을 잡아서 저장하..
http://blog.weirdx.io/post/1486
출처 : 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..
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