- 博客(40)
- 资源 (5)
- 收藏
- 关注
原创 Failed to resolve org.junit.vintage:junit-vintage-engine:5.5.2
修改测试程序//import org.junit.jupiter.api.Test;import org.junit.Test;
2021-06-21 12:22:34
981
原创 Linux socket测试程序
CMakeFilelistsCMAKE_MINIMUM_REQUIRED(VERSION 2.6)SET(CMAKE_VERBOSE_MAKEFILE ON)SET(CMAKE_C_COMPILER "gcc")PROJECT(HELLO)SET(CLIENT_FILE "./client.c" )LINK_LIBRARIES(pthread)ADD_EXECUTABLE(client ${CLIENT_FILE})client.c#include <stdlib.h>#i
2021-05-25 23:00:30
522
原创 cmake ubuntu 上使用
1. 安装编译环境apt install cmakeapt install gccapt install g++2. 建立文件hello.c#include "stdio.h"int main(){ printf("helloworld\n"); return 0;}3. 建立文件CMakeLists.txtCMAKE_MINIMUM_REQUIRED(VERSION 2.6)SET(CMAKE_C_COMPILER "gcc")PR
2021-05-23 15:25:50
146
原创 docker 安装lora-server
1.下载代码git clone https://github.com/brocaar/loraserver-docker.git2.修改配置修改NS下的配置文件EU868->CN47020,45行注释掉20,45 s/^/#/g3. docker-compose up
2021-03-13 12:04:56
314
原创 STM32 随机数产生测试
#include "stdlib.h"void testRand(){ u32 seed = HAL_GetUIDw0(); printf("seed:%08x\n",seed); srand(seed); for(int i=0;i<10;i++){ u32 data = rand()%3600; printf("%04d\n",data); }}
2021-03-09 16:39:11
775
原创 chirpstack lora-server配置
1.NS配置2.Gateway Profiles3.service profile4.device profileRX1接收窗口1,频点和数据率和紧挨着的上行相同 Rx2接收窗口2,各频段有默认的频点和数据率,CN470频段Rx2 默认频点数据率为 505.3 MHz / DR05.Gateways6.applications7.device...
2021-03-08 21:02:31
762
原创 Mingw 编写c测试程序
1.线程和信号量#include <iostream>#include "stdio.h"# include <semaphore.h>#include <fcntl.h>#include <sys/types.h>#include <sys/stat.h>#include "pthread.h"#include <signal.h>#include <time.h>#include "error.h
2020-05-19 18:12:14
411
原创 LWIP 学习(dhcp,mqtt)
1 .dhcp 成功判断和获取地址打印void startEtherNet(){ HAL_GPIO_WritePin(ETH_RSTN_GPIO_Port,ETH_RSTN_Pin,GPIO_PIN_SET); osDelay(100); HAL_GPIO_WritePin(ETH_RSTN_GPIO_Port,ETH_RSTN_Pin,GPIO_PIN_RESET); osDelay(100); HAL_GPIO_WritePin(ETH_RSTN_GPIO_Port,ETH_RSTN_P
2020-05-18 14:15:04
925
原创 学习STM32
Startup _stm32f103xb.s MODULE ?cstartup ;; Forward declaration of sections. SECTION CSTACK:DATA:NOROOT(3) SECTION .intvec:CODE:NOROOT(2) EXTERN __iar_program_start EXTERN SystemInit PUBLIC...
2020-05-11 16:47:19
505
原创 Java Nettty
UDPclient examplepublic class UdpClient { public static void main(String[] args) { //服务类 Bootstrap bootstrap = new Bootstrap(); //worker EventLoopGroup worke...
2020-05-06 17:02:16
203
原创 idea swing gui设计后用mvn打包需要的插件
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>ideauidesigner-maven-plugin</artifactId> <version>1.0-beta-1</version> <executio...
2019-11-05 19:54:43
1472
1
原创 python 积累
1.列出所有串口pip install pyserial# -*- coding:UTF-8 -*-import serial.tools.list_ports#检测设备的端口数plist = list(serial.tools.list_ports.comports())if len(plist) <= 0: print "没有发现端口!"else:...
2019-10-21 13:42:50
131
原创 nodejs AES加密
1. npm install crypto-js2. 测试const crypto = require('crypto');var CryptoJS = require("crypto-js");var data = 'helloworld';var key = CryptoJS.enc.Utf8.parse("41c8704454ce483e");var ciphe...
2019-10-05 11:32:37
549
原创 vc udp socket 例子
#include "stdafx.h"#include "common.h"#pragma comment(lib,"ws2_32.lib")#define SERVER_PORT 6000WORD wVersionRequested;WSADATA wsaData;int err;SOCKET sockSrv;SOCKET sockCli;DWORD svrTid;...
2019-09-29 11:15:56
256
原创 JAVA AES加密练习
public static byte[] Encrypt(String sSrc, String sKey) throws Exception { Cipher cipher = Cipher.getInstance("AES"); cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(sKey.g...
2019-09-20 11:23:12
233
原创 vue.js 学习 1
1.hello world & button component<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>Hello Vue</title></head><body> <scr...
2019-09-18 08:01:28
105
原创 springboot postgres jpa
1 .创建postgre数据库docker-compose.ymlversion: "3"services:postgresql:hostname: dqpostgrerestart: unless-stoppedimage: postgres:9.6-alpinevolumes:- ./configuration/initdb:/docker-entrypoi...
2019-09-16 01:36:00
308
原创 spring boot 工程混淆
1. pom文件配置<build> <plugins> <plugin> <groupId>com.github.wvengen</groupId> <artifactId>proguard-maven-plugi...
2019-09-14 15:21:36
350
原创 java mqtt 订阅和发布
发布:@Component@Slf4jpublic class MqttProducer { private MessageHandler messageHandler; @Bean public MqttPahoClientFactory mqttClientFactory() { DefaultMqttPahoClientFactory ...
2019-08-10 13:13:30
967
原创 docker 报错 b'failed to start shim: exec: "docker-containerd-shim": executable file not found in $P
docker 报错 b'failed to start shim: exec: "docker-containerd-shim": executable file not found in $PATH: unknown运行systemctl restart docker 解决
2019-07-10 07:53:51
4894
2
原创 GSON 转换
import com.google.gson.TypeAdapter;import com.google.gson.stream.JsonReader;import com.google.gson.stream.JsonWriter;import java.io.IOException;import java.util.Date;public class LongDateTyp...
2019-07-01 21:03:11
194
原创 java callable 线程池 future
public class MyThread implements Callable<String> { private String name; private int waittime; @Override public String call() throws Exception { log.info("mythread ...
2019-05-28 12:03:34
221
原创 springboot 操作redis
@SpringBootApplication@Slf4jpublic class RedisTestApp { public static void main(String[] args) throws InterruptedException { ApplicationContext ctx = SpringApplication.run(RedisTestA...
2019-05-14 18:38:16
89
原创 stm32 bootloader
1.bootloader 地址(0x08000000)2.app地址(修改icf文件) 0x080020003.bootloader SystemInit(System_stm32f1xx.c)#define AP_START_SECTOR 0x08002000 void (*user_code_entry)(void); //NVIC_SetVectorTab...
2019-02-22 01:47:14
336
原创 idea 创建springboot hello world
1. File->New->spring initializrdependency 选择 web web2.修改maven配置路径,指向本地的maven仓库File->build.excution.Deployment->Build tools->Maven Maven home directory 修改为 E:/maven/apache-ma...
2019-02-14 14:33:29
475
原创 java zeromq1
1.编译git clone https://github.com/zeromq/jzmq.git2.打开VC工程cd \jzmq\jzmq-jni\builds\msvc打开msvc.sln3.设置头文件和库文件路径4.编译选择x64jzmq-jni\lib5.将生成的jar放到工程中File->project structure->m...
2019-01-26 16:24:57
281
原创 c# 使用zeromq
1.安装NETMQ (nuget)测试代码 static void zmqClient() { // using (var responseSocket = new ResponseSocket("@tcp://*:5555")) using (var requestSocket = new RequestSock...
2019-01-09 10:40:54
4418
原创 VC 下使用zeroMQ
1. VC++环境 zeromq编译1a.下载libzmq 4.2.2 版本https://github.com/zeromq/libzmq 1b.打开libzmq-4.2.2\builds\msvc\vs2015\libzmq.sln编译libzmq-4.2.2\bin\Win32\Debug\v140\dynamic 生成 libzmq.dll libzmq.lib...
2019-01-09 10:01:08
1010
原创 linux 命令
语法nc [-hlnruz][-g<网关...>][-G<指向器数目>][-i<延迟秒数>][-o<输出文件>][-p<通信端口>][-s<来源位址>][-v...][-w<超时秒数>][主机名称][通信端口...]参数说明:-g<网关> 设置路由器跃程通信网关,最丢哦可设
2018-11-14 14:25:48
234
原创 5位数码管控制
数码管控制代码:u8 arrayDigital[] = {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07, 0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};u8 arrayBit[] = {0x1e,0x1d,0x1b,0x17,0x0f};void hardDelay(int n){ int i; for(i=...
2018-11-14 13:41:32
1652
原创 Java8学习(1) lambda
public class Student { public String Name; public Integer Age; public Student(String name, Integer age) { Name = name; Age = age; }}public class SetTest { pub...
2018-08-28 20:07:27
127
原创 Java HEX字符串和byte[]互相转换
package com.wxy.Utils;public class HexTool { static public byte hexStrToByte(String hexbytein){ return (byte)Integer.parseInt(hexbytein,16); } public static byte [] Str2Hex(St...
2018-08-13 15:44:15
3260
原创 log4j使用
pom文件:<!-- https://mvnrepository.com/artifact/log4j/log4j --><dependency><groupId>log4j</groupId><artifactId>log4j</artifactId><version>1.2.17&l
2018-08-07 20:20:52
104
原创 vc列出所有串口
// seriallist.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include <windows.h>#include <tchar.h> #include <windows.h> #include <setupapi.h>#include <locale.h>...
2018-08-03 18:52:48
1579
原创 docker 命令学习
apt-get updatesudo apt-get docker-ioapt install docker.io 查找镜像docker search redisdocker pull redisdocker imagesdocker rmi image-id docker run --name test-redis -d redisdocker ps ...
2018-07-31 15:08:10
113
原创 angularjs 计算器
<!DOCTYPE html><html><head> <meta charset="utf-8"> <script src="//apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js"></script></hea
2018-07-25 09:26:39
433
原创 c 实现两个tcp连接数据转发
// testserver.cpp : 定义控制台应用程序的入口点。////#include "stdafx.h"/* For sockaddr_in */#include <netinet/in.h>/* For socket functions */#include <sys/socket.h>/* For fcntl */#include <...
2018-07-23 13:27:53
3246
原创 VC 串口操作
#include "stdafx.h"#include "windows.h"#include "tchar.h"typedef unsigned char u8;extern HANDLE InitCom(LPCWSTR portname);extern DWORD ReadData(HANDLE handler, u8 *buffer, DWORD wCount);extern...
2018-07-15 12:07:29
312
boot407_example.zip
2020-05-11
stm32 操作18B20源码
2019-03-21
mysql5.7.24 dll库文件
2019-01-22
CC1101异步收发例子
2018-07-17
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人