ZT

KEEP GOING! ALWAYS!


  • 首页

  • 分类

  • 标签

  • 归档

  • TZZ

  • 关于

  • 搜索

Firefox Monitor

发表于 2019-06-26 | 更新于 2019-06-26 | 分类于 推荐 , Firefox

Firefox Monitor

  • 在Firefox Monitor中可以提供订阅邮件的信息泄露事件的提醒,添加电子邮件地址后,在发生密码外泄事件后,会发送泄露提醒。

  • 可以在外泄事件中,查看最近的信息泄露事件

springboot thymeleaf不渲染页面返回字符串

发表于 2019-03-30 | 更新于 2019-03-30

错误信息:

1
2
3
4
5
6
7
8
9
This application has no explicit mapping for /error, so you are seeing this as a fallback.

Sat Mar 30 01:59:07 CST 2019

There was an unexpected error (type=Internal Server Error, status=500).

Error resolving template [index], template might not exist or might not be accessible by any of the configured Template Resolvers

org.thymeleaf.exceptions.TemplateInputException: Error resolving template [index], template might not exist or might not be accessible by any of the configured Template Resolvers

@RestController 与 @Controller

bing2 网站页面加载优化

发表于 2019-03-24 | 更新于 2019-03-24 | 分类于 前端 , bing2

网站:http://bing.tzz6.xyz

编写的最初版本的页面加载速度过慢,而且要等待主页所有图片都加载完成才能进入网站主页,所以后续版本对页面的加载速度进行了优化。由于主页是使用瀑布流方式进行展示的,所以最先加入了懒加载的显示方式来保证缩短进入主页的加载时间。加入图片懒加载后,主页中放置的原图同样需要很长的请求下载时间,所以后来修改为了生成缩略图进行展示,然后主页启用腾讯CDN加速,加快图片加载速度。

阅读全文 »

数据库 内连接 左外连接 右外连接 全外连接

发表于 2019-03-23 | 更新于 2019-03-23 | 分类于 数据库

内连接

内连接中,只有满足连接条件的元组才能作为结果输出,即当任一个表中为null则不会输出。

SQL 语句:

1
2
3
SELECT FIRST.Cno,SECOND.Cpno
FROM Course FIRST,Course SECOND
WHERE FIRST.Cpno=SECOND.Cno;

左外连接

如果在查询时需要保留一个表中全部的元组,就需要使用外连接。

SQL

1
2
SELECT Student.Sno,Sname,Ssex,Sage,Sdept,Cno,Grade
FROM Student LEFT JOIN SC ON (Student.Sno=SC.Sno)

LEFT JOIN 与 LEFT OUTER JOIN 相同

使用左外连接会保存左边关系(表Student)中所有的元组以及右边关系(表SC)符合条件的元组。

阅读全文 »

Nginx uWsgi 重新运行Django项目

发表于 2019-02-20 | 更新于 2019-02-20 | 分类于 NGINX , uWSGI , Django

重新启动NGINX

重新加载网站配置文件

1
nginx -s reload

重新启动uWSGI

1
2
3
ps -ef | grep uwsgi
kill -9 [pid]
uwsgi --ini uwsgi.ini

我是直接杀死进程然后重新运行的,也可以将uWSGI运行的PID存入到文件中,然后通过uwsgi --reload file.pid 。

uWSGI Docs 管理uWSGI服务器

在Docker Alpine中安装uwsgi

发表于 2019-02-19 | 更新于 2019-02-20 | 分类于 Linux , Alpine , Docker

uWSGI是一个由unbit提供的Web应用服务器,实现了WSGI规范。

在Docker中下载了一个 python:3.6-alpine 的镜像,相比其它版本,更加精简。但同时也缺少了很多必要的包,在镜像中直接安装uwsgi时会发生错误。

pip install uwsgi 可能会产生无法编译或找不到python包的头文件错误。

解决办法

1
apk add --no-cache gcc make libc-dev linux-headers pcre-dev

Dockerfile

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FROM python:3.6-alpine
MAINTAINER tzz <[email protected]>
ENV TZ "Asia/Shanghai"

ADD . /webdata/bing2
WORKDIR /webdata/bing2


RUN echo https://mirrors.ustc.edu.cn/alpine/latest-stable/main > /etc/apk/repositories; \
echo https://mirrors.ustc.edu.cn/alpine/latest-stable/community >> /etc/apk/repositories
RUN \
apk update && \
apk add --no-cache gcc make libc-dev linux-headers && \
pip install -r /webdata/bing2/requirements.txt && \
uwsgi --ini /webdata/bing2/uwsgi.ini

EXPOSE 80 8000 8080 9090

Wordpress添加共享许可协议

发表于 2019-01-16 | 更新于 2019-01-16 | 分类于 Wordpress

选择

在 共享协议选择 页面选择你想要的共享协议,也可以根据他给出的选项,选择后他会推荐对应的共享协议。

阅读全文 »

CDN HTTPS 配置

发表于 2019-01-16 | 更新于 2019-01-16 | 分类于 CDN , HTTPS

在 CDN-高级工具-证书管理界面 进行配置证书。

1.选择要配置证书的域名

2.选择证书

如果对应的域名在腾讯云托管了证书,可以直接选择使用。

如果选择自有证书,证书内容中填写 _public.crt 文件中的编码,私钥内容填写 .key 文件中的内容。

注:如果出现 证书链无法补齐,您可以自行补齐证书链 问题,可以在 证书链下载/修复 页面进行证书链补齐,选择 上传证书 选择 _public.crt 结尾的文件上传,即之前填写的证书文件,点击 获取证书链 按钮,即可生成完整的证书链,将生成的证书链复制粘贴到 证书内容 中.

阅读全文 »

网站开启CDN加速

发表于 2019-01-16 | 更新于 2019-01-16

CDN

腾讯云和七牛云CDN都有免费额度

七牛云CDN每个月 CDN-HTTP 下载流量 1GB 免费(仅HTTP免费)。

腾讯云CDN用户每月均可享受 10 GB 免费流量包,接入加速域名后于次月 1 号发放至您的账户。新开通 CDN 的用户还会在开通后的 6 个月内每月收到腾讯云赠送的 50 GB 流量包。

我使用的是腾讯CDN,接下来就是按照腾讯云CDN配置方法。

阅读全文 »

CentOS7 PHP5.6 upgrade to PHP7.2

发表于 2019-01-08 | 更新于 2019-01-15 | 分类于 CentOS , PHP

服务器信息

CentOS 7.5

Apache 2.4

PHP 5.6

查找已安装的 PHP Package

使用yum list installed | grep "php"查找已安装的php package,存档

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[[email protected] ~]# yum list installed | grep "php"
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
php56w.x86_64 5.6.39-1.w7 @webtatic
php56w-cli.x86_64 5.6.39-1.w7 @webtatic
php56w-common.x86_64 5.6.39-1.w7 @webtatic
php56w-fpm.x86_64 5.6.39-1.w7 @webtatic
php56w-gd.x86_64 5.6.39-1.w7 @webtatic
php56w-ldap.x86_64 5.6.39-1.w7 @webtatic
php56w-mbstring.x86_64 5.6.39-1.w7 @webtatic
php56w-mcrypt.x86_64 5.6.39-1.w7 @webtatic
php56w-mysqlnd.x86_64 5.6.39-1.w7 @webtatic
php56w-pdo.x86_64 5.6.39-1.w7 @webtatic
php56w-xml.x86_64 5.6.39-1.w7 @webtatic

阅读全文 »
1234
TZZ

TZZ

32 日志
31 分类
11 标签
RSS
GitHub E-Mail LeetCode Bing2
Creative Commons
  • ZT
0%
© 2019 TZZ. All Rights Reserved.
|