串口发送 重写fputc函数 /* 优点 直接使用printf函数,发送数据长度无限制,不需要额外的数组空间 缺点 只能对应一个串口,暂时没想到解决方案 */ //头文件中要包含 stdio.h 然后就可以正常使用printf了 int fputc(int ch ,FILE *F) { HAL_UA ...
分类:
其他好文 时间:
2020-07-23 22:27:53
阅读次数:
51
public static int countChar(String str,char ch) { // 将字符串转换为字符数组 char[] chs = str.toCharArray(); // 定义变量count存储字符串出现的次数 int count = 0; for(int i = 0;i ...
分类:
其他好文 时间:
2020-07-22 16:18:27
阅读次数:
96
引用的jar包(maven) <properties> <java.version>1.8</java.version> <ch.qos.logback.version>1.2.3</ch.qos.logback.version> <sharding-sphere.version>4.1.1</sh ...
分类:
编程语言 时间:
2020-07-21 21:58:23
阅读次数:
74
无缓冲通道(阻塞通道) 写入后立即阻塞,需要另一个协程读取通道的数据后,才能继续执行。 通道操作符 ch <- v // Send v to channel ch. v := <-ch // Receive from ch, and // assign value to v. 无缓冲通道 ch := ...
分类:
其他好文 时间:
2020-07-20 15:23:45
阅读次数:
70
import random 1、seek() 种子,默认种子是系统时钟 2、random()函数,生成0到1的随机小数 3、uniform(a,b)生成a到b的随机小数 4、randint(a,b)生成一个a到b的随即整数 5、randrange(a,b,c) 生成一个a到b,以c递增的数 6、ch ...
分类:
编程语言 时间:
2020-07-19 17:43:21
阅读次数:
71
#include<stdio.h> int main() { char ch, again; do { printf("输入一个字符!"); ch = getchar(); if (ch >= 'A' && ch <= 'Z') { printf("%c", ch + 32); } getchar( ...
分类:
编程语言 时间:
2020-07-19 15:52:37
阅读次数:
46
char * longestCommonPrefix(char ** strs, int strsSize){ char ch; int len=0, i, j; if (strsSize < 1) {return "";} len = strlen(strs[0]); for (i=1; i<st ...
分类:
其他好文 时间:
2020-07-19 00:36:29
阅读次数:
79
Java-执行shell命令 1、本地调用 1 import ch.ethz.ssh2.Connection; 2 import ch.ethz.ssh2.Session; 3 import lombok.extern.slf4j.Slf4j; 4 import org.springframewor ...
分类:
编程语言 时间:
2020-07-16 21:28:31
阅读次数:
82
设置ssh-key ssh-keygen -t rsa -C "18217426147@163.com" git clone git clone git@e.coding.net:weimeigu/auction.backend/auction.backend.git 创建并且切换分支 git ch ...
分类:
其他好文 时间:
2020-07-15 16:00:45
阅读次数:
67
Number of Segments in a String (E) 题目 Count the number of segments in a string, where a segment is defined to be a contiguous sequence of non-space ch ...
分类:
其他好文 时间:
2020-07-14 09:24:30
阅读次数:
84