白日梦

文章 评论 浏览 29

白日梦 2025-02-19 17:13:02
In C and C++, when we have an int* type pointer that is intended to point to the first element of an array, we do not have a direct way to know the length of the array using the pointer alone. This is because the pointer itself does not carry information about the size of the array it is pointing to.

If you need to determine the length of the array pointed to by an int* pointer, you need to rely on some additional information. One common approach is to have a separate variable that stores the length of the array. For example:

int array[] = {1, 2, 3, 4, 5};
int* ptr = array;
int length = 5;

// To get the length of array through int* pointer
int arr_length = 0;
if (ptr) {
    while (*(ptr + arr_length)) {
        arr_length++;
    }
}


printf("Length of array: %d\n", arr_length);
In this example, we have an int* pointer ptr pointing to the first element of the array. To find the length of the array, we iterate through the elements pointed by the pointer until we encounter a zero value, which indicates the end of the array.

Keep in mind that this approach assumes that the array is null-terminated or has some sentinel value that indicates the end of the array. If your array does not have such a sentinel value, you will need to explicitly keep track of the length of the array.
In C and C++, when we have an int* type pointer that is intended to point to the first element of an array, we do not have a direct way to know the length of the array using the pointer alone. This is because the pointer itself does not carry information about the size of the array it is pointing to.

If you need to determine the length of the array pointed to by an int* pointer, you need to rely on some additional information. One common approach is to have a separate variable that stores the length of the array. For example:

int array[] = {1, 2, 3, 4, 5};
int* ptr = array;
int length = 5;

// To get the length of array through int* pointer
int arr_length = 0;
if (ptr) {
    while (*(ptr + arr_length)) {
        arr_length++;
    }
}


printf("Length of array: %d\n", arr_length);
In this example, we have an int* pointer ptr pointing to the first element of the array. To find the length of the array, we iterate through the elements pointed by the pointer until we encounter a zero value, which indicates the end of the array.

Keep in mind that this approach assumes that the array is null-terminated or has some sentinel value that indicates the end of the array. If your array does not have such a sentinel value, you will need to explicitly keep track of the length of the array.

如何找到数组的大小(从指向第一个元素数组的指针)?

白日梦 2025-02-19 05:12:53

我能够使用电源查询用电源bi连接到图

I was able to connect to graph using a power query Connect to Graph with power bi

电源BI连接到图形访问该资源是禁止的

白日梦 2025-02-19 00:59:48

你在寻找吗?

示例代码

$arrs = array(
'1' => array(
     "sampleid"=> "1234",
     "productid"=> "11111",
     "threshold"=> "20.00",
     "stock"=> "345",
     "product"=> "Beauty sample 1"
    ),
'2' => array(
    "sampleid"=> "5678",
    "productid"=> "22222",
    "threshold"=> "20.00",
    "stock"=> "2449",
    "product"=> "Beauty sample 2"
    ),
'3' => array(
    "sampleid"=> "999",
    "productid"=> "33333",
    "threshold"=> "100.00",
    "stock"=> "345",
    "product"=> "Beauty sample 3"
    )
);

$data = array();

foreach($arrs as $key => $value){
    $data[$value['threshold']]['threshold'] = $value['threshold'];
        $data[$value['threshold']]['samples'][] = array(
                'productid' => $value['productid'],
                'stock'     => $value['stock']
            );
}

print_r($data);

输出:

Array
(
[20.00] => Array
    (
        [threshold] => 20.00
        [samples] => Array
            (
                [0] => Array
                    (
                        [productid] => 11111
                        [stock] => 345
                    )

                [1] => Array
                    (
                        [productid] => 22222
                        [stock] => 2449
                    )

            )

    )

[100.00] => Array
    (
        [threshold] => 100.00
        [samples] => Array
            (
                [0] => Array
                    (
                        [productid] => 33333
                        [stock] => 345
                    )

            )

    )

)

is that you looking for ?

Example code

$arrs = array(
'1' => array(
     "sampleid"=> "1234",
     "productid"=> "11111",
     "threshold"=> "20.00",
     "stock"=> "345",
     "product"=> "Beauty sample 1"
    ),
'2' => array(
    "sampleid"=> "5678",
    "productid"=> "22222",
    "threshold"=> "20.00",
    "stock"=> "2449",
    "product"=> "Beauty sample 2"
    ),
'3' => array(
    "sampleid"=> "999",
    "productid"=> "33333",
    "threshold"=> "100.00",
    "stock"=> "345",
    "product"=> "Beauty sample 3"
    )
);

$data = array();

foreach($arrs as $key => $value){
    $data[$value['threshold']]['threshold'] = $value['threshold'];
        $data[$value['threshold']]['samples'][] = array(
                'productid' => $value['productid'],
                'stock'     => $value['stock']
            );
}

print_r($data);

Output:

Array
(
[20.00] => Array
    (
        [threshold] => 20.00
        [samples] => Array
            (
                [0] => Array
                    (
                        [productid] => 11111
                        [stock] => 345
                    )

                [1] => Array
                    (
                        [productid] => 22222
                        [stock] => 2449
                    )

            )

    )

[100.00] => Array
    (
        [threshold] => 100.00
        [samples] => Array
            (
                [0] => Array
                    (
                        [productid] => 33333
                        [stock] => 345
                    )

            )

    )

)

如何按阈值价格将样本名称名称为子数组密钥进行分组?

白日梦 2025-02-18 20:15:04

正如@felixkling指出的那样,最有可能的情况是您要寻找的节点尚不存在(尚不存在)。

但是,现代开发实践通常可以用文档范围来操纵文档树之外的文档元素,或者直接直接脱离/重新触及当前元素。此类技术可以用作JavaScript模板的一部分,也可以避免过度重新粉刷/反流操作,而所涉及的元素正在大大改变。

同样,在现代浏览器上推出的新“ Shadow dom”功能可以使元素成为文档的一部分,但不可用document.getElementById及其所有兄弟姐妹方法(QuerySelectector等)。这样做是为了封装功能并专门隐藏它。

再说一次,您最可能简单地寻找的元素在文档中还不是(尚未),您应该按照Felix的建议进行。但是,您还应该意识到,这越来越多的原因是元素可能是无法理解的唯一原因(无论是临时还是永久)。

As @FelixKling pointed out, the most likely scenario is that the nodes you are looking for do not exist (yet).

However, modern development practices can often manipulate document elements outside of the document tree either with DocumentFragments or simply detaching/reattaching current elements directly. Such techniques may be used as part of JavaScript templating or to avoid excessive repaint/reflow operations while the elements in question are being heavily altered.

Similarly, the new "Shadow DOM" functionality being rolled out across modern browsers allows elements to be part of the document, but not query-able by document.getElementById and all of its sibling methods (querySelector, etc.). This is done to encapsulate functionality and specifically hide it.

Again, though, it is most likely that the element you are looking for simply is not (yet) in the document, and you should do as Felix suggests. However, you should also be aware that that is increasingly not the only reason that an element might be unfindable (either temporarily or permanently).

为什么jQuery或诸如getElementById之类的DOM方法找不到元素?

白日梦 2025-02-18 17:00:21

解决方案是使用 - 用例

sam build --debug --use-container

The solution is to use --use-container

sam build --debug --use-container

AWS SAM构建:运行时Python版本与本地PC Python版本不同

白日梦 2025-02-18 16:33:53

您可以尝试以下操作:

data['output'] = df['v1'].replace({'ham': 1, 'spam': 0})

Can you try the following:

data['output'] = df['v1'].replace({'ham': 1, 'spam': 0})

Valueerror:系列是模棱两可的。使用A.Empty,A.Bool(),A.Item(),A.Any()或A.Al()

白日梦 2025-02-18 07:06:35

目前,它在Exceldatareader中不支持 -
请参阅上一个堆栈溢出问题:使用exceldatareader.dataset的指定范围从excel表

It's currently not supported in ExcelDataReader -
See previous stack overflow question: How get a named range from an excel sheet using ExcelDataReader.Dataset

如何从定义的名称(命名范围)读取值?

白日梦 2025-02-18 04:48:16

在这里,您将 char [4] p ,施加到 int*中,并初始化 ip ,结果:

    int* ip = (int *)p;

在这里您取消 ip ,因为它是 int*表示它将读取 sizeof(int) bytes,以形成 int 从地址 ip 点上的点:

    printf("%d \n", *(ip + 0)); // 1145258561 

由于 int s通常是4个字节,它通常会起作用,但它违反了严格的别名规则,并以 不确定的行为。另外,如果 int 是8个字节,则该程序将具有未定义的行为,因为它将在 char [4] 之外读取。

在这里,您可以将 IP 的值打印为 int ,但它是指针,因此,该程序将具有 不确定的行为。同样,指针通常是8个字节,因此也可能导致不确定的行为也是如此。

    printf("%d \n", ip); // 6422016

要正确打印指针,请使用%p ,然后将指针施放为 void*

    printf("%p\n", (void*) ip);

Here you cast the char[4], p, into an int* and initialize ip with the result:

    int* ip = (int *)p;

Here you dereference ip, which, since it's an int* means that it will read sizeof(int) bytes to form an int from the address ip points at:

    printf("%d \n", *(ip + 0)); // 1145258561 

Since ints are often 4 bytes, it will often seem to work, but it violates the strict aliasing rule and results in undefined behavior. Also, if an int is 8 bytes, the program would have undefined behavior since it would then read outside the char[4].

Here you print the value of ip as an int, but it is a pointer, so again, the program will have undefined behavior. Also, a pointer is often 8 bytes so it will likely cause undefined behavior for that reason too.

    printf("%d \n", ip); // 6422016

To properly print pointers, use %p and cast the pointer to void*:

    printf("%p\n", (void*) ip);

int * ip =(int *)p是什么意思?

白日梦 2025-02-17 17:28:26

我可以得到确切的部署。yaml吗?
您是否在其中附加了任何卷/configmaps/秘密?如果是,请确保所有这些都可以在部署之前可用。

Can I get the exact deployment.yaml ?
Did you attach any volumes/configmaps/secrets in it? if yes, please make sure all those are available before you deploy.

在启用K8S namespase注入后,ISTIO SIDECAR注入了卡住的容器创建

白日梦 2025-02-17 10:29:48

1-您可以使用 dplyover 软件包。
带有 mTCARS 的典型示例为 db 和10个不同的SD:

library(tidyverse)

db <- as_tibble(mtcars)
SD <- 1:10
n_col <- 100

sds <- sample(SD, n_col, replace = TRUE)
names(sds) <- paste0("X", seq_len(n_col))

mutate(db, dplyover::over(sds, ~ rnorm(n(), sd = .x)))

2-另外,您可以分别创建随机生成的矩阵,并使用 db 在(之后

mat_rng <- as_tibble(lapply(sds, \(x) rnorm(nrow(db), sd = x)))
# or, as well suggested by @Adam
# mat_rng <- map_dfc(sds, rnorm, n = nrow(db), mean = 0)

bind_cols(db, mat_rng)

)仅适用于R&gt; = 4.0.0,因为我使用了新的匿名函数语法)

1 - You can use the dplyover package.
An exemple with mtcars as db and 10 different SD:

library(tidyverse)

db <- as_tibble(mtcars)
SD <- 1:10
n_col <- 100

sds <- sample(SD, n_col, replace = TRUE)
names(sds) <- paste0("X", seq_len(n_col))

mutate(db, dplyover::over(sds, ~ rnorm(n(), sd = .x)))

2 - Alternatively, you can create the random generated matrix separately and bind with db after

mat_rng <- as_tibble(lapply(sds, \(x) rnorm(nrow(db), sd = x)))
# or, as well suggested by @Adam
# mat_rng <- map_dfc(sds, rnorm, n = nrow(db), mean = 0)

bind_cols(db, mat_rng)

(works only with R >= 4.0.0 because I used the new anonymous function syntax)

将多个RNG列添加到tibble

白日梦 2025-02-17 07:01:28

硬件设计师的视角

我相信我应该为此添加硬件设计师的观点,因为我设计和构建了浮点硬件。了解错误的起源可能有助于理解软件中发生的事情,最终,我希望这有助于解释浮点错误发生并随着时间而积累的原因。

1。

从工程的角度来看,大多数浮点操作都会有一些错误元素,因为执行浮点计算的硬件仅需要在最后一个位置的错误少于一个单元的一半。因此,许多硬件将停止的精确度仅是仅在最后一个位置的一个单元的误差少于一个单元的误差所必需的,而单一操作,这在浮点分区中尤其有问题。构成单个操作的是取决于单元采用多少操作数。对于大多数人来说,这是两个,但是有些单元需要3个或更多操作数。因此,不能保证重复操作会导致理想的错误,因为这些错误会随着时间的推移加起来。

2。标准

大多数处理器遵循 ieee-754 标准
。例如,IEEE-754中有一个符合模式,该模式允许以精度为代价来表示非常小的浮点数。但是,以下将涵盖IEEE-754的归一化模式,这是典型的操作模式。

在IEEE-754标准中,只要在最后一个位置少于一个单位的一半,硬件设计人员就可以允许任何错误/epsilon的价值放置一个操作。这解释了为什么当重复操作时,错误会加起来。对于IEEE-754双重精度,这是第54位,因为使用53位表示浮点数的数字部分(归一化),也称为Mantissa(例如5.3 in 5.3e5)。接下来的部分详细介绍了各种浮点操作上硬件错误的原因。

3。造成舍入误差的原因,

浮点划分误差的主要原因是用于计算商的分裂算法。大多数计算机系统使用乘法乘以乘法,主要在 z = x/y , z = x *(1/y)中计算划分。在迭代中计算一个分区,即每个周期都计算一些商的一些位,直到达到所需的精度为止,对于IEEE-754而言,这在最后一个位置的错误少于一个单元。 y(1/y)的倒数表被称为慢划分中的商选择表(QST),并且商选择表中的大小通常是radix的宽度,或者是许多位的宽度在每次迭代中计算的商,以及几个后卫。对于IEEE-754标准,双重精度(64位),它将是分隔器的radix的大小,再加上几个后卫位K,其中 k&gt; = 2 。因此,例如,一次计算2位商的分隔线的典型商选择表(Radix 4)将为 2+2 = 4 位(加上一些可选位)。

3.1分区四舍五入错误:倒数的近似

商选择表中的倒数取决于分区方法:慢速分区,例如SRT部门或快速分裂,例如Goldschmidt division;根据除法算法修改每个条目,以尝试产生最低的误差。但是,无论如何,所有倒数都是实际倒数的近似值,并引入了一些错误元素。缓慢的除法和快速除法方法都计算出商迭代,即每个步骤都计算出一些商的位,然后从股息中减去结果,而分隔器重复步骤,直到误差小于一半的一半在最后一个地方。缓慢的除法方法计算每个步骤中商数的固定数字,并且通常构建价格便宜,快速分裂方法计算每个步骤数量的数字数量,并且构建通常更昂贵。分区方法中最重要的部分是,它们中的大多数依赖于相互量的近似重复乘法,因此它们很容易出错。

4。其他操作中的四舍五入错误:截断

所有操作中舍入错误的另一个原因是IEEE-754允许的最终答案的截断模式的不同模式。有截短的,圆形的零件,零,“ noreferrer”> round to-nearest(default),回合 - 下达和综述。所有方法都在最后一个地方引入了少于一个单元的误差元素,以进行单个操作。随着时间的流逝和重复操作,截断还会累积地增加结果错误。这种截断误差在指示中尤其有问题,涉及某种形式的重复乘法。

5。重复操作,

因为执行浮点计算的硬件只需要产生一个结果,而错误在最后一个位置的一个单位的错误少于一个单元的一半以进行一次操作,因此,如果不观察,该错误将会在重复的操作中增长。这就是在需要有界错误的计算中的原因,数学家使用诸如使用fromn-neart IEEE-754的最后一个位置的数字,因为随着时间的流逝,错误更有可能互相取消,而间隔算术结合预测四舍五入错误并纠正它们。由于与其他圆形模式相比,其相对误差低,因此圆形到最近的数字(在最后一个位置)是IEEE-754的默认舍入模式。

请注意,默认的圆形模式,圆头到nearest 甚至在最后一个位置的数字,保证在最后一个位置的一个单位的错误少于一个单元的一半进行一次操作。使用截断,综述和单独的圆形可能会导致一个错误大于最后一个单元的一半,但在最后一个位置少于一个单元,因此不建议使用这些模式用于间隔算术。

6.总而言之

,浮点操作错误的基本原因是硬件截断的结合,以及在划分的情况下的倒数。由于IEEE-754标准仅需要在最后一个位置少于一个单元的一半误差即可进行一次操作,因此,除非纠正,否则重复操作的浮点误差将加起来。

A Hardware Designer's Perspective

I believe I should add a hardware designer’s perspective to this since I design and build floating point hardware. Knowing the origin of the error may help in understanding what is happening in the software, and ultimately, I hope this helps explain the reasons for why floating point errors happen and seem to accumulate over time.

1. Overview

From an engineering perspective, most floating point operations will have some element of error since the hardware that does the floating point computations is only required to have an error of less than one half of one unit in the last place. Therefore, much hardware will stop at a precision that's only necessary to yield an error of less than one half of one unit in the last place for a single operation which is especially problematic in floating point division. What constitutes a single operation depends upon how many operands the unit takes. For most, it is two, but some units take 3 or more operands. Because of this, there is no guarantee that repeated operations will result in a desirable error since the errors add up over time.

2. Standards

Most processors follow the IEEE-754 standard but some use denormalized, or different standards
. For example, there is a denormalized mode in IEEE-754 which allows representation of very small floating point numbers at the expense of precision. The following, however, will cover the normalized mode of IEEE-754 which is the typical mode of operation.

In the IEEE-754 standard, hardware designers are allowed any value of error/epsilon as long as it's less than one half of one unit in the last place, and the result only has to be less than one half of one unit in the last place for one operation. This explains why when there are repeated operations, the errors add up. For IEEE-754 double precision, this is the 54th bit, since 53 bits are used to represent the numeric part (normalized), also called the mantissa, of the floating point number (e.g. the 5.3 in 5.3e5). The next sections go into more detail on the causes of hardware error on various floating point operations.

3. Cause of Rounding Error in Division

The main cause of the error in floating point division is the division algorithms used to calculate the quotient. Most computer systems calculate division using multiplication by an inverse, mainly in Z=X/Y, Z = X * (1/Y). A division is computed iteratively i.e. each cycle computes some bits of the quotient until the desired precision is reached, which for IEEE-754 is anything with an error of less than one unit in the last place. The table of reciprocals of Y (1/Y) is known as the quotient selection table (QST) in the slow division, and the size in bits of the quotient selection table is usually the width of the radix, or a number of bits of the quotient computed in each iteration, plus a few guard bits. For the IEEE-754 standard, double precision (64-bit), it would be the size of the radix of the divider, plus a few guard bits k, where k>=2. So for example, a typical Quotient Selection Table for a divider that computes 2 bits of the quotient at a time (radix 4) would be 2+2= 4 bits (plus a few optional bits).

3.1 Division Rounding Error: Approximation of Reciprocal

What reciprocals are in the quotient selection table depend on the division method: slow division such as SRT division, or fast division such as Goldschmidt division; each entry is modified according to the division algorithm in an attempt to yield the lowest possible error. In any case, though, all reciprocals are approximations of the actual reciprocal and introduce some element of error. Both slow division and fast division methods calculate the quotient iteratively, i.e. some number of bits of the quotient are calculated each step, then the result is subtracted from the dividend, and the divider repeats the steps until the error is less than one half of one unit in the last place. Slow division methods calculate a fixed number of digits of the quotient in each step and are usually less expensive to build, and fast division methods calculate a variable number of digits per step and are usually more expensive to build. The most important part of the division methods is that most of them rely upon repeated multiplication by an approximation of a reciprocal, so they are prone to error.

4. Rounding Errors in Other Operations: Truncation

Another cause of the rounding errors in all operations are the different modes of truncation of the final answer that IEEE-754 allows. There's truncate, round-towards-zero, round-to-nearest (default), round-down, and round-up. All methods introduce an element of error of less than one unit in the last place for a single operation. Over time and repeated operations, truncation also adds cumulatively to the resultant error. This truncation error is especially problematic in exponentiation, which involves some form of repeated multiplication.

5. Repeated Operations

Since the hardware that does the floating point calculations only needs to yield a result with an error of less than one half of one unit in the last place for a single operation, the error will grow over repeated operations if not watched. This is the reason that in computations that require a bounded error, mathematicians use methods such as using the round-to-nearest even digit in the last place of IEEE-754, because, over time, the errors are more likely to cancel each other out, and Interval Arithmetic combined with variations of the IEEE 754 rounding modes to predict rounding errors, and correct them. Because of its low relative error compared to other rounding modes, round to nearest even digit (in the last place), is the default rounding mode of IEEE-754.

Note that the default rounding mode, round-to-nearest even digit in the last place, guarantees an error of less than one half of one unit in the last place for one operation. Using the truncation, round-up, and round down alone may result in an error that is greater than one half of one unit in the last place, but less than one unit in the last place, so these modes are not recommended unless they are used in Interval Arithmetic.

6. Summary

In short, the fundamental reason for the errors in floating point operations is a combination of the truncation in hardware, and the truncation of a reciprocal in the case of division. Since the IEEE-754 standard only requires an error of less than one half of one unit in the last place for a single operation, the floating point errors over repeated operations will add up unless corrected.

浮点数学破裂了吗?

白日梦 2025-02-16 23:55:29

您可以通过 .option(“订阅”,“创建,删除”)读取两个主题

然后您都有两个主题的数据框能够按时间戳进行排序,并汇总/减少数据框架以获取输出。

另外,Kafka记录已经在其中有一个时间戳,火花返回为列。因此,您可以将生产者设计更改为具有一个主题,例如 evest ,从值中删除时间戳,将 id 移动到记录创建事件将具有非null value ,并且删除事件将具有 null value

无论哪种方式,您仍然需要一个还原函数


或者,您无法使用SPARK,并且使用建议的主题设计,然后在Kafka Streams / ksqldb中创建一个表已经拥有您想要的数据。不一定使用时间戳信息,而是至少按ID或其他值进行汇总计数。

You can read from both topics with .option("subscribe", "created,deleted")

Then you have a dataframe of both topics, and you can then parse the value for the timestamp, and should be able to sort by the timestamp, and aggregate/reduce the dataframe to get the output.

Alternatively, Kafka records already have a timestamp within them, which Spark returns as a column. So, you can change your producer design to have one topic, say events, remove the timestamp from the value, move the id to the record key, create events will have a non-null value, and delete events will have a null value.

Either way, you still need a reducer function.


Or you can not use Spark, and with the proposed topic design, then creating a table in Kafka Streams / ksqlDB will already have the data you want. Not necessarily with timestamp information, but at least aggregate counts by ID or other value.

来自Timestamp的两个不同KAFKA主题的Spark聚集事件

白日梦 2025-02-16 23:17:01

尝试此代码:

import Link from "next/link";
import Image from "next/image";
import { BlogData } from "../data/blogdata";
import { useEffect, useState } from "react";

const Sidebar = () => {
  const [shuffled, setShuffled] = useState([]);
  const [loading, setLoading] = useState(true); // anyting you want !!!

  useEffect(() => {
    if (loading) {
      const x = [...BlogData].sort(() => 0.5 - Math.random());
      setShuffled(x.slice(0, 5));
      setLoading(false);
    }
  }, [loading]);

  return (
    <>
      <h2 className="font-roboto text-3xl font-semibold pb-10">
        Featured Posts
      </h2>

      {loading ? <div>loading ... </div> : shuffled.map((val) => {
        return (
          <div key={val._id} className="flex flex-col pt-5">
            <div className="w-56 pr-5">
              <Image
                src={val.featuredImage}
                alt={val.alt}
                width={1200}
                height={800}
                className=" rounded-3xl"
              />
            </div>
            <Link href={`/blog/${val.slug}`}>
              <a>
                <h3 className="text-sm font-poppins font-medium hover:text-[#5836ed] transition-all duration-300">
                  {val.title}
                </h3>
              </a>
            </Link>
          </div>
        );
      })}
    </>
  );
};

export default Sidebar;

try this code :

import Link from "next/link";
import Image from "next/image";
import { BlogData } from "../data/blogdata";
import { useEffect, useState } from "react";

const Sidebar = () => {
  const [shuffled, setShuffled] = useState([]);
  const [loading, setLoading] = useState(true); // anyting you want !!!

  useEffect(() => {
    if (loading) {
      const x = [...BlogData].sort(() => 0.5 - Math.random());
      setShuffled(x.slice(0, 5));
      setLoading(false);
    }
  }, [loading]);

  return (
    <>
      <h2 className="font-roboto text-3xl font-semibold pb-10">
        Featured Posts
      </h2>

      {loading ? <div>loading ... </div> : shuffled.map((val) => {
        return (
          <div key={val._id} className="flex flex-col pt-5">
            <div className="w-56 pr-5">
              <Image
                src={val.featuredImage}
                alt={val.alt}
                width={1200}
                height={800}
                className=" rounded-3xl"
              />
            </div>
            <Link href={`/blog/${val.slug}`}>
              <a>
                <h3 className="text-sm font-poppins font-medium hover:text-[#5836ed] transition-all duration-300">
                  {val.title}
                </h3>
              </a>
            </Link>
          </div>
        );
      })}
    </>
  );
};

export default Sidebar;

从对象数组中获取数据时的水合错误

白日梦 2025-02-16 13:34:58

您使用哪种模式来配置参数?

ARM参数配置仅在“ GIT模式”中启用。目前,它以“实时模式”或“数据工厂”模式被禁用。

因此,根据Microsoft的官方声明,您应该使用GIT存储库。

另外,请注意 - 创建一个自定义资源管理器参数配置在您的git分支的根文件夹中创建一个名为 arm-template-parameters-definition.json 的文件。 您必须使用该确切的文件名。

还有其他多种方法可以尝试通过ARM模板传递秘密。请参阅 devkimchi.com

Which mode you are using to configure the parameters?

ARM parameter configuration is only enabled in "GIT mode". Currently it is disabled in "live mode" or "Data Factory" mode.

So, as per above official statement from Microsoft, you should be using Git repository.

Also, take note - Creating a custom Resource Manager parameter configuration creates a file named arm-template-parameters-definition.json in the root folder of your git branch. You must use that exact file name.

There are other multiple ways which you can try to pass secrets in ARM template. Refer this article from devkimchi.com.

将自定义参数添加到ADF手臂模板

白日梦 2025-02-16 11:18:34

尝试更新pyrogram并尝试使用以下方式:get_chat_history()

文档:

Try to update pyrogram and try using this: get_chat_history()

Documentation:
https://docs.pyrogram.org/api/methods/get_chat_history?highlight=history#pyrogram.Client.get_chat_history

pyrogram:对于等待app.get_history(chat,limit = 1)的味精:attributeError:&#x27; client&#x27;对象没有属性&#x27; get_history&#x27;

更多

推荐作者

櫻之舞

文章 0 评论 0

弥枳

文章 0 评论 0

m2429

文章 0 评论 0

野却迷人

文章 0 评论 0

我怀念的。

文章 0 评论 0

更多

友情链接

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