问:
Storing a function in a variable and calling it via document.getElementById() Method
I stored the function in the variable "a" and I was expecting it to return "hello" in the html but it instead returned the whole function as a string.

When calling the function using the variable plus parantheses "a()" it outputted the string "hello" in the html, which is what I wanted to do. Can anyone explain why this works? Thank you :)

let a = function greetings() {
    let b = "hello";
    return b;
};

document.getElementById('hi').innerHTML = `This is the output without the parentheses:
 ${a}

This is the output with the parentheses:
 ${a()}`;```
<pre class="snippet-code-html lang-html prettyprint-override"><code><p id='hi'>...</p></code>```

Body:
I stored the function in the variable "a" and I was expecting it to return "hello" in the html but it instead returned the whole function as a string.

When calling the function using the variable plus parantheses "a()" it outputted the string "hello" in the html, which is what I wanted to do. Can anyone explain why this works? Thank you :)

let a = function greetings() {
    let b = "hello";
    return b;
};

document.getElementById('hi').innerHTML = `This is the output without the parentheses:
 ${a}

This is the output with the parentheses:
 ${a()}`;

...


来源: stackexchange

问:
syncronizing frame capture with imu sensors
I am using a Jetson Xavier NXto capture frames from a USB camera using OpenCV.
Then I implement a KCF tracker on the captured frames to track a certain object.
In parallel I am sending the tracking data to an ESP32 capturing IMU data from an MPU6050.
I can see a lot of inconsistency between when the tracker recorded movement to when the sensor recorded movement. sometimes it is 70 millisecond difference, and sometimes it even gets up to 150 millisecond difference. that much difference is really messing up my plans, even that 70 millisecond difference seems too much considering i am running on 60fps camera, that amounts to almost 5 frames delay.
I checked the network delay with a scope, it is about 3 millisecond consistent using UART communication.
Here's how I am grabbing frames:

video.open(
  "v4l2src device=/dev/video0 queue-size=1 ! video/x-raw,width=640,height=480 ! nvvidconv flip-method=2 ! video/x-raw(memory:NVMM),
  format = I420 ! nvvidconv ! video/x-raw,format=BGRx,width=(int)640, height=(int)480, framerate=(fraction)60/1!
  videoconvert !video/x-raw,format=BGR ! appsink drop=True sync=False"
);
```

I use cv::VideoCapture::read() to capture frames.

the IMU sensor is working at 200hz.

Can anyone explain both the delay in measurements, meaning between the sensor and the tracker, and the difference between measured delay, ranging from 70 to 150 milliseconds?

ContentLicense: CC BY-SA 4.0

Body:
I am using a Jetson Xavier NXto capture frames from a USB camera using OpenCV.
Then I implement a KCF tracker on the captured frames to track a certain object.
In parallel I am sending the tracking data to an ESP32 capturing IMU data from an MPU6050.
I can see a lot of inconsistency between when the tracker recorded movement to when the sensor recorded movement. sometimes it is 70 millisecond difference, and sometimes it even gets up to 150 millisecond difference. that much difference is really messing up my plans, even that 70 millisecond difference seems too much considering i am running on 60fps camera, that amounts to almost 5 frames delay.
I checked the network delay with a scope, it is about 3 millisecond consistent using UART communication.
Here's how I am grabbing frames:

video.open(
  "v4l2src device=/dev/video0 queue-size=1 ! video/x-raw,width=640,height=480 ! nvvidconv flip-method=2 ! video/x-raw(memory:NVMM),
  format = I420 ! nvvidconv ! video/x-raw,format=BGRx,width=(int)640, height=(int)480, framerate=(fraction)60/1!
  videoconvert !video/x-raw,format=BGR ! appsink drop=True sync=False"
);

I use cv::VideoCapture::read() to capture frames.

the IMU sensor is working at 200hz.

Can anyone explain both the delay in measurements, meaning between the sensor and the tracker, and the difference between measured delay, ranging from 70 to 150 milliseconds?


问:
Retrieve multiple data from sql database and print individual lines for each using php
Currently I'm having 2 database I have successfully retrieved the data from SQL database using php. But I don't know how to join and print individual messages using php

Customer

ID
product id

01
202201

02
202103

03
202204

03
202204

Product

product id
product

202201
phone.

202103
monitor.

202204
laptop.

202204
desktop.

Current Output in sql

ID
product

01
phone

02
monitor

03
laptop

03
desktop

Current Output in php

01 - phone
02 - monitor
03 - laptop, desktop

Expected Output in PHP

If 1 product

Your Id is 01 the product is phone.

If 2 product

Your Id is 03 the products are laptop and desktop.

My code

```<code><?php
$sql = "SELECT id, product FROM customer a, product b WHERE a.product_id = b.product_id ";

$result = mysqli_query($conn, $sql);

while ($row = $result->fetch_array()){
    $id[] = $row[“id”];
    $product[] = $row[“product”];

    $max = sizeof($product);
    $max_m = sizeof($id);

if($product[$i] == 3)
{
  $msg= “Your Id is $id the products are $product[0], $product[1] and $product[2] ”;
}
elseif ($product[$i] == 2)
{
  $msg = “Your Id is $id the products are $product[0] and $product[1]”;
}
elseif($product[$i] == 1)
{
  $msg = “Your Id is $id the product is $product[0]”;
}

}

for($i=0; $i<$max_m;$i++)
{
if(!isset($duplicate_m[$id$i]]))
 {
  $duplicate_m[$id[$i]] = $msisdn[$i] = $product[$i];
 }
else
 {
  $duplicate_m[$id[$i]] .= ", {$product[$i]}";
 }

}
echo $msg;
print_r($duplicate_m);

?>

</code>```

Body:
Currently I'm having 2 database I have successfully retrieved the data from SQL database using php. But I don't know how to join and print individual messages using php

Customer

ID
product id

01
202201

02
202103

03
202204

03
202204

Product

product id
product

202201
phone.

202103
monitor.

202204
laptop.

202204
desktop.

Current Output in sql

ID
product

01
phone

02
monitor

03
laptop

03
desktop

Current Output in php

01 - phone
02 - monitor
03 - laptop, desktop

Expected Output in PHP

If 1 product

Your Id is 01 the product is phone.

If 2 product

Your Id is 03 the products are laptop and desktop.

My code

<?php
$sql = "SELECT id, product FROM customer a, product b WHERE a.product_id = b.product_id ";

$result = mysqli_query($conn, $sql);

while ($row = $result->fetch_array()){
    $id[] = $row[“id”];
    $product[] = $row[“product”];

    $max = sizeof($product);
    $max_m = sizeof($id);

if($product[$i] == 3)
{
  $msg= “Your Id is $id the products are $product[0], $product[1] and $product[2] ”;
}
elseif ($product[$i] == 2)
{
  $msg = “Your Id is $id the products are $product[0] and $product[1]”;
}
elseif($product[$i] == 1)
{
  $msg = “Your Id is $id the product is $product[0]”;
}

}

for($i=0; $i<$max_m;$i++)
{
if(!isset($duplicate_m[$id$i]]))
 {
  $duplicate_m[$id[$i]] = $msisdn[$i] = $product[$i];
 }
else
 {
  $duplicate_m[$id[$i]] .= ", {$product[$i]}";
 }

}
echo $msg;
print_r($duplicate_m);

?>


问:
IAM Assume role policy validator in CDK
I am trying to create a policy for an assumed role which can be assumed by a number of resources.

I am not sure if what I am doing is the correct way.

creation = json.loads(config.get("creation"))

role_arn=[]

for key in creation:
    role_arn = role_arn.append(creation[key]["role"])

    role_policy_statements=[
                    aws_iam.PolicyStatement(
                        actions=["sts:AssumeRole"],
                        effect=aws_iam.Effect.ALLOW,
                        resources=role_arn,
                    ),
                ],
```
<p>Error:</p>
```Validation failed with the following errors:A PolicyStatement used in an identity-based policy must specify at least one resource.
```

I am not sure resources=role_arn is correct.

How do I achieve this use case ?

Title: IAM Assume role policy validator in CDK

Body:
I am trying to create a policy for an assumed role which can be assumed by a number of resources.

I am not sure if what I am doing is the correct way.

creation = json.loads(config.get("creation"))

role_arn=[]

for key in creation:
    role_arn = role_arn.append(creation[key]["role"])

    role_policy_statements=[
                    aws_iam.PolicyStatement(
                        actions=["sts:AssumeRole"],
                        effect=aws_iam.Effect.ALLOW,
                        resources=role_arn,
                    ),
                ],

Error:

Validation failed with the following errors:A PolicyStatement used in an identity-based policy must specify at least one resource.

I am not sure resources=role_arn is correct.

How do I achieve this use case ?


问:
Add specific vars file name in roles
Is it possible use specific var files in roles instead of main.yml? as example main2.yml</p>
```<code>    - role: awsbucket
      tags: ["awsbucket_asia"]
      vars_files: main2.yml
      when: inventory_hostname in groups["host1"]
</code>```

Title: Add specific vars file name in roles

Body:
Is it possible use specific var files in roles instead of main.yml? as example main2.yml

    - role: awsbucket
      tags: ["awsbucket_asia"]
      vars_files: main2.yml
      when: inventory_hostname in groups["host1"]


问:
dpdk-testpmd panic with "RTE_RING tailq is already registered"
I'm tring to run dpdk's example ethtools using dpdk-19.11.14 on ubuntu 22.04.

I got following errno:

```<code>EAL: Detected 4 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: RTE_RING tailq is already registered
PANIC in tailqinitfn_rte_ring_tailq():
Cannot initialize tailq: RTE_RING
20: [dpdk-testpmd(_start+0x25) [0x5589bb902cf5]]
19: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7f714ed02e40]]
18: [/lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7f714ed02d90]]
17: [dpdk-testpmd(main+0x78) [0x5589bb837d58]]
16: [dpdk-testpmd(rte_eal_init+0x65e) [0x5589bba5d65e]]
15: [dpdk-testpmd(+0x1187a1) [0x5589bb6ff7a1]]
14: [/lib/x86_64-linux-gnu/libc.so.6(dlopen+0x48) [0x7f714ed69748]]
13: [/lib/x86_64-linux-gnu/libc.so.6(+0x901ae) [0x7f714ed691ae]]
12: [/lib/x86_64-linux-gnu/libc.so.6(_dl_catch_error+0x33) [0x7f714ee4dcf3]]
11: [/lib/x86_64-linux-gnu/libc.so.6(_dl_catch_exception+0x88) [0x7f714ee4dc28]]
10: [/lib/x86_64-linux-gnu/libc.so.6(+0x906bc) [0x7f714ed696bc]]
9: [/lib64/ld-linux-x86-64.so.2(+0xe34e) [0x7f714f01934e]]
8: [/lib/x86_64-linux-gnu/libc.so.6(_dl_catch_exception+0x88) [0x7f714ee4dc28]]
7: [/lib64/ld-linux-x86-64.so.2(+0xdff6) [0x7f714f018ff6]]
6: [/lib/x86_64-linux-gnu/libc.so.6(_dl_catch_exception+0xe5) [0x7f714ee4dc85]]
5: [/lib64/ld-linux-x86-64.so.2(+0x6568) [0x7f714f011568]]
4: [/lib64/ld-linux-x86-64.so.2(+0x647e) [0x7f714f01147e]]
3: [/usr/local/lib/x86_64-linux-gnu/librte_ring.so.20.0(+0x1303) [0x7f714eb99303]]
2: [dpdk-testpmd(__rte_panic+0xcd) [0x5589bb7017ef]]
1: [dpdk-testpmd(rte_dump_stack+0x32) [0x5589bba53b72]]
Aborted (core dumped)

</code>```

Before that example, I had test the helloworld.
Fowlling is result of helloworld.

```<code>EAL: Detected 4 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: No available hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0000:02:01.0 on NUMA socket -1
EAL:   probe driver: 8086:100f net_e1000_em
EAL: PCI device 0000:02:05.0 on NUMA socket -1
EAL:   probe driver: 8086:100f net_e1000_em
EAL:   0000:02:05.0 VFIO group is not viable! Not all devices in IOMMU group bound to VFIO or unbound
EAL: Requested device 0000:02:05.0 cannot be used
hello from core 1
hello from core 2
hello from core 3
hello from core 0

</code>```

And this error also occured when i run dpdk-testpmd.

I had search a lot similar errno info in Bing, but there's no solution that i want.

One solution is to make static link  librte_.a to librte_.so, but I can't understand that.

tailq is already registered.

I want to know why this errono occured, and how can fix it.

Anyone can help please.

Body:
I'm tring to run dpdk's example ethtools using dpdk-19.11.14 on ubuntu 22.04.

I got following errno:

EAL: Detected 4 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: RTE_RING tailq is already registered
PANIC in tailqinitfn_rte_ring_tailq():
Cannot initialize tailq: RTE_RING
20: [dpdk-testpmd(_start+0x25) [0x5589bb902cf5]]
19: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7f714ed02e40]]
18: [/lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7f714ed02d90]]
17: [dpdk-testpmd(main+0x78) [0x5589bb837d58]]
16: [dpdk-testpmd(rte_eal_init+0x65e) [0x5589bba5d65e]]
15: [dpdk-testpmd(+0x1187a1) [0x5589bb6ff7a1]]
14: [/lib/x86_64-linux-gnu/libc.so.6(dlopen+0x48) [0x7f714ed69748]]
13: [/lib/x86_64-linux-gnu/libc.so.6(+0x901ae) [0x7f714ed691ae]]
12: [/lib/x86_64-linux-gnu/libc.so.6(_dl_catch_error+0x33) [0x7f714ee4dcf3]]
11: [/lib/x86_64-linux-gnu/libc.so.6(_dl_catch_exception+0x88) [0x7f714ee4dc28]]
10: [/lib/x86_64-linux-gnu/libc.so.6(+0x906bc) [0x7f714ed696bc]]
9: [/lib64/ld-linux-x86-64.so.2(+0xe34e) [0x7f714f01934e]]
8: [/lib/x86_64-linux-gnu/libc.so.6(_dl_catch_exception+0x88) [0x7f714ee4dc28]]
7: [/lib64/ld-linux-x86-64.so.2(+0xdff6) [0x7f714f018ff6]]
6: [/lib/x86_64-linux-gnu/libc.so.6(_dl_catch_exception+0xe5) [0x7f714ee4dc85]]
5: [/lib64/ld-linux-x86-64.so.2(+0x6568) [0x7f714f011568]]
4: [/lib64/ld-linux-x86-64.so.2(+0x647e) [0x7f714f01147e]]
3: [/usr/local/lib/x86_64-linux-gnu/librte_ring.so.20.0(+0x1303) [0x7f714eb99303]]
2: [dpdk-testpmd(__rte_panic+0xcd) [0x5589bb7017ef]]
1: [dpdk-testpmd(rte_dump_stack+0x32) [0x5589bba53b72]]
Aborted (core dumped)

Before that example, I had test the helloworld.
Fowlling is result of helloworld.

EAL: Detected 4 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: No available hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0000:02:01.0 on NUMA socket -1
EAL:   probe driver: 8086:100f net_e1000_em
EAL: PCI device 0000:02:05.0 on NUMA socket -1
EAL:   probe driver: 8086:100f net_e1000_em
EAL:   0000:02:05.0 VFIO group is not viable! Not all devices in IOMMU group bound to VFIO or unbound
EAL: Requested device 0000:02:05.0 cannot be used
hello from core 1
hello from core 2
hello from core 3
hello from core 0

And this error also occured when i run dpdk-testpmd.

I had search a lot similar errno info in Bing, but there's no solution that i want.

One solution is to make static link  librte_.a to librte_.so, but I can't understand that.

tailq is already registered.

I want to know why this errono occured, and how can fix it.

Anyone can help please.


问:
docker-compose django mysql with .env: can't connect to mysql server error

dockerfile

```<code>FROM python:3.10

WORKDIR /django_app

ENV PYTHONUNBUFFERED 1

ADD . /django_app
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
COPY . /django_app
</code>```

docker-compose.yml

```<code>version: '3.8'

services:
  db:
    image: mysql:latest
    hostname: mysql
    restart: always
    ports:
      - '3308:3306'
    environment:
       MYSQL_DATABASE: 'test'
       MYSQL_USER : 'mysqluser'
       MYSQL_PASSWORD: 'root123'
       MYSQL_ROOT_PASSWORD: 'root123'
    # volumes:
    #   - D:\django_project\db1:/var/run/mysqld
    #   - D:\django_project\db:/var/lib/mysql
  web:
    build: .
    restart: on-failure
    command: sh -c "python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
    ports:
      - "8000:8000"
    depends_on:
      - db
</code>```

settings.py

```<code>DATABASES = {
    "default": {
        "ENGINE": 'django.db.backends.mysql',
        "NAME": 'test',
        "USER": 'mysqluser',
        "PASSWORD": 'root123',
        "HOST": 'db',
        "PORT": 3306,
    }
}
</code>```

error 2

[Errno -3] Temporary failure in name resolution')) #0 81.18 #0 91.27 WARNING: There was an error checking the latest version of pip. failed to solve: executor failed running [/bin/sh -c pip install -r requirements.txt]: exit code: 1

Django container cannot connect to MySql container.

Body:
dockerfile

FROM python:3.10

WORKDIR /django_app

ENV PYTHONUNBUFFERED 1

ADD . /django_app
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
COPY . /django_app

docker-compose.yml

version: '3.8'

services:
  db:
    image: mysql:latest
    hostname: mysql
    restart: always
    ports:
      - '3308:3306'
    environment:
       MYSQL_DATABASE: 'test'
       MYSQL_USER : 'mysqluser'
       MYSQL_PASSWORD: 'root123'
       MYSQL_ROOT_PASSWORD: 'root123'
    # volumes:
    #   - D:\django_project\db1:/var/run/mysqld
    #   - D:\django_project\db:/var/lib/mysql
  web:
    build: .
    restart: on-failure
    command: sh -c "python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
    ports:
      - "8000:8000"
    depends_on:
      - db

settings.py

DATABASES = {
    "default": {
        "ENGINE": 'django.db.backends.mysql',
        "NAME": 'test',
        "USER": 'mysqluser',
        "PASSWORD": 'root123',
        "HOST": 'db',
        "PORT": 3306,
    }
}

error 2

[Errno -3] Temporary failure in name resolution')) #0 81.18 #0 91.27 WARNING: There was an error checking the latest version of pip. failed to solve: executor failed running [/bin/sh -c pip install -r requirements.txt]: exit code: 1

Django container cannot connect to MySql container.


问:
AWS Cron Tabs: How to define env variables and use config when running node.js script
I am pretty new to AWS. I have a script in my project that should run each minute. In the same repository (project), we also have web server that is running on Elasticbeanstalk, no issues there.

The script connects to database and is using config.js file where variables are override by env variables. However, when the script is run it throws the error that it cannot connect to 127.0.0.1.5432, meaning it is trying to connect to localhost database. How can I defined env variables inside crontab. My .extensions/file.config looks like this:

```<code>files:
  "/etc/cron.d/name":
    mode: "000644"
    owner: root
    group: root
    content: |
      * * * * * root /usr/bin/node /var/app/current/lib/workers/script.js
commands:
  remove_old_cron:
    command: "rm -f /etc/cron.d/name.bak"
</code>```

Of course, I could do something like DATABASE_HOST=something /usr/bin/node ... but I don't want to commit my DB password to GitHub or expose it anywhere :)

Also, there shouldn't be issues with using npm libraries form here, right? Everything should be imported by Elasticbeanstalk?

Body:
I am pretty new to AWS. I have a script in my project that should run each minute. In the same repository (project), we also have web server that is running on Elasticbeanstalk, no issues there.

The script connects to database and is using config.js file where variables are override by env variables. However, when the script is run it throws the error that it cannot connect to 127.0.0.1.5432, meaning it is trying to connect to localhost database. How can I defined env variables inside crontab. My .extensions/file.config looks like this:

files:
  "/etc/cron.d/name":
    mode: "000644"
    owner: root
    group: root
    content: |
      * * * * * root /usr/bin/node /var/app/current/lib/workers/script.js
commands:
  remove_old_cron:
    command: "rm -f /etc/cron.d/name.bak"

Of course, I could do something like DATABASE_HOST=something /usr/bin/node ... but I don't want to commit my DB password to GitHub or expose it anywhere :)

Also, there shouldn't be issues with using npm libraries form here, right? Everything should be imported by Elasticbeanstalk?


问:
Trees written with uproot, cannot be read properly
I have created a script that reads from some root files, does some processing, and creates a slimmed version of these files, using uproot3 (3.14.4).
Then I use these files I created to create histograms needed for my analysis.
The problem that I noticed is that some of the produced files cannot be read properly.

An example of the traceback that I get is:

```<code>Traceback (most recent call last):
  File "Create_histos.py", line 1690, in <module>
    Frame = calculate_yields(process,name,region,Type,paths)
  File "Create_histos.py", line 1486, in calculate_yields
    FF=reading_BIG_and_CUTS(ff,region)
  File "Create_histos.py", line 42, in reading_BIG_and_CUTS
    foo=FF.pandas.df(entrystart=i_min,entrystop=i_max,flatten = False)
  File "/afs/cern.ch/user/a/atsiamis/test2/venv_3_8/lib64/python3.8/site-packages/uproot3/_connect/_pandas.py", line 32, in df
    return self._tree.arrays(branches=branches, outputtype=pandas.DataFrame, namedecode=namedecode, entrystart=entrystart, entrystop=entrystop, flatten=flatten, flatname=flatname, awkwardlib=awkwardlib, cache=cache, basketcache=basketcache, keycache=keycache, executor=executor, blocking=blocking)
  File "/afs/cern.ch/user/a/atsiamis/test2/venv_3_8/lib64/python3.8/site-packages/uproot3/tree.py", line 563, in arrays
    futures = [(branch.name if namedecode is None else branch.name.decode(namedecode), interpretation, branch.array(interpretation=interpretation, entrystart=entrystart, entrystop=entrystop, flatten=(flatten and not ispandas), awkwardlib=awkward0, cache=cache, basketcache=basketcache, keycache=keycache, executor=executor, blocking=False)) for branch, interpretation in branches]
  File "/afs/cern.ch/user/a/atsiamis/test2/venv_3_8/lib64/python3.8/site-packages/uproot3/tree.py", line 563, in <listcomp>
    futures = [(branch.name if namedecode is None else branch.name.decode(namedecode), interpretation, branch.array(interpretation=interpretation, entrystart=entrystart, entrystop=entrystop, flatten=(flatten and not ispandas), awkwardlib=awkward0, cache=cache, basketcache=basketcache, keycache=keycache, executor=executor, blocking=False)) for branch, interpretation in branches]
  File "/afs/cern.ch/user/a/atsiamis/test2/venv_3_8/lib64/python3.8/site-packages/uproot3/tree.py", line 1475, in array
    _delayedraise(fill(j))
  File "/afs/cern.ch/user/a/atsiamis/test2/venv_3_8/lib64/python3.8/site-packages/uproot3/tree.py", line 59, in _delayedraise
    raise err.with_traceback(trc)
  File "/afs/cern.ch/user/a/atsiamis/test2/venv_3_8/lib64/python3.8/site-packages/uproot3/tree.py", line 1443, in fill
    source = self._basket(i, interpretation, local_entrystart, local_entrystop, awkward0, basketcache, keycache)
  File "/afs/cern.ch/user/a/atsiamis/test2/venv_3_8/lib64/python3.8/site-packages/uproot3/tree.py", line 1247, in _basket
    byteoffsets = awkward0.numpy.empty((key._fObjlen - key.border - 4) // 4, dtype=awkward0.numpy.int32)  # native endian
ValueError: negative dimensions are not allowed
</code>```

From my understanding, it seems that some of the variables are not filled, and as a result when trying to access them with my script (i.e. create a pandas dataframe), it produces this error. This error also occurs with the array() method.
I crossed-check to make sure that there is not any problem with the original files, which seem to be fine.
The weirdest part is that this kind of error is not consistent , i.e. something that occurs in all produced files, but it happens "randomly" every now and then.
Also, just to let you know, I used to use this specific script for a subset of the files, which seem to work fine, but when moving to all of them, the problem started occuring, even in the files that seemingly were ok before.
Is there a known bug with the uproot.recreate module for uproot3 version?

Here is an example of the module that I use to create my root files :

```<code>with uproot.recreate(main_path+REGION+tag+'/'+'*'+DIR+'*'+'_'+FILE+'.root') as f:
    tree = uproot.newtree({br:'float64' for br in cols})
    f["tree"] = tree
    f['tree'].extend({br:Data[br] for br in cols})
</code>```

cols are the variables that I store to the root file, and Data is a pandas Dataframe.
After further checking, I see that the basket_compressedbytes(), basket_uncompressedbytes() equal to 0, which is not the case for the "not problematic variables", which indicates that something wrong is going on during the writing of the trees.
Is it possible that the issue occurs, because I do not set a specific compression scheme at the recreate method?

Body:
I have created a script that reads from some root files, does some processing, and creates a slimmed version of these files, using uproot3 (3.14.4).
Then I use these files I created to create histograms needed for my analysis.
The problem that I noticed is that some of the produced files cannot be read properly.

An example of the traceback that I get is:

Traceback (most recent call last):
  File "Create_histos.py", line 1690, in <module>
    Frame = calculate_yields(process,name,region,Type,paths)
  File "Create_histos.py", line 1486, in calculate_yields
    FF=reading_BIG_and_CUTS(ff,region)
  File "Create_histos.py", line 42, in reading_BIG_and_CUTS
    foo=FF.pandas.df(entrystart=i_min,entrystop=i_max,flatten = False)
  File "/afs/cern.ch/user/a/atsiamis/test2/venv_3_8/lib64/python3.8/site-packages/uproot3/_connect/_pandas.py", line 32, in df
    return self._tree.arrays(branches=branches, outputtype=pandas.DataFrame, namedecode=namedecode, entrystart=entrystart, entrystop=entrystop, flatten=flatten, flatname=flatname, awkwardlib=awkwardlib, cache=cache, basketcache=basketcache, keycache=keycache, executor=executor, blocking=blocking)
  File "/afs/cern.ch/user/a/atsiamis/test2/venv_3_8/lib64/python3.8/site-packages/uproot3/tree.py", line 563, in arrays
    futures = [(branch.name if namedecode is None else branch.name.decode(namedecode), interpretation, branch.array(interpretation=interpretation, entrystart=entrystart, entrystop=entrystop, flatten=(flatten and not ispandas), awkwardlib=awkward0, cache=cache, basketcache=basketcache, keycache=keycache, executor=executor, blocking=False)) for branch, interpretation in branches]
  File "/afs/cern.ch/user/a/atsiamis/test2/venv_3_8/lib64/python3.8/site-packages/uproot3/tree.py", line 563, in <listcomp>
    futures = [(branch.name if namedecode is None else branch.name.decode(namedecode), interpretation, branch.array(interpretation=interpretation, entrystart=entrystart, entrystop=entrystop, flatten=(flatten and not ispandas), awkwardlib=awkward0, cache=cache, basketcache=basketcache, keycache=keycache, executor=executor, blocking=False)) for branch, interpretation in branches]
  File "/afs/cern.ch/user/a/atsiamis/test2/venv_3_8/lib64/python3.8/site-packages/uproot3/tree.py", line 1475, in array
    _delayedraise(fill(j))
  File "/afs/cern.ch/user/a/atsiamis/test2/venv_3_8/lib64/python3.8/site-packages/uproot3/tree.py", line 59, in _delayedraise
    raise err.with_traceback(trc)
  File "/afs/cern.ch/user/a/atsiamis/test2/venv_3_8/lib64/python3.8/site-packages/uproot3/tree.py", line 1443, in fill
    source = self._basket(i, interpretation, local_entrystart, local_entrystop, awkward0, basketcache, keycache)
  File "/afs/cern.ch/user/a/atsiamis/test2/venv_3_8/lib64/python3.8/site-packages/uproot3/tree.py", line 1247, in _basket
    byteoffsets = awkward0.numpy.empty((key._fObjlen - key.border - 4) // 4, dtype=awkward0.numpy.int32)  # native endian
ValueError: negative dimensions are not allowed

From my understanding, it seems that some of the variables are not filled, and as a result when trying to access them with my script (i.e. create a pandas dataframe), it produces this error. This error also occurs with the array() method.
I crossed-check to make sure that there is not any problem with the original files, which seem to be fine.
The weirdest part is that this kind of error is not consistent , i.e. something that occurs in all produced files, but it happens "randomly" every now and then.
Also, just to let you know, I used to use this specific script for a subset of the files, which seem to work fine, but when moving to all of them, the problem started occuring, even in the files that seemingly were ok before.
Is there a known bug with the uproot.recreate module for uproot3 version?

Here is an example of the module that I use to create my root files :

with uproot.recreate(main_path+REGION+tag+'/'+'*'+DIR+'*'+'_'+FILE+'.root') as f:
    tree = uproot.newtree({br:'float64' for br in cols})
    f["tree"] = tree
    f['tree'].extend({br:Data[br] for br in cols})

cols are the variables that I store to the root file, and Data is a pandas Dataframe.
After further checking, I see that the basket_compressedbytes(), basket_uncompressedbytes() equal to 0, which is not the case for the "not problematic variables", which indicates that something wrong is going on during the writing of the trees.
Is it possible that the issue occurs, because I do not set a specific compression scheme at the recreate method?


问:
How to make html contact form connect with Google Spreadsheet Database table with Toast notification after submit contact form
I want to toast notification after submit and auto close with html contact form to Google Spreadsheet Database table. My website is HTML,CSS, Javascript based.

I found some code but this notification display normal message and delay showing after submit.

Here Is My Code Example:

HTML Form code:

Let's talk

                        <form class="row g-lg-3 gy-3" method="POST" id="sheetdb-form" action="https://script.google.com/macros/s/AKfycbxYGc4J6z1FLqiSco6P5HGrwMpCmxDBi47qZEUbPmeYYnKP-YdJ6w0RAIZ6ALHpuQcg6Q/exec">

                                <input class="form-control" name="Name" id="name" type="text" placeholder="Enter your name" required>

                                <input class="form-control" name="Email" id="email" type="email" placeholder="Enter your email" required>

                                <input rows="4" class="form-control" name="Message" id="msg" type="text" placeholder="Enter your message" required>

                                <button class="btn btn-brand" type="submit" onclick="myFunction()"n value="Reset form">Submit</button>

                        </form>

```
<p>Javascript Code:</p>
```var form = document.getElementById('sheetdb-form');
  form.addEventListener("submit", e => {
    e.preventDefault();
    fetch(form.action, {
        method : "POST",
        body: new FormData(document.getElementById("sheetdb-form")),
    }).then(
        response => response.json()
    ).then((html) => {
      Swal.fire('Any fool can use a computer')
    });
  });
```
<p>Google Spreadsheet Appscript Code:</p>
```const sheetName = 'Sheet1'
const scriptProp = PropertiesService.getScriptProperties()

function initialSetup () {
  const activeSpreadsheet = SpreadsheetApp.getActiveSpreadsheet()
  scriptProp.setProperty('key', activeSpreadsheet.getId())
}

function doPost (e) {
  const lock = LockService.getScriptLock()
  lock.tryLock(10000)

  try {
    const doc = SpreadsheetApp.openById(scriptProp.getProperty('key'))
    const sheet = doc.getSheetByName(sheetName)

    const headers = sheet.getRange(1, 1, 1, sheet.getLastColumn()).getValues()[0]
    const nextRow = sheet.getLastRow() + 1

    const newRow = headers.map(function(header) {
      return header === 'Date' ? new Date() : e.parameter[header]
    })

    sheet.getRange(nextRow, 1, 1, newRow.length).setValues([newRow])

    return ContentService
      .createTextOutput(JSON.stringify({ 'result': 'success', 'row': nextRow }))
      .setMimeType(ContentService.MimeType.JSON)
  }

  catch (e) {
    return ContentService
      .createTextOutput(JSON.stringify({ 'result': 'error', 'error': e }))
      .setMimeType(ContentService.MimeType.JSON)
  }

  finally {
    lock.releaseLock()
  }
}

function myFunction() {
  document.getElementById("myForm").reset();
}
```

Note:(I want to Toast Notification after submit contact form with HTML contact form to Google Spreadsheet Database Table.)

Body:
I want to toast notification after submit and auto close with html contact form to Google Spreadsheet Database table. My website is HTML,CSS, Javascript based.

I found some code but this notification display normal message and delay showing after submit.

Here Is My Code Example:

HTML Form code:

Let's talk

                        <form class="row g-lg-3 gy-3" method="POST" id="sheetdb-form" action="https://script.google.com/macros/s/AKfycbxYGc4J6z1FLqiSco6P5HGrwMpCmxDBi47qZEUbPmeYYnKP-YdJ6w0RAIZ6ALHpuQcg6Q/exec">

                                <input class="form-control" name="Name" id="name" type="text" placeholder="Enter your name" required>

                                <input class="form-control" name="Email" id="email" type="email" placeholder="Enter your email" required>

                                <input rows="4" class="form-control" name="Message" id="msg" type="text" placeholder="Enter your message" required>

                                <button class="btn btn-brand" type="submit" onclick="myFunction()"n value="Reset form">Submit</button>

                        </form>

Javascript Code:

var form = document.getElementById('sheetdb-form');
  form.addEventListener("submit", e => {
    e.preventDefault();
    fetch(form.action, {
        method : "POST",
        body: new FormData(document.getElementById("sheetdb-form")),
    }).then(
        response => response.json()
    ).then((html) => {
      Swal.fire('Any fool can use a computer')
    });
  });

Google Spreadsheet Appscript Code:

const sheetName = 'Sheet1'
const scriptProp = PropertiesService.getScriptProperties()

function initialSetup () {
  const activeSpreadsheet = SpreadsheetApp.getActiveSpreadsheet()
  scriptProp.setProperty('key', activeSpreadsheet.getId())
}

function doPost (e) {
  const lock = LockService.getScriptLock()
  lock.tryLock(10000)

  try {
    const doc = SpreadsheetApp.openById(scriptProp.getProperty('key'))
    const sheet = doc.getSheetByName(sheetName)

    const headers = sheet.getRange(1, 1, 1, sheet.getLastColumn()).getValues()[0]
    const nextRow = sheet.getLastRow() + 1

    const newRow = headers.map(function(header) {
      return header === 'Date' ? new Date() : e.parameter[header]
    })

    sheet.getRange(nextRow, 1, 1, newRow.length).setValues([newRow])

    return ContentService
      .createTextOutput(JSON.stringify({ 'result': 'success', 'row': nextRow }))
      .setMimeType(ContentService.MimeType.JSON)
  }

  catch (e) {
    return ContentService
      .createTextOutput(JSON.stringify({ 'result': 'error', 'error': e }))
      .setMimeType(ContentService.MimeType.JSON)
  }

  finally {
    lock.releaseLock()
  }
}

function myFunction() {
  document.getElementById("myForm").reset();
}

Note:(I want to Toast Notification after submit contact form with HTML contact form to Google Spreadsheet Database Table.)


问:
How to add @google-cloud/logging for React native
I want to implement @google-cloud/logging for React native. I tried it in firebase functions side and Node.js.

I tried above one and followed this link Google cloud log demo its working in node.js and running it google cloud gets all logs but when I install this google cloud logg package into react native its not working or I don't know where to implemente it

I found same tag in this link Same issues in this link

Same below methods are followed in this link Same issues in this link

My app.js:

```<code>// Imports the Google Cloud client library
const {Logging} = require('@google-cloud/logging');
const projectId = 'vendoradminapp';
const logName = 'my-log';
// Creates a client
const logging = new Logging({projectId});
// Selects the log to write to
const log = logging.log(logName);
// The data to write to the log
const text_entry = log.entry('Google Cloud log Entry.....!!! 2');
const message = {
  errorType: 'INFO',
  errorMessage: 'Your setup is not completed fully 2',
};
// The metadata associated with the entry
const metadata = {
  resource: {type: 'global'},
  // See: https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#logseverity
  severity: 'INFO',
};
const json_entry = log.entry(metadata, message);
async function writeLogs() {
  // Asynchronously write the log entry
  await log.write(text_entry);

  // Or let the logging library dispatch the logs
  log.write(json_entry);
}
writeLogs();
</code>```

my loggin-key.json:

```<code>{
  "type": "service_account",
  "project_id": "vendoradminapp",
  "private_key_id": "58175#########f00",
  "private_key": "#####-----BEGIN PRIVATE KEY-----########",
  "client_email": "logging-
   quickstart@vendoradminapp.iam.gserviceaccount.com",
  "client_id": "#########",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/token",
  "auth_provider_x509_cert_url":
  "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/logging-quickstart%40vendoradminapp.iam.gserviceaccount.com"
}
</code>```

I am getting this error Error: Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information

Body:
I want to implement @google-cloud/logging for React native. I tried it in firebase functions side and Node.js.

I tried above one and followed this link Google cloud log demo its working in node.js and running it google cloud gets all logs but when I install this google cloud logg package into react native its not working or I don't know where to implemente it

I found same tag in this link Same issues in this link

Same below methods are followed in this link Same issues in this link

My app.js:

// Imports the Google Cloud client library
const {Logging} = require('@google-cloud/logging');
const projectId = 'vendoradminapp';
const logName = 'my-log';
// Creates a client
const logging = new Logging({projectId});
// Selects the log to write to
const log = logging.log(logName);
// The data to write to the log
const text_entry = log.entry('Google Cloud log Entry.....!!! 2');
const message = {
  errorType: 'INFO',
  errorMessage: 'Your setup is not completed fully 2',
};
// The metadata associated with the entry
const metadata = {
  resource: {type: 'global'},
  // See: https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#logseverity
  severity: 'INFO',
};
const json_entry = log.entry(metadata, message);
async function writeLogs() {
  // Asynchronously write the log entry
  await log.write(text_entry);

  // Or let the logging library dispatch the logs
  log.write(json_entry);
}
writeLogs();

my loggin-key.json:

{
  "type": "service_account",
  "project_id": "vendoradminapp",
  "private_key_id": "58175#########f00",
  "private_key": "#####-----BEGIN PRIVATE KEY-----########",
  "client_email": "logging-
   quickstart@vendoradminapp.iam.gserviceaccount.com",
  "client_id": "#########",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/token",
  "auth_provider_x509_cert_url":
  "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/logging-quickstart%40vendoradminapp.iam.gserviceaccount.com"
}

I am getting this error Error: Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information


问:
Exporting data to csv from database fails for column with datatype 'timestamp without timezone'
Trying to export data to csv.
Query used to export-

```<code>copy (SELECT * FROM public.carrier_booking)
to 'C:\Users\Public\A.csv'
with csv HEADER
</code>```

The carrier_booking table has following rows

```<code>
id bigint,
public_id character varying(50),
"number" character varying(50),
status character varying(50),
created_by character varying(50) ,
created_at_utc timestamp without time zone ,
updated_by character varying(50) ,
updated_at_utc timestamp without time zone,
transport_mode character varying(100),
CONSTRAINT pk_carrier_booking PRIMARY KEY (id)
</code>```

The data in csv file is as follows-

id,public_id,number,status,payload,created_by,created_at_utc,updated_by,updated_at_utc,transport_mode 24,CBK593190,CB593190,CARRIER_ACCEPTED,"{""CreatedBy"": """", ""Containers"": [{""IsoCombinedCode"": """"}]}",SYSEM,2022-12-21 06:07:51.57578,SYSEM,2022-12-21 06:07:51.57578,""

The created_at_utc  and updated_at_utc  columns have data 2022-12-21 06:07:51.57578. However the exported CSV file just contains 06:07:52

This creates problem when I try to import this csv file.

How can do I handle 'timestamp without time zone' datatype while exporting to csv so that the data doesn't change?

Tried importing the csv file excluding the created_at_utc
and updated_at_utc columns-

```<code>COPY public.carrier_booking(created_at_utc
,updated_at_utc)
FROM 'C:\Users\Public\A.csv'
DELIMITER ','
csv HEADER
</code>```

But this doesn't work since this columns are marked not null.

Body:
Trying to export data to csv.
Query used to export-

copy (SELECT * FROM public.carrier_booking)
to 'C:\Users\Public\A.csv'
with csv HEADER

The carrier_booking table has following rows

id bigint,
public_id character varying(50),
"number" character varying(50),
status character varying(50),
created_by character varying(50) ,
created_at_utc timestamp without time zone ,
updated_by character varying(50) ,
updated_at_utc timestamp without time zone,
transport_mode character varying(100),
CONSTRAINT pk_carrier_booking PRIMARY KEY (id)

The data in csv file is as follows-

id,public_id,number,status,payload,created_by,created_at_utc,updated_by,updated_at_utc,transport_mode 24,CBK593190,CB593190,CARRIER_ACCEPTED,"{""CreatedBy"": """", ""Containers"": [{""IsoCombinedCode"": """"}]}",SYSEM,2022-12-21 06:07:51.57578,SYSEM,2022-12-21 06:07:51.57578,""

The created_at_utc  and updated_at_utc  columns have data 2022-12-21 06:07:51.57578. However the exported CSV file just contains 06:07:52

This creates problem when I try to import this csv file.

How can do I handle 'timestamp without time zone' datatype while exporting to csv so that the data doesn't change?

Tried importing the csv file excluding the created_at_utc
and updated_at_utc columns-

COPY public.carrier_booking(created_at_utc
,updated_at_utc)
FROM 'C:\Users\Public\A.csv'
DELIMITER ','
csv HEADER

But this doesn't work since this columns are marked not null.


问:
Influxdb 2.5.1 stops accepting API requests
It happens to me that Influxdb 2.5.1 stops responding to API requests after some time, I don't even see in the log that the API request came. However, other logs do show up, so the database is not stuck completely. When I restart Influxdb, everything is fine now. What could it be, or how to analyze the problem better? I have log level debug set up, but I haven't found out more information. I'm using the default configuration from the official Docker image.

```<code># influx server-config
{
    "assets-path": "",
    "bolt-path": "/var/lib/influxdb2/influxd.bolt",
    "e2e-testing": false,
    "engine-path": "/var/lib/influxdb2/engine",
    "feature-flags": null,
    "flux-log-enabled": false,
    "hardening-enabled": false,
    "http-bind-address": ":8086",
    "http-idle-timeout": 180000000000,
    "http-read-header-timeout": 10000000000,
    "http-read-timeout": 0,
    "http-write-timeout": 0,
    "influxql-max-select-buckets": 0,
    "influxql-max-select-point": 0,
    "influxql-max-select-series": 0,
    "instance-id": "",
    "log-level": "debug",
    "metrics-disabled": false,
    "nats-max-payload-bytes": 0,
    "nats-port": 4222,
    "no-tasks": false,
    "pprof-disabled": false,
    "query-concurrency": 1024,
    "query-initial-memory-bytes": 0,
    "query-max-memory-bytes": 0,
    "query-memory-bytes": 0,
    "query-queue-size": 1024,
    "reporting-disabled": false,
    "secret-store": "bolt",
    "session-length": 60,
    "session-renew-disabled": false,
    "sqlite-path": "/var/lib/influxdb2/influxd.sqlite",
    "storage-cache-max-memory-size": 1073741824,
    "storage-cache-snapshot-memory-size": 26214400,
    "storage-cache-snapshot-write-cold-duration": "10m0s",
    "storage-compact-full-write-cold-duration": "4h0m0s",
    "storage-compact-throughput-burst": 50331648,
    "storage-max-concurrent-compactions": 0,
    "storage-max-index-log-file-size": 1048576,
    "storage-no-validate-field-size": false,
    "storage-retention-check-interval": "30m0s",
    "storage-series-file-max-concurrent-snapshot-compactions": 0,
    "storage-series-id-set-cache-size": 0,
    "storage-shard-precreator-advance-period": "30m0s",
    "storage-shard-precreator-check-interval": "10m0s",
    "storage-tsm-use-madv-willneed": false,
    "storage-validate-keys": false,
    "storage-wal-fsync-delay": "0s",
    "storage-wal-max-concurrent-writes": 0,
    "storage-wal-max-write-delay": 600000000000,
    "storage-write-timeout": 10000000000,
    "store": "disk",
    "testing-always-allow-setup": false,
    "tls-cert": "",
    "tls-key": "",
    "tls-min-version": "1.2",
    "tls-strict-ciphers": false,
    "tracing-type": "",
    "ui-disabled": false,
    "vault-addr": "",
    "vault-cacert": "",
    "vault-capath": "",
    "vault-client-cert": "",
    "vault-client-key": "",
    "vault-client-timeout": 0,
    "vault-max-retries": 0,
    "vault-skip-verify": false,
    "vault-tls-server-name": "",
    "vault-token": ""
}
</code>```

Another interesting thing: when I want to render a graph in the Influxdb UI, I can see the API request in the log. But when I send an API request via curl, it doesn't show up in the log anymore (the same API request worked normally before, there is no typo).

Body:
It happens to me that Influxdb 2.5.1 stops responding to API requests after some time, I don't even see in the log that the API request came. However, other logs do show up, so the database is not stuck completely. When I restart Influxdb, everything is fine now. What could it be, or how to analyze the problem better? I have log level debug set up, but I haven't found out more information. I'm using the default configuration from the official Docker image.

# influx server-config
{
    "assets-path": "",
    "bolt-path": "/var/lib/influxdb2/influxd.bolt",
    "e2e-testing": false,
    "engine-path": "/var/lib/influxdb2/engine",
    "feature-flags": null,
    "flux-log-enabled": false,
    "hardening-enabled": false,
    "http-bind-address": ":8086",
    "http-idle-timeout": 180000000000,
    "http-read-header-timeout": 10000000000,
    "http-read-timeout": 0,
    "http-write-timeout": 0,
    "influxql-max-select-buckets": 0,
    "influxql-max-select-point": 0,
    "influxql-max-select-series": 0,
    "instance-id": "",
    "log-level": "debug",
    "metrics-disabled": false,
    "nats-max-payload-bytes": 0,
    "nats-port": 4222,
    "no-tasks": false,
    "pprof-disabled": false,
    "query-concurrency": 1024,
    "query-initial-memory-bytes": 0,
    "query-max-memory-bytes": 0,
    "query-memory-bytes": 0,
    "query-queue-size": 1024,
    "reporting-disabled": false,
    "secret-store": "bolt",
    "session-length": 60,
    "session-renew-disabled": false,
    "sqlite-path": "/var/lib/influxdb2/influxd.sqlite",
    "storage-cache-max-memory-size": 1073741824,
    "storage-cache-snapshot-memory-size": 26214400,
    "storage-cache-snapshot-write-cold-duration": "10m0s",
    "storage-compact-full-write-cold-duration": "4h0m0s",
    "storage-compact-throughput-burst": 50331648,
    "storage-max-concurrent-compactions": 0,
    "storage-max-index-log-file-size": 1048576,
    "storage-no-validate-field-size": false,
    "storage-retention-check-interval": "30m0s",
    "storage-series-file-max-concurrent-snapshot-compactions": 0,
    "storage-series-id-set-cache-size": 0,
    "storage-shard-precreator-advance-period": "30m0s",
    "storage-shard-precreator-check-interval": "10m0s",
    "storage-tsm-use-madv-willneed": false,
    "storage-validate-keys": false,
    "storage-wal-fsync-delay": "0s",
    "storage-wal-max-concurrent-writes": 0,
    "storage-wal-max-write-delay": 600000000000,
    "storage-write-timeout": 10000000000,
    "store": "disk",
    "testing-always-allow-setup": false,
    "tls-cert": "",
    "tls-key": "",
    "tls-min-version": "1.2",
    "tls-strict-ciphers": false,
    "tracing-type": "",
    "ui-disabled": false,
    "vault-addr": "",
    "vault-cacert": "",
    "vault-capath": "",
    "vault-client-cert": "",
    "vault-client-key": "",
    "vault-client-timeout": 0,
    "vault-max-retries": 0,
    "vault-skip-verify": false,
    "vault-tls-server-name": "",
    "vault-token": ""
}

Another interesting thing: when I want to render a graph in the Influxdb UI, I can see the API request in the log. But when I send an API request via curl, it doesn't show up in the log anymore (the same API request worked normally before, there is no typo).


问:
Encounter error in installing react router
I want to install react-router in my project with command npm install react-router-dom but this is not working and there is an error.

```<code>up to date, audited 1469 packages in 5s

226 packages are looking for funding
  run `npm fund` for details

6 high severity vulnerabilities
</code>```

I can't understand this please help me in understanding this I am providing my App.js code here where I am using routing.

```<code>import React, { useEffect, useState } from 'react';
import about from './MyComponents/about.js';
import Header from './MyComponents/Header.js';
import Todos from './MyComponents/Todos';
import Footer from './MyComponents/Footer';
import { AddTodo } from './MyComponents/AddTodo';
import './App.css';
import {
  BrowserRouter as Router,
  Switch,
  Route,
  Link
} from "react-router-dom";

function App() {
  let initTodo;
  if (localStorage.getItem("todos") === null) {
    initTodo = [];
  } else {
    initTodo = JSON.parse(localStorage.getItem("todos")) // takes a JSON string and then transforms it into a JavaScript object
  }
  const mytitle = "My-Todos-List" // This should be a const is non-editable
  const [todos, setTodo] = useState(initTodo); // here I use lazy initialization. I leave you a link below to read about it

  useEffect(() => {
    localStorage.setItem("todos", JSON.stringify(todos));
  }, [todos])

  // and then you can write your handlers that use `useState` todos and setTodo without warnings
  const onDelete = (todo) => {
    setTodo(todos.filter((e) => {
      return e !== todo;
    }))
    localStorage.setItem("todos", JSON.stringify(todos)); // takes a JavaScript object and then transforms it into a JSON string.
  }

  const addTodo = (title, desc) => {
    let sno;
    if(todos.length == 0) {
      sno = 1;
    } else {
      sno = todos[todos.length - 1].sno + 1
    }
    const mytodo = {
      sno: sno,
      title: title,
      description: desc
    }
    setTodo([...todos, mytodo]);
  }

  return (
    <>
      <Router>
        <Header title1={mytitle} searchBar={true}/>
        <Switch>
          <Route
            exact
            path="/"
            render={() => {
              return (
                <>
                  <AddTodo addtodo={addTodo} />
                  <Todos todos={todos} onDelete={onDelete} />
                </>
              )
            }}
          >
          </Route>
          <Route exact path="/about">
            <About />
          </Route>
        </Switch>
        <Footer />
      </Router>
    </>
  );
  // I want to render my header and footer all the time but not addtodo and todos because I want to render them when slash / is my end point
}

export default App;
</code>```

I have searched and I found different commands I am giving link of that question and its answer where I found commands please have a look
Failed to compile. Module not found: Can't resolve 'react-router-dom'.

Please suggest me which command should I run because this command also disturbs my server. Now the server also doesn't run and has an error like:

```<code>node:internal/modules/cjs/loader:998
  throw err;
  ^

Error: Cannot find module '@babel/plugin-syntax-class-properties'
Require stack:
- D:\React projects\todos-list\node_modules\@babel\preset-env\lib\available-plugins.js
- D:\React projects\todos-list\node_modules\@babel\preset-env\lib\filter-items.js
- D:\React projects\todos-list\node_modules\@babel\preset-env\lib\index.js
- D:\React projects\todos-list\node_modules\workbox-build\build\lib\bundle.js
- D:\React projects\todos-list\node_modules\workbox-webpack-plugin\build\generate-sw.js
- D:\React projects\todos-list\node_modules\workbox-webpack-plugin\build\index.js
- D:\React projects\todos-list\node_modules\react-scripts\config\webpack.config.js
- D:\React projects\todos-list\node_modules\react-scripts\scripts\start.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (D:\React projects\todos-list\node_modules\@babel\preset-env\lib\available-plugins.js:8:36)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1061:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'D:\\React projects\\todos-list\\node_modules\\@babel\\preset-env\\lib\\available-plugins.js',
    'D:\\React projects\\todos-list\\node_modules\\@babel\\preset-env\\lib\\filter-items.js',
    'D:\\React projects\\todos-list\\node_modules\\@babel\\preset-env\\lib\\index.js',
    'D:\\React projects\\todos-list\\node_modules\\workbox-build\\build\\lib\\bundle.js',
    'D:\\React projects\\todos-list\\node_modules\\workbox-webpack-plugin\\build\\generate-sw.js',
    'D:\\React projects\\todos-list\\node_modules\\workbox-webpack-plugin\\build\\index.js',
    'D:\\React projects\\todos-list\\node_modules\\react-scripts\\config\\webpack.config.js',
    'D:\\React projects\\todos-list\\node_modules\\react-scripts\\scripts\\start.js'
  ]
}
</code>```

Body:
I want to install react-router in my project with command npm install react-router-dom but this is not working and there is an error.

up to date, audited 1469 packages in 5s

226 packages are looking for funding
  run `npm fund` for details

6 high severity vulnerabilities

I can't understand this please help me in understanding this I am providing my App.js code here where I am using routing.

import React, { useEffect, useState } from 'react';
import about from './MyComponents/about.js';
import Header from './MyComponents/Header.js';
import Todos from './MyComponents/Todos';
import Footer from './MyComponents/Footer';
import { AddTodo } from './MyComponents/AddTodo';
import './App.css';
import {
  BrowserRouter as Router,
  Switch,
  Route,
  Link
} from "react-router-dom";

function App() {
  let initTodo;
  if (localStorage.getItem("todos") === null) {
    initTodo = [];
  } else {
    initTodo = JSON.parse(localStorage.getItem("todos")) // takes a JSON string and then transforms it into a JavaScript object
  }
  const mytitle = "My-Todos-List" // This should be a const is non-editable
  const [todos, setTodo] = useState(initTodo); // here I use lazy initialization. I leave you a link below to read about it

  useEffect(() => {
    localStorage.setItem("todos", JSON.stringify(todos));
  }, [todos])

  // and then you can write your handlers that use `useState` todos and setTodo without warnings
  const onDelete = (todo) => {
    setTodo(todos.filter((e) => {
      return e !== todo;
    }))
    localStorage.setItem("todos", JSON.stringify(todos)); // takes a JavaScript object and then transforms it into a JSON string.
  }

  const addTodo = (title, desc) => {
    let sno;
    if(todos.length == 0) {
      sno = 1;
    } else {
      sno = todos[todos.length - 1].sno + 1
    }
    const mytodo = {
      sno: sno,
      title: title,
      description: desc
    }
    setTodo([...todos, mytodo]);
  }

  return (
    <>
      <Router>

        <Switch>
          <Route
            exact
            path="/"
            render={() => {
              return (
                <>
                  <AddTodo addtodo={addTodo} />
                  <Todos todos={todos} onDelete={onDelete} />
                </>
              )
            }}
          >
          </Route>
          <Route exact path="/about">
            <About />
          </Route>
        </Switch>

      </Router>
    </>
  );
  // I want to render my header and footer all the time but not addtodo and todos because I want to render them when slash / is my end point
}

export default App;

I have searched and I found different commands I am giving link of that question and its answer where I found commands please have a look
Failed to compile. Module not found: Can't resolve 'react-router-dom'.

Please suggest me which command should I run because this command also disturbs my server. Now the server also doesn't run and has an error like:

node:internal/modules/cjs/loader:998
  throw err;
  ^

Error: Cannot find module '@babel/plugin-syntax-class-properties'
Require stack:
- D:\React projects\todos-list\node_modules\@babel\preset-env\lib\available-plugins.js
- D:\React projects\todos-list\node_modules\@babel\preset-env\lib\filter-items.js
- D:\React projects\todos-list\node_modules\@babel\preset-env\lib\index.js
- D:\React projects\todos-list\node_modules\workbox-build\build\lib\bundle.js
- D:\React projects\todos-list\node_modules\workbox-webpack-plugin\build\generate-sw.js
- D:\React projects\todos-list\node_modules\workbox-webpack-plugin\build\index.js
- D:\React projects\todos-list\node_modules\react-scripts\config\webpack.config.js
- D:\React projects\todos-list\node_modules\react-scripts\scripts\start.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (D:\React projects\todos-list\node_modules\@babel\preset-env\lib\available-plugins.js:8:36)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1061:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'D:\\React projects\\todos-list\\node_modules\\@babel\\preset-env\\lib\\available-plugins.js',
    'D:\\React projects\\todos-list\\node_modules\\@babel\\preset-env\\lib\\filter-items.js',
    'D:\\React projects\\todos-list\\node_modules\\@babel\\preset-env\\lib\\index.js',
    'D:\\React projects\\todos-list\\node_modules\\workbox-build\\build\\lib\\bundle.js',
    'D:\\React projects\\todos-list\\node_modules\\workbox-webpack-plugin\\build\\generate-sw.js',
    'D:\\React projects\\todos-list\\node_modules\\workbox-webpack-plugin\\build\\index.js',
    'D:\\React projects\\todos-list\\node_modules\\react-scripts\\config\\webpack.config.js',
    'D:\\React projects\\todos-list\\node_modules\\react-scripts\\scripts\\start.js'
  ]
}


问:
What is the potential poblems to use RabbitMQ(or something similar) in Google Cloud run multiple container services and Apis?
I have deployed all of my services and Apis to cloud recently. These services happened to bank on messaging traffic on RabbitMQ. After a while RabbitMQ started to act up. I suspected cloud run runs multiple containers for a single service and it is not compatible with singleton RabbitMQ instance.  Could that be the problem? How can I fix this issue? Is there a way to orchestrate these containers to make it run similarly as it was running on IIS server?

I have read the documentations on this issue. Because I am a newbie in cloud systems and services, it seems like I was looking a haystack in the needle. I have recently heard a thing called Kubernetes but I am not sure if that is what I needed.

In a nutshell, I have deployed my services that used to run on IIS server perfectly to google cloud run. However these containers probably racing each other for the same resources, RabbitMQ and DB too. Does anybody have any idea on such issues?


问:
C# .NET 7 - How to connect to WCF service using HTTPS and cookie authentication
I am struggling with this for weeks now, tried everything I could find on internet, but nothing works.
Biggest problems is - it works seamlessly in .NET 4.8 with default WCF scaffold, however .NET Core has WCF reworked and this one I can not figure out.

So, the authentication process has three parts.

Get XSFR token from web page, this is simple HttpClient.GetAsync towards web page which returns XSFR cookie in response.

Get SessionID by calling REST auth method, also simple and works with HttpClient.PostAsync.

Call HTTPS WCF service by sending XSFR token and SessionID as cookies. No go.

I used Visual Studio 2022 (17.4.3) to scaffold wsdl file.

I tried different bindings and I learned that Security.Mode has to be System.ServiceModel.SecurityMode.Transport otherwise I get error that "http" is expected but "https" found in URL and does not work.

However, when I do set security mode to Transport, I get error:
'The HTTP request was forbidden with client authentication scheme 'Anonymous'.'

Anonymous changes depending on Security.Transport.ClientCredentialType.

As for sending cookies, I tried two different methods:

OperationContextScope:

        using (new OperationContextScope(port.InnerChannel)) {
            var endPoint = new EndpointAddress(Config.URL_APP_ORIGIN);
            var httpRequest = new HttpRequestMessageProperty();
            httpRequest.Headers.Add(HEADER_X_XSRF_TOKEN, xsrfToken?.Value);
            httpRequest.Headers.Add(HttpRequestHeader.Cookie, sessionId?.ToString());
            httpRequest.Headers.Add(HttpRequestHeader.Cookie, xsrfToken?.ToString());
            OperationContext.Current.OutgoingMessageProperties.Add(HttpRequestMessageProperty.Name, httpRequest);

            await IspisVerzije(port);
            // await IspisAllowedValues(port);
            port.Close();
        }
```
<ol start="2">
<li><code>HttpHeaderMessageInspector</code></li>
</ol>
<pre class="lang-cs prettyprint-override"><code>// Implementation of partial method in scaffolded web service reference
    static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials) {
        var headers = new Dictionary<string, string> {
            ["HEADER_X_XSRF_TOKEN"] = Program.xsrfToken?.ToString(),
            ["Cookie"] = "Basic " + Program.sessionId?.ToString(),
            ["Cookie"] = "Basic " + Program.xsrfToken?.ToString()
        };

        var behaviour = new AddHttpHeaderMessageEndpointBehavior(headers);
        serviceEndpoint.EndpointBehaviors.Add(behaviour);
    }
}

public class HttpHeaderMessageInspector : IClientMessageInspector {
    private Dictionary<string, string> Headers;

    public HttpHeaderMessageInspector(Dictionary<string, string> headers) {
        Headers = headers;
    }

    public void AfterReceiveReply(ref Message reply, object correlationState) { }

    public object BeforeSendRequest(ref Message request, IClientChannel channel) {
        // ensure the request header collection exists
        if (request.Properties.Count == 0 || !request.Properties.ContainsKey(HttpRequestMessageProperty.Name)) {
            request.Properties.Add(HttpRequestMessageProperty.Name, new HttpRequestMessageProperty());
        }

        // get the request header collection from the request
        var HeadersCollection = ((HttpRequestMessageProperty)request.Properties[HttpRequestMessageProperty.Name]).Headers;

        // add our headers
        foreach (var header in Headers) HeadersCollection[header.Key] = header.Value;

        return null;
    }
}

public class AddHttpHeaderMessageEndpointBehavior : IEndpointBehavior {
    private IClientMessageInspector HttpHeaderMessageInspector;

    public AddHttpHeaderMessageEndpointBehavior(Dictionary<string, string> headers) {
        HttpHeaderMessageInspector = new HttpHeaderMessageInspector(headers);
    }

    public void AddBindingParameters(ServiceEndpoint endpoint, BindingParameterCollection bindingParameters) { }

    public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime) {
        clientRuntime.ClientMessageInspectors.Add(HttpHeaderMessageInspector);
    }

    public void ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher) { }

    public void Validate(ServiceEndpoint endpoint) { }
}
</code>```

I used Fiddler to inspect outgoing requests and cookies are present in request.

This is raw request sent by working .NET Framework 4.8 version:

```<code>POST https://zupit-test.gov.hr/services/integration/v2 HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 4.0.30319.42000)
X-XSRF-TOKEN: 7280e4c2-6dd1-4ed4-9a35-91c22c172dfd
VsDebuggerCausalityData: uIDPo0dR90lQHnFDopiVLjbd/0IAAAAAxYMKfS4zuEWC0d5bf6byLKVx4ImkhWZLr+qCOPCMN3gACQAA
Content-Type: application/soap+xml; charset=utf-8; action=""
Host: zupit-test.gov.hr
Cookie: XSRF-TOKEN=7280e4c2-6dd1-4ed4-9a35-91c22c172dfd; JSESSIONID=B232706D460BE6C5FC5981826B36E9EB; TS01a2529c=01402d66b9a555cd86492a154020763ed07f0c7bbe2dbd6487ca2abfa0cfa1b3c533cde8a1335c973f7c6d5c24cdee6f743a38b5b5c0b26948152fee150d6abba41ea0e8cd
Content-Length: 301
Expect: 100-continue

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><getVersion xmlns="http://zupit.gov.hr/integration/v2" /></soap:Body></soap:Envelope>
</code>```

And this is raw request sent by .NET 7 version:

```<code>POST https://zupit-test.gov.hr/services/integration/v2 HTTP/1.1
Host: zupit-test.gov.hr
Cache-Control: no-cache, max-age=0
X-XSRF-TOKEN: e62fe08b-e7ea-4fd7-88d7-28f58aa45018
Cookie: JSESSIONID=77C6A62B4A0B62DDDFAD8C534EA9D2A9,XSRF-TOKEN=e62fe08b-e7ea-4fd7-88d7-28f58aa45018
Accept-Encoding: gzip, deflate
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 573

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header><a:Action s:mustUnderstand="1">http://zupit.gov.hr/integration/v2/IntegrationWSv2/getVersionRequest</a:Action><a:MessageID>urn:uuid:3aef24b7-6c08-4a85-bff4-fd0dbcf7ce1d</a:MessageID><a:ReplyTo><a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address></a:ReplyTo><a:To s:mustUnderstand="1">https://zupit-test.gov.hr/services/integration/v2</a:To></s:Header><s:Body><getVersion xmlns="http://zupit.gov.hr/integration/v2"/></s:Body></s:Envelope>

</code>```

And this is server response for .NET 7 request:

```<code>HTTP/1.1 403
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Set-Cookie: XSRF-TOKEN=915dea61-d5a4-4c63-ad85-51f92df31f67; Path=/
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Type: application/json;charset=UTF-8
Date: Thu, 22 Dec 2022 07:42:34 GMT
Strict-Transport-Security: max-age=16070400; includeSubDomains
Set-Cookie: TS01a2529c=01402d66b972abf2e18b994c3e4a4342cb1a60809c602d5bd0ebfb7953d22b3d635225a9b013d6108d2efd22d658d57c1de898f2709b920c1a01fefeda45b6c6746a57884d; Path=/
Transfer-Encoding: chunked

8e
{"timestamp":"2022-12-22T07:42:35.272Z","error":"Forbidden","message":"Forbidden","path":"/services/integration/v2","showServerMessage":false}
0

</code>```

Is this HTTPS issue or difference of generated SOAP XML in .NET 7?
Any ideas how to solve this?

Thanks,
Mario

Body:
I am struggling with this for weeks now, tried everything I could find on internet, but nothing works.
Biggest problems is - it works seamlessly in .NET 4.8 with default WCF scaffold, however .NET Core has WCF reworked and this one I can not figure out.

So, the authentication process has three parts.

Get XSFR token from web page, this is simple HttpClient.GetAsync towards web page which returns XSFR cookie in response.

Get SessionID by calling REST auth method, also simple and works with HttpClient.PostAsync.

Call HTTPS WCF service by sending XSFR token and SessionID as cookies. No go.

I used Visual Studio 2022 (17.4.3) to scaffold wsdl file.

I tried different bindings and I learned that Security.Mode has to be System.ServiceModel.SecurityMode.Transport otherwise I get error that "http" is expected but "https" found in URL and does not work.

However, when I do set security mode to Transport, I get error:
'The HTTP request was forbidden with client authentication scheme 'Anonymous'.'

Anonymous changes depending on Security.Transport.ClientCredentialType.

As for sending cookies, I tried two different methods:

OperationContextScope:

        using (new OperationContextScope(port.InnerChannel)) {
            var endPoint = new EndpointAddress(Config.URL_APP_ORIGIN);
            var httpRequest = new HttpRequestMessageProperty();
            httpRequest.Headers.Add(HEADER_X_XSRF_TOKEN, xsrfToken?.Value);
            httpRequest.Headers.Add(HttpRequestHeader.Cookie, sessionId?.ToString());
            httpRequest.Headers.Add(HttpRequestHeader.Cookie, xsrfToken?.ToString());
            OperationContext.Current.OutgoingMessageProperties.Add(HttpRequestMessageProperty.Name, httpRequest);

            await IspisVerzije(port);
            // await IspisAllowedValues(port);
            port.Close();
        }

HttpHeaderMessageInspector

// Implementation of partial method in scaffolded web service reference
    static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials) {
        var headers = new Dictionary<string, string> {
            ["HEADER_X_XSRF_TOKEN"] = Program.xsrfToken?.ToString(),
            ["Cookie"] = "Basic " + Program.sessionId?.ToString(),
            ["Cookie"] = "Basic " + Program.xsrfToken?.ToString()
        };

        var behaviour = new AddHttpHeaderMessageEndpointBehavior(headers);
        serviceEndpoint.EndpointBehaviors.Add(behaviour);
    }
}

public class HttpHeaderMessageInspector : IClientMessageInspector {
    private Dictionary<string, string> Headers;

    public HttpHeaderMessageInspector(Dictionary<string, string> headers) {
        Headers = headers;
    }

    public void AfterReceiveReply(ref Message reply, object correlationState) { }

    public object BeforeSendRequest(ref Message request, IClientChannel channel) {
        // ensure the request header collection exists
        if (request.Properties.Count == 0 || !request.Properties.ContainsKey(HttpRequestMessageProperty.Name)) {
            request.Properties.Add(HttpRequestMessageProperty.Name, new HttpRequestMessageProperty());
        }

        // get the request header collection from the request
        var HeadersCollection = ((HttpRequestMessageProperty)request.Properties[HttpRequestMessageProperty.Name]).Headers;

        // add our headers
        foreach (var header in Headers) HeadersCollection[header.Key] = header.Value;

        return null;
    }
}

public class AddHttpHeaderMessageEndpointBehavior : IEndpointBehavior {
    private IClientMessageInspector HttpHeaderMessageInspector;

    public AddHttpHeaderMessageEndpointBehavior(Dictionary<string, string> headers) {
        HttpHeaderMessageInspector = new HttpHeaderMessageInspector(headers);
    }

    public void AddBindingParameters(ServiceEndpoint endpoint, BindingParameterCollection bindingParameters) { }

    public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime) {
        clientRuntime.ClientMessageInspectors.Add(HttpHeaderMessageInspector);
    }

    public void ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher) { }

    public void Validate(ServiceEndpoint endpoint) { }
}

I used Fiddler to inspect outgoing requests and cookies are present in request.

This is raw request sent by working .NET Framework 4.8 version:

POST https://zupit-test.gov.hr/services/integration/v2 HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 4.0.30319.42000)
X-XSRF-TOKEN: 7280e4c2-6dd1-4ed4-9a35-91c22c172dfd
VsDebuggerCausalityData: uIDPo0dR90lQHnFDopiVLjbd/0IAAAAAxYMKfS4zuEWC0d5bf6byLKVx4ImkhWZLr+qCOPCMN3gACQAA
Content-Type: application/soap+xml; charset=utf-8; action=""
Host: zupit-test.gov.hr
Cookie: XSRF-TOKEN=7280e4c2-6dd1-4ed4-9a35-91c22c172dfd; JSESSIONID=B232706D460BE6C5FC5981826B36E9EB; TS01a2529c=01402d66b9a555cd86492a154020763ed07f0c7bbe2dbd6487ca2abfa0cfa1b3c533cde8a1335c973f7c6d5c24cdee6f743a38b5b5c0b26948152fee150d6abba41ea0e8cd
Content-Length: 301
Expect: 100-continue

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><getVersion xmlns="http://zupit.gov.hr/integration/v2" /></soap:Body></soap:Envelope>

And this is raw request sent by .NET 7 version:

POST https://zupit-test.gov.hr/services/integration/v2 HTTP/1.1
Host: zupit-test.gov.hr
Cache-Control: no-cache, max-age=0
X-XSRF-TOKEN: e62fe08b-e7ea-4fd7-88d7-28f58aa45018
Cookie: JSESSIONID=77C6A62B4A0B62DDDFAD8C534EA9D2A9,XSRF-TOKEN=e62fe08b-e7ea-4fd7-88d7-28f58aa45018
Accept-Encoding: gzip, deflate
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 573

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header>http://zupit.gov.hr/integration/v2/IntegrationWSv2/getVersionRequesturn:uuid:3aef24b7-6c08-4a85-bff4-fd0dbcf7ce1dhttp://www.w3.org/2005/08/addressing/anonymoushttps://zupit-test.gov.hr/services/integration/v2</s:Header><s:Body><getVersion xmlns="http://zupit.gov.hr/integration/v2"/></s:Body></s:Envelope>

And this is server response for .NET 7 request:

HTTP/1.1 403
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Set-Cookie: XSRF-TOKEN=915dea61-d5a4-4c63-ad85-51f92df31f67; Path=/
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Type: application/json;charset=UTF-8
Date: Thu, 22 Dec 2022 07:42:34 GMT
Strict-Transport-Security: max-age=16070400; includeSubDomains
Set-Cookie: TS01a2529c=01402d66b972abf2e18b994c3e4a4342cb1a60809c602d5bd0ebfb7953d22b3d635225a9b013d6108d2efd22d658d57c1de898f2709b920c1a01fefeda45b6c6746a57884d; Path=/
Transfer-Encoding: chunked

8e
{"timestamp":"2022-12-22T07:42:35.272Z","error":"Forbidden","message":"Forbidden","path":"/services/integration/v2","showServerMessage":false}
0

Is this HTTPS issue or difference of generated SOAP XML in .NET 7?
Any ideas how to solve this?

Thanks,
Mario


问:
How to avoid closing DropDown on MouseOver?
I made Navigation component with dynamic menu items.

`

```<code>import React, { useState } from "react";
import NavMenuItems from "../data/NavMenuItems";

function NavBar() {
  const [dropDown, setDropDown] = useState({});
  const setDropDownOpen = (name) => {
    setDropDown({[name]: true });
  };
  const setDropDownClose = (name) => {
        setDropDown({[name]: false });
  };

  return (
    <div className="flex flex-row my-2 mx-5">
      {NavMenuItems.map((menu, index) => (
        <>
          <div key={menu.item} className="relative flex flex-col mx-1">
            <div
              className="bg-[#121C24]  px-2 h-5 text-white text-sm hover:bg-green-700 hover:text-black hover:cursor-pointer "
              onMouseEnter={() => setDropDownOpen(menu.item)}
              onMouseLeave={() => setDropDownClose(menu.item)}
            >
              {menu.item}
            </div>
            {dropDown[menu.item]  && (
              <div className="bg-slate-200  absolute top-6 px-4 py-2"
              onMouseEnter={() => setDropDownOpen(menu.item)}
              onMouseLeave={() => setDropDownClose(menu.item)}
              >
                {menu.subitems.map((submenu, index) => (
                  <div key={index}>{submenu}</div>
                ))}
              </div>
            )}
          </div>
        </>
      ))}
    </div>
  );
}

export default NavBar;

</code>```

NavMenuItems.js

`

```<code>const NavMenuItems = [
    {
      item: "Events",
      subitems: ["Event1", "Event2", "Event2"],
    },
    {
      item: "Reports",
      subitems: ["Reports1", "Reports2", "Reports3"],
    },
  ];

  export default NavMenuItems
</code>```

When i mouseover on tabs, its working fine. but when i move over dropdown sub menu, it closes and cant select anything in submenu items.

Can someone help with this?

Body:
I made Navigation component with dynamic menu items.

`

import React, { useState } from "react";
import NavMenuItems from "../data/NavMenuItems";

function NavBar() {
  const [dropDown, setDropDown] = useState({});
  const setDropDownOpen = (name) => {
    setDropDown({[name]: true });
  };
  const setDropDownClose = (name) => {
        setDropDown({[name]: false });
  };

  return (

      {NavMenuItems.map((menu, index) => (
        <>

 setDropDownOpen(menu.item)}
              onMouseLeave={() => setDropDownClose(menu.item)}
            >
              {menu.item}

            {dropDown[menu.item]  && (

 setDropDownOpen(menu.item)}
              onMouseLeave={() => setDropDownClose(menu.item)}
              >
                {menu.subitems.map((submenu, index) => (

{submenu}

                ))}

            )}

        </>
      ))}

  );
}

export default NavBar;

NavMenuItems.js

`

const NavMenuItems = [
    {
      item: "Events",
      subitems: ["Event1", "Event2", "Event2"],
    },
    {
      item: "Reports",
      subitems: ["Reports1", "Reports2", "Reports3"],
    },
  ];

  export default NavMenuItems

When i mouseover on tabs, its working fine. but when i move over dropdown sub menu, it closes and cant select anything in submenu items.

Can someone help with this?


问:
How to get the count of values of a column present in a dataframe which are under particular conditions?
the dataframe is as follows:

```<code>sname | sid | sno | spercentage | student_id
---------------------------------------------
A       234   1        76.45        1
B       567   8        87.47        8
C       890   6        91.32        5
D       456   4        65.58        4
</code>```

the goal is to get the count of students that have percentage below or equal to 100, below or equal to 90, below or equal to 80, below or equal to 70, below or equal to 60 and below or equal to 50. And another condition if two columns matched or not.

the desired output:

```<code>percentage (<=) | s_count | sid_count
--------------------------------------
100                4           3
90                 3           3
80                 2           2
70                 1           1
60                 0           0
50                 0           0
</code>```

Could anyone please help me with this?
Thank you

Body:
the dataframe is as follows:

sname | sid | sno | spercentage | student_id
---------------------------------------------
A       234   1        76.45        1
B       567   8        87.47        8
C       890   6        91.32        5
D       456   4        65.58        4

the goal is to get the count of students that have percentage below or equal to 100, below or equal to 90, below or equal to 80, below or equal to 70, below or equal to 60 and below or equal to 50. And another condition if two columns matched or not.

the desired output:

percentage (<=) | s_count | sid_count
--------------------------------------
100                4           3
90                 3           3
80                 2           2
70                 1           1
60                 0           0
50                 0           0

Could anyone please help me with this?
Thank you


问:
Bad Request when serializing data
I'm creating an API endpoints for a B2B ecommerce application. I have a company model to store the data about companies that are creating an account. I linked the company model to the default User Model in Django, so that a user account will be created along with a company object. I linked the company model and the user model (One-to-One relationship). I keep getting this error, "Bad Request: /accounts/create/" when I submit data through the through the browsable API.

This is my model:

from django.db import models
from django.contrib.auth.models import User

# Create your models here.

class Company(models.Model):
    class IndustryType(models.TextChoices):
        MANUFACTURING = "MAN", "Manufacturing"
        CONSTRUCTION = "CON", "Construction"
        IT = "IT", "Information Technology"
        PROFESSIONAL_SERVICES = "PS", "Professional Services"
        HEALTHCARE = "HC", "Healthcare"
        FINANCIAL_SERVICES = "FS", "Financial Services"
        WHOLESALE_AND_DISTRIBUTION = "WD", "Wholesale and Distribution"
        RETAIL = "RET", "Retail"
        EDUCATION = "EDU", "Education"

    user = models.OneToOneField(User, on_delete=models.CASCADE)
    company_name = models.CharField(max_length=255)
    industry_type = models.CharField(max_length=255, choices=IndustryType.choices)
    tax_identification_number = models.CharField(max_length=15)
    address = models.CharField(max_length=255)
    phone = models.CharField(max_length=50)
    email = models.EmailField()

    def __str__(self):
        return self.company_name
```
<h3>This is my serializer:</h3>
<pre class="lang-py prettyprint-override"><code>from rest_framework import serializers
from django.contrib.auth.models import User
from .models import Company

class CompanySerializer(serializers.ModelSerializer):

    class Meta:
        model = Company
        fields = (

            "company_name",
            "industry_type",
            "tax_identification_number",
            "address",
            "phone",
            "email",
        )

class SignUpSerializer(serializers.ModelSerializer):
    password1 = serializers.CharField(style={"input_type": "password"}, write_only=True)
    password2 = serializers.CharField(style={"input_type": "password"}, write_only=True)
    company = CompanySerializer()

    class Meta:
        model = User
        fields = (

            "username",
            "password1",
            "password2",
            "company"
        )

    def create(self, validated_data):
        try:
            user = User.objects.create(username=validated_data["username"])
            user.set_password(validated_data["password1"])
            user.save()
            company_data = validated_data.pop('company')
            company_data['user'] = user
            company_serializer = CompanySerializer(data=company_data)

            if company_serializer.is_valid():

                company = company_serializer.save(user=user)

            else:

                raise serializers.ValidationError(company_serializer.errors)
        except IntegrityError:

            raise serializers.ValidationError(
                company_serializer.errors
            )
        return user

</code>```

This is my view:

from rest_framework import generics, permissions, authentication
from rest_framework.response import Response
from .serializer import SignUpSerializer

class SignUpView(generics.CreateAPIView):
    serializer_class = SignUpSerializer
    permission_classes = [permissions.AllowAny]

    def create(self, request, *args, **kwargs):
        serializer = self.get_serializer(data=request.data)
        serializer.is_valid(raise_exception=True)
        self.perform_create(serializer)
        headers = self.get_success_headers(serializer.data)

        return Response(serializer.data, headers=headers)
```
<p><img src="https://i.stack.imgur.com/Vms1H.png" alt="Data Submission Interface" />
<img src="https://i.stack.imgur.com/1c2Kw.png" alt="Bad Request" /></p>
<p>When I check the database. The user object is saved successfully, but no company object is saved.</p>
<p>Please explain what I'm doing wrong.</p>
<p>I verified that <code>company_serializer.is_valid()</code> is returning <code>True</code> by printing it. I have also printed out <code>company_serializer</code>, and the result is shown below. If <code>company_serializer contains data</code>, why is data not saved into the company mode?</p>
<pre class="lang-py prettyprint-override"><code>CompanySerializer(data=OrderedDict([('company_name', 'Peers In Tech'), ('industry_type', 'WD'), ('tax_identification_number', '01210884B'), ('address', 'afdfads'), ('phone', '0547145189'), ('email', 'abdulbasitm810@gmail.com'), ('user', <User: stackuser>)])):
    company_name = CharField(max_length=255)
    industry_type = ChoiceField(choices=[('MAN', 'Manufacturing'), ('CON', 'Construction'), ('IT', 'Information Technology'), ('PS', 'Professional Services'), ('HC', 'Healthcare'), ('FS', 'Financial Services'), ('WD', 'Wholesale and Distribution'), ('RET', 'Retail'), ('EDU', 'Education')])
    tax_identification_number = CharField(max_length=15)
    address = CharField(max_length=255)
    phone = CharField(max_length=50)
    email = EmailField(max_length=254)
</code>```

Title: Bad Request when serializing data

Body:
I'm creating an API endpoints for a B2B ecommerce application. I have a company model to store the data about companies that are creating an account. I linked the company model to the default User Model in Django, so that a user account will be created along with a company object. I linked the company model and the user model (One-to-One relationship). I keep getting this error, "Bad Request: /accounts/create/" when I submit data through the through the browsable API.

This is my model:

from django.db import models
from django.contrib.auth.models import User

# Create your models here.

class Company(models.Model):
    class IndustryType(models.TextChoices):
        MANUFACTURING = "MAN", "Manufacturing"
        CONSTRUCTION = "CON", "Construction"
        IT = "IT", "Information Technology"
        PROFESSIONAL_SERVICES = "PS", "Professional Services"
        HEALTHCARE = "HC", "Healthcare"
        FINANCIAL_SERVICES = "FS", "Financial Services"
        WHOLESALE_AND_DISTRIBUTION = "WD", "Wholesale and Distribution"
        RETAIL = "RET", "Retail"
        EDUCATION = "EDU", "Education"

    user = models.OneToOneField(User, on_delete=models.CASCADE)
    company_name = models.CharField(max_length=255)
    industry_type = models.CharField(max_length=255, choices=IndustryType.choices)
    tax_identification_number = models.CharField(max_length=15)
    address = models.CharField(max_length=255)
    phone = models.CharField(max_length=50)
    email = models.EmailField()

    def __str__(self):
        return self.company_name

This is my serializer:

from rest_framework import serializers
from django.contrib.auth.models import User
from .models import Company

class CompanySerializer(serializers.ModelSerializer):

    class Meta:
        model = Company
        fields = (

            "company_name",
            "industry_type",
            "tax_identification_number",
            "address",
            "phone",
            "email",
        )

class SignUpSerializer(serializers.ModelSerializer):
    password1 = serializers.CharField(style={"input_type": "password"}, write_only=True)
    password2 = serializers.CharField(style={"input_type": "password"}, write_only=True)
    company = CompanySerializer()

    class Meta:
        model = User
        fields = (

            "username",
            "password1",
            "password2",
            "company"
        )

    def create(self, validated_data):
        try:
            user = User.objects.create(username=validated_data["username"])
            user.set_password(validated_data["password1"])
            user.save()
            company_data = validated_data.pop('company')
            company_data['user'] = user
            company_serializer = CompanySerializer(data=company_data)

            if company_serializer.is_valid():

                company = company_serializer.save(user=user)

            else:

                raise serializers.ValidationError(company_serializer.errors)
        except IntegrityError:

            raise serializers.ValidationError(
                company_serializer.errors
            )
        return user

This is my view:

from rest_framework import generics, permissions, authentication
from rest_framework.response import Response
from .serializer import SignUpSerializer

class SignUpView(generics.CreateAPIView):
    serializer_class = SignUpSerializer
    permission_classes = [permissions.AllowAny]

    def create(self, request, *args, **kwargs):
        serializer = self.get_serializer(data=request.data)
        serializer.is_valid(raise_exception=True)
        self.perform_create(serializer)
        headers = self.get_success_headers(serializer.data)

        return Response(serializer.data, headers=headers)

When I check the database. The user object is saved successfully, but no company object is saved.

Please explain what I'm doing wrong.

I verified that company_serializer.is_valid() is returning True by printing it. I have also printed out company_serializer, and the result is shown below. If company_serializer contains data, why is data not saved into the company mode?

CompanySerializer(data=OrderedDict([('company_name', 'Peers In Tech'), ('industry_type', 'WD'), ('tax_identification_number', '01210884B'), ('address', 'afdfads'), ('phone', '0547145189'), ('email', 'abdulbasitm810@gmail.com'), ('user', <User: stackuser>)])):
    company_name = CharField(max_length=255)
    industry_type = ChoiceField(choices=[('MAN', 'Manufacturing'), ('CON', 'Construction'), ('IT', 'Information Technology'), ('PS', 'Professional Services'), ('HC', 'Healthcare'), ('FS', 'Financial Services'), ('WD', 'Wholesale and Distribution'), ('RET', 'Retail'), ('EDU', 'Education')])
    tax_identification_number = CharField(max_length=15)
    address = CharField(max_length=255)
    phone = CharField(max_length=50)
    email = EmailField(max_length=254)


问:
How to mock custom hook which returns scrolled element's data with jest and enzyme
In my react component I am adding a css class to a div when another div get scrolled :

```<code>import useOnScroll from '../utils';

const MyComponent = (props) => {
  const scrollableContainerRef = useRef();
  const { scrollTop: containerScrollTop } = useOnScroll(scrollableContainerRef);

...
return (
    <div className="commonBtmSheet">
        <div data-test="btmSheet" className="OverlayWrap">
          <div data-test="btmSheet-header" className={`header ${containerScrollTop > 0 ? 'scrolled' : '' }`}>
            ...

        <div data-test="btmSheet-body" ref={scrollableContainerRef} className="OverlayOuter">
            ...
</code>```

useOnScroll Hook:

```<code>import { useEffect, useRef, useState } from "react";

function useOnScroll(ElRef) {
  const prevScrollTop = useRef();
  const [scrollData, setScrollData] = useState({});

  const handleScroll = (e) => {
    const el = e.target;

    const { scrollTop } = el;

    let direction = "down";
    if (prevScrollTop.current > scrollTop) {
      direction = "up";
    }

    setScrollData((prev) => ({
      ...prev,
      scrollTop,
      direction,
    }));
  };

  useEffect(() => {
    const elm = ElRef.current;

    if (elm) {
      elm.addEventListener("scroll", handleScroll);
    }

    return () => {
      if (elm) {
        elm.removeEventListener("scroll", handleScroll);
      }
    };
  }, [ElRef.current]);

  return scrollData;
}

export default useOnScroll;
</code>```

Body:
In my react component I am adding a css class to a div when another div get scrolled :

import useOnScroll from '../utils';

const MyComponent = (props) => {
  const scrollableContainerRef = useRef();
  const { scrollTop: containerScrollTop } = useOnScroll(scrollableContainerRef);

...
return (

          <div data-test="btmSheet-header" className={`header ${containerScrollTop > 0 ? 'scrolled' : '' }`}>
            ...

            ...

useOnScroll Hook:

import { useEffect, useRef, useState } from "react";

function useOnScroll(ElRef) {
  const prevScrollTop = useRef();
  const [scrollData, setScrollData] = useState({});

  const handleScroll = (e) => {
    const el = e.target;

    const { scrollTop } = el;

    let direction = "down";
    if (prevScrollTop.current > scrollTop) {
      direction = "up";
    }

    setScrollData((prev) => ({
      ...prev,
      scrollTop,
      direction,
    }));
  };

  useEffect(() => {
    const elm = ElRef.current;

    if (elm) {
      elm.addEventListener("scroll", handleScroll);
    }

    return () => {
      if (elm) {
        elm.removeEventListener("scroll", handleScroll);
      }
    };
  }, [ElRef.current]);

  return scrollData;
}

export default useOnScroll;


问:
How to Pass data between components react js
i need to ask some question

I have 1 parent(index.js) and 2 childs (JobRequirement.js and JobList.js)

how can i send a data from job requirement to joblist?

here is my code

// JOBREQUIREMENT.JS

```<code>const JobRequirement = ({ isOpen, handleSelect }) => {

  const [datas, setDatas] = useState([])

  const loadData = () => {
    axios.get('/bla')
    .then((res) => {
      setDatas(res.data.data)
    })
  }

  useEffect(() => {
    loadData()
  }, [])

  if (isOpen) {
    return (
      <Fragment>
        <h5 className='mt-3 mb-2'>Job Requirements</h5>
        <Row>
          {datas.map((data) => (
            <Col md='6' lg='4' key={data.id}>
              <Card onClick={() => handleSelect(data.id)} className='text-center vertical-align-center mb-3'>
                <CardBody>
                  <CardBody tag='h4'>{data.name}</CardBody>
                </CardBody>
              </Card>
            </Col>
          ))}
        </Row>
      </Fragment>
    )
  } else return (<></>)
}

export default JobRequirement
</code>```

// INDEX.JS

```<code>import { Fragment, useState } from 'react'
import JobRequirement from './JobRequirement'
import JobList from './JobList'

export default function JobRequirements() {

  const [jobRequirement, setJobRequirement] = useState(true)
  const [jobList, setJobList] = useState(false)

  const selectJobRequirement = (data) => {
    setJobRequirement(false)
    setJobList(true, data)
  }

  const closeJobList = () => {
    setJobRequirement(true)
    setJobList(false)
  }

  return (
    <div>
      <Fragment>
        <JobRequirement isOpen={jobRequirement} handleSelect={selectJobRequirement} />
        <JobList isOpen={jobList} close={closeJobList} />
      </Fragment>
    </div>
  )
}
</code>```

// JOBLIST.JS

```<code>import { Fragment } from 'react'
import { Button, Row, Col, Card, CardBody } from 'reactstrap'
import { ChevronLeft } from 'react-feather'

const JobList = ({ isOpen, close, data }) => {

  console.log(data)

  if (isOpen) {
    return (
      <Fragment>
        <div className='mt-2 mb-2'>
            <Button size="sm" className='btn-icon' onClick={() => close()}><ChevronLeft size='15'/></Button> List of Job
        </div>
        <div>
          <Row>
            <Col md='6' lg='4'>
              <Card className='text-center vertical-align-center mb-3'>
                <CardBody>
                  <CardBody tag='h4'>Hello</CardBody>
                </CardBody>
              </Card>
            </Col>
          </Row>
        </div>
      </Fragment>
    )
  } else return (<></>)
}

export default JobList
</code>```

I need to get a {data.id} from jobrequirement.js and use it in joblist.js
thankyou so much

Body:
i need to ask some question

I have 1 parent(index.js) and 2 childs (JobRequirement.js and JobList.js)

how can i send a data from job requirement to joblist?

here is my code

// JOBREQUIREMENT.JS

const JobRequirement = ({ isOpen, handleSelect }) => {

  const [datas, setDatas] = useState([])

  const loadData = () => {
    axios.get('/bla')
    .then((res) => {
      setDatas(res.data.data)
    })
  }

  useEffect(() => {
    loadData()
  }, [])

  if (isOpen) {
    return (
      <Fragment>

Job Requirements

        <Row>
          {datas.map((data) => (
            <Col md='6' lg='4' key={data.id}>
              <Card onClick={() => handleSelect(data.id)} className='text-center vertical-align-center mb-3'>
                <CardBody>
                  <CardBody tag='h4'>{data.name}</CardBody>
                </CardBody>
              </Card>
            </Col>
          ))}
        </Row>
      </Fragment>
    )
  } else return (<></>)
}

export default JobRequirement

// INDEX.JS

import { Fragment, useState } from 'react'
import JobRequirement from './JobRequirement'
import JobList from './JobList'

export default function JobRequirements() {

  const [jobRequirement, setJobRequirement] = useState(true)
  const [jobList, setJobList] = useState(false)

  const selectJobRequirement = (data) => {
    setJobRequirement(false)
    setJobList(true, data)
  }

  const closeJobList = () => {
    setJobRequirement(true)
    setJobList(false)
  }

  return (

      <Fragment>
        <JobRequirement isOpen={jobRequirement} handleSelect={selectJobRequirement} />
        <JobList isOpen={jobList} close={closeJobList} />
      </Fragment>

  )
}

// JOBLIST.JS

import { Fragment } from 'react'
import { Button, Row, Col, Card, CardBody } from 'reactstrap'
import { ChevronLeft } from 'react-feather'

const JobList = ({ isOpen, close, data }) => {

  console.log(data)

  if (isOpen) {
    return (
      <Fragment>

            <Button size="sm" className='btn-icon' onClick={() => close()}><ChevronLeft size='15'/></Button> List of Job

          <Row>
            <Col md='6' lg='4'>
              <Card className='text-center vertical-align-center mb-3'>
                <CardBody>
                  <CardBody tag='h4'>Hello</CardBody>
                </CardBody>
              </Card>
            </Col>
          </Row>

      </Fragment>
    )
  } else return (<></>)
}

export default JobList

I need to get a {data.id} from jobrequirement.js and use it in joblist.js
thankyou so much


问:
What is the impact of changing the topic size for a premium Azure Service Bus?
We are using a premium Azure Service Bus and we are getting close to our current limit of 5 GB into our current limit of 5 GB as the maximum topic size. We are considering increasing it to 10GB or 20GB but we cannot see what the implications will be from a cost and/or performance perspective?

Will an increase of topic size introduce extra costs or affect the general performance of the service bus (we are currently using one message unit).