linux
ThatJin
这个作者很懒,什么都没留下…
展开
-
libcurl C++代码测试用例
libcurl C++代码测试用例原创 2024-03-16 18:29:45 · 131 阅读 · 0 评论 -
centos 7 yum aliyun source and linux QQ 3.0 for Centos 7
centos 7 yum aliyun source and linux QQ 3.0 for Centos 7原创 2023-03-11 21:09:53 · 161 阅读 · 0 评论 -
std::map结构压测
std::map结构压测原创 2023-03-07 12:42:38 · 79 阅读 · 0 评论 -
C++ 重写异常(throw)以及一些基础异常测试
C++ 重写异常(throw)以及一些基础异常测试原创 2023-02-08 14:17:39 · 191 阅读 · 0 评论 -
typedef/define 重定义解决办法
typedef/define 重定义解决办法原创 2023-02-01 09:43:52 · 591 阅读 · 0 评论 -
Qt QaudioOutput 在 Ubuntu/UOS 下的 Bug
Qt QaudioOutput 在 Ubuntu 下的 Bug原创 2022-11-21 19:51:32 · 347 阅读 · 0 评论 -
/usr/bin/ld: warning: libatomic.so.1, needed by libmysqlclient.so, not found (try using -rpath or -r
/usr/bin/ld: warning: libatomic.so.1, needed by libmysqlclient.so, not found (try using ...原创 2022-11-17 11:56:56 · 1444 阅读 · 0 评论 -
centos上mysql 8.x - 主从复制
centos上mysql 8.x - 主从复制原创 2021-08-11 19:16:07 · 103 阅读 · 0 评论 -
docker 启动 centos/golang 容器 及参数说明
docker 启动centos容器 及参数说明。原创 2022-08-02 20:43:04 · 845 阅读 · 0 评论 -
解决 yum 使用出现问题 [Couldn‘t open file /data/yum/repodata/repomd.xml]
yum报错Couldn’t open file /data/yum/repodata/repomd.xml[root@localhost home]# yum makecache已加载插件:fastestmirror, product-id, search-disabled-reposfile:///data/yum/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /data/yum/repodata/repomd.xml"原创 2022-03-23 13:46:15 · 3062 阅读 · 0 评论 -
libsoci_odbc-达梦数据库demo
libsoci_odbc-达梦数据库demo原创 2022-03-04 09:49:44 · 273 阅读 · 0 评论 -
简单的cp程序
copy.c#include <stdio.h>int main(int argc, char *argv[]){ if (argc < 3) { printf("usage: %s [in] [out]\r\n", argv[0]); return 0; } size_t size = 0; FILE *in = NULL, *out = NULL;原创 2022-03-03 22:39:28 · 178 阅读 · 0 评论 -
linux下systemctl启动没反应问题,动态库找不到
linux下systemctl启动没反应问题,动态库找不到原创 2022-02-17 14:04:56 · 4219 阅读 · 0 评论 -
linux下脚本获取ip
linux下脚本获取ip原创 2022-02-16 14:59:49 · 1749 阅读 · 0 评论 -
std::thread的线程ID以及并发数(cpus)获取
#include<iostream>#include<thread>#include <fstream>void simpleT(){ std::ofstream file; file.open("./hello.txt",std::ofstream::out | std::ofstream::app); if(file.is_open()) { file << "hello\r\n" ; }原创 2022-02-12 11:03:06 · 1465 阅读 · 0 评论 -
C++ 之 #include <bitset>
C++ 原生库之 bitmap原创 2022-01-10 18:17:01 · 846 阅读 · 0 评论 -
shell counter
#!/bin/shfile=.numberepochFile=.epochlogFile=work.lognum=0if [ -f $file ];then num=`cat $file` num=`expr $num + 1` echo "number : $num" echo -n $num > $fileelse echo -n "0" > $filefiepoch3MinAgo=`da原创 2022-01-04 14:51:58 · 210 阅读 · 0 评论 -
Dockerfile与docker-compose
Dockerfile与docker-compose原创 2022-01-04 13:42:49 · 445 阅读 · 0 评论 -
【c/c++】使用freetds操作SQL Server
官网:http://www.freetds.org/文档:https://www.freetds.org/userguide/samplecode.html#e.g.samplecode.dblib.sendwget http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgztar zxvf freetds-stable.tgzcd freetds-0.91/ ./configure --prefix=/usr/loc原创 2021-12-27 18:31:43 · 1011 阅读 · 0 评论 -
poco库安装
https://pocoproject.org/releases/poco-1.7.8/poco-1.7.8p3-all.tar.gz#!/bin/sh# 依赖库# yum install openssl-devel mysql++-devel# ./configure# vim config.make 删除 OMIT行# make -s && make -s install下载稳定版本,不要clone master依赖说明https://pocoproject.org/原创 2021-12-27 11:01:53 · 745 阅读 · 0 评论 -
升级cmake到3.6.2
CMake 到 3.6.2 https://cmake.org/download/CentOS 7[root@thrift1 ~]# cat /etc/*releaseCentOS Linux release 7.2.1511 (Core)[root@thrift1 ~]# yum info cmakeInstalled PackagesName : cmakeArch : x86_64Version : 2.8.11[root@thrift1 ~原创 2021-12-24 17:00:07 · 853 阅读 · 0 评论 -
[mysql_stmt_error]: Duplicate entry ‘1228156‘
是主键冲突问题,默认主键是autoincrement的,但还是出现这个问题;MySQL: [MySQL]: [Comment]: mysql_stmt_execute error [mysql_stmt_error]: Duplicate entry '12281565' for key 'data.PRIMARY' [mysql_stmt_errno]: 1062 [mysql_stmt_sqlstate]: 23000 [statemnt]: insert into原创 2021-12-18 15:02:38 · 581 阅读 · 0 评论 -
只要存的下,变量就是指针
普通变量可指针化原创 2021-12-18 12:17:37 · 309 阅读 · 0 评论 -
gcc4.9.2编译安装
CentOS 7上的安装:sudo yum install libmpc-devel mpfr-devel gmp-develcd ~/Downloadscurl ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.2/gcc-4.9.2.tar.bz2 -Otar jxvf gcc-4.9.2.tar.bz2cd gcc-4.9.2 https://ftp.gnu.org/gnu/gcc/gcc原创 2021-12-14 17:08:27 · 1364 阅读 · 0 评论 -
加速linux - rust安装
export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-staticexport RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustupwget https://cdn.jsdelivr.net/gh/rust-lang-nursery/rustup.rs/rustup-init.shsh rustup-init.sh原创 2021-11-22 20:27:08 · 573 阅读 · 0 评论 -
systemd 管理程序 - 重启、自启
[root@localhost lighttpd]# cat lighttpd.service[unit]Description=lighttpd-serverAfter=network.target[Service]Type=forkingExecStart=/home/lighttpd/lighttpd -f /home/lighttpd/lighttpd.confExecStop=pkill lighttpdPrivateTmp=trueRestart=alwaysRestart原创 2021-11-16 18:55:21 · 1401 阅读 · 0 评论 -
curl库C++/命令行的post、get
curl库C++/命令行的post、get原创 2021-11-03 20:09:15 · 275 阅读 · 0 评论 -
简单C++ 时间戳类
m_time.cpp:#include <iostream>#include <ctime>#include <atomic>extern"C"{#include <unistd.h>}class timeKit{public: timeKit(){ buffer = new char[20]; //TM = new struct tm; }原创 2021-11-03 11:12:44 · 696 阅读 · 0 评论 -
如何用systemd管理程序【redis 6为例】
文件目录:└── redis ├── install.sh ├── readme.txt ├── redis-cli ├── redis.conf ├── redis-server └── redis.service下面这三个是编译 redis 6.2.6 所得,在源码src目录下Redis server v=6.2.6 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=cd0d1089512c054原创 2021-10-18 21:15:01 · 453 阅读 · 0 评论 -
cbp2make转codeblock项目为Makefile
可以将codeblock项目生成MakeFile编译好cbp2make放入/usr/bin,/etc/ld.so.conf中增加可执行文件的路径即可cbp2make -in *.cbp -out Makefile原创 2021-09-25 10:19:50 · 180 阅读 · 0 评论 -
websocketpp 编译调试 centos 7
git位置:https://github.com/zaphoyd/websocketpp这个项目下面没有写编译和example调试步骤 0.0先安装boost,编译安装或者yum安装都可git clone https://github.com/zaphoyd/websocketpp.gitcd websocketppcmake CMakeList.txtsudo makesudo make install测试server侧:cd websocketpp/examples/echo_s原创 2021-09-24 19:29:24 · 306 阅读 · 0 评论 -
libevent编译问题
官网下载:https://libevent.org/直接地址:https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz解压后编译,遇到如下问题,重装openssl也不行:[root@localhost libevent-2.1.12-stable]# ./configure 此处省略...configure: error: openssl is原创 2021-09-18 00:11:35 · 774 阅读 · 0 评论 -
CentOS安装vsCode问题
按照官网的安装了,搞了好久一直启动不了后来装了下面这个,也没反应yum install alacarte重启普通用户登录就好了,不知道是哪个缘故原创 2021-09-10 19:33:05 · 79 阅读 · 0 评论 -
golang安装代理
https://goproxy.io/zh/ 是一个go安装代理go env -w GO111MODULE=ongo env -w GOPROXY=https://goproxy.io,direct出现 cannt find main module 问题可以关闭GO111MODULEgo env -w GO111MODULE=off原创 2021-09-09 15:05:07 · 233 阅读 · 0 评论 -
fdisk 挂载5.5T硬盘限制2T解决办法
使用gdisk可解决安装 gdisk:yum -y install gdisk1.分区---------------------------------------------------------------------------------------[root@localhost mnt]# gdisk /dev/sdbGPT fdisk (gdisk) version 0.8.10Partition table scan: MBR: protective BSD: not原创 2021-08-26 21:10:00 · 768 阅读 · 0 评论 -
安装openssl、openssl-devel
openssl-1.1.1l.tar.gz下载:https://www.openssl.org/source/解压tar -xvf openssl-1.1.1l.tar.gz进去./config shared zlibmake dependmake && make install原创 2021-08-26 15:04:23 · 3428 阅读 · 0 评论