雄赳赳气昂昂

文章 评论 浏览 29

雄赳赳气昂昂 2025-02-21 02:07:55

您可以将其视为Unity错误,将在下一个更新中进行修复。

但是现在,请进行以下解决方法以解决此问题。

转到Unity已安装文件夹中的以下位置
/applications/unity/hub/editor/2021.3.6f1/playbackengens/androidplayer/sdk/cmdline-tools/2.1

复制此文件夹中的所有文件和文件夹

现在 href =“ https://i.sstatic.net/zjiqz.png” rel =“ nofollow noreferrer“> ”

现在返回到AndroidPlayer文件夹并创建文件夹 strong>工具

现在粘贴了复制的文件/文件夹,然后单击“构建”和“运行”。

希望它可以解决此问题。

You can consider it as Unity Bug which will be fix in next update.

But for now please do the below workaround to fix this issue.

Go to the below location in the Unity installed folder
/Applications/Unity/Hub/Editor/2021.3.6f1/PlaybackEngines/AndroidPlayer/SDK/cmdline-tools/2.1

Now copy all the files and folders in this folder

enter image description here

Now Go back to the AndroidPlayer folder and create a folder Tools

Now paste copied files/folders in it and click on build and run.

enter image description here

Hope it will fix this issue.

Unity Gradle模板丢失(2021.3.6F)

雄赳赳气昂昂 2025-02-20 23:25:39
public function show(){
  if(Auth::check()){
    $showAllDetails = Events::all();
    echo $showAllDetails;   
  }else {
    $showUserDetails = Events::where('is_verified',1)->get();
    echo $showUserDetails;
 }
}

我想您的其他部分是错误的查询,更改您的其他部分

public function show(){
  if(Auth::check()){
    $showAllDetails = Events::all();
    echo $showAllDetails;   
  }else {
    $showUserDetails = Events::where('is_verified',1)->get();
    echo $showUserDetails;
 }
}

I guess your else part is incorrect query, change your else part like above

auth立面无法在没有圣所API的情况下用作Laravel 8的中间件

雄赳赳气昂昂 2025-02-20 18:22:08

以下是使用异步/等待的比较,然后:

function fetchData() {
    return fetch('https://jsonplaceholder.typicode.com/todos/1')
        .then(response => response.json());
}

async function asyncMain() {
    console.log('Start');

    console.log(await fetchData());

    console.log('End');
}

function main() {
    console.log('Start');

    fetchData().then(data => { console.log(data) });

    console.log('End');
}

main();
// Output
// Start
// End
// { "userId": 1, id": 1, "title": "delectus aut autem", "completed": false}

asyncMain();
// Output
// Start
// { "userId": 1, id": 1, "title": "delectus aut autem", "completed": false}
// End

异步函数允许您使用等待 +使函数返回承诺( https://developer.mozilla.org/fr/docs/web/javascript/reference/reference/global_objects/promise

如您所见'。同时函数打印“ end”,然后一旦解决了对API的请求,则打印结果。

为了简化,等待“等待答案,然后执行代码的其余部分”,然后表示“收到响应时...”然后执行,然后执行代码结束

Here is a comparison between using async / await and then :

function fetchData() {
    return fetch('https://jsonplaceholder.typicode.com/todos/1')
        .then(response => response.json());
}

async function asyncMain() {
    console.log('Start');

    console.log(await fetchData());

    console.log('End');
}

function main() {
    console.log('Start');

    fetchData().then(data => { console.log(data) });

    console.log('End');
}

main();
// Output
// Start
// End
// { "userId": 1, id": 1, "title": "delectus aut autem", "completed": false}

asyncMain();
// Output
// Start
// { "userId": 1, id": 1, "title": "delectus aut autem", "completed": false}
// End

async function allow you to use await + make the function return a promise (https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Global_Objects/Promise)

As you can see, await block the function execution and wait for the result before printing 'End'. While syncronious function print 'End' then print the result once the request to the api is resolved.

To simplify, await means "wait for the answer then execute the rest of the code" while then means "when you receive the response do ..." then it execute then end of the code

如果您等待其响应,为什么还要使用异步功能呢?

雄赳赳气昂昂 2025-02-20 15:55:12

您应该有任何浏览器的Doctype。它告诉浏览器如何解释HTML和CSS。这就是为什么HTML4和HTML5具有不同定义的原因(XHTML也是如此)。这对于验证非常重要。

IE将要做的就是将文档放入所谓的“怪异模式”中,该模式基本上忽略了CSS(按现代定义)的表现应如何应对CSS的整体规则。这是问题的好摘要。它可以回到未标准的CSS支持的过去的糟糕时代

You should have a DOCTYPE for ANY browser. It tells the browser how to interpret the html and css. This is why html4 and html5 have different definitions (as does xhtml). All very important for validation.

What IE will do is put the document into what it calls 'quirks mode' which basically ignores a whole heap of rules for how CSS should (by modern definitions) behave. Here is a good summary of the issue. It harks back to the bad old days of non-standardised CSS support

为什么我需要Doctype? (它做什么)

雄赳赳气昂昂 2025-02-20 14:37:04

由于您使用 @springboottest 注释,它可以使用 SpringExtension 增强测试现有一个:

@SpringBootTest
@TestPropertySource(properties = {
       "api.apiUrl=https://url.to.production.model/model.json"
})
class ApplicationTests {
    @Mock
    private WebClient.RequestHeadersUriSpec<?> requestHeadersUriMock;
    @Mock
    private WebClient.RequestHeadersSpec<?> requestHeadersMock;
    @Mock
    private WebClient.ResponseSpec responseMock;
    @MockBean
    private WebClient webClientMock;
    private final ModelDTO mockModelDTO = new ModelDTO(.....);

    @Autowired
    private ModelService modelService;


    @Test
    void testModelServiceGetModel() {
        prepareWebClientMock();

        final Model model = modelService.getModel().block();
        assertThat(model).isNotNull();
    }

    private void prepareWebClientMock() {
        doReturn(requestHeadersUriMock).when(webClientMock).get();
        doReturn(requestHeadersMock).when(requestHeadersUriMock).uri(anyString());
        doReturn(requestHeadersMock).when(requestHeadersMock).accept(any());
        doReturn(responseMock).when(requestHeadersMock).retrieve();
        doReturn(Mono.just(mockModelDTO))
                .when(responseMock).bodyToMono(eq(ModelDTO.class));
    }
}

Since you use @SpringBootTest annotation which enhances your tests with SpringExtension you can use @MockBean to inject the mock bean into the application context and replace the existing one:

@SpringBootTest
@TestPropertySource(properties = {
       "api.apiUrl=https://url.to.production.model/model.json"
})
class ApplicationTests {
    @Mock
    private WebClient.RequestHeadersUriSpec<?> requestHeadersUriMock;
    @Mock
    private WebClient.RequestHeadersSpec<?> requestHeadersMock;
    @Mock
    private WebClient.ResponseSpec responseMock;
    @MockBean
    private WebClient webClientMock;
    private final ModelDTO mockModelDTO = new ModelDTO(.....);

    @Autowired
    private ModelService modelService;


    @Test
    void testModelServiceGetModel() {
        prepareWebClientMock();

        final Model model = modelService.getModel().block();
        assertThat(model).isNotNull();
    }

    private void prepareWebClientMock() {
        doReturn(requestHeadersUriMock).when(webClientMock).get();
        doReturn(requestHeadersMock).when(requestHeadersUriMock).uri(anyString());
        doReturn(requestHeadersMock).when(requestHeadersMock).accept(any());
        doReturn(responseMock).when(requestHeadersMock).retrieve();
        doReturn(Mono.just(mockModelDTO))
                .when(responseMock).bodyToMono(eq(ModelDTO.class));
    }
}

如何在@service中模拟spring @autowired webclient响应?

雄赳赳气昂昂 2025-02-20 12:55:54

当您重定向时,您无法从此功能中获取数据,并且您的脚本

在用户结帐后不再存在重定向,然后您必须读取数据。

You can't get data out of this function as you are redirected and your script ceases to exist

Stripe wile redirect you back after user checkout and then you have to read the data.

如何从Stripe.RedirectToCheckout()中检索结果值?

雄赳赳气昂昂 2025-02-20 08:29:43

如果/else 逻辑在github操作中实现,则可以实现,而无需其他步骤来运行一些bash逻辑。但这不是最直观的。

github动作支持表达式>等于如果/else

示例:

name: IF/ELSE Demo

on:
  push:
    branches: [main]
    tags: ['*']

jobs:
  demo:
    runs-on: ubuntu-latest
    env:
      DEFAULT_TAG: ${{ (contains(github.ref, 'tag') && github.ref_name) || 'dev' }}
    steps:
      - run: echo $DEFAULT_TAG

这将产生以下作业输出:

  • Git标签的名称。
  • 当通过标签触发时, default_tag 是通过分支或pr default_tag 触发时 去开发。

如果 $ {{(contains(github.ref,'tag')中的第一个输入&amp; github.ref_name)|| 'dev'}}} 将变为true,因此第二个arg被设置为值。如果是错误的,则默认回到逻辑运算符之后指定的值。

There is a way to implement the if/else logic in GitHub Actions without needing another step to run some bash logic. But it is not the most intuitive.

GitHub Action support expressions with these you can construct logic that is equivalent to if/else.

Example:

name: IF/ELSE Demo

on:
  push:
    branches: [main]
    tags: ['*']

jobs:
  demo:
    runs-on: ubuntu-latest
    env:
      DEFAULT_TAG: ${{ (contains(github.ref, 'tag') && github.ref_name) || 'dev' }}
    steps:
      - run: echo $DEFAULT_TAG

This would produce the following job outputs:

  • When triggered via a tag, DEFAULT_TAG would be the name of the git tag
  • When triggered via a branch or PR DEFAULT_TAG would be set to dev.

If the first input in ${{ (contains(github.ref, 'tag') && github.ref_name) || 'dev' }} would turn out true, so the second arg is set as a value. If it is false it defaults back to the value specified after the logical OR operator.

如果其他条件在github动作中,该怎么做

雄赳赳气昂昂 2025-02-20 06:53:32

弄清楚了。遵循本文它起作用了。

  1. 安装React-Inttersection-Observer
  2. 在开玩笑config(jest.config.js)中
  • :将React-Inttersection-Observer/test-Utils'添加到SetUpfilesafterenv
  • 创建jest.setupfiles.js,然后添加到setUpfiles in jestupfiles
{
...
  setupFiles: ['<rootDir>/jest.setupFiles.js'],
  setupFilesAfterEnv: [
    '<rootDir>/jest.setup.js',
    'react-intersection-observer/test-utils',
  ],
...
}
  1. in juston customjestconfig .setupfiles添加:
import { defaultFallbackInView } from 'react-intersection-observer'

global.IntersectionObserver = jest.fn()
defaultFallbackInView(false)

错误应该消失。 :)

Figured it out. Followed the solution mentioned at this article and it worked.

  1. Install react-intersection-observer
  2. In the Jest config (jest.config.js):
  • Add react-intersection-observer/test-utils' to the setupFilesAfterEnv
  • Create a jest.setupFiles.js and add to setupFiles in the in the customJestConfig
{
...
  setupFiles: ['<rootDir>/jest.setupFiles.js'],
  setupFilesAfterEnv: [
    '<rootDir>/jest.setup.js',
    'react-intersection-observer/test-utils',
  ],
...
}
  1. In jest.setupFiles add:
import { defaultFallbackInView } from 'react-intersection-observer'

global.IntersectionObserver = jest.fn()
defaultFallbackInView(false)

And the error should go away. :)

next.js测试中的图像更新未包装在ACT(...)中

雄赳赳气昂昂 2025-02-19 23:30:11

我找到了一种注释QuerySet的方法,但是为了兴趣,我最初的问题仍然存在:如何添加外键分区的另一个字段?

brackets = CommissionBracket.objects.select_related("commission_structure")\
            .prefetch_related(
            'commission_structure__advisor',
            'commission_structure__start_dt__gte',
            'commission_structure__end_dt__lte',
            'commission_structure__company',
            'bracket_values'
            ).filter(
                commission_structure__advisor=advisor,
                commission_structure__start_dt__lte=date,
                commission_structure__end_dt__gte=date,
                commission_structure__company=advisor.user.company,
            ).annotate(index=Window(
                    expression=Count('id'),
                    partition_by="commission_structure",
                    order_by=F("lower_bound").asc()))

I've found a way to annotate the queryset, but for interest, my original question still remains: how do I add another field partitioned by the foreign key?

brackets = CommissionBracket.objects.select_related("commission_structure")\
            .prefetch_related(
            'commission_structure__advisor',
            'commission_structure__start_dt__gte',
            'commission_structure__end_dt__lte',
            'commission_structure__company',
            'bracket_values'
            ).filter(
                commission_structure__advisor=advisor,
                commission_structure__start_dt__lte=date,
                commission_structure__end_dt__gte=date,
                commission_structure__company=advisor.user.company,
            ).annotate(index=Window(
                    expression=Count('id'),
                    partition_by="commission_structure",
                    order_by=F("lower_bound").asc()))

Django:如何创建一个由给定外键分组(排名)的辅助ID字段?

雄赳赳气昂昂 2025-02-19 12:11:45

与Datadog的团队聊天后,他们承认这实际上是一项缺失的功能,并在其Github上创建PR以将其包括在5.3.0版本的插件中。

您可以在以下网址找到: https://github.com/datadog/ datadog-lambda-python/pull/229

因此,插件的简单更新应该足以包括您的监视行为。

After chatting with datadog's team, they acknowledge that this was in fact a missing feature and create a PR on their github to include it on the 5.3.0 version of the plugin.

You can find the PR details on: https://github.com/DataDog/datadog-lambda-python/pull/229

So a simple update of the plugin should be enough to include this behavior on your monitoring.

如何使用lambda代理集成在datadog上查看失败的lambda执行

雄赳赳气昂昂 2025-02-19 02:22:17

将您的呼叫封装到ServiceBusClient.CreateSender中。请参阅有关如何创建Singleton工厂的更多信息。

Encapsulate your call to ServiceBusClient.CreateSender inside a singleton class. Refer to Create a Singleton Factory for a Class that takes parameters / arguments for more information on how to create singleton factory.

C#:如何在不使用DI框架的情况下为Azure ServiceBussender创建Singleton实例

雄赳赳气昂昂 2025-02-18 15:38:22

很抱歉,看起来每个人都错过了您的问题,希望您已经解决了。对于像我这样未来来的人,我设法与Attrs一起解决了它:

<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<table id="table">
  <thead>
    <tr>
      <th>ID</th>
      <th data-type="date" data-format="YYYY-MM-DD">Date</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>2025-12-28</td>
    </tr>
    <tr>
      <td>2</td>
      <td>2025-12-29</td>
    </tr>
    <tr>
      <td>3</td>
      <td>2025-12-27</td>
    </tr>
    <tr>
      <td>4</td>
      <td>2025-12-30</td>
    </tr>
    <tr>
      <td>5</td>
      <td>-</td>
    </tr>
    <tr>
      <td>6</td>
      <td>2025-01-01</td>
    </tr>
    <tr>
      <td>7</td>
      <td>2025-01-30</td>
    </tr>
  </tbody>
</table>
<script>
  new simpleDatatables.DataTable('#table')
</script>

请注意,我只是让最终排序的值分类,也许我应该使某些事情更健壮,但是我的客户在几年中对这个小细节没有什么不好说

https://fiduswriter.github.io/simple-datatables/documentation/columns#examples

I'm sorry but it looks like everyone missed your question, hope you're already solved it. For those coming in the future like me, I managed to solve it just with just attrs:

<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<table id="table">
  <thead>
    <tr>
      <th>ID</th>
      <th data-type="date" data-format="YYYY-MM-DD">Date</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>2025-12-28</td>
    </tr>
    <tr>
      <td>2</td>
      <td>2025-12-29</td>
    </tr>
    <tr>
      <td>3</td>
      <td>2025-12-27</td>
    </tr>
    <tr>
      <td>4</td>
      <td>2025-12-30</td>
    </tr>
    <tr>
      <td>5</td>
      <td>-</td>
    </tr>
    <tr>
      <td>6</td>
      <td>2025-01-01</td>
    </tr>
    <tr>
      <td>7</td>
      <td>2025-01-30</td>
    </tr>
  </tbody>
</table>
<script>
  new simpleDatatables.DataTable('#table')
</script>

Note that I just let the values that are empty sorted at the end, probably I should make something more robust, but my customers didn't say nothing bad about this small detail in years

https://fiduswriter.github.io/simple-datatables/documentation/columns#examples

简单datapers日期排序问题

雄赳赳气昂昂 2025-02-18 11:09:01

您命名了太多具有相同名称的内容( c1 在您的情况下):

  • ,则function的参数
  • 本地变量
  • 计数器in for for for for Loop

如果将其修改为EG

SQL> set serveroutput on
SQL>
SQL> CREATE OR REPLACE FUNCTION string_to_char (c1  NUMBER,
  2                                             c2  VARCHAR2,
  3                                             c3  VARCHAR2)
  4     RETURN VARCHAR2
  5  IS
  6     pc1  NUMBER := 1;
  7     pc2  VARCHAR2 (20);
  8     pc3  VARCHAR2 (20) := c3;
  9  BEGIN
 10     FOR i IN 1 .. 20
 11     LOOP
 12        SELECT SUBSTR (c3, c1, 1) INTO pc2 FROM DUAL;
 13
 14        DBMS_OUTPUT.put_line (pc2);
 15     END LOOP;
 16
 17     RETURN pc2;
 18  END;
 19  /

Function created.

SQL>

(尽管我不确定,但我不确定我了解其目的是什么):

SQL> SELECT string_to_char (1, 'A', 'B') FROM DUAL;

STRING_TO_CHAR(1,'A','B')
--------------------------------------------------------------------------------
B

B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
SQL>

You named too many things with the same name (c1 in your case):

  • function's parameter
  • local variable
  • counter in FOR loop

If you modified it to e.g.

SQL> set serveroutput on
SQL>
SQL> CREATE OR REPLACE FUNCTION string_to_char (c1  NUMBER,
  2                                             c2  VARCHAR2,
  3                                             c3  VARCHAR2)
  4     RETURN VARCHAR2
  5  IS
  6     pc1  NUMBER := 1;
  7     pc2  VARCHAR2 (20);
  8     pc3  VARCHAR2 (20) := c3;
  9  BEGIN
 10     FOR i IN 1 .. 20
 11     LOOP
 12        SELECT SUBSTR (c3, c1, 1) INTO pc2 FROM DUAL;
 13
 14        DBMS_OUTPUT.put_line (pc2);
 15     END LOOP;
 16
 17     RETURN pc2;
 18  END;
 19  /

Function created.

SQL>

then it compiles and works (although, I'm not sure I understand what is its purpose):

SQL> SELECT string_to_char (1, 'A', 'B') FROM DUAL;

STRING_TO_CHAR(1,'A','B')
--------------------------------------------------------------------------------
B

B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
SQL>

我写了一个函数,如果我写了一个字符串,它将字符插入输出中。但是我显示了我在代码的最后一个代码中提高的错误

雄赳赳气昂昂 2025-02-18 07:33:40

问题似乎是因为您只是在下一行中获取第1页:

driver.get("https://www.tcgplayer.com/search/magic/commander-streets-of-new-capenna?productLineName=magic&setName=commander-streets-of-new-capenna&page=1&view=grid")

但是如您所见,在URL中有一个Query参数,称为 page ,它决定了您是哪个HTML页面提取。因此,您要做的就是每次循环到新页面时,都必须通过更改 page 查询参数来获取新的HTML内容。例如,在您的循环中,这将是这样的事情:

driver.get("https://www.tcgplayer.com/search/magic/commander-streets-of-new-capenna?productLineName=magic&setName=commander-streets-of-new-capenna&page={page}&view=grid".format(page = currentPage))

获取新的HTML结构后,您将能够根据需要访问不同页面中存在的新元素。

The issue it seems to be because you're just fetching the page 1 as shown in the next line:

driver.get("https://www.tcgplayer.com/search/magic/commander-streets-of-new-capenna?productLineName=magic&setName=commander-streets-of-new-capenna&page=1&view=grid")

But as you can see there's a query parameter called page in the url that determines which html's page you are fetching. So what you'll have to do is every time you're looping to a new page you'll have to fetch the new html content with the driver by changing the page query parameter. For example in your loop it will be something like this:

driver.get("https://www.tcgplayer.com/search/magic/commander-streets-of-new-capenna?productLineName=magic&setName=commander-streets-of-new-capenna&page={page}&view=grid".format(page = currentPage))

And after you fetch the new html structure you'll be able to access to the new elements that are present in the differente pages as you require.

如何刮擦动态性的页面?

雄赳赳气昂昂 2025-02-18 06:32:50

似乎API终点仅接受 Multipart/formdata 格式中的数据。

import 'dart:covert';
...
  
String paramList = json.encode({
    "MethodName": "GetPlaySequence",
    "channelType": "HO",
    "osType": "W",
    "osVersion":
        "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36",
    "playDate": "2022-06-29",
    "cinemaID": "1|0001|1013",
    "representationMovieCode": ""
  });

FormData formData = FormData.fromMap({'ParamList': paramList});

var req = await Dio().post(
  '$url',
  data: formData,
);

It seems that the api end point only accepts data in the multipart/formdata format.

import 'dart:covert';
...
  
String paramList = json.encode({
    "MethodName": "GetPlaySequence",
    "channelType": "HO",
    "osType": "W",
    "osVersion":
        "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36",
    "playDate": "2022-06-29",
    "cinemaID": "1|0001|1013",
    "representationMovieCode": ""
  });

FormData formData = FormData.fromMap({'ParamList': paramList});

var req = await Dio().post(
  '$url',
  data: formData,
);

如何将python请求HTTP转换为颤动?

更多

推荐作者

櫻之舞

文章 0 评论 0

弥枳

文章 0 评论 0

m2429

文章 0 评论 0

野却迷人

文章 0 评论 0

我怀念的。

文章 0 评论 0

更多

友情链接

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