10 2021 档案

摘要:1 头文件的布局: 2 #define 保护 所有头文件都应该有 #define 保护来防止头文件被多重包含, 命名格式当是: <PROJECT>_<PATH>_<FILE>_H_ 。 防御式开头防止重复include头文件。 #ifndef COMMON_H #define COMMON_H // 阅读全文
posted @ 2021-10-26 22:41 zju_cxl 阅读(455) 评论(0) 推荐(0) 编辑
摘要:C vs C++ C是面向过程的,C++是面向对象的,面向对象即是讲一些数据和函数绑定在一起。 对象(classes)的两种经典分类 Class without pointer members complex 拷贝都得一一复制(因为数据成员都包含在对象中了) Class with pointer m 阅读全文
posted @ 2021-10-26 21:36 zju_cxl 阅读(113) 评论(0) 推荐(0) 编辑
摘要:栈展开(stack unwinding)的定义 抛出异常时,将暂停当前函数的执行,开始查找匹配的 catch 子句。首先检查 throw 本身是否在 try 块内部,如果是,检查与该 try 相关的 catch 子句,看是否可以处理该异常。如果不能处理,就退出当前函数,并且释放当前函数的内存并销毁局 阅读全文
posted @ 2021-10-25 14:14 zju_cxl 阅读(208) 评论(0) 推荐(0) 编辑
摘要:开启ssh服务 进入菜单(Menu) → 首选项(Preferences) → Raspberry Pi Configuration → Interfaces。 将ssh开关打开 通过ssh命令登陆远端机器 // @前为用户名,@后为远端机器地址(可以是url),IP可通过ifconfig查看,或登 阅读全文
posted @ 2021-10-23 19:06 zju_cxl 阅读(318) 评论(0) 推荐(0) 编辑
摘要:树莓派系统下简单的设置开机自启动程序: 在要运行的程序的同级目录下新建一个脚本start.sh sudo nano start.sh ​ 脚本如下: #!/bin/sh cd /home/pi/Desktop/timer sudo ./timer 修改脚本文件权限 sudo chmod 777 /h 阅读全文
posted @ 2021-10-23 18:22 zju_cxl 阅读(952) 评论(0) 推荐(0) 编辑
摘要:概述 进程的基本操作接口: 进程创建:fork (spawn, vfork, clone) 进程执行:exec 进程间同步:wait 进程退出:exit/abort 进程创建:fork() fork()语义:为调用进程创建一个一模一样的新进程,fork后的两个进程均为独立进程(调用进程为父进程,新进 阅读全文
posted @ 2021-10-14 21:44 zju_cxl 阅读(190) 评论(0) 推荐(0) 编辑
摘要:概述 线程(thread),又被称为轻量级进程(Lightweight Process, LWP)是程序执行流的最小单位,也是调度的基本单位。 为什么需要线程? 创建进程的开销较大:包括了数据、代码、堆、栈等 进程的隔离性过强:进程间交互可以通过进程间通信(IPC),但开销较大 进程内部无法支持并行 阅读全文
posted @ 2021-10-13 21:12 zju_cxl 阅读(178) 评论(0) 推荐(0) 编辑
摘要:For some vectors b the equation Ax = b has solutions and for others it does not. Some vectors x are solutions to the equation Ax = 0 and some are not. To understand these equations we study the column space, nullspace, row space and left nullspace of the matrix A. 阅读全文
posted @ 2021-10-12 21:48 zju_cxl 阅读(577) 评论(0) 推荐(0) 编辑
摘要:A basis is a set of vectors, as few as possible, whose combinations produce all vectors in the space. The number of basis vectors for a space equals the dimension of that space 阅读全文
posted @ 2021-10-11 23:24 zju_cxl 阅读(939) 评论(0) 推荐(0) 编辑
摘要:We describe all solutions to Ax = b based on the free variables and special solutions encoded in the reduced form R. 阅读全文
posted @ 2021-10-10 15:20 zju_cxl 阅读(822) 评论(0) 推荐(0) 编辑
摘要:We apply the method of elimination to all matrices, invertible or not. Counting the pivots gives us the rank of the matrix. Further simplifying the matrix puts it in reduced row echelon form R and improves our description of the null space. 阅读全文
posted @ 2021-10-10 12:26 zju_cxl 阅读(1428) 评论(0) 推荐(0) 编辑
摘要:The column space of a matrix A tells us when the equation Ax = b will have a solution x. The null space of A tells us which values of x solve the equation Ax = 0. 阅读全文
posted @ 2021-10-09 23:08 zju_cxl 阅读(722) 评论(0) 推荐(0) 编辑
摘要:To account for row exchanges in Gaussian elimination, we include a permutation matrix P in the factorization PA = LU. Then we learn about vector spaces and subspaces; these are central to linear algebra. 阅读全文
posted @ 2021-10-09 21:41 zju_cxl 阅读(686) 评论(0) 推荐(0) 编辑
摘要:MIT - The Missing Semester of Your CS Education 课程笔记汇总,该课程介绍了一些实际开发所需要使用到的小东西。: The shell Shell Tools and Scripting Editors (Vim) Data Wrangling Comma 阅读全文
posted @ 2021-10-08 22:26 zju_cxl 阅读(426) 评论(0) 推荐(1) 编辑
摘要:This session explains inverses, transposes and permutation matrices. We also learn how elimination leads to a useful factorization A = LU and how hard a computer will work to invert a very large matrix. 阅读全文
posted @ 2021-10-07 21:52 zju_cxl 阅读(382) 评论(0) 推荐(0) 编辑
摘要:This lecture looks at matrix multiplication from five different points of view. We then learn how to find the inverse of a matrix using elimination, and why the Gauss-Jordan method works. 阅读全文
posted @ 2021-10-07 18:14 zju_cxl 阅读(435) 评论(0) 推荐(0) 编辑
摘要:This session introduces the method of elimination, an essential tool for working with matrices. The method follows a simple algorithm. To help make sense of material presented later, we describe this algorithm in terms of matrix multiplication. 阅读全文
posted @ 2021-10-07 16:41 zju_cxl 阅读(208) 评论(0) 推荐(0) 编辑
摘要:A major application of linear algebra is to solving systems of linear equations. This lecture presents three ways of thinking about these systems. The "row method" focuses on the individual equations, the "column method" focuses on combining the columns, and the "matrix method" is an even more compact and powerful way of describing systems of linear equations. 阅读全文
posted @ 2021-10-06 22:57 zju_cxl 阅读(290) 评论(0) 推荐(0) 编辑
摘要:概述 比例份额(proportional-share)调度程序(又称公平份额(fair-share)调度程序)。比例份额算法基于一个简单的想法:调度程序的最终目标,是确保每个工作获得一定比例的CPU时间,而不是优化周转时间和响应时间。 彩票调度(lottery scheduling)是比例份额调度程 阅读全文
posted @ 2021-10-06 16:38 zju_cxl 阅读(177) 评论(0) 推荐(0) 编辑
摘要:概述 1962年,Corbato首次提出多级反馈队列,应用于兼容时分共享系统(CTSS)。Corbato因在CTSS中的贡献和后来在Multics中的贡献,获得了ACM颁发的图灵奖(Turing Award)。该调度程序经过多年的一系列优化,出现在许多现代操作系统中。 多级反馈队列需要解决两方面的问 阅读全文
posted @ 2021-10-06 15:58 zju_cxl 阅读(667) 评论(0) 推荐(0) 编辑
摘要:/bin - 基本命令二进制文件 /sbin - 基本的系统二进制文件,通常是root运行的 /dev - 设备文件,通常是硬件设备接口文件 /etc - 主机特定的系统配置文件 /home - 系统用户的主目录 /lib - 系统软件通用库 /opt - 可选的应用软件 /sys - 包含系统的信 阅读全文
posted @ 2021-10-05 22:45 zju_cxl 阅读(136) 评论(0) 推荐(0) 编辑
摘要:修改键位映射 修改键位映射通常由在计算机上运行的软件实现。当某一个按键被按下,软件截获键盘发出的按键事件(keypress event)并使用另外一个事件取代。比如: 将 Caps Lock 映射为 Ctrl 或者 Escape:Caps Lock 使用了键盘上一个非常方便的位置而它的功能却很少被用 阅读全文
posted @ 2021-10-05 22:27 zju_cxl 阅读(131) 评论(0) 推荐(0) 编辑
摘要:熵 熵(Entropy) 度量了不确定性并可以用来决定密码的强度。 熵的单位是 bits(比特)。对于一个均匀分布的随机离散变量,熵等于 log_2(# of possibilities)。扔一次硬币的熵是1 bits,即log_2(2)。掷一次(六面)骰子的熵大约为2.58 bits,即log_2 阅读全文
posted @ 2021-10-04 19:58 zju_cxl 阅读(100) 评论(0) 推荐(0) 编辑
摘要:何谓“元”(meta): 大哉乾元,万物资始,乃统天。 --《彖》 道生一,一生二,二生三,三生万物。 -- 《道德经》 此处的元编程(metaprogramming)并不是C++的元编程魔法,而是关于流程的(即构建系统、代码测试以及依赖管理)。必须要指出的是,“元编程” 也有用于操作程序的程序” 阅读全文
posted @ 2021-10-03 15:11 zju_cxl 阅读(117) 评论(0) 推荐(0) 编辑
摘要:Debugging-调试 打印调试法与日志 “The most effective debugging tool is still careful thought, coupled with judiciously placed print statements” — Brian Kernighan 阅读全文
posted @ 2021-10-01 19:44 zju_cxl 阅读(131) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示