#alias method/别名算法 ##前言 一个在oi/acm比较少见的算法吧。。 ##从问题开始QAQ 有$N(N>1)$个物品,有属性$d_i$,现在要平均放进$N-1$个盒子里,每个盒子最多存在两个物品,物品可以分割。 ##当N=2时。 显然两个全放进一个盒子里就行了。 ##当N>2时。 ...
分类:
编程语言 时间:
2021-04-24 13:15:51
阅读次数:
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
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
1.查看系统自带别名 2.设置别名方式,这里拿网卡路径设置 alias cdnet='cd /etc/sysconfig/network-scripts/' 3.要永久生效,需要编辑家目录的.bashrc文件 4.编辑完成后,保存退出,使用source .bashrc命令即可立即生效。 ...
分类:
其他好文 时间:
2021-04-22 15:40:49
阅读次数:
0
ls = [[] for i in range(7)] print('ls==', ls) for k in range(1, 7): # 1-9 test = [i for i in range(k)] ls[k] = test print('ls==', ls) 运行结果: ...
分类:
编程语言 时间:
2021-04-21 11:59:58
阅读次数:
0
查看所有用户任务计划 cat /etc/passwd | cut -f 1 -d : |xargs -I {} crontab -l -u {} 查看设备的挂载情况 lsblk lsblk -f 查看rhel或centos版本 cat /etc/redhat-release 查看最后登陆信息 las ...
分类:
系统相关 时间:
2021-04-20 15:45:36
阅读次数:
0
命令基本语法 功能描述 help 显示所有操作命令 ls path [watch] 显示所有操作命令 ls path [watch] 查看当前节点数据并能看到更新次数等数据 create 普通创建, -s 含有序列, -e 临时(重启或者超时消失) get path [watch] 获得节点的值 s ...
分类:
其他好文 时间:
2021-04-20 15:33:29
阅读次数:
0
在/etc/profile.d目录里下新建 shell脚本 (设置alias别名命令的功能) 让新建的别名生效 设置完成后之际可以使用别名 gj 命令 执行poweroff一样效果的 ...
分类:
其他好文 时间:
2021-04-20 14:33:22
阅读次数:
0
1. Binder的系统日志文件 # ps -A | grep suspend system 699 1 2184444 4564 binder_ioctl_write_read 0 S android.system.suspend@1.0-service # ls /proc/699/fd -l ...
分类:
其他好文 时间:
2021-04-19 15:59:18
阅读次数:
0
pwd,打印当前目录 ls:List information about the FILEs (the current directory by default) -a/--all -d/--directory dir -a 进入如camera的目录后运行dir、ls会卡住(可以ctrl+c退出)。 ...
分类:
移动开发 时间:
2021-04-16 12:10:03
阅读次数:
0