博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
上一页 1 2 3 4 5 6 7 ··· 16 下一页

2023年8月8日

摘要: ```python # # py_closure.py # py_learn # # Created by Z. Steve on 2023/8/8 07:17. # # 闭包: # 1. 概念相关 # 闭包(closure)是一个函数以及其捆绑的周边环境状态(lexical environment 阅读全文

posted @ 2023-08-08 08:30 steve.z 阅读(6) 评论(0) 推荐(0) 编辑

2023年8月7日

摘要: ```python # # py_recursive.py # py_learn # # Created by Z. Steve on 2023/8/7 21:28. # # 需求: 通过递归查找一个目录下的所有目录和文件 os 模块下的三个方法: 1. os.listdir() 2. os.pat 阅读全文

posted @ 2023-08-07 22:34 steve.z 阅读(5) 评论(0) 推荐(0) 编辑

摘要: # Python 使用正则表达式 ```python # # py_regex.py # py_learn # # Created by Z. Steve on 2023/8/7 17:18. # # 1. Python 使用正则表达式, 需要导入的模块 re 模块 # 2. 正则表达式基本方法: 阅读全文

posted @ 2023-08-07 18:43 steve.z 阅读(17) 评论(0) 推荐(0) 编辑

摘要: # Socket ## 客户端 ```python # # py_client.py # py_learn # # Created by Z. Steve on 2023/8/7 16:36. # import socket def test_client(): # 1. 创建 socket soc 阅读全文

posted @ 2023-08-07 17:18 steve.z 阅读(14) 评论(0) 推荐(0) 编辑

摘要: ```python import threading,time def fn1(x, y, z): while True: print("I'm doing sport.") print('args: %s %s %s' % (x, y, z)) time.sleep(1) def fn2(a, b 阅读全文

posted @ 2023-08-07 10:42 steve.z 阅读(12) 评论(0) 推荐(0) 编辑

2023年8月6日

摘要: # 概述 围绕 ARM 处理器设计的计算机与围绕 Intel 或 AMD 设计的计算机是不可互换使用的。有两个基本问题是它们都要解决的,尽管方式各有不同: 1. 如何平衡晶体管数量与程序复杂性? 2. 如何确定速度、功耗和成本的优先级? 在过去的四十年里,在不断寻求答案的过程中,我们见证了小到智能手 阅读全文

posted @ 2023-08-06 08:13 steve.z 阅读(7) 评论(0) 推荐(0) 编辑

2023年8月3日

摘要: ```c #include // 循环 void printN(int n) { int mod = 0; while ((mod = n % 10) != 0) { printf("%d\n", mod); n = n / 10; } } // 递归 void printn(int n) { pr 阅读全文

posted @ 2023-08-03 12:12 steve.z 阅读(12) 评论(0) 推荐(0) 编辑

摘要: # 递归的四个基本法则 ## 1. 必须有基准情形(base case) > 必须有某些基准情形,它们不用递归就能求解 ## 2. 必须不断推进(making progress) > 对于需要递归的情形,递归调用必须能够朝着产生基准情形的方向推进 ## 3. 设计法则 design rule > 假 阅读全文

posted @ 2023-08-03 11:53 steve.z 阅读(30) 评论(0) 推荐(0) 编辑

2023年8月2日

摘要: ```c #include #include // 定义节点结构体 struct node { int data; struct node *next; /* 注意:这行使用了 node, node 必须在这行之前定义 */ }; int main(int argc, const char *arg 阅读全文

posted @ 2023-08-02 20:04 steve.z 阅读(9) 评论(0) 推荐(0) 编辑

摘要: ```c #include #include // 1. 定义一个结构体(先定义结构体再声明变量) struct Student { int no; char *name; char sex; float score; }; // 2. 在定义结构体类型的同时声明结构体变量 struct Teach 阅读全文

posted @ 2023-08-02 11:13 steve.z 阅读(12) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 ··· 16 下一页