Wei's Diary of Programming

Machine Learning Note: Week 1

Course Information Course Name: Machine Learning Professor: Andrew Ng Course URL: https://www.coursera.org/learn/machine-learning/ Week: One Introduction What is Machine Learning? A c...

How to retrieve response headers with Alamofire in Swift?

Question I’m using Alamofire to send a request to API, and API will send a reponse with headers. How can I retrive headers from it. Answer The answer below is using Swift 3. Alamofire.request(.GE...

Github Git Cheat Sheet

Cheat Sheet Want to learn more about git? Just found Github provides a cheat sheet for learning. Very helpful! Check it out! GIT CHEAT SHEET GIT CHEAT SHEET This is the end of post

How to check if UserDefaults key exists in Swift?

Question I wanna check if any specific UserDefaults key exists in the application, how to start with it? Answer The answer below is using Swift 3. func isKeyPresentInUserDefaults(key: String) -&g...

这是一件让我觉得相见恨晚,物超所值的东西!

它是什么? 它是 WD 4TB My Cloud Personal Network Attached Storage,是一款 NAS 设置。你可以把它理解成一个「不能移动」的大容量硬盘,同时也可以作为整个家庭的娱乐终端,还可以作为一台没有显示器的微型电脑。我是在 Amazon 上购买,价格是 $170,附上购买链接。 购买时选择 4TB 的容量就足够用,同时选择「Single Drive」...

How to send POST request with parameters in Swift?

Question I would like to send a POST request to an API with two parameters. How to start with it? The API is https://www.google.com/ The parameters are id = 1234 name = wei Answer Below is the ...

How to save local data in Swift?

Question I would like to save local data in my app, and need to use it sometime. The data could be a response from server. The application is a swift-build application. Answer In Swift 3, we can ...

破解 WD MyCloud Gen2 安装第三方应用

本篇教程基于的环境 机器是 WD MyCloud Gen2,固件版本是 2.21.126; WD MyCloud 开启 SSH 访问的功能; 开发环境是 macOS; 下载所需文件 去百度网盘下载所需文件。 链接: https://pan.baidu.com/s/1kVhuAgB 密码: 8wj6 破解步骤 登陆 WD MyCloud 的控制面板,在「设置」中开启...

Sereval Basic Linux Netstat Command

What is Netstat? In computing, netstat (network statistics) is a command-line network utility tool that displays network connections for the Transmission Control Protocol (both incoming and outgoin...

WD MyCloud 安装 Aria2 教程

本篇教程基于的环境 机器是 WD MyCloud Gen2,固件版本是 2.21.126; 开发环境是基于 macOS 的基础; 需要使用 Terminal 来输入相关语句; 需要使用 Linux 语句进行相关操作; WD MyCloud 可以安装外部应用; WD MyCloud 开启 SSH 访问的功能; WD MyCloud 相关操作 下载所需文件 从以下链...