我想第一次尝试安装 Laravel 9...所以,我将 PHP 更新到最新的(版本 8.1.2)并将 Composer 更新到最新的(版本 2.2.6)...
当我调用laravel new my-project命令时,它显示错误
Deprecated: Return type of Symfony\Component\Process\Process::getIterator(int $flags = 0) should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Users\LAPTOP-SYAMSOUL\AppData\Roaming\Composer\vendor\symfony\process\Process.php on line 620
Deprecated: Return type of Symfony\Component\Console\Helper\HelperSet::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Users\LAPTOP-SYAMSOUL\AppData\Roaming\Composer\vendor\symfony\console\Helper\HelperSet.php on line 94
Run Code Online (Sandbox Code Playgroud)
如何解决这个错误?
我想根据图片制作一张幻灯片(使用 Slick.js),我想制作centerMode:true并focusOnSelect:true...
但问题是会有两个多余的幻灯片(左和右)。我如何删除它们?
我已经尝试设置centerMode为false. 不会有多余的幻灯片,但所选幻灯片将位于最左侧。因此,它为我设定的是很重要的centerMode对true,因为我想在中心选定的幻灯片。
对不起,我的英语不好。
任何帮助将不胜感激。
谢谢
我使用eCharts javascript插件来创建折线图....
如您在下面所附的图片中所见,y轴相互重叠。
这是我使用的选项
var colors = ['#5793f3', '#d14a61', '#675bba'];
var option = {
title: {
text: 'Wi-Fi Users & Bandwidth Usage by Day & Month Summary'
},
tooltip: {
trigger: 'axis',
formatter: function (params) {
params = params[0];
var date = new Date(params.name);
return date.getDate() + '/' + (date.getMonth() + 1) + '/' + date.getFullYear() + ' : ' + params.value[1];
},
axisPointer: {
animation: false
}
},
grid: {
left: '20%',
top: '20%',
right: '16%'
}, …Run Code Online (Sandbox Code Playgroud) 这就是我要做的...
alert(document.getElementById('test').innerHTML);Run Code Online (Sandbox Code Playgroud)
<div id="test">
hi..my name is <div>Soul</div> and I am <strong>23 years old</strong>
Thank you.
</div>Run Code Online (Sandbox Code Playgroud)
警报框将显示:
hi..my name is <div>Soul</div> and I am <strong>23 years old</strong>Thank you.
Run Code Online (Sandbox Code Playgroud)
但我想要在 ALERT BOX 中的是:
hi..my name is Soul and I am 23 years old Thank you.
Run Code Online (Sandbox Code Playgroud) 我刚开始尝试开发一个Android应用程序.但是通过使用我的旧笔记本电脑,我无法运行Android工作室,因为它在Windows 7上太沉重和缓慢.
如果我使用linux,它会是一样的吗?
我在这里遇到了一个奇怪的情况..
。
下面的代码正在运行:
// this code working perfectly
$.getScript( "https://wchat.freshchat.com/js/widget.js" ).done(( script, textStatus )=>{
// run something
});
Run Code Online (Sandbox Code Playgroud)
。
。
但是如果我将整个代码放入其中,setTimeout则会出现错误browser console
// this will give error in browser console
setTimeout(()=>{
$.getScript( "https://wchat.freshchat.com/js/widget.js" ).done(( script, textStatus )=>{
// run something
});
}, 4000);
Run Code Online (Sandbox Code Playgroud)
它会error屈服browser console:
问题是什么?
正如上面的标题,WampServer 似乎没有更新 PHP 版本列表....
我已经下载并包含php7.4.10文件夹,但列表似乎没有更新....
我什至还重新启动了我的电脑,但列表没有更新..
供您参考,这是在生产服务器上...
在测试服务器和我的本地主机中,升级 php 版本完全没有问题......
这个问题只发生在我的生产服务器上..
有没有其他方法来更新 php 版本?
目前,如果我想重定向到某个页面,我必须使用to: redirect('/this-is-some-url')..
我想知道是否可以使用Route Name例如重定向到某个页面to: redirect('route_name')
我尝试下面的代码,但它不起作用:
get '/house-url', to: redirect('home') #the value is route name
get '/home-url', to: 'home_ctrl#show', as: 'home'
Run Code Online (Sandbox Code Playgroud) 我使用 Laravel 5.8,据我们所知,Laravel 中有 3 种类型的缓存
php artisan config:cache)php artisan route:cache)php artisan view:cache)。
所以,在我的 Laravel 应用程序中,我使用Cache::remember('mycachetoday', $seconds, function(){})...
为了清除mycachetoday,我必须跑php artisan cache:clear,对吗?
但我想知道如果我运行php artisan cache:clear,配置、路由和视图缓存也会被清除吗?
谢谢