7月
27
7月
19
As you may know, this year we updated the Laravel release cycle to include one major release per year. Previously, we released two major versions per year.
These release changes would typically indicate that a Laravel 9 release is due in September of this year. However, as you may know, Laravel uses a variety of community-driven packages as well as nine Symfony components for a number of features within the framework. Symfony 6.0 is due for release in November. For that reason, we are choosing to delay the Laravel 9.0 release until January 2022.
By delaying the release, we can upgrade our underlying Symfony components to Symfony 6.0 without being forced to wait until September 2022 to perform this upgrade. In addition, this better positions us for future releases as our yearly releases will always take place two months after Symfony's releases. This means that the upcoming Laravel release schedule will look as follows:
Laravel 9.0: January 2022
Laravel 10.0: January 2023
Laravel 11.0: January 2024
We are continuing to deliver exciting new improvements to the Laravel 8.x release series. In fact, we have been able to ship a variety of amazing new features without needing a major release, including parallel testing, model broadcasting improvements, and more. We look forward to shipping even more wonderful improvements to you soon!
原文
https://blog.laravel.com/laravel-9-release-date
7月
16
步骤
- 新建空目录。 zz.com
- 进 zz.com。 新建 composer.json 文件。并填充内容。
{
"require": {
"jonnyw/php-phantomjs": "4.*"
}
}
- 执行 composer.update 。
- 建立 git 和 .gitignore 忽略文件
git init
.gitignore 中填充 /vendor
git add .
git commit -m '新建 composer.json 文件,配置安装 jonnyw/php-phantomjs'
- 新建路由以及配置自动加载。
参考
https://learnku.com/laravel/t/3590/php-crawls-the-page-that-needs-to-run-js-run-js-grabing-web-page-with-php-while
https://blog.junphp.com/details/391.jsp
https://blog.csdn.net/luyaran/article/details/53836486
7月
16
随着苹果 8 以后的手机等出现,顶部,底部自适应问题是手机应用(app,web,小程序)要解决的问题。对于网页和小程序可以使用 env(safe-area-inset-bottom) 等解决。
env()和constant(),是IOS11新增特性,Webkit的css函数,用于设定安全区域与边界的距离,有4个预定义变量:
- safe-area-inset-left:安全区域距离左边边界的距离
- safe-area-inset-right:安全区域距离右边边界的距离
- safe-area-inset-top:安全区域距离顶部边界的距离
- safe-area-inset-bottom :安全距离底部边界的距离
而env()和constant()函数有个必要的使用前提,H5网页设置viewport-fit=cover的时候才生效,小程序里的viewport-fit默认是cover。
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
适配底部代码:
height: calc(96rpx+ constant(safe-area-inset-bottom));//兼容 IOS<11.2
height: calc(96rpx + env(safe-area-inset-bottom));//兼容 IOS>11.2
padding-bottom: constant(safe-area-inset-bottom);//兼容 IOS<11.2
padding-bottom: env(safe-area-inset-bottom);//兼容 IOS>11.2
// 先constant再env
文章来源第二个有说到兼容性问题。
文章来源
https://www.cnblogs.com/djjlovedjj/p/13983852.html
https://www.cnblogs.com/djjlovedjj/p/14686684.html
7月
09
Text(
'给我一个理由忘记',
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 13.0
),
)
在某些场景下无法换行,请用 Expanded
Expanded (
child: Text(
'给我一个理由忘记',
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 13.0
),
)
)
也可以套 Container ,设置宽度来限制文本的宽度。
7月
09
准备
https://github.com/FriendsOfPHP/Goutte
https://github.com/guzzle/guzzle
https://guzzle-cn.readthedocs.io/zh_CN/latest/request-options.html
安装
composer require fabpot/goutte
composer require guzzlehttp/guzzle
试试
先看看 goutte
use Goutte\Client;
$client = new Client();
$crawler = $client->request('GET', 'https://www.yuepaibao.com/moments');
$crawler->filter('.content span')->each(function ($node) {
print $node->text()."\n";
});
**再看看 GuzzleHttp **
use GuzzleHttp\Client as GoutteClient;
use GuzzleHttp\Psr7\Request as GuzzleRequest;
$url = 'https://www.hao123.com';
$request = new GuzzleRequest('GET', $url);
$client = new GoutteClient();
$response = $client->send($request, ['timeout' => 5]);
$content = $response->getBody()->getContents();
echo $content;
特殊
https://learnku.com/laravel/t/3590/php-crawls-the-page-that-needs-to-run-js-run-js-grabing-web-page-with-php-while
7月
02
console.log(0.1+0.2);
# 输出 0.30000000000000004
对于 js 浮点数计算不正确问题,请参考下边:
https://www.cnblogs.com/xinggood/p/6639022.html