일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- xcode
- KeyPath
- Tuist
- Tuist Swift
- arc
- Combine
- uitableviewdiffabledatasource
- ribs
- SwiftUI
- ios
- swift database
- swift db
- combinecocoa
- ios database
- JSON
- SeSAC
- GCD
- realm
- RxSwift
- Subscribe
- swift 5.9
- Firebase Analytics
- Firebase
- 네트워크 통신
- Swift Tuist
- swift
- 카카오뱅크 ios
- swift 6
- observable
- Subject
- Today
- Total
목록전체 글 (87)
천원의 개발
Map : for문이랑 비슷하지만 훨씬 간결하게 사용이 가능하다 //for in let numArray = [1,2,3,4,5] var multiArray = [Int]() for num in numArray { multiArray.append(num * 2) } print(multiArray) // [2,4,6,8,10] //Map let numArray = [1,3,5,7,9] var multiArray = numArray.Map{$0 * 2} print(multiArray) // [2,4,6,8,10] filter: for 문에 if절이 있을때 간결하게 사용하기 위해서 사용 조건식이 true인 요소들로만 구성된다. //for in let stringArray = ["가수", "대통령", "개발자",..
db.collection("컬렉션 이름") .order("정렬할 필드 선택") .addSnapshotListener { querySnapshot, error in self.messages = [] // message 배열 초기화 if let e = error{ // 에러 관리 print("There was an issue retrieveing data from Firestore. \(e)") } else{ if let snapshotDocuments = querySnapshot?.documents { for doc in snapshotDocuments{ let data = doc.data() // data를 dictionary구조로 받아옴 if let messageSender = data["sender필..
공식문서 제일 먼저 AppDelegate와 사용할 Controller에 let db = Firestore.firestore() // 추가 해주고 if let messageBody = messageTextfield.text, let messageSender = Auth.auth().currentUser?.email { //유저정보 db.collection("컬렉션이름").addDocument(data: ["송신자": messageSender, "수신자": messageBody]) { error in if let e = error{ print("There was an issue saving data to firestore") } else { print("Successfully saved data.") } } }

먼저 XIB를 체크하고 새로운 파일을 생성한다 그후 만들어진 XIB파일을 커스텀한다 커스텀한 table에 identifier설정해주고 나는 CustomTable이라고 설정했다 자 이제 TableViewcontroller로 가서 class TableViewController: UITableViewController { @IBOutlet var tableVIew: UITableView! var contact: [Contact] = [ Contact(relationship: "엄마", number: "01022224444"), Contact(relationship: "아빠", number: "01044447777") ] override func viewDidLoad() { super.viewDidLoad() ..

import matplotlib.pyplot as plt from sklearn import datasets, metrics from sklearn.model_selection import train_test_split digits = datasets.load_digits() n_samples = len(digits.images) data = digits.images.reshape((n_samples, -1)) from sklearn.neighbors import KNeighborsClassifier knn = KNeighborsClassifier(n_neighbors=6) X_train, X_test, y_train, y_test = train_test_split(data, digits.target, ..

import matplotlib.pyplot as plt from sklearn import datasets, metrics from sklearn.model_selection import train_test_split digits = datasets.load_digits() # 데이터 세트를 불러온다 plt.imshow(digits.images[0], cmap=plt.cm.gray_r, interpolation='nearest') plt.show() n_samples = len(digits.images) data = digits.images.reshape((n_samples, -1)) # 평탄화 from sklearn.neighbors import KNeighborsClassifier #..