第几个幸运数(stl:优先队列,set)(蓝桥)
https://blog.csdn.net/ryo_218/article/details/84866037 #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<map>
#include<set>
using na
红绿灯 保存下我一直段错误的代码
#include #include<string.h> #include #include using namespace std; int stx,sty,lax,lay;int m,n;int flag; vector a[100000],book[100000]; struct node{ int x,y,step; }temp; int main(){ int t;cin>>t; while(t–){ queue q; flag=0; int m,n;cin>>m>>n;int ti;
配置SMB文件夹共享(二)-------------------ENGINEER DAY04
版权声明:转载请附上链接 https://blog.csdn.net/qq_37684859/article/details/87655599 实现挂载smb共享文件 1)创建挂载点 [root@desktop0 ~]# mkdir /mnt/samba
2)安装cifs-utils软件包 [root@desktop0 ~]# yum -y install cifs-utils
.. ..
3)配置开机挂载 [root@desktop0 ~]# vim /etc/fstab
.
安全NFS共享的实现--------(二)
版权声明:转载请附上链接 https://blog.csdn.net/qq_37684859/article/details/87870594 案例:安全NFS共享的实现 本例要求在虚拟机 server0 上配置安全NFS服务,完成以下任务: 1.访问 /protected 需 kerberos 加密,密钥地址:http://classroom/pub/keytabs/server0.keytab- 2 目录 /protected 下包含名为 project 的子目录 然后在虚拟机 deskt
配置web网页内容访问
版权声明:转载请附上链接 https://blog.csdn.net/qq_37684859/article/details/88078859 案例:本例要求在 Web 网站 http://server0.example.com 的 DocumentRoot 目录下创建一个名为 private 的子目录,要求如下: 从 http://classroom/pub/materials/private.html 下载一个文件副本到这个目录,重命名为 index.html 不要对文件 index.ht
shell脚本重定向和环境变量、单引‘’双引“”“”反引$()
版权声明:转载请附上链接 https://blog.csdn.net/qq_37684859/article/details/88626724 stty -echo 关闭显示 stty echo 显示
shell脚本 for循环 while循环 case分支结构
版权声明:转载请附上链接 https://blog.csdn.net/qq_37684859/article/details/88628097 while 直到判断为真退出
shell脚本子串截取,随机密码脚本
版权声明:转载请附上链接 https://blog.csdn.net/qq_37684859/article/details/88650692 案例 方法一: [root@server0 ~]# phone=1234567889
[root@server0 ~]# echo $phone
1234567889
[root@server0 ~]# echo ${phone:1:3} #从第2个字符开始,截取3个
234
[root@server0 ~]# echo ${phone:0:3}
shell脚本子串替换
版权声明:转载请附上链接 https://blog.csdn.net/qq_37684859/article/details/88650828 案例一替换 3替换a [root@server0 ~]# haha==123456789
[root@server0 ~]# echo ${haha/3/a}
=12a456789
shell脚本掐头去尾
版权声明:转载请附上链接 https://blog.csdn.net/qq_37684859/article/details/88652014 入图片描述](https://img-blog.csdnimg.cn/20190318214840191.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM3Njg0ODU5,size_
shell脚本练习---创建用户和密码 、求和脚本
练习创建用户和密码脚本 [root@server0 ~]# vim /root/3.sh
#! /bin/bash
read -p "请输入用户名:" name
read -p "请输入用户密码: " pass
if [ -z $name ];then
echo "用户不能为空"
exit
fi
pass=${pass:-123456}
echo -n "你输入是$name,你的密码是$pass,确认吗y/n:"
read adb
if [ $adb == y ];then
userad
expect自动交互程序工具应用,交互式脚本
版权声明:转载请附上链接 https://blog.csdn.net/qq_37684859/article/details/88672572 案例示范 [root@room4pc09 ~]# yum -y install expat
[root@room4pc09 ~]# vim test.sh
-#! /bin/bash
expect <<EOF #工具使用
set timeout 30 #时间设置等待时长最多30妙
spawn ssh 172.25.
sed文本编制器应用
版权声明:转载请附上链接 https://blog.csdn.net/qq_37684859/article/details/88676528 案例 显示/etc/passwd 第5行 [root@desktop0 ~]# sed -n '5p' /etc/passwd
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
显示5 、6行 [root@desktop0 ~]# sed -n '5p;6p' /etc/passwd
lp:x:4:7:lp:/var/
代理服务器squid,varnish
版权声明:转载请附上链接 https://blog.csdn.net/qq_37684859/article/details/88703096 实现此案例需要按照如下步骤进行。 步骤一:构建web服务器 1)使用yum安装web软件包
[root@web ~]# yum -y install httpd
.. ..
[root@web ~]# rpm -q httpd
httpd-2.4.6-40.el7.x86_64
2)启用httpd服务,并设为开机自动运行 [root@we
今日推荐
周排行