我将jk用作vim的转义序列以及bash和zshell的vi-mode。我该怎么做?
即在vim中:
inoremap jk <esc>
Run Code Online (Sandbox Code Playgroud)
重击:
bind -m vi-insert '"jk": vi-movement-mode'
Run Code Online (Sandbox Code Playgroud)
sh
bindkey -M viins 'jk' vi-cmd-mode
Run Code Online (Sandbox Code Playgroud)
鱼壳等于多少?
我在swift 3中编写了一个需要与我的服务器通信的应用程序.我有der和crt格式的完整证书链,我是CA的(不要与自签名混淆).如何在我的应用程序中使用它来验证我的服务器?以下是我的休息电话和回复
休息电话:
var request = URLRequest(url: URL(string: "https://myserver/login")!)
request.addValue("Content-Type", forHTTPHeaderField: "application/json")
request.httpMethod = "GET"
let session = URLSession.shared
session.dataTask(with: request) {data, response, err in
print("=========================DATA===============================")
if data != nil {
print(data!)
}
print("=========================RESPONSE===============================")
if response != nil {
print(response!)
}
print("=========================ERR===============================")
if err != nil {
print(err!)
}
}.resume()
Run Code Online (Sandbox Code Playgroud)
输出:
=========================DATA===============================
=========================RESPONSE===============================
=========================ERR===============================
Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x60800011f020>, NSLocalizedRecoverySuggestion=Would you like to connect to …Run Code Online (Sandbox Code Playgroud)