问:
c# dotnet: why websocket unable to get local issuer certificate?
I deployed moon2 helm chart on my Kuberntes cluster, i deployed cert-manager with letsencrypt  .

When i launch my automated test (wrote with c# language with playwright framework), i got the following error:

```<code>Microsoft.Playwright.PlaywrightException : WebSocket error: unable to get local issuer certificate
=========================== logs ===========================
<ws connecting> wss://somefqdn.com/playwright/chromium/playwright-1.27.1?enableVNC=true&enableVideo=true&headless=false&videoName=Creation_Compte_Cks_c_Card_Block_134506_UTC.mp4&name=Creation_Compte_Cks_c_Card_Block_134506_UTC&sessionTimeout=10m
<ws error> error unable to get local issuer certificate
<ws connect error> wss://somefqdn.com/playwright/chromium/playwright-1.27.1?enableVNC=true&enableVideo=true&headless=false&videoName=Creation_Compte_Cks_c_Card_Block_134506_UTC.mp4&name=Creation_Compte_Cks_c_Card_Block_134506_UTC&sessionTimeout=10m unable to get local issuer certificate
<ws disconnected> wss://somefqdn.com/playwright/chromium/playwright-1.27.1?enableVNC=true&enableVideo=true&headless=false&videoName=Creation_Compte_Cks_c_Card_Block_134506_UTC.mp4&name=Creation_Compte_Cks_c_Card_Block_134506_UTC&sessionTimeout=10m code=1006 reason=
</code>```

PS: with JavaScript + Playwright ==> it works fine

Any idea please on how to fix the issue ?

Body:
I deployed moon2 helm chart on my Kuberntes cluster, i deployed cert-manager with letsencrypt  .

When i launch my automated test (wrote with c# language with playwright framework), i got the following error:

Microsoft.Playwright.PlaywrightException : WebSocket error: unable to get local issuer certificate
=========================== logs ===========================
<ws connecting> wss://somefqdn.com/playwright/chromium/playwright-1.27.1?enableVNC=true&enableVideo=true&headless=false&videoName=Creation_Compte_Cks_c_Card_Block_134506_UTC.mp4&name=Creation_Compte_Cks_c_Card_Block_134506_UTC&sessionTimeout=10m
<ws error> error unable to get local issuer certificate
<ws connect error> wss://somefqdn.com/playwright/chromium/playwright-1.27.1?enableVNC=true&enableVideo=true&headless=false&videoName=Creation_Compte_Cks_c_Card_Block_134506_UTC.mp4&name=Creation_Compte_Cks_c_Card_Block_134506_UTC&sessionTimeout=10m unable to get local issuer certificate
<ws disconnected> wss://somefqdn.com/playwright/chromium/playwright-1.27.1?enableVNC=true&enableVideo=true&headless=false&videoName=Creation_Compte_Cks_c_Card_Block_134506_UTC.mp4&name=Creation_Compte_Cks_c_Card_Block_134506_UTC&sessionTimeout=10m code=1006 reason=

PS: with JavaScript + Playwright ==> it works fine

Any idea please on how to fix the issue ?


来源: stackexchange

问:
How to can Placemark animation in react-yandex-maps library?
I use https://www.npmjs.com/package/react-yandex-maps library in react typescript. But I can not find animation place mark.

Can you guide to animation place mark ?

ContentLicense: CC BY-SA 4.0


问:
React Testing Library: radio button clicked doesn't set checked on true after fireEvent.click
I want to test a RadioGroup Component, initially, the first option is selected, this is tested and it seems to work fine.

Afterwards, the second option is clicked, the desired behaviour now would be to verify the second option if it has property checked set on true but it's not working.

```<code>  it('should select second option', () => {
    renderWithProviders(
      <RadioButtonGroup
        options={options}
        label={label}
        onChange={onChange}
        selectedValue={options[0].value}
      />
    );

    const testId = options[1].value.replace(/ +/g, '-');
    const secondOption = screen.getByTestId(testId);
    expect(secondOption).toBeInTheDocument();
    expect(secondOption).toHaveProperty('checked', false); // this works fine

    fireEvent.click(secondOption);
    expect(secondOption).toHaveProperty('checked', true); // this is still false
  });
</code>```

Body:
I want to test a RadioGroup Component, initially, the first option is selected, this is tested and it seems to work fine.

Afterwards, the second option is clicked, the desired behaviour now would be to verify the second option if it has property checked set on true but it's not working.

  it('should select second option', () => {
    renderWithProviders(
      <RadioButtonGroup
        options={options}
        label={label}
        onChange={onChange}
        selectedValue={options[0].value}
      />
    );

    const testId = options[1].value.replace(/ +/g, '-');
    const secondOption = screen.getByTestId(testId);
    expect(secondOption).toBeInTheDocument();
    expect(secondOption).toHaveProperty('checked', false); // this works fine

    fireEvent.click(secondOption);
    expect(secondOption).toHaveProperty('checked', true); // this is still false
  });


问:
Oauth2 IncorrectResultSizeDataAccessException, Incorrect result size: expected 1, actual 2
```<code>package com.tristargroup.net.oauth.security;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer;
import org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer;
import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer;
import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerSecurityConfigurer;
import org.springframework.security.oauth2.provider.token.AuthorizationServerTokenServices;
import org.springframework.security.oauth2.provider.token.DefaultTokenServices;
import org.springframework.security.oauth2.provider.token.TokenEnhancer;
import org.springframework.security.oauth2.provider.token.TokenStore;

import javax.sql.DataSource;

@Configuration
@EnableAuthorizationServer
public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdapter
{

    @Value("${settings.jdbc.driverClassName}")
    private String driverClassName;

    @Value("${settings.jdbc.url}")
    private String jdbcUrl;

    @Value("${settings.jdbc.username}")
    private String jdbcUser;

    @Value("${settings.jdbc.password}")
    private String jdbcPassword;

    @Autowired
    TokenStore tokenStore;

    @Autowired
    AuthenticationManager authenticationManager;

    @Autowired
    UserDetailsService userDetailsService;

    @Override
    public void configure(AuthorizationServerSecurityConfigurer security)
    {
        security.checkTokenAccess("permitAll()").tokenKeyAccess("permitAll()");
    }

    @Override
    public void configure(AuthorizationServerEndpointsConfigurer endpoints)
    {
        endpoints.tokenStore(tokenStore);
        endpoints.tokenEnhancer(tokenEnhancer());
        endpoints.authenticationManager(authenticationManager);
        endpoints.userDetailsService(userDetailsService);
    }

    @Override
    public void configure(ClientDetailsServiceConfigurer clients) throws Exception
    {
        clients.jdbc(dataSource());
    }

    @Bean
    public DataSource dataSource()
    {
        DriverManagerDataSource dataSource = new DriverManagerDataSource();
        dataSource.setDriverClassName(driverClassName);
        dataSource.setUrl(jdbcUrl);
        dataSource.setUsername(jdbcUser);
        dataSource.setPassword(jdbcPassword);
        return dataSource;
    }

    @Bean
    public TokenEnhancer tokenEnhancer()
    {
        return new CustomTokenEnhancer();
    }

    @Bean
    @Primary
    public AuthorizationServerTokenServices tokenServices()
    {
        DefaultTokenServices tokenServices = new DefaultTokenServices();
        tokenServices.setTokenEnhancer(tokenEnhancer());
        return tokenServices;
    }

}
</code>```

here my code i am geeting when i hit the api to get the access token and refresh token

OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("grant_type","password")
.addFormDataPart("username","pprabhu")
.addFormDataPart("password","Workingphrase2use!")
.build();
Request request = new Request.Builder()
.url("http://localhost:8082/auth-server/oauth/token")
.method("POST", body)
.addHeader("Authorization", "Basic aWZvcm1zOnNlY3JldA==")
.build();
Response response = client.newCall(request).execute();

Body:
package com.tristargroup.net.oauth.security;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer;
import org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer;
import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer;
import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerSecurityConfigurer;
import org.springframework.security.oauth2.provider.token.AuthorizationServerTokenServices;
import org.springframework.security.oauth2.provider.token.DefaultTokenServices;
import org.springframework.security.oauth2.provider.token.TokenEnhancer;
import org.springframework.security.oauth2.provider.token.TokenStore;

import javax.sql.DataSource;

@Configuration
@EnableAuthorizationServer
public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdapter
{

    @Value("${settings.jdbc.driverClassName}")
    private String driverClassName;

    @Value("${settings.jdbc.url}")
    private String jdbcUrl;

    @Value("${settings.jdbc.username}")
    private String jdbcUser;

    @Value("${settings.jdbc.password}")
    private String jdbcPassword;

    @Autowired
    TokenStore tokenStore;

    @Autowired
    AuthenticationManager authenticationManager;

    @Autowired
    UserDetailsService userDetailsService;

    @Override
    public void configure(AuthorizationServerSecurityConfigurer security)
    {
        security.checkTokenAccess("permitAll()").tokenKeyAccess("permitAll()");
    }

    @Override
    public void configure(AuthorizationServerEndpointsConfigurer endpoints)
    {
        endpoints.tokenStore(tokenStore);
        endpoints.tokenEnhancer(tokenEnhancer());
        endpoints.authenticationManager(authenticationManager);
        endpoints.userDetailsService(userDetailsService);
    }

    @Override
    public void configure(ClientDetailsServiceConfigurer clients) throws Exception
    {
        clients.jdbc(dataSource());
    }

    @Bean
    public DataSource dataSource()
    {
        DriverManagerDataSource dataSource = new DriverManagerDataSource();
        dataSource.setDriverClassName(driverClassName);
        dataSource.setUrl(jdbcUrl);
        dataSource.setUsername(jdbcUser);
        dataSource.setPassword(jdbcPassword);
        return dataSource;
    }

    @Bean
    public TokenEnhancer tokenEnhancer()
    {
        return new CustomTokenEnhancer();
    }

    @Bean
    @Primary
    public AuthorizationServerTokenServices tokenServices()
    {
        DefaultTokenServices tokenServices = new DefaultTokenServices();
        tokenServices.setTokenEnhancer(tokenEnhancer());
        return tokenServices;
    }

}

here my code i am geeting when i hit the api to get the access token and refresh token

OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("grant_type","password")
.addFormDataPart("username","pprabhu")
.addFormDataPart("password","Workingphrase2use!")
.build();
Request request = new Request.Builder()
.url("http://localhost:8082/auth-server/oauth/token")
.method("POST", body)
.addHeader("Authorization", "Basic aWZvcm1zOnNlY3JldA==")
.build();
Response response = client.newCall(request).execute();


问:
How do I use ".then function" after I Customized my UIKit Modal while using in Angular Service
So I customized my code as per my need and now i couldn't use "then(function(){}" like before ,So below is the code i wrote to customize UIKit Modal

So Is there anyway i could customize UiKit modal and use "then" function

export class ToasterConfirmService{
constructor() {}

```<code>confirm(msg: string): void{
    localStorage.setItem('YesNo','open');

    var modal=uikit.modal.confirm(msg).dialog;

    if(modal && modal.$el)
    {
        if(modal.$el.firstElementChild)
        {
            modal.$el.firstElementChild.classList.add(centerAlign);
            modal.$el.firstElementChild.style.fontSize = mediumFontSize;
            modal.$el.firstElementChild.style.background = notificationsBackgroundColorCode;
            modal.$el.firstElementChild.style.color = styleWhiteColor;
        }

        if(modal.$el.getElementsByClassName(UIkitModalFooter) && modal.$el.getElementsByClassName(UIkitModalFooter).length \> 0)
        {
            modal.$el.getElementsByClassName(UIkitModalFooter)\[0\].classList.remove(textAlignRight);
            modal.$el.getElementsByClassName(UIkitModalFooter)\[0\].classList.add(textAlignCenter);
            modal.$el.getElementsByClassName(UIkitModalFooter)\[0\].style.background = notificationsBackgroundColorCode;
            modal.$el.getElementsByClassName(UIkitModalFooter)\[0\].style.color = styleWhiteColor;
        }
        if(modal.$el.getElementsByClassName(UIkitModalClose) && modal.$el.getElementsByClassName(UIkitModalClose).length \> 0)
        {
            modal.$el.getElementsByClassName(UIkitModalClose)\[0\].style.fontSize = mediumFontSize;
            modal.$el.getElementsByClassName(UIkitModalClose)\[0\].style.background = styleWhiteColor;
            modal.$el.getElementsByClassName(UIkitModalClose)\[0\].style.color = styleBlackColor;
            modal.$el.getElementsByClassName(UIkitModalClose)\[0\].classList.add(centerAlign);
            modal.$el.getElementsByClassName(UIkitModalClose)\[0\].innerHTML='No';
        }
        if(modal.$el.getElementsByClassName(UIKitConfirmOK) && modal.$el.getElementsByClassName(UIKitConfirmOK).length \> 0)
        {
            modal.$el.getElementsByClassName(UIKitConfirmOK)\[0\].style.fontSize = mediumFontSize;
            modal.$el.getElementsByClassName(UIKitConfirmOK)\[0\].style.background = styleWhiteColor;
            modal.$el.getElementsByClassName(UIKitConfirmOK)\[0\].style.color = styleBlackColor;
            modal.$el.getElementsByClassName(UIKitConfirmOK)\[0\].classList.add(centerAlign);
            modal.$el.getElementsByClassName(UIKitConfirmOK)\[0\].innerHTML='Yes';
        }

    }

}
</code>```

}

Body:
So I customized my code as per my need and now i couldn't use "then(function(){}" like before ,So below is the code i wrote to customize UIKit Modal

So Is there anyway i could customize UiKit modal and use "then" function

export class ToasterConfirmService{
constructor() {}

confirm(msg: string): void{
    localStorage.setItem('YesNo','open');

    var modal=uikit.modal.confirm(msg).dialog;

    if(modal && modal.$el)
    {
        if(modal.$el.firstElementChild)
        {
            modal.$el.firstElementChild.classList.add(centerAlign);
            modal.$el.firstElementChild.style.fontSize = mediumFontSize;
            modal.$el.firstElementChild.style.background = notificationsBackgroundColorCode;
            modal.$el.firstElementChild.style.color = styleWhiteColor;
        }

        if(modal.$el.getElementsByClassName(UIkitModalFooter) && modal.$el.getElementsByClassName(UIkitModalFooter).length \> 0)
        {
            modal.$el.getElementsByClassName(UIkitModalFooter)\[0\].classList.remove(textAlignRight);
            modal.$el.getElementsByClassName(UIkitModalFooter)\[0\].classList.add(textAlignCenter);
            modal.$el.getElementsByClassName(UIkitModalFooter)\[0\].style.background = notificationsBackgroundColorCode;
            modal.$el.getElementsByClassName(UIkitModalFooter)\[0\].style.color = styleWhiteColor;
        }
        if(modal.$el.getElementsByClassName(UIkitModalClose) && modal.$el.getElementsByClassName(UIkitModalClose).length \> 0)
        {
            modal.$el.getElementsByClassName(UIkitModalClose)\[0\].style.fontSize = mediumFontSize;
            modal.$el.getElementsByClassName(UIkitModalClose)\[0\].style.background = styleWhiteColor;
            modal.$el.getElementsByClassName(UIkitModalClose)\[0\].style.color = styleBlackColor;
            modal.$el.getElementsByClassName(UIkitModalClose)\[0\].classList.add(centerAlign);
            modal.$el.getElementsByClassName(UIkitModalClose)\[0\].innerHTML='No';
        }
        if(modal.$el.getElementsByClassName(UIKitConfirmOK) && modal.$el.getElementsByClassName(UIKitConfirmOK).length \> 0)
        {
            modal.$el.getElementsByClassName(UIKitConfirmOK)\[0\].style.fontSize = mediumFontSize;
            modal.$el.getElementsByClassName(UIKitConfirmOK)\[0\].style.background = styleWhiteColor;
            modal.$el.getElementsByClassName(UIKitConfirmOK)\[0\].style.color = styleBlackColor;
            modal.$el.getElementsByClassName(UIKitConfirmOK)\[0\].classList.add(centerAlign);
            modal.$el.getElementsByClassName(UIKitConfirmOK)\[0\].innerHTML='Yes';
        }

    }

}

}


问:
When starting Docker containers, host machine loses internet connection

Problem:

When I start several Docker containers from a docker-compose.yml file, the internet connection on my host machine is not working anymore. As soon as I shut down all Docker containers, the internet connection on my machine is immediately restored.

This only happens if the number of containers I am starting is above 32.

Procedure:

The service I want to start is specified in a docker-compose.yml file:

```<code>version: "3.8"

services:
  agent_1:
  ....
</code>```

I am starting the containers by following command (using 40 as an arbitrary number of containers):

```<code>docker-compose up --build --scale agent_1=40 agent_1
</code>```

Solution approaches:

I tried the approaches listed below, but so far, none of them worked for me.

#1: Specifying a IPv4 subnet for the Docker containers

I created a network by following command:

```<code>docker network create --driver bridge agent_network --subnet 10.10.1.0/24
</code>```

Hence, I edited the docker-compose.yml file to use the custom network:

```<code>version: "3.8"

networks:
  default:
    external: true
    name: agent_network

services:
  agent:
    ...
</code>```

#2: Creating a IPv6 Docker network

First, I edited the /etc/docker/daemon.json file in order to enable IPv6:

```<code>{
    "ipv6": true,
    "fixed-cidr-v6": "2a01:4f8:a:b::/64",
 }
</code>```

Then, I created a network, analogously as before:

```<code>docker network create --driver bridge --ipv6 --subnet=2a01:4f8:a:b:c::/80 agent_network
</code>```

As the network has the same name as in approach #1, the docker-compose.yml file was the same.

#3: Creating a MacVLAN Docker network:

In this approach, I configured the docker-compose.yml file to use a Docker network based on the macvlan driver and connecting to my local ethernet adapter (enp34s0)

```<code>version: "3.8"

networks:
  dockervlan:
    name: dockervlan
    driver: macvlan
    driver_opts:
      parent: enp34s0
    ipam:
      config:
        - subnet: "10.10.2.0/24"
          gateway: "10.10.2.1"

services:

  agent_1:
    networks:
      - dockervlan
    ...
</code>```

System specifications:

Host machine OS: Ubuntu 22.04.1 LTS

Host machine IP: 192.168.0.34

Docker: 20.10.22

docker-compose: 1.29.2

I also tried to use a remote server running a VM (Ubuntu 20.04.5 LTS) which however led to the same behaviour.

Further, I made sure there are no conflicts regarding the IP ranges on either system.

I would greatly appreciate any ideas or alternative approaches regarding this problem.

Body:
Problem:

When I start several Docker containers from a docker-compose.yml file, the internet connection on my host machine is not working anymore. As soon as I shut down all Docker containers, the internet connection on my machine is immediately restored.

This only happens if the number of containers I am starting is above 32.

Procedure:

The service I want to start is specified in a docker-compose.yml file:

version: "3.8"

services:
  agent_1:
  ....

I am starting the containers by following command (using 40 as an arbitrary number of containers):

docker-compose up --build --scale agent_1=40 agent_1

Solution approaches:

I tried the approaches listed below, but so far, none of them worked for me.

#1: Specifying a IPv4 subnet for the Docker containers

I created a network by following command:

docker network create --driver bridge agent_network --subnet 10.10.1.0/24

Hence, I edited the docker-compose.yml file to use the custom network:

version: "3.8"

networks:
  default:
    external: true
    name: agent_network

services:
  agent:
    ...

#2: Creating a IPv6 Docker network

First, I edited the /etc/docker/daemon.json file in order to enable IPv6:

{
    "ipv6": true,
    "fixed-cidr-v6": "2a01:4f8:a:b::/64",
 }

Then, I created a network, analogously as before:

docker network create --driver bridge --ipv6 --subnet=2a01:4f8:a:b:c::/80 agent_network

As the network has the same name as in approach #1, the docker-compose.yml file was the same.

#3: Creating a MacVLAN Docker network:

In this approach, I configured the docker-compose.yml file to use a Docker network based on the macvlan driver and connecting to my local ethernet adapter (enp34s0)

version: "3.8"

networks:
  dockervlan:
    name: dockervlan
    driver: macvlan
    driver_opts:
      parent: enp34s0
    ipam:
      config:
        - subnet: "10.10.2.0/24"
          gateway: "10.10.2.1"

services:

  agent_1:
    networks:
      - dockervlan
    ...

System specifications:

Host machine OS: Ubuntu 22.04.1 LTS

Host machine IP: 192.168.0.34

Docker: 20.10.22

docker-compose: 1.29.2

I also tried to use a remote server running a VM (Ubuntu 20.04.5 LTS) which however led to the same behaviour.

Further, I made sure there are no conflicts regarding the IP ranges on either system.

I would greatly appreciate any ideas or alternative approaches regarding this problem.


问:
NodeJS Custom Unit Test Automation Query
I have 2 Java Script files runTest.js and tests.js as below. This code is for custom automation of unit testing and it works. I am relatively new to Java Script syntax and unable to understand how exactly the statement tests.forEach(testRun => testRun(test)); works.

I have tried to read about Exports, Arrow Functions and Anonymous functions. Still could not get clarity on the Java Script syntax used here.

Also, I do understand that test specification and test function are correlated by name because, the execution fails at statement tests.forEach(testRun => testRun(test));, IF any one of the below is true:

The exported function name “test” in “module.exports = (test)” is different OR

Name of the function “test” in ”function test(input, expected)” is different

runTest.js

```<code>const tests = [require('./tests.js')];

function test(input, expected) {
   console.log(input, expected);
   //Displays
   //42 and its expected result JSON
   //Hello and its expected result JSON
}

// Run all tests — **HOW DOES THE BELOW STATEMENT REALLY WORK?**
tests.forEach(testRun => testRun(test));
</code>```

tests.js

```<code>module.exports = (test) => {
   //NumericLiteral
   test(`42`, {
      type: "Program",
      body: {
         type: "NumericLiteral",
         value: 42,
      },
   });

   //StringLiteral
   test(`'Hello'`, {
      type: "Program",
      body: {
         type: "StringLiteral",
         value: "Hello",
      },
   });
};
</code>```

Body:
I have 2 Java Script files runTest.js and tests.js as below. This code is for custom automation of unit testing and it works. I am relatively new to Java Script syntax and unable to understand how exactly the statement tests.forEach(testRun => testRun(test)); works.

I have tried to read about Exports, Arrow Functions and Anonymous functions. Still could not get clarity on the Java Script syntax used here.

Also, I do understand that test specification and test function are correlated by name because, the execution fails at statement tests.forEach(testRun => testRun(test));, IF any one of the below is true:

The exported function name “test” in “module.exports = (test)” is different OR

Name of the function “test” in ”function test(input, expected)” is different

runTest.js

const tests = [require('./tests.js')];

function test(input, expected) {
   console.log(input, expected);
   //Displays
   //42 and its expected result JSON
   //Hello and its expected result JSON
}

// Run all tests — **HOW DOES THE BELOW STATEMENT REALLY WORK?**
tests.forEach(testRun => testRun(test));

tests.js

module.exports = (test) => {
   //NumericLiteral
   test(`42`, {
      type: "Program",
      body: {
         type: "NumericLiteral",
         value: 42,
      },
   });

   //StringLiteral
   test(`'Hello'`, {
      type: "Program",
      body: {
         type: "StringLiteral",
         value: "Hello",
      },
   });
};


问:
How to select multiple item in ASP.NET MVC view
I have followed Microsoft's mvc project guide and now i want the view to pass to the controller 2 items from the table i created (for example based on the guide, i want to select 2 movies and use them both) but i dont see any solution for that.

you can refer your answer to MS's examples in the link above.

I need the user to select 2 movies and when a button is clicked, the two items (movies) will be passing to the controller.

I tried using lists and new calsses to contain both items in.


问:
Symfony 6.2 No route found "*bufo_dummy_index" but debug:router display the bufo_dummy_index
i created a new sf6.2 project and i added an old bundle under src
structure is like:
/src/Controller/MainController.php

```<code>class MainController extends AbstractController
{
    #[Route('/', name: 'app_home')]
    public function index(AuthenticationUtils $authenticationUtils): Response
</code>```

/src/Asso/BufoBundle/Controler/DummyController.php

```<code>#[Route('/bufo/dummy', name: 'bufo_dummy_')]
class DummyController extends AbstractController
{
    #[Route('/index', name: 'index')]
    public function index(): Response
</code>```

when i run debug:router

Name                       Method   Scheme   Host   Path

bufo_dummy_index           ANY      ANY      ANY    /asso_bufo/bufo/dummy/index
app_home                   ANY      ANY      ANY    /

app_home works fine but bufo_dummy_index not

i tried other routes settings but i see that the route to the DummyController in the AssoBufoBundle is not realy loaded

Body:
i created a new sf6.2 project and i added an old bundle under src
structure is like:
/src/Controller/MainController.php

class MainController extends AbstractController
{
    #[Route('/', name: 'app_home')]
    public function index(AuthenticationUtils $authenticationUtils): Response

/src/Asso/BufoBundle/Controler/DummyController.php

#[Route('/bufo/dummy', name: 'bufo_dummy_')]
class DummyController extends AbstractController
{
    #[Route('/index', name: 'index')]
    public function index(): Response

when i run debug:router

Name                       Method   Scheme   Host   Path

bufo_dummy_index           ANY      ANY      ANY    /asso_bufo/bufo/dummy/index
app_home                   ANY      ANY      ANY    /

app_home works fine but bufo_dummy_index not

i tried other routes settings but i see that the route to the DummyController in the AssoBufoBundle is not realy loaded


问:
How to remove 'dist' from path while subfolder import from component library using rollup?
I have created a component library and trying to consume the library in my other project using the github repo url.

I am able to import the complete library right now.
import {component} from 'library'.

But when i am trying to import subfolders like this
import {component} from 'library/component'.
I am not able to do so for that I have to do like this
import {component} from 'library/dist/component'.

Expected : import {component} from 'library/component'.
Current: import {component} from 'library/dist/component'

How to achieve this ?


问:
Failed EAS Build: production when running gradlew on Android Play Store build
Excuse me, I am trying to build my react-native app with expo: "eas build --platform android", but it logs some errors. I'm using EXPO SDK 46. Please help.

And here's my dependencies:

```<code>`"dependencies": {
    "@amplitude/analytics-react-native": "^0.5.1",
    "@expo-google-fonts/inter": "^0.1.0",
    "@expo-google-fonts/judson": "^0.1.0",
    "@expo-google-fonts/montserrat": "^0.1.0",
    "@expo-google-fonts/noto-sans": "^0.1.0",
    "@expo-google-fonts/open-sans": "^0.1.0",
    "@nlazzos/react-native-skeleton": "^1.0.3",
    "@react-native-async-storage/async-storage": "~1.17.3",
    "@react-native-community/datetimepicker": "6.2.0",
    "@react-native-community/netinfo": "9.3.0",
    "@react-native-community/slider": "4.2.3",
    "@react-native-masked-view/masked-view": "0.2.7",
    "@react-navigation/bottom-tabs": "^6.0.9",
    "@react-navigation/drawer": "^6.1.8",
    "@react-navigation/material-top-tabs": "^6.0.6",
    "@react-navigation/native": "^6.0.6",
    "@react-navigation/stack": "^6.0.11",
    "buffer": "^6.0.3",
    "dotenv": "^16.0.1",
    "expo": "^46.0.0",
    "expo-analytics": "^1.0.16",
    "expo-application": "~4.2.2",
    "expo-av": "~12.0.4",
    "expo-barcode-scanner": "~11.4.0",
    "expo-camera": "~12.4.0",
    "expo-clipboard": "~3.1.0",
    "expo-constants": "~13.2.4",
    "expo-crypto": "~11.0.0",
    "expo-dev-client": "~1.3.1",
    "expo-document-picker": "~10.3.0",
    "expo-file-system": "~14.1.0",
    "expo-font": "~10.2.0",
    "expo-image-picker": "~13.3.1",
    "expo-linear-gradient": "~11.4.0",
    "expo-linking": "~3.2.4",
    "expo-location": "~14.3.0",
    "expo-media-library": "~14.2.0",
    "expo-network": "~4.3.0",
    "expo-notifications": "~0.16.1",
    "expo-screen-capture": "~4.3.0",
    "expo-screen-orientation": "~4.3.0",
    "expo-secure-store": "~11.3.0",
    "expo-status-bar": "~1.4.0",
    "expo-store-review": "~5.3.0",
    "expo-tracking-transparency": "~2.3.1",
    "expo-updates": "~0.14.7",
    "expo-web-browser": "~11.0.0",
    "lottie-react-native": "5.1.3",
    "moment": "^2.27.0",
    "numeral": "^2.0.6",
    "react": "18.0.0",
    "react-native": "0.69.6",
    "react-native-base64": "0.0.2",
    "react-native-calendars": "^1.1275.0",
    "react-native-chart-kit": "^6.3.0",
    "react-native-cn-richtext-editor": "^1.0.40",
    "react-native-collapsible": "^1.5.3",
    "react-native-copilot": "^2.5.1",
    "react-native-crypto-js": "^1.0.0",
    "react-native-date-picker": "^4.1.3",
    "react-native-elements": "^3.4.2",
    "react-native-fetch-polyfill": "^1.1.3",
    "react-native-gesture-handler": "~2.5.0",
    "react-native-hyperlink": "0.0.19",
    "react-native-image-slider-banner": "^1.0.3",
    "react-native-image-viewing": "^0.2.0",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-maps": "0.31.1",
    "react-native-modal": "^11.5.6",
    "react-native-multiple-select": "^0.5.3",
    "react-native-otp-textinput": "0.0.5",
    "react-native-pager-view": "5.4.24",
    "react-native-pose": "^0.9.0",
    "react-native-progress": "^4.1.2",
    "react-native-qrcode-generator": "^1.2.2",
    "react-native-qrcode-svg": "^5.2.0",
    "react-native-ratings": "^7.3.0",
    "react-native-reanimated": "~2.9.1",
    "react-native-render-html": "^4.2.2",
    "react-native-safe-area-context": "4.3.1",
    "react-native-safe-area-view": "^1.1.1",
    "react-native-scalable-image": "^1.1.0",
    "react-native-screens": "~3.15.0",
    "react-native-scroll-into-view": "^1.0.3",
    "react-native-skeleton-content": "^1.0.22",
    "react-native-svg": "12.3.0",
    "react-native-swipe-list-view": "^3.2.3",
    "react-native-tab-view": "^3.1.1",
    "react-native-vector-icons": "^9.0.0",
    "react-native-webview": "11.23.0",
    "react-navigation": "^3.11.1",
    "react-navigation-drawer": "^2.5.0",
    "react-navigation-stack": "^2.8.2",
    "react-redux": "^5.1.1",
    "redux": "^4.0.1",
    "redux-persist": "^5.10.0",
    "rn-swipe-button": "^1.2.8",
    "url-parse": "^1.4.7"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@expo/vector-icons": "^12.0.0",
    "babel-eslint": "^10.1.0",
    "eslint": "^5.9.0",
    "eslint-plugin-react": "^7.20.4",
    "react-native-dotenv": "^3.3.1"
  }`
</code>```

Here's the log, I upload into my GoogleDrive
https://drive.google.com/file/d/1zRyEk0u5je6pzaHuSYrFIUbDLpH5yc3i/view?usp=sharing

I'm expecting Android Play Store build success. I've been trying to finish this for about 3 months

Body:
Excuse me, I am trying to build my react-native app with expo: "eas build --platform android", but it logs some errors. I'm using EXPO SDK 46. Please help.

And here's my dependencies:

`"dependencies": {
    "@amplitude/analytics-react-native": "^0.5.1",
    "@expo-google-fonts/inter": "^0.1.0",
    "@expo-google-fonts/judson": "^0.1.0",
    "@expo-google-fonts/montserrat": "^0.1.0",
    "@expo-google-fonts/noto-sans": "^0.1.0",
    "@expo-google-fonts/open-sans": "^0.1.0",
    "@nlazzos/react-native-skeleton": "^1.0.3",
    "@react-native-async-storage/async-storage": "~1.17.3",
    "@react-native-community/datetimepicker": "6.2.0",
    "@react-native-community/netinfo": "9.3.0",
    "@react-native-community/slider": "4.2.3",
    "@react-native-masked-view/masked-view": "0.2.7",
    "@react-navigation/bottom-tabs": "^6.0.9",
    "@react-navigation/drawer": "^6.1.8",
    "@react-navigation/material-top-tabs": "^6.0.6",
    "@react-navigation/native": "^6.0.6",
    "@react-navigation/stack": "^6.0.11",
    "buffer": "^6.0.3",
    "dotenv": "^16.0.1",
    "expo": "^46.0.0",
    "expo-analytics": "^1.0.16",
    "expo-application": "~4.2.2",
    "expo-av": "~12.0.4",
    "expo-barcode-scanner": "~11.4.0",
    "expo-camera": "~12.4.0",
    "expo-clipboard": "~3.1.0",
    "expo-constants": "~13.2.4",
    "expo-crypto": "~11.0.0",
    "expo-dev-client": "~1.3.1",
    "expo-document-picker": "~10.3.0",
    "expo-file-system": "~14.1.0",
    "expo-font": "~10.2.0",
    "expo-image-picker": "~13.3.1",
    "expo-linear-gradient": "~11.4.0",
    "expo-linking": "~3.2.4",
    "expo-location": "~14.3.0",
    "expo-media-library": "~14.2.0",
    "expo-network": "~4.3.0",
    "expo-notifications": "~0.16.1",
    "expo-screen-capture": "~4.3.0",
    "expo-screen-orientation": "~4.3.0",
    "expo-secure-store": "~11.3.0",
    "expo-status-bar": "~1.4.0",
    "expo-store-review": "~5.3.0",
    "expo-tracking-transparency": "~2.3.1",
    "expo-updates": "~0.14.7",
    "expo-web-browser": "~11.0.0",
    "lottie-react-native": "5.1.3",
    "moment": "^2.27.0",
    "numeral": "^2.0.6",
    "react": "18.0.0",
    "react-native": "0.69.6",
    "react-native-base64": "0.0.2",
    "react-native-calendars": "^1.1275.0",
    "react-native-chart-kit": "^6.3.0",
    "react-native-cn-richtext-editor": "^1.0.40",
    "react-native-collapsible": "^1.5.3",
    "react-native-copilot": "^2.5.1",
    "react-native-crypto-js": "^1.0.0",
    "react-native-date-picker": "^4.1.3",
    "react-native-elements": "^3.4.2",
    "react-native-fetch-polyfill": "^1.1.3",
    "react-native-gesture-handler": "~2.5.0",
    "react-native-hyperlink": "0.0.19",
    "react-native-image-slider-banner": "^1.0.3",
    "react-native-image-viewing": "^0.2.0",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-maps": "0.31.1",
    "react-native-modal": "^11.5.6",
    "react-native-multiple-select": "^0.5.3",
    "react-native-otp-textinput": "0.0.5",
    "react-native-pager-view": "5.4.24",
    "react-native-pose": "^0.9.0",
    "react-native-progress": "^4.1.2",
    "react-native-qrcode-generator": "^1.2.2",
    "react-native-qrcode-svg": "^5.2.0",
    "react-native-ratings": "^7.3.0",
    "react-native-reanimated": "~2.9.1",
    "react-native-render-html": "^4.2.2",
    "react-native-safe-area-context": "4.3.1",
    "react-native-safe-area-view": "^1.1.1",
    "react-native-scalable-image": "^1.1.0",
    "react-native-screens": "~3.15.0",
    "react-native-scroll-into-view": "^1.0.3",
    "react-native-skeleton-content": "^1.0.22",
    "react-native-svg": "12.3.0",
    "react-native-swipe-list-view": "^3.2.3",
    "react-native-tab-view": "^3.1.1",
    "react-native-vector-icons": "^9.0.0",
    "react-native-webview": "11.23.0",
    "react-navigation": "^3.11.1",
    "react-navigation-drawer": "^2.5.0",
    "react-navigation-stack": "^2.8.2",
    "react-redux": "^5.1.1",
    "redux": "^4.0.1",
    "redux-persist": "^5.10.0",
    "rn-swipe-button": "^1.2.8",
    "url-parse": "^1.4.7"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@expo/vector-icons": "^12.0.0",
    "babel-eslint": "^10.1.0",
    "eslint": "^5.9.0",
    "eslint-plugin-react": "^7.20.4",
    "react-native-dotenv": "^3.3.1"
  }`

Here's the log, I upload into my GoogleDrive
https://drive.google.com/file/d/1zRyEk0u5je6pzaHuSYrFIUbDLpH5yc3i/view?usp=sharing

I'm expecting Android Play Store build success. I've been trying to finish this for about 3 months


问:
A problem occurred evaluating root project 'My Application'. > Could not find method buildscript() for arguments [build_iq774hk1ckieto3o4b939lcq$_ru
Good day may you please help me with sucessfully syncing gradle. i am using 7.6 version. May you point me to the right direction.
A problem occurred evaluating root project 'My Application'.

Could not find method buildscript() for arguments [build_iq774hk1ckieto3o4b939lcq$_run_closure1@49d5bc4c, build_iq774hk1ckieto3o4b939lcq$_run_closure2@3b1fe240] on root project 'My Application' of type org.gradle.api.Project.

your text* Try:
your text> Run with --info or --debug option to get more log output.

Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'My Application'.
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.lambda$apply$0(DefaultScriptPluginFactory.java:133)
at org.gradle.configuration.ProjectScriptTarget.addConfiguration(ProjectScriptTarget.java:79)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:136)
at org.gradle.configuration.BuildOperationScriptPlugin$1.run(BuildOperationScriptPlugin.java:65)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
at org.gradle.configuration.BuildOperationScriptPlugin.lambda$apply$0(BuildOperationScriptPlugin.java:62)
at org.gradle.configuration.internal.DefaultUserCodeApplicationContext.apply(DefaultUserCodeApplicationContext.java:44)
at org.gradle.configuration.BuildOperationScriptPlugin.apply(BuildOperationScriptPlugin.java:62)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$applyToMutableState$0(DefaultProjectStateRegistry.java:360)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:378)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.applyToMutableState(DefaultProjectStateRegistry.java:359)
at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:42)
at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:26)
at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:35)
at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.lambda$run$0(LifecycleProjectEvaluator.java:109)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$applyToMutableState$0(DefaultProjectStateRegistry.java:360)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$fromMutableState$1(DefaultProjectStateRegistry.java:383)
at org.gradle.internal.work.DefaultWorkerLeaseService.withReplacedLocks(DefaultWorkerLeaseService.java:345)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:383)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.applyToMutableState(DefaultProjectStateRegistry.java:359)
at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.run(LifecycleProjectEvaluator.java:100)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:72)
at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:762)
at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:153)
at org.gradle.api.internal.project.ProjectLifecycleController.lambda$ensureSelfConfigured$1(ProjectLifecycleController.java:63)
at org.gradle.internal.model.StateTransitionController.lambda$doTransition$12(StateTransitionController.java:236)
at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:247)
at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:235)
at org.gradle.internal.model.StateTransitionController.lambda$maybeTransitionIfNotCurrentlyTransitioning$9(StateTransitionController.java:196)
at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:34)
at org.gradle.internal.model.StateTransitionController.maybeTransitionIfNotCurrentlyTransitioning(StateTransitionController.java:192)
at org.gradle.api.internal.project.ProjectLifecycleController.ensureSelfConfigured(ProjectLifecycleController.java:63)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.ensureConfigured(DefaultProjectStateRegistry.java:334)
at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:33)
at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:47)
at org.gradle.configuration.DefaultProjectsPreparer.prepareProjects(DefaultProjectsPreparer.java:50)
at org.gradle.configuration.BuildTreePreparingProjectsPreparer.prepareProjects(BuildTreePreparingProjectsPreparer.java:64)
at org.gradle.configuration.BuildOperationFiringProjectsPreparer$ConfigureBuild.run(BuildOperationFiringProjectsPreparer.java:52)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
at org.gradle.configuration.BuildOperationFiringProjectsPreparer.prepareProjects(BuildOperationFiringProjectsPreparer.java:40)
at org.gradle.initialization.VintageBuildModelController.lambda$prepareProjects$2(VintageBuildModelController.java:84)
at org.gradle.internal.model.StateTransitionController.lambda$doTransition$12(StateTransitionController.java:236)
at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:247)
at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:235)
at org.gradle.internal.model.StateTransitionController.lambda$transitionIfNotPreviously$10(StateTransitionController.java:210)
at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:34)
at org.gradle.internal.model.StateTransitionController.transitionIfNotPreviously(StateTransitionController.java:206)
at org.gradle.initialization.VintageBuildModelController.prepareProjects(VintageBuildModelController.java:84)
at org.gradle.initialization.VintageBuildModelController.getConfiguredModel(VintageBuildModelController.java:64)
at org.gradle.internal.build.DefaultBuildLifecycleController.lambda$withProjectsConfigured$1(DefaultBuildLifecycleController.java:116)
at org.gradle.internal.model.StateTransitionController.lambda$notInState$3(StateTransitionController.java:143)
at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:44)
at org.gradle.internal.model.StateTransitionController.notInState(StateTransitionController.java:139)
at org.gradle.internal.build.DefaultBuildLifecycleController.withProjectsConfigured(DefaultBuildLifecycleController.java:116)
at org.gradle.internal.build.DefaultBuildToolingModelController.locateBuilderForTarget(DefaultBuildToolingModelController.java:57)
at org.gradle.internal.buildtree.DefaultBuildTreeModelCreator$DefaultBuildTreeModelController.lambda$locateBuilderForTarget$0(DefaultBuildTreeModelCreator.java:73)
at org.gradle.internal.build.DefaultBuildLifecycleController.withToolingModels(DefaultBuildLifecycleController.java:180)
at org.gradle.internal.build.AbstractBuildState.withToolingModels(AbstractBuildState.java:123)
at org.gradle.internal.buildtree.DefaultBuildTreeModelCreator$DefaultBuildTreeModelController.locateBuilderForTarget(DefaultBuildTreeModelCreator.java:73)
at org.gradle.internal.buildtree.DefaultBuildTreeModelCreator$DefaultBuildTreeModelController.locateBuilderForDefaultTarget(DefaultBuildTreeModelCreator.java:68)
at org.gradle.tooling.internal.provider.runner.DefaultBuildController.getTarget(DefaultBuildController.java:157)
at org.gradle.tooling.internal.provider.runner.DefaultBuildController.getModel(DefaultBuildController.java:101)
at org.gradle.tooling.internal.consumer.connection.ParameterAwareBuildControllerAdapter.getModel(ParameterAwareBuildControllerAdapter.java:39)
at org.gradle.tooling.internal.consumer.connection.UnparameterizedBuildController.getModel(UnparameterizedBuildController.java:113)
at org.gradle.tooling.internal.consumer.connection.NestedActionAwareBuildControllerAdapter.getModel(NestedActionAwareBuildControllerAdapter.java:31)
at org.gradle.tooling.internal.consumer.connection.UnparameterizedBuildController.findModel(UnparameterizedBuildController.java:97)
at org.gradle.tooling.internal.consumer.connection.NestedActionAwareBuildControllerAdapter.findModel(NestedActionAwareBuildControllerAdapter.java:31)
at org.gradle.tooling.internal.consumer.connection.UnparameterizedBuildController.findModel(UnparameterizedBuildController.java:81)
at org.gradle.tooling.internal.consumer.connection.NestedActionAwareBuildControllerAdapter.findModel(NestedActionAwareBuildControllerAdapter.java:31)
at org.gradle.tooling.internal.consumer.connection.UnparameterizedBuildController.findModel(UnparameterizedBuildController.java:66)
at org.gradle.tooling.internal.consumer.connection.NestedActionAwareBuildControllerAdapter.findModel(NestedActionAwareBuildControllerAdapter.java:31)
at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:116)
at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:42)
at org.gradle.tooling.internal.consumer.connection.InternalBuildActionAdapter.execute(InternalBuildActionAdapter.java:64)
at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionAdapter.runAction(AbstractClientProvidedBuildActionRunner.java:131)
at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionAdapter.beforeTasks(AbstractClientProvidedBuildActionRunner.java:99)
at org.gradle.internal.buildtree.DefaultBuildTreeModelCreator.beforeTasks(DefaultBuildTreeModelCreator.java:52)
at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$fromBuildModel$2(DefaultBuildTreeLifecycleController.java:82)
at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$runBuild$5(DefaultBuildTreeLifecycleController.java:113)
at org.gradle.internal.model.StateTransitionController.lambda$transition$5(StateTransitionController.java:166)
at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:247)
at org.gradle.internal.model.StateTransitionController.lambda$transition$6(StateTransitionController.java:166)
at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:44)
at org.gradle.internal.model.StateTransitionController.transition(StateTransitionController.java:166)
at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.runBuild(DefaultBuildTreeLifecycleController.java:110)
at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.fromBuildModel(DefaultBuildTreeLifecycleController.java:81)
at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner.runClientAction(AbstractClientProvidedBuildActionRunner.java:43)
at org.gradle.tooling.internal.provider.runner.ClientProvidedPhasedActionRunner.run(ClientProvidedPhasedActionRunner.java:53)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.internal.buildtree.ProblemReportingBuildActionRunner.run(ProblemReportingBuildActionRunner.java:49)
at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:65)
at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:136)
at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41)
at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.lambda$execute$0(RootBuildLifecycleBuildActionExecutor.java:40)
at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:122)
at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.execute(RootBuildLifecycleBuildActionExecutor.java:40)
at org.gradle.internal.buildtree.DefaultBuildTreeContext.execute(DefaultBuildTreeContext.java:40)
at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.lambda$execute$0(BuildTreeLifecycleBuildActionExecutor.java:65)
at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:53)
at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.execute(BuildTreeLifecycleBuildActionExecutor.java:65)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:61)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:57)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor.execute(RunAsBuildOperationBuildActionExecutor.java:57)
at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.lambda$execute$0(RunAsWorkerThreadBuildActionExecutor.java:36)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:249)
at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:109)
at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.execute(RunAsWorkerThreadBuildActionExecutor.java:36)
at org.gradle.tooling.internal.provider.continuous.ContinuousBuildActionExecutor.execute(ContinuousBuildActionExecutor.java:110)
at org.gradle.tooling.internal.provider.SubscribableBuildActionExecutor.execute(SubscribableBuildActionExecutor.java:64)
at org.gradle.internal.session.DefaultBuildSessionContext.execute(DefaultBuildSessionContext.java:46)
at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:100)
at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:88)
at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:69)
at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:62)
at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:41)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:63)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:52)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:40)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:47)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:31)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:65)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:78)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:75)
at org.gradle.util.internal.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:75)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:84)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:49)
Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method buildscript() for arguments [build_iq774hk1ckieto3o4b939lcq$_run_closure1@49d5bc4c, build_iq774hk1ckieto3o4b939lcq$_run_closure2@3b1fe240] on root project 'My Application' of type org.gradle.api.Project.
at org.gradle.internal.metaobject.AbstractDynamicObject$CustomMissingMethodExecutionFailed.(AbstractDynamicObject.java:190)
at org.gradle.internal.metaobject.AbstractDynamicObject.methodMissingException(AbstractDynamicObject.java:184)
at org.gradle.groovy.scripts.BasicScript$ScriptDynamicObject.methodMissingException(BasicScript.java:162)
at org.gradle.internal.metaobject.AbstractDynamicObject.invokeMethod(AbstractDynamicObject.java:167)
at org.gradle.groovy.scripts.BasicScript.invokeMethod(BasicScript.java:84)
at build_iq774hk1ckieto3o4b939lcq.run(C:\Users\SinaVikazi\AndroidStudioProjects\MyApplication\build.gradle:3)
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:91)
... 177 more

// Top-level build file where you can add configuration options common to all sub-projects/modules.

```<code>buildscript {

        ext.kotlin_version = '1.7.20'

    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:7.2.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20"
        classpath 'com.google.gms:google-services:4.3.10' // If you use
    }
            }

   {
    id('com.android.application') version '7.3.1' apply false
    id('com.android.library') version '7.3.1' apply false
    id('org.jetbrains.kotlin.android') version "1.5.31" apply false
}

    task clean(type: Delete) {
        delete rootProject.buildDir
    }

</code>```

Body:
Good day may you please help me with sucessfully syncing gradle. i am using 7.6 version. May you point me to the right direction.
A problem occurred evaluating root project 'My Application'.

Could not find method buildscript() for arguments [build_iq774hk1ckieto3o4b939lcq$_run_closure1@49d5bc4c, build_iq774hk1ckieto3o4b939lcq$_run_closure2@3b1fe240] on root project 'My Application' of type org.gradle.api.Project.

your text* Try:
your text> Run with --info or --debug option to get more log output.

Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'My Application'.
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.lambda$apply$0(DefaultScriptPluginFactory.java:133)
at org.gradle.configuration.ProjectScriptTarget.addConfiguration(ProjectScriptTarget.java:79)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:136)
at org.gradle.configuration.BuildOperationScriptPlugin$1.run(BuildOperationScriptPlugin.java:65)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
at org.gradle.configuration.BuildOperationScriptPlugin.lambda$apply$0(BuildOperationScriptPlugin.java:62)
at org.gradle.configuration.internal.DefaultUserCodeApplicationContext.apply(DefaultUserCodeApplicationContext.java:44)
at org.gradle.configuration.BuildOperationScriptPlugin.apply(BuildOperationScriptPlugin.java:62)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$applyToMutableState$0(DefaultProjectStateRegistry.java:360)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:378)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.applyToMutableState(DefaultProjectStateRegistry.java:359)
at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:42)
at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:26)
at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:35)
at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.lambda$run$0(LifecycleProjectEvaluator.java:109)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$applyToMutableState$0(DefaultProjectStateRegistry.java:360)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$fromMutableState$1(DefaultProjectStateRegistry.java:383)
at org.gradle.internal.work.DefaultWorkerLeaseService.withReplacedLocks(DefaultWorkerLeaseService.java:345)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:383)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.applyToMutableState(DefaultProjectStateRegistry.java:359)
at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.run(LifecycleProjectEvaluator.java:100)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:72)
at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:762)
at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:153)
at org.gradle.api.internal.project.ProjectLifecycleController.lambda$ensureSelfConfigured$1(ProjectLifecycleController.java:63)
at org.gradle.internal.model.StateTransitionController.lambda$doTransition$12(StateTransitionController.java:236)
at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:247)
at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:235)
at org.gradle.internal.model.StateTransitionController.lambda$maybeTransitionIfNotCurrentlyTransitioning$9(StateTransitionController.java:196)
at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:34)
at org.gradle.internal.model.StateTransitionController.maybeTransitionIfNotCurrentlyTransitioning(StateTransitionController.java:192)
at org.gradle.api.internal.project.ProjectLifecycleController.ensureSelfConfigured(ProjectLifecycleController.java:63)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.ensureConfigured(DefaultProjectStateRegistry.java:334)
at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:33)
at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:47)
at org.gradle.configuration.DefaultProjectsPreparer.prepareProjects(DefaultProjectsPreparer.java:50)
at org.gradle.configuration.BuildTreePreparingProjectsPreparer.prepareProjects(BuildTreePreparingProjectsPreparer.java:64)
at org.gradle.configuration.BuildOperationFiringProjectsPreparer$ConfigureBuild.run(BuildOperationFiringProjectsPreparer.java:52)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
at org.gradle.configuration.BuildOperationFiringProjectsPreparer.prepareProjects(BuildOperationFiringProjectsPreparer.java:40)
at org.gradle.initialization.VintageBuildModelController.lambda$prepareProjects$2(VintageBuildModelController.java:84)
at org.gradle.internal.model.StateTransitionController.lambda$doTransition$12(StateTransitionController.java:236)
at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:247)
at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:235)
at org.gradle.internal.model.StateTransitionController.lambda$transitionIfNotPreviously$10(StateTransitionController.java:210)
at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:34)
at org.gradle.internal.model.StateTransitionController.transitionIfNotPreviously(StateTransitionController.java:206)
at org.gradle.initialization.VintageBuildModelController.prepareProjects(VintageBuildModelController.java:84)
at org.gradle.initialization.VintageBuildModelController.getConfiguredModel(VintageBuildModelController.java:64)
at org.gradle.internal.build.DefaultBuildLifecycleController.lambda$withProjectsConfigured$1(DefaultBuildLifecycleController.java:116)
at org.gradle.internal.model.StateTransitionController.lambda$notInState$3(StateTransitionController.java:143)
at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:44)
at org.gradle.internal.model.StateTransitionController.notInState(StateTransitionController.java:139)
at org.gradle.internal.build.DefaultBuildLifecycleController.withProjectsConfigured(DefaultBuildLifecycleController.java:116)
at org.gradle.internal.build.DefaultBuildToolingModelController.locateBuilderForTarget(DefaultBuildToolingModelController.java:57)
at org.gradle.internal.buildtree.DefaultBuildTreeModelCreator$DefaultBuildTreeModelController.lambda$locateBuilderForTarget$0(DefaultBuildTreeModelCreator.java:73)
at org.gradle.internal.build.DefaultBuildLifecycleController.withToolingModels(DefaultBuildLifecycleController.java:180)
at org.gradle.internal.build.AbstractBuildState.withToolingModels(AbstractBuildState.java:123)
at org.gradle.internal.buildtree.DefaultBuildTreeModelCreator$DefaultBuildTreeModelController.locateBuilderForTarget(DefaultBuildTreeModelCreator.java:73)
at org.gradle.internal.buildtree.DefaultBuildTreeModelCreator$DefaultBuildTreeModelController.locateBuilderForDefaultTarget(DefaultBuildTreeModelCreator.java:68)
at org.gradle.tooling.internal.provider.runner.DefaultBuildController.getTarget(DefaultBuildController.java:157)
at org.gradle.tooling.internal.provider.runner.DefaultBuildController.getModel(DefaultBuildController.java:101)
at org.gradle.tooling.internal.consumer.connection.ParameterAwareBuildControllerAdapter.getModel(ParameterAwareBuildControllerAdapter.java:39)
at org.gradle.tooling.internal.consumer.connection.UnparameterizedBuildController.getModel(UnparameterizedBuildController.java:113)
at org.gradle.tooling.internal.consumer.connection.NestedActionAwareBuildControllerAdapter.getModel(NestedActionAwareBuildControllerAdapter.java:31)
at org.gradle.tooling.internal.consumer.connection.UnparameterizedBuildController.findModel(UnparameterizedBuildController.java:97)
at org.gradle.tooling.internal.consumer.connection.NestedActionAwareBuildControllerAdapter.findModel(NestedActionAwareBuildControllerAdapter.java:31)
at org.gradle.tooling.internal.consumer.connection.UnparameterizedBuildController.findModel(UnparameterizedBuildController.java:81)
at org.gradle.tooling.internal.consumer.connection.NestedActionAwareBuildControllerAdapter.findModel(NestedActionAwareBuildControllerAdapter.java:31)
at org.gradle.tooling.internal.consumer.connection.UnparameterizedBuildController.findModel(UnparameterizedBuildController.java:66)
at org.gradle.tooling.internal.consumer.connection.NestedActionAwareBuildControllerAdapter.findModel(NestedActionAwareBuildControllerAdapter.java:31)
at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:116)
at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:42)
at org.gradle.tooling.internal.consumer.connection.InternalBuildActionAdapter.execute(InternalBuildActionAdapter.java:64)
at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionAdapter.runAction(AbstractClientProvidedBuildActionRunner.java:131)
at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionAdapter.beforeTasks(AbstractClientProvidedBuildActionRunner.java:99)
at org.gradle.internal.buildtree.DefaultBuildTreeModelCreator.beforeTasks(DefaultBuildTreeModelCreator.java:52)
at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$fromBuildModel$2(DefaultBuildTreeLifecycleController.java:82)
at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$runBuild$5(DefaultBuildTreeLifecycleController.java:113)
at org.gradle.internal.model.StateTransitionController.lambda$transition$5(StateTransitionController.java:166)
at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:247)
at org.gradle.internal.model.StateTransitionController.lambda$transition$6(StateTransitionController.java:166)
at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:44)
at org.gradle.internal.model.StateTransitionController.transition(StateTransitionController.java:166)
at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.runBuild(DefaultBuildTreeLifecycleController.java:110)
at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.fromBuildModel(DefaultBuildTreeLifecycleController.java:81)
at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner.runClientAction(AbstractClientProvidedBuildActionRunner.java:43)
at org.gradle.tooling.internal.provider.runner.ClientProvidedPhasedActionRunner.run(ClientProvidedPhasedActionRunner.java:53)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.internal.buildtree.ProblemReportingBuildActionRunner.run(ProblemReportingBuildActionRunner.java:49)
at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:65)
at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:136)
at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41)
at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.lambda$execute$0(RootBuildLifecycleBuildActionExecutor.java:40)
at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:122)
at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.execute(RootBuildLifecycleBuildActionExecutor.java:40)
at org.gradle.internal.buildtree.DefaultBuildTreeContext.execute(DefaultBuildTreeContext.java:40)
at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.lambda$execute$0(BuildTreeLifecycleBuildActionExecutor.java:65)
at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:53)
at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.execute(BuildTreeLifecycleBuildActionExecutor.java:65)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:61)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:57)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor.execute(RunAsBuildOperationBuildActionExecutor.java:57)
at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.lambda$execute$0(RunAsWorkerThreadBuildActionExecutor.java:36)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:249)
at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:109)
at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.execute(RunAsWorkerThreadBuildActionExecutor.java:36)
at org.gradle.tooling.internal.provider.continuous.ContinuousBuildActionExecutor.execute(ContinuousBuildActionExecutor.java:110)
at org.gradle.tooling.internal.provider.SubscribableBuildActionExecutor.execute(SubscribableBuildActionExecutor.java:64)
at org.gradle.internal.session.DefaultBuildSessionContext.execute(DefaultBuildSessionContext.java:46)
at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:100)
at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:88)
at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:69)
at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:62)
at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:41)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:63)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:52)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:40)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:47)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:31)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:65)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:78)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:75)
at org.gradle.util.internal.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:75)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:84)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:49)
Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method buildscript() for arguments [build_iq774hk1ckieto3o4b939lcq$_run_closure1@49d5bc4c, build_iq774hk1ckieto3o4b939lcq$_run_closure2@3b1fe240] on root project 'My Application' of type org.gradle.api.Project.
at org.gradle.internal.metaobject.AbstractDynamicObject$CustomMissingMethodExecutionFailed.(AbstractDynamicObject.java:190)
at org.gradle.internal.metaobject.AbstractDynamicObject.methodMissingException(AbstractDynamicObject.java:184)
at org.gradle.groovy.scripts.BasicScript$ScriptDynamicObject.methodMissingException(BasicScript.java:162)
at org.gradle.internal.metaobject.AbstractDynamicObject.invokeMethod(AbstractDynamicObject.java:167)
at org.gradle.groovy.scripts.BasicScript.invokeMethod(BasicScript.java:84)
at build_iq774hk1ckieto3o4b939lcq.run(C:\Users\SinaVikazi\AndroidStudioProjects\MyApplication\build.gradle:3)
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:91)
... 177 more

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

        ext.kotlin_version = '1.7.20'

    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:7.2.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20"
        classpath 'com.google.gms:google-services:4.3.10' // If you use
    }
            }

   {
    id('com.android.application') version '7.3.1' apply false
    id('com.android.library') version '7.3.1' apply false
    id('org.jetbrains.kotlin.android') version "1.5.31" apply false
}

    task clean(type: Delete) {
        delete rootProject.buildDir
    }


问:
Should I bundle (build) my Vue UI library before publishing it?
I am creating UI library for Vue and I started to wonder if I need the build step or not? Why don't distribute library as a plain Vue components? That way it feels like it would be much easier for Vue to import them and during the build only imported components will be bundled, not the whole library.

What is the purpose of building it anyway?


问:
Create multiple pipe in multiprocessing
For the pipe communication of multiprocess,  could we create multiple pipe communication?

For example, I had 2 script , main function and test function. My main function have 2 object : car and plane. While , test function have two object car2 and plane2. Could I create communication pipe between car2 and car and plane2 and plane separately?

Below is what I think , but not sure if I do it correctly or not . I think it not because I have some error in passing the communication in pipe.

```<code> from time import sleep
from random import random
from multiprocessing import Process
from multiprocessing import Pipe

# generate work
def test(connection):
    print('Sender: Running', flush=True)
    # generate work
    for i in range(10):
        # generate a value
        value = random()
        # block
        sleep(value)
        # send data
        connection.send(value)
    # all done
    connection.send(None)
    print('Sender: Done', flush=True)

# consume work
def main(connection):
    print('Receiver: Running', flush=True)
    # consume work
    while True:
        # get a unit of work
        item = connection.recv()
        # report
        print(f'>receiver got {item}', flush=True)
        # check for stop
        if item is None:
            break
    # all done
    print('Receiver: Done', flush=True)

# entry point
if __name__ == '__main__':
    # create the pipe
    plane, plane1 = Pipe()
    car,car2 = Pipe()
    # start the sender
    sender_process = Process(target=main, args=(plane,car,))
    sender_process.start()
    # start the receiver
    receiver_process = Process(target=test,args=(plane2,car2,))
    receiver_process.start()
    # wait for all processes to finish
    sender_process.join()
    receiver_process.join()

</code>```

Title: Create multiple pipe in multiprocessing

Body:
For the pipe communication of multiprocess,  could we create multiple pipe communication?

For example, I had 2 script , main function and test function. My main function have 2 object : car and plane. While , test function have two object car2 and plane2. Could I create communication pipe between car2 and car and plane2 and plane separately?

Below is what I think , but not sure if I do it correctly or not . I think it not because I have some error in passing the communication in pipe.

 from time import sleep
from random import random
from multiprocessing import Process
from multiprocessing import Pipe

# generate work
def test(connection):
    print('Sender: Running', flush=True)
    # generate work
    for i in range(10):
        # generate a value
        value = random()
        # block
        sleep(value)
        # send data
        connection.send(value)
    # all done
    connection.send(None)
    print('Sender: Done', flush=True)

# consume work
def main(connection):
    print('Receiver: Running', flush=True)
    # consume work
    while True:
        # get a unit of work
        item = connection.recv()
        # report
        print(f'>receiver got {item}', flush=True)
        # check for stop
        if item is None:
            break
    # all done
    print('Receiver: Done', flush=True)

# entry point
if __name__ == '__main__':
    # create the pipe
    plane, plane1 = Pipe()
    car,car2 = Pipe()
    # start the sender
    sender_process = Process(target=main, args=(plane,car,))
    sender_process.start()
    # start the receiver
    receiver_process = Process(target=test,args=(plane2,car2,))
    receiver_process.start()
    # wait for all processes to finish
    sender_process.join()
    receiver_process.join()


问:
How can I optimise the size of docker container for flutter
I am trying to build a docker image which will be used for a CI/CD pipeline. I am trying to reduce the size of the image. Here is my dockerFile, what can be done to optimise it?

```<code>FROM  ubuntu:20.04

ENV FLUTTER_CHANNEL="stable"
ENV FLUTTER_VERSION="2.2.1"
ENV JAVA_VERSION="8"
ENV FLUTTER_URL="https://storage.googleapis.com/flutter_infra/releases/$FLUTTER_CHANNEL/linux/flutter_linux_$FLUTTER_VERSION-$FLUTTER_CHANNEL.tar.xz"
ENV FLUTTER_HOME "/home/developer/flutter/bin"

ENV DEBIAN_FRONTEND="noninteractive"
RUN apt-get update \
  && apt-get install --yes --no-install-recommends openjdk-$JAVA_VERSION-jdk curl unzip sed git bash xz-utils wget   sudo \
  && rm -rf /var/lib/{apt,dpkg,cache,log}

# Set up new user
RUN useradd -ms /bin/bash developer
USER developer
WORKDIR /home/developer

# Prepare Android directories and system variables
RUN mkdir -p Android/sdk
ENV ANDROID_SDK_ROOT /home/developer/Android/sdk
RUN mkdir -p .android && touch .android/repositories.cfg

# Set up Android SDK
RUN wget -O sdk-tools.zip https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
RUN unzip sdk-tools.zip && rm sdk-tools.zip
RUN mv tools Android/sdk/tools
RUN cd Android/sdk/tools/bin && yes | ./sdkmanager --licenses
RUN cd Android/sdk/tools/bin && ./sdkmanager "build-tools;29.0.2" "patcher;v4" "platform-tools" "platforms;android-29" "sources;android-29"
ENV PATH "$PATH:/home/developer/Android/sdk/platform-tools"

#Set up Flutter SDK
RUN curl -o flutter.tar.xz $FLUTTER_URL \
  && sudo mkdir -p $FLUTTER_HOME \
  && tar xf flutter.tar.xz -C /home/$USER \
  && rm flutter.tar.xz \
  && flutter config --no-analytics \
  && flutter precache \
  && yes "y" | flutter doctor --android-licenses \
  && flutter doctor \
  && flutter emulators --create \
  && flutter update-packages

ENV PATH "$PATH:/home/developer/flutter/bin"

RUN echo $(flutter doctor)

RUN yes | flutter doctor --android-licenses \
    && flutter doctor

</code>```

I would like to reduce the size currently it is 2.2GB, can some packages be removed.
P.S: Just getting started with docker and piplines

Body:
I am trying to build a docker image which will be used for a CI/CD pipeline. I am trying to reduce the size of the image. Here is my dockerFile, what can be done to optimise it?

FROM  ubuntu:20.04

ENV FLUTTER_CHANNEL="stable"
ENV FLUTTER_VERSION="2.2.1"
ENV JAVA_VERSION="8"
ENV FLUTTER_URL="https://storage.googleapis.com/flutter_infra/releases/$FLUTTER_CHANNEL/linux/flutter_linux_$FLUTTER_VERSION-$FLUTTER_CHANNEL.tar.xz"
ENV FLUTTER_HOME "/home/developer/flutter/bin"

ENV DEBIAN_FRONTEND="noninteractive"
RUN apt-get update \
  && apt-get install --yes --no-install-recommends openjdk-$JAVA_VERSION-jdk curl unzip sed git bash xz-utils wget   sudo \
  && rm -rf /var/lib/{apt,dpkg,cache,log}

# Set up new user
RUN useradd -ms /bin/bash developer
USER developer
WORKDIR /home/developer

# Prepare Android directories and system variables
RUN mkdir -p Android/sdk
ENV ANDROID_SDK_ROOT /home/developer/Android/sdk
RUN mkdir -p .android && touch .android/repositories.cfg

# Set up Android SDK
RUN wget -O sdk-tools.zip https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
RUN unzip sdk-tools.zip && rm sdk-tools.zip
RUN mv tools Android/sdk/tools
RUN cd Android/sdk/tools/bin && yes | ./sdkmanager --licenses
RUN cd Android/sdk/tools/bin && ./sdkmanager "build-tools;29.0.2" "patcher;v4" "platform-tools" "platforms;android-29" "sources;android-29"
ENV PATH "$PATH:/home/developer/Android/sdk/platform-tools"

#Set up Flutter SDK
RUN curl -o flutter.tar.xz $FLUTTER_URL \
  && sudo mkdir -p $FLUTTER_HOME \
  && tar xf flutter.tar.xz -C /home/$USER \
  && rm flutter.tar.xz \
  && flutter config --no-analytics \
  && flutter precache \
  && yes "y" | flutter doctor --android-licenses \
  && flutter doctor \
  && flutter emulators --create \
  && flutter update-packages

ENV PATH "$PATH:/home/developer/flutter/bin"

RUN echo $(flutter doctor)

RUN yes | flutter doctor --android-licenses \
    && flutter doctor

I would like to reduce the size currently it is 2.2GB, can some packages be removed.
P.S: Just getting started with docker and piplines


问:
Usage of Coil inside accompanist HorizontalPager
I need to create a HorizontalPager with images from server.

I'm using Coil 2.2.2 and everything is fine when I open the app a second time (because of the cache). But when I open the app for the first time (or after clearing the cache), the download speed is extremely slow, for example the 2MB image takes 5 seconds to load, sometimes it can be up to 12 seconds
I thought this was due to a lot of recomposition counts inside the HorizontalPager when I switch page, so I try to add coil ImageRequest to the context.imageLoader queue. But even if I don't swith the page image loading extremely slow

How I can make image loading faster?

Here is my code

                ConstraintLayout {
                    val (pager, indicator) = createRefs()

                    val pagerState = rememberPagerState()
                    val loadedData = remember { mutableStateMapOf<Int, ImageRequest>() }

                    HorizontalPager(
                        count = banners.size,
                        state = pagerState,
                        modifier = Modifier
                            .height(height)
                            .fillMaxWidth()
                            .padding(top = AppTheme.dimensions.padding_20, start = AppTheme.dimensions.padding_16, end = AppTheme.dimensions.padding_16)
                            .background(AppTheme.colors.placeholderBackground, shape = AppShapes.medium)
                            .constrainAs(pager) {
                                top.linkTo(parent.top)
                                linkTo(start = parent.start, end = parent.end)
                            }
                            .clip(AppShapes.medium)
                    ) { page ->
                        LaunchedEffect(Unit) {
                            if (loadedData[page] == null) {
                                with(density) {
                                    val request = ImageRequest.Builder(context)
                                        .data(banners[page].bannerUrl)
                                        .size(
                                            width = boxWithConstraintsScope.maxWidth.roundToPx() - horizontalPaddingsDp.roundToPx(),
                                            height = height.roundToPx()
                                        )
                                        .crossfade(true)
                                        .build()

                                    context.imageLoader.enqueue(request)
                                    loadedData[page] = request
                                }
                            }
                        }

                        val request = loadedData[page]

                        AsyncImage(
                            model = request,
                            contentDescription = null,
                            contentScale = ContentScale.Crop,
                            modifier = Modifier.fillMaxSize()
                        )
                    }

```


问:
How to change cascading behavior of react-checkbox-tree package
I am using react-checkbox-tree to implement a users dropdown. Each users have certain deals which I need to display. However the cascading behavior is not per my requirement. Clicking on parent node selects/deselects all the child nodes which is fine and when child node is deselected then parent node also gets deselected(if that parent have only one child). I don't want this to happen even if the parent have only one child deselecting the child should not deselect the parent because that parent have it's own deals which I want to display in UI.
Example: Clicking on Bala selects all it's child nodes(as expected)

and deselecting it deselects all it's child nodes(as expected)

but selecting/deselecting Beil should selects/deselects all it's children(i.e Jairam, Laxman, etc) but should not select or deselect it's parent node i.e Bala.
There is one prop called noCascade which stops the cascading behavior which I can't use. I need cascading but it should be only one way i.e on children(towards downward) and not parent(towards upward). Basically I don't want any half or intermediate check for a node.
Any help or suggestion will be highly appreciated.


问:
How to get No. of GPUs per node used in a job which is submitted by slrum?
I am working with a SLURM workload manager, and we have GPU partition with 2 nodes.

I have submitted a job of CUDA program which uses gpu for execution and I have submitted this job with 2 gpus per node and to get the job details I am using the below mentioned command from a script.

sacct -u -p --format=jobid,jobname%100,State%50,nodelist,nnodes,ReqTRES%30,allocgres

where -p is the username. But the following output comes.

JobId:20198|Name:CUDA-PI|State:TIMEOUT|AllocatedNodes:ssl-gpu[0102]|
ErrorPath:error_20198.err|OutPutPath:output_20198.out|NumberofNodes:2|NumCpus:8|NumGpus:0

Please help me with the command that will show the result of no. of gpus per node used for a job..

Thanks in advance.


问:
Conda not recognized by terminal, even though it is in PATH
I had multiple problems with my installation of Python on my Windows machine, which made me want to uninstall everything (Python, Anaconda, etc.) and just set it up again from scratch. That also made it possible to use Miniforge3 instead of the commercial Anaconda.

I installed the latest version of Miniforge3 for Windows 10 (just for my user) and checked the prompt to add Miniforge3 to PATH. This did work, as I found a directory in the user environment PATH.

This makes it very weird to me, that neither the Windows terminal nor Miniforge Prompt recognizes conda or python. Every answer on here or elsewhere points to add it to the PATH, but from what I understood, it should be enough to have the necessary directories in the uses environment variables.

The main problem:

Neither the terminal, nor Miniforge Prompt recognizes conda or python, so no environments can be activated and no scripts can be run

What I tried:

Installation with automatic addition to PATH

Installation with manual addition to PATH after the installation was finished

What the user PATH looks like:

C:\Users\firstname lastname\miniforge3

C:\Users\firstname lastname\miniforge3\Library\mingw-w64\bin

C:\Users\firstname lastname\miniforge3\Library\usr\bin

C:\Users\firstname lastname\miniforge3\Library\bin

C:\Users\firstname lastname\miniforge3\Scripts

...

the _conda.exe file is located in the first directory of the PATH