上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 99 下一页
摘要: url匹配规则 location [=|~|~*|^~|@] /uri/ { ... } = : 表示精确匹配后面的url ~ : 表示正则匹配,但是区分大小写 ~* : 正则匹配,不区分大小写 ^~ : 表示普通字符匹配,如果该选项匹配,只匹配该选项,不匹配别的选项,一般用来匹配目录 @ : "@ 阅读全文
posted @ 2022-02-23 13:49 Oops!# 阅读(698) 评论(0) 推荐(0) 编辑
摘要: Python中逐行打印 方法一:readline函数 f = open("./code.txt") # 返回一个文件对象 line = f.readline() # 调用文件的 readline()方法 while line: print(line, end = '') # 在 Python 3中使 阅读全文
posted @ 2022-02-10 15:56 Oops!# 阅读(488) 评论(0) 推荐(0) 编辑
摘要: Solution 1: You can simply do this with help of AJAX... Here is a example which calls a python function which prints hello without redirecting or refr 阅读全文
posted @ 2022-02-06 13:43 Oops!# 阅读(1457) 评论(0) 推荐(0) 编辑
摘要: 很多刚学习编程的小伙伴不知道return和break的不同,今天就这个问题给大家讲解。 break用于提前结束循环,而return是用于将返回值传递回函数调用方的关键字。如果它不带参数使用,它只会结束函数并返回到之前执行代码的位置。 有些情况下,它们可以达到相同的目的,但这里有两个例子可以让您了解它 阅读全文
posted @ 2022-01-13 14:34 Oops!# 阅读(361) 评论(0) 推荐(0) 编辑
摘要: 方式一:使用reversed()函数 a=[1,2,3,4,5,6,7,8,9] b=list(reversed(a)) print b 注意:reversed()函数返回的是一个迭代器,而不是一个List,需要再使用List函数转换一下。 方式二:使用sorted() a=[1,2,3,4,5,6 阅读全文
posted @ 2022-01-13 10:43 Oops!# 阅读(687) 评论(0) 推荐(0) 编辑
摘要: 在初次搭建wordpress成功后,老季想安装wordpress中有趣的插件时缺发现需要ftp服务,同样的升级插件的话也需要输入ftp的用户名密码。其实不用真的搭建了一个ftp服务器,然后发现并没有什么卵用,这只是wordpress。 全而留下的坑,那么,怎么绕过这道程序呢.其实很简单,我们只需在w 阅读全文
posted @ 2022-01-11 10:41 Oops!# 阅读(746) 评论(0) 推荐(0) 编辑
摘要: 安装 PHPRemi 软件源Remi 软件源 主要提供最新版的 PHP 软件包和其他一些 PHP 扩展工具包,它是针对 Fedora 和 RHEL 系分支变体 (包括:RHEL, CentOS, Oracle Linux 等等) 要安装 PHP,推荐使用 Remi 软件源。Remi 对 PHP 的支 阅读全文
posted @ 2022-01-10 18:33 Oops!# 阅读(418) 评论(0) 推荐(0) 编辑
摘要: In this tutorial, we will learn about the Python List index() method with the help of examples. The index() method returns the index of the specified 阅读全文
posted @ 2022-01-09 22:56 Oops!# 阅读(187) 评论(0) 推荐(0) 编辑
摘要: Python import statement enables the user to import particular modules in the corresponding program. It resembles the #include header_file in C/C++. As 阅读全文
posted @ 2022-01-08 21:01 Oops!# 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 尽管 glob API 很少,但是功能强大。在那种需要查找系统上匹配一个模式的文件时非常有用。当需要去创建一个有某个相同扩展,前缀或者中间有共同字符串的文件列表时,应该考虑使用 glob 而不是自定义处理目录内容的代码。 glob 模块使用的模式规则不同于 re 模块使用的正则表达式。而是使用 Un 阅读全文
posted @ 2022-01-07 16:15 Oops!# 阅读(313) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 99 下一页