一、流程控制 while循环:只要条件满足一直循环 read -p "请输入一个数字:" white_data while [ ${white_data} -lt 20 ] do echo ${white_data} white_data=$((white_data + 1)) done until ...
分类:
系统相关 时间:
2021-02-27 13:22:57
阅读次数:
0
React源码 commit阶段详解点击进入React源码调试仓库。当render阶段完成后,意味着在内存中构建的workInProgress树所有更新工作已经完成,这包括树中fiber节点的更新、diff、effectTag的标记、effectList的收集。此时workInProgress树的完 ...
分类:
其他好文 时间:
2021-02-27 13:21:37
阅读次数:
0
2.25 python字符串(13个) 1.以XX开头 (startswith()) v1="我爱我的祖国" result = v1.startswith("我") #判断是否以“我”开头,如果是返回"true" print(result) #true #例 v1=input("请输入户籍所在地") ...
分类:
编程语言 时间:
2021-02-27 13:13:22
阅读次数:
0
题目要求 用shell实现,把一个文本文档中只有一个数字的行给打印出来。 参考答案 #!/bin/bash while read line do n=`echo $line |sed 's/[^0-9]//g'|wc -L` if [ $n -eq 1 ] then echo $line fi do ...
分类:
其他好文 时间:
2021-02-27 13:00:32
阅读次数:
0
题目要求 提示用户输入网卡的名字,然后我们用脚本输出网卡的ip,需要考虑下面问题: 1. 输入的字符不符合网卡名字规范,怎么应对。 2. 名字符合规范,但是根本就没有这个网卡又怎么应对。 参考答案 #!/bin/bash ip add |awk -F ': ' '$1 ~ "^[1-9]" {pri ...
分类:
其他好文 时间:
2021-02-26 13:34:50
阅读次数:
0
https://www.cnblogs.com/qiyuexin/p/7067646.html 2. 串口程序 while(1){ if(++x>=180){ y = 90; x = 0; } if(x>=90) y++; else y--; z = sin(x*Pi/90); p = cos(x* ...
分类:
其他好文 时间:
2021-02-26 13:03:26
阅读次数:
0
问题: 给定二叉树,进行层序遍历,从底层向上输出。 Example 1: Input: root = [3,9,20,null,null,15,7] Output: [[15,7],[9,20],[3]] Example 2: Input: root = [1] Output: [[1]] Exam ...
分类:
其他好文 时间:
2021-02-26 12:54:45
阅读次数:
0
/*每次产生5个随机减法算术题,提示用户输入答案,并判断是否正确,最后显示正确答案以及答题时间涉及知识点:1.随机数的生成方法Math.random()2.条件分支语句if3.获取时间System.currentTimeMillis(),4.三元运算符代替if5.String 的巧妙使用 */pac ...
分类:
编程语言 时间:
2021-02-25 11:58:49
阅读次数:
0
我们只需要为透明的object设置一个新的pipelineStateObject即可。和不透明的object相比,就是额外设置了blend state: D3D12_RENDER_TARGET_BLEND_DESC blendDesc; blendDesc.BlendEnable = true; b ...
分类:
其他好文 时间:
2021-02-24 13:22:08
阅读次数:
0
stop(); $t2 = new Bd_Timer(true); // sleep(1); for ($i=0; $i stop(); var_dump($t1time, $t2time); int(439365) int(11) 都可以用来获取环境变量, 但是后者更加省时间和 cpu. ...
分类:
系统相关 时间:
2021-02-24 13:09:38
阅读次数:
0