Sterling’s Blog


  • Home

  • Categories

  • Archives

  • Tags

  • Resume

  • Search

好玩的样式

Posted on 2017-08-02 | In Test | | 热度 ℃

好玩的样式

先在themes/next/source/css/_custom/custom.styl中添加以下样式:

Read more »

图片测试-七牛云存储外链

Posted on 2017-08-02 | In Test | | 热度 ℃

test

代码测试

Posted on 2017-08-02 | In Test | | 热度 ℃

代码测试

1
2
3
4
5
6
7
8
9
10
11
12
#include<stdio.h>
void main() /* 辗转相除法求最大公约数 */
{
int m, n, a, b, t, c;
printf("Input two integer numbers:\n");
scanf("%d%d", &a, &b);
m=a; n=b;
while(b!=0) /* 余数不为0,继续相除,直到余数为0 */
{ c=a%b; a=b; b=c;}
printf("The largest common divisor:%d\n", a);
printf("The least common multiple:%d\n", m*n/a);
}

视频测试

Posted on 2017-08-02 | In Test | | 热度 ℃

Python必会的单元测试框架—unittest

Posted on 2017-08-02 | In Testing | | 热度 ℃

unittest原名为PyUnit,是由java的JUnit衍生而来。对于单元测试,需要设置预先条件,对比预期结果和实际结果。

整体结构:

unittest库提供了test cases, test suites, test fixtures,test runner:

  1. test case :通过继承TestCase类,我们可以创建一个test,或者一组tests,包括测试前准备环境的搭建(setUp),执行测试代码(run),以及测试后环境的还原(tearDown)。
  2. test suites : 测试套件,多个测试用例集合在一起,TestSuite也可以嵌套TestSuite。
    test fixtures : setup + test case + teardown结构
  3. TestLoader:用来加载TestCase到TestSuite中,其中的方法从各个地方寻找TestCase,创建它们的实例,然后add到TestSuite中,返回一个TestSuite实例。
    test runner:执行测试用例,其中的run()会执行TestSuite/TestCase。
  4. TextTestResult:测试的结果会保存到TextTestResult实例中,包括运行用例数,成功数,失败数等。
Read more »

Hello World

Posted on 2017-08-02 | | 热度 ℃

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

参考链接

  1. Hexo 官方文档
  2. NexT 主题官方文档
  3. 打造个性超赞博客 Hexo+NexT+Github Pages 的超深度优化
  4. hexo 的 nexT 主题个性化教程:打造炫酷网站33个效果
  5. hexo 摸爬滚打之进阶教程
  6. 基于Hexo搭建个人博客——进阶篇
  7. Gitment:使用GitHub issue搭建评论系统*关掉代理访问
12
Sterling

Sterling

16 posts
11 categories
19 tags
Github Instagram 简书 Facebook StackOverflow 知乎
© 2017 - 2018 Sterling
Powered by Hexo
Theme - NexT.Mist
本站访客数 次 本站总访问量 次