2022年6月

一:

/usr/local/etc/nginx/nginx.conf (配置文件路径)
/usr/local/var/www (服务器默认路径)
/usr/local/Cellar/nginx/1.6.2 (貌似是安装路径)

二:

nginx -V 查看nginx版本及安装的本地位置
nginx -v 查看nginx版本(此方法依然可以检测是否安装某一软件,如git,hg等)

三:

/nginx/sbin/nginx  #没有提示表示启动成功
/nginx/sbin/nginx -t  #检查语法
/nginx/sbin/nginx -s reload   #重启

四:
/nginx/conf/nginx.conf文件参数对应意思:

worker_processes 1;  #worker进程数量
  events {  #事件区块开始
  worker_connections 1024;  #每个worker进程支持的最大连接数
  }
  http {  #http区块开始
  include mime.types;  #Nginx支持的媒体类型库文件包含
  default_type application/octet-stream;  #默认的媒体类型
  sendfile on;  #开启高效传输模式
  keepalive_timeout 65;  #连接超时
  server {  #server区块开始,表示一个独立的主机站点
  listen 80;  #提供服务的端口,默认80
  server_name www.toyixin.cn;  #提供服务的域名主机号
  location / {  #第一个location区块开始
  root html/www;  #站点根目录,相对于nginx安装目录
  index index.html index.html;  #默认的首页文件多个用空格分开
  }

error_page 500 502 503 504 /50x.html;  #出现对应的http状态码时,使用50x.html回应客户

location = /50x.html {  #location区块开始,访问50x.html
  root html;  #指定对应的站点目录位html
  }

}

}

方法一:
在需要截取的地方加上

<!--more-->

方法二:
编辑模板的 index.php 文件,找到这一行代码:

   

<?php $this->content('阅读剩余部分'); ?>

将其替换为:

   

<?php $this->summary(); ?><p class="more"><a href="<?php $this->permalink() ?>">阅读全文</a></p>

保存即可。

可以使用相同的方法修改模板的 archive.php 文件,那么在归档页也可以做到显示摘要。
来源:简书
作者:cherish_1217
方法三:
登录到后台-控制台-外观-编辑当前外观:
编辑文件 archive.php
编辑文件 index.php

修改两处分别找到:
/ 默认显示的是全文 /

<?php $this->content('- 阅读剩余部分 -'); ?>

替换成(概要取300字):
/ 自定义输出,如 300个字符 /

<?php $this->excerpt(300,'- 阅读剩余部分 -'); ?>

修改typecho首页显示文章的数量:
编辑文件 functions.php
在末尾添加:

/ 自定义首页文章分布数量,如 10 /

function themeInit($archive) {
if ($archive->is('index')) {
$archive->parameter->pageSize = 10;
}
}

方法四:
根据需要截长度

// 将原主题文件 archive.php 中的
<?php $this->content('- 阅读剩余部分 -'); ?>
// 替换成
<?php
    $length = 100;              // 截取长度
    $more = "- 阅读剩余部分 -";  // 显示符
    $more = "<p class=\"more\"><a href=\"{$this->permalink}\" title=\"{$this->title}\">{$more}</a></p>";
    false !== strpos($this->text, '<!--more-->') ?
    echo $this->excerpt . $more : $this->excerpt($length, $more);
?>

- 阅读剩余部分 -

1、需要一个vps
例如hax vps
hax vps教程参考 Hax VPS 白嫖教程
2、ssh连接
QQ截图20220605154110.jpg
3、输入脚本

bash <(curl -s -L https://git.io/v2ray.sh)

QQ截图20220605154310.jpg
4、按回车等待运行
QQ截图20220605154349.jpg
这里输入‘1’
QQ截图20220605154356.jpg
后面就不用管他一直按回车健
QQ截图20220605154424.jpg
这里也是回车
QQ截图20220605154440.jpg
然后等待运行
QQ截图20220605155606.jpg
输入‘v2ray url’

v2ray url

QQ截图20220605155711.jpg
时长根据vps的速度而定(顺便吐槽hax vps挺慢的)
QQ截图20220605155910.jpg
复制链接导入使用的软件,例如v2rayN
QQ截图20220605160424.jpg
写在后面:
在写完教程的时候我发现这个方法对于正常的vps是可以的但是,对于hax vps不知道为什么不行
好像是因为ip被锁的原因。


end

1、选择题部分

print("BBCAA") # 1-5
print("ABCAD") # 6-10
print("DCCDB") # 11-15
print("ACCDC") # 16-20

2、小明的零花钱

a = input()
b = input()
c = int(a)+int(b)
d = float(c/6)
print(round(d,1))

3、小明的期中考成绩

a = input()
b = input()
c = input()
if int(a)+int(b)+int(c) >= 360 :
    print('happy')
else:
    print('sad')

4、会考等级

a = float(input())
if a >= 90:
    print('优秀')
elif a >= 60:
    print('合格')
else:
    print('不合格')

5、阿拉丁的宝箱

a = input()
b = input()
if a == "183" and b == "680":
    print('success')
if a == '183' and b != '680':
    print('B is wrong')
if a != '183' and b == "680":
    print('A is wrong')

特别说明第五题用if--elif的写法:

a = input()
b = input()
if a == "183" and b == "680":
    print('success')
elif a == '183' and b != '680':
    print('B is wrong')
elif a != '183' and b == "680":
    print('A is wrong')

(仅把后两个‘if’改为‘elif’)