From 2728e37f6259904f28db68239381f8bd4b223247 Mon Sep 17 00:00:00 2001
From: ninglang
扇出系数的概念,计算
\(T_{cd}和T_{pd}\),为什么\(T_{cd}=0\)的时候,将无法信任电平?
-因为\(T_{cd}=0\),表面一旦高电平降低,那么电路进入无效区,这时候就需要重新,\(T_{cd}可以变大点\)
交流噪声容限(是指噪声信号是高频吗?)
TTL电源不允许大幅调整,不允许超过10%
TTL电路输入端通过电阻接地,电阻值R的大小直接影响电路所处的状态。
扇出系数的概念,计算
\(T_{cd}和T_{pd}\),为什么\(T_{cd}=0\)的时候,将无法信任电平?
+因为\(T_{cd}=0\),表面一旦高电平降低,那么电路进入无效区,这时候就需要重新,\(T_{cd}可以变大点\)
交流噪声容限(是指噪声信号是高频吗?)
TTL电源不允许大幅调整,不允许超过10%
TTL电路输入端通过电阻接地,电阻值R的大小直接影响电路所处的状态。
经过我们小组接近三个星期的努力,没错!它来了,毛概实践课的成果😁,它可能不是那么优秀,但的确是我们努力的成果
+ + + +看看我们的大合照😁:
+ +哈哈哈,还希望大家不要吐槽我的眯眯眼😛,当时光线太强,实在睁不开眼,不是故意的哈😜。我的ps技术也不是很好,只能做成这样,还希望大家多多担待
+ +这次实践课给我留下印象还是很十分的深刻的,疫情期间,我这边(一个人在学校)要是没有室友们的帮助,估计是完成不了的,视频剪辑的时候,我和邵明禹哥哥把pr工程文件传来传去(每次都是2~3个G),邵明禹哥哥吐槽了n多次网络问题,我这边修改视频的时候,也不知道怎么回事,pr崩了5、6次,还把我的素材直接全部删除了😭,找也找不回,最后只能重新剪辑。
+ +这次大家没能全员出镜,可以算得上团队火力没有全开吧,但是我个人感觉还是不错的,因为在刚开始选题的时候,就想要做一些有思想深度的视频,疫情期间,多个人不能见面的情况下,从个体的角度入手,个体和个体之间用一些手段连接,去拔高整个实践课的深度,我认为是可行的。
+ +总之,十分感谢那些和我一起走过这段道路的小伙伴,谢谢你们的付出,也谢谢那些帮助我们完成实践课的各位同学,就如视频所说,你们是冬天里的暖阳😉😉😉😉。
+]]>经过我们小组接近三个星期的努力,没错!它来了,毛概实践课的成果😁,它可能不是那么优秀,但的确是我们努力的成果
- - - -看看我们的大合照😁:
- -哈哈哈,还希望大家不要吐槽我的眯眯眼😛,当时光线太强,实在睁不开眼,不是故意的哈😜。我的ps技术也不是很好,只能做成这样,还希望大家多多担待
- -这次实践课给我留下印象还是很十分的深刻的,疫情期间,我这边(一个人在学校)要是没有室友们的帮助,估计是完成不了的,视频剪辑的时候,我和邵明禹哥哥把pr工程文件传来传去(每次都是2~3个G),邵明禹哥哥吐槽了n多次网络问题,我这边修改视频的时候,也不知道怎么回事,pr崩了5、6次,还把我的素材直接全部删除了😭,找也找不回,最后只能重新剪辑。
- -这次大家没能全员出镜,可以算得上团队火力没有全开吧,但是我个人感觉还是不错的,因为在刚开始选题的时候,就想要做一些有思想深度的视频,疫情期间,多个人不能见面的情况下,从个体的角度入手,个体和个体之间用一些手段连接,去拔高整个实践课的深度,我认为是可行的。
- -总之,十分感谢那些和我一起走过这段道路的小伙伴,谢谢你们的付出,也谢谢那些帮助我们完成实践课的各位同学,就如视频所说,你们是冬天里的暖阳😉😉😉😉。
-]]>Pointer point the constant:
-const char *name = "chen" //statement a pointer point a constant |
because using const
,so the Pointer can't change variable
-in the address which it point ,so the statement as follows is incorrect
-:
name[3]='a' //incorrect,pointer "name" can't change constant |
but name is a normal pointer ,so it could change the items it -point,statement as follows are correct:
-name = 'zhang' //change the address the pointer point ,correct |
Also,Even you have changed your string you point ,you still can't -change the string, Please somebody tell me why ,Thank you !
-name[3]='y' //incorrect,but I don't know why! |
Constant Pointer
-A pointer can't change the address it point ,but it still can change -the content it point,example:
-char *const name ="chen"; //define a constant pointer |
Constant Pointer points to constant
-A constant pointer points a constant ,the address pointer point is -unchangeable and the content of address is unchangeable,example :
-const char *const name="chen"; //define a constant pointer point the constant |
Const
-Using a const to define a integer
variable ,the keyword
-omitted is acceptable the definition as following is same:
const int LIMITS = 100; |
formal parameters also can be describe by const
,for
-example:
int MAX(const int*ptr) |
the method promise the array can't be changed ,only be read.
|
in fact , you see the definition of Pointer array ,It is like as -follows:
-char *arr[3]={'abc','def','ghi'}; |
char *pChar1 = 'abc',*pChar2 = 'def',*pChar3='ghi' |
At the same time :
-arr[0] = pChar; //the arr first element is the pointer pChar |
and the pChar
is pointing the 'abc''s first element 'a',
-so we can use the code to print 'a'
printf("%c",pChar[0]); //print 'a' |
int fun(int x,int y); //normal function return integers |
This function declaration is normal ,but There are some difference in -next function declaration
-int *fun(int x,int y) |
This function declaration is pointer function ,the return is a
-pointer to int
,This is an address
To state a pointer to function ,which is a Pointer pointing function -.declaration form:
-int (*fun)(int x,int y) |
There are two ways to assign values to pointer variables
-fun = &function; |
There are also two ways to call pointer to function
-x=(*fun)(); |
Example:
-
|
operation new
can get a space from heap and return the
-pointer to point the first address of the memory,and delete
-can free the space
int *p; |
new
assign space for multidimensional array:
int i = 3; |
new
assign space with initial value:
|
2023年南京大学电子科学与工程学院优秀大学生夏令营 +- 南京大学 - 保研论坛-保研经验分享 - Powered by Discuz!
+2023年南京大学电子科学与工程学院优秀大学生夏令营报名通知
+ +Pointer point the constant:
+const char *name = "chen" //statement a pointer point a constant |
because using const
,so the Pointer can't change variable
+in the address which it point ,so the statement as follows is incorrect
+:
name[3]='a' //incorrect,pointer "name" can't change constant |
but name is a normal pointer ,so it could change the items it +point,statement as follows are correct:
+name = 'zhang' //change the address the pointer point ,correct |
Also,Even you have changed your string you point ,you still can't +change the string, Please somebody tell me why ,Thank you !
+name[3]='y' //incorrect,but I don't know why! |
Constant Pointer
+A pointer can't change the address it point ,but it still can change +the content it point,example:
+char *const name ="chen"; //define a constant pointer |
Constant Pointer points to constant
+A constant pointer points a constant ,the address pointer point is +unchangeable and the content of address is unchangeable,example :
+const char *const name="chen"; //define a constant pointer point the constant |
Const
+Using a const to define a integer
variable ,the keyword
+omitted is acceptable the definition as following is same:
const int LIMITS = 100; |
formal parameters also can be describe by const
,for
+example:
int MAX(const int*ptr) |
the method promise the array can't be changed ,only be read.
|
in fact , you see the definition of Pointer array ,It is like as +follows:
+char *arr[3]={'abc','def','ghi'}; |
char *pChar1 = 'abc',*pChar2 = 'def',*pChar3='ghi' |
At the same time :
+arr[0] = pChar; //the arr first element is the pointer pChar |
and the pChar
is pointing the 'abc''s first element 'a',
+so we can use the code to print 'a'
printf("%c",pChar[0]); //print 'a' |
int fun(int x,int y); //normal function return integers |
This function declaration is normal ,but There are some difference in +next function declaration
+int *fun(int x,int y) |
This function declaration is pointer function ,the return is a
+pointer to int
,This is an address
To state a pointer to function ,which is a Pointer pointing function +.declaration form:
+int (*fun)(int x,int y) |
There are two ways to assign values to pointer variables
+fun = &function; |
There are also two ways to call pointer to function
+x=(*fun)(); |
Example:
+
|
operation new
can get a space from heap and return the
+pointer to point the first address of the memory,and delete
+can free the space
int *p; |
new
assign space for multidimensional array:
int i = 3; |
new
assign space with initial value:
|
项目使用树莓派4B,具体流程如下
+SSH
的文件,无后缀it
删除)和VNCdeb
镜像源deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main contrib non-free rpi |
修改树莓派pip源。请记住,/etc/pip.conf
,里面默认是
[global] |
请不要修改,这个网址专为树莓定制
+pip永久换源(win和linux通用)
+pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple |
linux里面的永久源的地址为/home/pi/.config/pip/pip.conf
,需要修改可以直接编辑
也可以这样换源
+mkdir ~/.pip |
[global] |
这里的trusted-host
只有当链接不是https时需要,即将阿里云的网站改为
extra-index-url= https://mirrors.aliyun.com/pypi/simple |
pip3 install ...whl
即可成功2023年南京大学电子科学与工程学院优秀大学生夏令营 -- 南京大学 - 保研论坛-保研经验分享 - Powered by Discuz!
-2023年南京大学电子科学与工程学院优秀大学生夏令营报名通知
- -安装多线程工具axel
apt-get install axel |
下载方式
+axel 参数 文件下载地址 |
项目使用树莓派4B,具体流程如下
-SSH
的文件,无后缀it
删除)和VNCdeb
镜像源deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main contrib non-free rpi |
修改树莓派pip源。请记住,/etc/pip.conf
,里面默认是
[global] |
请不要修改,这个网址专为树莓定制
-pip永久换源(win和linux通用)
-pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple |
linux里面的永久源的地址为/home/pi/.config/pip/pip.conf
,需要修改可以直接编辑
也可以这样换源
-mkdir ~/.pip |
[global] |
这里的trusted-host
只有当链接不是https时需要,即将阿里云的网站改为
extra-index-url= https://mirrors.aliyun.com/pypi/simple |
pip3 install ...whl
即可成功安装多线程工具axel
apt-get install axel |
下载方式
-axel 参数 文件下载地址 |
计算即可
题设:n个评价对象,m个评价指标观测值为 \[ -a_{ij}\quad(i=1,2,...n;j=1,2,..,m) -\]
-\[ -\begin{bmatrix}a_{11} & a_{12}&...&a_{1,m}\\\\a_{21} & -a_{22}&...&a_{2m}\\ \vdots&...&...&\\a_{n1} & -a_{n2}&...&a_{nm}\end{bmatrix} -\]
-\[ -\mu_j=\frac{1}{n}\sum_{i=1}^{n}a_{ij}\qquad -s_j=\sqrt{\frac{1}{n}(a_{ij}-\mu_j)^2}\\ -\]
-\[ -\begin{bmatrix}a_{11}\\a_{21}\\\vdots\\a_{n1}\end{bmatrix}\cdots\begin{bmatrix}a_{1m}\\a_{2m}\\\vdots\\a_{nm}\end{bmatrix}\longrightarrow\begin{bmatrix}\mu_1&\cdots\mu_m\end{bmatrix}\longrightarrow -\begin{bmatrix}s_1&\cdots&s_m\end{bmatrix}\\ -\]
-\[ -w_j=\frac{s_j}{\sum_{k=1}^{m}s_k}(j=1,2,3,4...m)\\ -\]
-\[ -\begin{bmatrix}w_1& w_2&\cdots w_m\end{bmatrix} -\]
-\[ -r_{j}=\max _{1 \leq i<k \leq n}\left\{\left|a_{i j}-a_{k -j}\right|\right\}(j=1,2, \cdots, m)\\ -\]
-\[ -\max_{every -element}\begin{bmatrix}rand(a_{i1}-a_{k1})&\cdots&rand(a_{ij}-a_{kj})\end{bmatrix}\longrightarrow\begin{bmatrix}r_1&r_2&\cdots&r_m\end{bmatrix} -\]
-所以第\(j\)项指标的权重系数为 \[ -w_{j}=\frac{s_{j}}{\sum_{l=1}^{m} r_{k}}(j=1,2, \cdots, m) -\]
-特征比重:
-在\[\mu_j=\sum_{i=1}^{n} a_{i -j}>0\],第\(j\)项指标的特征比重为 \[ -p_{i j}=\frac{a_{i j}}{\sum_{i=1}^{n} a_{i j}}(i=1,2, \cdots, n ; j=1,2, -\cdots, m) -\]
-\[ -\begin{bmatrix}a_{11}\\a_{21}\\\vdots\\a_{n1}\end{bmatrix}\cdots\begin{bmatrix}a_{1m}\\a_{2m}\\\vdots\\a_{nm}\end{bmatrix}\longrightarrow\begin{bmatrix}\mu_1&\cdots\mu_m\end{bmatrix}\longrightarrow\begin{bmatrix}p_{11}&\cdots&p_{1m}\\p_{21}&\cdots&p_{2m}\\\vdots&\cdots&\\p_{n1}&\cdots&p_{nm}\end{bmatrix} -\]
-第\(j\)项的熵值为: \[ -e_{j}=-\frac{1}{\ln n} \sum_{i=1}^{n} p_{i j} \ln p_{i j}(j=1,2, \cdots, -m) -\]
-\[ -\begin{bmatrix}p_{11}&\cdots&p_{1m}\\p_{21}&\cdots&p_{2m}\\\vdots&\cdots&\\p_{n1}&\cdots&p_{nm}\end{bmatrix}\longrightarrow\begin{bmatrix}e_1&\cdots&e_m\end{bmatrix} -\]
-不难看出,如果第\(j\)项指标的观测值差异越大,熵值越小;反之,熵值越大。
-计算第\(j\)项指标的差异系数为 \[ -g_{j}=1-e_{j}(j=1,2, \cdots, m) -\] 如果第项指标的观测值差异越大,则差异系数\(g\)就越大,第\(j\)项指标也就越重要。
-第\(j\)项的权重系数为 \[ -w_{j}=\frac{g_{j}}{\sum_{k=1}^{m} g_{k}}(j=1,2, \cdots, m) -\] 参考文章:
- ]]>1.更新源
-apt update |
2.安装openssh-server
-apt install openssh-server |
对于Alpine-linux,则用下面命令安装
-apk add --update openssh-server |
还需安装openrc
-apk add openrc |
设置/etc/ssh/sshd_config
追加如下指令
--- PermitRootLogin yes
:star:先换源
-cd /etc/apt |
生成source文件
-touch sources.list |
写入源
-echo "deb http://mirrors.ustc.edu.cn/debian stable main contrib non-free" >>sources.list |
删除缓存
-rm -fR /var/lib/apt/lists/* |
在更新
-apt-get update |
while true; do |
题设:n个评价对象,m个评价指标观测值为 \[ +a_{ij}\quad(i=1,2,...n;j=1,2,..,m) +\]
+\[ +\begin{bmatrix}a_{11} & a_{12}&...&a_{1,m}\\\\a_{21} & +a_{22}&...&a_{2m}\\ \vdots&...&...&\\a_{n1} & +a_{n2}&...&a_{nm}\end{bmatrix} +\]
+\[ +\mu_j=\frac{1}{n}\sum_{i=1}^{n}a_{ij}\qquad +s_j=\sqrt{\frac{1}{n}(a_{ij}-\mu_j)^2}\\ +\]
+\[ +\begin{bmatrix}a_{11}\\a_{21}\\\vdots\\a_{n1}\end{bmatrix}\cdots\begin{bmatrix}a_{1m}\\a_{2m}\\\vdots\\a_{nm}\end{bmatrix}\longrightarrow\begin{bmatrix}\mu_1&\cdots\mu_m\end{bmatrix}\longrightarrow +\begin{bmatrix}s_1&\cdots&s_m\end{bmatrix}\\ +\]
+\[ +w_j=\frac{s_j}{\sum_{k=1}^{m}s_k}(j=1,2,3,4...m)\\ +\]
+\[ +\begin{bmatrix}w_1& w_2&\cdots w_m\end{bmatrix} +\]
+\[ +r_{j}=\max _{1 \leq i<k \leq n}\left\{\left|a_{i j}-a_{k +j}\right|\right\}(j=1,2, \cdots, m)\\ +\]
+\[ +\max_{every +element}\begin{bmatrix}rand(a_{i1}-a_{k1})&\cdots&rand(a_{ij}-a_{kj})\end{bmatrix}\longrightarrow\begin{bmatrix}r_1&r_2&\cdots&r_m\end{bmatrix} +\]
+所以第\(j\)项指标的权重系数为 \[ +w_{j}=\frac{s_{j}}{\sum_{l=1}^{m} r_{k}}(j=1,2, \cdots, m) +\]
+特征比重:
+在\[\mu_j=\sum_{i=1}^{n} a_{i +j}>0\],第\(j\)项指标的特征比重为 \[ +p_{i j}=\frac{a_{i j}}{\sum_{i=1}^{n} a_{i j}}(i=1,2, \cdots, n ; j=1,2, +\cdots, m) +\]
+\[ +\begin{bmatrix}a_{11}\\a_{21}\\\vdots\\a_{n1}\end{bmatrix}\cdots\begin{bmatrix}a_{1m}\\a_{2m}\\\vdots\\a_{nm}\end{bmatrix}\longrightarrow\begin{bmatrix}\mu_1&\cdots\mu_m\end{bmatrix}\longrightarrow\begin{bmatrix}p_{11}&\cdots&p_{1m}\\p_{21}&\cdots&p_{2m}\\\vdots&\cdots&\\p_{n1}&\cdots&p_{nm}\end{bmatrix} +\]
+第\(j\)项的熵值为: \[ +e_{j}=-\frac{1}{\ln n} \sum_{i=1}^{n} p_{i j} \ln p_{i j}(j=1,2, \cdots, +m) +\]
+\[ +\begin{bmatrix}p_{11}&\cdots&p_{1m}\\p_{21}&\cdots&p_{2m}\\\vdots&\cdots&\\p_{n1}&\cdots&p_{nm}\end{bmatrix}\longrightarrow\begin{bmatrix}e_1&\cdots&e_m\end{bmatrix} +\]
+不难看出,如果第\(j\)项指标的观测值差异越大,熵值越小;反之,熵值越大。
+计算第\(j\)项指标的差异系数为 \[ +g_{j}=1-e_{j}(j=1,2, \cdots, m) +\] 如果第项指标的观测值差异越大,则差异系数\(g\)就越大,第\(j\)项指标也就越重要。
+第\(j\)项的权重系数为 \[ +w_{j}=\frac{g_{j}}{\sum_{k=1}^{m} g_{k}}(j=1,2, \cdots, m) +\] 参考文章:
+ ]]>if [ -f /root/script/ping.sh ]; then |
更新一下
rc-update add local |
1.更新源
+apt update |
2.安装openssh-server
+apt install openssh-server |
对于Alpine-linux,则用下面命令安装
+apk add --update openssh-server |
还需安装openrc
+apk add openrc |
设置/etc/ssh/sshd_config
追加如下指令
+-- PermitRootLogin yes
:star:先换源
+cd /etc/apt |
生成source文件
+touch sources.list |
写入源
+echo "deb http://mirrors.ustc.edu.cn/debian stable main contrib non-free" >>sources.list |
删除缓存
+rm -fR /var/lib/apt/lists/* |
在更新
+apt-get update |
while true; do |
3.进入onlyoffice修改etc/onlyoffice/documentserver/default.json
,修改如下
"rejectUnauthorized": false |
重启docker
+]]> +下载seafileltd/seafile:latest
镜像
在容器设置中挂载目录
+/shared
如下环境变量设置账号和密码
+SEAFILE_ADMIN_EMAIL
SEAFILE_ADMIN_PASSWORD
因为docker中的ipv6如果不往外界发出信号,路由是无法知道该容器的ipv6地址,所以需要安装ping工具每隔一段时间不断发包,表示心跳
+1.更新apt包
+apt update |
2.安装iputils-ping
+apt-get install -y iputils-ping |
3.测试ping百度
+ping -6 -c 1 www.baidu.com |
3.编写/root/script/ping.sh
while true; do |
4.修改ping.sh为可执行文件
+chmod +x /root/script/ping.sh |
5.测试脚本执行情况:如下执行成功
+6.修改自启动脚本
在/root/.bashrc
中追加
if [ -f /root/script/ping.sh ]; then |
一般而言,由于seafile不自动开bash,因此,建议将上述加入.bashrc加入到seafile-server-latest/seafile.sh
中,添加到echo "Seafile server started"
的前面.
1.创建/etc/nginx/conf.d/seafile.conf
,内容如下
server { |
2.测试文件格式正常
+nginx -t |
重启docker容器
+修改SERVICE_URL
和FILE_SERVER_ROOT
SERVICE_URL
:http://seafile.ninglang.fun
FILE_SERVER_ROOT
:http://seafile.ninglang.fun/seafhttp
设置/conf/seafdav.conf
中为
enabled = true |
在手机端设置
+网络地址
:seafile.ninglang.fun/seafdav
账号密码如实填写
]]>下载seafileltd/seafile:latest
镜像
在容器设置中挂载目录
-/shared
如下环境变量设置账号和密码
-SEAFILE_ADMIN_EMAIL
SEAFILE_ADMIN_PASSWORD
因为docker中的ipv6如果不往外界发出信号,路由是无法知道该容器的ipv6地址,所以需要安装ping工具每隔一段时间不断发包,表示心跳
-1.更新apt包
-apt update |
2.安装iputils-ping
-apt-get install -y iputils-ping |
3.测试ping百度
-ping -6 -c 1 www.baidu.com |
3.编写/root/script/ping.sh
while true; do |
4.修改ping.sh为可执行文件
-chmod +x /root/script/ping.sh |
5.测试脚本执行情况:如下执行成功
-6.修改自启动脚本
在/root/.bashrc
中追加
if [ -f /root/script/ping.sh ]; then |
一般而言,由于seafile不自动开bash,因此,建议将上述加入.bashrc加入到seafile-server-latest/seafile.sh
中,添加到echo "Seafile server started"
的前面.
1.创建/etc/nginx/conf.d/seafile.conf
,内容如下
server { |
2.测试文件格式正常
-nginx -t |
重启docker容器
-修改SERVICE_URL
和FILE_SERVER_ROOT
SERVICE_URL
:http://seafile.ninglang.fun
FILE_SERVER_ROOT
:http://seafile.ninglang.fun/seafhttp
设置/conf/seafdav.conf
中为
enabled = true |
在手机端设置
-网络地址
:seafile.ninglang.fun/seafdav
账号密码如实填写
-]]>以TSP
问题为例,遗传算法的流程图
首先创建最初种群
-配置环境
-import numpy as np |
计算适应度
-def build_dist_mat(input_list): |
创建最初种群
-# 城市坐标 |
基因配置
-gene_len = config.city_num #基因长度,就是城市的数量 |
数组深拷贝
-def copy_list(old_arr: [int]): |
种群中的一个个体,一个个体就是TSP的一个路线
-class Individual: |
GA算法
-class Ga: |
以TSP
问题为例,遗传算法的流程图
首先创建最初种群
+配置环境
+import numpy as np |
计算适应度
+def build_dist_mat(input_list): |
创建最初种群
+# 城市坐标 |
基因配置
+gene_len = config.city_num #基因长度,就是城市的数量 |
数组深拷贝
+def copy_list(old_arr: [int]): |
种群中的一个个体,一个个体就是TSP的一个路线
+class Individual: |
GA算法
+class Ga: |