兰林
兰林
在线正则表达式测试:https://regex101.com/ 可以详细查看正则匹配过程,对于性能优化非常有用
@sagittar 额,原因分析说了啊。就是你不能连入的节点之前以其他不同的配置被启动过,并且残留有历史数据。现在你企图以新的配置连入新的 cluster, 但是历史数据还是上一个 cluster 的,所以会无法连入。就是你光改了配置,没有清空之前的残留数据造成的。
### 解决办法 **PS: 以下 xxx 为需要删除的命名空间** 1. 查看卡在 Terminating 的命名空间 ```shell kubectl get ns | grep Terminating ``` 2. 根据 1 中获取到的命名空间,先尝试强制删除 ```shell kubectl delete ns xxx --force --grace-period=0 ```...
### 情景2 ```php function test(array $y): void { foreach ($y as $k => $v) { $y[$k] = 'hello world!'; } } $x = [1, 2, 3, 4]; foreach ($x as...
### 结论 为了避免 **情景1** 和 **情景2** 中的情形出现,在循环完成后务必对引用变量进行销毁。 以免引起难以发现的错误。比如将引用赋值循环后的结果不断向下传递,那么一旦出现问题,Debug起来可就没有那么容易了。 ### 解决办法 ```php foreach ($data as &$v) { // ... } unset($v); ```
### .gdbinit 下载地址 https://github.com/php/php-src/blob/PHP-8.0.0/.gdbinit 其中 PHP-8.0.0 是你 PHP 的具体版本号
# B ### -b 参数用来向服务器发送 Cookie。 ```shell curl -b 'foo=bar' https://google.com ``` 上面命令会生成一个标头Cookie: foo=bar,向服务器发送一个名为foo、值为bar的 Cookie。 ```shell curl -b 'foo1=bar;foo2=bar2' https://google.com ``` 上面命令发送两个 Cookie。 ```shell curl -b cookies.txt https://www.google.com ``` 上面命令读取本地文件cookies.txt,里面是服务器设置的...
# C ### -c 参数将服务器设置的 Cookie 写入一个文件。 ```shell curl -c cookies.txt https://www.google.com ``` 上面命令将服务器的 HTTP 回应所设置 Cookie 写入文本文件cookies.txt
# D ### -d 参数用于发送 POST 请求的数据体。 ```shell curl -d'login=emma&password=123'-X POST https://google.com/login // 或者 curl -d 'login=emma' -d 'password=123' -X POST https://google.com/login ``` 使用-d参数以后,HTTP 请求会自动加上标头 Content-Type : application/x-www-form-urlencoded。并且会自动将请求转为 POST 方法,因此可以省略-X...
# E ### -e 参数用来设置 HTTP 的标头Referer,表示请求的来源。 ```shell curl -e 'https://google.com?q=example' https://www.example.com ``` 上面命令将Referer标头设为https://google.com?q=example。 -H 参数可以通过直接添加标头Referer,达到同样效果。 ```shell curl -H 'Referer: https://google.com?q=example' https://www.example.com ```