RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

Close
  • 主页
  • 系统&网络
    • 热门问题
    • 最新问题
    • 标签
  • Ubuntu
    • 热门问题
    • 最新问题
    • 标签
  • 帮助
主页 / user-444939

Vladislav's questions

Martin Hope
Vladislav
Asked: 2024-08-30 03:46:57 +0000 UTC

如何通过php中的坐标获取时区[关闭]

  • 0
关闭。这个问题需要澄清或者补充细节。目前不接受对此问题的答复。

想要改进这个问题吗?通过编辑这篇文章添加更多详细信息并澄清问题。

22 小时前关闭。

改进问题

如何使用 YANDEX 服务或其他服务在 php 中获取 tz,但免费

php
  • 1 个回答
  • 27 Views
Martin Hope
Vladislav
Asked: 2024-02-16 02:16:30 +0000 UTC

如何在 Laravel 中获取作业的 jobId

  • 5

*我正在创建这个问题,因为我读过的所有问题要么引用了旧版本的 Laravel,要么没有回答我如何做到这一点。
所以,在代码本身之前有一些技术要点:

  1. 我的父控制器使用照亮\Foundation\Bus\DispatchesJobs特征,它允许在控制器中调用$this->dispatch
  2. 我调用 $jobId = $this->dispatch(new MyJob()) (从许多资源来看,当通过 Bus 特征调用作业时,它应该返回作业 id
  3. 生成的日志显示我的 $jobId = null :c
    现在关于实现:(我不会发布每个类的完整详细信息,而只会发布看起来必要的内容,但如果有必要,我将补充所有缺少的材料)

按照正确的实现,如果需要获取job之外的jobId,我使用trait

use Illuminate\Foundation\{
    Auth\Access\AuthorizesRequests,
    Bus\DispatchesJobs,
    Validation\ValidatesRequests
};

use Illuminate\Routing\Controller as BaseController;

class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;

之后,具有该特征的控制器将被调用作业本身的控制器继承

class Reports extends Controller
{
    public function build(Report $report, ReportQueue $reportQueue): Response
    {
        $jobId = null;

        if ($report->type_is_users) {
            $jobId = $this->dispatch(new BuildUsersReport($report, 1000000));
        }

执行此代码的结果是,日志显示 type_is_users = true,并且 $jobId 保持为 null。
屁股本身。让我们从以下事实开始:它也继承自一个实现 ShouldQueue 的抽象类,并使用该作业所需的特征

abstract class ExcelReport implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

还有屁股本身,但它本质上没有什么超自然的东西,而且它很大,所以我会把班级里的顶尖选手放在这里

final class BuildMessageRecipientsReport extends ExcelReport
{
    /** @var Message */
    private Message $message;

    public function __construct(Report $report, Message $message, int $sheetLineCount)
    {
        if (! $report->type_is_message_recipients) {
            throw new RuntimeException("Неверный тип отчета.");
        }

        parent::__construct($report, $sheetLineCount);

        $this->message = $message;
    }

    public function handle(

因此,通过 Horizo​​n,我监控到作业正在启动,但是当它启动时,jobId 仍然为空,我只是不知道我做错了什么来获取它。作业通过redis启动

几天后,这个问题仍然具有现实意义。

php
  • 1 个回答
  • 51 Views
Martin Hope
Vladislav
Asked: 2023-02-13 20:00:32 +0000 UTC

在装有 debian 11 的笔记本电脑上安装 Nvidia 驱动程序

  • 5

我阅读了很多论坛,其他人的答案并决定去问问我自己的......

试图通过 apt install nvidia-driver 和 .run 文件在笔记本电脑上安装驱动程序

Acer nitro 5
Nvidia GeForce RTX 3060 mobile
Intel core i5

对我来说,这一切都以悲伤的方式结束。通过.run文件安装时经常出现各种错误

通过 apt install nvidia-driver 安装时,我没有达到我的主要目标 - 第二台显示器不工作,不仅不工作,而且 xrandr,例如,甚至不知道有一个来自 vidyuhi 的 hdmi 端口...(但是来自绿色的程序,顺便说一句,知道有一个端口,甚至知道那里有什么样的 monik,但我无法得到任何更像,例如,工作的 monik)

如果您需要更多详细信息,那么我很乐意提供它们以最终解决此问题)。是的,lspci grep vga 给了我 2 vidyuhi

UPD:输出 lspci -vnq:

00:00.0 0600: 8086:9b64 (rev 02)
    Subsystem: 1025:143d
    Flags: bus master, fast devsel, latency 0, IOMMU group 0
    Capabilities: [e0] Vendor Specific Information: Len=10 <?>
    Kernel driver in use: skl_uncore

00:01.0 0604: 8086:1901 (rev 02) (prog-if 00 [Normal decode])
    Flags: bus master, fast devsel, latency 0, IRQ 122, IOMMU group 1
    Bus: primary=00, secondary=01, subordinate=05, sec-latency=0
    I/O behind bridge: 00004000-00004fff [size=4K]
    Memory behind bridge: a0000000-a10fffff [size=17M]
    Prefetchable memory behind bridge: 0000006000000000-0000006201ffffff [size=8224M]
    Capabilities: [88] Subsystem: 1025:143d
    Capabilities: [80] Power Management version 3
    Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
    Capabilities: [a0] Express Root Port (Slot+), MSI 00
    Capabilities: [100] Virtual Channel
    Capabilities: [140] Root Complex Link
    Capabilities: [d94] Secondary PCI Express
    Kernel driver in use: pcieport

00:02.0 0300: 8086:9bc4 (rev 05) (prog-if 00 [VGA controller])
    Subsystem: 1025:143d
    Flags: bus master, fast devsel, latency 0, IRQ 138, IOMMU group 2
    Memory at 6202000000 (64-bit, non-prefetchable) [size=16M]
    Memory at 4000000000 (64-bit, prefetchable) [size=256M]
    I/O ports at 5000 [size=64]
    Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
    Capabilities: [40] Vendor Specific Information: Len=0c <?>
    Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
    Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable- 64bit-
    Capabilities: [d0] Power Management version 2
    Capabilities: [100] Process Address Space ID (PASID)
    Capabilities: [200] Address Translation Service (ATS)
    Capabilities: [300] Page Request Interface (PRI)
    Kernel driver in use: i915
    Kernel modules: i915

00:04.0 1180: 8086:1903 (rev 02)
    Subsystem: 1025:143d
    Flags: bus master, fast devsel, latency 0, IRQ 16, IOMMU group 3
    Memory at 6203100000 (64-bit, non-prefetchable) [size=32K]
    Capabilities: [90] MSI: Enable- Count=1/1 Maskable- 64bit-
    Capabilities: [d0] Power Management version 3
    Capabilities: [e0] Vendor Specific Information: Len=0c <?>
    Kernel driver in use: proc_thermal
    Kernel modules: processor_thermal_device

00:08.0 0880: 8086:1911
    Subsystem: 1025:143d
    Flags: bus master, fast devsel, latency 0, IRQ 255, IOMMU group 4
    Memory at 6203118000 (64-bit, non-prefetchable) [size=4K]
    Capabilities: [90] MSI: Enable- Count=1/1 Maskable- 64bit-
    Capabilities: [dc] Power Management version 2
    Capabilities: [f0] PCI Advanced Features

00:12.0 1180: 8086:06f9
    Subsystem: 1025:143d
    Flags: bus master, fast devsel, latency 0, IRQ 16, IOMMU group 5
    Memory at 6203117000 (64-bit, non-prefetchable) [size=4K]
    Capabilities: [50] Power Management version 3
    Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
    Kernel driver in use: intel_pch_thermal
    Kernel modules: intel_pch_thermal

00:14.0 0c03: 8086:06ed (prog-if 30 [XHCI])
    Subsystem: 1025:143d
    Flags: bus master, medium devsel, latency 0, IRQ 137, IOMMU group 6
    Memory at a1380000 (64-bit, non-prefetchable) [size=64K]
    Capabilities: [70] Power Management version 2
    Capabilities: [80] MSI: Enable+ Count=1/8 Maskable- 64bit+
    Capabilities: [90] Vendor Specific Information: Len=14 <?>
    Kernel driver in use: xhci_hcd
    Kernel modules: xhci_pci

00:14.2 0500: 8086:06ef
    Subsystem: 1025:143d
    Flags: bus master, fast devsel, latency 0, IOMMU group 6
    Memory at 6203110000 (64-bit, non-prefetchable) [size=8K]
    Memory at 6203116000 (64-bit, non-prefetchable) [size=4K]
    Capabilities: [80] Power Management version 3

00:14.3 0280: 8086:06f0
    Subsystem: 8086:0074
    Flags: fast devsel, IRQ 16, IOMMU group 7
    Memory at 620310c000 (64-bit, non-prefetchable) [size=16K]
    Capabilities: [c8] Power Management version 3
    Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit+
    Capabilities: [40] Express Root Complex Integrated Endpoint, MSI 00
    Capabilities: [80] MSI-X: Enable- Count=16 Masked-
    Capabilities: [100] Latency Tolerance Reporting
    Capabilities: [164] Vendor Specific Information: ID=0010 Rev=0 Len=014 <?>
    Kernel modules: iwlwifi

00:15.0 0c80: 8086:06e8
    Subsystem: 1025:143d
    Flags: bus master, fast devsel, latency 0, IRQ 16, IOMMU group 8
    Memory at 4010000000 (64-bit, non-prefetchable) [virtual] [size=4K]
    Capabilities: [80] Power Management version 3
    Capabilities: [90] Vendor Specific Information: Len=14 <?>
    Kernel driver in use: intel-lpss
    Kernel modules: intel_lpss_pci

00:15.1 0c80: 8086:06e9
    Subsystem: 1025:143d
    Flags: bus master, fast devsel, latency 0, IRQ 17, IOMMU group 8
    Memory at 4010001000 (64-bit, non-prefetchable) [virtual] [size=4K]
    Capabilities: [80] Power Management version 3
    Capabilities: [90] Vendor Specific Information: Len=14 <?>
    Kernel driver in use: intel-lpss
    Kernel modules: intel_lpss_pci

00:16.0 0780: 8086:06e0
    Subsystem: 1025:143d
    Flags: bus master, fast devsel, latency 0, IRQ 139, IOMMU group 9
    Memory at 6203113000 (64-bit, non-prefetchable) [size=4K]
    Capabilities: [50] Power Management version 3
    Capabilities: [8c] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Capabilities: [a4] Vendor Specific Information: Len=14 <?>
    Kernel driver in use: mei_me
    Kernel modules: mei_me

00:17.0 0106: 8086:06d3 (prog-if 01 [AHCI 1.0])
    Subsystem: 1025:143d
    Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 136, IOMMU group 10
    Memory at a1390000 (32-bit, non-prefetchable) [size=8K]
    Memory at a1394000 (32-bit, non-prefetchable) [size=256]
    I/O ports at 5080 [size=8]
    I/O ports at 5088 [size=4]
    I/O ports at 5060 [size=32]
    Memory at a1393000 (32-bit, non-prefetchable) [size=2K]
    Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
    Capabilities: [70] Power Management version 3
    Capabilities: [a8] SATA HBA v1.0
    Kernel driver in use: ahci
    Kernel modules: ahci

00:1b.0 0604: 8086:06ac (rev f0) (prog-if 00 [Normal decode])
    Flags: bus master, fast devsel, latency 0, IRQ 123, IOMMU group 11
    Bus: primary=00, secondary=06, subordinate=06, sec-latency=0
    I/O behind bridge: [disabled]
    Memory behind bridge: a1200000-a12fffff [size=1M]
    Prefetchable memory behind bridge: [disabled]
    Capabilities: [40] Express Root Port (Slot+), MSI 00
    Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
    Capabilities: [90] Subsystem: 1025:143d
    Capabilities: [a0] Power Management version 3
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [140] Access Control Services
    Capabilities: [150] Precision Time Measurement
    Capabilities: [200] L1 PM Substates
    Capabilities: [220] Secondary PCI Express
    Capabilities: [250] Downstream Port Containment
    Kernel driver in use: pcieport

00:1d.0 0604: 8086:06b5 (rev f0) (prog-if 00 [Normal decode])
    Flags: bus master, fast devsel, latency 0, IRQ 124, IOMMU group 12
    Bus: primary=00, secondary=07, subordinate=07, sec-latency=0
    I/O behind bridge: 00003000-00003fff [size=4K]
    Memory behind bridge: a1100000-a11fffff [size=1M]
    Prefetchable memory behind bridge: [disabled]
    Capabilities: [40] Express Root Port (Slot+), MSI 00
    Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
    Capabilities: [90] Subsystem: 1025:143d
    Capabilities: [a0] Power Management version 3
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [140] Access Control Services
    Capabilities: [150] Precision Time Measurement
    Capabilities: [220] Secondary PCI Express
    Capabilities: [250] Downstream Port Containment
    Kernel driver in use: pcieport

00:1f.0 0601: 8086:068d
    Subsystem: 1025:143d
    Flags: bus master, medium devsel, latency 0, IOMMU group 13

00:1f.3 0403: 8086:06c8 (prog-if 80)
    Subsystem: 1025:143d
    Flags: bus master, fast devsel, latency 32, IRQ 140, IOMMU group 13
    Memory at 6203108000 (64-bit, non-prefetchable) [size=16K]
    Memory at 6203000000 (64-bit, non-prefetchable) [size=1M]
    Capabilities: [50] Power Management version 3
    Capabilities: [80] Vendor Specific Information: Len=14 <?>
    Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel, snd_sof_pci

00:1f.4 0c05: 8086:06a3
    Subsystem: 1025:143d
    Flags: medium devsel, IRQ 16, IOMMU group 13
    Memory at 6203112000 (64-bit, non-prefetchable) [size=256]
    I/O ports at efa0 [size=32]
    Kernel driver in use: i801_smbus
    Kernel modules: i2c_i801

00:1f.5 0c80: 8086:06a4
    Subsystem: 1025:143d
    Flags: bus master, fast devsel, latency 0, IOMMU group 13
    Memory at fe010000 (32-bit, non-prefetchable) [size=4K]

01:00.0 0300: 10de:2520 (rev a1) (prog-if 00 [VGA controller])
    Subsystem: 1025:143e
    Flags: bus master, fast devsel, latency 0, IRQ 141, IOMMU group 1
    Memory at a0000000 (32-bit, non-prefetchable) [size=16M]
    Memory at 6000000000 (64-bit, prefetchable) [size=8G]
    Memory at 6200000000 (64-bit, prefetchable) [size=32M]
    I/O ports at 4000 [size=128]
    Expansion ROM at a1080000 [virtual] [disabled] [size=512K]
    Capabilities: [60] Power Management version 3
    Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Capabilities: [78] Express Legacy Endpoint, MSI 00
    Capabilities: [b4] Vendor Specific Information: Len=14 <?>
    Capabilities: [100] Virtual Channel
    Capabilities: [250] Latency Tolerance Reporting
    Capabilities: [258] L1 PM Substates
    Capabilities: [128] Power Budgeting <?>
    Capabilities: [420] Advanced Error Reporting
    Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
    Capabilities: [900] Secondary PCI Express
    Capabilities: [bb0] Physical Resizable BAR
    Capabilities: [c1c] Physical Layer 16.0 GT/s <?>
    Capabilities: [d00] Lane Margining at the Receiver <?>
    Capabilities: [e00] Data Link Feature <?>
    Kernel driver in use: nvidia
    Kernel modules: nvidia

01:00.1 0403: 10de:228e (rev a1)
    Subsystem: 10de:0000
    Flags: bus master, fast devsel, latency 0, IRQ 17, IOMMU group 1
    Memory at a1000000 (32-bit, non-prefetchable) [size=16K]
    Capabilities: [60] Power Management version 3
    Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
    Capabilities: [78] Express Endpoint, MSI 00
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [160] Data Link Feature <?>
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel

06:00.0 0108: 15b7:5009 (rev 01) (prog-if 02 [NVM Express])
    Subsystem: 15b7:5009
    Flags: bus master, fast devsel, latency 0, IRQ 16, NUMA node 0, IOMMU group 14
    Memory at a1200000 (64-bit, non-prefetchable) [size=16K]
    Memory at a1204000 (64-bit, non-prefetchable) [size=256]
    Capabilities: [80] Power Management version 3
    Capabilities: [90] MSI: Enable- Count=1/32 Maskable- 64bit+
    Capabilities: [b0] MSI-X: Enable+ Count=17 Masked-
    Capabilities: [c0] Express Endpoint, MSI 00
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [150] Device Serial Number 00-00-00-00-00-00-00-00
    Capabilities: [1b8] Latency Tolerance Reporting
    Capabilities: [300] Secondary PCI Express
    Capabilities: [900] L1 PM Substates
    Kernel driver in use: nvme
    Kernel modules: nvme

07:00.0 0200: 10ec:2600 (rev 21)
    Subsystem: 1025:143d
    Flags: bus master, fast devsel, latency 0, IRQ 17, IOMMU group 15
    I/O ports at 3000 [size=256]
    Memory at a1104000 (64-bit, non-prefetchable) [size=4K]
    Memory at a1100000 (64-bit, non-prefetchable) [size=16K]
    Capabilities: [40] Power Management version 3
    Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
    Capabilities: [70] Express Endpoint, MSI 01
    Capabilities: [b0] MSI-X: Enable+ Count=4 Masked-
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [140] Virtual Channel
    Capabilities: [160] Device Serial Number 01-00-00-00-68-4c-e0-00
    Capabilities: [170] Latency Tolerance Reporting
    Capabilities: [178] L1 PM Substates
    Kernel driver in use: r8169
    Kernel modules: r8169

显然我现在有 apt install nvidia-driver

UPD2:
输出xrandr:

vlad@debian:~$ sudo xrandr
[sudo] password for vlad: 
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1920x1080    144.00*+  60.01    60.02    59.97    59.96    59.93  
   1680x1050     84.94    74.89    69.88    59.95    59.88  
   1600x1024     60.17  
   1400x1050     85.00    74.76    70.00    59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     85.02    75.02    60.02  
   1440x900      59.89  
   1400x900      59.96    59.88  
   1280x960      85.00    60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1360x768      59.80    59.96  
   1280x800      59.99    59.97    59.81    59.91  
   1152x864     100.00    85.06    85.00    75.00    75.00    70.00    60.00  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      85.00    75.05    60.04    85.00    75.03    70.07    60.00  
   1024x768i     86.96  
   960x720       85.00    75.00    60.00  
   928x696       75.00    60.05  
   896x672       75.05    60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   832x624       74.55  
   960x540       59.96    59.99    59.63    59.82  
   800x600       85.00    75.00    70.00    65.00    60.00    85.14    72.19    75.00    60.32    56.25  
   840x525       85.02    74.96    69.88    60.01    59.88  
   864x486       59.92    59.57  
   800x512       60.17  
   700x525       85.08    74.76    70.06    59.98  
   800x450       59.95    59.82  
   640x512       85.02    75.02    60.02  
   720x450       59.89  
   700x450       59.96    59.88  
   640x480       85.09    60.00    85.01    72.81    75.00    59.94  
   720x405       59.51    58.99  
   720x400       85.04  
   684x384       59.88    59.85  
   680x384       59.80    59.96  
   640x400       59.88    59.98    85.08  
   576x432      100.11    85.15    85.09    75.00    75.00    70.00    60.06  
   640x360       59.86    59.83    59.84    59.32  
   640x350       85.08  
   512x384       85.00    75.03    70.07    60.00  
   512x384i      87.06  
   512x288       60.00    59.92  
   416x312       74.66  
   480x270       59.63    59.82  
   400x300       85.27    72.19    75.12    60.32    56.34  
   432x243       59.92    59.57  
   320x240       85.18    72.81    75.00    60.05  
   360x202       59.51    59.13  
   360x200       85.04  
   320x200       85.27  
   320x180       59.84    59.32  
   320x175       85.27  

输出 inxi -Fxz

System:    Kernel: 5.10.0-21-amd64 x86_64 bits: 64 compiler: gcc v: 10.2.1 Desktop: Xfce 4.16.0 
           Distro: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: Laptop System: Acer product: Nitro AN515-55 v: V2.01 serial: <filter> 
           Mobo: CML model: Stonic_CMS v: V2.01 serial: <filter> UEFI: Insyde v: 2.01 date: 01/07/2021 
Battery:   ID-1: BAT1 charge: 43.1 Wh condition: 43.1/57.5 Wh (75%) model: LGC AP18E8M status: Full 
CPU:       Info: Quad Core model: Intel Core i5-10300H bits: 64 type: MT MCP arch: Comet Lake rev: 2 L2 cache: 8 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 39999 
           Speed: 900 MHz min/max: 800/4500 MHz Core speeds (MHz): 1: 900 2: 900 3: 900 4: 900 5: 900 6: 900 7: 900 8: 900 
Graphics:  Device-1: Intel CometLake-H GT2 [UHD Graphics] vendor: Acer Incorporated ALI driver: i915 v: kernel bus ID: 00:02.0 
           Device-2: NVIDIA GA106M [GeForce RTX 3060 Mobile / Max-Q] vendor: Acer Incorporated ALI driver: nvidia v: 525.85.12 
           bus ID: 01:00.0 
           Device-3: Quanta HD User Facing type: USB driver: uvcvideo bus ID: 1-5:3 
           Display: x11 server: X.Org 1.20.11 driver: loaded: modesetting,nvidia unloaded: fbdev,nouveau,vesa 
           resolution: 1920x1080~144Hz 
           OpenGL: renderer: Mesa Intel UHD Graphics (CML GT2) v: 4.6 Mesa 20.3.5 direct render: Yes 
Audio:     Device-1: Intel Comet Lake PCH cAVS vendor: Acer Incorporated ALI driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
           Device-2: NVIDIA GA106 High Definition Audio driver: snd_hda_intel v: kernel bus ID: 01:00.1 
           Sound Server: ALSA v: k5.10.0-21-amd64 
Network:   Device-1: Intel Comet Lake PCH CNVi WiFi driver: N/A port: 5000 bus ID: 00:14.3 
           Device-2: Realtek vendor: Acer Incorporated ALI driver: r8169 v: kernel port: 3000 bus ID: 07:00.0 
           IF: enp7s0 state: up speed: 100 Mbps duplex: full mac: <filter> 
Bluetooth: Device-1: Intel type: USB driver: btusb v: 0.8 bus ID: 1-14:4 
           Report: ID: hci0 state: down address: <filter> 
Drives:    Local Storage: total: 1.38 TiB used: 20.02 GiB (1.4%) 
           ID-1: /dev/nvme0n1 vendor: Western Digital model: PC SN530 SDBPNPZ-512G-1114 size: 476.94 GiB 
           ID-2: /dev/sda vendor: Western Digital model: WDS100T2B0A-00SM50 size: 931.51 GiB temp: 37 C 
Partition: ID-1: / size: 91.11 GiB used: 15.55 GiB (17.1%) fs: ext4 dev: /dev/sda3 
           ID-2: /boot/efi size: 96 MiB used: 32.3 MiB (33.6%) fs: vfat dev: /dev/nvme0n1p1 
           ID-3: /home size: 200.61 GiB used: 4.44 GiB (2.2%) fs: ext4 dev: /dev/sda6 
           ID-4: /tmp size: 45.53 GiB used: 84 KiB (0.0%) fs: ext4 dev: /dev/sda2 
Swap:      ID-1: swap-1 type: partition size: 59.6 GiB used: 0 KiB (0.0%) dev: /dev/sda4 
Sensors:   System Temperatures: cpu: 48.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Info:      Processes: 225 Uptime: 41m Memory: 15.47 GiB used: 2.18 GiB (14.1%) Init: systemd runlevel: 5 Compilers: 
           gcc: 10.2.1 Packages: 1565 Shell: Bash v: 5.1.4 inxi: 3.3.01 
linux
  • 1 个回答
  • 56 Views
Martin Hope
Vladislav
Asked: 2022-08-03 15:28:23 +0000 UTC

问题 ts2322。无法将类对象传递给复选框

  • -1

我正在将项目从 jsx 重写为 tsx,更改为 tsx 后,ui kit mui for classes 的复选框出现错误。

Type 'string | undefined' is not assignable to type 'Partial<CheckboxClasses> | undefined'.
  Type 'string' has no properties in common with type 'Partial<CheckboxClasses>'.ts(2322)
Checkbox.d.ts(26, 3): The expected type comes from property 'classes' which is declared here on type 'IntrinsicAttributes & CheckboxProps'

为了。
1. 有一个接口,描述了数据和它们实现的类型 2. 传递给复选框时,我得到这样的错误,我不知道如何解决它:(在此处输入图像描述
在此处输入图像描述

PS我也在Google Drive上转移了复选框本身(我提醒你它不是自己编写的,而是来自mui库

javascript reactjs
  • 1 个回答
  • 27 Views
Martin Hope
Vladislav
Asked: 2022-08-28 13:31:44 +0000 UTC

如何捕捉“褪色”访问令牌 jwt 的时刻?

  • 3

我在做前面并面临一个问题:后面给我发了访问和刷新令牌,以及如何捕捉访问令牌变坏的时刻并发送请求以发出新的?
大部分是理论建议,但如果有实际例子我不会拒绝)
我在view中写前面,我通过axios向后面发送请求

javascript vue.js
  • 2 个回答
  • 77 Views
Martin Hope
Vladislav
Asked: 2022-09-03 22:52:17 +0000 UTC

如何放大活动的居中幻灯片?

  • 0

我连接了滑块,在滑块对象中指出了我需要的一切:在此处输入图像描述

我目前拥有的代码(查看堆栈上的执行时,它没有按应有的方式显示(缩进不起作用)。请单击展开片段以查看正在运行的代码):

let swiper = new Swiper(".swiper", {
 
        loop: true,
        centeredSlides: true,

        slidesPerView: 3,
        spaceBetween: 60, 
        pagination: {
          el: ".swiper-pagination",
          clickable: true,
          speed: 1000
        },
        speed: 1000,
        navigation: {
          nextEl: '.swiper-button-next',
          prevEl: '.swiper-button-prev',
        } 
      });
.swiper-slide img {
  width: 427px;
  height: 570px;
}
.swiper-slide {
  width: 427px;
  height: 570px;
}
<script defer src="https://unpkg.com/swiper@8/swiper-bundle.min.js"></script>
<link href="https://unpkg.com/swiper@8/swiper-bundle.min.css" rel="stylesheet"/>
<div class="slider-container swiper-container">
    <div class="swiper swiper-container">
      <div class="swiper-wrapper">
        <div class="swiper-slide">
          <img src="https://klike.net/uploads/posts/2019-01/1547366815_1.jpg" alt="">
        </div>
        <div class="swiper-slide">
          <img src="https://klike.net/uploads/posts/2019-01/1547366815_1.jpg" alt="">
        </div>
        <div class="swiper-slide">
          <img src="https://klike.net/uploads/posts/2019-01/1547366815_1.jpg" alt="">
        </div>
        <div class="swiper-slide">
          <img src="https://klike.net/uploads/posts/2019-01/1547366815_1.jpg" alt="">
        </div>
        <div class="swiper-slide">
          <img src="https://klike.net/uploads/posts/2019-01/1547366815_1.jpg" alt="">
        </div>
      </div>
      <div class="swiper-pagination"></div>
      <div class="btn-container">
        <div class="swiper-button-prev"></div>
        <div class="swiper-button-next"></div>
      </div>
    </div>
  </div>
  

现在我需要在活动(中央)幻灯片中实现增加,我不知道该怎么做,因为当宽度/高度或 transform:scale() 改变时图片向右增加......结果,我得到以下结果在此处输入图像描述 。
在此处输入图像描述

请帮助
UPD:我试图查看其他答案中的选项,但它们要么不起作用,要么不适合我。也许我在某个地方错过了它......

javascript
  • 1 个回答
  • 10 Views
Martin Hope
Vladislav
Asked: 2022-08-09 22:41:00 +0000 UTC

向laravel发送假文件时应用程序/空

  • 1

我正在编写一个 http 文件上传测试并在运行测试时收到应用程序/空错误
我的测试:

public function testUploadContract() {

    $user = User::where('id', '=', $this->companyId)->first();
    $token = JWTAuth::fromUser($user);
    Storage::fake('files');
    $file = UploadedFile::fake()->create('file.pdf', 100, ['Content-Type' => 'application/pdf']);
    $response = $this->withHeaders(['Authorization' => "Bearer $token", 'Content-Type' => 'application/pdf'])->withoutExceptionHandling()->post('/api/v2/company/documents/upload', ['file' => $file]);
    $response->dump();
    $response->assertStatus(200);
}       

我的控制器:

public function upload(Request $request)
{
    // dd($request);
    if ($request->hasFile('file') == false) {
        // dump($request->file());
        return response()
            ->json([
                'title' => 'Ошибка',
                'message' => 'Не передан файл с реестром!'
            ], 400, [], JSON_UNESCAPED_UNICODE || JSON_UNESCAPED_SLASHES);
    }

    $validMimeTypes = [
        'application/pdf',
    ];
    $mimeType = mime_content_type($request->file->getPathname());
    if (in_array($mimeType, $validMimeTypes) == false) {
        return response()
            ->json([
                'title' => 'Ошибка',
                'message' => 'Плохой тип файла (' . $mimeType . ')'
            ], 400, [], JSON_UNESCAPED_UNICODE || JSON_UNESCAPED_SLASHES);
    }
    $path = Storage::disk('public')->putFile('temp', $request->file('file'));
    $url = Storage::disk('public')->url($path);

    Log::channel('debug')->debug("FILE IS $url");

    return response()
        ->json([
            'title' => 'Файл загружен',
            'message' => 'Файл успешно загружен',
            'path' => $path,
            'preview' => Storage::disk('public')->url($path)
        ], 200, [], JSON_UNESCAPED_UNICODE || JSON_UNESCAPED_SLASHES);
}       

当我按预期从客户端下载文件时,一切都很好,在测试中这是输出: 在此处输入图像描述
在此处输入图像描述

我现在可以附加的最后一件事是来自伪造者的文件转储: 在此处输入图像描述

请帮忙,我真的不知道该怎么办

laravel
  • 1 个回答
  • 10 Views
Martin Hope
Vladislav
Asked: 2022-07-23 16:11:57 +0000 UTC

如何制作自定义css形状

  • 1

伙计们,我已经对此感到头疼,请帮助。
如何在css中制作这个形状?在此处输入图像描述

它的特点是它有一些不寻常的方面。我计算的边角的边界半径是 5px(但我可能在某个地方错了),但是这个边界半径无助于使我的左右两侧更圆

html
  • 1 个回答
  • 10 Views
Martin Hope
Vladislav
Asked: 2022-07-01 23:39:38 +0000 UTC

如果放在字符串中,是否会在 laravel 中调用方法?

  • 0

也许这很糟糕,但让我们看看你说什么以及解决方案是什么。
我正在为通知编写通用作业。有一个动作字段“动作”,我需要,取决于传递给实例的内容(哪个方法),然后用它代替方法。
当然,我会在其中放置一个变量而不是字符串,但它并没有太大变化,因为我会为变量分配一个字符串,例如“follow”、“entity”等。(注意截图)在此处输入图像描述

如果这真的很糟糕并且不起作用,那么请告诉我该怎么做?

php
  • 1 个回答
  • 10 Views

Sidebar

Stats

  • 问题 10021
  • Answers 30001
  • 最佳答案 8000
  • 用户 6900
  • 常问
  • 回答
  • Marko Smith

    我看不懂措辞

    • 1 个回答
  • Marko Smith

    请求的模块“del”不提供名为“default”的导出

    • 3 个回答
  • Marko Smith

    "!+tab" 在 HTML 的 vs 代码中不起作用

    • 5 个回答
  • Marko Smith

    我正在尝试解决“猜词”的问题。Python

    • 2 个回答
  • Marko Smith

    可以使用哪些命令将当前指针移动到指定的提交而不更改工作目录中的文件?

    • 1 个回答
  • Marko Smith

    Python解析野莓

    • 1 个回答
  • Marko Smith

    问题:“警告:检查最新版本的 pip 时出错。”

    • 2 个回答
  • Marko Smith

    帮助编写一个用值填充变量的循环。解决这个问题

    • 2 个回答
  • Marko Smith

    尽管依赖数组为空,但在渲染上调用了 2 次 useEffect

    • 2 个回答
  • Marko Smith

    数据不通过 Telegram.WebApp.sendData 发送

    • 1 个回答
  • Martin Hope
    Alexandr_TT 2020年新年大赛! 2020-12-20 18:20:21 +0000 UTC
  • Martin Hope
    Alexandr_TT 圣诞树动画 2020-12-23 00:38:08 +0000 UTC
  • Martin Hope
    Air 究竟是什么标识了网站访问者? 2020-11-03 15:49:20 +0000 UTC
  • Martin Hope
    Qwertiy 号码显示 9223372036854775807 2020-07-11 18:16:49 +0000 UTC
  • Martin Hope
    user216109 如何为黑客设下陷阱,或充分击退攻击? 2020-05-10 02:22:52 +0000 UTC
  • Martin Hope
    Qwertiy 并变成3个无穷大 2020-11-06 07:15:57 +0000 UTC
  • Martin Hope
    koks_rs 什么是样板代码? 2020-10-27 15:43:19 +0000 UTC
  • Martin Hope
    Sirop4ik 向 git 提交发布的正确方法是什么? 2020-10-05 00:02:00 +0000 UTC
  • Martin Hope
    faoxis 为什么在这么多示例中函数都称为 foo? 2020-08-15 04:42:49 +0000 UTC
  • Martin Hope
    Pavel Mayorov 如何从事件或回调函数中返回值?或者至少等他们完成。 2020-08-11 16:49:28 +0000 UTC

热门标签

javascript python java php c# c++ html android jquery mysql

Explore

  • 主页
  • 问题
    • 热门问题
    • 最新问题
  • 标签
  • 帮助

Footer

RError.com

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

帮助

© 2023 RError.com All Rights Reserve   沪ICP备12040472号-5