- 博客(25)
- 资源 (1)
- 问答 (1)
- 收藏
- 关注
原创 c++的Lambda表达式
参考文档:https://blog.csdn.net/qq_23350817/article/details/116456412。
2023-08-11 16:16:04 97
原创 不能定义dllimport函数
我声明了一下宏定义# define EXTERN_C extern "C" # define DK_DLL_SYMBOL_EXPORT __declspec(dllexport) //*注意* # ifdef HD_EXPORTS # define HD_API EXTERN_C DLIB_EXPORT # else # define HD_API EXTERN_C DLIB_IMPORT # endifextern。
2023-04-04 18:36:57 1146
原创 VMware中的ubuntu虚拟机开机黑屏,无法打开桌面
取消3D图形勾选后就可以正常启动了(如果虚拟机正在运行,无法操作,需要先关闭虚拟机,再操作)安装VMware tools后,重新启动虚拟机一直卡在黑屏界面。回想之前的操作,打开->编辑虚拟机。
2023-03-22 14:37:30 2597
原创 nodejs-sort排序
sort() 方法用于对数组的元素进行排序,并返回数组。默认排序顺序是根据字符串Unicode码点。语法:array.sort(fun(a,b));fun是个函数用来规定排序顺序。参数可有可无,无参数则按默认排序无参数:不传参数,将不会按照数值大小排序,按照字符编码的顺序进行排序;例1:var arr = ['General','Tom','Bob','John','Army'];var resArr = arr.sort();console.log(resArr);//输出 ["A
2022-04-28 16:14:08 4033
原创 nodejs 定时任务
scheduleJob定时任务和setInterval定时器scheduleJob定时任务node-schedule 是 Node.js 的一个 定时任务(crontab)模块。安装npm install node-schedule 引用该模块const schedule = require('node-schedule'); 用法// 定义规则 let rule = new schedule.RecurrenceRule(); rule.date = [1];//每月1号 rul
2022-04-28 15:15:29 7130
原创 nodejs计算数组中值重复次数
算法函数实现function getRepeatNum(arr){ //计算重复值 var obj = {}; for(var i= 0, l = arr.length; i< l; i++){ var item = arr[i]; obj[item] = (obj[item] +1 ) || 1; } return obj; }调用function main() { arr = ["ds","dim","dim","dim","dim","dim","dim",
2022-04-27 16:19:22 326
原创 nodejs 对数据进行分组
将相同的模块统计分组以object为例,是一个由多个json体组成的数组object= [ { key: 'xxx', name: 'yiyi', age: 12, money: 10 }, { key: 'sss', name: 'iii', age: 13, money: 100 }, { key: 'ddd', name: 'ooo', age: 13, money: 50 }, { key: 'sss', name: 'mmm', age: 50, money:
2022-04-27 16:11:30 719
原创 VSCode切换中文以及配置终端集成bash和cmd
VSCode切换中文1,点击左下方设置按钮,选择Extensions选项2,选择中文简体点击install安装,安装完成后需要重启vscode,生效。
2022-03-15 17:13:05 259
原创 nodejs项目编译报错Cannot find module ‘request‘
这里写自定义目录标题复制nodejs项目编译报错找不到模块?解决办法复制nodejs项目编译报错找不到模块?解决办法
2021-01-14 12:25:34 12361 1
原创 Qt自定义虚拟键盘
参考链接:https://blog.csdn.net/sealedghost/article/details/80026756例子:https://gitee.com/nkzhangkun/QVirtualKeyboard
2020-06-18 14:37:13 695
原创 关于QComboBox
1,QComboBox 可编辑状态setEditable(true);QlineEdit* lineedit = combobox->lineEdit();(2)仅点击右侧按钮响应显示下拉框2, QComboBox 不可编辑状态下(1)setEditable(false);combobox->lineEdit() = null;//注意: 此状态为空指针,调用程序会中断(2)点击整行响应显示下拉框(3)setCurrentText(const QString &te
2020-06-16 17:32:49 571
原创 QIcon Selected状态会自动渲染颜色
//icon.addFile(":/images/setting_widget/ic–setting-proxy-tab_selected", QSize(), QIcon::Selected);QIcon::Selected会自动给off状态下渲染颜色作为on颜色最好使用icon.addFile(":/images/setting_widget/ic–setting-metting-tab", QSize(), QIcon::Normal, QIcon::Off)icon.addFile(":/i
2020-06-10 16:04:56 916
原创 QWidget QDialog窗体设置
QWidgetsetWindowFlags(Qt::FramelessWindowHint | Qt::Popup | Qt::NoDropShadowWindowHint | Qt::WindowStaysOnTopHint);setAttribute(Qt::WA_ShowWithoutActivating);setAttribute(Qt::WA_TranslucentBackground);setAttribute(Qt::WA_StyledBackground);QDialog:
2020-06-09 10:15:01 443
原创 QT QWidget设置圆角无效果
QT QWidget设置圆角无效果.qss内容:QWidget {border: none;background-color: rgba(0, 0, 0, 204);border-radius: 4px;color: #FFFFFF;}原因:有二原因一:没有父窗口或者有popup等风格时, 只有background, background-clip and background-origin等会生效,需要设置:void Widget::paintEvent(QPaintEvent *
2020-06-08 18:04:27 4378
原创 QT用QPainter的drawText绘制文字
标题QT用QPainter的drawText绘制文字drawText(QPoint,QString)不能换行识别不了/ndrawText(QRect,int flags,QString)可以换行需要设置alignmen
2020-03-20 14:47:49 3760 1
TA创建的收藏夹 TA关注的收藏夹
TA关注的人