Notification 传输流程
说到Notification的传输流程,其实是包含了三个部分的,这三个部分也是我们需要了解的Notification的核心内容。
Provider-to-APNs Connection Trust
APNs-to-Device Connection Trust
Token Generation and Dispersal
服务端到APNs的链接建立信任,下面先来看一张图
在简单的字符串匹配算法中我们一般会使用这样的匹配demo去做处理,返回子串T在主串S,pos之后的位置,这里子串在主串中重复的情况。
int Index(SSTring S,SSTring T, int pos) {
if (!S || !T) return
if (!(pos >=0 && pos < S.length)) return
int i = pos; j = 0;
while(i < S.lenth && j < T.length) {
if (S[i] == T[j]) j++;
else j = 0;
i++;
}
if (j > T.length) return i - T.length;
else return 0;
}
You’ll find this post in your _posts
directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run jekyll serve --watch
, which launches a web server and auto-regenerates your site when a file is updated.
To add new posts, simply add a file in the _posts
directory that follows the convention YYYY-MM-DD-name-of-post.ext
and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.