定义一系列的算法,把每一个算法封装起来, 并且使它们可相互替换。 策略模式把对象本身和运算规则区分开来,其功能非常强大,因为这个设计模式本身的核心思想就是面向对象编程的多形性的思想。 原来我们这么写: function computed(method, count) { let total; if ...
分类:
其他好文 时间:
2021-05-24 03:55:28
阅读次数:
0
登录mysql数据库 mysql -u root -p '你的密码' 查看user表 mysql> use mysql; mysql> select Host,User,Password from user; ERROR 1054 (42S22): Unknown column 'Password' ...
分类:
数据库 时间:
2021-05-24 03:47:36
阅读次数:
0
Master in Burp Suite - Tools Introductions(1) Introduction to Burp Proxy tab How to configure proxy and intercept request Deploy our target website - ...
分类:
其他好文 时间:
2021-05-24 03:33:58
阅读次数:
0
HAProxy通过固定参数balance指明对后端服务器的调度算法,该参数可以配置在listen或backend选项中。 HAproxy的调度算法分为静态和动态调度算法 官方文档:http://cbonte.github.io/haproxy-dconv/2.3/configuration.html ...
分类:
编程语言 时间:
2021-05-24 03:29:28
阅读次数:
0
1. 配置 配置全局的用户名:git config --global user.name "zhangyang0514" 配置全局的邮箱 :git config --global use.email "18109230755@163.com" 查看当前配置 :git config --list 如下 ...
分类:
其他好文 时间:
2021-05-24 03:25:28
阅读次数:
0
Spring配置 设置别名 //在配置文件中设置别名 <alias> <alias name="user" alias="myUser"/> //在测试类中使用设置的别名 User user= (User) applicationContext.getBean("myUser"); 标签配置 id ...
分类:
编程语言 时间:
2021-05-24 03:12:20
阅读次数:
0
直接上代码吧 中间件简单使用: # -*- coding: utf-8 -*- # Define here the models for your spider middleware # # See documentation in: # https://docs.scrapy.org/en/lat ...
分类:
其他好文 时间:
2021-05-24 03:01:58
阅读次数:
0
端口复用 端口复用最常用的用途是: 防止服务器重启时之前绑定的端口还未释放 程序突然退出而系统没有释放端口 设置方法 int opt=1; setsockopt(sockfd,SOL_SOCKET,SO_REUSEADDR,(const void*)&opt,sizeof(opt)); 注意事项 绑 ...
分类:
编程语言 时间:
2021-05-24 02:37:50
阅读次数:
0
nrm 是一个 npm 源管理器,允许你快速地在 npm源间切换。 什么意思呢,npm默认情况下是使用npm官方源(使用npm config ls命令可以查看),在国内用这个源肯定是不靠谱的,一般我们都会用淘宝npm源:https://registry.npm.taobao.org/,修改源的方式也 ...
分类:
其他好文 时间:
2021-05-24 01:23:21
阅读次数:
0
How do I run a Python script from C#? The reason it isn't working is because you have UseShellExecute = false. If you don't use the shell, you will ha ...
分类:
编程语言 时间:
2021-05-24 01:04:39
阅读次数:
0