1.链接代码 char* my_strcat(char* dist, const char* src) { if (dist == nullptr || src == nullptr) { return dist; } char* cp = dist; while (*cp != '\0') { + ...
分类:
其他好文 时间:
2021-04-05 11:42:36
阅读次数:
0
google colab报错: SyntaxError: unexpected EOF while parsing 搜了之后发现: 出现这种错误的原因肯定是你的语法格式不正确了, 多半是少了一个括号, 再好好检查 一下吧!!! 确实,检查代码后发现少了一个括号... 参考:Python错误Synta ...
分类:
其他好文 时间:
2021-04-02 13:16:59
阅读次数:
0
#include <stdio.h> int main(){ int n,sum,x,y; sum=1; x=1; y=2; scanf("%d",&n); do { sum +=y; y=y*2; x++; }while(x<=n); printf("n=%d时,sum=%d\n",n,sum); ...
分类:
其他好文 时间:
2021-04-02 13:12:27
阅读次数:
0
最精简版本 int check_data(int *array, int n) { while(n--) if (*array++ != 0x00) return 0; return 1; } 返回1 array数组全零,否则正常非全零。 int check_data(int *array) { w ...
分类:
编程语言 时间:
2021-04-01 13:15:24
阅读次数:
0
###案例1 java byte[]与十六进制字符串相互转换 import java.util.Arrays; public class ccc { public static void main(String[] args) { int[] array ={-6, 1, 18, 114, 54, ...
分类:
编程语言 时间:
2021-04-01 12:57:31
阅读次数:
0
非递归前序遍历二叉树 1 void preTraverse(const BiTree &T){ 2 //initialStack(stack) 3 BiTree stack[MAX]; 4 int top=-1; 5 BiTree p=T; 6 //while(!stackEmpty(stack)| ...
分类:
其他好文 时间:
2021-03-31 12:27:44
阅读次数:
0
DateTime dt_now = DateTime.Now;//获取当前时间 while (dt_now.AddMinutes(1) > DateTime.Now) { //Todo:执行自己的操作 await Task.Delay(1000);//延迟1s } View Code 相对比较优雅一 ...
class Solution { public static void main(String[] args) { int[] arr = new int[]{0, 1, 2, 2, 2, 3, 4, 5}; //int index = binarySearch(arr, 2); //int ind ...
分类:
其他好文 时间:
2021-03-31 11:46:55
阅读次数:
0
import contextlib import pyhdfs class HdfsUtil(object): def __init__(self, hosts='namenode1:9870,namenode2:9870', user_name='hdfs'): self.hosts = host ...
分类:
编程语言 时间:
2021-03-30 13:29:22
阅读次数:
0
//二分图匹配#include<cstdio>#include<cstring>using namespace std;const int N = 1005;int n,m,k; //a方n人 b方m人 k对关系 int u,v; int g[N][N]; //表示a,b之间有关系,赋值为0/1. ...
分类:
其他好文 时间:
2021-03-30 12:52:43
阅读次数:
0