邬天博博客

我在他乡 望着月亮


  • Home

  • Tags

  • Archives

关键字union与位模式

Posted on 2018-03-16

关键字union

申请一块内存,指定几种类型都可以使用。但是要注意取值时的位模式解释。

讲解定义和使用的文章,英文的,但很清晰。

应用场景:按位拼接

比如拼接两个32位int成为一个64位

Read more »

用hexo在github上搭建博客

Posted on 2018-03-14

我对git很熟悉,hexo很陌生。如果你和我一样,这篇会很有帮助。我会对操作进行简单说明,你可以先通读全文,再实际操作。最后部分讲博客的版本管理,实现不同电脑上的更新和维护。

环境与工具

  1. 安装node.js
    下载地址。检验安装成功:

    1
    $ node -v
  2. 安装hexo

    1
    $ npm install hexo-cli -g

    NPM是随同NodeJS一起安装的包管理工具,npm 的包安装分为本地安装、全局安装(带-g)两种,这句命令就是全局安装hexo-cli软件。检验安装成功:

    1
    $ hexo -v
  3. 安装git和注册github
    略。

用hexo搭建一个本地的博客

  1. cd命令进入一个目录,执行下面的命令,初始化,会发现多了很多hexo的文件,my_blog_folder_name是文件夹名,随你心意。

    1
    $ hexo init my_blog_folder_name
  2. cd命令进入my_blog_folder_name目录

    1
    $ cd my_blog_folder_name
  3. 现在你还没有写任何文章,下面这条命令是把source/_posts文件夹的hello-world.md文件生成静态网页。

    1
    $ hexo g
  4. 启动本地服务器,用-p指定端口。如果电脑安装了福昕pdf阅读器会占用hexo默认的4000端口,那么指定一个其他的端口。

    1
    $ hexo s -p 7788
  5. 浏览器访问 localhost:7788 这时看到的hello world文章。

至此,本地的工作就完成了。你只需要把markdown文档放到_posts路径下,依次执行hexo g、hexo s 就可以本地访问博客。

Read more »

Hello World

Posted on 2018-03-13

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.

Read more »
邬天博

邬天博

严肃程序员博客

3 posts
3 tags
© 2018 邬天博
Powered by Hexo
|
Theme — NexT.Pisces