自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 收藏
  • 关注

原创 C语言面试题 - string相关API源码

#include <stdio.h>#include <stdlib.h>#include <string.h>/************************************************************************** 01 - strlen 计算字符串长度* size_t strlen_Func(const char *str);* 02 - strRev 字符除按逆序* char ...

2021-06-09 02:01:51 102

原创 通过WMI方式访问winsvr2012

通过wmi方式访问winsvr2012时,分为管理员用户和普通用户。首先,确认wmi服务已开启。1. 如果是administrator用户: win+x ---->> regedit -->HKCR-->>CLSID-->>{76A64158-CB41-11D1-8B02-00600806D9B6}, 右击权限-->>高级-->>所有者页签-->>“所有者更改为”方框中,选择当前登陆账号-->>...

2020-07-05 23:01:00 270

原创 C语言_顺序栈_sequenceStack

01 - sequenceStack.h#include <stdlib.h>#include <string.h>#define MAX 1024struct seqStack{ void *m_pAddress[MAX]; int m_Size;};#ifdef __cplusplusextern "C" {#endif void *init_SeqStack(); void push_SeqStack(void *.

2020-06-28 03:31:54 273

原创 linux_C通过代码访问mysql

#include <stdio.h>#include <mysql.h>int main(int argc,char *argv[]){ MYSQL conn; int res; mysql_init(&conn); //"root":数据库管理员 "":root密码 "db_jesse":数据库的名字 if(mysql_real_connect(&conn, "localhost", "root", "", "db.

2020-06-27 22:20:01 114

原创 linuxC++_OCCI访问oracle

下列代码测试了通过linux occi方式连接数据库。#include <iostream>#include <occi.h>using namespace std;#define LINUXOCCI //避免函数重定义错误using namespace oracle::occi;int main(){ Environment *env=Environment::createEnvironment(Environment::DEFAULT); c

2020-06-27 22:13:41 146

原创 linuxC_OCI方式ORACLE编程

本代码记录了通过oci方式访问oracle的代码:#include <stdio.h>#include <stdlib.h>#include <string.h>#include <oci.h>// cols for query result:#define N 8static OCIEnv *p_env;static OCIError *p_err;static OCISvcCtx *p_svc;static OCISt

2020-06-27 22:07:19 324

原创 C语言_9种排序算法

01 - 冒泡排序void bubbleSort(int *arr, int len){ if(NULL == arr || len < 2) { return; } int i,j; for(i = 0; i < len; i++) { for(j = len - 1 - i; j >= 0; j--) { if(arr[j-1] > arr[j])

2020-06-27 20:43:50 192

原创 C++查找子串_分隔符_完全匹配

有时候,一个集合以字符串的形式存在,以分隔符进行分隔。如: strGroupIP = "192.168.20.140,192.168.20.141,192.168.20.142,192.168.20.143";在上述IP集合中查找 strIP = "192.168.20.14";如果使用string.find()进行查找,可以找到, 但不是我们需要的ip, 属于不完全匹配。为了解决上述问题, 我编写了一个函数。如下:/* strElement: 元素, strCollection:

2020-06-26 16:40:35 546

原创 C语言_单向链表_节点数据类型不限定

一. 该代码主要记录了单向链表如下几个功能的实现:1. 初始化2. 插入节点3. 修改所有含有某个值的节点4. 按照位置删除某个节点5. 删除所有含有某个值的节点6. 链表翻转和逆序7. 链表的遍历8. 链表的长度9.链表销毁。二.代码如下:#include <stdlib.h>#include <string.h>struct linknode{ void **m_pAddress; struct linknod

2020-06-26 05:15:45 227

原创 C语言动态数组的实现

1. linklist.h#include<stdlib.h>#include<stdio.h>#include<string.h>typedef struct DynamicArray{ void **m_pAddress; int m_Capacity; int m_Size;}DyARR;#ifdef __cplusplusextern "C"{#endif void *Init_DynamicArray...

2020-06-26 04:41:10 227

原创 rhel8-snmp安装配置

在rhel8环境中,安装snmp后,发现会出现如下错误:$ snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.4.3.0End of MIB错误原因是: 配置文件没有修改。解决方案如下:一. 检查以下rpm包是否安装完毕,没安装则强制安装perl-Data-Dumper-2.167-399.el8.x86_64.rpmnet-...

2020-04-09 20:52:35 717

原创 rhel8_oracle12c_occi_ORA-24960错误

在rhel8中,使用C++代码关联oracle12c时,使用自带库,可以编译成功。但是运行时,会提示:ORA-24960: the attribute OCI_ATTR_USERNAME is greater than the maximum allowable length of 255。错误原因: gcc-c++版本太高,需要更换低版本的。先删除自带的包,dnf remove gcc然...

2019-11-02 17:16:18 893

空空如也

空空如也

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

TA关注的人

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