自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(40)
  • 资源 (5)
  • 收藏
  • 关注

原创 centos7 samba共享不能访问问题

2. 防火墙需要添加139,445端口。1.查看samba的服务端口。

2022-11-02 18:38:35 1141 1

原创 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 881

原创 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 479

原创 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 115

原创 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 262

原创 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 684

原创 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 696

原创 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 348

原创 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 835

原创 学习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 431

原创 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 170

原创 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 1353 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 106

原创 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 488

原创 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 224

原创 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 181

原创 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 72

原创 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 266

原创 spring boot 工程混淆

1. pom文件配置<build> <plugins> <plugin> <groupId>com.github.wvengen</groupId> <artifactId>proguard-maven-plugi...

2019-09-14 15:21:36 327

原创 java mqtt 订阅和发布

发布:@Component@Slf4jpublic class MqttProducer { private MessageHandler messageHandler; @Bean public MqttPahoClientFactory mqttClientFactory() { DefaultMqttPahoClientFactory ...

2019-08-10 13:13:30 924

原创 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 4801 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 151

原创 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 192

原创 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 70

原创 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 264

原创 idea 创建springboot hello world

1. File-&gt;New-&gt;spring initializrdependency 选择 web web2.修改maven配置路径,指向本地的maven仓库File-&gt;build.excution.Deployment-&gt;Build tools-&gt;Maven   Maven home directory 修改为 E:/maven/apache-ma...

2019-02-14 14:33:29 445

原创 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 240

原创 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 4287

原创 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 963

原创 linux 命令

语法nc [-hlnruz][-g&lt;网关...&gt;][-G&lt;指向器数目&gt;][-i&lt;延迟秒数&gt;][-o&lt;输出文件&gt;][-p&lt;通信端口&gt;][-s&lt;来源位址&gt;][-v...][-w&lt;超时秒数&gt;][主机名称][通信端口...]参数说明:-g&lt;网关&gt; 设置路由器跃程通信网关,最丢哦可设

2018-11-14 14:25:48 216

原创 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 1475

原创 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 109

原创 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 3128

原创 log4j使用

pom文件:&lt;!-- https://mvnrepository.com/artifact/log4j/log4j --&gt;&lt;dependency&gt;&lt;groupId&gt;log4j&lt;/groupId&gt;&lt;artifactId&gt;log4j&lt;/artifactId&gt;&lt;version&gt;1.2.17&l

2018-08-07 20:20:52 90

原创 vc列出所有串口

// seriallist.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include &lt;windows.h&gt;#include &lt;tchar.h&gt; #include &lt;windows.h&gt; #include &lt;setupapi.h&gt;#include &lt;locale.h&gt;...

2018-08-03 18:52:48 1514

原创 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 95

原创 正则表达式学习

1.notepad 去除行号^\s*[0-9]*(.*)零个或多个空白符 + 0个或多个数字 + 内容替换成(\1)

2018-07-31 10:59:26 83

原创 angularjs 计算器

&lt;!DOCTYPE html&gt;&lt;html&gt;&lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;script src="//apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js"&gt;&lt;/script&gt;&lt;/hea

2018-07-25 09:26:39 416

原创 c 实现两个tcp连接数据转发

// testserver.cpp : 定义控制台应用程序的入口点。////#include "stdafx.h"/* For sockaddr_in */#include &lt;netinet/in.h&gt;/* For socket functions */#include &lt;sys/socket.h&gt;/* For fcntl */#include &lt;...

2018-07-23 13:27:53 3161

原创 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 282

boot407_example.zip

407 bootload iar 工程例子 startup_stm407.s MODULE ?cstartup SECTION CSTACK:DATA:NOROOT(3) SECTION .intvec:CODE:NOROOT(2) EXTERN SystemInit PUBLIC __vector_table DATA __vector_table DCD sfe(CSTACK) DCD Reset_Handler ; Reset Handler DCD Reset_Handler ; NMI Handler DCD Reset_Handler ; Hard Fault Handler DCD Reset_Handler ; MPU Fault Handler DCD Reset_Handler ; Bus Fault Handler DCD Reset_Handler ; Usage Fault Handler THUMB PUBWEAK Reset_Handler SECTION .text:CODE:REORDER:NOROOT(2) Reset_Handler LDR R0, =SystemInit BLX R0 END C程序,CODE_ADDR是应用程序烧写的地址 #include "stm32f4xx.h" #define CODE_ADDR 0x08020000 //typedef unsigned int u32; //#define __set_MSP(VALUE) (__iar_builtin_wsr("MSP", (VALUE))) void SystemInit(void) { void (*p)(void) = (void (*)(void))(*((uint32_t *)(CODE_ADDR+4)) ); // set up stack __set_MSP(*(volatile uint32_t*) CODE_ADDR); // jump to start p(); }

2020-05-11

stm32 操作18B20源码

采用STM32操作DS18B20源码, 采用硬件定时器实现定时。 u8 read18B20Dat(u32 dsChan) { u8 ret=0; for(u8 i=0;i<8;i++) { ret = ret>>1; setDsMode(dsChan,DS_OUT_MODE); DsOut(dsChan,1); delayus(2); DsOut(dsChan,0); delayus(2); setDsMode(dsChan,DS_IN_MODE); delayus(8); if(DsIn(dsChan)==1) ret = (ret | 0x80); delayus(45); } return ret; }

2019-03-21

mysql5.7.24 dll库文件

mysql库文件和头文件,可以用VC调用库函数 #include "stdafx.h" #include "mysql.h" #include #include #pragma comment(lib,"libmysql.lib") using namespace std; int main() { char strSQL[256] = { 0 }; MYSQL mysql; mysql_init(&mysql;); char* host = "localhost"; char* user = "root"; char* pwd = ""; char* dbname = "test"; int port = 3306; if (!mysql_real_connect(&mysql;, host, user, pwd, dbname, port, NULL, 0)) { printf("%s\n", mysql_error(&mysql;)); printf("connect failed\n"); return 1; } // query char* tbname = "student"; sprintf(strSQL, "select * from %s", tbname); if (mysql_real_query(&mysql;, strSQL, strlen(strSQL))) { printf("%s\n", mysql_error(&mysql;)); printf("read failed!\n"); mysql_close(&mysql;); return 2; } //get result MYSQL_RES* result; if (!(result = mysql_use_result(&mysql;))) { printf("%s\n", mysql_error(&mysql;)); printf("read result failed!\n"); mysql_close(&mysql;); return 3; } //show data MYSQL_ROW row; int num = mysql_num_fields(result);// field number while (row = mysql_fetch_row(result)) { for (int i = 0; i < num; ++i) printf("%s\t", row[i]); printf("\n"); } mysql_free_result(result); mysql_close(&mysql;); system&#40;"Pause"&#41;; return 0; }

2019-01-22

vc编译 zeromq库文件

编译zeromq vc库,可以放在vc工程中直接使用 https://mp.csdn.net/postedit/86133130

2019-01-09

CC1101异步收发例子

采用异步方式实现CC1101收发,采用STM32平台。 部分代码如下: uint8_t rcvbuffer[64]; void HAL_GPIO_EXTI_Callback(uint16_t gpiopin) { uint8_t len ; T_1101Statues t1101Statues; if(gpiopin == GOD2_Pin) { len = CC1101_Get_RxCounter(); if(len>0) { len = CC1101_Rx_Packet(rcvbuffer); CC1101_Clear_RxBuffer( ); } CC1101_Set_Mode( RX_MODE ); } }

2018-07-17

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除