php使用Carbon获取2个日期之间的日期

9-03 2,772 views

<?php use Carbon\CarbonPeriod; $period = CarbonPeriod::create('2018-06-14', '2018-06-20'); // Iterate over the period fore...
阅读全文 0

dart Error: Field ‘xxx’ should be initialized because its type ‘String’ doesn’t allow null

9-01 2,726 views

最近在学dart class的构造函数时候出现 这个问题 原因是firstName没有初始化,不能为null 解决方案: 1.在String后面加个? class Person { String? firstN...
阅读全文 0

php 解决超卖的几种方案(redis锁、mysql悲观锁)

6-21 2,936 views

1.创建商品和订单表模拟商品交易操作 fa_goods商品表,stock商品库存,test_order=订单表 2.添加一个测试商品数据(商品数量为150个) 测试并发购买的方法(gol...
阅读全文 0

dropzone 插件只上传一张图片

6-12 2,187 views

<div> <div class="col-md-3"> <div class="form-group"> <label>你的头像</label> ...
阅读全文 0

centos8 yum安装php7.3

5-16 2,905 views

执行命令 $ yum install epel-release $ rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm $ dnf install -y https://rpms...
阅读全文 0

Linux使用lsyncd实现2个文件夹实时同步

5-04 2,523 views

官方文档: https://axkibe.github.io/lsyncd/download/ 1.安装 $ yum install lsyncd $ yum install rsync $ yum install libtermcap-devel ncurses-devel l...
阅读全文 0

php面试题

4-19 2,343 views

php魔术方法 __get( $property ) 当调用一个未定义的属性时访问此方法 __set( $property, $value ) 给一个未定义的属性赋值时调用 __isset( $proper...
阅读全文 0

mysql开启表锁备份数据

4-09 2,018 views

1、全局读锁定: FLUSH TABLES WITH READ LOCK ; 执行了命令之后所有库所有表都被锁定只读,一般用在数据库联机备份,这个时候数据库的写操作将被阻塞,读操...
阅读全文 0

firewall 防火墙常用命令

4-09 1,933 views

查看版本 $ firewall-cmd --version 0.4.3.3 help $ firewall-cmd --help 状态 $ firewall-cmd --state running 重载配置 $ firewall-cmd --reload 重新加载...
阅读全文 0

awk 访问nginx 日志常用命令

4-09 1,828 views

1.根据访问IP统计UV awk '{print $1}' access.log|sort | uniq -c |wc -l 2.统计访问URL统计PV awk '{print $7}' access.log|wc -l 3...
阅读全文 0