apffhs41

@apffhs41

50 Points

0 Followers

12 Posts

Joined April 21st, 2021

User has not added any information in their about section.

apffhs41

19 hours ago

View Post

Text CoreML Model λ§Œλ“€κΈ°

직접 μ›ν•˜λŠ” κΈ°λŠ₯을 κ°–λŠ” CoreML Model 을 λ§Œλ“€ 수 μžˆλ‹€ Image Model 은 Create ML ν”„λ‘œκ·Έλž¨μœΌλ‘œ μ†μ‰½κ²Œ λ§Œλ“€ 수 μžˆλ‹€ Text Model 은 Xcode Playground λ₯Ό 톡해 .mlmodel file 을 λ§Œλ“ λ‹€ csv 파일의 ꡬ성과 μ—­ν•  csv νŒŒμΌμ€ 헀더와 λ‚΄μš©μœΌλ‘œ κ΅¬μ„±λ˜μ–΄μžˆλŠ”λ°, 각 헀더에 μ†ν•œ λ‚΄μš©λΌλ¦¬μ˜ 관계λ₯Ό ν•™μŠ΅μ‹œν‚€λŠ” 것이 λͺ©μ μ΄λ‹€ ν•˜λ‚˜μ˜ ν‚€μ›Œλ“œ (@apple λ“±)만...
Select One:

apffhs41

4 days ago

View Post

Pre-trained CoreML μ‚¬μš©ν•˜κΈ°

Pre-trained CoreML 을 μ΄μš©ν•˜κΈ° μœ„ν•œ μ€€λΉ„μž‘μ—… developer.apple.com μ—μ„œ Core ML Models λ₯Ό λ°›μ•„μ˜¨λ‹€ μ‹λ³„ν•˜κ³  싢은 이미지λ₯Ό κ³ λ €ν•˜μ—¬ 100MB μ΄ν•˜λ‘œ λ°›λŠ”λ‹€ -> 100MB μ΄μƒμ˜ νŒŒμΌμ€ git hub push κ°€ μ•ˆλœλ‹€ Project λ‚΄μ—μ„œ CoreML 뿐만 μ•„λ‹ˆλΌ Vision 을 import ν•œλ‹€. -> Vision 은 CoreML 을 μ‚¬μš©ν•˜μ—¬ 이미지λ₯Ό κ°€κ³΅ν•˜κ³  μ‚¬μš©ν•˜λ„λ‘ λ•λŠ”λ‹€...
Select One:

apffhs41

5 days ago

View Post

Tuples

νŠœν”Œμ€ ν˜Όν•© νƒ€μž…μ˜ 배열이닀 μœ ν˜• 1 νŠœν”Œμ€ [ ] 을 μ‚¬μš©ν•˜λŠ” λ°°μ—΄μ²˜λŸΌ ( ) λ₯Ό μ‚¬μš©ν•˜μ—¬ 아무 νƒ€μž…μ˜ object λ₯Ό λ„£λŠ”λ‹€ ν˜ΈμΆœν•  λ•Œλ„ 0 λ²ˆμ§ΈλΆ€ν„° import Cocoa let tuple1 = ("YJ Kim", 32) print(tuple1.0) μœ ν˜• 2 가독성을 μ‚΄λ¦° νŠœν”Œλ‘œ, parameter 을 λ„£μ–΄μ£Όμ—ˆλ‹€ ν˜ΈμΆœν•  λ•ŒλŠ” 각 object κ°€ μ†ν•œ parameter λ₯Ό 호좜 import Cocoa let tu...
Select One:

apffhs41

5 days ago

View Post

guard let vs if let

guard let guard let 은 μ •λ§λ‘œ λ²Œμ–΄μ Έμ„œλŠ” μ•ˆλ  상황을 막기 μœ„ν•΄ (guard) μ‚¬μš©ν•œλ‹€ -> λ§Œμ•½ κ·Έ 상황이 λ²Œμ–΄μ§„λ‹€λ©΄ (else) fatalError 둜 μ—λŸ¬ λ©”μ‹œμ§€λ₯Ό λ„μš΄λ‹€ if let calcMethod = sender.currentTitle { guard let result = calculator.calculate(calcMethod: calcMethod) else { fatalError("Result of the calculation i...
Select One:

apffhs41

6 days ago

View Post

Struct vs Class

Class Class λŠ” init 을 λ§Œλ“€μ§€ μ•ŠμœΌλ©΄ Class λ₯Ό ν˜ΈμΆœν•  λ•Œ μ†ν•œ property λ₯Ό 인자둜 λ°›λŠ” initializer κ°€ μ•ˆλœ¬λ‹€ import Foundation class ClassHero { var name: String var universe: String init(name: String, universe: String) { self.name = name self.universe = universe } } let hero = ClassHero(na...
Select One:

apffhs41

1 week ago

View Post

Computed Property

computed property 의 쑰건 1. computed property λŠ” λ°˜λ“œμ‹œ λ³€μˆ˜ (var) 이어야 ν•œλ‹€ 2. computed property λŠ” λ°˜λ“œμ‹œ 데이터 νƒ€μž…μ„ 지정해야 ν•œλ‹€ var numberOfSlices: Int { get { return pizzaInInches - 4 } } getter getter λŠ” computed property 의 값을 μ–»κΈ° μœ„ν•œ (get) 계산을 ν•˜λŠ” 뢀뢄이닀 *-> computed property 인 numbe...
Select One:

apffhs41

1 week ago

View Post

Realm 을 μ΄μš©ν•œ Search bar 의 μ‚¬μš©

μ„€μ •ν•˜λŠ” 쑰건에 λ§žλŠ” μ…€ μ°ΎκΈ° Container νƒ€μž…μ˜ μ „μ—­λ³€μˆ˜ itemList λ₯Ό μ½μ–΄μ˜¬ λ•Œ itemList 에 값을 λŒ€μž…ν•œλ‹€ (CRUD) 전체 itemList λ₯Ό 필터링 (filter) ν•˜λŠ”λ° 쑰건은 λ‹€μŒκ³Ό κ°™λ‹€ -> title property κ°€ searchBar.text! λ₯Ό 포함 (CONTAINS) ν•˜λ˜, λŒ€μ†Œλ¬Έμž[c], 발음기호[d] 에 상관없이 필터링 ν•˜κ² λ‹€ μ΄λ ‡κ²Œ 필터링 ν•œ 데이터λ₯Ό λ‹€μŒκ³Ό 같이 μ •λ ¬...
Select One:

apffhs41

1 week ago

View Post

μƒˆ pod κΈ°λŠ₯의 ν• λ‹Ήκ³Ό 상속

SwipeCellKit 을 pod install ν–ˆμ„ λ•Œ μƒˆ swift file 에 ν•΄λ‹Ή κΈ°λŠ₯κ³Ό κ΄€λ ¨λœ λͺ¨λ“  λ‚΄μš©μ„ ν• λ‹Ήν•œλ‹€ Super class λŠ” Sub class 의 λ‚΄μš©μ— λŒ€ν•΄μ„œ 아무것도 λͺ¨λ₯Έλ‹€ -> cell 의 identifier 쑰차도 λͺ°λΌμ„œ λͺ¨λ“  VC 의 μ…€ identifier λ₯Ό μΌμΉ˜μ‹œμΌœμ•Ό ν•œλ‹€ κ·Έ 외에도 각 VC μ…€μ˜ Class 와 Module 을 ν•΄λ‹Ή κΈ°λŠ₯에 맞게 λ°”κΏ”μ•Ό ν•œλ‹€ import UIKit import Realm...
Select One:

apffhs41

1 week ago

View Post

Realm 을 μ΄μš©ν•œ 각 Realm Model 의 관계섀정

Navigation View μ—μ„œ 두 VC 의 데이터 νƒ€μž… 관계가 μΌλŒ€λ‹€ 인 경우 @objc dynamic 은 Realm data 의 λ³€ν™”λ₯Ό κ°μ‹œν•œλ‹€λŠ” λœ»μ΄λ‹€ Category Class μ—κ²Œ Item Class λŠ” Item λ°°μ—΄ (List) 이닀 - μΌλŒ€ λ‹€ import Foundation import RealmSwift class Category: Object { @objc dynamic var name: String = "" var items = List<I...
Select One:

apffhs41

1 week ago

View Post

Realm 을 μ΄μš©ν•œ CRUD

Create try realm.write λŠ” {} μ•ˆμ˜ λ‚΄μš©μ„ '컀밋' ν•˜λŠ” κΈ°λŠ₯을 ν•œλ‹€ 데이터 μΆ”κ°€λŠ” realm.add do { try realm.write{ realm.add(category) } } catch { print(error) } tableView.reloadData() Read μ „μ—­λ³€μˆ˜λ‘œ Results<데이터 νƒ€μž…> 을 μ§€μ •ν•œλ‹€ Resul...
Select One:

apffhs41

2 weeks ago

View Post

CoreData λ₯Ό μ΄μš©ν•œ CRUD

AppDelegate 에 CoreData import 와 헀더λ₯Ό μΆ”κ°€ν•œλ‹€ import UIKit import CoreData // MARK: - Core Data stack @main class AppDelegate: UIResponder, UIApplicationDelegate { lazy var persistentContainer: NSPersistentContainer = { let container = NSPersistentContainer(name: "Todoey2") containe...
Select One:

apffhs41

2 weeks ago

View Post

λ‚΄λΆ€μ €μž₯μ†Œ SQLite 에 데이터 μ €μž₯ν•˜κΈ°

μš°μ„  μ €μž₯ν•˜λ €λŠ” Document folder 의 file path λ₯Ό λ§Œλ“ λ‹€ SQLite λŠ” custom type 의 데이터λ₯Ό μ €μž₯ν•  수 μžˆλŠ” κ°€μž₯ μž‘μ€ μœ μ € ν™ˆ μ €μž₯μ†Œλ‹€ class TodoListViewController: UITableViewController { var itemArray = [Item]() let dataFilePath = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first?.appendi...
Select One:

Loading More Content

Back to DevDojo