会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
无言
好好吃饭
博客园
首页
新随笔
联系
订阅
管理
2021年8月15日
qt捕鱼达人
摘要: 运用qt的图形视图框架,主要涉及到3个类: QGraphicsScene场景 QGraphicsView视图 QGraphicsItem图元 源码链接: https://gitee.com/waterkiller/qt-hunting-fish
阅读全文
posted @ 2021-08-15 21:27 youlj
阅读(199)
评论(0)
推荐(0)
2021年7月16日
linux通过源码安装gdb
摘要: wget http://ftp.gnu.org/gnu/gdb/gdb-8.1.1.tar.gz tar -zxvf gdb-8.1.1.tar.gz cd gdb-8.1.1 ./configure make make install
阅读全文
posted @ 2021-07-16 21:42 youlj
阅读(938)
评论(0)
推荐(0)
2021年7月15日
打造简易http服务器
摘要: (linux下面的C代码) 点击查看代码 #include<stdio.h> #include<stdlib.h> #include<unistd.h> #include<netinet/in.h> #include<sys/socket.h> #include<sys/types.h> #incl
阅读全文
posted @ 2021-07-15 18:46 youlj
阅读(80)
评论(0)
推荐(0)
2021年7月10日
linux缓存同步
摘要: 缓存同步 : 为了保证磁盘系统与缓冲区中内容一致,Linux 系统提供了 sync、fsync 和fdatasync 三个函数. 函数描述:向打开的文件写数据; 成功返回0,若出错,返回-1。 头文件:#include <unistd.h> int fsync(int fd); int fdatas
阅读全文
posted @ 2021-07-10 16:53 youlj
阅读(348)
评论(0)
推荐(0)
2021年6月28日
linux直接IO代码演示
摘要: 点击查看代码 #define _GNU_SOURCE//第一步,定义这个宏 #include<stdlib.h> #include<stdio.h> #include<unistd.h> #include<sys/types.h> #include<sys/stat.h> #include<fcnt
阅读全文
posted @ 2021-06-28 20:52 youlj
阅读(151)
评论(0)
推荐(0)
2021年6月27日
qt通过http请求下载文件(支持断点续传)
摘要: 点击查看代码 void Download::on_downloadBtn_clicked() { if(file.exists()) { if(isDownload==false) { ui->downloadBtn->setText("暂停"); isDownload=true; if(isDis
阅读全文
posted @ 2021-06-27 14:24 youlj
阅读(1287)
评论(0)
推荐(0)
2021年6月23日
Q_DECLARE_FLAGS用法
摘要: 点击查看代码 class Widget : public QWidget { Q_OBJECT public: enum languageType { inValidValue=0x0,//无效值(调用testFlag()时这个值是无效的,除0之外) cPlusPlus, cSharp, goLan
阅读全文
posted @ 2021-06-23 22:36 youlj
阅读(2566)
评论(1)
推荐(0)
2021年6月10日
qt设置标签渐渐褪去的效果
摘要: 点击查看代码 m_nameLabel=new QLabel("我是传奇",this); //m_nameLabel->show(); m_nameLabel->resize(70,50); m_nameLabel->setAlignment(Qt::AlignCenter); m_nameLabel
阅读全文
posted @ 2021-06-10 19:36 youlj
阅读(157)
评论(0)
推荐(0)
2021年6月6日
opencv4学习笔记
摘要: demo1 点击查看代码 //2021.6.2 //(第二个参数设置成IMREAD_GRAYSCALE就是灰度图像,其他效果可设置第二个标志参数) Mat img = imread("C:\\Users\\AIT\\Pictures\\Saved Pictures\\3.png"); namedWi
阅读全文
posted @ 2021-06-06 10:08 youlj
阅读(121)
评论(0)
推荐(0)
2021年5月31日
有符号字符转无符号字符
摘要: 转换成二进制,取其补码即可 #include <iostream> using namespace std; int main() { signed char sc=-160; unsigned char uc=sc; cout<<(int)uc<<endl;//96 //10100000 160
阅读全文
posted @ 2021-05-31 23:20 youlj
阅读(247)
评论(0)
推荐(0)
生成dll并供外部调用
摘要: 创建一个空项目即可,更改项目属性: 头文件 #pragma once #define DLL_EXPORT #if defined (DLL_EXPORT) #define GIRLAPI _declspec(dllexport) #else #define GIRLAPI _declspec(dl
阅读全文
posted @ 2021-05-31 14:21 youlj
阅读(60)
评论(0)
推荐(0)
2021年5月30日
Q_ENUMS用法
摘要: ` //Q_ENUMS用法(包含头文件<QMetaEnum>) enum LOVERTYPE { HOT, COLD, SILENCE, TOTAL }; Q_ENUMS(LOVERTYPE)//第一步 static QString getStringByID(int id) { if(id<0||
阅读全文
posted @ 2021-05-30 17:07 youlj
阅读(1764)
评论(0)
推荐(0)
2021年5月18日
qrc生成rcc二进制文件
摘要: 在项目所在目录下按住shift+右键,打开powershell窗口 (需要在环境变量中配置好相应编译器下bin所在路径) 生成了rcc之后就不需要使用qrc文件了,rcc体积小且不易被篡改 需要先注册rcc然后就可以使用里面的资源了 //注册二进制资源文件 QResource::registerRe
阅读全文
posted @ 2021-05-18 20:17 youlj
阅读(686)
评论(0)
推荐(0)
2021年5月8日
linux查看进程及进程文件句柄
摘要: ps -ef | grep 进程名称 cd proc/进程ID/fd //列出进程文件句柄相关信息, //0表示键盘输入句柄,1表示标准输出,2表示错误输出 ls -la 示例如下:
阅读全文
posted @ 2021-05-08 22:06 youlj
阅读(645)
评论(0)
推荐(0)
2021年5月2日
C++随机数
摘要: 1 //随机数(头文件random) 2 // auto random = bind(uniform_int_distribution<>{1, 6}, default_random_engine());//需要头文件functional 3 // cout << random() << endl;
阅读全文
posted @ 2021-05-02 16:21 youlj
阅读(128)
评论(0)
推荐(0)
下一页
公告