直接上代码: // 获取当前时间 let curStartTime = "2021-05-20 13:14:52"; let date = new Date() let now = date.getTime() // 设置截止时间 let endDate = new Date(curStartTime.replace(/-/g, '/')) // curStartTime需要倒计时的日期 let end = endDate.getTime() console.log(end) 一个适用于安卓和ios的倒计时,使用vue var myIntval; // 倒计时 countTime () { // 获取当前时间 let date = new Date() let now = date.getTime() // ?

Git配置默认忽略了大小写,默认是为真的,需要配置为不忽略大小写,修改配置如下操作:使用命令 git config core.ignorecase false 在项目的根目录执行

1、安装growpart  yum install -y cloud-utils-growpart 2、运行fdisk -l命令查看磁盘实际大小。查看磁盘实际大小 [root@root /]# fdisk -l Disk /dev/vda: 200 GB, 200018364800 bytes, 402430400 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x0008d73a Device Boot      Start        End      Blocks  Id  System /dev/vda1  *  ?

1.设置用户名和邮箱 git config --global user.name mac git config --global user.email 528772568@qq.com 生成的配置文件在C:\Users\Administrator\.gitconfig 2.创建一个仓库 git init 3.查看状态 git status 4.添加到暂存区 git add .或指定文件名 5.添加注视 git commit -m "注视" 6.删除文件 git rm 文件名(注意:如果要删除文件,尽量用代码,在windows下删除文件,git识别不到) 修改提交信息 git rebase -i 标识 git st

1.安装git 安装命令 yum install git 已安装的可以查看git版本 git --version 2.配置git信息 git config --global user.name "5287xxx" git config --global user.email "528772xxx@qq.com" git config --global credential.helper store //会生成.gitconfig 的文件,查看 cat ~/.gitconfig //查看配置内容 3.由于linux默认安装是禁用了shell_exec函数,我门需要开启,这里我使用的是宝塔 在php.ini的配置文件disable_functions里?

使用cellStyle自定义样式  {field: 'content', title: __('content'),cellStyle: Controller.api.formatter.css, operate: 'LIKE'},  formatter:{                 css:function(){                     return {                         css:{                             "max-width":'200px',                             "overflow": "hidden",     ?

mysql使用rand随机查询记录的高效率方法 一直以为mysql随机查询几条数据,就用 SELECT * FROM `table` ORDER BY RAND() LIMIT 5 就可以了。 但是真正测试一下才发现这样效率非常低。一个15万余条的库,查询5条数据,居然要8秒以上 查看官方手册,也说rand()放在ORDER BY 子句中会被执行多次,自然效率及很低。 You cannot use a column with RAND() values in an ORDER BY clause, because ORDER BY would evaluate the c

第一步:在redis配置文件开启EX扩展,notify-keyspace-events Ex,如果是windows服务器redis配置文件是redis.windows.conf文件,把notify-keyspace-events Ex放开就行了 第二步:添加代码,新建一个redis类:application\common\library\RedisEx.php,RedisEx.php自己随意命名,代码如下: <?php /**  * Createsd by PhpStrom  * User Fuzhenzhuo  * mail 309657536@qq.com  * Date 2020/8/11  * Time 10:40  */ namespace app\common\library; use think\

window系统,连接远程数据库报错:Access denied for user 'root'@'xxx.xxx.xx.xxx' 代码都写完了,眼看着就要成功了,居然给我看这个???表示心塞…不过还好,在网上查了一会,最后成功解决了这个问题。 首先,在远程服务器上登录mysql:mysql -uroot -p 然后,输入命令:GRANT ALL PRIVILEGES ON *.* TO 'root'@'xxx.xxx.xx.xxx' IDENTIFIED BY 'woshimima' WITH GRANT OPTION; GRANT 权限 on 数据库名.表名 用户名@登?