接口隔离 通俗一点讲,接口隔离就是当一个类需要继承另一个类时, 如果被继承的类中有继承的类用不到的方法或者属性时,就不要去实现这个继承。如果真的情非得已必须要继承,那么也需要从被继承的类中再提取出一个只包含需要部分功能的新类型,最终去继承这个新类型才是正确的做法。 换句话说,实现继承的时候,不要去继 ...
分类:
Web程序 时间:
2018-04-17 11:56:26
阅读次数:
186
我的是windows10 系统,phpstudy 环境 ,配置的本地虚拟机,tp5.1 访问跟目录正常 访问次级页面报错 对于 tp5 No input file specified. 的问题,其实是 .htaccess 文件的配置问题 源文件是这样的 <IfModule mod_rewrite.c ...
分类:
其他好文 时间:
2018-04-17 11:53:15
阅读次数:
111
题目链接 题目描述非常直接,要求你用快速幂解决第一问,exgcd解决第二问,bsgs解决第三问。 emmmm于是现学bsgs 第二问让求最小整数解好烦啊…… 假设我们要求得方程$ax+by=c(mod p)$的最小整数解 令$d=gcd(a,b)$ 我们求得一个解$x_0,y_0$使得$ax_0+b ...
分类:
其他好文 时间:
2018-04-17 11:42:47
阅读次数:
152
Let us define a regular brackets sequence in the following way: 1. Empty sequence is a regular sequence. 2. If S is a regular sequence, then (S) and [ ...
分类:
其他好文 时间:
2018-04-16 20:34:45
阅读次数:
172
解决方法如下: 1、添加wireshark用户组 sudo groupadd wireshark 2、将dumpcap更改为wireshark用户组 sudo chgrp wireshark /usr/bin/dumpcap 3、让wireshark用户组有root权限使用dumpcap sudo ...
分类:
系统相关 时间:
2018-04-16 13:10:40
阅读次数:
189
20165336 实验二 Java面向对象程序设计 一、实验报告封面 课程:Java程序设计 班级:1653班 姓名:康志强 学号:20165336 指导教师:娄嘉鹏 实验日期:2018年4月16日 实验时间:13:45 15:25 实验序号:实验二 实验名称:Java面向对象程序设计 实验目的与要 ...
分类:
编程语言 时间:
2018-04-16 11:07:42
阅读次数:
196
题目大意: 求2^(2^(2^...))%p的值,每次给定p。 题解: 扩展欧拉定理 a^n=a^(a%phi(p)+phi(p)) (mod p) 设f(p)为模数为p时候这个式子的答案。 f(p)=2^(f(phi(p))+phi(p)) 然后递归暴力,因为每次取phi,不会递归很多层 代码: ...
分类:
其他好文 时间:
2018-04-15 20:54:52
阅读次数:
166
The GORM is an super easy ORM solution for Go language. But many people would get the error about Usually this comes from the model definition which h ...
分类:
其他好文 时间:
2018-04-15 20:54:36
阅读次数:
581
Description The multiplication puzzle is played with a row of cards, each containing a single positive integer. During the move player takes one card ...
分类:
其他好文 时间:
2018-04-15 19:41:18
阅读次数:
154