手册(有PHP4的实现方式哦):https://www.php.net/manual/zh/function.scandir.php 直接附代码吧PHP5和PHP7 直接有scandir()函数,遍历出当前目录下的所有文件。 function myScanDir($dir) { $file_arr ...
分类:
Web程序 时间:
2020-02-18 20:29:43
阅读次数:
87
javaScript部分 这里contentType: "application/json还未设置 1. function testRequestBody() { var book = new Object(); var id = 1; var name = "Spring MVC企业应用实践"; ...
分类:
移动开发 时间:
2020-02-18 18:37:12
阅读次数:
85
``` package main import ( "crypto/hmac" "crypto/md5" "crypto/sha1" "encoding/hex" "fmt" ) func Md5(data string) string { md5 := md5.New() md5.Write([]... ...
分类:
编程语言 时间:
2020-02-18 18:27:26
阅读次数:
107
使用this调用本类方法 除了调用属性之外,this也可以实现方法的调用,但是对于方法的调用就必须考虑构造与普通方法 构造方法调用(this()):使用关键字new实例化对象的时候才会调用构造方法; 普通方法调用(this.方法名称()):实例化对象产生后就可以调用普通方法。 普通的方法调用: 构造 ...
分类:
编程语言 时间:
2020-02-18 18:06:04
阅读次数:
78
Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concate ...
分类:
编程语言 时间:
2020-02-18 16:33:41
阅读次数:
88
__doc__ 类的描述信息。 class dog: '''这是狗的类''' def __init__(self,name): self.name = name self.__age = None print(dog.__doc__) #输出 这是狗的类 __module__ 表示当前操纵的对象在哪 ...
分类:
编程语言 时间:
2020-02-18 15:02:44
阅读次数:
95
题:https://codeforces.com/contest/1307/problem/D 题意:给定无向图,n为点,m为边。在给个k,为特殊点的数目,题目要求在这些特殊点上连一条边,让新图最短路尽可能大,问新图最短路(1到n)是多少? 分析:因为题目保证连通且原本的图一定可以从1到n,我们假设 ...
分类:
其他好文 时间:
2020-02-18 14:56:54
阅读次数:
57
水题。在计算层数的时候卡了十几分钟,我好菜。 #include<iostream> using namespace std; int main() { int N; char c; cin>>N>>c; int layer = 1,sum = 1;//sum表示层数layer对应的总字符数 whil ...
分类:
其他好文 时间:
2020-02-18 13:04:22
阅读次数:
72
水题。 #include<iostream> #include<cmath> using namespace std; int main() { int c1,c2; cin>>c1>>c2; int t = round((c2-c1)/100.0);//不足 1 秒的时间四舍五入到秒 int h ...
分类:
其他好文 时间:
2020-02-18 13:02:43
阅读次数:
63