小黑與程式的邂逅
前端(Web & APP)
49
免費公開
房間資訊
Web & APP程式設計相關的內容,包含:原生與跨平台。
全部
iOS
swift
objective-c
MacOS
Flutter
swiftUI
JavaScript
全部
iOS
swift
objective-c
MacOS
Flutter
swiftUI
JavaScript
全部類型
免費與付費
最新發佈
最新發佈
小黑
2024/09/22
[iOS]遠端程序呼叫(JSONRPCKit)
JSON-RPC是一種設計簡單、無狀態、輕量級的遠端程序呼叫(RPC)協議。
#
jsonrpc
#
swift
#
ios
4
小黑
2024/09/22
[iOS]遠端程序呼叫(JSONRPCKit)
JSON-RPC是一種設計簡單、無狀態、輕量級的遠端程序呼叫(RPC)協議。
#
jsonrpc
#
swift
#
ios
4
小黑
2024/09/22
[iOS]加解密(CryptoSwift)
CryptoSwift提供多種標準的加密演算法,並支援字串與資料之間的轉換。
#
CryptoSwift
#
ios
#
swift
1
小黑
2024/09/22
[iOS]加解密(CryptoSwift)
CryptoSwift提供多種標準的加密演算法,並支援字串與資料之間的轉換。
#
CryptoSwift
#
ios
#
swift
1
小黑
2024/09/21
[iOS]網路請求(APIKit)
APIKit是一種輕量級且類型安全的網路抽象層,將請求與響應類型進行關聯。這篇文章介紹了APIKit的基本概念,包括Request和Session的功能,以及如何定義請求和返回結果的類型,幫助開發者更高效地處理HTTP/HTTPS請求。理解這些基本組件,將使您在建構網路請求時更加得心應手。
#
APIKit
#
Request
#
Typealias
1
小黑
2024/09/21
[iOS]網路請求(APIKit)
APIKit是一種輕量級且類型安全的網路抽象層,將請求與響應類型進行關聯。這篇文章介紹了APIKit的基本概念,包括Request和Session的功能,以及如何定義請求和返回結果的類型,幫助開發者更高效地處理HTTP/HTTPS請求。理解這些基本組件,將使您在建構網路請求時更加得心應手。
#
APIKit
#
Request
#
Typealias
1
小黑
2024/09/21
[iOS]網路請求(Moya)
Moya是一種類型安全的網路抽象層,他將請求類型與響應類型關聯起來,是基於Alamofire的網路請求庫。
#
Moya
#
Alamofire
#
swift
小黑
2024/09/21
[iOS]網路請求(Moya)
Moya是一種類型安全的網路抽象層,他將請求類型與響應類型關聯起來,是基於Alamofire的網路請求庫。
#
Moya
#
Alamofire
#
swift
小黑
2024/09/20
[iOS]大整數處理(BigInt)
本文介紹了BigInt數據類型,支持任意精度的整數運算,底層使用Array<UInt64>。適用於需要超過UIntMax的整數計算,提供全面的算術、位元、與位移運算符,以及數據轉換方法。還支持生成隨機整數、計算整數平方根、最大公約數等功能,是高精度計算的利器。
#
BigInt
#
Array
#
UInt64
1
小黑
2024/09/20
[iOS]大整數處理(BigInt)
本文介紹了BigInt數據類型,支持任意精度的整數運算,底層使用Array<UInt64>。適用於需要超過UIntMax的整數計算,提供全面的算術、位元、與位移運算符,以及數據轉換方法。還支持生成隨機整數、計算整數平方根、最大公約數等功能,是高精度計算的利器。
#
BigInt
#
Array
#
UInt64
1
小黑
2023/11/14
[iOS][swift]UILabel字體顏色漸層
extension UILabel{ func GradientLabel(_ colors: [Any]? , isVertical : Bool, locations: [NSNumber]? = [0.0, 1.0]) { for sub:UIView in sel
#
iOS
#
swift
#
顏色漸層
1
小黑
2023/11/14
[iOS][swift]UILabel字體顏色漸層
extension UILabel{ func GradientLabel(_ colors: [Any]? , isVertical : Bool, locations: [NSNumber]? = [0.0, 1.0]) { for sub:UIView in sel
#
iOS
#
swift
#
顏色漸層
1
小黑
2023/11/13
[iOS][swift]UIView顏色漸層
class GradientView: UIView { private var gradientLayer = CAGradientLayer() private var vertical: Bool = false func draw(_ colo
#
iOS
#
swift
#
UIView
小黑
2023/11/13
[iOS][swift]UIView顏色漸層
class GradientView: UIView { private var gradientLayer = CAGradientLayer() private var vertical: Bool = false func draw(_ colo
#
iOS
#
swift
#
UIView
小黑
2023/11/13
[swift]CoreBluetooth(Service)
CBCentralManager:藍芽管理中心,做外部設備搜尋、連接。 CBPeripheral:外部設備 CBCharacteristic:外部設備的特徵。 首先要在info.plist裡設定新增藍芽服務。然後做宣告,如下: var centralManager: CBCentralM
#
swift
#
CoreBluetooth
#
CBCentralManager
20
小黑
2023/11/13
[swift]CoreBluetooth(Service)
CBCentralManager:藍芽管理中心,做外部設備搜尋、連接。 CBPeripheral:外部設備 CBCharacteristic:外部設備的特徵。 首先要在info.plist裡設定新增藍芽服務。然後做宣告,如下: var centralManager: CBCentralM
#
swift
#
CoreBluetooth
#
CBCentralManager
20
小黑
2023/11/13
[swift]CoreBluetooth(Client)
CBCentralManager:藍芽管理中心,做外部設備搜尋、連接。 CBPeripheral:外部設備 CBCharacteristic:外部設備的特徵。 首先先宣告: var centralManager: CBCentralManager = CBCentralManager.ini
#
swift
#
CoreBluetooth
#
CBCentralManager
小黑
2023/11/13
[swift]CoreBluetooth(Client)
CBCentralManager:藍芽管理中心,做外部設備搜尋、連接。 CBPeripheral:外部設備 CBCharacteristic:外部設備的特徵。 首先先宣告: var centralManager: CBCentralManager = CBCentralManager.ini
#
swift
#
CoreBluetooth
#
CBCentralManager
小黑
2023/11/13
[swift]Core Data新增、更新、查詢、刪除
用來操作 Core Data 的常數 private let coreDataContext = (NSApplication.shared.delegate as! AppDelegate).persistentContainer.viewContext 取的資料數量: func get
#
swift
#
coredata
小黑
2023/11/13
[swift]Core Data新增、更新、查詢、刪除
用來操作 Core Data 的常數 private let coreDataContext = (NSApplication.shared.delegate as! AppDelegate).persistentContainer.viewContext 取的資料數量: func get
#
swift
#
coredata
小黑
2023/11/09
[swift]字串交換、切割、串接、擷取、檢查
字串交換: let str = "被誰喜歡,又喜歡誰呢?" // 交換 print(str.replacingOccurrences(of: ",又", with: "?")) //被誰喜歡?喜歡誰呢? 字串去首尾: let str = "被誰喜歡,又喜歡誰呢?" // 去首尾 print
#
swift
#
replacingOccurrences
#
split
10
小黑
2023/11/09
[swift]字串交換、切割、串接、擷取、檢查
字串交換: let str = "被誰喜歡,又喜歡誰呢?" // 交換 print(str.replacingOccurrences(of: ",又", with: "?")) //被誰喜歡?喜歡誰呢? 字串去首尾: let str = "被誰喜歡,又喜歡誰呢?" // 去首尾 print
#
swift
#
replacingOccurrences
#
split
10
小黑
2023/11/09
[swift]data、int與string轉換
int to data: //int to data var num = -12300 let data = Data.init(bytes: &num, count: MemoryLayout.size(ofValue: num)) // bytes : 8 elements //
#
swift
#
MemoryLayout
#
Data
小黑
2023/11/09
[swift]data、int與string轉換
int to data: //int to data var num = -12300 let data = Data.init(bytes: &num, count: MemoryLayout.size(ofValue: num)) // bytes : 8 elements //
#
swift
#
MemoryLayout
#
Data
小黑
2023/11/09
[swift]移位運算(Shift Operator)
以底下兩數字為例: let bin1:UInt8 = 0b11111111 //255 let bin2:UInt8 = 0b00001000 //8 向右位移: let shiftRightBin1Result = bin1>>1 print(String(shiftRightBin1R
#
位移運算
#
swift
#
向右
小黑
2023/11/09
[swift]移位運算(Shift Operator)
以底下兩數字為例: let bin1:UInt8 = 0b11111111 //255 let bin2:UInt8 = 0b00001000 //8 向右位移: let shiftRightBin1Result = bin1>>1 print(String(shiftRightBin1R
#
位移運算
#
swift
#
向右
小黑
2023/11/09
[swift]位元運算(Bitwise operator)
以底下兩數字為例: let bin1:UInt8 = 0b11111111 //255 let bin2:UInt8 = 0b00001000 //8 and運算 let andResult = bin1 & bin2 print(String(andResult,radix: 2))//
#
swift
#
and
#
or
小黑
2023/11/09
[swift]位元運算(Bitwise operator)
以底下兩數字為例: let bin1:UInt8 = 0b11111111 //255 let bin2:UInt8 = 0b00001000 //8 and運算 let andResult = bin1 & bin2 print(String(andResult,radix: 2))//
#
swift
#
and
#
or
小黑
2023/11/08
[swift]二、八、十六進制表示方式
二進制表示方式 let bin1:UInt8 = 0b11111111 //255 let bin2:UInt8 = 0b00001000 //8 八進制表示方式 let otc:UInt8 = 0o377 //255 十六進制表示方式 let hex:UInt8 = 0xff /
#
swift
#
二進制
#
八進制
小黑
2023/11/08
[swift]二、八、十六進制表示方式
二進制表示方式 let bin1:UInt8 = 0b11111111 //255 let bin2:UInt8 = 0b00001000 //8 八進制表示方式 let otc:UInt8 = 0o377 //255 十六進制表示方式 let hex:UInt8 = 0xff /
#
swift
#
二進制
#
八進制
小黑
2023/11/08
[swift]二、八、十與十六進位(負數)轉換 使用uint16、int16
十進位轉二進位(Decimal to Binary) let dec = -813 let bin = String(UInt16(bitPattern: Int16(dec)), radix: 2) print(bin) // "1111110011010011" 十進位轉八進位(Deci
#
swift
#
負數
#
UInt16
2
小黑
2023/11/08
[swift]二、八、十與十六進位(負數)轉換 使用uint16、int16
十進位轉二進位(Decimal to Binary) let dec = -813 let bin = String(UInt16(bitPattern: Int16(dec)), radix: 2) print(bin) // "1111110011010011" 十進位轉八進位(Deci
#
swift
#
負數
#
UInt16
2
小黑
2023/11/08
[swift]二、八、十與十六進位轉換
十進位轉二進位(Decimal to Binary) let dec = 813 let bin = String(dec, radix: 2) print(bin) // "1100101101" 十進位轉八進位(Decimal to Octal) let dec = 813 let o
#
swift
#
八進位
#
二進位
1
小黑
2023/11/08
[swift]二、八、十與十六進位轉換
十進位轉二進位(Decimal to Binary) let dec = 813 let bin = String(dec, radix: 2) print(bin) // "1100101101" 十進位轉八進位(Decimal to Octal) let dec = 813 let o
#
swift
#
八進位
#
二進位
1
小黑
2023/11/08
[swift]時間轉換
取得當前時間字串 let currentDate = NSDate() let dateFormatter = DateFormatter() dateFormatter.locale = Locale.init(identifier: "zh_Hant_TW") dateFormatter.ti
#
時間
#
戳記
#
swift
小黑
2023/11/08
[swift]時間轉換
取得當前時間字串 let currentDate = NSDate() let dateFormatter = DateFormatter() dateFormatter.locale = Locale.init(identifier: "zh_Hant_TW") dateFormatter.ti
#
時間
#
戳記
#
swift
小黑
2023/11/08
[swift]時間格式
取得當前時間 let currentDate = NSDate() 設定時間格式 樣式一: let dateFormatter = DateFormatter() dateFormatter.locale = Locale.init(identifier: "zh_Hant_TW") d
#
swift
#
時間格式
#
NSDate
小黑
2023/11/08
[swift]時間格式
取得當前時間 let currentDate = NSDate() 設定時間格式 樣式一: let dateFormatter = DateFormatter() dateFormatter.locale = Locale.init(identifier: "zh_Hant_TW") d
#
swift
#
時間格式
#
NSDate
加入
全部
iOS
swift
objective-c
MacOS
Flutter
swiftUI
JavaScript
全部
iOS
swift
objective-c
MacOS
Flutter
swiftUI
JavaScript
全部類型
免費與付費
最新發佈
最新發佈
小黑
2024/09/22
[iOS]遠端程序呼叫(JSONRPCKit)
JSON-RPC是一種設計簡單、無狀態、輕量級的遠端程序呼叫(RPC)協議。
#
jsonrpc
#
swift
#
ios
4
小黑
2024/09/22
[iOS]遠端程序呼叫(JSONRPCKit)
JSON-RPC是一種設計簡單、無狀態、輕量級的遠端程序呼叫(RPC)協議。
#
jsonrpc
#
swift
#
ios
4
小黑
2024/09/22
[iOS]加解密(CryptoSwift)
CryptoSwift提供多種標準的加密演算法,並支援字串與資料之間的轉換。
#
CryptoSwift
#
ios
#
swift
1
小黑
2024/09/22
[iOS]加解密(CryptoSwift)
CryptoSwift提供多種標準的加密演算法,並支援字串與資料之間的轉換。
#
CryptoSwift
#
ios
#
swift
1
小黑
2024/09/21
[iOS]網路請求(APIKit)
APIKit是一種輕量級且類型安全的網路抽象層,將請求與響應類型進行關聯。這篇文章介紹了APIKit的基本概念,包括Request和Session的功能,以及如何定義請求和返回結果的類型,幫助開發者更高效地處理HTTP/HTTPS請求。理解這些基本組件,將使您在建構網路請求時更加得心應手。
#
APIKit
#
Request
#
Typealias
1
小黑
2024/09/21
[iOS]網路請求(APIKit)
APIKit是一種輕量級且類型安全的網路抽象層,將請求與響應類型進行關聯。這篇文章介紹了APIKit的基本概念,包括Request和Session的功能,以及如何定義請求和返回結果的類型,幫助開發者更高效地處理HTTP/HTTPS請求。理解這些基本組件,將使您在建構網路請求時更加得心應手。
#
APIKit
#
Request
#
Typealias
1
小黑
2024/09/21
[iOS]網路請求(Moya)
Moya是一種類型安全的網路抽象層,他將請求類型與響應類型關聯起來,是基於Alamofire的網路請求庫。
#
Moya
#
Alamofire
#
swift
小黑
2024/09/21
[iOS]網路請求(Moya)
Moya是一種類型安全的網路抽象層,他將請求類型與響應類型關聯起來,是基於Alamofire的網路請求庫。
#
Moya
#
Alamofire
#
swift
小黑
2024/09/20
[iOS]大整數處理(BigInt)
本文介紹了BigInt數據類型,支持任意精度的整數運算,底層使用Array<UInt64>。適用於需要超過UIntMax的整數計算,提供全面的算術、位元、與位移運算符,以及數據轉換方法。還支持生成隨機整數、計算整數平方根、最大公約數等功能,是高精度計算的利器。
#
BigInt
#
Array
#
UInt64
1
小黑
2024/09/20
[iOS]大整數處理(BigInt)
本文介紹了BigInt數據類型,支持任意精度的整數運算,底層使用Array<UInt64>。適用於需要超過UIntMax的整數計算,提供全面的算術、位元、與位移運算符,以及數據轉換方法。還支持生成隨機整數、計算整數平方根、最大公約數等功能,是高精度計算的利器。
#
BigInt
#
Array
#
UInt64
1
小黑
2023/11/14
[iOS][swift]UILabel字體顏色漸層
extension UILabel{ func GradientLabel(_ colors: [Any]? , isVertical : Bool, locations: [NSNumber]? = [0.0, 1.0]) { for sub:UIView in sel
#
iOS
#
swift
#
顏色漸層
1
小黑
2023/11/14
[iOS][swift]UILabel字體顏色漸層
extension UILabel{ func GradientLabel(_ colors: [Any]? , isVertical : Bool, locations: [NSNumber]? = [0.0, 1.0]) { for sub:UIView in sel
#
iOS
#
swift
#
顏色漸層
1
小黑
2023/11/13
[iOS][swift]UIView顏色漸層
class GradientView: UIView { private var gradientLayer = CAGradientLayer() private var vertical: Bool = false func draw(_ colo
#
iOS
#
swift
#
UIView
小黑
2023/11/13
[iOS][swift]UIView顏色漸層
class GradientView: UIView { private var gradientLayer = CAGradientLayer() private var vertical: Bool = false func draw(_ colo
#
iOS
#
swift
#
UIView
小黑
2023/11/13
[swift]CoreBluetooth(Service)
CBCentralManager:藍芽管理中心,做外部設備搜尋、連接。 CBPeripheral:外部設備 CBCharacteristic:外部設備的特徵。 首先要在info.plist裡設定新增藍芽服務。然後做宣告,如下: var centralManager: CBCentralM
#
swift
#
CoreBluetooth
#
CBCentralManager
20
小黑
2023/11/13
[swift]CoreBluetooth(Service)
CBCentralManager:藍芽管理中心,做外部設備搜尋、連接。 CBPeripheral:外部設備 CBCharacteristic:外部設備的特徵。 首先要在info.plist裡設定新增藍芽服務。然後做宣告,如下: var centralManager: CBCentralM
#
swift
#
CoreBluetooth
#
CBCentralManager
20
小黑
2023/11/13
[swift]CoreBluetooth(Client)
CBCentralManager:藍芽管理中心,做外部設備搜尋、連接。 CBPeripheral:外部設備 CBCharacteristic:外部設備的特徵。 首先先宣告: var centralManager: CBCentralManager = CBCentralManager.ini
#
swift
#
CoreBluetooth
#
CBCentralManager
小黑
2023/11/13
[swift]CoreBluetooth(Client)
CBCentralManager:藍芽管理中心,做外部設備搜尋、連接。 CBPeripheral:外部設備 CBCharacteristic:外部設備的特徵。 首先先宣告: var centralManager: CBCentralManager = CBCentralManager.ini
#
swift
#
CoreBluetooth
#
CBCentralManager
小黑
2023/11/13
[swift]Core Data新增、更新、查詢、刪除
用來操作 Core Data 的常數 private let coreDataContext = (NSApplication.shared.delegate as! AppDelegate).persistentContainer.viewContext 取的資料數量: func get
#
swift
#
coredata
小黑
2023/11/13
[swift]Core Data新增、更新、查詢、刪除
用來操作 Core Data 的常數 private let coreDataContext = (NSApplication.shared.delegate as! AppDelegate).persistentContainer.viewContext 取的資料數量: func get
#
swift
#
coredata
小黑
2023/11/09
[swift]字串交換、切割、串接、擷取、檢查
字串交換: let str = "被誰喜歡,又喜歡誰呢?" // 交換 print(str.replacingOccurrences(of: ",又", with: "?")) //被誰喜歡?喜歡誰呢? 字串去首尾: let str = "被誰喜歡,又喜歡誰呢?" // 去首尾 print
#
swift
#
replacingOccurrences
#
split
10
小黑
2023/11/09
[swift]字串交換、切割、串接、擷取、檢查
字串交換: let str = "被誰喜歡,又喜歡誰呢?" // 交換 print(str.replacingOccurrences(of: ",又", with: "?")) //被誰喜歡?喜歡誰呢? 字串去首尾: let str = "被誰喜歡,又喜歡誰呢?" // 去首尾 print
#
swift
#
replacingOccurrences
#
split
10
小黑
2023/11/09
[swift]data、int與string轉換
int to data: //int to data var num = -12300 let data = Data.init(bytes: &num, count: MemoryLayout.size(ofValue: num)) // bytes : 8 elements //
#
swift
#
MemoryLayout
#
Data
小黑
2023/11/09
[swift]data、int與string轉換
int to data: //int to data var num = -12300 let data = Data.init(bytes: &num, count: MemoryLayout.size(ofValue: num)) // bytes : 8 elements //
#
swift
#
MemoryLayout
#
Data
小黑
2023/11/09
[swift]移位運算(Shift Operator)
以底下兩數字為例: let bin1:UInt8 = 0b11111111 //255 let bin2:UInt8 = 0b00001000 //8 向右位移: let shiftRightBin1Result = bin1>>1 print(String(shiftRightBin1R
#
位移運算
#
swift
#
向右
小黑
2023/11/09
[swift]移位運算(Shift Operator)
以底下兩數字為例: let bin1:UInt8 = 0b11111111 //255 let bin2:UInt8 = 0b00001000 //8 向右位移: let shiftRightBin1Result = bin1>>1 print(String(shiftRightBin1R
#
位移運算
#
swift
#
向右
小黑
2023/11/09
[swift]位元運算(Bitwise operator)
以底下兩數字為例: let bin1:UInt8 = 0b11111111 //255 let bin2:UInt8 = 0b00001000 //8 and運算 let andResult = bin1 & bin2 print(String(andResult,radix: 2))//
#
swift
#
and
#
or
小黑
2023/11/09
[swift]位元運算(Bitwise operator)
以底下兩數字為例: let bin1:UInt8 = 0b11111111 //255 let bin2:UInt8 = 0b00001000 //8 and運算 let andResult = bin1 & bin2 print(String(andResult,radix: 2))//
#
swift
#
and
#
or
小黑
2023/11/08
[swift]二、八、十六進制表示方式
二進制表示方式 let bin1:UInt8 = 0b11111111 //255 let bin2:UInt8 = 0b00001000 //8 八進制表示方式 let otc:UInt8 = 0o377 //255 十六進制表示方式 let hex:UInt8 = 0xff /
#
swift
#
二進制
#
八進制
小黑
2023/11/08
[swift]二、八、十六進制表示方式
二進制表示方式 let bin1:UInt8 = 0b11111111 //255 let bin2:UInt8 = 0b00001000 //8 八進制表示方式 let otc:UInt8 = 0o377 //255 十六進制表示方式 let hex:UInt8 = 0xff /
#
swift
#
二進制
#
八進制
小黑
2023/11/08
[swift]二、八、十與十六進位(負數)轉換 使用uint16、int16
十進位轉二進位(Decimal to Binary) let dec = -813 let bin = String(UInt16(bitPattern: Int16(dec)), radix: 2) print(bin) // "1111110011010011" 十進位轉八進位(Deci
#
swift
#
負數
#
UInt16
2
小黑
2023/11/08
[swift]二、八、十與十六進位(負數)轉換 使用uint16、int16
十進位轉二進位(Decimal to Binary) let dec = -813 let bin = String(UInt16(bitPattern: Int16(dec)), radix: 2) print(bin) // "1111110011010011" 十進位轉八進位(Deci
#
swift
#
負數
#
UInt16
2
小黑
2023/11/08
[swift]二、八、十與十六進位轉換
十進位轉二進位(Decimal to Binary) let dec = 813 let bin = String(dec, radix: 2) print(bin) // "1100101101" 十進位轉八進位(Decimal to Octal) let dec = 813 let o
#
swift
#
八進位
#
二進位
1
小黑
2023/11/08
[swift]二、八、十與十六進位轉換
十進位轉二進位(Decimal to Binary) let dec = 813 let bin = String(dec, radix: 2) print(bin) // "1100101101" 十進位轉八進位(Decimal to Octal) let dec = 813 let o
#
swift
#
八進位
#
二進位
1
小黑
2023/11/08
[swift]時間轉換
取得當前時間字串 let currentDate = NSDate() let dateFormatter = DateFormatter() dateFormatter.locale = Locale.init(identifier: "zh_Hant_TW") dateFormatter.ti
#
時間
#
戳記
#
swift
小黑
2023/11/08
[swift]時間轉換
取得當前時間字串 let currentDate = NSDate() let dateFormatter = DateFormatter() dateFormatter.locale = Locale.init(identifier: "zh_Hant_TW") dateFormatter.ti
#
時間
#
戳記
#
swift
小黑
2023/11/08
[swift]時間格式
取得當前時間 let currentDate = NSDate() 設定時間格式 樣式一: let dateFormatter = DateFormatter() dateFormatter.locale = Locale.init(identifier: "zh_Hant_TW") d
#
swift
#
時間格式
#
NSDate
小黑
2023/11/08
[swift]時間格式
取得當前時間 let currentDate = NSDate() 設定時間格式 樣式一: let dateFormatter = DateFormatter() dateFormatter.locale = Locale.init(identifier: "zh_Hant_TW") d
#
swift
#
時間格式
#
NSDate