概述 python 三目运算符 背景 最近看代码, 有人挺喜欢用这个东西 我虽然不喜欢, 但还是学学吧 我觉得这样虽然显得简洁, 但读起来并不是最友好的 简单记一下, 怕以后忘了 水一篇 环境 python 3.7 类型 总结类 1. 语法 概述 语法 例子 # 语法 # py 式的变量命名, 我觉 ...
分类:
编程语言 时间:
2021-04-23 12:05:15
阅读次数:
0
powershell快捷打开方式 powershell打开:在任意目录下,按住shift,然后右键,选择“在此处打开powershell”即可 常用dos命令 #盘符切换 d:\ ...
分类:
其他好文 时间:
2021-04-23 12:05:00
阅读次数:
0
1、测试1 [root@centos7 test2]# i=0 [root@centos7 test2]# max=5 [root@centos7 test2]# while((i<max));do echo $i;((i++));done 0 1 2 3 4 ...
分类:
系统相关 时间:
2021-04-23 12:03:54
阅读次数:
0
一、递归函数 看如下递归函数: 1 int f(int n){ 2 if(n == 1){ 3 return 1; 4 } 5 return f(n - 1) + 1; 6 } 客户端调用该递归函数时传入n = 5, 返回的函数值为5。那么它的调用堆栈(call stack)是怎么样的?又是如何计算 ...
分类:
其他好文 时间:
2021-04-23 12:01:13
阅读次数:
0
1、截屏 adb shell screencap -p /sdcard/a.png 2、录屏 adb shell screenrecord /sdcard/a.mp4 ...
分类:
数据库 时间:
2021-04-23 11:57:08
阅读次数:
0
关键字:static 因为java不像c++向下兼容c,有面向过程的部分,java中已经没有全局变量,java中static是在静态池,但同样可理解为全局变量,并且根据权限划分,可以作为私有的全局变量 1.static:静态的 2.static可以用来修饰:属性、方法、代码块、内部类 3.使用sta ...
分类:
编程语言 时间:
2021-04-23 11:53:36
阅读次数:
0
1、测试1 [root@centos7 test2]# ls a.txt [root@centos7 test2]# if [ -e a.txt ]; then echo "exist";else echo "no nxist"; fi exist [root@centos7 test2]# if ...
分类:
系统相关 时间:
2021-04-23 11:53:02
阅读次数:
0
str 用合理的方式转换为字符串 print(str("hello,\nworld!")) 'hello, world!' repr 用合法的python表达式表示 print(repr("hello,\nworld!"))'hello,\nworld!' 长字符串 要表示很长的字符串可以用三引号( ...
分类:
编程语言 时间:
2021-04-22 16:36:02
阅读次数:
0
简化Simulink的建模与模型重构 模型重构 Simulink作为汽车和自动化领域中经典的模型工程必备工具,不管是专业的汽车控制器的开发还是自动化控制的专业应用编程,都会使用到Simulink进行图形化编程、代码生成等等。为了实现这些,一个布局雅观、结构清晰、可读性高、容易理解又不易出错的模型至关 ...
分类:
其他好文 时间:
2021-04-22 16:21:58
阅读次数:
0
linux shell脚本中流程控制语句 if、for、while、case 1、if语句 [root@centos7 test2]# ls test.sh [root@centos7 test2]# pwd /home/test2 [root@centos7 test2]# cat test.sh ...
分类:
系统相关 时间:
2021-04-22 16:20:40
阅读次数:
0