自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(22)
  • 资源 (7)
  • 收藏
  • 关注

转载 mockcpp高级指导

Default SpecificationDefault specification is defined by using defaults(), rather than expects()/stubs(). Relations between defaults() and expects()/stubs() could be thought as relations between default and case in C/C++ switch statements. If all specific

2021-08-24 23:35:19 687

翻译 mockcpp使用手册

1. 背景mock++是一个C/C++语言的mock框架。它最初出现的原因并不是为了重新发明轮子,也不是为了做Yet Another C++ mock framework。在mock++出现之前,在互联网上可以找到的C++ Mock框架只有mockpp; 在我们最初的敏捷开发实践中,它也就是我们唯一的选择。虽然mockpp 是一个优秀的框架,但它的实现使用了非常复杂的模版技术,这带来了漫长的编译时间,和非常晦涩难懂的编译错误信息。这对于TDD的步伐有着非常负面的影响。另外,mockpp所提供的功能在某些

2021-08-24 23:33:19 2292

翻译 mockcpp使用方法简明指导

mockcpp使用方法简明指导mock工具介绍mock工具的作用是指定函数的行为(模拟函数的行为)。可以对入参进行校验,对出参进行设定,还可以指定函数的返回值。几个相关概念(1)mock规范:每个MOCKER(function)开始,跟一系列的.stubs、.with、.will等的内容的整体,称为一个mock规范。(2)核心关键字:指stubs/defaults/expects/before/with/after/will/then/id等这些直接跟在点后面的关键字。(3)扩展关键字:指onc

2021-08-24 23:31:32 2150

翻译 Glib官方文档阅读 The Main Event Loop

头文件#include <glib.h>描述主事件循环管理GLib和GTK+应用程序的所有可用事件源。这些事件可以来自任何数量的不同类型来源,如文件描述符(普通文件、管道或套接字)和超时。也可以使用g_source_attach()添加新类型的事件源。为了允许在不同线程中处理多个独立的源集,每个源都与一个GMainContext相关联。一个GMainContext只能在单个线程中运行,但可以从其他线程将事件源加入或移除。所有在GMainContext或内置GSource上运行的函数都是

2021-06-20 22:34:19 281

转载 git自定义指令

alias gpm='git push origin master'alias ...=../..alias ....=../../..alias .....=../../../..alias ......=../../../../..alias 1='cd -'alias 2='cd -2'alias 3='cd -3'alias 4='cd -4'alias 5='cd -5'alias 6='cd -6'alias 7='cd -7'alias 8='cd -8'alias

2021-06-15 10:55:32 365

原创 词频统计程序C语言实现

词频统计程序C语言实现#include <stdio.h>#include <stdbool.h>#include <string.h>#include <ctype.h>#include <stdlib.h>#define MAX_WORD_LEN (30)FILE * fdest;typedef struct { char word[MAX_WORD_LEN]; int count;} Item;typedef

2021-06-14 00:31:41 833

转载 如何定义自己的可变参函数-C语言实现

像标准C函数printf一样。一般这样声明:void func(char* form, ...);前面至少有一个确定的参数。函数体内如何获取这些参数呢?这就需要用到几个宏以及了解他们的原理。函数参数是以数据结构——栈的形式存取,从右至左入栈。因此,从理论上说,我们只要探测到任意一个变量的地址,并且知道其他变量的类型,通过指针移位运算,则总可以找到其他的变量。<stdarg.h> 中定义了几个重要的宏:typedef char* va_list;void va_start ( va

2021-06-09 15:44:03 225

原创 长度系统req8

#ifndef LENGTH_H_#define LENGTH_H_#include <stdio.h>#include <stdlib.h>#define True 1#define False 0typedef enum { Mile = 0, Yard, Feet, Inch, MaxType}unit_e;typedef enum { hp = 0, lp}mode_e;extern un

2021-06-08 15:52:25 159

原创 C语言实现密码强度校验

#include <stdio.h>#include <stdlib.h>#include <string.h>int passwd_meter(const char *passwd) { //cycle val int i = 0; //1. passwd len unsigned int passwd_len; passwd_len = strlen(passwd); //2. capital and low

2021-06-07 22:51:06 685

转载 常量指针、指针常量以及指向常量的指针常量

三个名词虽然非常绕嘴,不过说的非常准确。用中国话的语义分析就可以很方便地把三个概念区分开。一)常量指针。常量是形容词,指针是名词,以指针为中心的一个偏正结构短语。这样看,常量指针本质是指针,常量修饰它,表示这个指针乃是一个指向常量的指针(变量)。指针指向的对象是常量,那么这个对象不能被更改。在C/C++中,常量指针是这样声明的:1)const int *p;2)int const *p;常量指针的使用要注意,指针指向的对象不能通过这个指针来修改,可是仍然可以通过原来的声明修改,也就是说常量指针

2021-06-07 08:38:34 554

转载 typedef函数指针

用途:函数指针通常用来实现回调,也可以用来对模块调用以函数表的形式进行优化。使用方法:1、定义函数指针类型使用typedef更直观更方便// 定义一个原型为int Fun( int a );的函数指针typedef int (*PTRFUN) ( int aPara );typedef的功能是定义新的类型。这里定义了一种PTRFUN的类型,并定义这种类型为指向某种函数的指针,这种函数以一个int为参数并返回char类型。后面就可以像使用int,char一样使用PTRFUN了。2、函数指针

2021-06-07 08:20:43 1161

原创 度量系统最终实现

#ifndef LIST_H_#define LIST_H_#include <stdio.h>#include <stdlib.h>#include <string.h>#define FAILURE (-1)#define SUCCESS (0)#define RETURN_V

2021-06-05 17:43:53 166

原创 长度系统req7

#ifndef LENGTH_H_#define LENGTH_H_#define True 0#define False 1struct list_head { struct list_head *next, *prev;};struct unit_t { char unit_name[16]; struct list_head list;};typedef struct { unsigned int value; int

2021-05-28 21:48:36 80

原创 长度系统req6

#ifndef LENGTH_H_#define LENGTH_H_#define True 0#define False 1typedef enum { TBSP = 0, TSP, OZ}unit_e;typedef struct{ unsigned int value; unit_e unit; unsigned int absolute; }Volume_t;#endif

2021-05-28 21:47:43 98

原创 长度系统req5

#ifndef LENGTH_H_#define LENGTH_H_#include <stdio.h>#include <stdlib.h>#define True 0#define False 1typedef enum { Mile = 0, Yard, Feet, Inch, MaxType}unit_e;extern unsigned int dimension[MaxType];typedef stru

2021-05-28 21:46:55 68

原创 长度系统req4

#ifndef LENGTH_H_#define LENGTH_H_#include <stdio.h>#include <stdlib.h>#define True 0#define False 1typedef enum { Mile = 0, Yard, Feet, Inch, MaxType}unit_e;extern unsigned int dimension[MaxType];typedef stru

2021-05-28 21:45:02 94

原创 长度系统req3

#ifndef LENGTH_H_#define LENGTH_H_#include <stdio.h>#include <stdlib.h>#define True 0#define False 1typedef enum { Mile = 0, Yard, Feet, Inch, MaxType}unit_e;extern unsigned int dimension[MaxType];typedef stru

2021-05-28 21:44:02 126

原创 如何判断IP地址与子网掩码的合法性

如何判断IP地址与子网掩码的合法性#include <arpa/inet.h>#include <stdio.h>#include <string.h>int if_a_string_is_a_valid_ipv4_address(const char *str){ struct in_addr addr; int ret; volatile int local_errno; int errno = 0; ret =

2021-05-27 23:18:43 520

原创 req 2

#ifndef LENGTH_H_#define LENGTH_H_#include <stdio.h>#include <stdlib.h>#define True 0#define False 1typedef enum { Mail = 0, Yard, MaxType}unit_e;extern unsigned int dimension[MaxType];typedef struct { unsigned in

2021-05-25 23:03:44 97

原创 req 1

//// req 1 Length.h//#ifndef LENGTH_H_#define LENGTH_H_#include <stdio.h>#include <stdlib.h>typedef int Mail;#define True 0#define False 1int LengthEqual(Mail len1, Mail len2);#endif////req 1 Length.c//#include "Length.h"

2021-05-25 23:02:06 198

原创 C语言实现长度库-面向对象设计模式

C语言实现长度库//// Length.h// Created by kori on 2021/5/24.//#ifndef LENGTH_LENGTH_H#define LENGTH_LENGTH_H/*## class Length */typedef enum { Mail = 0, Yard, Feet, Inch, UnitMax}length_unit_e;typedef enum { Greater = 0, E

2021-05-24 23:14:10 78

原创 eeprom页写策略

#include <stdio.h>#define MAX_PAGES 256#define PER_PAGE 32int page_write(int addr, int nbytes, char *buf){printf(“addr = %d, nbytes = %d-------”, addr, nbytes);}int random_write(int addr, char *buf, int size){int current_addr = addr;char *

2021-04-13 23:45:21 431

PowerShell-7.3.7-win-x64

PowerShell-7.3.7-win-x64

2023-10-01

googletest-master.zip

googletest源码

2021-08-10

Manage C data using the GLib collections – IBM Developer.pdf

Manage C data using the GLib collections

2021-08-01

C语言接口与实现 创建可重用软件的技术.pdf

C语言接口与实现 创建可重用软件的技术

2021-07-12

I2C串行EEPROM应用系统的健壮性设计.pdf

I2C串行EEPROM应用系统的健壮性设计.pdf

2021-06-14

matlab程序设计与实例应用

matlab程序设计与实例应用

2016-02-15

基于智能芯片的电池管理系统的实现

基于智能基于智能芯片的电池管理系统的实现

2015-01-31

矩阵轮课后习题答案

矩阵轮课后习题答案

2014-10-04

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除