鸩远一方

文章 评论 浏览 32

鸩远一方 2025-02-20 19:20:51

将多个模型节点添加到单个< model-viewer>的功能仅是概念化的,尚未实现。

如您链接到的GitHub帖子所述:

建议将多个模型纳入单个元素(重点是我的)...

的声明性API ...

本Github问题中的对话继续描述多个实现建议,如果它们要合并该功能。

如果您想创建一个使用多个模型的场景,则需要使用一个库,例如 triph.js < /a>直到他们熨除了此拟议功能的细节。

如果使用reactjs,则可以使用 gltfjsx ,这显着简化了与导入模型的过程多个网格节点。它使用React-three/drei为您构建一个组件,并为您的组件中的每个网格节点分开。

这是Gltfjsx生成的组件的一个示例:

import React, { useRef } from 'react'
import { useGLTF } from '@react-three/drei'

export default function Model(props) {
  const group = useRef()
  const { nodes, materials } = useGLTF('/example-3d.glb')
  return (
    <group ref={group} {...props} dispose={null}>
      <group scale={56.66}>
        <mesh geometry={nodes.Curve001_1.geometry} material={materials.Material} />
        <mesh geometry={nodes.Curve001_2.geometry} material={materials['Material.002']} />
      </group>
    </group>
  )
}

useGLTF.preload('/example-3d.glb')

现在可以在任何地方使用此组件来包括您的3D模型。

The feature of adding multiple model nodes into a single <model-viewer> was only conceptualized, and has not been implemented.

As stated by the Github post that you linked to:

This suggests a declarative API for incorporating multiple models into a single element (emphasis mine)...

The conversation in this Github issue goes on to describe multiple implementation suggestions if they were to incorporate the feature.

If you're looking to create a scene with multiple models, you're going to need to use a library such as three.js until they've ironed out the details of this proposed feature.

If you use ReactJS, you can use gltfjsx, which significantly simplifies the process of importing a model with multiple mesh nodes. It builds a component for you using react-three/drei, and separates out each mesh node in the component for you.

Here's an example of a component generated with gltfjsx:

import React, { useRef } from 'react'
import { useGLTF } from '@react-three/drei'

export default function Model(props) {
  const group = useRef()
  const { nodes, materials } = useGLTF('/example-3d.glb')
  return (
    <group ref={group} {...props} dispose={null}>
      <group scale={56.66}>
        <mesh geometry={nodes.Curve001_1.geometry} material={materials.Material} />
        <mesh geometry={nodes.Curve001_2.geometry} material={materials['Material.002']} />
      </group>
    </group>
  )
}

useGLTF.preload('/example-3d.glb')

This component can now be used anywhere to include your 3d model.

如何将多个3D对象添加到一个ModelViewer

鸩远一方 2025-02-20 17:38:58

类成员:

虚拟 destructor需要实现。

声明destructor纯净仍需要您定义它(与常规功能不同):

struct X
{
    virtual ~X() = 0;
};
struct Y : X
{
    ~Y() {}
};
int main()
{
    Y y;
}
//X::~X(){} //uncomment this line for successful definition

发生这种情况是因为当对象被隐式破坏时,因此调用了基础类破坏者,因此需要定义。

虚拟必须实现或定义为纯净的方法。

这类似于非定义的非虚拟方法,并增加了推理
纯声明会生成一个虚拟的VTable,您可能会在无需使用函数的情况下获得链接器错误:

struct X
{
    virtual void foo();
};
struct Y : X
{
   void foo() {}
};
int main()
{
   Y y; //linker error although there was no call to X::foo
}

为此,声明x :: foo() us pure:

struct X
{
    virtual void foo() = 0;
};

non- virtual班级成员

即使不明确使用一些成员,也需要定义一些成员:

struct A
{ 
    ~A();
};

以下将产生错误:

A a;      //destructor undefined

实现可以在类别定义本身中进行内联:

struct A
{ 
    ~A() {}
};

或外部:

A::~A() {}

如果实现不在类的定义之外,则 可以标头,必须将方法标记为inline以防止多重定义。

如果使用的话,所有使用的成员方法都需要定义。

一个常见的错误是忘记限定名称:

struct A
{
   void foo();
};

void foo() {}

int main()
{
   A a;
   a.foo();
}

定义应为

void A::foo() {}

静态必须在单个翻译单元中定义类数据成员:

struct X
{
    static int x;
};
int main()
{
    int x = X::x;
}
//int X::x; //uncomment this line to define X::x

可以为A提供初始化器static const集体定义中积分或枚举类型的数据成员;但是,该成员的ODR使用仍需要如上所述的名称空间范围定义。 C ++ 11允许在所有static const数据成员的类中初始化。

Class members:

A pure virtual destructor needs an implementation.

Declaring a destructor pure still requires you to define it (unlike a regular function):

struct X
{
    virtual ~X() = 0;
};
struct Y : X
{
    ~Y() {}
};
int main()
{
    Y y;
}
//X::~X(){} //uncomment this line for successful definition

This happens because base class destructors are called when the object is destroyed implicitly, so a definition is required.

virtual methods must either be implemented or defined as pure.

This is similar to non-virtual methods with no definition, with the added reasoning that
the pure declaration generates a dummy vtable and you might get the linker error without using the function:

struct X
{
    virtual void foo();
};
struct Y : X
{
   void foo() {}
};
int main()
{
   Y y; //linker error although there was no call to X::foo
}

For this to work, declare X::foo() as pure:

struct X
{
    virtual void foo() = 0;
};

Non-virtual class members

Some members need to be defined even if not used explicitly:

struct A
{ 
    ~A();
};

The following would yield the error:

A a;      //destructor undefined

The implementation can be inline, in the class definition itself:

struct A
{ 
    ~A() {}
};

or outside:

A::~A() {}

If the implementation is outside the class definition, but in a header, the methods have to be marked as inline to prevent a multiple definition.

All used member methods need to be defined if used.

A common mistake is forgetting to qualify the name:

struct A
{
   void foo();
};

void foo() {}

int main()
{
   A a;
   a.foo();
}

The definition should be

void A::foo() {}

static data members must be defined outside the class in a single translation unit:

struct X
{
    static int x;
};
int main()
{
    int x = X::x;
}
//int X::x; //uncomment this line to define X::x

An initializer can be provided for a static const data member of integral or enumeration type within the class definition; however, odr-use of this member will still require a namespace scope definition as described above. C++11 allows initialization inside the class for all static const data members.

什么是未定义的参考/未解决的外部符号错误,我该如何修复?

鸩远一方 2025-02-20 12:26:11

MongoDB 4可在MongoDB YUM存储库中找到。 将存储库添加到您的RHEL 8服务器中

sudo tee /etc/yum.repos.d/mongodb-org-4.repo<<EOF
[mongodb-org-4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/8/mongodb-org/4.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc
EOF

通过在下面的命令下运行:您需要以sudo特权作为用户运行上面的命令, 。
添加了存储库后,安装MongoDB-ORG软件包。

sudo yum install mongodb-org

结果应该是:

$ rpm -qi mongodb-org-server
  Name        : mongodb-org-server
  Version     : 4.4.8
  Release     : 1.el8

MongoDB 4 is available on MongoDB yum repository. Add the repository to your RHEL 8 server by running below commands:

sudo tee /etc/yum.repos.d/mongodb-org-4.repo<<EOF
[mongodb-org-4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/8/mongodb-org/4.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc
EOF

You need to run the commands above as user with sudo privileges.
Once the repo has been added, install mongodb-org package.

sudo yum install mongodb-org

the result should be:

$ rpm -qi mongodb-org-server
  Name        : mongodb-org-server
  Version     : 4.4.8
  Release     : 1.el8

如何在Red Hat 8.4上安装Mongo DB 4.4.0?

鸩远一方 2025-02-20 07:51:12

我认为这与Android和本地PC设备有关。
如果您能让我们知道您的开发环境,那就太好了

I think this is related to Android and local pc device.
it would be nice if you can let us know about your development environment

无法在Android和解决方案中搜索APP特定文件的原因

鸩远一方 2025-02-20 05:52:02

将输出重定向到STDERR消除了不需要的线路。我还将输出输送到 tail -1 仅获取最后一行 - 具有最新版本的一行。

sudo service --status-all 2>/dev/null | grep -oE 'php[0-9]+.[0-9]+' | tail -1

Redirecting the output to stderr eliminated the unwanted lines. I also piped the output to tail -1 to get the last line only--the one with the latest version.

sudo service --status-all 2>/dev/null | grep -oE 'php[0-9]+.[0-9]+' | tail -1

当我将服务传输到grep时 - status-all命令时,为什么在输出中显示额外的线?

鸩远一方 2025-02-19 21:57:18

也许您发现了问题,但这可以帮助某人:

我使用node:Bullseye图像npm v8.13.0 ,所以我将其更新为最新版本(在我的情况下,v8.15.1)已解决。

因此,要继续将此图像与最新版本一起使用,我将其放在dockerfile中:

RUN npm install -g npm@latest

Maybe you found the problem, but this can help someone:

I was havin the same issue using node:bullseye image that comes with npm v8.13.0, so I updated it to the latest version (v8.15.1, in my case) an it was solved.

So, to keep using this image with the latest version, i put this in Dockerfile:

RUN npm install -g npm@latest

节点V18.4.0上的Docker-Compose退出代码243

鸩远一方 2025-02-19 17:43:57

我认为这可能是您要寻找的答案: https://yoast.com /help/disable-enable-author-archives/

如果您禁用作者档案,则应将作者从帖子中删除。

I think this may be the answer you are looking for: https://yoast.com/help/disable-enable-author-archives/

If you disable the author archive this should remove the author from posts.

Yoast WordPress SEO中的代码段删除META作者

鸩远一方 2025-02-19 13:33:16

yaml只是etcd中Kubernetes内部存储中POD对象的表示。使用您的client-go您所拥有的是pod实例,类型v1.pod。因此,您应该能够使用此对象本身并获取您想要的任何东西,例如p.labels()等这是通过:

import (
  "sigs.k8s.io/yaml"
)

b, err := yaml.Marshal(pod)
if err != nil {
  // handle err
}
log.Printf("Yaml of the pod is: %q", string(b))

请注意,yaml来这里的库不是来自client-go库。 yaml库的文档可以在: https://pkg.go.dev/sigs.k8s.io/yaml#marshal

而不是yaml如果要使用JSON,可以简单地使用元帅函数 https://pkg.go.dev/k8s.io/apiserver/pkg/apis/example/example/v1#pod.marshal v1.pod

The yaml is just a representation of the Pod object in the kubernetes internal storage in etcd. With your client-go what you have got is the Pod instance, of the type v1.Pod. So you should be able to work with this object itself and get whatever you want, for example p.Labels() etc. But if for some reason, you are insisting on getting a yaml, you can do that via:

import (
  "sigs.k8s.io/yaml"
)

b, err := yaml.Marshal(pod)
if err != nil {
  // handle err
}
log.Printf("Yaml of the pod is: %q", string(b))

Note that yaml library coming here is not coming from client-go library. The documentation for the yaml library can be found in: https://pkg.go.dev/sigs.k8s.io/yaml#Marshal

Instead of yaml if you want to use json, you can simply use the Marshal function https://pkg.go.dev/k8s.io/apiserver/pkg/apis/example/v1#Pod.Marshal provided by the v1.Pod struct itself, like any other Go object.

kubectl get pod&lt; pod&gt; -n&lt;名称空间&gt; -o yaml在kubernetes客户端 -

鸩远一方 2025-02-19 08:02:54

如果您没有重复的记录,则可以在两个语句之间使用联合陈述,如果您有重复的记录,则全部工会。

You can use UNION statemnt between the two statements if you don't have duplicate records, UNION ALL if you have duplicate ones.

将两个非常相似的查询与不同条件的不同查询组合

鸩远一方 2025-02-18 21:17:03

$。订购日期为日期设置日期模式,以便可以正确解析它们。 DataWeave不会尝试猜测模式。如果不是默认值,则需要提供一个。此外,有效载荷中的字段称为orderdate,因此表达式返回null。

例如,对于6/15/2010之类的日期,该日期是以一个月/天/年的格式,并且具有单个数字的日期应为:

$.OrderDate as Date {format: "M/d/yyyy"}

$.orderDate as Date is missing to set the pattern of the date so they can be parsed correctly. DataWeave will not try to guess the pattern. You need to supply one if it not the default. Also the field in the payload is called OrderDate so the expression was returning null.

For example for a date like 6/15/2010 which is in format month/day/year and with some dates having a single digit the pattern should be:

$.OrderDate as Date {format: "M/d/yyyy"}

dataweave过滤器,地图,有效载荷和刺痛分析到迄今为止

鸩远一方 2025-02-18 15:05:52

您也可以将其名称的URL使用以避免错误。例如:

{% url 'edit_cat' 2 %}

You can also use the URL with it's name to avoid errors. e.g.:

{% url 'edit_cat' 2 %}

当前的路径,不匹配其中的任何一个

鸩远一方 2025-02-18 10:15:05

聚合是一致性边界。因此,如果您绝对需要对任何位置的更改才能立即反映在产品中,反之亦然,那么您基本上需要将所有位置和所有产品用于一个汇总,然后具有某种形式的并发控制形式,这有效地限制了该巨型 - 汇总变化(并将大大限制该大型聚集可以改变的速率)。

请注意,您可以使用基础架构(例如具有外国密钥要求的关系DB交易)来假装真正的一个大型聚集物是多个较小的聚集体。这样做不会改变基本的性能(它的上限可能比简单的DDD实现将使用的钥匙值乐观的并发控制方法更高,因为它将允许并发更新以散射大型杂物的部分)并且有一个缺点,而不是您的域逻辑居住在代码中的一个位置,现在已在您的DB模式中部分编码(无论它是否在代码中的其他位置重复)。

说不能应用DDD(特别是聚集体)或案例不符合骨料周围的规则,这并不是真正准确的,不止一个人可以说不能应用物理定律。只是您在应用要求时获得的解决方案不是您喜欢的。

或者,需求可能是互不兼容的(例如,要求能够在某个时期内执行X更新并具有很强的一致性)。在这里,炼油要求可能会有所帮助,特别是涉及松动一致性要求。比域实际要求更强大的一致性要求确实很普遍(询问“如果发生这种情况……实际发生的事情……”是有帮助的)。

Aggregates are consistency boundaries. So if you absolutely need changes to any location to be immediately reflected in products, and vice versa, then you basically need to have all locations and all products in a single aggregate and then have some form of concurrency control which effectively limits how that mega-aggregate changes (and will dramatically limit the rate at which this mega-aggregate can change).

Note that you can use infrastructure (e.g. relational DB transactions with foreign key requirements) to pretend that what's really one mega-aggregate is multiple smaller aggregates. Going this way doesn't change the fundamental performance (it's likely to have a much higher ceiling than the key-value optimistic concurrency control approach that a simple DDD implementation will use because it will allow concurrent updates to disparate parts of the mega-aggregate) and has the downside of instead of your domain logic living in one place in your code, it's now partially encoded in your DB schema (whether or not it's duplicated elsewhere in your code).

It's not really accurate to say that DDD (specifically aggregates) can't be applied or that a case doesn't fit the rules around aggregates, any more than one can say that the laws of physics can't be applied. It's just that the solution you get to when applying the requirements is not one you like.

Or it's possible that the requirements are mutually incompatible (e.g. a requirement to be able to perform X updates in some period of time with strong consistency). This is where refining requirements may be helpful, specifically around loosening consistency requirements. It's really common for a stronger consistency requirement to be assumed than the domain actually requires (asking questions like, "what actually happens if this happens..." is helpful).

如何在DDD中对此情况进行建模?

鸩远一方 2025-02-18 08:56:21

我遇到了同样的问题。
正如我在另一篇文章中学到的那样,问题是MacOS中的ZSH。
“*”不选择ZSH中的隐藏文件。

在ZSH上递归复制的正确命令包括:
CP -R *(D)../ hotherfolder

I had the same problem.
The problem is the zsh in MacOS, as I learned in another post.
"*" does not select hidden files in zsh.

The correct command to recursively copy on zsh including hidden files is:
cp -r *(D) ../otherfolder

隐藏的文件未使用CP -R在Mac上复制

鸩远一方 2025-02-18 02:55:55

with initial1 as ( select DATE_TRUNC(DATE_TRUNC(CURRENT_DATE(), MONTH)+7,ISOWEEK) as initial2),

final1 as ( select LAST_DAY(DATE_TRUNC(CURRENT_DATE(), MONTH)+7, ISOWEEK) as final2),

HelloWorld AS (
SELECT shop_date, revenue
FROM fulltable
WHERE shop_date >= (select initial2 from initial1) AND shop_date <= (select final2 from final1)
)

SELECT * from HelloWorld;

with initial1 as ( select DATE_TRUNC(DATE_TRUNC(CURRENT_DATE(), MONTH)+7,ISOWEEK) as initial2),

final1 as ( select LAST_DAY(DATE_TRUNC(CURRENT_DATE(), MONTH)+7, ISOWEEK) as final2),

HelloWorld AS (
SELECT shop_date, revenue
FROM fulltable
WHERE shop_date >= (select initial2 from initial1) AND shop_date <= (select final2 from final1)
)

SELECT * from HelloWorld;

在预定查询bigquery中声明变量;

鸩远一方 2025-02-17 04:00:55

您可以使用opensea的API调用检索资产。这将为您提供有关资产以及当前是否列出的资产的信息。只要您有一个API密钥,它将告诉您是否列出了资产以及该订单的详细信息。希望它有帮助!

You can use opensea's api call retrieve assets. This will give you information about an asset and whether or not it is currently listed. As long as you have an api key, it will tell you if the asset is listed, and the details of that order. Hope it helps!

检查NFT是否在Opensea上出售

更多

推荐作者

櫻之舞

文章 0 评论 0

弥枳

文章 0 评论 0

m2429

文章 0 评论 0

野却迷人

文章 0 评论 0

我怀念的。

文章 0 评论 0

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文