1106. Lowest Price in Supply Chain (25)-PAT甲级真题(dfs,bfs,树的遍历)

A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)– everyone involved in moving a product from supplier to customer.

Starting from one root supplier, everyone on the chain buys products from one’s supplier in a price P and sell or distribute them in a price that is[……]

Read more

1111. Online Map (30)-PAT甲级真题(Dijkstra + DFS)

Input our current position and a destination, an online map can recommend several paths. Now your job is to recommend two paths to your user: one is the shortest, and the other is the fastest. It is guaranteed that a path exists for any request.

Input Specification:

Each input file contains one te[……]

Read more

PAT1115 Counting Nodes in a BST (30)-PAT甲级真题(二叉树的遍历,dfs)

A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:

  • The left subtree of a node contains only nodes with keys less than or equal to the node’s key.
  • The right subtree of a node contains only nodes with keys greater than the node’s key.
  • Both the left[……]

    Read more

PAT 1131. Subway Map (30) -甲级(图的遍历,DFS)

In the big cities, the subway systems always look so complex to the visitors. To give you some sense, the following figure shows the map of Beijing subway. Now you are supposed to help people with your computer skills! Given the starting position of your user, your task is to find the quickest way t[……]

Read more

配置多个wordpress(通过新建目录的方法)

1、创建数据库和赋权用户

mysql> CREATE DATABASE wordpress数据库名 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
mysql> GRANT ALL ON wordwordpress数据库名.* TO '用户名'@'localhost' IDENTIFIED BY '密码';

刷新权限并退出

mysql> FLUSH PRIVILEGES;
mysql> EXIT;

2、安装wordpress

下载wordpress,上传到服务器的/tmp下并解压。目标[……]

Read more

更改wordpress主题(上传法)

由于国内服务器原因,不能自解使用wordpress主题中的安装功能进行安装,需要进行人工下载主题文件,上传后安装。步骤如下。

1、找到自己想要的主题名称,比如bold photography

https://wordpress.org/themes/中搜索

2、搜索后点击下载,得到一个zip文件

3、在外观中,点击添加按钮

4、点击上传主题,上传本地zip文件

5、上传成功后,点击启用

[……]

Read more

wordpress使用Mweb发布和markdown语法

1、使用Mweb进行发布

(1)在mweb的偏好设置中,选择Wordpress.org

(2)配置wordpress网页和账号密码

(3)在mweb编辑了文件,点击发布,自动发布到wordpress中

由于直接使用mweb发布后,代码格式不能很好支持(因为mweb的代码使用markdown语法,原生wordpress没有很好的支持markdown),因此我们安装一个支持markdown语法的插件

2、安装插件WP Editor.md(超级好用)

手动安装方法

(1)下载WP Editor.md

https://wordpress.org/plugins/w[……]

Read more

wordpress修改端口

服务器原来使用的是9191端口
现在转回80端口

1、修改nginx的端口监听

vi /etc/nginx/sites-enabled/default
listen改成目标端口

2、修改wordpress数据库默认连接端口

进入数据库

mysql -u root -p
>use wordpress;
>select * from wp_options where option_name in ('siteurl','home');

update wp_options set option_value=’example.com:port’ where option_name i[……]

Read more