package main import "fmt" type OBJ struct { A string B *int } func main() { var data int = 0 addr := &data obj1 := OBJ{ A: "aaa", B: addr, } obj2 := O ...
分类:
其他好文 时间:
2020-06-05 11:37:23
阅读次数:
66
Python IO 编程 1.编写代码,将学生的学号,姓名,成绩输出,并且计算出学生个人的平均成绩。 #写进二进制数据 import struct f=open('d:\\student.dat','wb') n=input('请输入学生人数:') #输入数据为字符串类型 #先把字符串转为int型, ...
分类:
编程语言 时间:
2020-06-04 22:00:23
阅读次数:
124
//pointer to structure #include <stdio.h> struct Person { char name[10]; char character[20]; int age; }; void display(struct Person *t); int main() { ...
分类:
其他好文 时间:
2020-06-04 21:27:17
阅读次数:
69
# 第11周知识总结 标签(空格分隔): 未分类 计算机科学或软件工程的领域对栈与队列的四个操作有特定的名称:栈:push: 加入一个物件,入栈、推入、…;pop: 取出一个物件,出栈、弹出、…;top: 检查一个「特定」的对象,顶部、头部、…,isEmpty: 和检查容器内有没有物件,为空、…。队 ...
分类:
其他好文 时间:
2020-06-04 18:06:22
阅读次数:
93
python之struct详解 用处按照指定格式将Python数据转换为字符串,该字符串为字节流,如网络传输时,不能传输int,此时先将int转化为字节流,然后再发送;按照指定格式将字节流转换为Python指定的数据类型;处理二进制数据,如果用struct来处理文件的话,需要用’wb’,’rb’以二 ...
分类:
编程语言 时间:
2020-06-04 16:50:15
阅读次数:
70
1. install python, set environment variables. 2. pip install selenium 3. 下载与自己浏览器版本匹配的chrome webdriver, 放到python.exe同目录(python安装目录)。 http://npm.taobao ...
分类:
编程语言 时间:
2020-06-04 14:02:48
阅读次数:
547
struct 将字节串解读为打包的二进制数据 — Python 3.8.3 文档 https://docs.python.org/zh-cn/3.8/library/struct.html 源代码: Lib/struct.py 此模块可以执行 Python 值和以 Python bytes 对象表示 ...
分类:
其他好文 时间:
2020-06-04 13:46:50
阅读次数:
53
链表的一个结点的结构体如下: type LNode struct { value int next *LNode } 对于一个单链表,如果他要存在环,那么至少存在两个节点,也就是说最后一个结点的next指向了前面的某个结点。 所以在判断链表是否存在环的时候,我们添加快慢两个指针fast和slow,f ...
分类:
其他好文 时间:
2020-06-04 13:36:46
阅读次数:
69
#include <stdio.h> #include <stdbool.h> #include <stdlib.h> //exit 函数需要 #include <malloc.h> #define MAXSIZE 8 typedef struct queue { int* arr; //int 类 ...
分类:
其他好文 时间:
2020-06-04 01:42:21
阅读次数:
70
#include <iostream> using namespace std; /* * 内存管理器,分配大块内存供使用,最后集中回收 */ class AllocMem { private: enum {BlockSize = 2048};//buffer尺寸大小 struct Block { ...
分类:
其他好文 时间:
2020-06-03 20:32:49
阅读次数:
71