2018年11月的全部文章
@kidultff

宝塔面板Nginx的Lua-Waf防火墙终极改进 动态封禁IP

宝塔面板自带的Nginx防火墙有些鸡肋,对于大量的恶意攻击只能临时拦截,而不能封禁IP,下面的修改可以帮你做到:CC攻击屡教不改,立即ban!漏洞扫描屡教不改:立即ban!同一个IP段轮流攻击,整个IP段都给你ban了!使用了CDN?没关系,获取了真实IP ...
  • 0
  • 0
@kidultff

WordPress调试-输出数据库查询语句和每条语句查询耗时

直接上代码:首先在wp-config.php中底部添加代码,保存查询内容:define('SAVEQUERIES', true);接着找到你主题文件目录里面的页脚文件,一般是footer.php,找到合适位置,添加:echo "<!--"; print_r($wpdb->q ...
  • 0
  • 0
@kidultff

PAT-A 真题 – 1123 Is It a Complete AVL Tree

An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ by more than one, rebalancing is done to restore this propert ...
  • 0
  • 4
@kidultff

PAT-A 真题 – 1122 Hamiltonian Cycle

The "Hamilton cycle problem" is to find a simple cycle that contains every vertex in a graph. Such a cycle is called a "Hamiltonian cycle".In this problem, you are supposed to tell if a given cycle is a Hamilt ...
  • 0
  • 0
@kidultff

PAT-A 真题 – 1121 Damn Single

"Damn Single (单身狗)" is the Chinese nickname for someone who is being single. You are supposed to find those who are alone in a big party, so they can be taken care of.Input Specification:Each input file contains one ...
  • 0
  • 0