php
贪嘴
这个作者很懒,什么都没留下…
展开
-
leetcode 学习2 买卖的最佳时机
题目 解题思路 循环对比,第一天比第二天价格低就买入,第二天卖出以此类推 class Solution { /** * @param Integer[] $prices * @return Integer */ function maxProfit($prices) { $profit = 0; for($i = 0; $i < count($prices); $i++) { if原创 2021-09-18 15:17:18 · 76 阅读 · 0 评论 -
laravel 6.* 数据库迁移报错 1071 Specified key was too long; max key length is 1000 bytes
laravel 6.* 执行 php artisan migrate 数据库迁移时报错 SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`)) 根据 laravel 手册 修改 app/Prpvider/原创 2021-04-27 15:30:29 · 138 阅读 · 0 评论 -
phpStudy composer 报 global <command-name> [<args>].
把 composer.bat 原内容 @ECHO OFF D:\phpStudy\PHPTutorial\php\php-7.2.1-nts\php.exe D:\phpStudy\PHPTutorial\tools\composer\composer.phar %1 改成 @ECHO OFF D:\phpStudy\PHPTutorial\php\php-7.2.1-nts\php.exe D:\phpStudy\PHPTutorial\tools\composer\composer.phar %*原创 2021-04-25 09:41:14 · 85 阅读 · 0 评论