问:
How to make input correspond with a collection of values, and make a decision based on the input?
The goal here is to write a function called displayPerson that takes in an integer called id as its first parameter, and a dictionary as its second parameter, called personData.
The purpose of the function is to print the name and birthday of a given user identified by the input id. If there is no entry with the given id, then print “No user found with that id” instead.
The format should be “Person # id is name with a birthday of
date”, where id is the id # inputted, and name is the name of the person (from the file) and date is the birthday of the user (formatted as YYYY-MM-DD.

This is what I have so far

```<code>import argparse
import urllib.request
import datetime
import logging

#url https://s3.amazonaws.com/cuny-is211-spring2015/birthdays100.csv
#url = input('Insert URL here: ')

url = "https://s3.amazonaws.com/cuny-is211-spring2015/birthdays100.csv"

def downloadData(url):
    response = urllib.request.urlopen(url)
    data = response.read().decode('utf-8')
    #print(data)
    return data

def processData(file_content):
    dictionary = {}
    #print(file_content)
    # [
    #   "1,Charles Paige,06/01/1963",
    #   "2,Andrew Bell,29/03/1972",
    #   ...
    #   "99,Alan Wilson,03/04/1960",
    #   "100,Austin Burgess,04/06/1979"
    # ]

    count = 0
    data_items = file_content.splitlines()
    logging.basicConfig(filename='error.log', filemode='w', level=logging.ERROR)
    for line in data_items[1:]:
        data_pieces = line
        data_pieces = data_pieces.split(',')
        # ["1", "Charles Paige", "06/01/1963"]
        count = count + 1
        #print(data_pieces)
    #   dictionary[data_pieces[0]] = (data_pieces[1]), datetime.datetime.strptime((data_pieces[2]), '%d/%m/%Y')
        try:
            dictionary[data_pieces[0]] = (data_pieces[1]), datetime.datetime.strptime((data_pieces[2]), '%d/%m/%Y')
        except ValueError:
            logging.error("Error processing line #: " + str(count) + " for ID #: " + str(data_pieces[0]))
    return dictionary

def displayPerson(id, personData):
    #print(personData)
    #return
    try:
        id = input("ID:")
        print("Person #" + id + "is" + dictionary[data_pieces[1]] + "with a birthday of" + datetime.datetime.strptime((data_pieces[2]), '%Y-%m-%d'))
    except:
        print("No user ID found")

def main():
    downloadData(url)
    file_content = downloadData(url)
    values = processData(file_content)
    #print(values)
    displayPerson(id, values)
</code>```

When I input an ID number, it raises the except every time. I'm not sure how to format the code to correspond the ID number with the values from the dictionary I created in processData.

答:
Your code all seems to work OK except for the print line in your displayPerson function. Replace that line with this, and I think you'll get the behavior you're looking for:

```<code>print("Person #" + id + " is " + personData[id][0] + " with a birthday of " + personData[id][1].strftime('%d/%m/%Y'))
</code>```

When I enter a value of "1", I get the following output:

```<code>Person #1 is Charles Paige with a birthday of 06/01/1963
</code>```

Body:
The goal here is to write a function called displayPerson that takes in an integer called id as its first parameter, and a dictionary as its second parameter, called personData.
The purpose of the function is to print the name and birthday of a given user identified by the input id. If there is no entry with the given id, then print “No user found with that id” instead.
The format should be “Person # id is name with a birthday of
date”, where id is the id # inputted, and name is the name of the person (from the file) and date is the birthday of the user (formatted as YYYY-MM-DD.

This is what I have so far

import argparse
import urllib.request
import datetime
import logging

#url https://s3.amazonaws.com/cuny-is211-spring2015/birthdays100.csv
#url = input('Insert URL here: ')

url = "https://s3.amazonaws.com/cuny-is211-spring2015/birthdays100.csv"

def downloadData(url):
    response = urllib.request.urlopen(url)
    data = response.read().decode('utf-8')
    #print(data)
    return data

def processData(file_content):
    dictionary = {}
    #print(file_content)
    # [
    #   "1,Charles Paige,06/01/1963",
    #   "2,Andrew Bell,29/03/1972",
    #   ...
    #   "99,Alan Wilson,03/04/1960",
    #   "100,Austin Burgess,04/06/1979"
    # ]

    count = 0
    data_items = file_content.splitlines()
    logging.basicConfig(filename='error.log', filemode='w', level=logging.ERROR)
    for line in data_items[1:]:
        data_pieces = line
        data_pieces = data_pieces.split(',')
        # ["1", "Charles Paige", "06/01/1963"]
        count = count + 1
        #print(data_pieces)
    #   dictionary[data_pieces[0]] = (data_pieces[1]), datetime.datetime.strptime((data_pieces[2]), '%d/%m/%Y')
        try:
            dictionary[data_pieces[0]] = (data_pieces[1]), datetime.datetime.strptime((data_pieces[2]), '%d/%m/%Y')
        except ValueError:
            logging.error("Error processing line #: " + str(count) + " for ID #: " + str(data_pieces[0]))
    return dictionary

def displayPerson(id, personData):
    #print(personData)
    #return
    try:
        id = input("ID:")
        print("Person #" + id + "is" + dictionary[data_pieces[1]] + "with a birthday of" + datetime.datetime.strptime((data_pieces[2]), '%Y-%m-%d'))
    except:
        print("No user ID found")

def main():
    downloadData(url)
    file_content = downloadData(url)
    values = processData(file_content)
    #print(values)
    displayPerson(id, values)

When I input an ID number, it raises the except every time. I'm not sure how to format the code to correspond the ID number with the values from the dictionary I created in processData.

Body:
Your code all seems to work OK except for the print line in your displayPerson function. Replace that line with this, and I think you'll get the behavior you're looking for:

print("Person #" + id + " is " + personData[id][0] + " with a birthday of " + personData[id][1].strftime('%d/%m/%Y'))

When I enter a value of "1", I get the following output:

Person #1 is Charles Paige with a birthday of 06/01/1963


来源: stackexchange

问:
Explain Why does this C code give output False?
```<code>#include<stdio.h>
int main()
{
    int a=4,b=15,c=29;
    if(c>b>a)
    {
        printf("True");
    }
    else
    {
        printf("False");
    }
    return 0;
}
</code>```

When I run the above code in my dev C++ compiler, it gives me the following output.

enter image description here

答:
In your code

```<code>c>b>a
</code>```

is same as

```<code>((c>b) > a)
</code>```

The output of a relational operator, like > is either 0 or 1, and the type is int.

Either of those values, in this case, is less than the value of a, which is 4. So in your case (b=15,c=29), it becomes

```<code>(1 > a)
</code>```

which is falsy.

If you want to chain the condition check, you should write

```<code>((c>b) && (b>a))
</code>```

ContentLicense: CC BY-SA 4.0

Body:
#include<stdio.h>
int main()
{
    int a=4,b=15,c=29;
    if(c>b>a)
    {
        printf("True");
    }
    else
    {
        printf("False");
    }
    return 0;
}

When I run the above code in my dev C++ compiler, it gives me the following output.

enter image description here

Body:
In your code

c>b>a

is same as

((c>b) > a)

The output of a relational operator, like > is either 0 or 1, and the type is int.

Either of those values, in this case, is less than the value of a, which is 4. So in your case (b=15,c=29), it becomes

(1 > a)

which is falsy.

If you want to chain the condition check, you should write

((c>b) && (b>a))


问:
Won't let me find average of the dictionary
I need to have a dictionary created by what the user inputs. I then need to allow them to input a name and time length which I have managed successfully. I also think I got it to tell me the shortest and longest length correctly. However, for some reason it won't let me calculate an average. I have spent hours researching it on youtube and trying different things, so my hypothesis is that something is incorrect at the top of my code which isn't allowing the calculation of an average.</p>
```<code>n = int(input())
my_dict = {}

for i in range(n):
    titles=input("What is the ")
    length=input("What is length?")
    my_dict[titles] = length
print ("You have", n," on your. The names of your are:", my_dict)

shortest = min(my_dict.values())
longest = max(my_dict.values())

print("Your shortest video is", shortest,"minutes long.")
print("Your longest video is", longest,"minutes long.")

average = sum(my_dict.values())/ len(v)

print("Your average length is", average)
</code>```

答:
Inputs in Python are stored as strings. Change the commented line and you are good to go. EDIT: If time values also contain floats then you can also change the line length=int(input("What is length?")) to length=float(input("What is length?"))

```<code>n = int(input())
my_dict = {}

for i in range(n):
    titles=input("What is the ")
    length=int(input("What is length?")) # You were taking the input of length as a string.
    my_dict[titles] = length
print ("You have", n," on your. The names of your are:", my_dict)

shortest = min(my_dict.values())
longest = max(my_dict.values())

print("Your shortest video is", shortest,"minutes long.")
print("Your longest video is", longest,"minutes long.")

average = sum(my_dict.values())/ len(my_dict)

print("Your average length is", average)
</code>```

Body:
I need to have a dictionary created by what the user inputs. I then need to allow them to input a name and time length which I have managed successfully. I also think I got it to tell me the shortest and longest length correctly. However, for some reason it won't let me calculate an average. I have spent hours researching it on youtube and trying different things, so my hypothesis is that something is incorrect at the top of my code which isn't allowing the calculation of an average.

n = int(input())
my_dict = {}

for i in range(n):
    titles=input("What is the ")
    length=input("What is length?")
    my_dict[titles] = length
print ("You have", n," on your. The names of your are:", my_dict)

shortest = min(my_dict.values())
longest = max(my_dict.values())

print("Your shortest video is", shortest,"minutes long.")
print("Your longest video is", longest,"minutes long.")

average = sum(my_dict.values())/ len(v)

print("Your average length is", average)

Body:
Inputs in Python are stored as strings. Change the commented line and you are good to go. EDIT: If time values also contain floats then you can also change the line length=int(input("What is length?")) to length=float(input("What is length?"))

n = int(input())
my_dict = {}

for i in range(n):
    titles=input("What is the ")
    length=int(input("What is length?")) # You were taking the input of length as a string.
    my_dict[titles] = length
print ("You have", n," on your. The names of your are:", my_dict)

shortest = min(my_dict.values())
longest = max(my_dict.values())

print("Your shortest video is", shortest,"minutes long.")
print("Your longest video is", longest,"minutes long.")

average = sum(my_dict.values())/ len(my_dict)

print("Your average length is", average)


问:
Why does an AWS RDS subnet group require multiple availability zones?
When creating a new RDS MS SQL instance it requires a subnet group that spans multiple availability zones.  I understand that this is different to Multi A-Z replication and that my instance will exist within a single availability region.
So what is this actually doing when I'm adding this subnet group spanning different zones?</p>

答:
There are separate plans for [Multi-AZ deployment (one standby)] and Multi-AZ deployment (two readable standbys). so it can't be that the other AZ will be used as standby since you're deploying a single AZ instance.

According to FAQs, RDS Backups are stored in S3. [Amazon RDS FAQs]

Q: Where are my automated backups and DB snapshots stored and how do I manage their retention?
A: Amazon RDS DB snapshots and automated backups are stored in S3.

as it turns out, there's no specific reason [again, from the same FAQs page]--

Then why does it need you to define other AZ?
For Multi-AZ deployments, defining a subnet for all Availability Zones in a
Region will allow Amazon RDS to create a new standby in another Availability
Zone should the need arise. You need to do this even for Single-AZ deployments,
just in case you want to convert them to Multi-AZ deployments at some point.

The second subnet is just sitting there doing nothing waiting for you to upgrade to Multi-AZ. This is just how it is designed and implemented, to ease the conversion later if needed. Probably to make migration to Multi-AZ as simple as possible. [aws re:post]

In case of failure, will AWS automatically transition the RDS to the second subnet? --
No, it will only transition to the second subnet if Multi-AZ is enabled.

ContentLicense: CC BY-SA 3.0


问:
Duplicate entry sql when loading initial data for sql database -Springboot
I had this kind of error when add value to sql database.

Error:

```<code>java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSourceScriptDatabaseInitializer' defined in class path resource [org/springframework/boot/autoconfigure/sql/init/DataSourceInitializationConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.jdbc.datasource.init.ScriptStatementFailedException: Failed to execute SQL script statement #1 of class path resource [data.sql]: INSERT INTO `Tax` VALUES (1,'0',3,6); nested exception is java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '1' for key 'Tax.PRIMARY'
Caused by: org.springframework.jdbc.datasource.init.ScriptStatementFailedException: Failed to execute SQL script statement #1 of class path resource [data.sql]: INSERT INTO `Tax` VALUES (1,'0',3,6); nested exception is java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '1' for key 'Tax.PRIMARY'
Caused by: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '1' for key 'Tax.PRIMARY'

</code>```

When i change the ID to 2 (primary key) , the problem it fix for mvn clean package. However when i run java . jar file the problem appear again and state '' Duplicate entry '2' ". How can i  fix this problem

schema.sql

```<code>CREATE TABLE  IF NOT EXISTS  `Tax` (

    `id` INT(10) NOT NULL AUTO_INCREMENT,

    `taxable_income` CHAR(50) NOT NULL,

    `addition_charge` DECIMAL(5,2) NOT NULL,

    `charge_every_one_dollar` DECIMAL(5,2) NOT NULL,

    primary key (`id`)
);

</code>```

data.sql

```<code>INSERT INTO `Tax` VALUES
   (1,'0',3,6);
</code>```

答:
Since the id is already AUTO_INCREMENT, you can fix it simply by not defining the id when inserting:

```<code>INSERT INTO `Tax`(`taxable_income`, `addition_charge`, `charge_every_one_dollar`)
VALUES
   ('0',3,6);
</code>```

The id column will automatically add itself based on last AUTO_INCREMENT value. You can check that by running:

```<code>SHOW CREATE TABLE `Tax`;
+-------+--------------------------------------------------+
| Table | Create Table                                     |
+-------+--------------------------------------------------+
|  Tax  | CREATE TABLE `Tax` (                             |
|       |  `id` int NOT NULL AUTO_INCREMENT,               |
|       |  `taxable_income` char(50) NOT NULL,             |
|       |  `addition_charge` decimal(5,2) NOT NULL,        |
|       |  `charge_every_one_dollar` decimal(5,2) NOT NULL,|
|       |  PRIMARY KEY (`id`)                              |
|       |  ) ENGINE=InnoDB AUTO_INCREMENT=3                |
+-------+--------------------------------------------------+
                                        ^^^^
                                     this is the last value
</code>```

Demo fiddle

Body:
I had this kind of error when add value to sql database.

Error:

java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSourceScriptDatabaseInitializer' defined in class path resource [org/springframework/boot/autoconfigure/sql/init/DataSourceInitializationConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.jdbc.datasource.init.ScriptStatementFailedException: Failed to execute SQL script statement #1 of class path resource [data.sql]: INSERT INTO `Tax` VALUES (1,'0',3,6); nested exception is java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '1' for key 'Tax.PRIMARY'
Caused by: org.springframework.jdbc.datasource.init.ScriptStatementFailedException: Failed to execute SQL script statement #1 of class path resource [data.sql]: INSERT INTO `Tax` VALUES (1,'0',3,6); nested exception is java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '1' for key 'Tax.PRIMARY'
Caused by: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '1' for key 'Tax.PRIMARY'

When i change the ID to 2 (primary key) , the problem it fix for mvn clean package. However when i run java . jar file the problem appear again and state '' Duplicate entry '2' ". How can i  fix this problem

schema.sql

CREATE TABLE  IF NOT EXISTS  `Tax` (

    `id` INT(10) NOT NULL AUTO_INCREMENT,

    `taxable_income` CHAR(50) NOT NULL,

    `addition_charge` DECIMAL(5,2) NOT NULL,

    `charge_every_one_dollar` DECIMAL(5,2) NOT NULL,

    primary key (`id`)
);

data.sql

INSERT INTO `Tax` VALUES
   (1,'0',3,6);

Body:
Since the id is already AUTO_INCREMENT, you can fix it simply by not defining the id when inserting:

INSERT INTO `Tax`(`taxable_income`, `addition_charge`, `charge_every_one_dollar`)
VALUES
   ('0',3,6);

The id column will automatically add itself based on last AUTO_INCREMENT value. You can check that by running:

SHOW CREATE TABLE `Tax`;
+-------+--------------------------------------------------+
| Table | Create Table                                     |
+-------+--------------------------------------------------+
|  Tax  | CREATE TABLE `Tax` (                             |
|       |  `id` int NOT NULL AUTO_INCREMENT,               |
|       |  `taxable_income` char(50) NOT NULL,             |
|       |  `addition_charge` decimal(5,2) NOT NULL,        |
|       |  `charge_every_one_dollar` decimal(5,2) NOT NULL,|
|       |  PRIMARY KEY (`id`)                              |
|       |  ) ENGINE=InnoDB AUTO_INCREMENT=3                |
+-------+--------------------------------------------------+
                                        ^^^^
                                     this is the last value

Demo fiddle


问:
How to build a release mode without a key in flutter - Flutter debug mode is so slow
Whenever I try to test my app with flutter run command it's so laggy and slow and I can't determine how is my app performance in a release mode. However for building the app in release mode for android we need to make a key for the app and it doesn't show most of the Log files and Prints.

So the question is, Is there any way to run the app in release mode format but with debug features?

答:
Run this command in your terminal: flutter run --release

Thank you


问:
LINQ not checking for null
The following code is supposed to take a simple average of Tuition rates if present for each row, but the requirement dictates the imported data set allow null values.

The line below is not properly checking value and I am getting the error: "ArgumentNullException was unhandled by user code, Value cannot be null."

```<code>TUITIONCurr = g
    .Where(p => !object.Equals(p.Field<double>("TUITION"),null))
    .DefaultIfEmpty()
    .Average(p => p.Field<double>("TUITION")),
</code>```

答:
Instead of the DataRow.Field method, try using DataRow.IsNull. Also, you don't need the call to DefaultIfEmpty().

E.g.:

```<code>TUITIONCurr = g
   .Where(p => !p.IsNull("TUITION"))
   .Average(p => p.Field<double>("TUITION")),
</code>```

Title: LINQ not checking for null

Body:
The following code is supposed to take a simple average of Tuition rates if present for each row, but the requirement dictates the imported data set allow null values.

The line below is not properly checking value and I am getting the error: "ArgumentNullException was unhandled by user code, Value cannot be null."

TUITIONCurr = g
    .Where(p => !object.Equals(p.Field<double>("TUITION"),null))
    .DefaultIfEmpty()
    .Average(p => p.Field<double>("TUITION")),

Body:
Instead of the DataRow.Field method, try using DataRow.IsNull. Also, you don't need the call to DefaultIfEmpty().

E.g.:

TUITIONCurr = g
   .Where(p => !p.IsNull("TUITION"))
   .Average(p => p.Field<double>("TUITION")),


问:
deleting existing docker images from EC2 using Jenkins
I have to run some containers from the images present in AWS ECR.As i need to automate this i am using Jenkins.

I have 4 ECR repositories as soon as a new version of image comes in this repository my jenkins job will trigger and create a new container.So as the code of microservice is changing and i am getting new image in ECR i have to delete the old container and run the new one on same port.

I am using "Send file or execute commands over SSH" of Jenkins to do this.
Then i am providing commands like below

```<code>   aws ecr get-login --no-include-email > login.sh
   bash login.sh
   docker pull 944198216610.dkr.ecr.us-east-1.amazonaws.com/demo-
     docker:latest
   docker run -d -p 8081:80 944198216610.dkr.ecr.us-east-
        1.amazonaws.com/demo-docker:latest
</code>```

Now the problem is whenever i get new image i have to stop the earlier container running and for that i need container-id. I dont know to fetch container-id here to stop the container.Any help in this is highly appreciated.

答:
Following is the command to remove downloaded images from EC2 server:

```<code>docker image prune
</code>```

Let me know if you face any issues running it.

Body:
I have to run some containers from the images present in AWS ECR.As i need to automate this i am using Jenkins.

I have 4 ECR repositories as soon as a new version of image comes in this repository my jenkins job will trigger and create a new container.So as the code of microservice is changing and i am getting new image in ECR i have to delete the old container and run the new one on same port.

I am using "Send file or execute commands over SSH" of Jenkins to do this.
Then i am providing commands like below

   aws ecr get-login --no-include-email > login.sh
   bash login.sh
   docker pull 944198216610.dkr.ecr.us-east-1.amazonaws.com/demo-
     docker:latest
   docker run -d -p 8081:80 944198216610.dkr.ecr.us-east-
        1.amazonaws.com/demo-docker:latest

Now the problem is whenever i get new image i have to stop the earlier container running and for that i need container-id. I dont know to fetch container-id here to stop the container.Any help in this is highly appreciated.

Body:
Following is the command to remove downloaded images from EC2 server:

docker image prune

Let me know if you face any issues running it.


问:
C# with Selenium xunit testing Bypass SSL Error "Your connection is not private"
I am using xunit test framework with C# to automate testing of a web app. But when I run the tests the automatically opened browser can not proceed to the website because of ssl error and is displaying "Your connection is not private" message and the test fails due to this. DesiredCapabilities class, which was a solution to the problem is deprecated. What is the solution?

答:
I got the answer from the question posted here</p>
```<code>ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.AddArguments("--headless", "--disable-gpu", "--window-size=1920,1200","--ignore-certificate-errors");
</code>```

Body:
I got the answer from the question posted here

ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.AddArguments("--headless", "--disable-gpu", "--window-size=1920,1200","--ignore-certificate-errors");


问:
Show up a panel with slide effect when there is focus on specific input box
I need to implement (vertical slide in) show effect on a output panel when there is a focus on a textbox. (Initially the outputPanel should not be visible on screen, but when there is a focus on the input box, the outputPanel must show up with a slide in effect.)

```<code>    <p:inputTextarea>
        <p:effect event="focus" for="inputPanel" type="slide"/>
    </p:inputTextarea>

    <p:outputPanel id="inputPanel" style="display: none;" >
        ......
    </p:outputPanel>
</code>```

Using:

Primefaces 3.0 M3 Snapshot

JSF 2.0 with Facelets

答:
You can find the PrimeFaces guide here.

Use f:param to provide parameters to configure the animation.

Check this JQuery Docs to learn about the parameters for the effects.

```<code><p:inputTextarea>
    <p:effect event="focus" for="inputPanel" type="slide">
        <f:param name="mode" value="'show'" />
        <f:param name="direction" value="'up'" />
    </p:effect>
    <p:effect event="blur" for="inputPanel" type="slide">
        <f:param name="mode" value="'hide'" />
        <f:param name="direction" value="'up'" />
    </p:effect>
</p:inputTextarea>

<p:outputPanel id="inputPanel" layout="block" style="width: 400px; height: 200px; display: none;">
    <p:panel header="Panel inside OutputPanel" >
        <h1>Applying effect on output-panel.</h1>
    </p:panel>
</p:outputPanel>
</code>```

Also for the <p:outputPanel specify the attribute layout with the value of "block" to make PrimeFaces render a DIV instead of SPAN because the default value for layout attribute is "inline".

Body:
I need to implement (vertical slide in) show effect on a output panel when there is a focus on a textbox. (Initially the outputPanel should not be visible on screen, but when there is a focus on the input box, the outputPanel must show up with a slide in effect.)

        ......

Using:

Primefaces 3.0 M3 Snapshot

JSF 2.0 with Facelets

Body:
You can find the PrimeFaces guide here.

Use f:param to provide parameters to configure the animation.

Check this JQuery Docs to learn about the parameters for the effects.

<p:inputTextarea>
    <p:effect event="focus" for="inputPanel" type="slide">
        <f:param name="mode" value="'show'" />
        <f:param name="direction" value="'up'" />
    </p:effect>
    <p:effect event="blur" for="inputPanel" type="slide">
        <f:param name="mode" value="'hide'" />
        <f:param name="direction" value="'up'" />
    </p:effect>
</p:inputTextarea>

<p:outputPanel id="inputPanel" layout="block" style="width: 400px; height: 200px; display: none;">
    <p:panel header="Panel inside OutputPanel" >
        <h1>Applying effect on output-panel.</h1>
    </p:panel>
</p:outputPanel>

Also for the <p:outputPanel specify the attribute layout with the value of "block" to make PrimeFaces render a DIV instead of SPAN because the default value for layout attribute is "inline".


问:
How to fix CORS error when getting contents from a website?
There is a CORS error in my code that gets the contents from https://roblox.com/discover to clone the roblox discover page.

My code:

```<code><?php
   echo file_get_contents("https://www.roblox.com/discover");
?>
</code>```

If I go to console, it says

Access to XMLHttpRequest at 'robloxscript' from origin 'yoursite' has
been blocked by CORS policy: Response to preflight request doesn't
pass access control check: No 'Access-Control-Allow-Origin' header is
present on the requested resource.

How can I go about fixing this?

答: You cannot do that. Because of security reasons. Different domain. For you to be able to consume that page you will have to fetch the data using a client request and manipulate the dom to get what you want.</p>

Body:
There is a CORS error in my code that gets the contents from https://roblox.com/discover to clone the roblox discover page.

My code:

<?php
   echo file_get_contents("https://www.roblox.com/discover");
?>

If I go to console, it says

Access to XMLHttpRequest at 'robloxscript' from origin 'yoursite' has
been blocked by CORS policy: Response to preflight request doesn't
pass access control check: No 'Access-Control-Allow-Origin' header is
present on the requested resource.

How can I go about fixing this?


问:
Flutter : Could not load compiled classes for build file '...\android\build.gradle' from cache
Run without debugging:

```<code>A problem occurred configuring root project 'android'.
> Could not load compiled classes for build file 'D:\FLUTTER\task_manager\android\build.gradle' from cache.
</code>```

Stacktrace:

```A problem occurred configuring root project 'android'.
> Could not load compiled classes for build file 'D:\FLUTTER\task_manager\android\build.gradle' from cache.

* Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'android'.
        at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:75)
        .
        at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
        at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
        at org.gradle.configuration.BuildOperationFiringProjectsPreparer.prepareProjects(BuildOperationFiringProjectsPreparer.java:40)
        at org.gradle.initialization.DefaultGradleLauncher.prepareProjects(DefaultGradleLauncher.java:226)
        at org.gradle.initialization.DefaultGradleLauncher.doClassicBuildStages(DefaultGradleLauncher.java:164)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
        at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:125)
        at org.gradle.internal.invocation.GradleBuildController$1.create(GradleBuildController.java:71)
        at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:213)
        at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:67)
        at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:56)
        at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:31)
        at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
        at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:66)
        at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
        at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:90)
        at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41)
        at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:49)
        at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:44)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)
        at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
        at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:44)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.lambda$execute$0(InProcessBuildActionExecuter.java:59)
        at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:86)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:58)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
        at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.lambda$execute$0(BuildTreeScopeLifecycleBuildActionExecuter.java:34)
        at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:53)
        at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.execute(BuildTreeScopeLifecycleBuildActionExecuter.java:33)
        at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.execute(BuildTreeScopeLifecycleBuildActionExecuter.java:28)
        at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:104)
        at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:55)
        at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:64)
        at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:37)
        at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.lambda$execute$0(SessionScopeLifecycleBuildActionExecuter.java:54)
        at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:67)
        at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.execute(SessionScopeLifecycleBuildActionExecuter.java:50)
        at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.execute(SessionScopeLifecycleBuildActionExecuter.java:36)
        at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36)
        at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25)
        at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:59)
        at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31)
        at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:58)
        at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:42)
        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.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:48)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: org.gradle.api.GradleException: Could not load compiled classes for build file 'D:\FLUTTER\task_manager\android\build.gradle' from cache.
        at org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler$ClassesDirCompiledScript.loadClass(DefaultScriptCompilationHandler.java:333)
        at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.getScript(DefaultScriptRunnerFactory.java:55)
        at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:86)
        at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.lambda$apply$0(DefaultScriptPluginFactory.java:133)
        at org.gradle.configuration.ProjectScriptTarget.addConfiguration(ProjectScriptTarget.java:77)
        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$3.execute(DefaultBuildOperationRunner.java:75)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
        at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
        at org.gradle.configuration.BuildOperationScriptPlugin.lambda$apply$0(BuildOperationScriptPlugin.java:62)
        at org.gradle.configuration.internal.DefaultUserCodeApplicationContext.apply(DefaultUserCodeApplicationContext.java:43)
        at org.gradle.configuration.BuildOperationScriptPlugin.apply(BuildOperationScriptPlugin.java:62)
        at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$applyToMutableState$0(DefaultProjectStateRegistry.java:250)
        at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:277)
        at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.applyToMutableState(DefaultProjectStateRegistry.java:249)
        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:100)
        at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$applyToMutableState$0(DefaultProjectStateRegistry.java:250)
        at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$withProjectLock$3(DefaultProjectStateRegistry.java:310)
        at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:213)
        at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withProjectLock(DefaultProjectStateRegistry.java:310)
        at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:291)
        at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.applyToMutableState(DefaultProjectStateRegistry.java:249)
        at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.run(LifecycleProjectEvaluator.java:91)
        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$3.execute(DefaultBuildOperationRunner.java:75)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
        at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
        at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:63)
        at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:723)
        at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:150)
        at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:41)
        at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:67)
        at org.gradle.configuration.DefaultProjectsPreparer.prepareProjects(DefaultProjectsPreparer.java:46)
        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$3.execute(DefaultBuildOperationRunner.java:75)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
        at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
        at org.gradle.configuration.BuildOperationFiringProjectsPreparer.prepareProjects(BuildOperationFiringProjectsPreparer.java:40)
        at org.gradle.initialization.DefaultGradleLauncher.prepareProjects(DefaultGradleLauncher.java:226)
        at org.gradle.initialization.DefaultGradleLauncher.doClassicBuildStages(DefaultGradleLauncher.java:164)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
        at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:125)
        at org.gradle.internal.invocation.GradleBuildController$1.create(GradleBuildController.java:71)
        at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:213)
        at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:67)
        at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:56)
        at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:31)
        at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
        at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:66)
        at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
        at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:90)
        at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41)
        at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:49)
        at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:44)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
        .
        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.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:48)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: java.lang.ClassNotFoundException: build_e3ugssqeiptmghhqocaem4j36
        at org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler$ScriptClassLoader.loadClass(DefaultScriptCompilationHandler.java:371)
        at org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler$ClassesDirCompiledScript.loadClass(DefaultScriptCompilationHandler.java:328)
        ... 140 more
```

I think the problem starts when I try to integrate Firebase and add relevant dependencies (core, auth, firestore and storage). I am using git, so I have tried this multiple times in this same project. But the error does not go away if I remove the dependencies or any other changes I have made for integrating Firebase.

答:
Ok, so did the following, which seems to have solved the problem. Though I have no clue about why I had this issue in the first place, I am posting this answer for anyone who might be facing a similar problem.

First of all, after referring to another project of mine, I re-ordered these lines in android/build.gradle from -

```<code>dependencies {
    classpath 'com.android.tools.build:gradle:7.0.2'
    classpath 'com.google.gms:google-services:4.3.10'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
</code>```

to -

```<code>dependencies {
    classpath 'com.android.tools.build:gradle:7.0.2'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    classpath 'com.google.gms:google-services:4.3.10'
}
</code>```

I don't know how, but seemingly it changed the build error message. The new message indicated that there is problem with Firebase packages. So one-by-one, I had to change all of them to the older versions. i.e. in pubspec.yaml file, I changed the dependencies from -

```<code>firebase_core: ^1.12.0
firebase_auth: ^3.3.7
cloud_firestore: ^3.1.8
firebase_storage: ^10.2.7
</code>```

to -

```<code>firebase_core: 1.11.0
firebase_auth: 3.3.6
cloud_firestore: 3.1.7
firebase_storage: 10.2.6
</code>```

Now the project builds without any error. I have no idea why this happened and how exactly it got resolved. If anyone can throw light on it, please do.

Body:
Run without debugging:

A problem occurred configuring root project 'android'.
> Could not load compiled classes for build file 'D:\FLUTTER\task_manager\android\build.gradle' from cache.

Stacktrace:

A problem occurred configuring root project 'android'.
> Could not load compiled classes for build file 'D:\FLUTTER\task_manager\android\build.gradle' from cache.

* Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'android'.
        at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:75)
        .
        at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
        at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
        at org.gradle.configuration.BuildOperationFiringProjectsPreparer.prepareProjects(BuildOperationFiringProjectsPreparer.java:40)
        at org.gradle.initialization.DefaultGradleLauncher.prepareProjects(DefaultGradleLauncher.java:226)
        at org.gradle.initialization.DefaultGradleLauncher.doClassicBuildStages(DefaultGradleLauncher.java:164)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
        at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:125)
        at org.gradle.internal.invocation.GradleBuildController$1.create(GradleBuildController.java:71)
        at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:213)
        at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:67)
        at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:56)
        at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:31)
        at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
        at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:66)
        at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
        at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:90)
        at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41)
        at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:49)
        at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:44)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)
        at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
        at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:44)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.lambda$execute$0(InProcessBuildActionExecuter.java:59)
        at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:86)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:58)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
        at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.lambda$execute$0(BuildTreeScopeLifecycleBuildActionExecuter.java:34)
        at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:53)
        at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.execute(BuildTreeScopeLifecycleBuildActionExecuter.java:33)
        at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.execute(BuildTreeScopeLifecycleBuildActionExecuter.java:28)
        at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:104)
        at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:55)
        at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:64)
        at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:37)
        at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.lambda$execute$0(SessionScopeLifecycleBuildActionExecuter.java:54)
        at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:67)
        at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.execute(SessionScopeLifecycleBuildActionExecuter.java:50)
        at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.execute(SessionScopeLifecycleBuildActionExecuter.java:36)
        at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36)
        at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25)
        at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:59)
        at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31)
        at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:58)
        at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:42)
        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.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:48)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: org.gradle.api.GradleException: Could not load compiled classes for build file 'D:\FLUTTER\task_manager\android\build.gradle' from cache.
        at org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler$ClassesDirCompiledScript.loadClass(DefaultScriptCompilationHandler.java:333)
        at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.getScript(DefaultScriptRunnerFactory.java:55)
        at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:86)
        at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.lambda$apply$0(DefaultScriptPluginFactory.java:133)
        at org.gradle.configuration.ProjectScriptTarget.addConfiguration(ProjectScriptTarget.java:77)
        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$3.execute(DefaultBuildOperationRunner.java:75)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
        at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
        at org.gradle.configuration.BuildOperationScriptPlugin.lambda$apply$0(BuildOperationScriptPlugin.java:62)
        at org.gradle.configuration.internal.DefaultUserCodeApplicationContext.apply(DefaultUserCodeApplicationContext.java:43)
        at org.gradle.configuration.BuildOperationScriptPlugin.apply(BuildOperationScriptPlugin.java:62)
        at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$applyToMutableState$0(DefaultProjectStateRegistry.java:250)
        at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:277)
        at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.applyToMutableState(DefaultProjectStateRegistry.java:249)
        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:100)
        at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$applyToMutableState$0(DefaultProjectStateRegistry.java:250)
        at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$withProjectLock$3(DefaultProjectStateRegistry.java:310)
        at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:213)
        at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withProjectLock(DefaultProjectStateRegistry.java:310)
        at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:291)
        at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.applyToMutableState(DefaultProjectStateRegistry.java:249)
        at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.run(LifecycleProjectEvaluator.java:91)
        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$3.execute(DefaultBuildOperationRunner.java:75)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
        at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
        at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:63)
        at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:723)
        at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:150)
        at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:41)
        at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:67)
        at org.gradle.configuration.DefaultProjectsPreparer.prepareProjects(DefaultProjectsPreparer.java:46)
        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$3.execute(DefaultBuildOperationRunner.java:75)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
        at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
        at org.gradle.configuration.BuildOperationFiringProjectsPreparer.prepareProjects(BuildOperationFiringProjectsPreparer.java:40)
        at org.gradle.initialization.DefaultGradleLauncher.prepareProjects(DefaultGradleLauncher.java:226)
        at org.gradle.initialization.DefaultGradleLauncher.doClassicBuildStages(DefaultGradleLauncher.java:164)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
        at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:125)
        at org.gradle.internal.invocation.GradleBuildController$1.create(GradleBuildController.java:71)
        at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:213)
        at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:67)
        at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:56)
        at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:31)
        at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
        at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:66)
        at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
        at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:90)
        at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41)
        at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:49)
        at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:44)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
        .
        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.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:48)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: java.lang.ClassNotFoundException: build_e3ugssqeiptmghhqocaem4j36
        at org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler$ScriptClassLoader.loadClass(DefaultScriptCompilationHandler.java:371)
        at org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler$ClassesDirCompiledScript.loadClass(DefaultScriptCompilationHandler.java:328)
        ... 140 more

I think the problem starts when I try to integrate Firebase and add relevant dependencies (core, auth, firestore and storage). I am using git, so I have tried this multiple times in this same project. But the error does not go away if I remove the dependencies or any other changes I have made for integrating Firebase.

Body:
Ok, so did the following, which seems to have solved the problem. Though I have no clue about why I had this issue in the first place, I am posting this answer for anyone who might be facing a similar problem.

First of all, after referring to another project of mine, I re-ordered these lines in android/build.gradle from -

dependencies {
    classpath 'com.android.tools.build:gradle:7.0.2'
    classpath 'com.google.gms:google-services:4.3.10'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}

to -

dependencies {
    classpath 'com.android.tools.build:gradle:7.0.2'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    classpath 'com.google.gms:google-services:4.3.10'
}

I don't know how, but seemingly it changed the build error message. The new message indicated that there is problem with Firebase packages. So one-by-one, I had to change all of them to the older versions. i.e. in pubspec.yaml file, I changed the dependencies from -

firebase_core: ^1.12.0
firebase_auth: ^3.3.7
cloud_firestore: ^3.1.8
firebase_storage: ^10.2.7

to -

firebase_core: 1.11.0
firebase_auth: 3.3.6
cloud_firestore: 3.1.7
firebase_storage: 10.2.6

Now the project builds without any error. I have no idea why this happened and how exactly it got resolved. If anyone can throw light on it, please do.


问:
Get value from input field and insert in URL Javascript
I have a form on wordpress, I need to get a value from a field and pass it into this script. This is what I've managed to do so far. The redirection works perfectly. I just need to put the value into the url as a parameter. I don't know the basics or theories of javascript. I just google and manage to put them together. Could anyone please help me out?
Thanks!</p>
```<code><script>
  function getinputval()
    {
        var numpages1 = document.getElementById("numberofpages1").value;}
document.addEventListener( 'wpcf7mailsent', function( event ) {
if (document.getElementById('selectservice').value=='Certified Translation') {location.replace('https://example.com?add-to-cart=856&quantity=+numpages1;')}
else if (document.getElementById('selectservice').value=='Business Translation') {location.replace('http://www.redirectedpage2.com')}
else { location.replace('http://www.redirectedpage3.com/') }
}, false );
</script>
</code>```

答:
Listen so you want to get the value from the input field. Then there are some cases by which you can gather input mentioning some:

Do you want Live typing results

or want results when the user clicks somewhere else other than the
input box

or you want to get value on form submission

Formal Way of Gathering Data is On Submission(3). As the user is giving its concern to Give his data.
HTML

```<code><input type="text" name="name" id="uniquestring" value="value" />
</code>```

Javascript Function

```<code>var variablename = document.getElementById("uniquestring").value;
</code>```

So, What You want Means You want to redirect users to a particular website
I understand this use Form

```<code><form action="/action_page.php">
  <label for="fname">First name:</label>
  <input type="text" id="fname" name="fname"><br><br>
  <label for="lname">Last name:</label>
  <input type="text" id="lname" name="lname"><br><br>
  <input type="submit" value="Submit">
  <input type="submit" formaction="/action_page2.php" value="Submit to another page">
</form>
</code>```

And then create a variable to change form Value

```<code>    function select_change(){
var z = document.getElementById("form_action").selectedIndex;
var z1 = document.getElementsByTagName("option")[z].value;
alert ("Form action changed to "+z1);
}
</code>```

function select_change() {
var z = document.getElementById("form_action").selectedIndex;
var z1 = document.getElementsByTagName("option")[z].value;
alert("Form action changed to " + z1);
}
function myfunction() {
if (validation()) {
// Calling Validation function.
//select option value from select tag and storing it in a variable.
var x = document.getElementById("form_action").selectedIndex;
var action = document.getElementsByTagName("option")[x].value;
if (action !== "") {
document.getElementById("form_id").action = action;
document.getElementById("form_id").submit();
} else {
alert("Please set form action");
}
}
}
// Name and Email validation Function.
function validation() {
var name = document.getElementById("name").value;
var email = document.getElementById("email").value;
var emailReg = '';
if (name === '' || email === '') {
alert("Please fill all fields...!!!!!!");
return false;
} else if (!(email).match(emailReg)) {
alert("Invalid Email...!!!!!!");
return false;
} else {
return true;
}
}```
<pre class="snippet-code-html lang-html prettyprint-override"><code><!DOCTYPE html>
<html>
<head>
<title>Dynamically Change Form Action Using Javascript</title>
<!-- Include jQuery Library and File Here -->
<script type="text/javascript" src="js/form_action.js"></script>
<!-- Include CSS File Here -->
<link rel="stylesheet" href="css/style.css"/>
</head>
<body>
<div class="container">
<div class="main">
<h2>Dynamically Change Form Action Using Javascript</h2>
<form id="form_id" method="post" name="myform">
<label>Name :</label>
<input type="text" name="name" id="name"/>
<label>Email :</label>
<input type="text" name="email" id="email"/>
<label>Set Form Action :</label>
<select id="form_action" onChange="select_change()" >
<option value="">--- Set Form Action ---</option>
<option value="first.php">first.php</option>
<option value="second.php">second.php</option>
<option value="third.php">third.php</option>
</select>
<input type="button" value="Submit" onclick="myfunction()"/>
</form>
</div>
</div>
</body>
</html></code>```

Body:
Listen so you want to get the value from the input field. Then there are some cases by which you can gather input mentioning some:

Do you want Live typing results

or want results when the user clicks somewhere else other than the
input box

or you want to get value on form submission

Formal Way of Gathering Data is On Submission(3). As the user is giving its concern to Give his data.
HTML

<input type="text" name="name" id="uniquestring" value="value" />

Javascript Function

var variablename = document.getElementById("uniquestring").value;

So, What You want Means You want to redirect users to a particular website
I understand this use Form

<form action="/action_page.php">
  <label for="fname">First name:</label>
  <input type="text" id="fname" name="fname"><br><br>
  <label for="lname">Last name:</label>
  <input type="text" id="lname" name="lname"><br><br>
  <input type="submit" value="Submit">
  <input type="submit" formaction="/action_page2.php" value="Submit to another page">
</form>

And then create a variable to change form Value

    function select_change(){
var z = document.getElementById("form_action").selectedIndex;
var z1 = document.getElementsByTagName("option")[z].value;
alert ("Form action changed to "+z1);
}

function select_change() {
var z = document.getElementById("form_action").selectedIndex;
var z1 = document.getElementsByTagName("option")[z].value;
alert("Form action changed to " + z1);
}
function myfunction() {
if (validation()) {
// Calling Validation function.
//select option value from select tag and storing it in a variable.
var x = document.getElementById("form_action").selectedIndex;
var action = document.getElementsByTagName("option")[x].value;
if (action !== "") {
document.getElementById("form_id").action = action;
document.getElementById("form_id").submit();
} else {
alert("Please set form action");
}
}
}
// Name and Email validation Function.
function validation() {
var name = document.getElementById("name").value;
var email = document.getElementById("email").value;
var emailReg = '';
if (name === '' || email === '') {
alert("Please fill all fields...!!!!!!");
return false;
} else if (!(email).match(emailReg)) {
alert("Invalid Email...!!!!!!");
return false;
} else {
return true;
}
}

<!DOCTYPE html>
<html>
<head>
<title>Dynamically Change Form Action Using Javascript</title>
<!-- Include jQuery Library and File Here -->
<script type="text/javascript" src="js/form_action.js"></script>
<!-- Include CSS File Here -->
<link rel="stylesheet" href="css/style.css"/>
</head>
<body>
<div class="container">
<div class="main">
<h2>Dynamically Change Form Action Using Javascript</h2>
<form id="form_id" method="post" name="myform">
<label>Name :</label>
<input type="text" name="name" id="name"/>
<label>Email :</label>
<input type="text" name="email" id="email"/>
<label>Set Form Action :</label>
<select id="form_action" onChange="select_change()" >
<option value="">--- Set Form Action ---</option>
<option value="first.php">first.php</option>
<option value="second.php">second.php</option>
<option value="third.php">third.php</option>
</select>
<input type="button" value="Submit" onclick="myfunction()"/>
</form>
</div>
</div>
</body>
</html>