上一页 1 2 3 4 5 6 ··· 35 下一页
摘要: while(run){ do{ rc = mosquitto_loop(mosq, timeout, max_packets); }while(run && rc == MOSQ_ERR_SUCCESS); /* Quit after fatal errors. */ switch(rc){ cas 阅读全文
posted @ 2023-07-11 17:55 zhaogaojian 阅读(79) 评论(0) 推荐(0) 编辑
摘要: #方法一: ##main.ts中 ``` const wsapi = "ws://localhost:8081"; const appConfig = { wsapi, }; const app = createApp(App); // Provide the appConfig as a glob 阅读全文
posted @ 2023-07-10 10:14 zhaogaojian 阅读(46) 评论(0) 推荐(0) 编辑
摘要: doc = xmlReadFile(filename, "UTF-8", XML_PARSE_NOBLANKS);//需要加XML_PARSE_NOBLANKS,不然会挤到一起 if (doc == NULL) { return -1; } 增加XML_PARSE_NOBLANKS即可。如果不使用这 阅读全文
posted @ 2023-06-12 19:22 zhaogaojian 阅读(24) 评论(0) 推荐(0) 编辑
摘要: ![image](https://img2023.cnblogs.com/blog/427803/202305/427803-20230530155624211-1405897174.png) 阅读全文
posted @ 2023-05-30 15:57 zhaogaojian 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 试了几种方案 (一) 卸载ubuntu 下用wine安装的程序,可以用wine uninstaller命令,打开 添加/删除程序界面,进行删除程序操作: 确定无效! ### 重启后无效果。 (二) 终端输入: cd /home/jack/.config/menus/applications-merg 阅读全文
posted @ 2023-05-22 14:59 zhaogaojian 阅读(37) 评论(0) 推荐(0) 编辑
摘要: export LANG=en_US xdg-user-dirs-gtk-update export LANG=zh_CN.UTF-8 重启,提示是否更新成中文目录,点否,记住设置即可。 阅读全文
posted @ 2023-05-18 16:51 zhaogaojian 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 1、WSL1 不支持 FUSE 文件系统,因此无法在 WSL1 中直接使用 LevelDB。LevelDB 使用 FUSE 来提供基于文件的存储,因此在 WSL1 中无法正常运行。 但是,您仍然可以在 WSL1 上使用 Leveldb 的 API,只需将数据存储在本地文件系统中即可。这意味着您需要使 阅读全文
posted @ 2023-05-06 17:46 zhaogaojian 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 首先安装所有依赖,在linux下可以直接编译成功,在armlinux低版本编译器(由于系统限制,只能使用这个版本)下有点问题。 1、在CMakeLists.txt中增加 set (CMAKE_C_COMPILER "/xxxxxx/arm-linux-gnueabihf-gcc") set (CMA 阅读全文
posted @ 2023-05-05 18:09 zhaogaojian 阅读(65) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <string.h> struct Testscanf { char input[20]; char intput1[3]; }; int main() { char input[] = "John 25"; char intput1[] = 阅读全文
posted @ 2023-04-15 10:42 zhaogaojian 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 1、该函数参数是char ,所以就算传入一个const char ,也会被修改。 2、替代函数 #include <stdio.h> #include <string.h> int main() { const char *str = "Hello, world! How are you?"; ch 阅读全文
posted @ 2023-04-15 00:38 zhaogaojian 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 以windows下使用为例 1、安装ClangFormat 2、在本地电脑上找到clang-format.exe,复制路径,不带双引号 阅读全文
posted @ 2023-04-10 09:58 zhaogaojian 阅读(65) 评论(0) 推荐(0) 编辑
摘要: #1、Windows安装 如果出现报错 usbipd: error: The service is currently not running; a reboot should fix that. 需要重新安装一次。 ``` winget install --interactive --exact 阅读全文
posted @ 2023-04-04 17:07 zhaogaojian 阅读(232) 评论(0) 推荐(0) 编辑
摘要: -H, --displayhex Turn on output in hex mode. sudo minicom -D /dev/ttyS1 -b 9600 -H 阅读全文
posted @ 2023-04-03 17:30 zhaogaojian 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 一、Crtl + Shift + P,打开命令面板,输入configure display language后回车 二、选zh-cn 然后等待vscode重启 重启后就是中文了 阅读全文
posted @ 2023-04-03 12:39 zhaogaojian 阅读(13) 评论(0) 推荐(0) 编辑
摘要: #include <stdlib.h> #include <stdio.h> #include <execinfo.h> void f(void) { char **strings; size_t i, size; enum Constexpr { MAX_SIZE = 1024 }; void * 阅读全文
posted @ 2023-03-29 13:19 zhaogaojian 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 1、访问golang中国官网,下载适用于Linux的Go1.20.2安装包。 2、打开终端并导航到下载的安装包所在的目录。 3、解压缩安装包,例如:tar -C /usr/local -xzf go1.20.2.linux-amd64.tar.gz。 4、将Go二进制文件的路径添加到PATH环境变量 阅读全文
posted @ 2023-03-22 19:31 zhaogaojian 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 注释掉这两句话。 https://github.com/zhaogaojian/lib60870 阅读全文
posted @ 2023-03-19 08:48 zhaogaojian 阅读(39) 评论(0) 推荐(0) 编辑
摘要: ##1、效果 ##2、扩展后调用代码 case C_RS_NA_1: // 读取参数 // 获取请求的地址 printf("ReadParam:%d,datasize:%d\n", CS101_ASDU_getTypeID(asdu), CS101_ASDU_getPayloadSize(asdu) 阅读全文
posted @ 2023-03-18 17:41 zhaogaojian 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 增加预定义 _GNU_SOURCE 阅读全文
posted @ 2023-03-13 12:53 zhaogaojian 阅读(10) 评论(0) 推荐(0) 编辑
摘要: Win10后,每次开机需要重新把共享开关下才能生效。如下图所示,将共享先取消勾选下,再勾上子网才能正常使用。 找到路径:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\SharedAccess下,添加一个注册表子项 5、在空白 阅读全文
posted @ 2023-02-28 10:36 zhaogaojian 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 根据上一个学习,增加action # 首先导入Cocos包 import cocos from cocos.actions import * # 对图层进行子类化 并在此处定义编程的逻辑 class HelloWorld(cocos.layer.Layer): def __init__(self): 阅读全文
posted @ 2023-02-26 14:42 zhaogaojian 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 1、安装 pip3 install cocos2d 报错 Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run succes 阅读全文
posted @ 2023-02-26 14:05 zhaogaojian 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 为了引导小孩学习编程,选择他喜欢的我的世界素材 1、安装python,目前最新版本python311.exe https://www.python.org/ https://www.python.org/ftp/python/3.11.2/python-3.11.2-amd64.exe 2、安装完毕 阅读全文
posted @ 2023-02-24 22:08 zhaogaojian 阅读(80) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> #include <concepts> using namespace std; template<typename T> concept number = std::_Is_character<T>::value; template<number T> voi 阅读全文
posted @ 2023-02-21 14:23 zhaogaojian 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 使用其他编译器第一个import特性试验不过,最后找到一篇文章使用VisualStudio. https://zhuanlan.zhihu.com/p/589086732 主要步骤 1、设置语言标准 2、新建一个 HeaderUnits.h 头文件,写入以下内容(import 在 整个项目中 要用到 阅读全文
posted @ 2023-02-20 14:56 zhaogaojian 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 1、安装打包工具 dotnet tool install --global dotnet-warp 2、在项目目录下运行 dotnet-warp 3、运行editbin设置为windows模式(在命令提示行下运行) editbin /subsystem:windows .\yourapp.exe 4 阅读全文
posted @ 2023-02-20 09:52 zhaogaojian 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 1、Nuget安装 2、创建config.xml,并设置为输出到目录 <?xml version="1.0" encoding="utf-8" ?> <Obfuscator> <!--输入路径--> <Var name="InPath" value="." /> <!--输出路径:加密混淆过的路径- 阅读全文
posted @ 2023-02-20 09:26 zhaogaojian 阅读(624) 评论(0) 推荐(0) 编辑
摘要: 可以直接从官网下载,但需要配置加速域名,麻烦,可以直接在清华网站上下载。 下载站: https://mirrors.tuna.tsinghua.edu.cn/ 右键配置: msys2配置 如何添加右键打开,软件包管理工具的简单使用。 添加右键菜单 打开注册表HKEY_CLASSES_ROOT\Dir 阅读全文
posted @ 2023-02-19 12:11 zhaogaojian 阅读(64) 评论(0) 推荐(0) 编辑
摘要: 原因是 C:\Strawberry 环境变量冲突,将这个目录重命名即可。 阅读全文
posted @ 2023-02-18 23:41 zhaogaojian 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 1、打开设置 2、添加C++11 3、测试以下代码,运行成功即可 #include <cstring> #include <cstdio> #include <iostream> #include <iostream> #include <tuple> #include <memory> void 阅读全文
posted @ 2023-02-18 21:25 zhaogaojian 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 最近买了一个荣耀路由器,运营商定制版,很奇怪无法访问自建svn服务,分析主要原因是运营商定制版屏蔽了80端口,需要将svn端口更换为其他端口,如8443.另外只有通过无线无法访问有线接口上的svn服务,都用无线正常。 阅读全文
posted @ 2023-02-09 13:29 zhaogaojian 阅读(57) 评论(0) 推荐(0) 编辑
摘要: 使用 rz -be 解决办法是上传是用rz -be,并且去掉弹出的对话框中“Upload files as ASCII”前的勾选。 阅读全文
posted @ 2023-02-06 21:15 zhaogaojian 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 今天偶然点开更新VisualStudio,随便看了几个功能,最近变化了不少。 #一、Blazor功能 ##1、新建项目 ##2、运行项目 ##3、修改代码 ##4、点击clickme 可以看到直接变成了+2,之前Blazor才出来的时候是不支持的。 #二、支持Git多存储 19年时候还是用的插件实现 阅读全文
posted @ 2023-01-06 11:50 zhaogaojian 阅读(31) 评论(0) 推荐(0) 编辑
摘要: #0、分配空间 cd "C:\Program Files\Oracle\VirtualBox" ./VBoxManage modifyhd "F:\xxx\ms\ms.vdi" --resize 30720 ./VBoxManage modifyhd "F:\xxx\ms\Snapshots{xxx 阅读全文
posted @ 2023-01-04 11:19 zhaogaojian 阅读(47) 评论(0) 推荐(0) 编辑
摘要: 之前都是在系统登录时看系统版本,登录后也可以通过命令查看 cat /etc/issue root@localhost:~# cat /etc/issue Ubuntu 18.04.1 LTS \n \l 阅读全文
posted @ 2022-12-27 10:18 zhaogaojian 阅读(18) 评论(0) 推荐(0) 编辑
摘要: echo "$$$$$$" 289728972897 echo '$$$$$$' $$$$$$ 单引号所见即所得,双引号进行转义。两个$$代表当前shell的进程号。 所以显示出来一串数字。 阅读全文
posted @ 2022-12-09 16:21 zhaogaojian 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 假如有一个件,文件内容 123 123 123 123<0x00><0x00><0x00><0x00><0x00><0x00><0x00> 那么 while (!in.eof()) { in.getline(rbuf, 3); } 到最后一行会卡着,可以写成 in.getline(rbuf,1024 阅读全文
posted @ 2022-11-26 18:00 zhaogaojian 阅读(53) 评论(0) 推荐(0) 编辑
摘要: lsblk -n --nodeps -o name,serial /dev/mmcblk0 cat /sys/class/block/mmcblk0boot1/device/device/serial static int get_chip_id(char *buf, size_t size) { 阅读全文
posted @ 2022-11-24 18:33 zhaogaojian 阅读(424) 评论(0) 推荐(0) 编辑
摘要: 方式一 void *test_thread(void *arg); pthread_create(&pid, pthread_arr1,test_thread, NULL); 方式二 void test_thread(void *arg); pthread_create(&pid, NULL,(vo 阅读全文
posted @ 2022-11-02 23:52 zhaogaojian 阅读(39) 评论(0) 推荐(0) 编辑
摘要: ###方式1 while (1) { int rc = mosquitto_loop(mosq, -1, 1); if (rc) { printf("mqtt_portal: mosquitto_loop rc = %d \n", rc); sleep(1); mosquitto_reconnect 阅读全文
posted @ 2022-11-02 23:10 zhaogaojian 阅读(186) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 35 下一页