RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

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

全部问题

Martin Hope
Роман
Asked: 2024-10-13 05:04:36 +0000 UTC

网格模板,在一个父级中排列 12 个块

  • 4
grid-template:
        "a a b b b b b b b b " 110px
        "c c c c c c c c c c" 70px / 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;

在第二行中,您需要放置 10 个相同的块和图像。如果将每个图像grid-area: с;相互分配,它将重叠。并为每个图像分配一个唯一的区域。这有点贵,所有的块都在一个父级中......

按顺序,块a- 1 块(图像),c- 10 块(图像),b- 简单 div

在第一行中,该块a应占据 20%,其余的是块“b”。在第二行中,您需要排列 10 个图像,使它们均匀地占据整个宽度。

.container { 
  display: grid;
  gap: 10px;
  padding:10px;
  grid-template:
    "a a b b b b b b b b" 170px 
    "c3 c4 c5 c6 c7 c8 c9 c10 c11 c12" 70px;
}

.b { grid-area: b; }
.a { grid-area: a; }

.c:nth-child(3) {grid-area: c3}
.c:nth-child(4) {grid-area: c4}
.c:nth-child(5) {grid-area: c5}
.c:nth-child(6) {grid-area: c6}
.c:nth-child(7) {grid-area: c7}
.c:nth-child(8) {grid-area: c8}
.c:nth-child(9) {grid-area: c9}
.c:nth-child(9) {grid-area: c9}
.c:nth-child(11){grid-area: c11}
.c:nth-child(12){grid-area: c12}

.container * {
  border: 1px solid red;
  position: relative;
}

.container *:after {
  content:attr(class);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: grid;
  align-items: center;
  justify-content: center;
}
<div class="container">
  <div class="b"></div>
  <div class="a"></div>
  <div class="c"></div>
  <div class="c"></div>
  <div class="c"></div>
  <div class="c"></div>
  <div class="c"></div>
  <div class="c"></div>
  <div class="c"></div>
  <div class="c"></div>
  <div class="c"></div>
  <div class="c"></div>
</div>

html
  • 1 个回答
  • 28 Views
Martin Hope
Роман
Asked: 2024-10-13 02:35:04 +0000 UTC

无法在类中声明,但可以在对象中声明

  • 5
class test {
    constructor() {
        (el = 2323);
        console.log(el);
    }
}
window.addEventListener('DOMContentLoaded', _ => new test());


window.addEventListener('DOMContentLoaded', _ => ({
    int: function() {
        (m = 333);
        console.log(m);
    }
}).int())

为什么在类中,如果您需要将数据放入变量中,而不首先声明它而是将其放在括号中。它不起作用,但它适用于该对象......

在某些情况下,我会立即将数据输入括号中的变量中。当有必要时,例如,挂起一个侦听器,然后稍后访问该变量。

可以像启动对象一样启动类,我不喜欢多余的行......

javascript
  • 1 个回答
  • 23 Views
Martin Hope
Роман
Asked: 2024-10-13 01:04:43 +0000 UTC

存储临时变量的最佳方式是什么

  • 5
data = {

 upload(ms = {}) {
    this.upload.sdf = 233;
 }

}

假设我们访问了上传功能。他们传递了一个数组,这不是问题...我想知道存储临时变量的最佳方法是什么?现在我这样做,创建变量

ms.d = ''
ms.x = ''

ETC。

我想尝试一下,它返回整个对象,我想

this.upload.sdf = 233;

可以创建仅在“上传”函数中运行的变量......

还有哪些其他选择?

有必要创建许多变量,每次访问函数时这些变量都会被删除并替换为新变量。

ms.d = ''如果您存储变量并且每次访问函数并设置新变量,如何处理内存。这不会导致你的记忆被堵塞吗?

javascript
  • 2 个回答
  • 41 Views
Martin Hope
ITACHI
Asked: 2024-10-13 00:11:59 +0000 UTC

错误 1064:“您的 SQL 语法有错误”

  • 4

我正在尝试将从用户收到的变量值插入到表中:

try:
    # create table
    with connection.cursor() as cursor:
        role = "user"
        version = 0
        dol = 0
        #insert_query = "INSERT INTO `DataBaseRegAndLog` ('user', 'pass', 'role', 'version', 'email', 'dol') VALUES (%s, %s, %s, %s, %s, %s);"
        cursor.execute("INSERT INTO `DataBaseRegAndLog` ('user', 'pass', 'role', 'version', 'email', 'dol') VALUES (%s, %s, %s, %s, %s, %s)", (loginUser, passUser, role, version, emailUser, dol))
        connection.commit()

finally:
    connection.close()

except Exception as ex:
    print("Connection refused...")
    print(ex)

但它给了我错误 1064:

C:\Users\Demon\PycharmProjects\tg_DemonDostavka\.venv\Scripts\python.exe C:\Users\Demon\PycharmProjects\tg_DemonDostavka\main.py 
successfully connected...
####################
Connection refused...
(1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''user', 'pass', 'role', 'version', 'email', 'dol') VALUES ('/reg', '/reg', 'user' at line 1")

我首先尝试将sql命令注册在一个单独的变量中,但它给出了一个错误。现在我知道一行中有一条sql命令和变量。

python
  • 1 个回答
  • 15 Views
Martin Hope
Роман
Asked: 2024-10-12 23:53:01 +0000 UTC

设置如何开始使用 Manticore

  • 5
ii  manticore                              6.3.6-24080214-593045790                     amd64        Manticore Search - database for search
ii  manticore-backup                       1.3.8-24052208-57fc406                       all          Manticore Backup
ii  manticore-buddy                        2.3.12-24071807-45f6b91                      all          Manticore Buddy
ii  manticore-columnar-lib                 2.3.0-24052206-88a01c3                       amd64        Manticore Columnar Library is a column-oriented storage library, aiming to provide decent performance with low memory footprint at big data volume
ii  manticore-common                       6.3.6-24080214-593045790                     all          Manticore Search - database for search
ii  manticore-dev                          6.3.6-24080214-593045790                     all          Manticore Search - database for search
ii  manticore-executor                     1.1.12-24071807-0565a65                      amd64        Custom built PHP executor for Manticore.
ii  manticore-galera                       3.37                                         amd64        Synchronous multi-master wsrep provider (replication engine) (Manticore's fork)
ii  manticore-icudata-65l                  5.0.3-221123-d2d9e5e56                       all          Manticore Search - database for search
ii  manticore-repo                         0.0.4                                        all          Manticore Software APT repository deployment package
ii  manticore-server                       6.3.6-24080214-593045790                     amd64        Manticore Search - database for search
ii  manticore-server-core                  6.3.6-24080214-593045790                     amd64        Manticore Search - database for search
ii  manticore-tools                        6.3.6-24080214-593045790                     amd64        Manticore Search - database for search
ii  manticore-tzdata                       1.0.0-240522-a8aa66e                         all          no description given
ii  mariadb-common                         1:10.6.18-0ubuntu0.22.04.1     

提供商在服务器上安装了 manticore 模块https://manticoresearch.com/

但我不明白如何开始使用它。我希望搜索页面能够基于它从数据库中进行选择......

如何做到这一点?有必要启动某种进程,创建一个配置...我对其工作原理的全部理解是该模块创建某种指定表和字段的记录缓存。当访问模块时,它会生成标头中最相似或最接近的记录的结果......

该死,我如何从PHP向它发出第一个请求,如何配置它。然后这个过程将自行进行......

我完全不明白这是如何运作的...

php
  • 1 个回答
  • 20 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