码迷,mamicode.com
首页 >  
搜索关键字:while True    ( 51585个结果
shell编程基础二
一、流程控制 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源码 commit阶段详解点击进入React源码调试仓库。当render阶段完成后,意味着在内存中构建的workInProgress树所有更新工作已经完成,这包括树中fiber节点的更新、diff、effectTag的标记、effectList的收集。此时workInProgress树的完 ...
分类:其他好文   时间:2021-02-27 13:21:37    阅读次数:0
python常用字符串功能
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
题目要求 提示用户输入网卡的名字,然后我们用脚本输出网卡的ip,需要考虑下面问题: 1. 输入的字符不符合网卡名字规范,怎么应对。 2. 名字符合规范,但是根本就没有这个网卡又怎么应对。 参考答案 #!/bin/bash ip add |awk -F ': ' '$1 ~ "^[1-9]" {pri ...
分类:其他好文   时间:2021-02-26 13:34:50    阅读次数:0
使用串口绘制实时曲线 —— SerialChart
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
107. Binary Tree Level Order Traversal II
问题: 给定二叉树,进行层序遍历,从底层向上输出。 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
Java随机减法题,单分支的应用实例
/*每次产生5个随机减法算术题,提示用户输入答案,并判断是否正确,最后显示正确答案以及答题时间涉及知识点:1.随机数的生成方法Math.random()2.条件分支语句if3.获取时间System.currentTimeMillis(),4.三元运算符代替if5.String 的巧妙使用 */pac ...
分类:编程语言   时间:2021-02-25 11:58:49    阅读次数:0
在DirectX12中使用blend
我们只需要为透明的object设置一个新的pipelineStateObject即可。和不透明的object相比,就是额外设置了blend state: D3D12_RENDER_TARGET_BLEND_DESC blendDesc; blendDesc.BlendEnable = true; b ...
分类:其他好文   时间:2021-02-24 13:22:08    阅读次数:0
shell_exec()和getenv()
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
51585条   上一页 1 ... 52 53 54 55 56 ... 5159 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!