django在创建项目时自动在应用下的创建了test.py,这个py文件可以作为测试文件;也可以在应用下手动创建一个py测试文件。无论哪种方式,都需要提前书写以下代码: from django.test import TestCase # test.py中无需手动导入,手动创建的测试文件需导入 im ...
分类:
其他好文 时间:
2021-04-23 11:51:09
阅读次数:
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 协程:实现多任务的另一种方式; 3 单线程的并发,又称微线程; 4 一种用户态的轻量级线程 5 6 特性: 7 对于协程来说,程序员就是上帝,你想让她执行到哪里,他就执行到哪里--实现任务的任意切换 8 原理:能够保留上一次调用的状态(生成器也有这个功能) 9 意义:线程间切换需耗时 ...
分类:
编程语言 时间:
2021-04-22 16:15:42
阅读次数:
0
将设备连接网线, 登录路由器,查看设备IP 打开Xshell进行连接 用户名:root 密码:fa 连接成功 执行 apt-get install xrdp apt-get install vnc4server tightvncserver reboot 启动xrdp #/etc/init.d/xr ...
分类:
其他好文 时间:
2021-04-22 16:12:52
阅读次数:
0
1、read从键盘读入 [root@centos7 test]# echo $a [root@centos7 test]# read a 123456 [root@centos7 test]# echo $a 123456 2、-p 参数 加入提示 [root@centos7 test]# unse ...
分类:
系统相关 时间:
2021-04-22 15:41:37
阅读次数:
0
开机会启动许多程序。它们在Windows叫做"服务"(service),在Linux就叫做"守护进程"(daemon)。 最高权限账户为 root,可以操作一切! 关机指令为:shutdown ; sync 将数据由内存同步到硬盘中。shutdown 关机指令,你可以man shutdown 来看一 ...
分类:
系统相关 时间:
2021-04-22 15:15:12
阅读次数:
0
很多服务器都会多块盘或者做了Raid的多个虚拟磁盘,而安装xenserver后,他只会默认挂载第一快盘,也就是安装xenServer系统的那块。 那剩余的其他盘,怎么挂载上去做虚拟机的存储用呢?或者后期新增一块磁盘该如何操作呢? 1、用命令查看下自己的host-uuid [root@xenserve ...
分类:
其他好文 时间:
2021-04-21 12:44:08
阅读次数:
0
在/root/init.rc中添加下面内容, 开机就会执行/system/bin/boot-complete-script.sh脚本 service boot_complete_script /system/bin/boot-complete-script.sh class main oneshot ...
分类:
移动开发 时间:
2021-04-21 12:38:11
阅读次数:
0
环境: 服务器 CentOS6.7 + git(version 1.7.1) 客户端 Windows7 + git(version 2.8.4.windows.1) 1.安装 Git #yum install -y git 安装完后,查看 Git 版本 [root@localhost ~]# git ...
分类:
系统相关 时间:
2021-04-21 12:29:49
阅读次数:
0
作用:passwd主要用来修改用户的登录密码 用法: passwd [选项...] <帐号名称> 主要选项: -k, --keep-tokens 保持身份验证令牌不过期 -d, --delete 删除已命名帐号的密码(只有 root 用户才能进行此操作) -l, --lock 锁定指名帐户的密码(仅 ...
分类:
其他好文 时间:
2021-04-21 12:29:33
阅读次数:
0