1 | use Illuminate\Support\LazyCollection; |
查了一下原始碼必須用 Closure 來回傳 Generator
1 | class LazyCollection implements Enumerable |
所以正確的寫法應該是
1 | use Illuminate\Support\LazyCollection; |
這告訴我們文件必須仔細看啊
]]>1 | // method 1 |
取得的內容會一模一樣,但是同一個 method 執行兩次是有差異的
1 | // method 1 |
後來去查了一下原始碼發現,原來 __toString 會執行 seek(0),自動將指標歸零,才能一直重覆執行啊
1 | // 部份程式碼 |
[bluetooth]
1 | sudo bluetoothctl |
裝 agent 設為 on
1 | agent on |
掃瞄裝置
1 | scan on |
配對
1 | pair xx:xx:xx:xx:xx:xx |
信任裝置
1 | trust xx:xx:xx:xx:xx:xx |
連線
1 | connect xx:xx:xx:xx:xx:xx |
Could not connect to Redis at 127.0.0.1:6379: Connection refused
,這時只要修改 redis.conf
將 bind 刪除及將 protected-mode 設為 no 即可 1 | # 將 bind 刪除或標註 |
1 | composer require league/commonmark |
1 |
|
用 administrator 的身份並用 powershell 執行以下命令
停用
1 | Disable-MMAgent -mc |
啟用
1 | Enable-MMAgent -mc |
用 administrator 的身份並用 powershell 執行以下命令
停用
1 | Stop-Service -Force -Name "SysMain"; Set-Service -Name "SysMain" -StartupType Disabled |
啟用
1 | Stop-Service -Force -Name "SysMain" |
用 administrator 的身份並用 powershell 執行以下命令,參考
停用
1 | Set-MpPreference -DisableIntrusionPreventionSystem $true -DisableIOAVProtection $true -DisableRealtimeMonitoring $true -DisableScriptScanning $true -EnableControlledFolderAccess Disabled -EnableNetworkProtection AuditMode -Force -MAPSReporting Disabled -SubmitSamplesConsent NeverSend |