MacOS下docker brew安装
使用 Homebrew 安装macOS 我们可以使用 Homebrew 来安装 Docker。Homebrew 的 Cask 已经支持 Docker for Mac,因此可以很方便的使用 Homebrew Cask 来进行安装:
❯ brew install --cask --appdir=/Applications dockerRunning `brew update --preinstall`...==> Auto-updated Homebrew!Updated 3 taps (homebrew/cask-versions, homebrew/core and homebrew/cask).==> New Formulaebk brev kyverno==> Updated FormulaeUpdated 36 formulae.==> Updated CasksUpdated 42 ...
Docker 安装 MySQL5.7
查找 MySQL 版本❯ docker search mysqlNAME DESCRIPTION STARS OFFICIAL AUTOMATEDmysql/mysql-server Optimized MySQL Server Docker images. Create… 905 [OK]mysql/mysql-cluster Experimental MySQL Cluster Docker images. Cr… 92 centos/mysql-57-centos7 MySQL 5.7 SQL database server 92 bitnami/mysql Bitnami MySQL ...
Hexo插件之百度主动提交链接
百度如今不重视个人站点,使用sitemap推送提示一直等待中,找了好久找到了这个插件hexo-baidu-url-submit.
安装插件
npm install hexo-baidu-url-submit –save
在根目录config.yml文件里加入以下代码:baidu_url_submit: count: 100 ## 提交最新的一个链接 host: soyl.tech ## 在百度站长平台中注册的域名 token: ******* ## 请注意这是您的秘钥, 所以请不要把博客源代码发布在公众仓库里! path: baidu_urls.txt ## 文本文档的地址, 新链接会保存在此文本文档里
其次,记得查看_config.ym文件中url的值, 必须包含是百度站长平台注册的域名(一般有www), 比如:
# URLurl: https://soyl.techroot: /permalink: :year/:month/:day/:title/
加入新的deployer:deploy:- type: git ## 这是我原来的deployer reposi ...
CloudKit 问题集锦
字段识别Apple Developer
CloudKit
Class
String(list)
NSArray
String
NSString
Asset
CKAsset
Bytes
NSData
Date/Time
NSDate
Double
NSNumber
Int(64)
NSNumber
Location
CLLocation
Reference
CKReference
报错Field ‘___createTime’ is not marked sortable确保CloudKit的Schema中Indexes设置Sortable
URLSession
httpBody自定义格式func postHttp(params: [String:Any]) -> Void { request.httpBody = try! JSONSerialization.data(withJSONObject: params, options: .prettyPrinted)}//使用let params = ["id":dataApiDrugs.descriptionID] as [String:Any]self.postHttp(url: "https://siboxapi.herokuapp.com/description/select", params: params)
使用模型func postHttp(params: PostParm) -> Void { request.httpBody = try! JSONSerialization.data(withJSONObject: params, options: .prettyPrinted) ...
Homebrew命令
Homebrew完美卸载软件及其依赖包brew tap beeftornado/rmtreebrew rmtree git #卸载git及其依赖安装包brew cleanup
Homebrew安装其他版本appbrew search node # 查找node版本brew install node@12 # 安装12版本brew unlink node@16 # 断开16版本的链接brew link --overwrite --force node@12 # 使用12版本
Swift CoreData @FetchRequest
@FetchRequest( entity: UserInfo.entity(), sortDescriptors: [ NSSortDescriptor(keyPath: \UserInfo.name, ascending: true) ], predicate: NSPredicate(format: "name == %@", "Lilei"))) var userinfoes: FetchedResults<UserInfo>
NSPredicate
描述了一个过滤器,我们将使用它来决定显示哪些结果
NSPredicate(format: "name == %@", "LiLei")
NSSortDescriptor
告诉我们要在哪个字段上进行排序,以及我们要它递增还是递减
NSSortDescriptor(keyPath: \UserInfo.name, ascending: true)
SwiftUI Picker
Picker 会根据平台显示所要展示的效果
Pickerstruct Picker<Label, SelectionValue, Content> where Label : View, SelectionValue : Hashable, Content : View
用法Picker基础用法var strengths = ["男", "女"]@State private var selectedStrength = 0var body: some View { Form { Picker(selection: $selectedStrength, label: Text("Strength")) { ForEach(0 ..< strengths.count) { Text(self.strengths[$0]).tag($0) } } ...
SwiftUI Picker
Picker 会根据平台显示所要展示的效果
Pickerstruct Picker<Label, SelectionValue, Content> where Label : View, SelectionValue : Hashable, Content : View
用法Picker基础用法var strengths = ["男", "女"]@State private var selectedStrength = 0var body: some View { Form { Picker(selection: $selectedStrength, label: Text("Strength")) { ForEach(0 ..< strengths.count) { Text(self.strengths[$0]).tag($0) } } ...
Xcode如何进行无线真机调试
Xcode 进行真机调试
登陆Xcode Team
链接手机Xcode菜单导航栏,选择 Window - Devices and Simulators
数据线链接手机,验证后会自动出现该手机信息,选中Connect via network 使手机可以无线测试
测试iOS工程中,选择该手机调试