RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

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

全部问题

Martin Hope
user3178479
Asked: 2020-03-11 02:54:28 +0000 UTC

具有非均匀背景的块内的渐变边框

  • 9

为块绘制这样的边框的选项和方法是什么?

此边框位于具有背景图像(非均匀背景)的块内。距离边缘 15 像素。内部透明。边界被打破。

在此处输入图像描述

.box {
  position: relative;
  margin-bottom: 20px;
  padding: 15px;
}

.box-inner {
  width: 100%;
  height: 100%;
    background-clip: padding-box; 
  border: solid 2px transparent;
}

.box:after {
  content: '';
  position: absolute;
  top: 15px;
  left:15px;
  right: 15px;
  bottom: 15px;
  background: linear-gradient(to right, red, orange);
}

.box-1 {
  width: 200px;
  height: 200px;
  background: url(https://picsum.photos/200/300);
}

.box-2 {
  width: 200px;
  height: 500px;
  background: url(https://picsum.photos/200/300);
}
<div class="box box-1">
  <div class="box-inner"></div>
</div>
  
  <div class="box box-2">
  <div class="box-inner"></div>
</div>

background-clip: padding-box; 不起作用。

html
  • 2 个回答
  • 10 Views
Martin Hope
go2goj
Asked: 2020-11-29 00:40:21 +0000 UTC

编译器生成的方法 - 有什么意义?

  • 9

例如,编译器生成的枚举方法 values() 和 valueOf(String name) (它们不在Enum类中):为什么不在 Enum 类中像其他方法一样声明它们?
这些方法的文档在哪里?

java
  • 2 个回答
  • 10 Views
Martin Hope
Andrej Levkovitch
Asked: 2020-11-22 20:40:29 +0000 UTC

析构函数调用和编译器优化

  • 9

我们都知道编译器会丢弃未使用的变量,如i下面的变量:

int main() {
  int a = 10;
  int i = 15;

  std::cout << a << std::endl;

  return 0;
}

我还对编译器是否可以在变量离开作用域之前调用析构函数感兴趣(例如,在它最后一次使用之后)。特别感兴趣的是以下情况:

int foo() {
  static std::mutex mutex;
  std::lock_guard<std::mutex>{mutex};
  ... some code ...

  return 0;
}

Tobish:在这种情况下,是否有可能在函数退出之前释放互斥锁?

c++
  • 3 个回答
  • 10 Views
Martin Hope
Andrey M
Asked: 2020-10-16 20:00:31 +0000 UTC

使用以太网帧时在 Linux 下设置 10Gb 网卡

  • 9

我不确定这个问题是否符合规则,但仍然。

有一张 10Gb 的卡(品牌不重要,因为结果在另外两个与此不同的卡上重复)并Debian Buster通过光学直接连接到数据源机器。大约 9Gb 的数据流被组织起来,由大约 9000 字节的以太网帧组成,其中除了发送者的 MAC、接收者的 MAC、自定义 EtherType 和数据包计数器之外什么都没有。

实用程序wireshark, tshark,的测量结果tcpdump(尽管它们都通过同一个库工作)表明大约每隔一个包就会被跳过。自写的曲线代码显示大致相同。同时,在Windows 7同一个wireshark(分配了很大的缓冲区)下,它会捕获所有数据包。

使用 TCP 流量上的实用程序检查网络带宽iperf3可得到稳定的 9.8Gb。

# uname -a

Linux debian 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2 (2019-08-28) x86_64 GNU/Linux


# ifconfig enp1s0

enp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 12000
        inet 10.0.0.1  netmask 255.255.255.0  broadcast 10.0.255.255
        inet6 fe80::b2c5:54ff:feff:f37f  prefixlen 64  scopeid 0x20<link>
        ether b0:c5:54:ff:f3:7f  txqueuelen 3000  (Ethernet)
        RX packets 1501482032  bytes 13216245041216 (12.0 TiB)
        RX errors 0  dropped 1501472982  overruns 0  frame 0
        TX packets 75  bytes 7809 (7.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 34  memory 0x90400000-90410000  



# ethtool -g enp1s0

Ring parameters for enp1s0:
Pre-set maximums:
RX:     1365
RX Mini:    0
RX Jumbo:   0
TX:     2048
Current hardware settings:
RX:     1365
RX Mini:    0
RX Jumbo:   0
TX:     2048

# ethtool -k enp1s0

Features for enp1s0:
rx-checksumming: on
tx-checksumming: on
    tx-checksum-ipv4: on
    tx-checksum-ip-generic: off [fixed]
    tx-checksum-ipv6: off [fixed]
    tx-checksum-fcoe-crc: off [fixed]
    tx-checksum-sctp: off [fixed]
scatter-gather: on
    tx-scatter-gather: on
    tx-scatter-gather-fraglist: on
tcp-segmentation-offload: on
    tx-tcp-segmentation: on
    tx-tcp-ecn-segmentation: off [fixed]
    tx-tcp-mangleid-segmentation: off
    tx-tcp6-segmentation: off [fixed]
udp-fragmentation-offload: off
generic-segmentation-offload: on
generic-receive-offload: on
large-receive-offload: off [fixed]
rx-vlan-offload: on
tx-vlan-offload: on
ntuple-filters: off [fixed]
receive-hashing: on
highdma: on
rx-vlan-filter: on
vlan-challenged: off [fixed]
tx-lockless: off [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-gre-csum-segmentation: off [fixed]
tx-ipxip4-segmentation: off [fixed]
tx-ipxip6-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
tx-udp_tnl-csum-segmentation: off [fixed]
tx-gso-partial: off [fixed]
tx-sctp-segmentation: off [fixed]
tx-esp-segmentation: off [fixed]
tx-udp-segmentation: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off [fixed]
rx-all: off [fixed]
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
hw-tc-offload: off [fixed]
esp-hw-offload: off [fixed]
esp-tx-csum-hw-offload: off [fixed]
rx-udp_tunnel-port-offload: off [fixed]
tls-hw-tx-offload: off [fixed]
tls-hw-rx-offload: off [fixed]
rx-gro-hw: off [fixed]
tls-hw-record: off [fixed] 

我不太了解网络堆栈,坦率地说,在设置网络时“浮动”,所以我请求社区的帮助,或者至少是一个可以挖掘的向量。特别感兴趣的是这条线RX errors 0 dropped 1501472982 overruns 0 frame 0

linux
  • 2 个回答
  • 10 Views
Martin Hope
webphp
Asked: 2020-10-10 07:27:06 +0000 UTC

如何为图标绘制字母 Z?

  • 9

我需要Z在 SVG 上为图标绘制一个字母。

<?xml version="1.0" encoding="iso-8859-1"?>
<svg xmlns="http://www.w3.org/2000/svg" width="400px" height="400px" viewBox="0 0 32 32">
       <path d="M2 0h28a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 
       0 1 2-2z" fill="#e35604"></path>
       <path d="БУКВА Z"></path>
    </svg>

要获取此图标:

在此处输入图像描述

css
  • 5 个回答
  • 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