Scrapy 抓取简书专题下的文章

可以开一个定时任务,每天抓取自己感兴趣的相关文章,集中起来进行阅读。平时看简书的 程序员 专题比较多,先从这个开始。

安装 Python

一般 Linux 或者 Mac OS 都会自带 python 环境

安装 virtualenv

pippython 下的包管理工具。一般安装 python 后会自带 pip, 或者可以通过 brew 安装。
然后通过 pip 安装 python 虚拟环境:virtualenv

注:OS X 10.11 安装 Scrapy 有问题,所以借助 virtualenv

1
2
3
4
5
# 安装 virtualenv
$ pip install virtualenv

# 创建一个虚拟环境,名称为 venv
$ virtualenv venv

安装 Scrapy

爬虫的主要模块,更多详细文档可以查看Scrapy 1.0 官网

1
$ pip install scrapy

分析网页结构

有了基础的准备,可以开始爬虫了,首先需要分析网页结构,找到自己需要的信息。

简书

抓取文章列表

jianshu_spider.py

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python
# -*- coding:utf-8 -*-

import scrapy

class JianshuSpider(scrapy.Spider):

"""docstring for JianshuSpider"""

# spider 的名字
name = "jianshu"
# 爬虫的起始 url
start_urls = ["https://www.jianshu.com/collections/16/notes?order_by=added_at"]

# 爬虫开始,收到响应回调 parse 函数
def parse(self, response):
for item in response.css('.article-list li'):
# 文章标题
print item.css('h4 a::text').extract()[0].encode('utf-8')
# 文章链接
print item.css('h4 a::attr(href)').extract()

运行: scrapy runspider jianshu_spider.py,输出如下结果:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
XMPP搭建本地服务器、实现即时通讯(一)
[u'/p/5ea6b611c5b1']
翻译:CFNetwork编程指南(CFNetwork Programming Guide)
[u'/p/69b181a33383']
ios - 多线程_基础
[u'/p/d5b781e68148']
【译】Volley官方文档一:使用Volley传递网络数据
[u'/p/231e03b918bd']
UIGestureRecognizer手势
[u'/p/c470ae6478ce']
关于JS闭包
[u'/p/794812620271']
软件项目之客户与开发
[u'/p/727428bc58df']
Linux 内核系统调用
[u'/p/0e25bee35c66']
WWDC 学习笔记 —— 值类型在 Swift 中的应用
[u'/p/133bce4ea3bc']

既然是爬虫,然后就可以根据每个文章的url,抓取文章的内容。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env python
# -*- coding:utf-8 -*-

import scrapy

class JianshuSpider(scrapy.Spider):

"""docstring for JianshuSpider"""

# spider 的名字
name = "jianshu"
# 爬虫的起始 url
start_urls = ["https://www.jianshu.com/collections/16/notes?order_by=added_at"]

# 爬虫开始,收到响应回调 parse 函数
def parse(self, response):
for item in response.css('.article-list li'):
# 文章标题
# print item.css('h4 a::text').extract()[0].encode('utf-8')
# 文章链接
short_url = item.css('h4 a::attr(href)').extract()[0]
# 文章完整的url
full_url = response.urljoin(short_url)
print full_url
# 抓文章详情页
yield scrapy.Request(full_url,callback=self.parse_article)

def parse_article(self, response):
yield {
'title':response.css('.preview h1::text').extract()[0],
'show-content':response.css('.preview .show-content').extract()[0],
'link':response.url,
# 文章字数,阅读类等通过 js 动态获取,没法直接爬到
# 'wordage':response.css('.wordage::text').extract(),
# 'views-count':response.css('.views-count::text').extract(),
# 'comments-count':response.css('.comments-count::text').extract(),
# 'likes-count':response.css('.likes-count::text').extract(),
}

将结果导出为 json 文件

1
$ scrapy runspider jianshu_spider.py -o res.json

运行结果: res.json文件

1
2
3
4
5
6
7
8
9
10
11
12
[
{"title": "WWDC \u5b66\u4e60\u7b14\u8bb0 \u2014\u2014 \u503c\u7c7b\u578b\u5728 Swift \u4e2d\u7684\u5e94\u7528", "link": "https://www.jianshu.com/p/133bce4ea3bc", "show-content": "<div class=\"show-content\"><h4>WWDC 2015 - Session 414 - iOS, OS X, watchOS</h4>\n<p>\u672c\u6587\u6838\u5fc3\u57fa\u4e8e WWDC \u4e3b\u9898\u6f14\u8bb2\u5185\u5bb9\uff0c\u7ed3\u5408\u6211\u81ea\u5df1\u7684\u4e00\u4e9b\u60f3\u6cd5\uff0c\u5927\u5bb6\u53ef\u4ee5\u5f53\u6210\u7ffb\u8bd1\u770b\u3002</p>\n<div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1507403-2dd4ccb28e89a602.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1507403-2dd4ccb28e89a602.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\">WWDC 2015</div>\n</div>\n<p>Swift \u7684\u53d8\u91cf\u7c7b\u578b\u6709\u4e24\u79cd\uff0c\u4e00\u79cd\u662f\u503c\u7c7b\u578b\uff0c\u53e6\u5916\u4e00\u79cd\u5219\u662f\u5f15\u7528\u7c7b\u578b\u3002\u90a3\u4e48\u600e\u4e48\u533a\u5206\u4e00\u4e2a\u7c7b\u578b\u662f\u503c\u7c7b\u578b\u8fd8\u662f\u5f15\u7528\u7c7b\u578b\u5462\uff1f\u5176\u5b9e\u5f88\u7b80\u5355\uff0c\u7528 <code>struct</code> \u58f0\u660e\u7684\u4e3a\u503c\u7c7b\u578b\uff0c\u7528 <code>class</code> \u58f0\u660e\u7684\u4e3a\u5f15\u7528\u7c7b\u578b\u3002\u4e0b\u9762\u6211\u4eec\u7528\u4e00\u4e2a\u4f8b\u5b50\u6765\u6f14\u793a\u4e00\u4e0b\u5982\u4f55\u5408\u7406\u4f7f\u7528\u503c\u7c7b\u578b\u3002</p>\n<p>\u8fd9\u4e2a\u4f8b\u5b50\u5f88\u7b80\u5355\uff0c\u8fd8\u662f\u753b\u677f\u5e94\u7528\uff0c\u6211\u4eec\u9700\u8981\u4e00\u4e2a\u7c7b\u578b\u6765\u8868\u793a\u4e00\u4e2a\u56fe\u5f62\uff0c\u8fd9\u4e2a\u7c7b\u578b\u5305\u542b\u989c\u8272\u548c\u8def\u5f84\u3002\u6211\u4eec\u7528 <code>struct</code> \u6765\u58f0\u660e\u8fd9\u4e2a\u7c7b\u578b\uff0c\u8fd9\u6837\u56fe\u5f62\u5c06\u4f1a\u5341\u5206\u5bb9\u6613\u88ab\u62f7\u8d1d\u3002Undo Stack \u9700\u8981\u4fdd\u5b58\u5404\u4e2a\u65f6\u671f\u7684\u56fe\u5f62\u72b6\u6001\uff0c\u5982\u679c\u7528\u5f15\u7528\u7c7b\u578b\uff0c\u53ef\u60f3\u800c\u77e5\uff0c\u5386\u53f2\u56fe\u5f62\u7684\u5c5e\u6027\u5c06\u4f1a\u88ab\u4fee\u6539\u3002</p>\n<p>\u4ee3\u7801\u5982\u4e0b\uff1a<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1507403-ae92a276b5aeb365.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1507403-ae92a276b5aeb365.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\">Figure. 1</div>\n</div>\n<p>\u5148\u4e0d\u8981\u7406\u4f1a\u90a3\u4e2a <code>mutablePath</code>\uff0c\u6211\u4eec\u5148\u5c1d\u8bd5\u76f4\u63a5\u4fee\u6539 <code>path</code> \u5c5e\u6027\uff0c\u770b\u770b\u4f1a\u6709\u4ec0\u4e48\u6548\u679c\u3002</p>\n<p>\u6d4b\u8bd5\u7528\u4f8b\u5982\u4e0b\uff1a<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1507403-4bbd2f45dd9b6c44.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1507403-4bbd2f45dd9b6c44.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\">Figure. 2</div>\n</div>\n<p>\u663e\u7136\uff0c<code>rect2</code> \u62f7\u8d1d\u4e86 <code>rect1</code> \u7684\u6570\u636e\uff0c\u6240\u4ee5\u4fee\u6539 <code>rect2</code> \u7684 <code>color</code> \u5c5e\u6027\u5e76\u4e0d\u4f1a\u5f71\u54cd\u5230 <code>rect1</code>\uff0c\u7136\u540e\u6211\u4eec\u770b\u770b\u6548\u679c\uff1a<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1507403-238ae0ceae54b8c0.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1507403-238ae0ceae54b8c0.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\">Figure. 3</div>\n</div>\n<p>\u8bf6\uff1f\u600e\u4e48\u53ea\u6709\u4e00\u4e2a\u4e09\u89d2\u5f62\uff0c<code>rect1</code> \u90a3\u4e2a\u77e9\u5f62\u5462\uff1f</p>\n<p>\u95ee\u9898\u5176\u5b9e\u5c31\u51fa\u73b0\u5728 <code>path</code> \u4e0a\u3002<code>rect2</code> \u867d\u7136\u590d\u5236\u4e86 <code>rect1</code>\uff0c\u4f46\u662f\u53ea\u662f\u6d45\u590d\u5236\uff0c\u4e5f\u5c31\u662f\u628a <code>color</code> \u548c <code>path</code> \u7684\u5f15\u7528\u590d\u5236\u4e86\u4e00\u4efd\uff0c\u7531\u4e8e\u6211\u4eec\u5bf9\u4e8e <code>rect2</code> \u7684 <code>color</code> \u5c5e\u6027\u662f\u76f4\u63a5\u8d4b\u503c\u4fee\u6539\uff0c\u6240\u4ee5\u5185\u5b58\u4e2d\u5b9e\u9645\u7684\u64cd\u4f5c\u5982\u4e0b\uff1a<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1507403-7490bb10e8c3a8eb.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1507403-7490bb10e8c3a8eb.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\">Figure. 4</div>\n</div>\n<p>\u7136\u800c\u5bf9\u4e8e <code>path</code> \u7684\u4fee\u6539\uff0c\u6211\u4eec\u901a\u8fc7\u5f15\u7528\u7c7b\u578b\u76f4\u63a5\u8bbf\u95ee\u4e86\u5185\u5b58\u4e2d\u552f\u4e00\u7684 <code>UIBezierPath</code> \u5bf9\u8c61\uff0c\u6240\u4ee5\u4e24\u8005\u7684 <code>path</code> \u5c31\u90fd\u88ab\u4fee\u6539\u4e86\u3002</p>\n<p>\u90a3\u5e94\u8be5\u600e\u4e48\u505a\u5462\uff1fWWDC \u4e2d\u63d0\u5230\u7684\u65b9\u6cd5\u662f <strong>Copy-on-wirte</strong>\uff0c\u4e5f\u5c31\u662f\u8bf4\u9700\u8981\u4fee\u6539\u503c\u7c7b\u578b\u4e2d\u7684\u67d0\u4e2a\u5f15\u7528\u7c7b\u578b\u65f6\uff0c\u5148\u5c06\u5176\u590d\u5236\u4e00\u4efd\uff0c\u518d\u8fdb\u884c\u4fee\u6539\u3002\u5728 Swift \u4e2d\u6211\u4eec\u5c31\u53ef\u4ee5\u8fd9\u4e48\u505a\uff1a<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1507403-38d76a40adb27234.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1507403-38d76a40adb27234.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\">Figure. 5</div>\n</div><p><br>\u901a\u8fc7\u5c5e\u6027\u8bbf\u95ee\u5668\uff0c\u5728\u5916\u90e8\u8bbf\u95ee\u8fd9\u4e2a\u5c5e\u6027\u65f6\u5148\u5c06\u539f\u6765\u7684\u5c5e\u6027\u590d\u5236\u4e00\u4efd\uff0c\u7136\u540e\u8fd4\u56de\u590d\u5236\u540e\u7684\u5c5e\u6027\uff0c\u8fd9\u6837\u6211\u4eec\u7684\u4fee\u6539\u5c31\u76f8\u4e92\u9694\u79bb\u3001\u4e92\u4e0d\u5e72\u6270\u4e86\u3002\u6700\u540e\u4fee\u6539\u540e\u7684\u4ee3\u7801\u5c31\u662f\u8fd9\u6837\u4e86\uff1a<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1507403-2c3ab30c0ecc5f61.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1507403-2c3ab30c0ecc5f61.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\">Figure. 6</div>\n</div>\n<p>\u770b\uff0c\u4e24\u4e2a\u56fe\u5f62\u90fd\u7ed8\u5236\u51fa\u6765\u4e86\u5427\u3002</p>\n<p>\u603b\u7ed3\u672c Session\uff0c\u7740\u91cd\u8bb2\u7684\u5c31\u662f\u8fd9\u4e2a <strong>Copy-on-write</strong> \u6a21\u5f0f\uff0c\u53e6\u5916 WWDC \u4e2d\u8fd8\u6307\u51fa PhotoShop \u4e5f\u91c7\u7528\u4e86\u8fd9\u79cd\u6a21\u5f0f\uff1a</p>\n<div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1507403-7f277ef80a2c9726.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1507403-7f277ef80a2c9726.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\">WWDC Keynote</div>\n</div>\n<p>\u5b83\u8db3\u591f\u9ad8\u6548\u3001\u65b9\u4fbf\u3002</p>\n</div>"},
{"title": "Linux \u5185\u6838\u7cfb\u7edf\u8c03\u7528", "link": "https://www.jianshu.com/p/0e25bee35c66", "show-content": "<div class=\"show-content\"><h2>\n<a href=\"https://mooc.study.163.com/course/USTC-1000029000\" target=\"_blank\">\u300aLinux \u5185\u6838\u5206\u6790\u300b MOOC \u8bfe\u7a0b\u5b9e\u9a8c</a> \u5206\u6790 Linux \u7cfb\u7edf\u8c03\u7528\u8fc7\u7a0b</h2>\n<h3>1.\u7cfb\u7edf\u8c03\u7528\u6982\u8ff0</h3>\n<p>\u73b0\u4ee3\u64cd\u4f5c\u7cfb\u7edf\u4e3a\u4e86\u4fdd\u8bc1\u5b89\u5168\u6027\uff0c\u901a\u5e38\u628a\u8fd0\u884c\u72b6\u6001\u5206\u4e3a\u7528\u6237\u6001\u548c\u5185\u6838\u6001\uff0c\u5e76\u89c4\u5b9a\uff0c\u53ea\u6709\u7279\u6743\u6307\u4ee4\u624d\u80fd\u5728\u5185\u6838\u6001\u8fd0\u884c\uff0c\u7528\u6237\u7a0b\u5e8f\u53ea\u80fd\u5728\u7528\u6237\u6001\u4e0b\u8fd0\u884c\u3002\u90a3\u4e48\uff0c\u5047\u5982\u7528\u6237\u7a0b\u5e8f\u9700\u8981\u8bbf\u95ee\u7cfb\u7edf\u7684\u6838\u5fc3\u529f\u80fd\uff0c\u600e\u4e48\u529e\uff1f\u6ca1\u9519\u513f\uff0c\u5c31\u662f\u901a\u8fc7\u7cfb\u7edf\u8c03\u7528\u3002</p>\n<p>\u7b80\u5355\u6765\u8bf4\uff0c\u7cfb\u7edf\u8c03\u7528\u5c31\u662f\u628a\u5e94\u7528\u7a0b\u5e8f\u7684\u8bf7\u6c42\u4f20\u9012\u7ed9\u5185\u6838\uff0c\u8c03\u7528\u76f8\u5e94\u7684\u5185\u6838\u51fd\u6570\u6765\u5904\u7406\u8bf7\u6c42\uff0c\u7136\u540e\u518d\u5c06\u5904\u7406\u7ed3\u679c\u8fd4\u56de\u7ed9\u5e94\u7528\u7a0b\u5e8f\u3002</p>\n<p>\u672c\u6b21\u5b9e\u9a8c\u9009\u7528 <code>Linux</code> \u64cd\u4f5c\u7cfb\u7edf 2 \u53f7\u7cfb\u7edf\u8c03\u7528\uff0c<code>fork</code> \u51fd\u6570\uff0c\u901a\u8fc7\u5bf9\u6bd4\u5d4c\u5165\u5f0f\u6c47\u7f16\u7f16\u7a0b\u548c\u7cfb\u7edf\u51fd\u6570\u7f16\u7a0b\uff0c\u6df1\u5165\u7406\u89e3\u548c\u5206\u6790\u7cfb\u7edf\u8c03\u7528\u7684\u8fc7\u7a0b\u3002</p>\n<h3>2.fork \u51fd\u6570</h3>\n<p>\u6211\u4eec\u6765\u5b9e\u73b0\u4e00\u4e2a\u7b80\u5355\u7684\u7cfb\u7edf\u8c03\u7528\u51fd\u6570\uff1a<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1627862-b4c84bc056d43133.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1627862-b4c84bc056d43133.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\"></div>\n</div>\n<h3>3.\u5d4c\u5165\u5f0f\u6c47\u7f16</h3>\n<p>\u9996\u5148\uff0c\u6211\u4eec\u6765\u770b\u770b <code>C</code> \u8bed\u8a00\u5d4c\u5165\u5f0f\u6c47\u7f16\u4e00\u822c\u683c\u5f0f\uff1a</p>\n<pre><code>__asm__ (\n \u6c47\u7f16\u8bed\u53e5\uff1b\n \u8f93\u51fa\u90e8\u5206\uff1b\n \u8f93\u5165\u90e8\u5206\uff1b\n \u7834\u574f\u63cf\u8ff0\u90e8\u5206\uff1b\n);</code></pre>\n<p>\u7136\u540e\uff0c\u518d\u6765\u5206\u6790\u6211\u4eec\u7684\u5d4c\u5165\u5f0f\u6c47\u7f16\u4ee3\u7801\uff1a<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1627862-8a0075f0c0784251.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1627862-8a0075f0c0784251.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\"></div>\n</div><p><br><code>volatile</code> \u5173\u952e\u5b57\u8868\u793a\u7981\u6b62\u7f16\u8bd1\u5668\u4f18\u5316\uff0c\u7136\u540e\u628a <code>ebx</code> \u5bc4\u5b58\u5668\u6e05\u96f6\uff0c\u628a\u7b2c 2 \u53f7\u7cfb\u7edf\u8c03\u7528\u8d4b\u7ed9 <code>eax</code> \u5bc4\u5b58\u5668\uff0c\u7136\u540e\u518d\u8c03\u7528 <code>0x80</code> \u53f7\u7cfb\u7edf\u4e2d\u65ad\uff0c\u6700\u540e\u628a eax \u7684\u503c\u8d4b\u7ed9\u7b2c 0 \u4e2a\u53d8\u91cf\uff0c\u5373\u4e0b\u9762\u7684 <code>fpid</code> \u53d8\u91cf\u3002<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1627862-92ff94ccb6b6dedb.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1627862-92ff94ccb6b6dedb.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\"></div>\n</div><p><br>\u6700\u540e\uff0c\u8fd0\u884c\u8fd9\u6bb5\u51fd\u6570\uff0c\u5e76\u4e0e\u4f7f\u7528 C \u8bed\u8a00\u5b9e\u73b0\u7684\u7cfb\u7edf\u8c03\u7528\u8fdb\u884c\u5bf9\u6bd4\u3002\u5982\u4e0a\u56fe\u6240\u793a\uff0c\u4e8c\u8005\u8fd0\u884c\u7ed3\u679c\u5b8c\u5168\u76f8\u540c\u3002</p>\n<h3>4.\u603b\u7ed3</h3>\n<p>\u64cd\u4f5c\u7cfb\u7edf\u4f5c\u4e3a\u7ba1\u7406\u786c\u4ef6\u8d44\u6e90\u548c\u4e3a\u5e94\u7528\u7a0b\u5e8f\u8fd0\u884c\u73af\u5883\uff0c\u4e3a\u4e86\u8fbe\u5230\u826f\u597d\u7684\u517c\u5bb9\u6027\u548c\u5e73\u8861\u6027\uff0c\u5185\u6838\u63d0\u4f9b\u4e86\u4e00\u7cfb\u5217\u7684\u5b9a\u5236\u5316\u7684\u51fd\u6570\uff0c\u4f7f\u5f97\u5f00\u53d1\u8005\u548c\u7528\u6237\u7a0b\u5e8f\u5b8c\u5168\u4e0d\u9700\u8981\u4e86\u89e3\u590d\u6742\u7684\u786c\u4ef6\u4f53\u7cfb\u7ed3\u6784\uff0c\u5c4f\u853d\u4e86\u5e95\u5c42\u4ea4\u4e92\u7ec6\u8282\uff0c\u542c\u8d77\u6765\u662f\u4e0d\u662f\u9075\u5faa\u4e86\u67d0\u79cd\u8f6f\u4ef6\u8bbe\u8ba1\u6a21\u5f0f\u5462\uff1f\u8fd9\u4e2a\u7b80\u5355\u7684\u95ee\u9898\u5c31\u7559\u7ed9\u8bfb\u8005\u601d\u8003\u54af\u3002</p>\n</div>"},
{"title": "UIGestureRecognizer\u624b\u52bf", "link": "https://www.jianshu.com/p/c470ae6478ce", "show-content": "<div class=\"show-content\"><p>\u624b\u52bf\u4e00\u5171\u5206\u4e3a\u4e03\u79cd\uff0c\u6bcf\u4e00\u4e2a\u624b\u52bf\u7684\u7c7b\u90fd\u662f\u7ee7\u627f\u4e8eUIGestureRecognizer\uff0c\u6211\u4eec\u64cd\u4f5c\u7684\u65f6\u5019\u662f\u64cd\u4f5c\u5176\u5b50\u7c7b<br>\u4e00\u4e2a\u624b\u52bf\u53ea\u80fd\u6dfb\u52a0\u5230\u4e00\u4e2a\u89c6\u56fe\u4e0a\uff0c\u5982\u679c\u6dfb\u52a0\u5230\u591a\u4e2a\u89c6\u56fe\u4e0a\uff0c\u53ea\u80fd\u5bf9\u6700\u540e\u6dfb\u52a0\u7684\u90a3\u4e2a\u89c6\u56fe\u5176\u6548\u679c</p>\n<h3>\u8f7b\u62cd\u624b\u52bf\uff08\u70b9\u51fb\uff09</h3>\n<pre><code>- (void)viewDidLoad{\n\n UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAction:)];\n //\u8bbe\u7f6e\u70b9\u51fb\u6b21\u6570\n tap.numberOfTapsRequired = 2;//\u5feb\u901f\u70b9\u51fb\u4e24\u6b21\u624d\u80fd\u89e6\u53d1\n //\u8bbe\u7f6e\u70b9\u51fb\u624b\u6307\u4e2a\u6570\n tap.numberOfTouchesRquired = 2;//\u5728\u6a21\u62df\u5668\u4e0a\u6d4b\u8bd5\u65f6\uff0c\u6309\u4f4falt\u952e\u53ef\u4ee5\u5524\u51fa\u7b2c\u4e8c\u6839\u624b\u6307\uff0c\u6a21\u62df\u5668\u6700\u591a\u53ea\u80fd\u6709\u4e24\u6839\uff1b\n //UIImageView\u6dfb\u52a0\u624b\u52bf\uff08\u9700\u8981\u6253\u5f00\u4ea4\u4e92userInteractionEnabled\uff09\n UIImageView *imgView = [[UIImageView alloc] initWithFrame:CGRectMake:(50,50,50,50)];\n imgView.userInteractionEnabled = YES;\n imgView.backgroundColor = [UIColor redColor];\n [self.view addSubview:imgView];\n [imgView release];\n [imgView addGestureRecognizer:tap];\n [tap release];\n}\n//\u65b9\u6cd5\u5b9e\u73b0\n- (void)tapAction:(UITapGestureRecognizer *)tap{\n //\u6bcf\u4e2a\u624b\u52bf\u90fd\u81ea\u5e26\u4e00\u4e2a\u5c5e\u6027 .view\uff0c\u8fd4\u56de\u7684\u662f\u8fd9\u4e2a\u624b\u52bf\u6240\u5728\u7684\u89c6\u56fe\n tap.view.frame = CGRectMake(0,0,100,100);\n}</code></pre>\n<h3>\u8f7b\u626b\u624b\u52bf</h3>\n<pre><code>- (void)viewDidLoad{\n UISwipeGestureRecognizer *swipe = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeAction:)];\n //\u8bbe\u7f6e\u8f7b\u626b\u65b9\u5411 \u9ed8\u8ba4\u65b9\u5411\u662f\u5411\u53f3\u8f7b\u626b\uff0c\u4e00\u4e2a\u8f7b\u626b\u624b\u52bf\u53ea\u80fd\u652f\u6301\u4e00\u4e2a\u65b9\u5411\n swipe.direction = UISwipeGestureRecognizerDirectionDown;\n [imgView addGestureRecognizer:swipe];//\u5728\u8f7b\u62cd\u4e2d\u8fdb\u884c\u8fc7\u521d\u59cb\u5316\n [swipe release];\n}\n- (void)swipeAction:(UISwipeGestureRecognizer *)swipe{\n if (swipe.direction == UISwipeGestureRecognizerDirectionDown) {\n NSLog(@\"\u8f7b\u626b\");\n }\n}</code></pre>\n<h3>\u957f\u6309\u624b\u52bf</h3>\n<pre><code>- (void)viewDidLoad{\n UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPressAction:)];\n //\u8bbe\u7f6e\u957f\u6309\u65f6\u95f4\n longPress.minimumPressDuration = 1;\n [imgView addGestureRecognizer:longPress];\n [longPress release];\n}\n- (void)longPressAction:(UILongPressGestureRecognizer *)longPress{\n if (longPress.state == UIGestureRecognizerStateBegan) {//\u6ce81\n UIAlertController *alert = [UIAlertController alertControllerWithTitle:@\"\u63d0\u793a\" message:@\"123\" preferredStyle:UIAlertControllerStyleActionSheet];\n [self presentViewController:alert animated:YES completion:nil];\n }\n}</code></pre>\n<h3>\u5e73\u79fb\u624b\u52bf</h3>\n<pre><code>- (void)viewDidLoad{\n UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panAction:)];\n [imgView addGestureRecognizer:pan];\n [pan release]; \n}\n- (void)panAction:(UIPanGestureRecognizer *)pan{\n if (pan.state == UIGestureRecognizerStateChanged) {//\u6ce81\n CGPoint point = [pan translationInView:pan.view];\n //transform\u662f\u89c6\u56fe\u7684\u4e00\u4e2a\u91cd\u8981\u5c5e\u6027\n //\u6211\u4eec\u7684\u5e73\u79fb\u3001\u65cb\u8f6c\u3001\u7f29\u653e\uff0c\u6539\u53d8\u7684\u90fd\u662f\u89c6\u56fe\u7684transform\u5c5e\u6027\uff0c\u6211\u4eec\u7528\u4f55\u79cd\u65b9\u6cd5\u53bb\u6539\u53d8\u5b83\uff0c\u53d6\u51b3\u4e8e\u8d4b\u503c\u7b26\u53f7\u53f3\u8fb9\u8c03\u7528\u7684API\n pan.view.transform = CGAffineTransformTranslate(pan.view.transform,point.x,point.y);\n //\u91cd\u65b0\u7f6e\u62100\u70b9\uff0c\u6bcf\u4e00\u6b21\u5e73\u79fb\u7684\u7ed3\u675f\u65f6\u7684\u4f4d\u7f6e\u4f1a\u53d8\u6210\u4e0b\u4e00\u6b21\u5e73\u79fb\u7684\u8d77\u70b9\n [pan setTranslation:CGPointZero inView:pan.view];\n }\n}</code></pre>\n<h3>\u65cb\u8f6c\u624b\u52bf</h3>\n<pre><code>- (void)viewDidLoad{\n UIRotationGestureRecognizer *rotation = [[UIRotationGestureRecognizer alloc] initWithTarget:self action:@selector(rotationAction:)];\n [imgView addGestureRecognizer:rotation];\n [rotation release]; \n}\n- (void)rotationAction:(UIRotationGestureRecognizer *)rotation{\n if (rotation.state == UIGestureRecognizerStateChanged) {\n rotation.view.transform = CGAffineTransformTranslate(rotation.view.transform,rotation.rotation);\n //\u540c\u5e73\u79fb\n rotation.rotation = 0;\n }\n}</code></pre>\n<h3>\u7f29\u653e\u624b\u52bf</h3>\n<pre><code>- (void)viewDidLoad{\n UIPinchGestureRecognizer *pinch = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(pinchAction:)];\n [imgView addGestureRecognizer:pinch];\n [pinch release];\n}\n- (void)pinchAction:(UIPinchGestureRecognizer *)pinch{\n if (pinch.state == UIGestureRecognizerStateChanged) {\n pinch.view.transform = CGAffineTransformScale(pinch.view.transform,pinch.scale,pinch.scale);\n //\u540c\u5e73\u79fb\n pinch.scale = 1;\n } \n}</code></pre>\n<h3>\u5c4f\u5e55\u8fb9\u7f18\u5e73\u79fb\u624b\u52bf</h3>\n<p>UIScreenEdgePanGestureRecognizer<br>\u5e73\u65f6\u57fa\u672c\u4e0d\u7528\uff1b</p>\n<h3>\u6ce8\uff1a</h3>\n<p><strong>1.</strong><br>\u6bcf\u4e00\u4e2a\u624b\u52bf\u90fd\u6709\u4e00\u4e2astate\u5c5e\u6027\uff0c\u8868\u793a\u7684\u662f\u624b\u52bf\u8bc6\u522b\u7684\u4e0d\u540c\u7684\u9636\u6bb5<br>\u662f\u4e00\u4e2a\u679a\u4e3e\u7c7b\u578b</p>\n<pre><code>typedef NS_ENUM(NSInteger, UIGestureRecognizerState) {\n UIGestureRecognizerStatePossible, //\u9ed8\u8ba4\u72b6\u6001\n UIGestureRecognizerStateBegan,\n UIGestureRecognizerStateChanged,\n UIGestureRecognizerStateEnded,\n UIGestureRecognizerStateCancelled,\n UIGestureRecognizerStateFailed,\n UIGestureRecognizerStateRecognized = UIGestureRecognizerStateEnded\n};</code></pre>\n<p>\u9664\u4e86\u8f7b\u62cd\u624b\u52bf\u4e4b\u5916\uff0c\u5176\u4ed6\u7684\u624b\u52bf\u90fd\u662f\u8fde\u7eed\u7684\u624b\u52bf\uff0c\u521a\u6309\u4e0b\u53bb\u7684\u65f6\u5019state\u7684\u72b6\u6001\u662fPossible\uff0c\u8fd8\u6ca1\u6709\u88ab\u8bc6\u522b\u5f53\u8fbe\u5230\u8bc6\u522b\u6761\u4ef6\uff08\u5982\u5230\u8fbelongPress\u7684\u957f\u6309\u65f6\u95f4\uff0c\u6216\u8005rotation\u624b\u52bf\uff0c\u5f00\u59cb\u65cb\u8f6c\uff09\u540e\u4f1a\u8fdb\u5165\u72b6\u6001Began\uff0c\u4f46\u8fd9\u4e2a\u72b6\u6001\u53ea\u4f1a\u4fdd\u6301\u4e00\u77ac\uff0c\u7136\u540e\u8fdb\u5165Changed\u72b6\u6001\u3002<br>\u6240\u4ee5\u6211\u4eec\u9700\u8981\u6309\u7167\u9700\u6c42\u8fdb\u884c\u5224\u5b9a\uff0c\u5982\u4e0a\u6587\u7684longPress\u624b\u52bf\u4f1apresent\u4e00\u4e2aalert\u51fa\u6765\uff0c\u5982\u679c\u4e0d\u8fdb\u884c\u5224\u5b9a\uff0c\u4f1a\u591a\u6b21\u89e6\u53d1\uff0c\u5bfc\u81f4\u7a0b\u5e8f\u51fa\u9519\uff0c\u6240\u4ee5\u6211\u4eec\u8981\u628a\u5224\u5b9a\u6761\u4ef6\u8bbe\u4e3aBegan\uff0c\u8fd9\u6837\u4e00\u6b21\u957f\u6309\u5c31\u53ea\u4f1a\u89e6\u53d1\u4e00\u6b21\uff1b<br><strong>\u6ce8\u4e2d\u6ce8\uff1a</strong>swipe\u624b\u52bf\u53ea\u4f1a\u5728\u8bc6\u522b\u7ed3\u675f\u7684\u65f6\u624d\u4f1a\u89e6\u53d1\u4e00\u6b21\uff0c\u6240\u4ee5\u4e0d\u7528\u8fdb\u884c\u5224\u5b9a<br><strong>2.</strong><br>\u6211\u4eec\u53ef\u4ee5\u770b\u51fatap\u624b\u52bf\u662flongPress\u624b\u52bf\u7684\u4e00\u90e8\u5206\uff0cswipe\u624b\u52bf\u662fpan\u624b\u52bf\u7684\u4e00\u90e8\u5206\uff0c\u5982\u679c\u4e00\u4e2a\u89c6\u56fe\u4e0a\u591a\u4e2a\u624b\u52bf\uff0c\u7cfb\u7edf\u9ed8\u8ba4\u5c31\u4f1a\u5ffd\u7565\u6389\u4f5c\u4e3a\u5176\u4ed6\u624b\u52bf\u4e00\u90e8\u5206\u7684\u624b\u52bf\uff0c\u4e3a\u4e86\u9632\u6b62\u8fd9\u79cd\u60c5\u51b5\uff0c\u9700\u8981\u7528\u5230<strong>(void)requireGestureRecognizerToFail:(UIGestureRecognizer *)otherGestureRecognizer</strong>\u65b9\u6cd5<br>\u8fd9\u4e2a\u65b9\u6cd5\u662f\u7531\u624b\u52bf\u8c03\u7528\u4f20\u5165\u4e00\u4e2a\u624b\u52bf\u4f5c\u4e3a\u53c2\u6570\uff0c\u5f53\u540e\u4e00\u4e2a\u624b\u52bf\u8bc6\u522b\u5931\u8d25\u65f6\u624d\u4f1a\u6267\u884c\u524d\u4e00\u4e2a\u624b\u52bf<br>\u4f8b\uff1a<br> [pan requireGestureRecognizerToFail:swipe];<br> //\u53ea\u6709\u5728swipe\u624b\u52bf\u8bc6\u522b\u5931\u8d25\u540e\uff0c\u624d\u4f1a\u89e6\u53d1pan\u624b\u52bf\u7684\u65b9\u6cd5</p>\n<h3>\u53c2\u8003\u8d44\u6599</h3>\n<p><a href=\"https://www.cnblogs.com/kenshincui/p/3950646.html\" target=\"_blank\">https://www.cnblogs.com/kenshincui/p/3950646.html</a><br><a href=\"https://www.cnblogs.com/kenshincui\" target=\"_blank\">\u5d14\u6c5f\u6d9b\uff08KenshinCui\uff09</a></p>\n</div>"},
{"title": "\u8f6f\u4ef6\u9879\u76ee\u4e4b\u5ba2\u6237\u4e0e\u5f00\u53d1", "link": "https://www.jianshu.com/p/727428bc58df", "show-content": "<div class=\"show-content\"><p>\u81ea\u4e00\u6708\u4efd\u4ee5\u6765\uff0c\u6211\u4f5c\u4e3a\u5f00\u53d1\u8d1f\u8d23\u4eba\u627f\u63a5\u4e86\u65e0\u9521\u4e00\u5bb6\u4e8b\u4e1a\u5355\u4f4d\u7684\u7cfb\u7edf\u8f6f\u4ef6\u9879\u76ee\uff0c\u4ece\u521d\u6b65\u63a5\u624b\u5230\u6df1\u5ea6\u5f00\u53d1\uff0c\u81f3\u6b64\uff0c\u5c06\u6b64\u95f4\u7684\u4e00\u4e9b\u7406\u89e3\u548c\u8ba4\u8bc6\u6574\u7406\u51fa\u6765\uff0c\u4ee5\u4f5c\u8bb0\u5f55\u3002</p><p>\u4ee5\u516c\u53f8\u9879\u76ee\u7b49\u7ea7\u7684\u5212\u5206\u6765\u770b\uff0c\u8be5\u9879\u76ee\u5c5e\u5c0f\u578b\u9879\u76ee\u3002\u81f3\u4e8e\u7b49\u7ea7\u5212\u5206\u6807\u51c6\uff0c\u6211\u662f\u4e0d\u6e05\u695a\u7684\u3002\u59d1\u4e14\u4e0d\u53bb\u8d28\u7591\u201c\u6807\u51c6\u201d\uff0c\u4f46\u662f\u6267\u884c\u201c\u6807\u51c6\u201d\u7684\u4eba\u4ee5\u53ca\u6267\u884c\u7684\u5408\u7406\u7a0b\u5ea6\u53ca\u6001\u5ea6\u5374\u662f\u503c\u5f97\u8d28\u7591\u3002\u4f60\u77e5\u9053\uff0c\u516c\u53f8\u7684\u9879\u76ee\u5408\u540c\u662f\u5546\u52a1\u53bb\u8c08\u548c\u7b7e\u8ba2\u7684\u3002\u6240\u4ee5\u6211\u6000\u7591\u7684\u662f\u5546\u52a1\u7684\u8bc4\u4f30\u6001\u5ea6\u4e0e\u8bc4\u4f30\u80fd\u529b\u3002\u4f5c\u4e3a\u975e\u5f00\u53d1\u4eba\u5458\uff0c\u5982\u4f55\u8ba9\u4eba\u4fe1\u670d\u4ed6\u4eec\u5bf9\u4e8e\u8f6f\u4ef6\u9879\u76ee\u7684\u9700\u6c42\u8bc4\u4f30\u3002\u8bdd\u53c8\u8bf4\u56de\u6765\uff0c\u5373\u4f7f\u4f5c\u4e3a\u5f00\u53d1\uff0c\u82e5\u65e0\u6df1\u539a\u7684\u7ecf\u9a8c\u53ca\u8f83\u5f3a\u7684\u80fd\u529b\uff0c\u4ed6\u5bf9\u9879\u76ee\u7684\u9700\u6c42\u8bc4\u4f30\u5c31\u4e00\u5b9a\u51c6\u786e\u5417\uff1f\u7136\u800c\uff0c\u6211\u5e76\u4e0d\u5173\u5fc3\u8fd9\u4e9b\u3002</p><p>\u5ba2\u6237\u4e0e\u5f00\u53d1\uff0c\u662f\u89e3\u4e0d\u5f00\u7684\u6b7b\u7ed3\u3002\u8be5\u5ba2\u6237\u5927\u591a\u65f6\u5019\u4e0d\u6e05\u695a\u4ed6\u4eec\u60f3\u8981\u7684\u662f\u4ec0\u4e48\uff0c\u6700\u65e0\u8bed\u7684\u662f\u4ed6\u7adf\u4e0d\u6e05\u695a\u4ed6\u4eec\u5355\u4f4d\u7684\u529e\u4e8b\u6d41\u7a0b\u53ca\u7ec6\u8282\uff0c\u4ed6\u4eec\u6700\u591a\u7684\u72b6\u6001\u662f\u4e0d\u505c\u5730\u5426\u8ba4\u5f00\u53d1\u7684\u7ed3\u679c\u3002\u6211\u7684\u6001\u5ea6\u662f\u6ca1\u6709\u505a\u4e0d\u5230\uff0c\u53ea\u6709\u60f3\u4e0d\u5230\u3002\u7136\u800c\uff0c\u6211\u5f88\u5173\u5fc3\u8fd9\u4e9b\u3002</p><p>\u5bf9\u4e8e\u9879\u76ee\uff0c\u7ecf\u8fc7\u8fd9\u4e9b\u65f6\u65e5\uff0c\u6709\u4e86\u4e9b\u8bb8\u4f53\u4f1a\uff1a\u6211\u613f\u610f\u6df1\u523b\u7406\u89e3\u5ba2\u6237\u7684\u9700\u6c42\uff0c\u52aa\u529b\u8bbe\u8ba1\u597d\u7684\u7cfb\u7edf\u7ed3\u6784\uff0c\u5c3d\u529b\u6784\u9020\u6781\u4f73\u7684\u7cfb\u7edf\u6027\u80fd\u3002\u4f46\u8fd9\u4e9b\uff0c\u5e76\u975e\u6211\u4e00\u4eba\u5c31\u80fd\u5b8c\u6210\u7684\u3002\u597d\u6d88\u606f\u662f\uff0c\u6211\u613f\u4e3a\u4e4b\u52aa\u529b\u3002</p><p>\u5bf9\u4e8e\u7f16\u7a0b\uff0c\u6211\u60f3\u6700\u5927\u7684\u6311\u6218\u548c\u4e50\u8da3\u5728\u4e8e\u8bbe\u8ba1\u3002\u60f3\u8981\u505a\u51fa\u8bbe\u8ba1\u826f\u597d\u7684\u6570\u636e\u7ed3\u6784\u3001\u6d41\u7545\u7684\u4ee3\u7801\u98ce\u683c\u3002\u6700\u6839\u672c\u7684\u5728\u4e8e\u6570\u636e\u5e93\u7684\u8bbe\u8ba1\u3002\u4f60\u662f\u5426\u4f53\u4f1a\u5230\uff0c\u7f16\u7a0b\u4e2d\u4e0d\u65f6\u5730\u4f1a\u51fa\u73b0\u6570\u636e\u8c03\u7528\u7684\u7e41\u6742\u3001\u6570\u636e\u5173\u8054\u7684\u4e3a\u96be\u4ee5\u53ca\u5173\u8054\u8868\u4e4b\u95f4\u7684\u6570\u636e\u540c\u6b65\u7684\u590d\u6742\u4e0e\u4f4e\u6548\u7b49\u95ee\u9898\u3002\u76ee\u524d\u6765\u770b\uff0c\u8fd9\u4e9b\u95ee\u9898\u7684\u6839\u6e90\u5927\u591a\u6765\u81ea\u4e8e\u6570\u636e\u5e93\u8bbe\u8ba1\u7684\u4e0d\u5408\u7406\u3002\u800c\u6570\u636e\u5e93\u8bbe\u8ba1\uff0c\u6e90\u5934\u8fd8\u5728\u4e8e\u5bf9\u9700\u6c42\u7684\u7406\u89e3\u3002</p><p>\u4ec5\u6b64\u8fd9\u4e9b\uff0c\u7a0d\u4f5c\u4f53\u4f1a\u3002</p></div>"},
{"title": "\u5173\u4e8eJS\u95ed\u5305", "link": "https://www.jianshu.com/p/794812620271", "show-content": "<div class=\"show-content\"><blockquote><p>\u4eca\u5929\u505a\u7b14\u8bd5\u9898\uff0c\u597d\u591a\u5173\u4e8eJS\u95ed\u5305\u95ee\u9898\uff0c\u5c31\u6574\u7406\u51fa\u6765\uff0c\u5206\u4eab\u4e00\u4e0b\u3002</p></blockquote>\n<p>\u9996\u5148\uff0c\u5f15\u7528\u4e0b\u6240\u8c13\u7684\u201c\u5b98\u65b9\u89e3\u91ca\u201d\uff1a\u6240\u8c13\u201c\u95ed\u5305\u201d\uff0c\u6307\u7684\u662f\u4e00\u4e2a\u62e5\u6709\u8bb8\u591a\u53d8\u91cf\u548c\u7ed1\u5b9a\u4e86\u8fd9\u4e9b\u53d8\u91cf\u7684\u73af\u5883\u7684<em>\u8868\u8fbe\u5f0f</em>\uff08\u901a\u5e38\u662f\u4e00\u4e2a\u51fd\u6570\uff09\uff0c\u56e0\u800c\u8fd9\u4e9b<em>\u53d8\u91cf\u4e5f\u662f\u8be5\u8868\u8fbe\u5f0f\u7684\u4e00\u90e8\u5206</em>\u3002</p>\n<p>\u8bf7\u6ce8\u610f\u9ed1\u4f53\u5b57\u90e8\u5206\uff0c\u4f1a\u6709\u610f\u4e0e\u4f60\u7684\u7406\u89e3\u3002</p>\n<p>\u6765\u770b\u4f8b\u5b501\uff1a</p>\n<pre><code>function a(){\n var i = 1;\n function b(){\n alert(i);\n }\n return b();\n}\nvar c = a(); c; // a();</code></pre>\n<p>\u4f8b\u5b502\uff1a</p>\n<pre><code>function a(){\n var i = 1;\n function b(){\n alert(i);\n }\n return b;\n}\nvar c = a(); c(); // a()();</code></pre>\n<p>\u4e0a\u8ff0\u4e24\u4e2a\u4f8b\u5b50\u7684\u8fd0\u884c\u7ed3\u679c\u90fd\u662f\u4e00\u6837\u7684\uff0c\u53ea\u4e0d\u8fc7\u5e94\u8be5\u4f1a\u6709\u5f88\u5c11\u4eba\u7528\u4f8b\u5b502\u90a3\u6837\u7ed3\u5c3e<code>a()()</code>\u90a3\u6837\u7684\u5199\u6cd5\u5427\u3002\u563b\u563b\uff0c\u6211\u4e5f\u662f\u4eca\u5929\u624d\u53d1\u73b0\u7684\u3002\u8fd9\u6837\u5199\u7684\u8bdd\uff0c\u4f60\u662f\u4e0d\u662f\u5bf9\u51fd\u6570\u540e\u9762\u7684\u62ec\u53f7<code>()</code>\u6709\u4e86\u66f4\u6df1\u7684\u7406\u89e3\u5462\uff1f</p>\n<p>\u6ca1\u9519\uff0c\u4ece\u4e0a\u9762\u6211\u4eec\u53ef\u4ee5\u770b\u51fa\u6765\uff0c\u51fd\u6570\u58f0\u660e\u5b9a\u4e49\u65f6\u80af\u5b9a\u5c11\u4e0d\u4e86\u8eab\u4efd\u8bc1<code>()</code>\uff0c\u800c\u5f53\u628a\u4e00\u4e2a\u51fd\u6570\u540d\u8fde\u5e26\u62ec\u53f7<code>()</code>\u4e5f\u8d4b\u7ed9\u4e00\u4e2a\u53d8\u91cf\uff0c\u8fd9\u65f6\u7684\u53d8\u91cf\u5176\u5b9e\u662f\u6307\u5411\u4e86\u8fd9\u4e2a\u51fd\u6570\uff0c\u4e5f\u5c31\u662f\u8bf4\u628a\u51fd\u6570\u7684\u6307\u9488\u8d4b\u7ed9\u4e86\u6b64\u53d8\u91cf\u3002\u50cf\u4e0a\u9762\u4f8b\u5b502\u7ed3\u5c3e\u90a3\u6837\uff0c<code>a()()</code>\u4e2d\u7684\u524d\u9762\u90e8\u5206<code>a()</code>\u8fd4\u56de\u503c(\u7ed3\u679c)\u662f\u4e00\u4e2a\u51fd\u6570\u540d\uff0c\u4e5f\u5c31\u662f\u8bf4\u4e0d\u4f1a\u6267\u884c\u3002\u6240\u4ee5\u8981\u5728<code>a()</code>\u540e\u9762\u518d\u52a0\u4e00\u4e2a<code>()</code>\uff0c\u624d\u4f1a\u6267\u884c\uff0c\u76f8\u5f53\u4e8e<code>b()</code>\u3002\u56e0\u4e3a<code>a()</code>\u7684\u8fd4\u56de\u503c\u662f<code>b</code>\uff0c<em><code>a()</code></em><code>()</code>\u4e5f\u5c31\u76f8\u5f53\u4e8e<em><code>b</code></em><code>()</code>\u3002</p>\n<p>\u63d2\u64ad\u7ed3\u675f\uff0c\u8fd4\u56de\u6765\u8bf4\u201c\u95ed\u5305\u201d\u95ee\u9898\u3002</p>\n<p>\u7ee7\u7eed\u770b\u4f8b\u5b50\uff1a</p>\n<pre><code>function a(){\n var i = 1;\n alert(i);\n}\nfunction b(){\n alert(i);\n}\nb();</code></pre>\n<p>\u4e0a\u9762\u7684\u4f8b\u5b50\u662f\u4f1a\u62a5\u9519\u7684\uff1a<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1060885-7c85fec036350e0f.PNG?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1060885-7c85fec036350e0f.PNG?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\">i \u6ca1\u6709\u5b9a\u4e49\uff0c\uff08\u65e0\u6743\u8bbf\u95ee\uff09</div>\n</div><p><br>\u73b0\u5728\u8fd4\u56de\u53bb\u7ee7\u7eed\u60f3\u201c\u95ed\u5305\u201d\uff0c\u4f60\u597d\u60ca\u5947\u7684\u53d1\u73b0\uff0c\u4f8b1\u548c\u4f8b2\u91cc\uff0c\u53d8\u91cfc\u7adf\u7136\u53ef\u4ee5\u5f39\u51fa\u4e86<code>i</code>\uff01\u5b83\u53ef\u662f\u6ca1\u6709\u5728\u53d8\u91cfc\u7684\u540c\u7ea7\u4f5c\u7528\u57df\u5b9a\u4e49\u8fc7\u554a\uff01\u4f46\u662f\u2014\u2014\u56e0\u4e3a\u201c\u95ed\u5305\u201d\u7684\u5b58\u5728\uff1a\u51fd\u6570<code>b()</code>\u4ee5\u53ca\u51fd\u6570a\u91cc\u7684\u53d8\u91cf<code>i</code>\u3002</p>\n<h4>\u6ce8\u610f</h4>\n<p>\u4e0a\u9762\u63d0\u5230\u7684\uff0c\u201c\u95ed\u5305\u201d\u662f\u5305\u542b\u7740\u51fd\u6570<code>b()</code>\u4ee5\u53ca\u53d8\u91cf<code>i</code>\uff0c\u597d\u591a\u7f51\u4e0a\u7684\u6587\u7ae0\u53ea\u7b80\u5355\u7684\u63d0\u5230\u4e86\u51fd\u6570<code>b()</code>\uff0c\u6211\u8ba4\u4e3a\uff0c\u7ed3\u5408\u5f00\u7bc7\u4e2d\u7684\u201c\u5b98\u65b9\u8bf4\u6cd5\u201d\uff0c\u90a3\u79cd\u8bf4\u6cd5\u662f\u4e0d\u7cbe\u786e\u7684\u3002\uff08\u53d8\u91cf\u4e5f\u662f\u8868\u8fbe\u5f0f<strong>(\u95ed\u5305)</strong>\u7684\u4e00\u90e8\u5206\uff09</p>\n<p>\u81f3\u4e8e\u95ed\u5305\u7684\u4f5c\u7528\uff0c\u5bf9\u4e8e\u5783\u573e\u56de\u6536\u673a\u5236\u7684\u597d\u5904\u4e91\u4e91\uff0c\u6682\u65f6\u8fd8\u6ca1\u6709\u5b66\u4e60\u5230\uff0c\u540e\u7eed\u4f1a\u7ee7\u7eed\u66f4\u65b0\u8865\u5145\u3002</p>\n</div>"},
{"title": "\u3010\u8bd1\u3011Volley\u5b98\u65b9\u6587\u6863\u4e00\uff1a\u4f7f\u7528Volley\u4f20\u9012\u7f51\u7edc\u6570\u636e", "link": "https://www.jianshu.com/p/231e03b918bd", "show-content": "<div class=\"show-content\"><p>\u539f\u6587\u94fe\u63a5\uff1a<a href=\"https://developer.android.com/training/volley/index.html\" target=\"_blank\">Transmitting Network Data Using Volley</a></p>\n<p>\u4f9d\u8d56\u548c\u5148\u51b3\u6761\u4ef6\uff1aAndroid 1.6 (API Level 4)\u6216\u8005\u66f4\u9ad8</p>\n<p>Volley\u662f\u4e00\u4e2aHTTP\u5e93\uff0c\u5b83\u4f7f\u5f97\u5728Android\u5e94\u7528\u4e0a\u8bbf\u95ee\u7f51\u7edc\u66f4\u7b80\u5355\uff0c\u66f4\u91cd\u8981\u7684\u662f\uff0c\u66f4\u5feb\u3002<br>Volley\u53ef\u4ee5\u901a\u8fc7Android\u5f00\u653e\u6e90\u4ee3\u7801\u9879\u76ee\uff08AOSP\uff09\u4ed3\u5e93\u53d6\u5f97\u3002</p>\n<p>Volley\u63d0\u4f9b\u4e86\u4e00\u4e0b\u7684\u4fbf\u5229\uff1a</p>\n<ul>\n<li>\u81ea\u52a8\u7684\u7f51\u7edc\u8bf7\u6c42\u8c03\u5ea6\u3002</li>\n<li>\u591a\u5e76\u53d1\u7f51\u7edc\u8fde\u63a5\u3002</li>\n<li>\u900f\u660e\u7684\u78c1\u76d8\u548c\u5185\u5b58\u54cd\u5e94\uff0c\u4f7f\u7528\u6807\u51c6\u7684HTTP\u9ad8\u901f\u7f13\u5b58\u4e00\u81f4\u6027\u3002</li>\n<li>\u652f\u6301\u8bf7\u6c42\u4f18\u5316</li>\n<li>\u53d6\u6d88\u8bf7\u6c42\u7684API\u3002\u4f60\u53ef\u4ee5\u53d6\u6d88\u5355\u4e2a\u8bf7\u6c42\uff0c\u6216\u8005\u53d6\u6d88\u4e00\u4e9b\u8bf7\u6c42\u3002</li>\n<li>\u6613\u4e8e\u5b9a\u5236\uff0c\u6bd4\u5982\uff0c\u91cd\u8bd5\u548c\u56de\u9000\u3002</li>\n<li>\u5f3a\u5927\u7684\u6392\u5e8f\u529f\u80fd\uff0c\u4f7f\u7684\u4ece\u7f51\u7edc\u5f02\u6b65\u83b7\u53d6\u6570\u636e\u5e76\u6b63\u786e\u586b\u5165UI\u53d8\u5f97\u5bb9\u6613\u3002</li>\n<li>\u8c03\u8bd5\u548c\u8ddf\u8e2a\u5de5\u5177\u3002</li>\n</ul>\n<p>Volley\u64c5\u957f\u8fdc\u7a0b\u7a0b\u5e8f\u8c03\u7528\uff08RPC,remote procedure call\uff09\u7c7b\u578b\u64cd\u4f5c,\u6765\u586b\u5165UI\uff0c\u6bd4\u5982\u6293\u53d6\u4e00\u9875\u641c\u7d22\u6570\u636e\u5e76\u7ed3\u6784\u5316\u3002\u5b83\u6613\u4e8e\u4e0e\u4efb\u4f55\u534f\u8bae\u5148\u7ed3\u5408\uff0c\u7136\u540e\u63d0\u4f9b\u539f\u59cb\u7684\u5b57\u7b26\u4e32\u3001\u56fe\u7247\u548cJSON\u652f\u6301\u3002\u901a\u8fc7\u63d0\u4f9b\u5185\u5efa\u7684\u652f\u6301\u4f60\u9700\u8981\u7684\u7279\u6027\uff0cVolley\u4f7f\u5f97\u4f60\u4ece\u6837\u677f\u4ee3\u7801\u4e2d\u89e3\u653e\uff0c\u4e13\u6ce8\u4e8eapp\u7684\u903b\u8f91\u5b9e\u73b0\u3002</p>\n<p>Volley\u4e0d\u9002\u5408\u7e41\u91cd\u7684\u4e0b\u8f7d\u6216\u8005\u6d41\u7684\u64cd\u4f5c\uff0c\u56e0\u4e3aVolley\u4f1a\u628a\u89e3\u6790\u5230\u7684\u54cd\u5e94\u6570\u636e\u4fdd\u6301\u5728\u5185\u5b58\u4e2d\u3002\u5bf9\u4e8e\u7e41\u91cd\u7684\u4e0b\u8f7d\u64cd\u4f5c\uff0c\u8003\u8651\u4f7f\u7528\u66ff\u4ee3\u54c1\uff0c\u6bd4\u5982<a href=\"https://developer.android.com/reference/android/app/DownloadManager.html\" target=\"_blank\">DownloadManager</a>\u3002</p>\n<p>Volley\u7684\u6838\u5fc3\u5e93\uff0c\u5728Android\u5f00\u653e\u6e90\u4ee3\u7801\u9879\u76ee\uff08AOSP\uff09\u4ed3\u5e93\u7684<code>frameworks/volley</code>\u4e2d\u5f00\u53d1\uff0c\u5e76\u4e14<br>contains the main request dispatch pipeline as well as a set of commonly applicable utilities, available in the Volley \"toolbox.\"\uff08\u6ca1\u7406\u89e3\uff0c\u6682\u65f6\u4e0d\u7ffb\u8bd1\uff09\u6dfb\u52a0Volley\u6700\u7b80\u5355\u7684\u65b9\u5f0f\u662f\u514b\u9686Volley\u4ed3\u5e93\u5230\u4f60\u7684\u9879\u76ee\u4e2d\u5e76\u8bbe\u7f6e\u4e3a\u5e93\u5de5\u7a0b\u3002</p>\n<ol>\n<li>\n<p>\u8f93\u5165\u4e0b\u9762\u7684\u547d\u4ee4\uff0c\u4f7f\u7528git\u514b\u9686\u4ed3\u5e93</p>\n<pre><code>git clone https://android.googlesource.com/platform/frameworks/volley</code></pre>\n</li>\n<li>\n<p>\u5bfc\u5165\u4e0b\u8f7d\u597d\u7684\u6e90\u6587\u4ef6\u5230\u4f60\u7684app\u9879\u76ee\u4e2d\uff0c\u5e76\u8bbe\u4e3aAndroid\u5e93\u6a21\u5757\uff08module\uff09\uff08\u5982\u679c\u4f60\u4f7f\u7528Android Studio\uff0c\u53ef\u4ee5\u5728 <a href=\"https://developer.android.com/sdk/installing/create-project.html#SettingUpLibraryModule\" target=\"_blank\">Managing Projects from Android Studio</a>\u770b\u5230\u8be5\u540d\u8bcdmodule\u7684\u63cf\u8ff0\uff09\u6216\u8005\u6253\u5305\u6210.jar\u6587\u4ef6\u3002</p>\n</li>\n</ol>\n<h3>\u6559\u7a0b</h3>\n<h5><a href=\"https://developer.android.com/training/volley/simple.html\" target=\"_blank\">\u53d1\u9001\u4e00\u4e2a\u7b80\u5355\u7684\u8bf7\u6c42</a></h5>\n<p>\u5b66\u5b8c\u5982\u4f55\u901a\u8fc7Volley\u7684\u9ed8\u8ba4\u884c\u4e3a\u6765\u53d1\u9001\u4e00\u4e2a\u7b80\u5355\u7684\u8bf7\u6c42\uff0c\u5e76\u77e5\u9053\u5982\u4f55\u53d6\u6d88\u4e00\u4e2a\u8bf7\u6c42\u3002</p>\n<h5><a href=\"https://developer.android.com/training/volley/requestqueue.html\" target=\"_blank\">\u5efa\u7acb\u4e00\u4e2a\u8bf7\u6c42\u961f\u5217\uff08RequestQueue\uff09</a></h5>\n<p>\u5b66\u4e60\u5982\u4f55\u5efa\u7acb\u4e00\u4e2a<code>RequestQueue</code>\uff0c\u548c\u5982\u4f55\u4f7f\u7528\u5355\u4f8b\u6a21\u5f0f\u521b\u5efa\u4e00\u4e2a\u4f34\u968fapp\u800c\u5b58\u5728\u7684<code>RequestQueue</code>\u3002</p>\n<h5><a href=\"https://developer.android.com/training/volley/request.html\" target=\"_blank\">\u53d1\u8d77\u4e00\u4e2a\u6807\u51c6\u7684\u8bf7\u6c42</a></h5>\n<p>\u5b66\u4e60\u5982\u4f55\u4f7f\u7528Volley\u73b0\u6210\u7684\u8bf7\u6c42\u7c7b\u578b\uff08\u539f\u59cb\u5b57\u7b26\u4e32\u3001\u56fe\u7247\u548cJSON\uff09\u53d1\u9001\u4e00\u4e2a\u8bf7\u6c42\u3002</p>\n<h5><a href=\"https://developer.android.com/training/volley/request-custom.html\" target=\"_blank\">\u5b9e\u73b0\u81ea\u5b9a\u4e49\u7684\u8bf7\u6c42</a></h5>\n<p>\u5b66\u4e60\u5982\u4f55\u5b9e\u73b0\u81ea\u5b9a\u4e49\u7684\u8bf7\u6c42\u3002</p>\n</div>"},
{"title": "ios - \u591a\u7ebf\u7a0b_\u57fa\u7840", "link": "https://www.jianshu.com/p/d5b781e68148", "show-content": "<div class=\"show-content\"><h2>\u4ec0\u4e48\u662f\u591a\u7ebf\u7a0b</h2>\n<ul>\n<li>\u7a0b\u5e8f\uff1a\u7531\u4ee3\u7801\u751f\u6210\u7684\u53ef\u6267\u884c\u5e94\u7528</li>\n<li>\u8fdb\u7a0b\uff1a\u4e00\u4e2a\u6b63\u5728\u8fd0\u884c\u7684\u7a0b\u5e8f\u53ef\u4ee5\u770b\u505a\u662f\u4e00\u4e2a\u8fdb\u7a0b</li>\n<li>\u7ebf\u7a0b\uff1a\u7a0b\u5e8f\u4e2d\u72ec\u7acb\u8fd0\u884c\u7684\u4ee3\u7801\u6bb5<br>\u4e00\u4e2a\u8fdb\u7a0b\u662f\u7531\u591a\u4e2a\u7ebf\u7a0b\u7ec4\u6210\u7684\u3002\u8fdb\u7a0b\u53ea\u662f\u8d1f\u8d23\u8d44\u6e90\u7684\u8c03\u5ea6\u548c\u5206\u914d\uff0c\u7ebf\u7a0b\u624d\u662f\u7a0b\u5e8f\u7684\u771f\u6b63\u6267\u884c\u5355\u5143\uff0c\u8d1f\u8d23\u4ee3\u7801\u7684\u6267\u884c\u3002<br>\u800c\u6b63\u5728\u8fd0\u884c\u7684\u7a0b\u5e8f\uff0c\u90fd\u81f3\u5c11\u4f1a\u6709\u4e00\u4e2a\u7ebf\u7a0b\uff0c\u8fd9\u4e2a\u7ebf\u7a0b\u5c31\u662f\u6211\u4eec\u7a0b\u5e8f\u7684\u4e3b\u7ebf\u7a0b\u3002\u4e3b\u7ebf\u7a0b\u5728\u7a0b\u5e8f\u542f\u52a8\u7684\u65f6\u5019\u88ab\u521b\u5efa\uff0c\u7528\u4e8e\u6267\u884cmain\u51fd\u6570\u3002<br>\u53ea\u6709\u4e00\u4e2a\u4e3b\u7ebf\u7a0b\u7684\u7a0b\u5e8f\uff0c\u88ab\u79f0\u4e4b\u4e3a\u5355\u7ebf\u7a0b\u7a0b\u5e8f\u3002<br>\u5728\u5355\u7ebf\u7a0b\u5f53\u4e2d\u5462\uff0c\u4e3b\u7ebf\u7a0b\u8d1f\u8d23\u6267\u884c\u6240\u6709\u7684\u4ee3\u7801\uff0c\u4e5f\u5c31\u662f\u8d1f\u8d23\u6574\u4e2a\u7a0b\u5e8f\u7684\u8fd0\u8f6c\uff0c\u53ea\u80fd\u591f\u4e00\u884c\u4e00\u884c\u7684\u53bb\u6267\u884c\uff0c\u800c\u4e0d\u53ef\u4ee5\u5e76\u884c\u6267\u884c\u591a\u4e2a\u90e8\u5206\u7684\u4ee3\u7801\u5757\u3002\u5982\u679c\u5728\u5904\u7406\u4e00\u4e9b\u8017\u65f6\u64cd\u4f5c\uff0c\u5bb9\u6613\u51fa\u73b0\u4ee3\u7801\u963b\u585e\uff0c\u4e5f\u5c31\u662f\u6211\u4eec\u7ecf\u5e38\u8bf4\u7684\u5361\u673a\uff08\u9875\u9762\u5047\u6b7b\uff09\u3002<br>\u800c\u62e5\u6709\u591a\u4e2a\u8fdb\u7a0b\u7684\u591a\u7ebf\u7a0b\u7a0b\u5e8f\uff0c\u53ef\u4ee5\u5728\u8fd0\u884c\u7684\u65f6\u5019\uff0c\u5e76\u884c\u6267\u884c\u51e0\u4e2a\u4e0d\u540c\u5185\u5bb9\u7684\u4ee3\u7801\u5757\u4e14\u4e92\u4e0d\u5e72\u9884\uff0c\u6781\u5927\u7684\u63d0\u9ad8\u4e86\u4ee3\u7801\u7684\u8fd0\u884c\u6548\u7387\uff0c\u4e5f\u518d\u4e00\u5b9a\u7a0b\u5ea6\u4e0a\u4f18\u5316\u4e86\u7a0b\u5e8f\u7684\u8fd0\u884c\u901f\u5ea6\uff0c\u8fd9\u4e00\u7c7b\u7684\u7a0b\u5e8f\u6211\u79f0\u4e4b\u4e3a\u591a\u7ebf\u7a0b\u7a0b\u5e8f\u3002<br>ios\u5141\u8bb8\u7528\u6237\u5f00\u8f9f\u81ea\u5df1\u7684\u65b0\u7ebf\u7a0b\uff0c\u76f8\u5bf9\u4e8e\u4e3b\u7ebf\u7a0b\u6765\u8bf4\uff0c\u8fd9\u4e9b\u7ebf\u7a0b\u53eb\u505a\u5b50\u7ebf\u7a0b\u3002<h2>ios - \u591a\u7ebf\u7a0b\u7684\u5b9e\u73b0\u79cd\u7c7b</h2>\n</li>\n<li>NSThread</li>\n<li>NSOperationQueue</li>\n<li>NSObject</li>\n<li>GCD</li>\n</ul>\n<h3>NSThread</h3>\n<p>\u5148\u4ecb\u7ecdNSThread<br>NSThread\u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684\u591a\u7ebf\u7a0b\uff0c\u6709\u4e24\u79cd\u521b\u5efa\u65b9\u5f0f\uff0c\u5728\u6211\u4eec\u65e5\u5e38\u7f16\u7a0b\u7684\u8fc7\u7a0b\u4e2d\uff0c\u5bf9\u4e00\u4e9b\u5c0f\u90e8\u4ef6\u7684\u52a0\u8f7d\u64cd\u4f5c\u6216\u662f\u8ba1\u7b97\u64cd\u4f5c\uff0c\u80fd\u591f\u719f\u7ec3\u8fd0\u7528NSThread\uff0c\u80fd\u4e3a\u6211\u4eec\u5e26\u6765\u5f88\u5927\u7684\u4fbf\u5229\u3002</p>\n<pre><code>//\u521d\u59cb\u5316\u4e00\u4e2a\u5b50\u7ebf\u7a0b\uff0c\u4f46\u9700\u8981\u624b\u52a8\u5f00\u542f\n-(id)initWithTarget:(id)target selector:(SEL)selector object:(id)Argument\n//\u5f00\u542f\u5b50\u7ebf\u7a0b\u7684\u547d\u4ee4\n[thread start];\n//\u53d6\u6d88\u5f53\u524d\u5b50\u7ebf\u7a0b\n[thread cancel];\n//\u7acb\u5373\u7ed3\u675f\u5b50\u7ebf\u7a0b\n[thread exit];\n//\u5224\u65ad\u4e00\u4e2a\u7ebf\u7a0b\u662f\u5426\u6b63\u5728\u6267\u884c\n[thread isExecuting];\n//\u5224\u65ad\u4e00\u4e2a\u7ebf\u7a0b\u662f\u5426\u5b8c\u6210\u4e86\u6267\u884c\n[thread isFinished];\n//\u83b7\u53d6\u5f53\u524d\u7ebf\u7a0b\n[NSThread currentThread];\n//\u83b7\u53d6\u4e3b\u7ebf\u7a0b\n[NSThread mainThread];\n//\u7ebf\u7a0b\u4f11\u77202\u79d2\n[NSThread sleepForTimeinterval:2];</code></pre>\n<pre><code>//\u521d\u59cb\u5316\u4e00\u4e2a\u7ebf\u7a0b\u5e76\u4e14\u81ea\u52a8\u5f00\u542f\n+ (void)detachNewThreadSelector:(SEL)selector toTarget:(id)target withObject:(nullable id)argument;</code></pre>\n<h3>\u6ce8\u610f\u4e8b\u9879</h3>\n<ul>\n<li>\n<p>\u6bcf\u4e2a\u7ebf\u7a0b\u90fd\u7ef4\u62a4\u7740\u4e0e\u81ea\u5df1\u5bf9\u5e94\u7684NSAutoreleasePool\u5bf9\u7ebf\uff0c\u5c06\u5176\u653e\u5728\u7ebf\u7a0b\u7684\u6808\u9876\u3002\u5f53\u7ebf\u7a0b\u7ed3\u675f\u65f6\uff0c\u4f1a\u6e05\u7a7a\u81ea\u52a8\u91ca\u653e\u6c60\u3002</p>\n</li>\n<li>\n<p>\u4e3a\u4fdd\u8bc1\u5bf9\u8c61\u7684\u53ca\u65f6\u91ca\u653e\uff0c \u5728\u591a\u7ebf\u7a0b\u65b9\u6cd5\u4e2d\u9700\u8981\u6dfb\u52a0\u81ea\u52a8\u91ca\u653e\u6c60</p>\n</li>\n<li>\n<p>\u5728\u5e94\u7528\u7a0b\u5e8f\u6253\u5f00\u7684\u65f6\u5019\uff0c\u7cfb\u7edf\u4f1a\u81ea\u52a8\u4e3a\u4e3b\u7ebf\u7a0b\u521b\u5efa\u4e00\u4e2a\u81ea\u52a8\u91ca\u653e\u6c60\u3002</p>\n</li>\n<li>\n<p>\u6211\u4eec\u624b\u52a8\u521b\u5efa\u7684\u5b50\u7ebf\u7a0b\u9700\u8981\u6211\u4eec\u624b\u52a8\u6dfb\u52a0\u5230\u81ea\u52a8\u91ca\u653e\u6c60</p>\n</li>\n<li>\n<p>ARC\u8bf7\u65e0\u89c6\u4e4b\uff0c \u4e86\u89e3\u4e00\u4e0b\u5185\u90e8\u5b9e\u73b0\u7684\u6d41\u7a0b</p>\n</li>\n</ul>\n<h3>NSObject</h3>\n<p>NSObject\u4e2d\u5b58\u5728\u4e86\u4e00\u4e2a\u6700\u7b80\u5355\u7684\u540e\u53f0\u6267\u884c\u65b9\u6cd5</p>\n<pre><code>//\u540e\u53f0\u6267\u884c\u67d0\u4e2a\u65b9\u6cd5\n- (void)performSelectorInBackground:(SEL)aSelector withObject:(nullable id)arg</code></pre>\n<h3>NSOperation</h3>\n<ul>\n<li>\n<p>NSOperation\u7c7b\uff0c\u5728\u7ecf\u5178MVC\u4e2d\u5c5e\u4e8eM\uff0c\u662f\u7528\u6765\u5c01\u88c5\u5355\u4e2a\u4efb\u52a1\u7684\u4ee3\u7801\u548c\u6570\u636e\u7684\u62bd\u8c61\u7c7b</p>\n</li>\n<li>\n<p>\u56e0\u4e3a\u662f\u62bd\u8c61\u7684\uff0c\u4e0d\u80fd\u76f4\u63a5\u4f7f\u7528\u8fd9\u4e2a\u7c7b\uff0c\u800c\u662f\u4f7f\u7528\u5b50\u7c7b\u6765\u6267\u884c\u4efb\u52a1</p>\n</li>\n<li>\n<p>NSOperation\uff08\u542b\u5b50\u7c7b\uff09\uff0c\u53ea\u662f\u4e00\u4e2a\u64cd\u4f5c\uff0c\u672c\u8eab\u65e0\u4e3b\u7ebf\u7a0b\uff0c\u5b50\u7ebf\u7a0b\u4e4b\u5206\uff0c\u53ef\u4ee5\u518d\u4efb\u610f\u7684\u7ebf\u7a0b\u4e2d\u4f7f\u7528\u3002\u901a\u5e38\u4e0eNSOperationQueue\u7efc\u5408\u4f7f\u7528\u3002</p>\n</li>\n</ul>\n<ul>\n<li>NSOperation\u7684\u5b50\u7c7b</li>\n</ul>\n<p>NSInvocationOperation --&gt; \u5c01\u88c5\u4e86\u6267\u884c\u64cd\u4f5c\u7684target\u548c\u8981\u6267\u884c\u7684action</p>\n<pre><code>NSInvocationOperation * io = [[NSInvocationOperation alloc]initWithTarget:self selector:@selector(test) object:nil];\n\n[io start];</code></pre>\n<p>NSBlockOperation --&gt;\u5c01\u88c5\u4e86\u9700\u8981\u6267\u884c\u7684\u4ee3\u7801\u5757\uff08\u56de\u8c03\uff09</p>\n<pre><code>NSBlockOperation * bo = [[NSBlockOperation blockOperationWithBlock:^{\n NSLog:(@\"\u5f53\u524d\u662f:%@, \u662f\u5426\u4e3b\u7ebf\u7a0b:%d\",\n [NSThread currentThread],[[NSThread currentThread] isMainThread])];\n\n[bo start];</code></pre>\n<h3>NSOperationQueue</h3>\n<ul>\n<li>\n<p>\u64cd\u4f5c\u961f\u5217\uff0c\u7528\u6765\u7ba1\u7406\u4e00\u7ec4Operation\u5bf9\u8c61\u7684\u6267\u884c\uff0c\u4f1a\u6839\u636e\u9700\u8981\u81ea\u52a8\u4e3aOperation\u5f00\u8f9f\u5408\u9002\u6570\u91cf\u7684\u7ebf\u7a0b\uff0c\u4ee5\u5b8c\u6210\u4efb\u52a1\u7684\u5e76\u884c\u6267\u884c\u3002</p>\n</li>\n<li>\n<p>\u5176\u4e2dNSOperation\u53ef\u4ee5\u8c03\u8282\u5b83\u5728\u961f\u5217\u4e2d\u7684\u4f18\u5148\u7ea7\uff08\u4f7f\u7528addDependency\uff1a\u8bbe\u7f6e\u4f9d\u8d56\u5173\u7cfb\uff09</p>\n</li>\n<li>\n<p>\u5f53\u6700\u5927\u5e76\u53d1\u6570\u8bbe\u7f6e\u4e3a1\u7684\u65f6\u5019\uff0c\u80fd\u5b9e\u73b0\u7ebf\u7a0b\u540c\u6b65\uff08\u4e32\u884c\u6267\u884c\uff09\u3002</p>\n</li>\n</ul>\n<pre><code>NSOperationQueue * queue = [[NSOperationQueue alloc] init];\n\n//\u8bbe\u7f6e\u6700\u5927\u5e76\u53d1\u6570\nqueue.maxConcurrentOperationCount = 1;\n\nfor(int i = 0, i &lt; 10, i++) {\nNSBlockOperation * open1 = [NSBlockOperation blockOperationWithBlock:^{\n NSLog:(@\"\u5f53\u524d\u662f:%@, \u662f\u5426\u4e3b\u7ebf\u7a0b:%d\",\n [NSThread currentThread],[[NSThread currentThread] isMainThread])];\n}];\n[queue addOperation:open1];\n}</code></pre>\n<h2>GCD\u4ecb\u7ecd</h2>\n<pre><code>Grand Central Dispatch</code></pre>\n<p>\u5149\u542c\u540d\u5b57\u5c31\u8ba9\u4eba\u89c9\u5f97\u597d\u9ad8\u7aef\u4e86233333\ud83d\ude04\uff0c\u6211\u6bcf\u6b21\u542c\u5230\u8fd9\u4e2a\u540d\u5b57\u90fd\u4f1a\u60f3\u5230\u54e5\u8c2d\u7684CCPD\u554a2333\u3002\u5e9f\u8bdd\u4e0d\u591a\u8bf4\uff0c\u6211\u4eec\u6765\u7b80\u5355\u4ecb\u7ecd\u4e00\u4e0b\u4ec0\u4e48\u662fGCD\uff0c\u5b83\u53c8\u662f\u5982\u4f55\u9ad8\u5927\u4e0a\u7684</p>\n<ul>\n<li>\n<p>GCD\u662fApple\u5f00\u53d1\u7684\u4e00\u79cd\u591a\u6838\u7f16\u7a0b\u6280\u672f\u3002\u4e3b\u8981\u7528\u4e8e\u4f18\u5316\u5e94\u7528\u7a0b\u5e8f\u4ee5\u652f\u6301\u591a\u6838\u5904\u7406\u5668\u4ee5\u53ca\u5176\u4ed6\u5bf9\u79f0\u5904\u7406\u7cfb\u7edf\u3002</p>\n</li>\n<li>\n<p>GCD\u63d0\u4f9b\u51fd\u6570\u5b9e\u73b0\u591a\u7ebf\u7a0b\u5f00\u53d1\uff0c \u6027\u80fd\u66f4\u9ad8\uff0c \u529f\u80fd\u4e5f\u8981\u66f4\u5f3a\u5927\u3002</p>\n</li>\n<li>\n<p>\u9996\u6b21\u53d1\u5e03\u5728MAC OS X 10.6\u3002</p>\n</li>\n</ul>\n<h3>GCD\u6838\u5fc3\u7406\u5ff5</h3>\n<ul>\n<li>\n<p>\u4efb\u52a1 \uff1a\u5177\u6709\u4e00\u5b9a\u529f\u80fd\u7684\u4ee3\u7801\u6bb5\u3002\u4e00\u822c\u662f\u4e00\u4e2ablock\u6216\u8005\u51fd\u6570</p>\n</li>\n<li>\n<p>\u5206\u53d1\u961f\u5217\uff1a GCD\u4ee5\u961f\u5217\u7684\u65b9\u5f0f\u7ecf\u884c\u5de5\u4f5c\uff0cFIFO</p>\n</li>\n<li>\n<p>GCD\u4f1a\u6839\u636e\u5206\u53d1\u961f\u5217\u7684\u7c7b\u578b\uff0c\u521b\u5efa\u5408\u9002\u6570\u91cf\u7684\u7ebf\u7a0b\u6267\u884c\u961f\u5217\u4e2d\u7684\u4efb\u52a1\u3002</p>\n</li>\n</ul>\n<h3>GCD\u4e2d\u4e24\u79cd\u961f\u5217</h3>\n<ul>\n<li>\n<p>dispatch queue\u5206\u4e3a\u4e00\u4e0b\u4e24\u79cd\uff1a</p>\n</li>\n<li>\n<p>SerialQueue\uff1a\u4e00\u6b21\u53ea\u6267\u884c\u4e00\u4e2a\u4efb\u52a1\u3002\u5e38\u7528\u4e8e\u540c\u6b65\u8bbf\u95ee\u6570\u636e\uff0c\u5f53\u521b\u5efa\u591a\u4e2a\u65f6\uff0c\u867d\u7136SerialQueue\u662f\u540c\u6b65\u6267\u884c\uff0c\u4f46\u5374\u662f\u5e76\u53d1\u7684\uff0c\u53ef\u4ee5\u5b9e\u73b0\u7ebf\u7a0b\u540c\u6b65\u3002</p>\n</li>\n<li>\n<p>Concurrent \uff1a\u53ef\u4ee5\u5e76\u53d1\u5730\u6267\u884c\u591a\u4e2a\u4efb\u52a1\uff0c\u4f46\u662f\u9075\u5b88FIFO</p>\n</li>\n</ul>\n<pre><code>//\u4e32\u884c\ndispatch_queue_t queue = dispatch_get_main_queue();\n dispatch_async(queue, ^{\n NSLog:(@\"\u7b2c\u4e00\u4e2a\u4efb\u52a1\uff0c\u5f53\u524d\u662f:%@, \u662f\u5426\u4e3b\u7ebf\u7a0b:%d\",\n [NSThread currentThread],[[NSThread currentThread] isMainThread])];\n });</code></pre>\n<pre><code>//\u83b7\u53d6\u4e32\u884c\u7684\u7b2c\u4e8c\u79cd\u65b9\u5f0f\uff0c\u81ea\u5df1\u521b\u5efa\u961f\u5217\uff0c\u7b2c\u4e00\u4e2a\u53c2\u6570\u662f\u961f\u5217\u7684\u540d\u5b57\uff08\u82f9\u679c\u63a8\u8350\u4f7f\u7528\u53cd\u5411\u57df\u540d\u53bb\u547d\u540d\uff09\uff0c\n//\u7b2c\u4e8c\u4e2a\u662f\u53c2\u6570\u961f\u5217\u7684\u7c7b\u578b\uff0c\u8fd9\u79cd\u65b9\u5f0f\u521b\u5efa\u7684\u961f\u5217\uff0c\u5b83\u4f1a\u81ea\u5df1\u53bb\u5f00\u8f9f\u4e00\u4e2a\u5b50\u7ebf\u7a0b\u53bb\u5b8c\u6210\u961f\u5217\u91cc\u9762\u7684\u4efb\u52a1\ndispatch_queue_t queue = \ndispatch_queue_create(\"com.baidu.mySerialQueue\", DISPATCH_QUEUE_SERIAL);\ndispatch_async(queue, ^{\nNSLog(@\"\u8fd9\u662f\u7b2c\u4e00\u4e2a\u4efb\u52a1\uff0c\u5f53\u524d\u7ebf\u7a0b\u662f\uff1a%@,\u662f\u5426\u4e3b\u7ebf\u7a0b\uff1a%d \",\n[NSThread currentThread], [[NSThread currentThread]isMainThread]);\n});</code></pre>\n<h4>\u5e76\u884c\u961f\u5217\u4ee3\u7801</h4>\n<pre><code>\u591a\u7ebf\u7a0b.key\n\n// \u7b2c\u4e00\u79cd\u65b9\u5f0f\n// global queue \u662f\u82f9\u679c\u91cc\u9762\u7684\u5168\u5c40\u961f\u5217 \u67094\u79cd\u4f18\u5148\u7ea7\n DISPATCH_QUEUE_PRIORITY_DEFAUL,\n DISPATCH_QUEUE_PRIORITY_HIGH,\n DISPATCH_QUEUE_PRIORITY_LOW,\n DISPATCH_QUEUE_PRIORITY_BACKGROUND\n// \u7b2c\u4e00\u4e2a\u53c2\u6570\u5c31\u662f\u961f\u5217\u7684\u4f18\u5148\u7ea7\uff0c\u7b2c\u4e8c\u4e2a\u662f\u82f9\u679c\u9884\u7559\u7684\u53c2\u6570\u4e3a\u4e86\u4ee5\u540e\u4f7f\u7528\uff0c\u76ee\u524d\u7528\u4e0d\u5230\uff0c\u586b0\ndispatch_queue_t oneQueue =dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,0);\ndispatch_async(oneQueue, ^{NSLog(@\"\u7ebf\u7a0b\u662f\uff1a%@\uff0c\u662f\u5426\u4e3b\u7ebf\u7a0b\uff1a%d\",\n [NSThread currentThread], [[NSThread currentThread]\n isMainThread]);\n });</code></pre>\n<pre><code>\u591a\u7ebf\u7a0b.key\n\n//\u7b2c\u4e8c\u79cd\u521b\u5efa\u5e76\u53d1\u961f\u5217\u7684\u65b9\u5f0f\uff1a\ndispatch_queue_t twoQueue =dispatch_queue_create(\"com.lanou3g.myQueue\",DISPATCH_QUEUE_CONCURRENT);\n// \u6dfb\u52a0\u4efb\u52a1\ndispatch_async(twoQueue, ^{\nNSLog(@\"\u7ebf\u7a0b\uff1a%@, \u662f\u5426\u4e3b\u7ebf\u7a0b\uff1a%d\", \n[NSThread currentThread], [[NSThreadcurrentThread] isMainThread]);\n});</code></pre>\n<h5>\u5ef6\u8fdf\u6267\u884c</h5>\n<pre><code>// \u5ef6\u8fdf\u6267\u884c\u4e00\u6bb5\u4ee3\u7801\ndispatch_after(dispatch_time(DISPATCH_TIME_NOW,(int64_t)(3 * NSEC_PER_SEC)),dispatch_get_main_queue(), ^{\nNSLog(@\"%@, %d\", \n[NSThread currentThread], [[NSThreadcurrentThread] isMainThread]);\n});</code></pre>\n<h3>GCD\u529f\u80fd</h3>\n<ul>\n<li>\n<p>dispatch_async() //\u5f80\u961f\u5217\u4e2d\u6dfb\u52a0\u4efb\u52a1\uff0c\u4efb\u52a1\u4f1a\u6392\u961f\u6267\u884c </p>\n</li>\n<li>\n<p>dispatch_after() //\u5f80\u961f\u5217\u4e2d\u6dfb\u52a0\u4efb\u52a1\uff0c\u4efb\u52a1\u6392\u961f\u4e14\u5ef6\u8fdf\u6267\u884c</p>\n</li>\n<li>\n<p>dispatch_apply() //\u5f80\u961f\u5217\u4e2d\u6dfb\u52a0\u4efb\u52a1\uff0c\u4efb\u52a1\u91cd\u590d\u6267\u884c</p>\n</li>\n</ul>\n<pre><code> dispatch_apply(3, dispatch_get_main_queue(), ^(size_t index) {\n NSLog(@\"%d\",index); });</code></pre>\n<ul>\n<li>\n<p>dispatch_group_async() //\u5f80\u961f\u5217\u4e2d\u6dfb\u52a0\u4efb\u52a1\uff0c\u5e76\u6dfb\u52a0\u5206\u7ec4\u6807\u8bb0</p>\n</li>\n<li>\n<p>dispatch_group_notify() //\u5f80\u961f\u5217\u4e2d\u6dfb\u52a0\u4efb\u52a1\uff0c\u5f53\u67d0\u4e2a\u5206\u7ec4\u7684\u6240\u6709\u4efb\u52a1\u6267\u884c\u5b8c\u4e4b\u540e\uff0c\u6b64\u4efb\u52a1\u624d\u6267\u884c</p>\n</li>\n<li>\n<p>dispatch_barrier_async() //\u5f80\u961f\u5217\u4e2d\u6dfb\u52a0\u4efb\u52a1\uff0c\u6b64\u4efb\u52a1\u6267\u884c\u7684\u65f6\u5019\uff0c\u5176\u4ed6\u4efb\u52a1\u505c\u6b62</p>\n</li>\n</ul>\n<pre><code>//1\u521b\u5efa\u961f\u5217\n dispatch_queue_t queue =dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,0);\n//2\u521b\u5efa\u7956\ndispatch_group_t group = dispatch_group_create();\n//3notify\u4e4b\u524d\u6700\u8d77\u7801\u9700\u8981\u4e00\u4e2a\u4efb\u52a1\uff0c\u5426\u5219notify\u4e0d\u4f1a\u7b49\u5176\u4ed6\u6267\u884c\u5b8c\u624d\u6267\u884c\ndispatch_group_async(group, queue, ^{NSLog(@\"\u7ebf\u7a0b\u662f\uff1a%@\uff0c \u662f\u5426\u4e3b\u7ebf\u7a0b\uff1a%d\", \n[NSThread\ncurrentThread], [[NSThread currentThread] isMainThread]); });\ndispatch_group_notify(group, queue, ^{NSLog(@\"\u6211\u662f\u6700\u540e\u4e00\u4e2a\u4efb\u52a1\uff0c\u5176\u4ed6\u6267\u884c\u5b8c\u6211\u624d\u6267\u884c\");\n});</code></pre>\n<ul>\n<li>\n<p>dispatch_once() //\u5f80\u961f\u5217\u4e2d\u6dfb\u52a0\u4efb\u52a1\uff0c\u5728\u7a0b\u5e8f\u8fd0\u884c\u4e2d\uff0c\u53ea\u6267\u884c\u4e00\u6b21</p>\n</li>\n<li>\n<p>dispatch_sync() //\u5f80\u961f\u5217\u4e2d\u6dfb\u52a0\u4efb\u52a1\uff0cblock\u4e0d\u6267\u884c\uff0c\u4e0b\u9762\u4ee3\u7801\u4e0d\u6267\u884c</p>\n</li>\n<li>\n<p>dispatch_async_f() //\u5f80\u961f\u5217\u4e2d\u6dfb\u52a0\u4efb\u52a1\uff0c\u4efb\u52a1\u662f\u51fd\u6570\u4e0d\u662fblock</p>\n</li>\n</ul>\n<h3>\u7ebf\u7a0b\u95f4\u7684\u901a\u4fe1</h3>\n<ul>\n<li>\n<p>\u4e3b\u7ebf\u7a0b\u8fdb\u5165\u5b50\u7ebf\u7a0b</p>\n</li>\n<li>\n<p>\u5b50\u7ebf\u7a0b\u56de\u5230\u4e3b\u7ebf\u7a0b</p>\n<pre><code>GCD\uff1adispatch_get_main_queue();\nNSObjec:- (void)performSelectorOnMainThread:(SEL)aSelector withObject:(nullable id)arg waitUntilDone:(BOOL)wait;</code></pre>\n</li>\n</ul>\n<h4>\u7ebf\u7a0b\u4e92\u65a5</h4>\n<p>\u591a\u7ebf\u7a0b\u5e76\u884c\u7f16\u7a0b\u4e2d\uff0c\u7f16\u7a0b\u95f4\u540c\u6b65\u4e92\u65a5\u662f\u4e00\u4e2a\u5f88\u6709\u6280\u5de7\u7684\u4e5f\u5f88\u5bb9\u6613\u51fa\u9519\u7684\u5730\u65b9\u3002<br>\u7ebf\u7a0b\u4e92\u65a5\u5e94\u5bf9\u7684\u662f\u8fd9\u79cd\u573a\u666f\uff1a<br>\u591a\u4e2a\u7ebf\u7a0b\u64cd\u4f5c\u540c\u4e00\u4e2a\u8d44\u6e90\uff08\u975e\u5bf9\u8c61\uff09\uff0c\u9700\u8981\u4fdd\u8bc1\u7ebf\u7a0b\u5728\u5bf9\u8d44\u6e90\u7684\u72b6\u6001\u8fdb\u884c\u4e00\u4e9b\u975e\u539f\u5b50\u7684\u64cd\u4f5c\u540e\uff0c\u72b6\u6001\u4ecd\u7136\u6b63\u786e\u3002</p>\n</div>"},
{"title": "\u7ffb\u8bd1\uff1aCFNetwork\u7f16\u7a0b\u6307\u5357\uff08CFNetwork Programming Guide\uff09", "link": "https://www.jianshu.com/p/69b181a33383", "show-content": "<div class=\"show-content\"><p>CFNetwork\u662f\u6838\u5fc3\u670d\u52a1\u6846\u67b6\u4e2d\u7684\u4e00\u4e2a\u6846\u67b6\uff0c\u63d0\u4f9b\u4e86\u62bd\u8c61\u6982\u5ff5\u7684\u7f51\u7edc\u534f\u8bae\u5e93\u3002\u8fd9\u4e9b\u62bd\u8c61\u6982\u5ff5\u4f7f\u5f97\u6267\u884c\u5404\u79cd\u7f51\u7edc\u4efb\u52a1\u53d8\u5f97\u66f4\u5bb9\u6613\uff0c\u4f8b\u5982\uff1a</p>\n<ul>\n<li>\n<p>\u4f7f\u7528BSD\u5957\u63a5\u5b57</p>\n</li>\n<li>\n<p>\u4f7f\u7528SSL\u6216TLS\u521b\u5efa\u52a0\u5bc6\u8fde\u63a5</p>\n</li>\n<li>\n<p>\u89e3\u6790DNS\u4e3b\u673a</p>\n</li>\n<li>\n<p>\u4f7f\u7528HTTP\uff0c\u9a8c\u8bc1HTTP\u548cHTTP\u670d\u52a1\u5668</p>\n</li>\n<li>\n<p>\u4f7f\u7528FTP\u670d\u52a1\u5668</p>\n</li>\n<li>\n<p>\u53d1\u5e03\u3001\u89e3\u6790\u548c\u6d4f\u89c8Bonjour \u670d\u52a1\uff08NSNetServices\u548cCFNetServices\u7f16\u7a0b\u6307\u5357( <a href=\"https://developer.apple.com/library/ios/documentation/Networking/Conceptual/NSNetServiceProgGuide/Introduction.html#//apple_ref/doc/uid/TP40002736\" target=\"_blank\">NSNetServices and CFNetServices Programming Guide</a>\u4e2d\u6709\u8ba8\u8bba\uff09\u3002</p>\n</li>\n</ul>\n<p>\u672c\u6587\u662f\u9488\u5bf9\u60f3\u5728\u5e94\u7528\u4e2d\u4f7f\u7528\u7f51\u7edc\u534f\u8bae\u7684\u5f00\u53d1\u4eba\u5458\u3002\u4e3a\u4e86\u5b8c\u5168\u7406\u89e3\u672c\u6587\uff0c\u8bfb\u8005\u5e94\u8be5\u5bf9\u7f51\u7edc\u7f16\u7a0b\u6982\u5ff5\u5982BSD\u5957\u63a5\u5b57\u3001\u6d41\u548cHTTP\u534f\u8bae\u6709\u5f88\u597d\u7684\u7406\u89e3\u3002\u6b64\u5916\uff0c\u8bfb\u8005\u5e94\u719f\u6089OS X\u7f16\u7a0b\u6982\u5ff5\u5305\u62ec\u8fd0\u884c\u5faa\u73af\u3002\u5173\u4e8eOS X\u66f4\u591a\u4fe1\u606f\u8bf7\u9605\u8bfbOS X\u6280\u672f\u6982\u8ff0\u3002</p>\n<h3>\u672c\u6587\u7ec4\u7ec7\u7ed3\u6784</h3>\n<p>\u672c\u6587\u5305\u542b\u4ee5\u4e0b\u7ae0\u8282\uff1a</p>\n<ul>\n<li>\n<p><a href=\"https://www.jianshu.com/p/5a2a219ec878\" target=\"_blank\">CFNetwork\u6982\u5ff5</a>\uff08<a href=\"https://developer.apple.com/library/ios/documentation/Networking/Conceptual/CFNetwork/Concepts/Concepts.html#//apple_ref/doc/uid/TP30001132-CH4-SW10\" target=\"_blank\"><strong>CFNetwork Concepts</strong></a> \uff09\u63cf\u8ff0\u4e86\u6bcf\u4e2aCFNetwork API\u53ca\u5b83\u4eec\u662f\u5982\u4f55\u4ea4\u4e92\u7684\u3002</p>\n</li>\n<li>\n<p><a href=\"https://www.jianshu.com/p/f6f99ddccbb5\" target=\"_blank\">\u4f7f\u7528\u6d41</a>\uff08<a href=\"https://developer.apple.com/library/ios/documentation/Networking/Conceptual/CFNetwork/CFStreamTasks/CFStreamTasks.html#//apple_ref/doc/uid/TP30001132-CH6-SW1\" target=\"_blank\"><strong>Working with Streams</strong></a> \uff09\u63cf\u8ff0\u4e86\u5982\u4f55\u4f7f\u7528CFStream API\u6765\u53d1\u9001\u548c\u63a5\u6536\u7f51\u7edc\u6570\u636e\u3002</p>\n</li>\n<li>\n<p><a href=\"https://www.jianshu.com/p/9f882137bb85\" target=\"_blank\">\u4e0eHTTP\u670d\u52a1\u5668\u901a\u4fe1</a>\uff08<a href=\"https://developer.apple.com/library/ios/documentation/Networking/Conceptual/CFNetwork/CFHTTPTasks/CFHTTPTasks.html#//apple_ref/doc/uid/TP30001132-CH5-SW2\" target=\"_blank\"><strong>Communicating with HTTP Servers</strong></a> \uff09\u63cf\u8ff0\u4e86\u5982\u4f55\u53d1\u9001\u548c\u63a5\u6536HTTP\u6d88\u606f\u3002</p>\n</li>\n<li>\n<p><a href=\"https://www.jianshu.com/p/01e4c788d0b1\" target=\"_blank\">\u4e0e\u8eab\u4efd\u9a8c\u8bc1HTTP\u670d\u52a1\u5668\u901a\u4fe1</a>\uff08<a href=\"https://developer.apple.com/library/ios/documentation/Networking/Conceptual/CFNetwork/CFHTTPAuthenticationTasks/CFHTTPAuthenticationTasks.html#//apple_ref/doc/uid/TP30001132-CH8-SW1\" target=\"_blank\"><strong>Communicating with Authenticating HTTP Servers</strong></a>\uff09\u63cf\u8ff0\u4e86\u5982\u4f55\u4e0e\u5b89\u5168HTTP\u670d\u52a1\u5668\u901a\u4fe1\u3002</p>\n</li>\n<li>\n<p><a href=\"https://www.jianshu.com/p/ca3ca9e6c1a8\" target=\"_blank\">\u4f7f\u7528FTP\u670d\u52a1\u5668</a>\uff08<a href=\"https://developer.apple.com/library/ios/documentation/Networking/Conceptual/CFNetwork/CFFTPTasks/CFFTPTasks.html#//apple_ref/doc/uid/TP30001132-CH9-SW1\" target=\"_blank\"><strong>Working with FTP Servers</strong></a>\uff09\u63cf\u8ff0\u4e86\u5982\u4f55\u4ece\u4e00\u4e2aFTP\u670d\u52a1\u5668\u4e0a\u4e0a\u4f20\u548c\u4e0b\u8f7d\u6587\u4ef6\uff0c\u4ee5\u53ca\u5982\u4f55\u4e0b\u8f7d\u76ee\u5f55\u5217\u8868\u3002</p>\n</li>\n<li>\n<p><a href=\"https://www.jianshu.com/p/492f27d5e663\" target=\"_blank\">\u4f7f\u7528\u7f51\u7edc\u8bca\u65ad</a>\uff08<a href=\"https://developer.apple.com/library/ios/documentation/Networking/Conceptual/CFNetwork/UsingNetworkDiagnostics/UsingNetworkDiagnostics.html#//apple_ref/doc/uid/TP30001132-CH7-SW1\" target=\"_blank\"><strong>Using Network Diagnostics</strong></a> \uff09\u63cf\u8ff0\u4e86\u5982\u4f55\u4e3a\u5e94\u7528\u6dfb\u52a0\u7f51\u7edc\u8bca\u65ad\u3002</p>\n</li>\n</ul>\n<h3>\u53e6\u8bf7\u53c2\u9605</h3>\n<p>\u5173\u4e8eOS X\u7f51\u7edcAPI\u66f4\u591a\u4fe1\u606f\uff0c\u53ef\u67e5\u770b\uff1a</p>\n<ul>\n<li><em>\u5f00\u59cb\u4f7f\u7528\u7f51\u7edc</em></li>\n</ul>\n<p>\u8bf7\u53c2\u8003\u4e0b\u9762\u7684CFNetwork\u53c2\u8003\u6587\u6863\uff1a</p>\n<ul>\n<li>\n<p>CFFTPStream \u5f15\u7528\uff08<a href=\"https://developer.apple.com/library/ios/documentation/CoreFoundation/Reference/CFFTPStreamRef/index.html#//apple_ref/doc/uid/TP40003359\" target=\"_blank\">CFFTPStream Reference</a>\uff09\u662fCFFTPStream API\u7684\u53c2\u8003\u6587\u6863\u3002</p>\n</li>\n<li>\n<p>CFHTTPMessage \u5f15\u7528\uff08<a href=\"https://developer.apple.com/library/ios/documentation/CoreFoundation/Reference/CFMessageRef/index.html#//apple_ref/doc/uid/TP40003336\" target=\"_blank\">CFHTTPMessage Reference</a>\uff09\u662fCFHTTPMessage API\u7684\u53c2\u8003\u6587\u6863\u3002</p>\n</li>\n<li>\n<p>CFHTTPStream \u5f15\u7528\uff08<a href=\"https://developer.apple.com/library/ios/documentation/CoreFoundation/Reference/CFHTTPStreamRef/index.html#//apple_ref/doc/uid/TP40003363\" target=\"_blank\">CFHTTPStream Reference</a>\uff09\u662fCFHTTPStream API\u7684\u53c2\u8003\u6587\u6863\u3002</p>\n</li>\n<li>\n<p>CFHTTPAuthentication \u5f15\u7528\uff08<a href=\"https://developer.apple.com/library/ios/documentation/CoreFoundation/Reference/CFHTTPAuthenticationRef/index.html#//apple_ref/doc/uid/TP40003335\" target=\"_blank\">CFHTTPAuthentication Reference</a>\uff09\u662fCFHTTPAuthentication API\u7684\u53c2\u8003\u6587\u6863\u3002</p>\n</li>\n<li>\n<p>CFHost \u5f15\u7528\uff08<a href=\"https://developer.apple.com/library/ios/documentation/CoreFoundation/Reference/CFHostRef/index.html#//apple_ref/doc/uid/TP40003333\" target=\"_blank\">CFHost Reference</a>\uff09\u662fCFHost API\u7684\u53c2\u8003\u6587\u6863\u3002</p>\n</li>\n<li>\n<p>CFNetServices \u5f15\u7528\uff08<a href=\"https://developer.apple.com/library/ios/documentation/CoreFoundation/Reference/CFNetServiceRef/index.html#//apple_ref/doc/uid/TP40003365\" target=\"_blank\">CFNetServices Reference</a>\uff09\u662fCFNetServices API\u7684\u53c2\u8003\u6587\u6863\u3002</p>\n</li>\n<li>\n<p>CFNetDiagnostics\u5f15\u7528\uff08<a href=\"https://developer.apple.com/library/ios/documentation/CoreFoundation/Reference/CFNetDiagnosticsRef/index.html#//apple_ref/doc/uid/TP40003364\" target=\"_blank\">CFNetDiagnostics Reference</a>\uff09\u662fCFNetDiagnosticsAPI\u7684\u53c2\u8003\u6587\u6863\u3002</p>\n</li>\n</ul>\n<p>\u9664\u4e86\u82f9\u679c\u63d0\u4f9b\u7684\u6587\u6863\uff0c\u4e0b\u9762\u662fsocket\u7ea7\u522b\u7f16\u7a0b\u7684\u53c2\u8003\u4e66\uff1a</p>\n<p>UNIX\u7f51\u7edc\u7f16\u7a0b\uff0c\u53771\uff08Stevens, Fenner and Rudoff\uff09</p>\n<h3>\u5b98\u65b9\u539f\u6587\u5730\u5740\uff1a</h3>\n<p><a href=\"https://developer.apple.com/library/ios/documentation/Networking/Conceptual/CFNetwork/Introduction/Introduction.html\" target=\"_blank\">https://developer.apple.com/library/ios/documentation/Networking/Conceptual/CFNetwork/Introduction/Introduction.html</a></p>\n</div>"},
{"title": "XMPP\u642d\u5efa\u672c\u5730\u670d\u52a1\u5668\u3001\u5b9e\u73b0\u5373\u65f6\u901a\u8baf\uff08\u4e00\uff09", "link": "https://www.jianshu.com/p/5ea6b611c5b1", "show-content": "<div class=\"show-content\"><p>XMPP\u642d\u5efa\u672c\u5730\u670d\u52a1\u5668\u80fd\u591f\u5b9e\u73b0\u5373\u65f6\u901a\u8baf\u7684\u529f\u80fd\uff0c\u90a3\u4e48\u6211\u4eec\u5982\u4f55\u505a\u5462\uff1f\u4e0b\u9762\u6211\u4eec\u5c31\u4e00\u8d77\u8d70\u4e00\u904d\uff01<br>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u5b89\u88c5\u4e00\u4e2a\u53eb\u505aOpenfile\u7684\u8f6f\u4ef6 \u5b89\u88c5\u6210\u529f\u65f6\u5019\u6211\u4eec\u53ef\u4ee5\u5728\u7535\u8111\u7684\u7cfb\u7edf\u504f\u597d\u8bbe\u7f6e\u91cc\u9762\u6253\u5f00\u8fd9\u4e2a\u8f6f\u4ef6<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1421018-13161447165b615d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1421018-13161447165b615d.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\"></div>\n</div><p><br>\u7136\u540e\u70b9\u51fb\u6253\u5f00 Status\u663e\u793aRunning\u8868\u793a\u670d\u52a1\u6253\u5f00<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1421018-a074c8c89e1b38fb.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1421018-a074c8c89e1b38fb.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\"></div>\n</div><p><br>\u7136\u540e\u70b9\u51fbOpen Admin Console \u6253\u5f00Openfile\u7684\u63a7\u5236\u5e73\u53f0\u8fdb\u884c\u76f8\u5173\u914d\u7f6e\u9009\u62e9-&gt;\u7b80\u4f53\u4e2d\u6587\u70b9\u51fb-&gt; Continue<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1421018-f1fb114d418971f6.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1421018-f1fb114d418971f6.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\"></div>\n</div><p><br>\u7136\u540e\u57df\u540d\u4e3a127.0.0.1\uff08\u672c\u673a\u4f5c\u4e3a\u670d\u52a1\u5668\uff09<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1421018-1d3b3e81a3b1a892.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1421018-1d3b3e81a3b1a892.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\"></div>\n</div>\n<p>Openfile\u9700\u8981\u94fe\u63a5\u4e00\u4e2a\u6570\u636e\u5e93\u6765\u5b58\u50a8\u6211\u4eec\u7684\u8d26\u53f7\u4fe1\u606f\uff0c\u4ee5\u53ca\u804a\u5929\u7684\u8bb0\u5f55<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1421018-22d9d67e7e552d9b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1421018-22d9d67e7e552d9b.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\"></div>\n</div><p><br>\u6211\u4eec\u524d\u5f80\u6587\u4ef6\u5939\uff1a/usr/local \u70b9\u51fbOpenfile-&gt;\u663e\u793a\u7b80\u4ecb\uff0c\u5c06\u5176\u8bbf\u95ee\u6743\u9650\u6539\u6210-&gt;\u8bfb\u4e0e\u5199,\u63a5\u4e0b\u6765\u70b9\u51fbresource-&gt;database-&gt;openfile_mysql.sql\u8fd9\u4e2a\u6587\u4ef6\u5c31\u662f\u6211\u4eec\u63a5\u4e0b\u6765\u8981\u7528\u7684\uff0c\u7c98\u8d34\u5230\u684c\u9762<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1421018-75eac9b7dfb482a7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1421018-75eac9b7dfb482a7.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\"></div>\n</div>\n<p>\u4f46\u662f\u6211\u4eec\u600e\u4e48\u94fe\u63a5\u6570\u636e\u5e93\u5462\uff1f\u8fd9\u4e2a\u65f6\u5019\u9700\u8981\u6211\u4eec\u5b89\u88c5\u4e00\u4e2aXAMPP\u7684\u96c6\u6210\u73af\u5883\uff0cXAMPP\u91cc\u9762\u96c6\u6210\u7684\u5c31\u6709MySQL\uff0c\u4e0d\u8fc7\u4fdd\u8bc1\u4e09\u4e2a\u670d\u52a1\u90fd\u662f\u5f00\u542f\u7684<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1421018-23f13ffc053a47b8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1421018-23f13ffc053a47b8.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\"></div>\n</div><p><br>\u7136\u540e\u70b9\u51fbwelcome-&gt;Go ToApplication-&gt;phpMyAdmin\u8fdb\u884cMySQL\u7684\u914d\u7f6e<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1421018-33e0c9131b1012df.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1421018-33e0c9131b1012df.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\"></div>\n</div><p><br>\u65b0\u5efa\u6570\u636e\u5e93\uff0c\u5728\u6b64\u4e3a\u4f8b\u53d6\u540d\u4e3aliugaojian \u70b9\u51fbliugaojian\u6211\u4eec\u53d1\u73b0\u91cc\u9762\u4ec0\u4e48\u4e5f\u6ca1\u6709 \u6211\u4eec\u5c31\u9700\u8981\u5bfc\u5165\u6211\u4eec\u4e4b\u524d\u684c\u9762\u7684openfile_mysql.sql\u6587\u4ef6<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1421018-c07a16e4e0348e1b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1421018-c07a16e4e0348e1b.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\"></div>\n</div><p><br>\u70b9\u51fb-&gt;\u6267\u884c\u6211\u4eec\u4f1a\u53d1\u73b0liugaojian\u6570\u636e\u5e93\u91cc\u9762\u670934\u5f20\u8868</p>\n<div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1421018-59cd68aeafc9bec8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1421018-59cd68aeafc9bec8.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\"></div>\n</div><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1421018-ee576f499c5b2d7f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1421018-ee576f499c5b2d7f.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\"></div>\n</div><p><br>\u7136\u540e\u6211\u4eec\u56de\u5230Openfile\u914d\u7f6e\u7684\u9875\u9762<br>\u3010host name\u3011\u6539\u4e3a127.0.0.1\uff0c\u3010database-name\u3011\u6539\u4e3aliugaojian\u4fe1\u606f\u8bbe\u7f6e\u5982\u4e0b\u56fe<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1421018-743dfc1f4627e82c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1421018-743dfc1f4627e82c.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\"></div>\n</div><p><br>\u6309\u63d0\u793a\u8bbe\u7f6e\u5e76\u586b\u5199\u4fe1\u606f<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1421018-38f892612d8f9450.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1421018-38f892612d8f9450.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\"></div>\n</div><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1421018-59ca14264bfbd2a2.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1421018-59ca14264bfbd2a2.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\"></div>\n</div><p><br>\u63d0\u793a\uff1a\u4e0a\u8ff0\u5bc6\u7801\u81ea\u5df1\u8981\u8bb0\u7740 \u90ae\u7bb1\u53ef\u4ee5\u968f\u610f\u70b9<br>\u70b9\u51fb\u7ee7\u7eed \u6b64\u65f6Openfile\u5c31\u5b89\u88c5\u5b8c\u6210<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1421018-e0391199b3931564.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1421018-e0391199b3931564.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\"></div>\n</div><p><br>\u7136\u540e\u6211\u4eec\u767b\u5f55\u5230\u7ba1\u7406\u63a7\u5236\u5e73\u53f0 \u7528\u6237\u540d\uff1aadmin \u5bc6\u7801\u5c31\u662f\u81ea\u5df1\u8bbe\u7f6e\u7684\u5bc6\u7801<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1421018-889fa732a55e4cf3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1421018-889fa732a55e4cf3.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\"></div>\n</div><p><br>\u6211\u4eec\u53ef\u4ee5\u67e5\u770b\u76f8\u5173\u4fe1\u606f<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1421018-76bc3569ccb9487d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1421018-76bc3569ccb9487d.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\"></div>\n</div><p><br>\u6b64\u65f6\u5462\u8fd8\u6ca1\u5b8c \u9769\u547d\u624d\u521a\u521a\u5f00\u59cb<br>\u9700\u8981\u6211\u4eec\u5b89\u88c5\u4e00\u4e2aSpark \u4e5f\u5c31\u662f\u5373\u65f6\u901a\u8baf\u7684\u5ba2\u6237\u7aef<br>\u8fd9\u4e2a\u65f6\u5019\u6211\u4eec\u4e5f\u8bb8\u8fd8\u9700\u8981\u7535\u8111\u7684\u4e00\u4e2aJava\u73af\u5883\u5728\u8fd9\u91cc\u4e0d\u518d\u7d2f\u8ff0\u4e86 \u6210\u529f\u4e4b\u540e\u6211\u4eec\u767b\u9646\u8bd5\u8bd5<br></p><div class=\"image-package\">\n<img src=\"https://upload-images.jianshu.io/upload_images/1421018-4834dd5813c5d368.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240\" data-original-src=\"https://upload-images.jianshu.io/upload_images/1421018-4834dd5813c5d368.png?imageMogr2/auto-orient/strip%7CimageView2/2\"><br><div class=\"image-caption\"></div>\n</div><p><br>\u6b64\u65f6\u6211\u4eec\u5728\u7535\u8111\u9875\u9762\u4e0a\u5c31\u4f1a\u770b\u89c1admin\u7531\u4e0d\u5728\u7ebf\u7684\u72b6\u6001\u53d8\u4e3a\u4e86\u5728\u7ebf\u7684\u72b6\u6001<br>\u6b64\u65f6\u6211\u4eec\u5c31\u53ef\u4ee5\u8fdb\u884c\u6dfb\u52a0\uff0c\u5220\u9664\u7b49\u4e00\u7cfb\u5217\u64cd\u4f5c<br>\u4eca\u5929\u6211\u4eec\u5c31\u5148\u628a\u8fd9\u4e9b\u6d88\u5316\u4e86\uff0c\u63a5\u4e0b\u6765\u6211\u4f1a\u5e26\u7740\u5927\u5bb6\u5728\u4ee3\u7801\u4e2d\u5b9e\u73b0\u5373\u65f6\u901a\u8baf\u7684\u529f\u80fd\uff0c \u540e\u9762\u7684\u5185\u5bb9\u6211\u4e00\u5b9a\u4f1a\u63a5\u7740\u6301\u7eed\u66f4\u65b0~~~</p>\n</div>"}
]

文章来自: https://hanks.pub