Infinite


  • Home

  • Categories

  • Archives

  • Tags

  • Sitemap

  • RSS

  • Search

Google Cpp Style Guide - Naming

Posted on 2017-03-28 | Post modified 2019-11-16 | In Technology | Visitors

通用命名规则

函数命名,变量命名,文件命名要有描述性;少用缩写。

尽可能给有描述性的命名,别心疼空间,毕竟让代码易于新读者理解很重要。不要用只有项目开发者能理解的缩写,也不要通过砍掉几个字母来缩写单词

1
2
3
int price_count_reader;  // 无缩写
int num_errors; // “num” 本来就很常见
int num_dns_connections; // 人人都知道 “DNS” 是啥

不要像下面这样写:

1
2
3
4
5
6
int n;                     // 莫名其妙。
int nerr; // 怪缩写。
int n_comp_conns; // 怪缩写。
int wgc_connections; // 只有贵团队知道是啥意思。
int pc_reader; // "pc" 有太多可能的解释了。
int cstmr_id; // 有删减若干字母。
Read more »

Markdown基本语法

Posted on 2017-03-26 | Post modified 2019-11-16 | In Technology | Visitors

概述

转载于: Markdown 语法说明 (简体中文版)

宗旨

Markdown 的目标是实现「易读易写」。

可读性,无论如何,都是最重要的。一份使用 Markdown 格式撰写的文件应该可以直接以纯文本发布,并且看起来不会像是由许多标签或是格式指令所构成。Markdown 语法受到一些既有 text-to-HTML 格式的影响,包括 [Setext] 1、[atx] 2、[Textile] 3、[reStructuredText] 4、[Grutatext] 5 和 [EtText] 6,而最大灵感来源其实是纯文本电子邮件的格式。

Read more »

10分钟入门requireJs

Posted on 2017-03-25 | Post modified 2019-11-16 | In Technology | Visitors

引入


下载 requireJs,然后在 head 中

1
<script src="js/require.js" data-main="js/main" defer async="true"></script>

async 属性表明这个文件需要异步加载,避免网页失去响应。IE不支持这个属性,只支持 defer,所以把 defer 也写上。

data-main 属性的作用是,指定网页程序的主模块。在上例中,就是js目录下面的 main.js,这个文件会第一个被 require.js 加载。由于require.js 默认的文件后缀名是js,所以可以把 main.js 简写成 main。

基本API


require 会定义三个变量:define, require, requirejs,其中 require === requirejs,一般使用 require 更简短

Read more »

A monitoring software for evaporator

Posted on 2016-09-17 | Post modified 2019-11-16 | In project | Visitors
IntroductionAccompanied by the development of automation technology, configuration technology, DCS PLC and other industrial control technology advance with each passing day, monitoring configuration software is becoming more and more widespread in the field of industrial control. To improve the productive efficiency of evaporators, and to ensure the safety of the production, this project has desig ...
Read more »

LCR meter

Posted on 2016-09-02 | Post modified 2019-11-16 | In project | Visitors
IntroductionThis project is about the ARM, CPLD, and DDS technology. Based on the LCR meter theory, the whole system consists of a signal source module, voltage & current detection module, the digital process module, etc. The signal source module provides DC to 500K Hz sine wave, range from 10mV to 2V along with 10mA to 1A circuit source, based on DDS technology using CPLD controller. Phase ...
Read more »

Freescale Smart Car Race

Posted on 2016-08-30 | Post modified 2019-11-16 | In project | Visitors
IntroductionThe Freescale Cup, formerly known as the Smart Car Race, began in 2003 when Korea’s Hanyang University hosted 80 teams of students. Since that modest origin, the annual event has expanded throughout North America, Europe, China, India, Malaysia and Latin America, impacting more than 15,000 students at more than 500 schools. The competition requires student teams to build, program and r ...
Read more »
<1…910
XS Zhao

XS Zhao

60 posts
12 categories
36 tags
GitHub Facebook Instagram E-Mail
Recent Posts
  1. Ethereum Project Infrastructure
  2. Dapp: Lottery Contract
  3. Write ethereum test code
  4. Review: bLSM:* A General Purpose Log Structured Merge Tree
  5. Review: ElasticBF: Fine-grained and Elastic Bloom Filter Towards Efficient Read for LSM-tree-based KV Stores
© 2017 - 2020 XS Zhao
Powered by Hexo
Theme - NexT.Muse
0%