问:
Why O2 optimization level breaks struct array initialization in 32-bit bare metal environment
I was writing a function which initializes an array of two structs. This function works perfectly with O0 and O1 optimization levels, but it breaks with O2, causing an Invalid opcode exception on the line I indicated with an arrow.

This code runs inside QEMU in a 32-bit bare metal setup. I can't understand why it crashes after executing the movdqa instruction. What could be causing this error? Could it be a compiler error? Or are we maybe missing something (e.g. configuring the FPU or something like that)?

C code

OSS: This is not the real code, but only a reproducible example which compiles to the same assembly.

```<code>/**
 * gcc version 12.2
 * CFLAGS: -ffreestanding -m32 -O2 -std=gnu99 -Wall
 * -Wextra -Werror -fno-pie -fno-stack-protector -g
 */

#include <stdint.h>
#include <string.h>

#define BUTOS_START         0
#define BUTOS_SIZE          0x25

#define FSTAB_SECTOR        0x24
#define FILESYSTEM_START    0x25
#define FILESYSTEM_SIZE     0x10

#define FS_BLOCK(START,     \
                 SIZE)      (struct fs_block){.start=START, .size=SIZE}

struct fs_block
{
    uint32_t start; // LBA
    uint32_t size;  // Size in sectors
};

void fstab_write(uint8_t *buff_sector)
{
    struct fs_block fstab[] = {
        FS_BLOCK(BUTOS_START, BUTOS_SIZE),
        FS_BLOCK(FILESYSTEM_START, FILESYSTEM_SIZE)
    };

    memcpy(buff_sector, fstab, sizeof(fstab));
}
</code>```

Assembly output

O1:

```<code>fstab_write:
        sub     esp, 32
        mov     DWORD PTR [esp+4], 0
        mov     DWORD PTR [esp+8], 37
        mov     DWORD PTR [esp+12], 37
        mov     DWORD PTR [esp+16], 16
        push    16
        lea     eax, [esp+8]
        push    eax
        push    DWORD PTR [esp+44]
        call    memcpy
        add     esp, 44
        ret
</code>```

O2:

```<code>fstab_write:
        sub     esp, 32
    ==> movdqa  xmm0, XMMWORD PTR .LC0  /*point of crash */
        movaps  XMMWORD PTR [esp+4], xmm0
        push    16
        lea     eax, [esp+8]
        push    eax
        push    DWORD PTR [esp+44]
        call    memcpy
        add     esp, 44
        ret
.LC0:
        .long   0
        .long   37
        .long   37
        .long   16
</code>```

Body:
I was writing a function which initializes an array of two structs. This function works perfectly with O0 and O1 optimization levels, but it breaks with O2, causing an Invalid opcode exception on the line I indicated with an arrow.

This code runs inside QEMU in a 32-bit bare metal setup. I can't understand why it crashes after executing the movdqa instruction. What could be causing this error? Could it be a compiler error? Or are we maybe missing something (e.g. configuring the FPU or something like that)?

C code

OSS: This is not the real code, but only a reproducible example which compiles to the same assembly.

/**
 * gcc version 12.2
 * CFLAGS: -ffreestanding -m32 -O2 -std=gnu99 -Wall
 * -Wextra -Werror -fno-pie -fno-stack-protector -g
 */

#include <stdint.h>
#include <string.h>

#define BUTOS_START         0
#define BUTOS_SIZE          0x25

#define FSTAB_SECTOR        0x24
#define FILESYSTEM_START    0x25
#define FILESYSTEM_SIZE     0x10

#define FS_BLOCK(START,     \
                 SIZE)      (struct fs_block){.start=START, .size=SIZE}

struct fs_block
{
    uint32_t start; // LBA
    uint32_t size;  // Size in sectors
};

void fstab_write(uint8_t *buff_sector)
{
    struct fs_block fstab[] = {
        FS_BLOCK(BUTOS_START, BUTOS_SIZE),
        FS_BLOCK(FILESYSTEM_START, FILESYSTEM_SIZE)
    };

    memcpy(buff_sector, fstab, sizeof(fstab));
}

Assembly output

O1:

fstab_write:
        sub     esp, 32
        mov     DWORD PTR [esp+4], 0
        mov     DWORD PTR [esp+8], 37
        mov     DWORD PTR [esp+12], 37
        mov     DWORD PTR [esp+16], 16
        push    16
        lea     eax, [esp+8]
        push    eax
        push    DWORD PTR [esp+44]
        call    memcpy
        add     esp, 44
        ret

O2:

fstab_write:
        sub     esp, 32
    ==> movdqa  xmm0, XMMWORD PTR .LC0  /*point of crash */
        movaps  XMMWORD PTR [esp+4], xmm0
        push    16
        lea     eax, [esp+8]
        push    eax
        push    DWORD PTR [esp+44]
        call    memcpy
        add     esp, 44
        ret
.LC0:
        .long   0
        .long   37
        .long   37
        .long   16


来源: stackexchange

问:
Google Play Console app Privacy Policy not gathering any data
I want to upload a app on Google Play. The app doesn't gather any data. (Even the app doesn't use internet)But the google says that we need a privacy policy. What should I write in privacy policy?

I wrote "Doesn't gather data" but it didn't worked.

ContentLicense: CC BY-SA 4.0


问:
SSL connectivity to downstream app using Envoy
I am working on using Envoy as proxy between our application and an external vendor over TCP connections. Between our app and the external vendor first I am trying to setup the TLS connections as per this documentation: https://www.envoyproxy.io/docs/envoy/latest/start/quick-start/securing#start-quick-start-securing

For the secure TCP connectivity between the two systems we have been using two JKS files, one is a TrustStore and the other is a KeyStore.
I generated PEM files from both the JKS files using the commands:

```<code>keytool -importkeystore -srckeystore keystore_cert.jks -destkeystore keystore_cert.p12 -deststoretype PKCS12
</code>```
```<code>openssl pkcs12 -in keystore_cert.p12 -out keystore_cert.pem
</code>```
```<code>keytool -importkeystore -srckeystore truststore_cert.jks -destkeystore truststore_cert.p12 -deststoretype PKCS12
</code>```
```<code>openssl pkcs12 -in truststore_cert.p12 -out truststore_cert.pem
</code>```

In the Envoy yaml file I am configuring the clusters as below:

```<code>clusters:
      - name: external_service_1
        connect_timeout: 2s
        type: logical_dns
        lb_policy: round_robin
        load_assignment:
          cluster_name: external_service_1
          endpoints:
            - lb_endpoints:
                - endpoint:
                    address:
                      socket_address:
                        address: <ip of the external vendor>
                        port_value: <port where we need to connect>
        transport_socket:
          name: envoy.transport_sockets.tls
          typed_config:
            "@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext
            common_tls_context:
              validation_context:
                trusted_ca:
                  filename: /opt/certs/truststore_cert.pem
              tls_params:
                cipher_suites: ["ECDHE-RSA-AES256-GCM-SHA384"]
                tls_maximum_protocol_version: TLSv1_2
              tls_certificates:
                - certificate_chain:
                    filename: "/opt/certs/keystore_cert.pem"
</code>```

When I am validating the yaml file I am getting the error as: [20283844][critical][main] [source/server/config_validation/server.cc:63] error initializing configuration 'envoy-tcp-external-vendor-connection.yaml': Failed to load incomplete private key from path:

Am I generating the pem files incorrectly using the above commands? Should I get the actual certs in the form of pem from this external vendor?

Body:
I am working on using Envoy as proxy between our application and an external vendor over TCP connections. Between our app and the external vendor first I am trying to setup the TLS connections as per this documentation: https://www.envoyproxy.io/docs/envoy/latest/start/quick-start/securing#start-quick-start-securing

For the secure TCP connectivity between the two systems we have been using two JKS files, one is a TrustStore and the other is a KeyStore.
I generated PEM files from both the JKS files using the commands:

keytool -importkeystore -srckeystore keystore_cert.jks -destkeystore keystore_cert.p12 -deststoretype PKCS12

openssl pkcs12 -in keystore_cert.p12 -out keystore_cert.pem

keytool -importkeystore -srckeystore truststore_cert.jks -destkeystore truststore_cert.p12 -deststoretype PKCS12

openssl pkcs12 -in truststore_cert.p12 -out truststore_cert.pem

In the Envoy yaml file I am configuring the clusters as below:

clusters:
      - name: external_service_1
        connect_timeout: 2s
        type: logical_dns
        lb_policy: round_robin
        load_assignment:
          cluster_name: external_service_1
          endpoints:
            - lb_endpoints:
                - endpoint:
                    address:
                      socket_address:
                        address: <ip of the external vendor>
                        port_value: <port where we need to connect>
        transport_socket:
          name: envoy.transport_sockets.tls
          typed_config:
            "@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext
            common_tls_context:
              validation_context:
                trusted_ca:
                  filename: /opt/certs/truststore_cert.pem
              tls_params:
                cipher_suites: ["ECDHE-RSA-AES256-GCM-SHA384"]
                tls_maximum_protocol_version: TLSv1_2
              tls_certificates:
                - certificate_chain:
                    filename: "/opt/certs/keystore_cert.pem"

When I am validating the yaml file I am getting the error as: [20283844][critical][main] [source/server/config_validation/server.cc:63] error initializing configuration 'envoy-tcp-external-vendor-connection.yaml': Failed to load incomplete private key from path:

Am I generating the pem files incorrectly using the above commands? Should I get the actual certs in the form of pem from this external vendor?


问:
text falls to new line even though div has available width to grow
I have a div which will eventually has only text content inside it and i want it to has width equal to content if it's not wider than 150px.
What i mean is that if it has short text inside it, it will have width of fit-content, but if it has long text inside that will exceed max-width, i want that text to fall to new line while keeping max-width. For long text my div is working as expected but for short text second word always falls to new line even if there is available width.

This is the styling of my div,

stylings of div: https://i.stack.imgur.com/puENu.png

3 sample pics of results:

short text: https://i.stack.imgur.com/VkIAK.png

medium text: https://i.stack.imgur.com/DiNxh.png

long text:  https://i.stack.imgur.com/dYSwl.png

Thank you for any kind of your help in advance.


问:
Illegal instruction (core dumped) when import pandas. python3
I have Python 3.10.6 installed in my system (Lubuntu 22.04). I installed pandas and pyarrow with "pip3 install" command but when I try to import pandas in a .py file or even in the python3 console, like "import pandas as pd" or "import pandas" I get "Illegal instruction (core dumped)".

I tried to resintall pandas:

```<code>guilherme@guilherme-rv415:~$ pip3 install pandas
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pandas in ./.local/lib/python3.10/site-packages (1.5.2)
Requirement already satisfied: numpy>=1.21.0 in ./.local/lib/python3.10/site-packages (from pandas) (1.24.1)
Requirement already satisfied: pytz>=2020.1 in ./.local/lib/python3.10/site-packages (from pandas) (2022.7)
Requirement already satisfied: python-dateutil>=2.8.1 in ./.local/lib/python3.10/site-packages (from pandas) (2.8.2)
Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.8.1->pandas) (1.16.0)
</code>```

And python3:

```<code>guilherme@guilherme-rv415:~$ sudo apt-get install python3
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3 is already the newest version (3.10.6-1~22.04).
The following packages were automatically installed and are no longer required:
  libflashrom1 libftdi1-2
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
</code>```

But nothing has changed. I would like to know how can I fix this problem.
Thank you!

Body:
I have Python 3.10.6 installed in my system (Lubuntu 22.04). I installed pandas and pyarrow with "pip3 install" command but when I try to import pandas in a .py file or even in the python3 console, like "import pandas as pd" or "import pandas" I get "Illegal instruction (core dumped)".

I tried to resintall pandas:

guilherme@guilherme-rv415:~$ pip3 install pandas
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pandas in ./.local/lib/python3.10/site-packages (1.5.2)
Requirement already satisfied: numpy>=1.21.0 in ./.local/lib/python3.10/site-packages (from pandas) (1.24.1)
Requirement already satisfied: pytz>=2020.1 in ./.local/lib/python3.10/site-packages (from pandas) (2022.7)
Requirement already satisfied: python-dateutil>=2.8.1 in ./.local/lib/python3.10/site-packages (from pandas) (2.8.2)
Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.8.1->pandas) (1.16.0)

And python3:

guilherme@guilherme-rv415:~$ sudo apt-get install python3
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3 is already the newest version (3.10.6-1~22.04).
The following packages were automatically installed and are no longer required:
  libflashrom1 libftdi1-2
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

But nothing has changed. I would like to know how can I fix this problem.
Thank you!


问:
Show effective pom verbose
My project (which has a large company parent pom and another large company pom that contains a very large dependency-management section and another large parent pom) is currently pulling in the transitive dependency io.netty:netty-codec:4.1.84.Final but I need this to be 4.1.86.Final. I don't understand why 4.1.84 is being used instead.

mvn dependecy:tree shows me that netty-codec is a dependency of software.amazon.awssdk:netty-nio-client:jar:2.19.6:runtime which is a direct dependency of my project. Now the puzzle is this: software.amazon.awssdk:netty-nio-client:jar:2.19.6  has a parent pom with a dependency-management section that specifies io.netty version 4.1.86.Final. Therefore, I expect that to be used. I cannot find anything in my POM hierarchy that specifies 4.1.84 (but obviously there must be) so I don't understand where this older version is coming from.

mvn help:effective-pom -Dverbose=true shows this output:

```<code>    <dependencyManagement>
        ...
        <dependency>
          <groupId>io.netty</groupId>  <!-- io.netty:netty-bom:4.1.84.Final, line 92 -->
          <artifactId>netty-codec</artifactId>  <!-- io.netty:netty-bom:4.1.84.Final, line 93 -->
          <version>4.1.84.Final</version>  <!-- io.netty:netty-bom:4.1.84.Final, line 94 -->
</code>```

So obviously the old version of netty-codec is due to use of an old version of netty-bom, how do I find out what is pulling in netty-bom?

Title: Show effective pom verbose

Body:
My project (which has a large company parent pom and another large company pom that contains a very large dependency-management section and another large parent pom) is currently pulling in the transitive dependency io.netty:netty-codec:4.1.84.Final but I need this to be 4.1.86.Final. I don't understand why 4.1.84 is being used instead.

mvn dependecy:tree shows me that netty-codec is a dependency of software.amazon.awssdk:netty-nio-client:jar:2.19.6:runtime which is a direct dependency of my project. Now the puzzle is this: software.amazon.awssdk:netty-nio-client:jar:2.19.6  has a parent pom with a dependency-management section that specifies io.netty version 4.1.86.Final. Therefore, I expect that to be used. I cannot find anything in my POM hierarchy that specifies 4.1.84 (but obviously there must be) so I don't understand where this older version is coming from.

mvn help:effective-pom -Dverbose=true shows this output:

    <dependencyManagement>
        ...
        <dependency>
          <groupId>io.netty</groupId>
          <artifactId>netty-codec</artifactId>
          <version>4.1.84.Final</version>

So obviously the old version of netty-codec is due to use of an old version of netty-bom, how do I find out what is pulling in netty-bom?


问:
How get _instance property of an EmbeddedDocument in post_init method
I'm trying to get parent document (mongoengine.Document) of an EmbeddedDocument and, as suggested here I'm using self._instance.

I'm trying to get this attribute in post_init method, but it doesn't exist and raises this exception: Field 'image' - 'FileEmbeddedDocument' object has no attribute '_instance'

How can I get the _instance attribute in post_init? Or is there a better way to get the parent document?

I'm using

flask==1.1.4

flask-mongoengine=1.0.0

mongoengine==0.23.1

```<code>class FileEmbeddedDocument(EmbeddedDocument):
    name = StringField()

    @classmethod
    def post_init(cls, sender, document, **kwargs):
        current_app.logger.debug(document._instance)

signals.post_init.connect(FileEmbeddedDocument.post_init, sender=FileEmbeddedDocument)
</code>```
```<code>class Company(Document):
    name = StringField(required=True, min_length=3)
    image = EmbeddedDocumentField(FileEmbeddedDocument, null=True, default=None)
</code>```

Body:
I'm trying to get parent document (mongoengine.Document) of an EmbeddedDocument and, as suggested here I'm using self._instance.

I'm trying to get this attribute in post_init method, but it doesn't exist and raises this exception: Field 'image' - 'FileEmbeddedDocument' object has no attribute '_instance'

How can I get the _instance attribute in post_init? Or is there a better way to get the parent document?

I'm using

flask==1.1.4

flask-mongoengine=1.0.0

mongoengine==0.23.1

class FileEmbeddedDocument(EmbeddedDocument):
    name = StringField()

    @classmethod
    def post_init(cls, sender, document, **kwargs):
        current_app.logger.debug(document._instance)

signals.post_init.connect(FileEmbeddedDocument.post_init, sender=FileEmbeddedDocument)

class Company(Document):
    name = StringField(required=True, min_length=3)
    image = EmbeddedDocumentField(FileEmbeddedDocument, null=True, default=None)


问:
Using pywhatkit to automate whatsapp | python 3
WhatsApp automation by using pywhatkit in python3 does not work well. The message is not sent automatically.

I tried to automate WhatsApp in python3 by using pywhatkit.

For this I wrote the following code:

```<code>import pywhatkit

pywhatkit.sendwhatmsg("+4xxxxxxxxxx6", "Hi", 15, 32)
</code>```

So now the code makes opening WhatsApp and the chat. There is also the message but the message is not sent automatically. I have to do this manually.

I can't figure out why.

Do you have any ideas?

Many thanks in advance.

Body:
WhatsApp automation by using pywhatkit in python3 does not work well. The message is not sent automatically.

I tried to automate WhatsApp in python3 by using pywhatkit.

For this I wrote the following code:

import pywhatkit

pywhatkit.sendwhatmsg("+4xxxxxxxxxx6", "Hi", 15, 32)

So now the code makes opening WhatsApp and the chat. There is also the message but the message is not sent automatically. I have to do this manually.

I can't figure out why.

Do you have any ideas?

Many thanks in advance.


问:
When I put expo run:android command and create firebase app, i don't open my project in emulator or scan its don't work
I think it's a react native error, note I am new in reacts native.

When I put expo run:android command and create the firebase app, I don't open my project in an emulator or scan its don't work


问:
Terraform Cloud env vars not visible in registry module
I've written some custom modules which use the method described here to get the value of workspace environment variables.  Testing the module code "locally" (the test code accessing the module in the same GitHub repo) works fine in TF Cloud.  But once the module is published to our private registry and I try to reference it with other code, the module doesn't seem to be able to see the same env variables defined in that workspace.  For example, I'm trying to get the value for this variable using the script env.sh:

```<code>cat <<EOF
{
  "env": "$env"
}
EOF
</code>```

I have this code in the shared module:

```<code>data "external" "env_vars" {
  program = ["${path.module}/env.sh"]
}
</code>```

And then I use this to get the env variable value: data.external.env_vars.result["env"].  The variable "env" is defined in the TF Cloud workspace:enter image description here.

However, when the new code runs in TF cloud, the module is not getting anything for "env".  Is there a limitation on shared modules from a registry having visibility of workspace variables?

The module code should see the workspace-defined value for "env" but it's just empty.

Body:
I've written some custom modules which use the method described here to get the value of workspace environment variables.  Testing the module code "locally" (the test code accessing the module in the same GitHub repo) works fine in TF Cloud.  But once the module is published to our private registry and I try to reference it with other code, the module doesn't seem to be able to see the same env variables defined in that workspace.  For example, I'm trying to get the value for this variable using the script env.sh:

cat <<EOF
{
  "env": "$env"
}
EOF

I have this code in the shared module:

data "external" "env_vars" {
  program = ["${path.module}/env.sh"]
}

And then I use this to get the env variable value: data.external.env_vars.result["env"].  The variable "env" is defined in the TF Cloud workspace:enter image description here.

However, when the new code runs in TF cloud, the module is not getting anything for "env".  Is there a limitation on shared modules from a registry having visibility of workspace variables?

The module code should see the workspace-defined value for "env" but it's just empty.


问:
Forcing GridLayout Re-Draw
I have a game board implemented as a class which extends GridLayout.  I have called GridLayout.setWillNotDraw(false), and overridden the GridLayout.onDrawForeground() method to draw a border and grid lines.  The GridLayout contains 25 child views in a 5x5 arrangement, each of which represents a single cell on the game board.

When one of the child views is updated during game play, I want the entire GridLayout to be redrawn, including its children.  When I call GridLayout.invalidate(), nothing happens.  If I call each child's invalidate() method, those each get redrawn, but GridLayout is not redrawn.  If I rotate the Android device, then the GridLayout is redrawn correctly.

How can I force a GridLayout to redraw itself and all its children?

Title: Forcing GridLayout Re-Draw


问:
How to handle refresh tokens in HttpOnly cookies with Hot Chocolate (GraphQL)?
I have an Asp.Net Core 6 GraphQL API app. Server setup with Hot Chocolate and endpoints are served at localhost/graphql.
When a user logs in GraphQL resolver generates both - access and refresh tokens, and sends in response as HttpOnly cookies.
An access token cookie has a path - "/", and a refresh token cookie has a path - "/graphql/refreshtoken".
The idea is that the browser in every request should send an access token, but a refresh token must be sent only when a client hits "/graphql/refreshtoken" endpoint.

I could not find any example with my scenario. And those that I found store refresh tokens in local storage, but not the cookie.

How can I setup the GraphQL server to serve /graphql/refreshtoken endpoint?
Note: I don't want to additionally use REST for refresh tokens.

If the above approach is not achievable, how can I refresh cookie-stored tokens with GraphQL? What is the best practice?


问:
Bootstrap 4 external style sheet Font Attributes won't work
I've been struggling to create my 1st website in years. Using bootstrap in Dreamweaver.

There is a steep learning curve, made worse because it seems like bootstrap just wants to do what it wants to do.

I want to set up my styles, H1, H2, etc...

So, I added the H1 style like so:

```<code>    h1 {
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", "Arial Black",
"sans-serif";
    font-size: 8em;
    text-align: left
}
</code>```

And at first it looks like it works, but as soon as I move to do something else, or check in on my test page, it does back to whatever size it defaulted to.

Preceding it is this:

```<code>html {
  font-family: sans-serif;
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
  display: block;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica
Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe
UI Symbol", "Noto Color Emoji";
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #0A0A0A;
    text-align: left;
    background-color: #fff;
}
</code>```

I have piece by piece removed each of this attributes to see what my be over-riding my H1 code, but it makes no difference.

What am I missing?

Experimenting with the rest of the standard styles, h2 through h6 have the same problem. I think P is retaining size but it won't get lighter.

Mind you, the font family assigned to H1 stays. Whatever 4em, 8em, 30em, 100%, 300%, 600%.... That change will not present itself on a refresh of my test page and it will disappear from the Dreamweaver split view.

Thanks in advance.

Update: for @Isherwood

It only displays correctly within the Dreamweaver split screen interface as I change the CSS external sheet.

All this is new to me. It has been more than 8 years since I've built a site from scratch and I've only been member here for a few days.

I am quite the novice. I'm not even sure what you mean by "override styles".
I simply set h1, h2, h3, etc... in the HTML body portion around the text I want effected. I declare the font family, size, etc... in the external css as shown above.

But give me a while to see if I can figure out how to make a snippet as you requested.

Meanwhile, I do have this loaded online to see if that made any difference, in a folder on my husband's site.

https://www.walterbeckham.com/testingzone/one.html

Body:
I've been struggling to create my 1st website in years. Using bootstrap in Dreamweaver.

There is a steep learning curve, made worse because it seems like bootstrap just wants to do what it wants to do.

I want to set up my styles, H1, H2, etc...

So, I added the H1 style like so:

    h1 {
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", "Arial Black",
"sans-serif";
    font-size: 8em;
    text-align: left
}

And at first it looks like it works, but as soon as I move to do something else, or check in on my test page, it does back to whatever size it defaulted to.

Preceding it is this:

html {
  font-family: sans-serif;
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
  display: block;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica
Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe
UI Symbol", "Noto Color Emoji";
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #0A0A0A;
    text-align: left;
    background-color: #fff;
}

I have piece by piece removed each of this attributes to see what my be over-riding my H1 code, but it makes no difference.

What am I missing?

Experimenting with the rest of the standard styles, h2 through h6 have the same problem. I think P is retaining size but it won't get lighter.

Mind you, the font family assigned to H1 stays. Whatever 4em, 8em, 30em, 100%, 300%, 600%.... That change will not present itself on a refresh of my test page and it will disappear from the Dreamweaver split view.

Thanks in advance.

Update: for @Isherwood

It only displays correctly within the Dreamweaver split screen interface as I change the CSS external sheet.

All this is new to me. It has been more than 8 years since I've built a site from scratch and I've only been member here for a few days.

I am quite the novice. I'm not even sure what you mean by "override styles".
I simply set h1, h2, h3, etc... in the HTML body portion around the text I want effected. I declare the font family, size, etc... in the external css as shown above.

But give me a while to see if I can figure out how to make a snippet as you requested.

Meanwhile, I do have this loaded online to see if that made any difference, in a folder on my husband's site.

https://www.walterbeckham.com/testingzone/one.html


问:
Finding a specific packet, then filtering packets by a field in this packet
As part of my BPF learning, I'm attempting a simple (I think) challenge.
I want to filter out all packets that are not UDP and not dest port 1900, and for those which are UDP:

I take the first UDP packet that is received, take the first byte of the checksum of that packet, and from now on, accept only packets that are UDP and also have that exact same value in their first byte of checksum.

Here is my packet_handler.c:

#include <stdint.h>
#include <stdbool.h>
#include <arpa/inet.h>
#include <asm/byteorder.h>
#include <linux/bpf.h>
#include <bpf/bpf_helpers.h>
#include <linux/if_ether.h>
#include <linux/ip.h>
#include <linux/udp.h>
#include <linux/pkt_cls.h>

#define SEC(NAME) __attribute__((section(NAME), used))

#define htons(x) ((__be16)__constant_swa16((x)))

struct bpf_map_def SEC("maps") my_map = {
    .type        = BPF_MAP_TYPE_ARRAY,
    .key_size    = sizeof(uint8_t),
    .value_size  = sizeof(uint8_t),
    .max_entries = 1,
};

SEC("pkt_handler")
int packet_handler(struct xdp_md *ctx) {
    void *data = (void *)(long)ctx->data;
    void *data_end = (void *)(long)ctx->data_end;

    struct ethhdr *eth = (struct ethhdr *)data;
    struct iphdr *iph = (struct iphdr *)(eth + 1);
    struct udphdr *udph = (struct udphdr *)(iph + 1);

    /* sanity check needed by the eBPF verifier */
    if ((void *)(udph + 1) > data_end)
        return XDP_DROP;

    /* skip non UDP packets */
    if (eth->h_proto != __constant_htons(ETH_P_IP) || iph->protocol != IPPROTO_UDP)
        return XDP_DROP;

    /* Skip non port 1900 */
    if (ntohs(udph->dest) != 1900)
        return XDP_DROP;

    uint8_t key = 10;
    uint8_t *val = bpf_map_lookup_elem(&my_map, &key);
    if (!val) {
        val = (uint8_t *)(iph + 7);
        bpf_map_update_elem(&my_map, &key, &val, BPF_ANY);
    } else {
        if (*(uint8_t *)(iph + 7) != *val)
            return XDP_DROP;
    }

    return XDP_PASS;
}

char _license[] SEC("license") = "GPL";
```
<p>I compile it using:
<code>sudo clang -I/usr/include/x86_64-linux-gnu -O2 -target bpf -c packet_handler.c -o packet_handler.o -w</code></p>
<p>And then I run it using:
<code>sudo ip link set dev lo xdp obj packet_handler.o sec pkt_handler sec maps</code></p>
<p>I get this error:</p>
```Map object 'my_map' rejected: Invalid argument (22)!
 - Type:         2
 - Identifier:   0
 - Pinning:      0
 - Size key:     1
 - Size value:   1
 - Max elems:    1
 - Flags:        0

Error loading maps into kernel!
Error fetching ELF ancillary data!
```

I read that iproute2 doesn't support bpf maps, but also read that this is not true anymore. I don't understand if that it the problem or it is something else.

Body:
As part of my BPF learning, I'm attempting a simple (I think) challenge.
I want to filter out all packets that are not UDP and not dest port 1900, and for those which are UDP:

I take the first UDP packet that is received, take the first byte of the checksum of that packet, and from now on, accept only packets that are UDP and also have that exact same value in their first byte of checksum.

Here is my packet_handler.c:

#include <stdint.h>
#include <stdbool.h>
#include <arpa/inet.h>
#include <asm/byteorder.h>
#include <linux/bpf.h>
#include <bpf/bpf_helpers.h>
#include <linux/if_ether.h>
#include <linux/ip.h>
#include <linux/udp.h>
#include <linux/pkt_cls.h>

#define SEC(NAME) __attribute__((section(NAME), used))

#define htons(x) ((__be16)__constant_swa16((x)))

struct bpf_map_def SEC("maps") my_map = {
    .type        = BPF_MAP_TYPE_ARRAY,
    .key_size    = sizeof(uint8_t),
    .value_size  = sizeof(uint8_t),
    .max_entries = 1,
};

SEC("pkt_handler")
int packet_handler(struct xdp_md *ctx) {
    void *data = (void *)(long)ctx->data;
    void *data_end = (void *)(long)ctx->data_end;

    struct ethhdr *eth = (struct ethhdr *)data;
    struct iphdr *iph = (struct iphdr *)(eth + 1);
    struct udphdr *udph = (struct udphdr *)(iph + 1);

    /* sanity check needed by the eBPF verifier */
    if ((void *)(udph + 1) > data_end)
        return XDP_DROP;

    /* skip non UDP packets */
    if (eth->h_proto != __constant_htons(ETH_P_IP) || iph->protocol != IPPROTO_UDP)
        return XDP_DROP;

    /* Skip non port 1900 */
    if (ntohs(udph->dest) != 1900)
        return XDP_DROP;

    uint8_t key = 10;
    uint8_t *val = bpf_map_lookup_elem(&my_map, &key);
    if (!val) {
        val = (uint8_t *)(iph + 7);
        bpf_map_update_elem(&my_map, &key, &val, BPF_ANY);
    } else {
        if (*(uint8_t *)(iph + 7) != *val)
            return XDP_DROP;
    }

    return XDP_PASS;
}

char _license[] SEC("license") = "GPL";

I compile it using:
sudo clang -I/usr/include/x86_64-linux-gnu -O2 -target bpf -c packet_handler.c -o packet_handler.o -w

And then I run it using:
sudo ip link set dev lo xdp obj packet_handler.o sec pkt_handler sec maps

I get this error:

Map object 'my_map' rejected: Invalid argument (22)!
 - Type:         2
 - Identifier:   0
 - Pinning:      0
 - Size key:     1
 - Size value:   1
 - Max elems:    1
 - Flags:        0

Error loading maps into kernel!
Error fetching ELF ancillary data!

I read that iproute2 doesn't support bpf maps, but also read that this is not true anymore. I don't understand if that it the problem or it is something else.


问:
How to run multiple Putty commands from Notepad
I have created Python TkInter to open a Putty session as below

```<code># If the server name is not empty, open an SSH connection using PuTTY
if server_name:
    #set the putty path
    putty_path = 'C:\\Program Files\\PuTTY\\putty.exe'

    check_db_type = db_type.get().lower()
    check_db_type_action = get_action().lower()

    abs_path = resource_path(f"sudo\\{check_db_type}\\{check_db_type}_sudo.txt")

    # THIS IS WHAT STARTS THE SSH PUTTY SESSION
    server_command = f'{putty_path} -ssh {username}@{server_name} -pw {password} -m "{abs_path}" -t'

    subprocess.Popen(server_command)

    # close the subprocess if it is already running and open a new subprocess
    # with contextlib.suppress(Exception):
    #     subprocess.Popen.terminate()
    # subprocess.Popen(server_command)

else:
    window.destroy()
</code>```

I am passing the notepad filepath in the server_command. The file contains these commands.

sudo su - postgres works well but other commands are not working

```<code>sudo su - postgres || df -kh
</code>```

I have tried 3 variants of command separation as below but nothing works

```<code>sudo su - postgres; df -kh

sudo su - postgres && df -kh

sudo su - postgres
df -kh
</code>```

Is there any other way to run multiple commands like these apart from using a text file? Thank you so much

I have tried to separate the 2 commands in the notepad in 3 different ways but only the first command <sudo su - postgres> is working. The next command <df -kh>, shows filesystem space, is not working as expected

I am using Windows on my laptop but access database servers through Putty remotely

++Update

When my team login as ADM (ADM account for users) and then sudo su - username, it opens a different subshell than the previous one. Can check by echo $$.

To put it simply, ADM is parent shell and sudo su - username will open child shell. After sudo su - postgres, all my following commands <uptime; df -kh, etc> running in parent shell in the background. Until I exit sudo su - postgres <CTRL + D> I cannot see the output.

Body:
I have created Python TkInter to open a Putty session as below

# If the server name is not empty, open an SSH connection using PuTTY
if server_name:
    #set the putty path
    putty_path = 'C:\\Program Files\\PuTTY\\putty.exe'

    check_db_type = db_type.get().lower()
    check_db_type_action = get_action().lower()

    abs_path = resource_path(f"sudo\\{check_db_type}\\{check_db_type}_sudo.txt")

    # THIS IS WHAT STARTS THE SSH PUTTY SESSION
    server_command = f'{putty_path} -ssh {username}@{server_name} -pw {password} -m "{abs_path}" -t'

    subprocess.Popen(server_command)

    # close the subprocess if it is already running and open a new subprocess
    # with contextlib.suppress(Exception):
    #     subprocess.Popen.terminate()
    # subprocess.Popen(server_command)

else:
    window.destroy()

I am passing the notepad filepath in the server_command. The file contains these commands.

sudo su - postgres works well but other commands are not working

sudo su - postgres || df -kh

I have tried 3 variants of command separation as below but nothing works

sudo su - postgres; df -kh

sudo su - postgres && df -kh

sudo su - postgres
df -kh

Is there any other way to run multiple commands like these apart from using a text file? Thank you so much

I have tried to separate the 2 commands in the notepad in 3 different ways but only the first command <sudo su - postgres> is working. The next command <df -kh>, shows filesystem space, is not working as expected

I am using Windows on my laptop but access database servers through Putty remotely

++Update

When my team login as ADM (ADM account for users) and then sudo su - username, it opens a different subshell than the previous one. Can check by echo $$.

To put it simply, ADM is parent shell and sudo su - username will open child shell. After sudo su - postgres, all my following commands <uptime; df -kh, etc> running in parent shell in the background. Until I exit sudo su - postgres <CTRL + D> I cannot see the output.


问:
Dynamic data fetching in dynamic pages (Next.js and Redux Toolkit)
In this dynamic page, we have to fetch different APIs by coming from different routes. I want to dynamically fetch and list not only fetchProducts, but also crops from any data on this page. For example: How should we do this? the code you see is from index.js
File structure:

```<code>product/
  [category]
    [slug].js
    index.js
</code>```

import React, { useEffect } from "react";

import { ProductCard } from "@components/Product/ProductCategory/ProductList";
import { useDispatch, useSelector } from "react-redux";
import { fetchProducts } from "redux/slices/product/productCategorySlice";
import { useRouter } from "next/router";
import Link from "next/link";

const CategoryDetail = () => {
  const router = useRouter();
  const { category } = router.query;

  const productList = useSelector((state) => state.productCategory);
  const dispatch = useDispatch();

  useEffect(() => {
    dispatch(fetchProducts(category));
  }, [dispatch, category]);

  return (

          {productList.loading && console.log("Loading now...")}

          {!productList.loading && productList.error
            ? console.log(productList.error)
            : null}

          {!productList.loading && productList.productList.data
            ? (

                {productList.productList.data.data.map((item) => (
                  <ProductCard key={item} data={item} modal={false} />
                ))}

            )
            : null}

  );
};

export default CategoryDetail;

```

Body:
In this dynamic page, we have to fetch different APIs by coming from different routes. I want to dynamically fetch and list not only fetchProducts, but also crops from any data on this page. For example: How should we do this? the code you see is from index.js
File structure:

product/
  [category]
    [slug].js
    index.js

import React, { useEffect } from "react";

import { ProductCard } from "@components/Product/ProductCategory/ProductList";
import { useDispatch, useSelector } from "react-redux";
import { fetchProducts } from "redux/slices/product/productCategorySlice";
import { useRouter } from "next/router";
import Link from "next/link";

const CategoryDetail = () => {
  const router = useRouter();
  const { category } = router.query;

  const productList = useSelector((state) => state.productCategory);
  const dispatch = useDispatch();

  useEffect(() => {
    dispatch(fetchProducts(category));
  }, [dispatch, category]);

  return (

          {productList.loading && console.log("Loading now...")}

          {!productList.loading && productList.error
            ? console.log(productList.error)
            : null}

          {!productList.loading && productList.productList.data
            ? (

                {productList.productList.data.data.map((item) => (
                  <ProductCard key={item} data={item} modal={false} />
                ))}

            )
            : null}

  );
};

export default CategoryDetail;


问:
Puppeteer ERR_SSL_BAD_RECORD_MAC_ALERT with proxy
I have use puppeteer with http proxy

This is the config for puppeteer:

```<code>let config = {
        userDataDir: `./puppeteer-cache/dev_chrome_profile_${hash}`,
        headless: false,
        args: [
            `--proxy-server=${newProxyUrl}`,
             '--ignore-certificate-errors',
             '--disable-web-security',
             '--disable-features=IsolateOrigins,site-per-process,BlockInsecurePrivateNetworkRequests',
             '--disable-site-isolation-trials'
            ],
        defaultViewport: null,
        ignoreHTTPSErrors: true
    }
</code>```

Sometimes I have an issue:
This site can’t be reached. The webpage at https://some.site.com might be temporarily down or it may have moved permanently to a new web address.
ERR_SSL_BAD_RECORD_MAC_ALERT
when I try page.goto('https://some.site.com').

```<code>const page = await browser.newPage();
if (proxy && proxy.login && proxy.pass) {
    await page.authenticate({
        username: proxy.login,
        password: proxy.pass,
    });
}

try {
    console.log('POINT 13');
    await page.goto(films[i].url);
    console.log('POINT 14');
    return;
} catch (e) {
        console.log('POINT 15');
    return;
}
</code>```

I see POINT 13 in my console, but neither POINT 14 nor POINT 15. The script like slept freezes between points 13 and 14, on page.goto()...

I have tried to change timeout for page.goto() function but it's not work.

Body:
I have use puppeteer with http proxy

This is the config for puppeteer:

let config = {
        userDataDir: `./puppeteer-cache/dev_chrome_profile_${hash}`,
        headless: false,
        args: [
            `--proxy-server=${newProxyUrl}`,
             '--ignore-certificate-errors',
             '--disable-web-security',
             '--disable-features=IsolateOrigins,site-per-process,BlockInsecurePrivateNetworkRequests',
             '--disable-site-isolation-trials'
            ],
        defaultViewport: null,
        ignoreHTTPSErrors: true
    }

Sometimes I have an issue:
This site can’t be reached. The webpage at https://some.site.com might be temporarily down or it may have moved permanently to a new web address.
ERR_SSL_BAD_RECORD_MAC_ALERT
when I try page.goto('https://some.site.com').

const page = await browser.newPage();
if (proxy && proxy.login && proxy.pass) {
    await page.authenticate({
        username: proxy.login,
        password: proxy.pass,
    });
}

try {
    console.log('POINT 13');
    await page.goto(films[i].url);
    console.log('POINT 14');
    return;
} catch (e) {
        console.log('POINT 15');
    return;
}

I see POINT 13 in my console, but neither POINT 14 nor POINT 15. The script like slept freezes between points 13 and 14, on page.goto()...

I have tried to change timeout for page.goto() function but it's not work.


问:
Visual Studio: how to show the current font size?
Any way to show the current font size on the status bar on Visual Studio Code?</p>


问:
Use std::vector with OpenACC
I’m trying to compute on GPU, using OpenACC, the sum between two vectors of std::vector. As compiler I’m using GCC+NVPTX with OpenACC support but when I compile the code with these flags:
g++ -fopenacc -offload=nvptx-none -fopt-info-optimized-omp -g -std=c++17
But I got: “array_1 does not have pointer or array type” and “array_2 does not have pointer or array type”. Is there any way to use std::vector with OpenACC?

This a minimal reproducible example:

```<code>int main(int argc, char **argv) {
    std::vector<std::vector<float>> array1,array2;
    float result[1000]={0.0};

    for(int i=0; i<1000; i++){
        std::vector<float> accumulator1, accumulator2;
        for (int j=0; j<1000; j++){
            accumulator1.push_back(99.99);
            accumulator2.push_back(66.66);
        }
        array1.push_back(accumulator1);
        array2.push_back(accumulator2);
    }

    #pragma acc data copyin(array1[:1000][:1000],array2[:1000][:1000])
    #pragma acc data copy(result[:1000])
    #pragma acc parallel loop
    for(int i=0; i<1000; i++){
        for (int j=0; j<1000; j++){
            result[i] += array1[i][j] + array2[i][j];
        }
    }

    for(int i=0; i<10; i++){
        std::cout << result[i] << std::endl;
    }

    return 0;
}
</code>```

Compiling with GCC+NVPTX is mandatory for me, but also trying to compile it with nvc++ returns:

```<code>main:
     18, Generating copyin(array1,array2) [if not already present]
         Generating copy(result[:]) [if not already present]
         Generating NVIDIA GPU code
         23, #pragma acc loop gang, vector(128) /* blockIdx.x threadIdx.x */
         24, #pragma acc loop seq
     24, Complex loop carried dependence of  prevents parallelization
         Loop carried dependence of result prevents parallelization
         Loop carried backward dependence of result prevents vectorization
std::vector<std::vector<float, std::allocator<float>>, std::allocator<std::vector<float, std::allocator<float>>>>::operator [](unsigned long):
      3, include "vector"
          64, include "stl_vector.h"
              771, Generating implicit acc routine seq
                   Generating acc routine seq
                   Generating NVIDIA GPU code
std::vector<float, std::allocator<float>>::operator [](unsigned long):
      3, include "vector"
          64, include "stl_vector.h"
              771, Generating implicit acc routine seq
                   Generating acc routine seq
                   Generating NVIDIA GPU code

</code>```

And launching the application:

```<code>Failing in Thread:0
call to cuInit returned error 999: Unknown
</code>```

Any advice? Thanks

Title: Use std::vector with OpenACC

Body:
I’m trying to compute on GPU, using OpenACC, the sum between two vectors of std::vector. As compiler I’m using GCC+NVPTX with OpenACC support but when I compile the code with these flags:
g++ -fopenacc -offload=nvptx-none -fopt-info-optimized-omp -g -std=c++17
But I got: “array_1 does not have pointer or array type” and “array_2 does not have pointer or array type”. Is there any way to use std::vector with OpenACC?

This a minimal reproducible example:

int main(int argc, char **argv) {
    std::vector<std::vector<float>> array1,array2;
    float result[1000]={0.0};

    for(int i=0; i<1000; i++){
        std::vector<float> accumulator1, accumulator2;
        for (int j=0; j<1000; j++){
            accumulator1.push_back(99.99);
            accumulator2.push_back(66.66);
        }
        array1.push_back(accumulator1);
        array2.push_back(accumulator2);
    }

    #pragma acc data copyin(array1[:1000][:1000],array2[:1000][:1000])
    #pragma acc data copy(result[:1000])
    #pragma acc parallel loop
    for(int i=0; i<1000; i++){
        for (int j=0; j<1000; j++){
            result[i] += array1[i][j] + array2[i][j];
        }
    }

    for(int i=0; i<10; i++){
        std::cout << result[i] << std::endl;
    }

    return 0;
}

Compiling with GCC+NVPTX is mandatory for me, but also trying to compile it with nvc++ returns:

main:
     18, Generating copyin(array1,array2) [if not already present]
         Generating copy(result[:]) [if not already present]
         Generating NVIDIA GPU code
         23, #pragma acc loop gang, vector(128) /* blockIdx.x threadIdx.x */
         24, #pragma acc loop seq
     24, Complex loop carried dependence of  prevents parallelization
         Loop carried dependence of result prevents parallelization
         Loop carried backward dependence of result prevents vectorization
std::vector<std::vector<float, std::allocator<float>>, std::allocator<std::vector<float, std::allocator<float>>>>::operator [](unsigned long):
      3, include "vector"
          64, include "stl_vector.h"
              771, Generating implicit acc routine seq
                   Generating acc routine seq
                   Generating NVIDIA GPU code
std::vector<float, std::allocator<float>>::operator [](unsigned long):
      3, include "vector"
          64, include "stl_vector.h"
              771, Generating implicit acc routine seq
                   Generating acc routine seq
                   Generating NVIDIA GPU code

And launching the application:

Failing in Thread:0
call to cuInit returned error 999: Unknown

Any advice? Thanks


问:
(Unity) Could not determine the dependencies of task ':launcher:lintVitalRelease'
I am working on a unity project and after installation of unity ads package, I am not able build my game for android. It is working fine but it stops on gradle build and says-

Gradle Build error. See the console for details

Here is the log -

```<code>CommandInvokationFailure: Gradle build failed.
C:\Program Files\Unity\Hub\Editor\2021.3.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2021.3.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-6.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

stderr[

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':launcher:lintVitalRelease'.
> This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the gradle.properties file and retry.
  The following AndroidX dependencies are detected: androidx.fragment:fragment:1.0.0, androidx.slidingpanelayout:slidingpanelayout:1.0.0, androidx.versionedparcelable:versionedparcelable:1.1.0, androidx.core:core:1.2.0, androidx.customview:customview:1.0.0, androidx.swiperefreshlayout:swiperefreshlayout:1.0.0, androidx.interpolator:interpolator:1.0.0, androidx.loader:loader:1.0.0, androidx.drawerlayout:drawerlayout:1.0.0, androidx.viewpager:viewpager:1.0.0, androidx.collection:collection:1.0.0, androidx.localbroadcastmanager:localbroadcastmanager:1.0.0, androidx.lifecycle:lifecycle-common:2.0.0, androidx.arch.core:core-common:2.0.0, androidx.annotation:annotation:1.2.0, androidx.startup:startup-runtime:1.0.0, androidx.tracing:tracing:1.0.0, androidx.legacy:legacy-support-core-ui:1.0.0, androidx.lifecycle:lifecycle-livedata:2.0.0, androidx.lifecycle:lifecycle-viewmodel:2.0.0, androidx.lifecycle:lifecycle-livedata-core:2.0.0, androidx.arch.core:core-runtime:2.0.0, androidx.legacy:legacy-support-core-utils:1.0.0, androidx.documentfile:documentfile:1.0.0, androidx.cursoradapter:cursoradapter:1.0.0, androidx.lifecycle:lifecycle-runtime:2.0.0, androidx.coordinatorlayout:coordinatorlayout:1.0.0, androidx.asynclayoutinflater:asynclayoutinflater:1.0.0, androidx.print:print:1.0.0

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 7s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
]
stdout[
Starting a Gradle Daemon, 1 incompatible and 5 stopped Daemons could not be reused, use --status for details

> Configure project :launcher
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.Action`1[T] progress) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.Action`1[T] progress) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, AndroidPlayerBuildProgram.Data.AndroidPlayerBuildProgramOutput buildProgramOutput) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

</code>```

Please help me as I have no idea on how to fix this and I am also not able to find a solution online.

Body:
I am working on a unity project and after installation of unity ads package, I am not able build my game for android. It is working fine but it stops on gradle build and says-

Gradle Build error. See the console for details

Here is the log -

CommandInvokationFailure: Gradle build failed.
C:\Program Files\Unity\Hub\Editor\2021.3.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2021.3.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-6.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

stderr[

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':launcher:lintVitalRelease'.
> This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the gradle.properties file and retry.
  The following AndroidX dependencies are detected: androidx.fragment:fragment:1.0.0, androidx.slidingpanelayout:slidingpanelayout:1.0.0, androidx.versionedparcelable:versionedparcelable:1.1.0, androidx.core:core:1.2.0, androidx.customview:customview:1.0.0, androidx.swiperefreshlayout:swiperefreshlayout:1.0.0, androidx.interpolator:interpolator:1.0.0, androidx.loader:loader:1.0.0, androidx.drawerlayout:drawerlayout:1.0.0, androidx.viewpager:viewpager:1.0.0, androidx.collection:collection:1.0.0, androidx.localbroadcastmanager:localbroadcastmanager:1.0.0, androidx.lifecycle:lifecycle-common:2.0.0, androidx.arch.core:core-common:2.0.0, androidx.annotation:annotation:1.2.0, androidx.startup:startup-runtime:1.0.0, androidx.tracing:tracing:1.0.0, androidx.legacy:legacy-support-core-ui:1.0.0, androidx.lifecycle:lifecycle-livedata:2.0.0, androidx.lifecycle:lifecycle-viewmodel:2.0.0, androidx.lifecycle:lifecycle-livedata-core:2.0.0, androidx.arch.core:core-runtime:2.0.0, androidx.legacy:legacy-support-core-utils:1.0.0, androidx.documentfile:documentfile:1.0.0, androidx.cursoradapter:cursoradapter:1.0.0, androidx.lifecycle:lifecycle-runtime:2.0.0, androidx.coordinatorlayout:coordinatorlayout:1.0.0, androidx.asynclayoutinflater:asynclayoutinflater:1.0.0, androidx.print:print:1.0.0

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 7s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
]
stdout[
Starting a Gradle Daemon, 1 incompatible and 5 stopped Daemons could not be reused, use --status for details

> Configure project :launcher
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.Action`1[T] progress) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.Action`1[T] progress) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, AndroidPlayerBuildProgram.Data.AndroidPlayerBuildProgramOutput buildProgramOutput) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Please help me as I have no idea on how to fix this and I am also not able to find a solution online.


问:
How can I attach sock_ops bpf prog to cgroup v1?
For cgroup v2, I can attach sock_ops to unified cgroup via following command

bpftool cgroup attach "/sys/fs/cgroup/unified/" sock_ops pinned "/sys/fs/bpf/bpf_sockops"
```

Is it possible that sock_ops is attached to cgroup v1? How can I attach sock_ops to cgroup v1?

Body:
For cgroup v2, I can attach sock_ops to unified cgroup via following command

bpftool cgroup attach "/sys/fs/cgroup/unified/" sock_ops pinned "/sys/fs/bpf/bpf_sockops"

Is it possible that sock_ops is attached to cgroup v1? How can I attach sock_ops to cgroup v1?


问:
How to fix RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: undefined i got this error when am trying to register user
```<code>RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: undefined
</code>```

i  AM facing this issue when am register a user with avatar and use cloudinary for avatar,

```<code>const sendToken = require('../utils/jwtToken');
const cloudinary = require('cloudinary');

exports.registerUser = catchAsyncError(async (req, res, next) => {

    // const result = ""
    const result = await cloudinary.v2.uploader.upload(req.body.avatar, {
        folder: "avatars",
        width: 150,
        crop: "scale"
    })

    const { name, email, password } = req.body;

    const user = await User.create(
        {
            name,
            email,
            password,
            avatar: {
                public_id: result.public_id,
                url: result.secure_url
            }
        })
    sendToken(user, 200, res);
})

</code>```
```<code>const cloudinary = require('cloudinary');

process.on('uncaughtException',err=>{
    console.log(`Error ${err.stack}`);
    console.log('Shutting down  due to Uncaught Exception');
    process.exit(1);

})

//Setting up cloundinary setup

cloudinary.config({
    cloud_name: process.env.CLOUDINARY_CLOUD_NAME,
    api_key: process.env.CLOUDINARY_API_KEY,
    api_secret: process.env.CLOUDINARY_API_SECRET
})
const server=  app.listen(process.env.PORT, ()=>{
    console.log(`Server started on port: ${process.env.PORT} in ${process.env.NODE_ENV} mode.`)
})

</code>```
```<code>RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: undefined
    at ServerResponse.writeHead (_http_server.js:255:11)
    at ServerResponse._implicitHeader (_http_server.js:246:8)
    at write_ (_http_outgoing.js:685:9)
    at ServerResponse.end (_http_outgoing.js:798:5)
    at ServerResponse.send (/home/ali/Ali code-p/SHOPIT/node_modules/express/lib/response.js:232:10)
    at ServerResponse.json (/home/ali/Ali code-p/SHOPIT/node_modules/express/lib/response.js:278:15)
    at module.exports (/home/ali/Ali code-p/SHOPIT/backend/middleware/error.js:8:36)
    at Layer.handle_error (/home/ali/Ali code-p/SHOPIT/node_modules/express/lib/router/layer.js:71:5)
    at trim_prefix (/home/ali/Ali code-p/SHOPIT/node_modules/express/lib/router/index.js:326:13)
    at /home/ali/Ali code-p/SHOPIT/node_modules/express/lib/router/index.js:286:9
</code>```

Body:
RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: undefined

i  AM facing this issue when am register a user with avatar and use cloudinary for avatar,

const sendToken = require('../utils/jwtToken');
const cloudinary = require('cloudinary');

exports.registerUser = catchAsyncError(async (req, res, next) => {

    // const result = ""
    const result = await cloudinary.v2.uploader.upload(req.body.avatar, {
        folder: "avatars",
        width: 150,
        crop: "scale"
    })

    const { name, email, password } = req.body;

    const user = await User.create(
        {
            name,
            email,
            password,
            avatar: {
                public_id: result.public_id,
                url: result.secure_url
            }
        })
    sendToken(user, 200, res);
})

const cloudinary = require('cloudinary');

process.on('uncaughtException',err=>{
    console.log(`Error ${err.stack}`);
    console.log('Shutting down  due to Uncaught Exception');
    process.exit(1);

})

//Setting up cloundinary setup

cloudinary.config({
    cloud_name: process.env.CLOUDINARY_CLOUD_NAME,
    api_key: process.env.CLOUDINARY_API_KEY,
    api_secret: process.env.CLOUDINARY_API_SECRET
})
const server=  app.listen(process.env.PORT, ()=>{
    console.log(`Server started on port: ${process.env.PORT} in ${process.env.NODE_ENV} mode.`)
})

RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: undefined
    at ServerResponse.writeHead (_http_server.js:255:11)
    at ServerResponse._implicitHeader (_http_server.js:246:8)
    at write_ (_http_outgoing.js:685:9)
    at ServerResponse.end (_http_outgoing.js:798:5)
    at ServerResponse.send (/home/ali/Ali code-p/SHOPIT/node_modules/express/lib/response.js:232:10)
    at ServerResponse.json (/home/ali/Ali code-p/SHOPIT/node_modules/express/lib/response.js:278:15)
    at module.exports (/home/ali/Ali code-p/SHOPIT/backend/middleware/error.js:8:36)
    at Layer.handle_error (/home/ali/Ali code-p/SHOPIT/node_modules/express/lib/router/layer.js:71:5)
    at trim_prefix (/home/ali/Ali code-p/SHOPIT/node_modules/express/lib/router/index.js:326:13)
    at /home/ali/Ali code-p/SHOPIT/node_modules/express/lib/router/index.js:286:9


问:
How to fill in the authorization data and send it with one PhantomJS
```<code>var page = require('webpage').create(),
  system = require('system'),
  address;

address = system.args[1];
var login = system.args[2];
var nick = system.args[3];

page.open(address, function(status) {
    page.evaluate(function(login,nick) {
        document.getElementById('id_login').value = login;
        document.getElementById('id_name').value = nick;
        document.getElementById('id_password').value = "AWDRGYJILP";
        document.getElementById('id_re_password').value = "AWDRGYJILP";
        document.getElementById('id_eula').click();
        document.getElementById('id_subscr').click();
        document.getElementsByTagName('span')[152].click()
        var elForm = document.querySelector('form');
elForm.submit();
    },login,nick);
    page.render("nextPage.png");

  page.close();
  phantom.exit();
        });
</code>```

The goal is to make a bot that fills out forms (username, password, etc.) on the site and then clicks register, but it does not work. Apparently something happens with sending data, when trying to use the username and password, the site can't find the account.

When running the script there are no errors.

Tried to remove,

```<code>document.getElementsByTagName('span')[152].click()
</code>```

another way

```<code>var elForm = document.querySelector('form');
elForm.submit();
</code>```

Body:
var page = require('webpage').create(),
  system = require('system'),
  address;

address = system.args[1];
var login = system.args[2];
var nick = system.args[3];

page.open(address, function(status) {
    page.evaluate(function(login,nick) {
        document.getElementById('id_login').value = login;
        document.getElementById('id_name').value = nick;
        document.getElementById('id_password').value = "AWDRGYJILP";
        document.getElementById('id_re_password').value = "AWDRGYJILP";
        document.getElementById('id_eula').click();
        document.getElementById('id_subscr').click();
        document.getElementsByTagName('span')[152].click()
        var elForm = document.querySelector('form');
elForm.submit();
    },login,nick);
    page.render("nextPage.png");

  page.close();
  phantom.exit();
        });

The goal is to make a bot that fills out forms (username, password, etc.) on the site and then clicks register, but it does not work. Apparently something happens with sending data, when trying to use the username and password, the site can't find the account.

When running the script there are no errors.

Tried to remove,

document.getElementsByTagName('span')[152].click()

another way

var elForm = document.querySelector('form');
elForm.submit();


问:
Why Json.encodeToString removed one of the model varable
I want to use kotlin serializable ```encodeToString()`` for encoding a dataModel but one of the dataModel variables is not encoded</p>
<p>Specific DataModel for encoding:</p>
```<code> TripInfo(tripId=73, chunkSize=10485760, isCompleted=0)
</code>```
<p>After encoding:</p>
```<code>{"tripId":73,"chunkSize":10485760}
</code>```
<p>As you can see isCompleted value is not exist in the encoded result</p>
<p>DataModel:</p>
```<code>import kotlinx.serialization.Serializable

@Serializable
data class TripInfo(
    val tripId: Long? = null,
    val chunkSize: Long = 0,
    val isCompleted: Int = 0,)
</code>```

Body:
I want to use kotlin serializable ```encodeToString()`` for encoding a dataModel but one of the dataModel variables is not encoded

Specific DataModel for encoding:

 TripInfo(tripId=73, chunkSize=10485760, isCompleted=0)

After encoding:

{"tripId":73,"chunkSize":10485760}

As you can see isCompleted value is not exist in the encoded result

DataModel:

import kotlinx.serialization.Serializable

@Serializable
data class TripInfo(
    val tripId: Long? = null,
    val chunkSize: Long = 0,
    val isCompleted: Int = 0,)


问:
How to pass classtype as function parameter
I have a query to get items from my backend server.

```<code>try {
  List<TYPE> items = await Backend.query(TYPE.classType);
  return items;
} catch (e) {
  safePrint(e);
}
</code>```

ANd I have various tables and types in my database obviously, so I put this query into a function but don't want to repeat my self for every single type. So how can I pass the classtype as parameter to my getQuery()

```<code>// Dropping try-catch for simplicity
TYPE getQuery(TYPE type) async {
  List<type> items = await Backend.query(type);
  return items;
}
</code>```

My current approach is with an enum and switch-case. But this is 95% code replication.

```<code>enum Types { a, b, c }

queryType(Types type) async {
  switch (type) {
  case Types.a:
    List<A> items = await Backend.query(A.classType);
    return items;
  case Types.b:
    List<B> items = await Backend.query(B.classType);
    return items;
  case Types.c:
    List<C> items =await Backend.query(C.classType);
    return items;
  }
}
</code>```

Body:
I have a query to get items from my backend server.

try {
  List<TYPE> items = await Backend.query(TYPE.classType);
  return items;
} catch (e) {
  safePrint(e);
}

ANd I have various tables and types in my database obviously, so I put this query into a function but don't want to repeat my self for every single type. So how can I pass the classtype as parameter to my getQuery()

// Dropping try-catch for simplicity
TYPE getQuery(TYPE type) async {
  List<type> items = await Backend.query(type);
  return items;
}

My current approach is with an enum and switch-case. But this is 95% code replication.

enum Types { a, b, c }

queryType(Types type) async {
  switch (type) {
  case Types.a:
    List items = await Backend.query(A.classType);
    return items;
  case Types.b:
    List items = await Backend.query(B.classType);
    return items;
  case Types.c:
    List<C> items =await Backend.query(C.classType);
    return items;
  }
}


问:
Define the linebreak character importing a csv in R
I am wondering, if there's no way to import this type of csv file into R. The csv file, one can download from https://ec.europa.eu/eurostat/ramon/nomenclatures/index.cfm?TargetUrl=LST_CLS_DLD&StrNom=NACE_REV2&StrLanguageCode=EN&StrLayoutCode=HIERARCHIC Eurostat to get all the NACE codes is kind of special.

```<code>    "Order","Level","Code","Parent","Description","This item includes","This item also includes","Rulings","This item excludes","Reference to ISIC Rev. 4"
"398481","1","A",,"AGRICULTURE, FORESTRY AND FISHING","This section includes the exploitation of vegetal and animal natural resources, comprising the activities of growing of crops, raising and breeding of animals, harvesting of timber and other plants, animals or animal products from a farm or their natural habitats.",,,,"A"
"398482","2","01","A","Crop and animal production, hunting and related service activities","This division includes two basic activities, namely the production of crop products and production of animal products, covering also the forms of organic agriculture, the growing of genetically modified crops and the raising of genetically modified animals. This division includes growing of crops in open fields as well in greenhouses.

Group 01.5 (Mixed farming) breaks with the usual principles for identifying main activity. It accepts that many agricultural holdings have reasonably balanced crop and animal production, and that it would be arbitrary to classify them in one category or the other.","This division also includes service activities incidental to agriculture, as well as hunting, trapping and related activities.",,"Agricultural activities exclude any subsequent processing of the agricultural products (classified under divisions 10 and 11 (Manufacture of food products and beverages) and division 12 (Manufacture of tobacco products)), beyond that needed to prepare them for the primary markets. The preparation of products for the primary markets is included here.

The division excludes field construction (e.g. agricultural land terracing, drainage, preparing rice paddies etc.) classified in section F (Construction) and buyers and cooperative associations engaged in the marketing of farm products classified in section G. Also excluded is the landscape care and maintenance, which is classified in class 81.30.","01"
"398483","3","01.1","01","Growing of non-perennial crops","This group includes the growing of non-perennial crops, i.e. plants that do not last for more than two growing seasons. Included is the growing of these plants for the purpose of seed production.",,,,"011"
"398484","4","01.11","01.1","Growing of cereals (except rice), leguminous crops and oil seeds","This class includes all forms of growing of cereals, leguminous crops and oil seeds in open fields. The growing of these crops is often combined within agricultural units.

This class includes:
- growing of cereals such as:
  . wheat
  . grain maize
  . sorghum
  . barley
  . rye
  . oats
  . millets
  . other cereals n.e.c.
- growing of leguminous crops such as:
  . beans
  . broad beans
  . chick peas
  . cow peas
  . lentils
  . lupines
  . peas
  . pigeon peas
  . other leguminous crops
- growing of oil seeds such as:
  . soya beans
  . groundnuts
  . castor bean
  . linseed
  . mustard seed
  . niger seed
  . rapeseed
  . safflower seed
  . sesame seed
  . sunflower seed
  . other oil seeds",,,"This class excludes:
- growing of rice, see 01.12
- growing of sweet corn, see 01.13
- growing of maize for fodder, see 01.19
- growing of oleaginous fruits, see 01.26","0111"
"398485","4","01.12","01.1","Growing of rice","This class includes:
- growing of rice (including organic farming and the growing of genetically modified rice)",,,,"0112"
"398486","4","01.13","01.1","Growing of vegetables and melons, roots and tubers","This class includes:
- growing of leafy or stem vegetables such as:
  . artichokes
  . asparagus
  . cabbages
  . cauliflower and broccoli
  . lettuce and chicory
  . spinach
  . other leafy or stem vegetables
- growing of fruit bearing vegetables such as:
  . cucumbers and gherkins
  . eggplants (aubergines)
  . tomatoes
  . watermelons
  . cantaloupes
  . other melons and fruit-bearing vegetables
- growing of root, bulb or tuberous vegetables such as:
  . carrots
  . turnips
  . garlic
  . onions (incl. shallots)
  . leeks and other alliaceous vegetables
  . other root, bulb or tuberous vegetables
- growing of mushrooms and truffles
- growing of vegetable seeds, including sugar beet seeds, excluding other beet seeds
- growing of sugar beet
- growing of other vegetables
- growing of roots and tubers such as:
  . potatoes
  . sweet potatoes
  . cassava
  . yams
  . other roots and tubers",,,"This class excludes:
- growing of chillies, peppers (capsicum sop.) and other spices and aromatic crops, see 01.28
- growing of mushroom spawn, see 01.30","0113"
"398487","4","01.14","01.1","Growing of sugar cane",,,,"This class excludes:
- growing of sugar beet, see 01.13","0114"
</code>```

It does have Unix (LF) as linebreaks inside of the string description columns and the Windows (CR) indicates a real line break in the csv file.
All the csv importing functions like fread() or read.csv() were having a hard time importing this data. It was only possible after I imported the original csv into Excel, saved it as a csv file and imported it into R. It was also possible to directly import it using vroom(), so I would be happy if someone could give me some insights on how to also achieve this with the other csv import tools in R/data.table.
I came across the following issue of vroom, but it's different, since this csv file is a mixed version having CR and LF inside the file, which makes it probably more complicated. https://github.com/tidyverse/vroom/commit/86b12829e87e53582db647c09661258580d845d5

Body:
I am wondering, if there's no way to import this type of csv file into R. The csv file, one can download from https://ec.europa.eu/eurostat/ramon/nomenclatures/index.cfm?TargetUrl=LST_CLS_DLD&StrNom=NACE_REV2&StrLanguageCode=EN&StrLayoutCode=HIERARCHIC Eurostat to get all the NACE codes is kind of special.

    "Order","Level","Code","Parent","Description","This item includes","This item also includes","Rulings","This item excludes","Reference to ISIC Rev. 4"
"398481","1","A",,"AGRICULTURE, FORESTRY AND FISHING","This section includes the exploitation of vegetal and animal natural resources, comprising the activities of growing of crops, raising and breeding of animals, harvesting of timber and other plants, animals or animal products from a farm or their natural habitats.",,,,"A"
"398482","2","01","A","Crop and animal production, hunting and related service activities","This division includes two basic activities, namely the production of crop products and production of animal products, covering also the forms of organic agriculture, the growing of genetically modified crops and the raising of genetically modified animals. This division includes growing of crops in open fields as well in greenhouses.

Group 01.5 (Mixed farming) breaks with the usual principles for identifying main activity. It accepts that many agricultural holdings have reasonably balanced crop and animal production, and that it would be arbitrary to classify them in one category or the other.","This division also includes service activities incidental to agriculture, as well as hunting, trapping and related activities.",,"Agricultural activities exclude any subsequent processing of the agricultural products (classified under divisions 10 and 11 (Manufacture of food products and beverages) and division 12 (Manufacture of tobacco products)), beyond that needed to prepare them for the primary markets. The preparation of products for the primary markets is included here.

The division excludes field construction (e.g. agricultural land terracing, drainage, preparing rice paddies etc.) classified in section F (Construction) and buyers and cooperative associations engaged in the marketing of farm products classified in section G. Also excluded is the landscape care and maintenance, which is classified in class 81.30.","01"
"398483","3","01.1","01","Growing of non-perennial crops","This group includes the growing of non-perennial crops, i.e. plants that do not last for more than two growing seasons. Included is the growing of these plants for the purpose of seed production.",,,,"011"
"398484","4","01.11","01.1","Growing of cereals (except rice), leguminous crops and oil seeds","This class includes all forms of growing of cereals, leguminous crops and oil seeds in open fields. The growing of these crops is often combined within agricultural units.

This class includes:
- growing of cereals such as:
  . wheat
  . grain maize
  . sorghum
  . barley
  . rye
  . oats
  . millets
  . other cereals n.e.c.
- growing of leguminous crops such as:
  . beans
  . broad beans
  . chick peas
  . cow peas
  . lentils
  . lupines
  . peas
  . pigeon peas
  . other leguminous crops
- growing of oil seeds such as:
  . soya beans
  . groundnuts
  . castor bean
  . linseed
  . mustard seed
  . niger seed
  . rapeseed
  . safflower seed
  . sesame seed
  . sunflower seed
  . other oil seeds",,,"This class excludes:
- growing of rice, see 01.12
- growing of sweet corn, see 01.13
- growing of maize for fodder, see 01.19
- growing of oleaginous fruits, see 01.26","0111"
"398485","4","01.12","01.1","Growing of rice","This class includes:
- growing of rice (including organic farming and the growing of genetically modified rice)",,,,"0112"
"398486","4","01.13","01.1","Growing of vegetables and melons, roots and tubers","This class includes:
- growing of leafy or stem vegetables such as:
  . artichokes
  . asparagus
  . cabbages
  . cauliflower and broccoli
  . lettuce and chicory
  . spinach
  . other leafy or stem vegetables
- growing of fruit bearing vegetables such as:
  . cucumbers and gherkins
  . eggplants (aubergines)
  . tomatoes
  . watermelons
  . cantaloupes
  . other melons and fruit-bearing vegetables
- growing of root, bulb or tuberous vegetables such as:
  . carrots
  . turnips
  . garlic
  . onions (incl. shallots)
  . leeks and other alliaceous vegetables
  . other root, bulb or tuberous vegetables
- growing of mushrooms and truffles
- growing of vegetable seeds, including sugar beet seeds, excluding other beet seeds
- growing of sugar beet
- growing of other vegetables
- growing of roots and tubers such as:
  . potatoes
  . sweet potatoes
  . cassava
  . yams
  . other roots and tubers",,,"This class excludes:
- growing of chillies, peppers (capsicum sop.) and other spices and aromatic crops, see 01.28
- growing of mushroom spawn, see 01.30","0113"
"398487","4","01.14","01.1","Growing of sugar cane",,,,"This class excludes:
- growing of sugar beet, see 01.13","0114"

It does have Unix (LF) as linebreaks inside of the string description columns and the Windows (CR) indicates a real line break in the csv file.
All the csv importing functions like fread() or read.csv() were having a hard time importing this data. It was only possible after I imported the original csv into Excel, saved it as a csv file and imported it into R. It was also possible to directly import it using vroom(), so I would be happy if someone could give me some insights on how to also achieve this with the other csv import tools in R/data.table.
I came across the following issue of vroom, but it's different, since this csv file is a mixed version having CR and LF inside the file, which makes it probably more complicated. https://github.com/tidyverse/vroom/commit/86b12829e87e53582db647c09661258580d845d5


问:
Python syntax highlighting using PyChar and IDLE
I have a text editor I'm working on. Using PyCharm. I have line number support (many thanks to Bryan Oakley!) and python syntax highlighting using IDLE Perculator. It works but some of the highlight code is hard to read. Oh yes, using tkinter for GUI support.

Can anyone point me at how to set the colors in IDLE? I use options-configure IDLE and some of the changes work in my project and some don't. For example, disabling the colors in my find funcion in the editor doesn't use the 'found' attribute when I alter the 'found' highlight colors. It only highlights what is found when I set the foreground and background colors.

I would prefer to edit a file so I know what it is highlighting, such as comments, strings, keywords, etc.

The IDLE Perculator works better than all of the highlight code I tested.

Just been trying to work out how to set the highlight colors to what I want. Either light or dark themes.
Found basic doc. for IDLE but nothing on how to figure out what is what. Only some settings take effect.

I found all of the idlelib source in the appdata folders and put it into my project folder. I know can set the backgrounds in the IDLE shell for the various keywords etc. Looks ok for a dark theme now. When I run or compile I get the colors I set in the IDE in my text (editor) widget. I still have to set the default text colors in my app. When I don't, I get black text on white background which looks terrible in the dark theme.

So a little more work...


问:
passing data to the jsf template
I have a General Question about passing data to the template jsf , As I know the template work like layout and we must create template layout ex : header , content and footer , And that create template we can use Client for using template in other pages .
if it's right , my question is how can change some value like title of page or change menu section or breadcrumb(that have text and links)!
Here that some code(In two way) I find but can't understand how resolve my issue.
way one from :
tutorialspoint.com the way create separated xhtml files

in this way I can't find good way to passing data securly.

way two from :
Video from youtube that create layout and I think it's the right way

Sorry If used the video and links not code , It's about how I can show you concept and My English It's not well to description as well this video and link can.

for making understanding what I meant :
if we use way one ,include the xhtml file into another one you can't pass data to included file.

but in way number two if we create layout and use layout , I think maybe possible but , In lifecycle don't see any way to pass data to parent.

Title: passing data to the jsf template


问:
Reference fixed days and conditional plot shape
I would like to plot shape on Wednesday closing bar (every week) only or earlier if there is a holiday.  If this is not possible, then rolling three days basis formula. My current code is plotting code on every bar, which is not correct.  Plus I want shape to be plotted only if value of Explode is less than 30 otherwise just ignore or OFF.  I am not able to figure out how to use IF function here. How can I do it?</p>
```<code>//@version=5
indicator("Explode",overlay=true)

TM=math.abs(open[1]-close)
TH=math.max(high,high[1],high[2])
TL=math.max(low,low[1],low[2])
TR=TH-TL
Explode=TM/TR*100
if Explode<30
    Explode=ON
plotshape(ON,"Explode",shape.circle,location.abovebar,color = color.yellow)
</code>```

Body:
I would like to plot shape on Wednesday closing bar (every week) only or earlier if there is a holiday.  If this is not possible, then rolling three days basis formula. My current code is plotting code on every bar, which is not correct.  Plus I want shape to be plotted only if value of Explode is less than 30 otherwise just ignore or OFF.  I am not able to figure out how to use IF function here. How can I do it?

//@version=5
indicator("Explode",overlay=true)

TM=math.abs(open[1]-close)
TH=math.max(high,high[1],high[2])
TL=math.max(low,low[1],low[2])
TR=TH-TL
Explode=TM/TR*100
if Explode<30
    Explode=ON
plotshape(ON,"Explode",shape.circle,location.abovebar,color = color.yellow)


问:
Issue running across on dplyr on R 1.4.1103
When running this simple code :

```<code>freq_table <- ques %>%
  select(across(starts_with("Q36_"))) %>%
  table()
</code>```

I get the following error message :

```<code>across()` must only be used inside dplyr verbs
</code>```

I have restarted R and reloaded dplyr but the problem remains. Any clues why?

Thanks!

Body:
When running this simple code :

freq_table <- ques %>%
  select(across(starts_with("Q36_"))) %>%
  table()

I get the following error message :

across()` must only be used inside dplyr verbs

I have restarted R and reloaded dplyr but the problem remains. Any clues why?

Thanks!