问:
BoxShadow effect only to the left and bottom of Container in Flutter
I was wondering if it is possible to have a shadow effect only to the left and the bottom of a Container like in the snip below? The orange shadow is on the left and the bottom. I'm still short of ideas as to how to bring about this effect. Below are the snip and the code that I've written:

```<code>class ProfileLastPub extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return StaggeredGridView.countBuilder(
      mainAxisSpacing: 15,
      crossAxisSpacing: 10,
      crossAxisCount: 4,
      staggeredTileBuilder: (index) =>
          StaggeredTile.count(2, index.isEven ? 3 : 2),
      itemBuilder: (context, index) => Card(
        clipBehavior: Clip.antiAlias,
        shape: RoundedRectangleBorder(
            borderRadius: index.isEven
                ? BorderRadius.only(
                    topRight: Radius.circular(30),
                    bottomLeft: Radius.circular(30))
                : BorderRadius.only(
                    topLeft: Radius.circular(30),
                    bottomRight: Radius.circular(30)),
            side: BorderSide(color: Colors.white, width: 3)),
        elevation: 15,
        shadowColor: Colors.orange,
        child: Image.asset(
          'assets/images/Membership – Platinum.png',
          fit: BoxFit.cover,
        ),
      ),
      itemCount: 4,
    );
  }
}
</code>```

The output that my code produces. The area marked in red is where I have the shadow which looks very mild.

答:
Instead of a Card Widget you try using a Container and edit the decoration property. As an example:</p>
```<code>Container(
  decoration: BoxDecoration(
    color: Colors.red,
    borderRadius: BorderRadius.only( //Edit the shape here
        bottomLeft: Radius.circular(10),
        topLeft: Radius.circular(10)
    ),
    boxShadow: [
      BoxShadow(
        color: Colors.orange, //Color of the shadow
        spreadRadius: 7,
        blurRadius: 8,
        offset: Offset(0, 3), //Offset of the shadow
      ),
    ],
  ),
)
</code>```

Body:
I was wondering if it is possible to have a shadow effect only to the left and the bottom of a Container like in the snip below? The orange shadow is on the left and the bottom. I'm still short of ideas as to how to bring about this effect. Below are the snip and the code that I've written:

class ProfileLastPub extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return StaggeredGridView.countBuilder(
      mainAxisSpacing: 15,
      crossAxisSpacing: 10,
      crossAxisCount: 4,
      staggeredTileBuilder: (index) =>
          StaggeredTile.count(2, index.isEven ? 3 : 2),
      itemBuilder: (context, index) => Card(
        clipBehavior: Clip.antiAlias,
        shape: RoundedRectangleBorder(
            borderRadius: index.isEven
                ? BorderRadius.only(
                    topRight: Radius.circular(30),
                    bottomLeft: Radius.circular(30))
                : BorderRadius.only(
                    topLeft: Radius.circular(30),
                    bottomRight: Radius.circular(30)),
            side: BorderSide(color: Colors.white, width: 3)),
        elevation: 15,
        shadowColor: Colors.orange,
        child: Image.asset(
          'assets/images/Membership – Platinum.png',
          fit: BoxFit.cover,
        ),
      ),
      itemCount: 4,
    );
  }
}

The output that my code produces. The area marked in red is where I have the shadow which looks very mild.

Body:
Instead of a Card Widget you try using a Container and edit the decoration property. As an example:

Container(
  decoration: BoxDecoration(
    color: Colors.red,
    borderRadius: BorderRadius.only( //Edit the shape here
        bottomLeft: Radius.circular(10),
        topLeft: Radius.circular(10)
    ),
    boxShadow: [
      BoxShadow(
        color: Colors.orange, //Color of the shadow
        spreadRadius: 7,
        blurRadius: 8,
        offset: Offset(0, 3), //Offset of the shadow
      ),
    ],
  ),
)


来源: stackexchange

问:
How to detect the closest value below and above a given reference variable in a data frame in R?
Consider the following random MWE.

For every row, I am trying to determine which variable has the closest value below the constant reference_day and which variable has the closest value above the constant reference_day.

```<code>df1 <-
  structure(
    list(id = 1:5,
      gender = c("female", "male", "male", "male", "male"),
      reference_day = structure(c(18052, NA, 18052, 18052, 18052), class = "Date"),
      var1 = structure(c(16505, 17144, 18139, NA, 16639), class = "Date"),
      var2 = structure(c(NA, 18042, 16544, 16697, NA), class = "Date"),
      var3 = structure(c(17845, 18070, 17152, 16571, NA), class = "Date")),
  row.names = c(NA, -5L), class = "data.frame")

df1

  id gender reference_day       var1       var2       var3
1  1 female    2019-06-05 2015-03-11       <NA> 2018-11-10
2  2   male          <NA> 2016-12-09 2019-05-26 2019-06-23
3  3   male    2019-06-05 2019-08-31 2015-04-19 2016-12-17
4  4   male    2019-06-05       <NA> 2015-09-19 2015-05-16
5  5   male    2019-06-05 2015-07-23       <NA>       <NA>
</code>```

The result I'm after is this:

```<code>  id gender reference_day       var1       var2       var3 closest_to_left closest_to_right
1  1 female    2019-06-05 2015-03-11       <NA> 2018-11-10            var3             <NA>
2  2   male          <NA> 2016-12-09 2019-05-26 2019-06-23            <NA>             <NA>
3  3   male    2019-06-05 2019-08-31 2015-04-19 2016-12-17            var3             var1
4  4   male    2019-06-05       <NA> 2015-09-19 2015-05-16            var2             <NA>
5  5   male    2019-06-05 2015-07-23       <NA>       <NA>            var1             <NA>
</code>```

After much trial and error, I was actually able to find a solution to this with the case_when function of dplyr, but it took an insane amount of boilerplate code, which lead me to think that there just has to be a more clever solution.

I personally prefer to work with dplyr, but any help is greatly appreciated.

答:
Here is another tidyverse approach:

First we calculate the difference of each var to the reference

Bring in long format

remove diff_ in varname

Create a helper column using only negative values

group and arrange

identify closest to left and right again with redefining the helper column: now with only positive values.

fill both closest columns to select each first row of the group with slice.

```<code>df1 %>%
  mutate(across(contains("var"), ~ parse_number(as.character(. - reference_day)), .names = "diff_{.col}")) %>%
  pivot_longer(cols = contains("diff")) %>%
  mutate(name = str_remove(name, '\\w+\\_'),
         helper = ifelse(value > 0, NA_real_, value)) %>%
  group_by(id) %>%
  arrange(desc(helper), .by_group = TRUE) %>%
  mutate(closest_to_left = ifelse(helper == max(helper, na.rm = TRUE), name, NA_character_),
         helper = ifelse(value < 0, NA_real_, value),
         closest_to_right = ifelse(helper == min(helper, na.rm = TRUE), name, NA_character_)) %>%
  fill(closest_to_left, .direction = "downup") %>%
  fill(closest_to_right, .direction = "downup") %>%
  slice(1) %>%
  select(-c(name, value, helper))
</code>```
```<code>     id gender reference_day var1       var2       var3       closest_to_left closest_to_right
  <int> <chr>  <date>        <date>     <date>     <date>     <chr>           <chr>
1     1 female 2019-06-05    2015-03-11 NA         2018-11-10 var3            NA
2     2 male   NA            2016-12-09 2019-05-26 2019-06-23 NA              NA
3     3 male   2019-06-05    2019-08-31 2015-04-19 2016-12-17 var3            var1
4     4 male   2019-06-05    NA         2015-09-19 2015-05-16 var2            NA
5     5 male   2019-06-05    2015-07-23 NA         NA         var1            NA
</code>```

ContentLicense: CC BY-SA 4.0

Body:
Consider the following random MWE.

For every row, I am trying to determine which variable has the closest value below the constant reference_day and which variable has the closest value above the constant reference_day.

df1 <-
  structure(
    list(id = 1:5,
      gender = c("female", "male", "male", "male", "male"),
      reference_day = structure(c(18052, NA, 18052, 18052, 18052), class = "Date"),
      var1 = structure(c(16505, 17144, 18139, NA, 16639), class = "Date"),
      var2 = structure(c(NA, 18042, 16544, 16697, NA), class = "Date"),
      var3 = structure(c(17845, 18070, 17152, 16571, NA), class = "Date")),
  row.names = c(NA, -5L), class = "data.frame")

df1

  id gender reference_day       var1       var2       var3
1  1 female    2019-06-05 2015-03-11       <NA> 2018-11-10
2  2   male          <NA> 2016-12-09 2019-05-26 2019-06-23
3  3   male    2019-06-05 2019-08-31 2015-04-19 2016-12-17
4  4   male    2019-06-05       <NA> 2015-09-19 2015-05-16
5  5   male    2019-06-05 2015-07-23       <NA>       <NA>

The result I'm after is this:

  id gender reference_day       var1       var2       var3 closest_to_left closest_to_right
1  1 female    2019-06-05 2015-03-11       <NA> 2018-11-10            var3             <NA>
2  2   male          <NA> 2016-12-09 2019-05-26 2019-06-23            <NA>             <NA>
3  3   male    2019-06-05 2019-08-31 2015-04-19 2016-12-17            var3             var1
4  4   male    2019-06-05       <NA> 2015-09-19 2015-05-16            var2             <NA>
5  5   male    2019-06-05 2015-07-23       <NA>       <NA>            var1             <NA>

After much trial and error, I was actually able to find a solution to this with the case_when function of dplyr, but it took an insane amount of boilerplate code, which lead me to think that there just has to be a more clever solution.

I personally prefer to work with dplyr, but any help is greatly appreciated.

Body:
Here is another tidyverse approach:

First we calculate the difference of each var to the reference

Bring in long format

remove diff_ in varname

Create a helper column using only negative values

group and arrange

identify closest to left and right again with redefining the helper column: now with only positive values.

fill both closest columns to select each first row of the group with slice.

df1 %>%
  mutate(across(contains("var"), ~ parse_number(as.character(. - reference_day)), .names = "diff_{.col}")) %>%
  pivot_longer(cols = contains("diff")) %>%
  mutate(name = str_remove(name, '\\w+\\_'),
         helper = ifelse(value > 0, NA_real_, value)) %>%
  group_by(id) %>%
  arrange(desc(helper), .by_group = TRUE) %>%
  mutate(closest_to_left = ifelse(helper == max(helper, na.rm = TRUE), name, NA_character_),
         helper = ifelse(value < 0, NA_real_, value),
         closest_to_right = ifelse(helper == min(helper, na.rm = TRUE), name, NA_character_)) %>%
  fill(closest_to_left, .direction = "downup") %>%
  fill(closest_to_right, .direction = "downup") %>%
  slice(1) %>%
  select(-c(name, value, helper))

     id gender reference_day var1       var2       var3       closest_to_left closest_to_right
  <int> <chr>  <date>        <date>     <date>     <date>     <chr>           <chr>
1     1 female 2019-06-05    2015-03-11 NA         2018-11-10 var3            NA
2     2 male   NA            2016-12-09 2019-05-26 2019-06-23 NA              NA
3     3 male   2019-06-05    2019-08-31 2015-04-19 2016-12-17 var3            var1
4     4 male   2019-06-05    NA         2015-09-19 2015-05-16 var2            NA
5     5 male   2019-06-05    2015-07-23 NA         NA         var1            NA


问:
How to forward progress bar of scp using ajax/php?
I am going to

initiate download (scp user@remote.computer.com/tmp/file /backup/) from a web browser

ajax (could be jQuery) the request to web server (suse)

where php will run the scp command

Is there any way that user could see the scp download progress bar in the browser?

答:
Not without a lot of messing around.

Of the top of my head you could redirect the output of SCP to a file, then have an AJAX request to a script that parses that file, and when a new line appears (assuming scp increments it's progress bar by seperating lines with \r) the PHP script exits in some way that instructs the browser to increment it's progress bar, then initiate the AJAX process again... and so on until scp terminates.

I have done stuff like this before, and I would say that it's not worth the massive effort for such a small nicety - unless you feel you don't have enough to do already...

It would be much easier to do stuff like this if browsers would let you read ajax.responseText before ajax.readyState == 4, but they don't, so it isn't.

EDIT

Just thought of an alternative approach to this that might be easier in some ways but more difficult in others:

If you put the progress bar in an  you wouldn't need to have the huge number of AJAX calls, and you could do it all by server-pushing javascript - but you will need a web server that supports this, and are somewhat relying on a browser that will handle the setup sensibly.

ContentLicense: CC BY-SA 3.0

Body:
Not without a lot of messing around.

Of the top of my head you could redirect the output of SCP to a file, then have an AJAX request to a script that parses that file, and when a new line appears (assuming scp increments it's progress bar by seperating lines with \r) the PHP script exits in some way that instructs the browser to increment it's progress bar, then initiate the AJAX process again... and so on until scp terminates.

I have done stuff like this before, and I would say that it's not worth the massive effort for such a small nicety - unless you feel you don't have enough to do already...

It would be much easier to do stuff like this if browsers would let you read ajax.responseText before ajax.readyState == 4, but they don't, so it isn't.

EDIT

Just thought of an alternative approach to this that might be easier in some ways but more difficult in others:

If you put the progress bar in an <iframe> you wouldn't need to have the huge number of AJAX calls, and you could do it all by server-pushing javascript - but you will need a web server that supports this, and are somewhat relying on a browser that will handle the setup sensibly.


问:
Extract content from blog
```<code>import scrapy
from scrapy.http import Request

class PushpaSpider(scrapy.Spider):
    name = 'pushpa'
    start_urls = ['https://davestruestories.medium.com']
    headers = {
        'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36'
    }

    # custom settings
    custom_settings = {
        'CONCURRENT_REQUESTS_PER_DOMAIN': 1,
        'DOWNLOAD_DELAY': 1
    }

    def parse(self, response):
        link=response.xpath("//h1/a/@href").extract()
        for links in link:
            url = response.urljoin(links)
            yield Request(url, callback=self.parse_book,headers=self.headers)

    def parse_book(self, response):
        title=response.xpath("//h1/text()").get()
        content=response.xpath("//section/text()").getall()
        yield{
            'title':title,
            'article':content
            }
</code>```

I want to extract content from the blog but they provided me nothing these is page link https://davestruestories.medium.com/?p=169d7850744a as you see below this is the content I want to extract

答:
Looks like your xpath is wrong

import scrapy

class PushpaSpider(scrapy.Spider):
    name = 'pushpa'
    start_urls = ['https://davestruestories.medium.com']

    custom_settings = {
        'CONCURRENT_REQUESTS_PER_DOMAIN': 1,
        'DOWNLOAD_DELAY': 1,
        'USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36'
    }

    def parse(self, response):
        links = response.xpath("//h1/a/@href").getall()
        for link in links:
            yield response.follow(link, callback=self.parse_book, headers=response.request.headers)

    def parse_book(self, response):
        title = response.xpath("//h1/text()").get()
        content = response.xpath("//section//p/text()").getall()
        # if you want a string instead of a list:
        # content = ''.join(content)

        # test which of this is better:
        # date = response.xpath('//div[section]//p/span/text()').get()
        date = response.xpath('//div//p/span/text()').get()

        yield{
            'title': title,
            'date': date,
            'article': content
        }
```

Also either add the user-agent to settings or create a start_requests method so you can add the user-agent to the first request.

Title: Extract content from blog

Body:
import scrapy
from scrapy.http import Request

class PushpaSpider(scrapy.Spider):
    name = 'pushpa'
    start_urls = ['https://davestruestories.medium.com']
    headers = {
        'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36'
    }

    # custom settings
    custom_settings = {
        'CONCURRENT_REQUESTS_PER_DOMAIN': 1,
        'DOWNLOAD_DELAY': 1
    }

    def parse(self, response):
        link=response.xpath("//h1/a/@href").extract()
        for links in link:
            url = response.urljoin(links)
            yield Request(url, callback=self.parse_book,headers=self.headers)

    def parse_book(self, response):
        title=response.xpath("//h1/text()").get()
        content=response.xpath("//section/text()").getall()
        yield{
            'title':title,
            'article':content
            }

I want to extract content from the blog but they provided me nothing these is page link https://davestruestories.medium.com/?p=169d7850744a as you see below this is the content I want to extract

Body:
Looks like your xpath is wrong

import scrapy

class PushpaSpider(scrapy.Spider):
    name = 'pushpa'
    start_urls = ['https://davestruestories.medium.com']

    custom_settings = {
        'CONCURRENT_REQUESTS_PER_DOMAIN': 1,
        'DOWNLOAD_DELAY': 1,
        'USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36'
    }

    def parse(self, response):
        links = response.xpath("//h1/a/@href").getall()
        for link in links:
            yield response.follow(link, callback=self.parse_book, headers=response.request.headers)

    def parse_book(self, response):
        title = response.xpath("//h1/text()").get()
        content = response.xpath("//section//p/text()").getall()
        # if you want a string instead of a list:
        # content = ''.join(content)

        # test which of this is better:
        # date = response.xpath('//div[section]//p/span/text()').get()
        date = response.xpath('//div//p/span/text()').get()

        yield{
            'title': title,
            'date': date,
            'article': content
        }

Also either add the user-agent to settings or create a start_requests method so you can add the user-agent to the first request.


问:
Play video in Foreground services with notification Control
Hey Everyone I am new in Android App development I want to play video in foreground service means when I press back button, home button or even in lock status audio from video should play in notification with the play, pause control I had tried but can't get proper result in a proper way, can anyone help me to do this operation. Thanks in advance</p>

答:
one of the bests lib for playing video is exoplayer

there is a good example for  exoplayer and notification


问:
Argument values change on run time in JavaScript
Please consider the below code:

function func1(a, b) {
  let args = arguments;
  console.log(args);

  return function() {
    for (let i in args) {
      console.log(args[i], a, b)
      args[i] += (a + b);
      console.log("|")
      console.log(args[i], a, b);
      console.log("end")
    }
  }
}

func1(2, 4)();```
</div>
</div>
</p>
<p>This give the below output</p>
<pre class="lang-none prettyprint-override"><code>2 2 4
|
8 8 4
end
4 8 4
|
16 8 16
end
</code>```

How does the value of a, b change here?

答:
```<code>function func1(a, b) {
let args = arguments;
console.log(args);

return function () {
    for (let i in args)  // it runs 2 times
    {

        console.log(args[i], a, b)
        args[i] += (a + b);
        // first time args[0] (this is the reference to 'a') set to 2+2+4 = 8
        // second time args[1] (it is the reference to b) set to 4+8+4 = 16
        console.log("|")
        console.log(args[i], a, b);
        console.log("end")

    }
}}func1(2, 4)();
</code>```

args[0] refers to a
and args[0] refers to b

because args is a object
that is stored is somewhere else in browser/node environment

refer how reference acts in js using this
video

Body:
Please consider the below code:

function func1(a, b) {
  let args = arguments;
  console.log(args);

  return function() {
    for (let i in args) {
      console.log(args[i], a, b)
      args[i] += (a + b);
      console.log("|")
      console.log(args[i], a, b);
      console.log("end")
    }
  }
}

func1(2, 4)();

This give the below output

2 2 4
|
8 8 4
end
4 8 4
|
16 8 16
end

How does the value of a, b change here?

Body:
function func1(a, b) {
let args = arguments;
console.log(args);

return function () {
    for (let i in args)  // it runs 2 times
    {

        console.log(args[i], a, b)
        args[i] += (a + b);
        // first time args[0] (this is the reference to 'a') set to 2+2+4 = 8
        // second time args[1] (it is the reference to b) set to 4+8+4 = 16
        console.log("|")
        console.log(args[i], a, b);
        console.log("end")

    }
}}func1(2, 4)();

args[0] refers to a
and args[0] refers to b

because args is a object
that is stored is somewhere else in browser/node environment

refer how reference acts in js using this
video


问:
Rails: How to test a controller with routes defined via a scope?
Given the route:

```<code>  scope :path => 'shipping_reports', :controller => 'ShippingReports', :as => 'shipping_reports' do
    get 'index'
  end
</code>```

and the following tests:

```<code>class ShippingReportsControllerTest < ActionController::TestCase
 test "routing" do
    assert_routing '/shipping_reports/index', { :controller => "ShippingReports", :action => "index" }
  end

  test 'index' do
    get :index
    assert_response :success
 end
end
</code>```

First test passes, second fails with:

```<code>ActionController::RoutingError: No route matches {:controller=>"shipping_reports"}
</code>```

Anybody has an idea how I can make that test pass?

答:
Had a similar problem. What I did was to the rails predefined path on the test route.

See the test modification below

```<code>class ShippingReportsControllerTest < ActionController::TestCase
 test "routing" do
    assert_routing index_path, { :controller => "ShippingReports", :action => "index" }
  end

  test 'index' do
    get index_path #the actual path to the index controller
    assert_response :success
 end
end
</code>```

N:B You can get the path name on the route list on localhost http://localhost:3000/rails/info/routes

Body:
Given the route:

  scope :path => 'shipping_reports', :controller => 'ShippingReports', :as => 'shipping_reports' do
    get 'index'
  end

and the following tests:

class ShippingReportsControllerTest < ActionController::TestCase
 test "routing" do
    assert_routing '/shipping_reports/index', { :controller => "ShippingReports", :action => "index" }
  end

  test 'index' do
    get :index
    assert_response :success
 end
end

First test passes, second fails with:

ActionController::RoutingError: No route matches {:controller=>"shipping_reports"}

Anybody has an idea how I can make that test pass?

Body:
Had a similar problem. What I did was to the rails predefined path on the test route.

See the test modification below

class ShippingReportsControllerTest < ActionController::TestCase
 test "routing" do
    assert_routing index_path, { :controller => "ShippingReports", :action => "index" }
  end

  test 'index' do
    get index_path #the actual path to the index controller
    assert_response :success
 end
end

N:B You can get the path name on the route list on localhost http://localhost:3000/rails/info/routes


问:
Android resource linking failed. See the console for details
Can someone please help making sense of this? My project in Unity is no longer building after I changed the "company name" field in Project Settings, the android dependency resolver ran and undoing name change doesn't fix the problem. I have tried many solutions but changing the Gradle version hasn't helped nor did changing the target Android API.</p>
```<code>    Note: C:\Users\...\Desktop\games\newVer\...\Temp\gradleOut\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':launcher:processReleaseResources'.
    > Android resource linking failed
    C:\Users\...\Desktop\games\newVer\...\Temp\gradleOut\launcher\build\intermediates\merged_manifests\release\AndroidManifest.xml:41: AAPT: error: unexpected element <queries> found in <manifest>.

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

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

    BUILD FAILED in 1m 25s
    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

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

    stderr[
    Note: C:\Users\...\Desktop\games\newVer\...\Temp\gradleOut\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':launcher:processReleaseResources'.
    > Android resource linking failed
    C:\Users\...\Desktop\games\newVer\...\Temp\gradleOut\launcher\build\intermediates\merged_manifests\release\AndroidManifest.xml:41: AAPT: error: unexpected element <queries> found in <manifest>.

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

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

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

    > Configure project :launcher
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.17f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\28.0.3\package.xml. Probably the SDK is read-only
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.17f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.17f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.17f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\28.0.3\package.xml. Probably the SDK is read-only
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.17f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.17f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only

    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preBuild UP-TO-DATE
    > Task :unityLibrary:preBuild UP-TO-DATE
    > Task :launcher:preBuild UP-TO-DATE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preReleaseBuild UP-TO-DATE
    > Task :unityLibrary:preReleaseBuild UP-TO-DATE
    > Task :launcher:prepareLintJar UP-TO-DATE
    > Task :unityLibrary:checkReleaseManifest UP-TO-DATE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:checkReleaseManifest
    > Task :unityLibrary:processReleaseManifest
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:processReleaseManifest
    > Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseAidl NO-SOURCE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResValues
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResources
    > Task :unityLibrary:generateReleaseBuildConfig
    > Task :unityLibrary:compileReleaseAidl NO-SOURCE
    > Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:generateReleaseResValues UP-TO-DATE
    > Task :unityLibrary:generateReleaseResources UP-TO-DATE
    > Task :unityLibrary:packageReleaseResources UP-TO-DATE
    > Task :unityLibrary:prepareLintJar UP-TO-DATE
    > Task :unityLibrary:generateReleaseSources
    > Task :unityLibrary:prepareLintJarForPublish UP-TO-DATE
    > Task :unityLibrary:mergeReleaseShaders UP-TO-DATE
    > Task :unityLibrary:compileReleaseShaders UP-TO-DATE
    > Task :unityLibrary:generateReleaseAssets UP-TO-DATE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseResources
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseRFile
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseBuildConfig
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:prepareLintJar UP-TO-DATE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseSources
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:javaPreCompileRelease
    > Task :unityLibrary:packageReleaseAssets
    > Task :launcher:preReleaseBuild
    > Task :launcher:compileReleaseAidl NO-SOURCE
    > Task :launcher:compileReleaseRenderscript NO-SOURCE
    > Task :launcher:checkReleaseManifest UP-TO-DATE
    > Task :launcher:generateReleaseBuildConfig
    > Task :launcher:generateReleaseSources
    > Task :launcher:mainApkListPersistenceRelease
    > Task :unityLibrary:generateReleaseRFile
    > Task :launcher:generateReleaseResValues UP-TO-DATE
    > Task :launcher:generateReleaseResources UP-TO-DATE
    > Task :unityLibrary:processReleaseJavaRes NO-SOURCE
    > Task :unityLibrary:mergeReleaseJniLibFolders UP-TO-DATE
    > Task :unityLibrary:transformNativeLibsWithMergeJniLibsForRelease UP-TO-DATE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseJavaWithJavac
    > Task :unityLibrary:transformNativeLibsWithStripDebugSymbolForRelease UP-TO-DATE
    > Task :unityLibrary:transformNativeLibsWithIntermediateJniLibsForRelease UP-TO-DATE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:bundleLibCompileRelease
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:prepareLintJarForPublish UP-TO-DATE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseShaders
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseShaders
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseAssets
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseAssets
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:bundleLibRuntimeRelease
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:processReleaseJavaRes NO-SOURCE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:bundleLibResRelease
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseJniLibFolders
    > Task :unityLibrary:javaPreCompileRelease UP-TO-DATE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:transformNativeLibsWithMergeJniLibsForRelease
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:transformNativeLibsWithStripDebugSymbolForRelease
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:transformNativeLibsWithIntermediateJniLibsForRelease
    > Task :launcher:mergeReleaseResources UP-TO-DATE
    > Task :launcher:createReleaseCompatibleScreenManifests
    > Task :launcher:processReleaseManifest

    > Task :unityLibrary:compileReleaseJavaWithJavac

    > Task :unityLibrary:bundleLibCompileRelease
    > Task :unityLibrary:bundleLibRuntimeRelease
    > Task :unityLibrary:bundleLibResRelease
    > Task :launcher:processReleaseResources FAILED

    Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
    Use '--warning-mode all' to show the individual deprecation warnings.
    See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
    50 actionable tasks: 32 executed, 18 up-to-date
    ]
    exit code: 1
    UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    Rethrow as GradleInvokationException: Gradle build failed
    UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
    UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <2f1c602eae0d45c293fff3e3aef759fa>:0)
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
</code>```

答:
Copy <UnityEditor>/PlaybackEngines/AndroidPlayer/Tools/GradleTemplates/baseProjectTemplate.gradle to <Project>/Assets/Plugins/Android

Edit it, change the version of the gradle plugin to 3.4.3

```<code>buildscript {
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.3'
    }
}
</code>```

Body:
Can someone please help making sense of this? My project in Unity is no longer building after I changed the "company name" field in Project Settings, the android dependency resolver ran and undoing name change doesn't fix the problem. I have tried many solutions but changing the Gradle version hasn't helped nor did changing the target Android API.

    Note: C:\Users\...\Desktop\games\newVer\...\Temp\gradleOut\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':launcher:processReleaseResources'.
    > Android resource linking failed
    C:\Users\...\Desktop\games\newVer\...\Temp\gradleOut\launcher\build\intermediates\merged_manifests\release\AndroidManifest.xml:41: AAPT: error: unexpected element <queries> found in <manifest>.

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

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

    BUILD FAILED in 1m 25s
    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

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

    stderr[
    Note: C:\Users\...\Desktop\games\newVer\...\Temp\gradleOut\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':launcher:processReleaseResources'.
    > Android resource linking failed
    C:\Users\...\Desktop\games\newVer\...\Temp\gradleOut\launcher\build\intermediates\merged_manifests\release\AndroidManifest.xml:41: AAPT: error: unexpected element <queries> found in <manifest>.

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

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

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

    > Configure project :launcher
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.17f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\28.0.3\package.xml. Probably the SDK is read-only
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.17f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.17f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.17f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\28.0.3\package.xml. Probably the SDK is read-only
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.17f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.17f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only

    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preBuild UP-TO-DATE
    > Task :unityLibrary:preBuild UP-TO-DATE
    > Task :launcher:preBuild UP-TO-DATE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preReleaseBuild UP-TO-DATE
    > Task :unityLibrary:preReleaseBuild UP-TO-DATE
    > Task :launcher:prepareLintJar UP-TO-DATE
    > Task :unityLibrary:checkReleaseManifest UP-TO-DATE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:checkReleaseManifest
    > Task :unityLibrary:processReleaseManifest
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:processReleaseManifest
    > Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseAidl NO-SOURCE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResValues
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResources
    > Task :unityLibrary:generateReleaseBuildConfig
    > Task :unityLibrary:compileReleaseAidl NO-SOURCE
    > Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:generateReleaseResValues UP-TO-DATE
    > Task :unityLibrary:generateReleaseResources UP-TO-DATE
    > Task :unityLibrary:packageReleaseResources UP-TO-DATE
    > Task :unityLibrary:prepareLintJar UP-TO-DATE
    > Task :unityLibrary:generateReleaseSources
    > Task :unityLibrary:prepareLintJarForPublish UP-TO-DATE
    > Task :unityLibrary:mergeReleaseShaders UP-TO-DATE
    > Task :unityLibrary:compileReleaseShaders UP-TO-DATE
    > Task :unityLibrary:generateReleaseAssets UP-TO-DATE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseResources
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseRFile
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseBuildConfig
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:prepareLintJar UP-TO-DATE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseSources
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:javaPreCompileRelease
    > Task :unityLibrary:packageReleaseAssets
    > Task :launcher:preReleaseBuild
    > Task :launcher:compileReleaseAidl NO-SOURCE
    > Task :launcher:compileReleaseRenderscript NO-SOURCE
    > Task :launcher:checkReleaseManifest UP-TO-DATE
    > Task :launcher:generateReleaseBuildConfig
    > Task :launcher:generateReleaseSources
    > Task :launcher:mainApkListPersistenceRelease
    > Task :unityLibrary:generateReleaseRFile
    > Task :launcher:generateReleaseResValues UP-TO-DATE
    > Task :launcher:generateReleaseResources UP-TO-DATE
    > Task :unityLibrary:processReleaseJavaRes NO-SOURCE
    > Task :unityLibrary:mergeReleaseJniLibFolders UP-TO-DATE
    > Task :unityLibrary:transformNativeLibsWithMergeJniLibsForRelease UP-TO-DATE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseJavaWithJavac
    > Task :unityLibrary:transformNativeLibsWithStripDebugSymbolForRelease UP-TO-DATE
    > Task :unityLibrary:transformNativeLibsWithIntermediateJniLibsForRelease UP-TO-DATE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:bundleLibCompileRelease
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:prepareLintJarForPublish UP-TO-DATE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseShaders
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseShaders
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseAssets
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseAssets
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:bundleLibRuntimeRelease
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:processReleaseJavaRes NO-SOURCE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:bundleLibResRelease
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseJniLibFolders
    > Task :unityLibrary:javaPreCompileRelease UP-TO-DATE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:transformNativeLibsWithMergeJniLibsForRelease
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:transformNativeLibsWithStripDebugSymbolForRelease
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:transformNativeLibsWithIntermediateJniLibsForRelease
    > Task :launcher:mergeReleaseResources UP-TO-DATE
    > Task :launcher:createReleaseCompatibleScreenManifests
    > Task :launcher:processReleaseManifest

    > Task :unityLibrary:compileReleaseJavaWithJavac

    > Task :unityLibrary:bundleLibCompileRelease
    > Task :unityLibrary:bundleLibRuntimeRelease
    > Task :unityLibrary:bundleLibResRelease
    > Task :launcher:processReleaseResources FAILED

    Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
    Use '--warning-mode all' to show the individual deprecation warnings.
    See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
    50 actionable tasks: 32 executed, 18 up-to-date
    ]
    exit code: 1
    UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    Rethrow as GradleInvokationException: Gradle build failed
    UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
    UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
    UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <2f1c602eae0d45c293fff3e3aef759fa>:0)
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Body:
Copy <UnityEditor>/PlaybackEngines/AndroidPlayer/Tools/GradleTemplates/baseProjectTemplate.gradle to <Project>/Assets/Plugins/Android

Edit it, change the version of the gradle plugin to 3.4.3

buildscript {
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.3'
    }
}


问:
How to disable user interaction on SwiftUI view?
Let's say I have a SwiftUI view hierarchy that looks like this:

```<code>ZStack() {
    ScrollView {
        ...
    }
    Text("Hello.")
}
</code>```

The Text view blocks touch events from reaching the underlying  ScrollView.

With UIKit, I'd use something like .isUserInteractionEnabled to control this, but I can't find any way to do this with SwiftUI.

I've tried adding a Gesture with a GestureMask of .none on the text view, but that doesn't seem to work.

I hope I'm missing something obvious here, because I need to put some status information on top of the scroll view.

答:
I'm doing something similar on a watch app, .overlaying a text field over a Slider. I couldn't get either .disable or .allowHitTesting to work when applied to the Text field.

To solve this, I found that placing the Text field in a Group{} (all by itself) and then applying the .allowHitTesting(false) worked perfectly.

Body:
Let's say I have a SwiftUI view hierarchy that looks like this:

ZStack() {
    ScrollView {
        ...
    }
    Text("Hello.")
}

The Text view blocks touch events from reaching the underlying  ScrollView.

With UIKit, I'd use something like .isUserInteractionEnabled to control this, but I can't find any way to do this with SwiftUI.

I've tried adding a Gesture with a GestureMask of .none on the text view, but that doesn't seem to work.

I hope I'm missing something obvious here, because I need to put some status information on top of the scroll view.


问:
I created a stopwatch using JavaScript, and I'm trying to start/stop the timer by space key, but it doesn't stop but always became more faster
I created a stopwatch using JavaScript, and I'm trying to start/stop the timer by space key, but it doesn't stop but always became more faster.
'''

```<code>var timer_start = "S";

var time;
document.body.onkeyup = function (e) {
  if (e.keyCode == 32) {
    time = setInterval(timer, 10);
    if (timer_start == "S") {
      timer_start = "F";
    } else if (timer_start == "F") {
      clearInterval(time);
      timer_start = "S";
    }
  }
};
</code>```

,,,

答: You set the interval regardless of the timer_start state, so you keep piling up new intervals and remove only half of them. You should set the interval only in the timer_start == "S" branch.

Body:
I created a stopwatch using JavaScript, and I'm trying to start/stop the timer by space key, but it doesn't stop but always became more faster.
'''

var timer_start = "S";

var time;
document.body.onkeyup = function (e) {
  if (e.keyCode == 32) {
    time = setInterval(timer, 10);
    if (timer_start == "S") {
      timer_start = "F";
    } else if (timer_start == "F") {
      clearInterval(time);
      timer_start = "S";
    }
  }
};

,,,


问:
Call function of class ONE from class TWO without extend?
If i have two classes A, B and one does not extend another they are separate but both loaded into script can i still reference function in A from B?</p>

```<code>class A {
    function one() {
        echo "Class A";
    }
}

class B {
    function two() {
        echo "Class B";
        A::one();
    }
}

$a new A;
$b = new B;

$b->two();
</code>```

答:
You can define it like this.</p>

```<code>class A {
    public static function one() {
        echo "Class A";
    }
}

class B {
    function two() {
        echo "Class B";
        A::one();
    }
}

$a new A;
$b = new B;

$b->two();
</code>```

Body:
If i have two classes A, B and one does not extend another they are separate but both loaded into script can i still reference function in A from B?

class A {
    function one() {
        echo "Class A";
    }
}

class B {
    function two() {
        echo "Class B";
        A::one();
    }
}

$a new A;
$b = new B;

$b->two();

Body:
You can define it like this.

class A {
    public static function one() {
        echo "Class A";
    }
}

class B {
    function two() {
        echo "Class B";
        A::one();
    }
}

$a new A;
$b = new B;

$b->two();


答:
Consider reshape to transform long to wide format after creating a counter variable by group:

long_df <- data.frame(
 name = c(rep(9073050, 8), rep(9079078,2), rep(9085376,5)),
 sequence = c(1,15,1,10,1,4,16,7,18,19,22,14,23,14,24)
)

wide_df <- transform(
    long_df,
    counter = ave(sequence, name, FUN=seq_along)
) |> reshape(
    idvar = "name",
    v.names = "sequence",
    timevar = "counter",
    sep = "_",
    direction = "wide"
)

# EXPORT TAB DELIMITED FILE WITH NO HEADERS
write.table(
    wide_df, file="output.txt", na="", sep="\t",
    row.names=FALSE, col.names=FALSE
)

# 9073050   1   15  1   10  1   4   16  7
# 9079078   18  19
# 9085376   22  14  23  14  24
```

Title: R how to pivot a table (with two columns) with categories of different length?

Body:
I have a table, shown as below. I need to pivot it so that data is spread horizontally and store it in a txt file with sep = space. But since the number of items per category differs, I am not sure what data structure is the best to use.

I have been stuck with this for 3 days. Could anyone please kindly help me?

Many thanks

data.frame(
 name=c(9073050,9073050,9073050,9073050,9073050,9073050,9073050,9073050,9079078,9079078,9085376,9085376,9085376,9085376,9085376),
 sequence=c(1,15, 1,10,1, 4, 16,7,18,19,22,14,23,14,24)
)

    name sequence
1  9073050        1
2  9073050       15
3  9073050        1
4  9073050       10
5  9073050        1
6  9073050        4
7  9073050       16
8  9073050        7
9  9079078       18
10 9079078       19
11 9085376       22
12 9085376       14
13 9085376       23
14 9085376       14
15 9085376       24

9073050       1      15       1      10       1       4      16       7
9079078      18      19
9085376      22      14      23      14      24


问:
How to re-format number to time in php?
I am creating a room booking system with some information like End-user needs to select in difference inputs

Date booking

Time booking (custom fixed value (08:00, 08:30,... ...17:30) store into database as number (800,830 ...n)

End-user need to tell how many hours need to book.( 1hr, 1hr 30, 2hr ...8hr) per day/date (The hour here will calculate in minute like 1hre = 60min, 2hrs = 120min ...n)

Base on above information, I would like to dynamic calculate the end time of the meeting. Let said, end user select booking date= 2022-02-05, start-time = 08:30 and select duration = 1hr 30min. Of course the end time is 10:00 but how to calculate the end time?

Here is my html code

```<code>               <input type="date" class="form-control" id="bookingdate" name="bookingdate" placeholder="dd/mm/yyyy" required>

               <select id="selecttime" name="selecttime" style="width: 130px !important;" class="rounded-right text-center bd-outline" required data-header="Select a dept" onfocus="document.getElementById('errtxt').innerText='';">
                    <option disabled="disabled" selected="selected">Start time</option>
                    <option value="08:00">08:00</option>
                    <option value="08:00">08:30</option>
                    <option value="09:00">09:00</option>
                    <option value="09:30">09:30</option>

                    <option value="17:30">17:30</option>
                </select>

                <select id="duration" name="duration" style="width: 120px !important;"  class="rounded-right text-center bd-outline" required ">
                    <option disabled="disabled" selected="selected">Select</option>
                    <option class="text-start text-secondary" value="30">30 min</option>
                    <option  class="text-start" value="60">1 hr</option>
                    <option  class="text-start text-secondary" value="90">1hr 30min</option>
                    <option  class="text-start" value="120">2 hrs</option>

                    <option  class="text-start text-secondary" value="510">8hrs 30min</option>
                </select>
</code>```

And here is my php code after post the html form

```<code>        $Booking_Date = $_POST["bookingdate"];//let said val = 2022-02-05
        $Booking_Time = $_POST["selecttime"];//val like 08:00, 08:30 ...
        $Duration = $_POST["duration"]; //val like 30min, 60min, 90min,....450min

</code>```

As of this code I have no idea to capture end time of the meeting

I tried this but I think it will have something better because I will store each value separately into database and I think PHP will have other function/choice that I don't know ....

```<code>        $StartTime     = new DateTime($Booking_Date . $Booking_Time);
        $minutesToAdd = $Duration;

        echo "Start time " . $StartTime->format('Y-m-d H:i');

        $StartTime->modify("+{$minutesToAdd} minutes");

        echo "<br />End time " . $StartTime->format('H:i');
</code>```

Could anyone suggest me other better idea?

Thank you in advance.

答:
You can use strtotime like so:

```<code>$Booking_Date = "2022-02-05";
$Booking_Time = "08:30";
$Duration = "30min";

$Duration_minutes = str_replace("min", "", $Duration); // Removes "min"
// Store this value in your database
$booking_datetime = $Booking_Date . " " . $Booking_Time; // Assumes 24h format
// Store this value in your database under DATETIME format

$meeting_end_timestamp = strtotime($booking_datetime) + $Duration_minutes * 60; // Adds duration in seconds
$meeting_end = date("Y-m-d H:i:s", $meeting_end_timestamp); // Convert timestamp to formatted date

echo $meeting_end; // Outputs "2022-02-05 09:00:00"
</code>```

If you want to change the output's format: see documentation.

Title: How to re-format number to time in php?

Body:
I am creating a room booking system with some information like End-user needs to select in difference inputs

Date booking

Time booking (custom fixed value (08:00, 08:30,... ...17:30) store into database as number (800,830 ...n)

End-user need to tell how many hours need to book.( 1hr, 1hr 30, 2hr ...8hr) per day/date (The hour here will calculate in minute like 1hre = 60min, 2hrs = 120min ...n)

Base on above information, I would like to dynamic calculate the end time of the meeting. Let said, end user select booking date= 2022-02-05, start-time = 08:30 and select duration = 1hr 30min. Of course the end time is 10:00 but how to calculate the end time?

Here is my html code

               <input type="date" class="form-control" id="bookingdate" name="bookingdate" placeholder="dd/mm/yyyy" required>

               <select id="selecttime" name="selecttime" style="width: 130px !important;" class="rounded-right text-center bd-outline" required data-header="Select a dept" onfocus="document.getElementById('errtxt').innerText='';">
                    <option disabled="disabled" selected="selected">Start time</option>
                    <option value="08:00">08:00</option>
                    <option value="08:00">08:30</option>
                    <option value="09:00">09:00</option>
                    <option value="09:30">09:30</option>

                    <option value="17:30">17:30</option>
                </select>

                <select id="duration" name="duration" style="width: 120px !important;"  class="rounded-right text-center bd-outline" required ">
                    <option disabled="disabled" selected="selected">Select</option>
                    <option class="text-start text-secondary" value="30">30 min</option>
                    <option  class="text-start" value="60">1 hr</option>
                    <option  class="text-start text-secondary" value="90">1hr 30min</option>
                    <option  class="text-start" value="120">2 hrs</option>

                    <option  class="text-start text-secondary" value="510">8hrs 30min</option>
                </select>

And here is my php code after post the html form

        $Booking_Date = $_POST["bookingdate"];//let said val = 2022-02-05
        $Booking_Time = $_POST["selecttime"];//val like 08:00, 08:30 ...
        $Duration = $_POST["duration"]; //val like 30min, 60min, 90min,....450min

As of this code I have no idea to capture end time of the meeting

I tried this but I think it will have something better because I will store each value separately into database and I think PHP will have other function/choice that I don't know ....

        $StartTime     = new DateTime($Booking_Date . $Booking_Time);
        $minutesToAdd = $Duration;

        echo "Start time " . $StartTime->format('Y-m-d H:i');

        $StartTime->modify("+{$minutesToAdd} minutes");

        echo "
End time " . $StartTime->format('H:i');

Could anyone suggest me other better idea?

Thank you in advance.

Body:
You can use strtotime like so:

$Booking_Date = "2022-02-05";
$Booking_Time = "08:30";
$Duration = "30min";

$Duration_minutes = str_replace("min", "", $Duration); // Removes "min"
// Store this value in your database
$booking_datetime = $Booking_Date . " " . $Booking_Time; // Assumes 24h format
// Store this value in your database under DATETIME format

$meeting_end_timestamp = strtotime($booking_datetime) + $Duration_minutes * 60; // Adds duration in seconds
$meeting_end = date("Y-m-d H:i:s", $meeting_end_timestamp); // Convert timestamp to formatted date

echo $meeting_end; // Outputs "2022-02-05 09:00:00"

If you want to change the output's format: see documentation.


问:
Salesforce - Process variable number of form fields
I've been able to do this in PHP but it's not translating to Salesforce very well.

I have a form to input an Opportunity. It has an Account, a Contact, and a variable number of fields that will be used to create custom objects (For my purposes an Opportunity is a trip, and the custom objects are legs of that trip). The Salesforce controller needs to create a new Opportunity with the Account and Contact (that's the easy part) but then it needs to create a new custom object (Leg__c) for each leg of the trip.

My form looks like this:

```<code><input type="text" name="Account" />
<input type="text" name="Contact" />
<div id="leg0">
  <input type="text" name="dep[0]" />
  <input type="text" name="arr[0]" />
</div>
<div id="leg1">
  <input type="text" name="dep[1]" />
  <input type="text" name="arr[1]" />
</div>
...
</code>```

I'm not even sure where to begin on this one...

答:
Assuming you know how many legs you need, you can simply create a list of them in your visualforce controller:

```<code>public list<Leg__c> liLegs {get; set;};

// upon oppty creation:
liLegs = new list<Leg__c>();

for (integer i = 0; i < iNumLegs; i++)
{
    liLegs.add(new Leg__c());
}
</code>```

Then you can just loop over these in your page like so:

```<code><apex:repeat var="v" value="{!liLegs}">
    <apex:inputField value="{!v.Dep__c}"/>
    <apex:inputField value="{!v.Arr__c}"/>
</apex:repeat>
</code>```

The input fields will correspond to the fields in each entry in the list, so then in your Save action or whatever you're using you can just insert the list insert liLegs;.

Hope this is of help and I haven't missed the mark, let me know if so! PS. I've just written this code directly in here so it may not be 100% syntactically correct ;)

Body:
I've been able to do this in PHP but it's not translating to Salesforce very well.

I have a form to input an Opportunity. It has an Account, a Contact, and a variable number of fields that will be used to create custom objects (For my purposes an Opportunity is a trip, and the custom objects are legs of that trip). The Salesforce controller needs to create a new Opportunity with the Account and Contact (that's the easy part) but then it needs to create a new custom object (Leg__c) for each leg of the trip.

My form looks like this:

<input type="text" name="Account" />
<input type="text" name="Contact" />

  <input type="text" name="dep[0]" />
  <input type="text" name="arr[0]" />

  <input type="text" name="dep[1]" />
  <input type="text" name="arr[1]" />

...

I'm not even sure where to begin on this one...

Body:
Assuming you know how many legs you need, you can simply create a list of them in your visualforce controller:

public list<Leg__c> liLegs {get; set;};

// upon oppty creation:
liLegs = new list<Leg__c>();

for (integer i = 0; i < iNumLegs; i++)
{
    liLegs.add(new Leg__c());
}

Then you can just loop over these in your page like so:

<apex:repeat var="v" value="{!liLegs}">
    <apex:inputField value="{!v.Dep__c}"/>
    <apex:inputField value="{!v.Arr__c}"/>
</apex:repeat>

The input fields will correspond to the fields in each entry in the list, so then in your Save action or whatever you're using you can just insert the list insert liLegs;.

Hope this is of help and I haven't missed the mark, let me know if so! PS. I've just written this code directly in here so it may not be 100% syntactically correct ;)


问:
Highlight Differences across Workbook Ranges VBA
I've managed to compare 3 separate ranges on one workbook with 3 single ranges across 3 workbooks.  Right now it's written to just pop up with a message box either letting me know the data is the same or the data is different.  What I would like to do is for the macro to not only let me know there are differences, but to also highlight where the differences are to me.  I guess this could be done by just highlighting the cells on the first workbook that are different to the other three or I guess it could also be done by pasting the different values  on the sheets in question from COL N onward.

```<code>Sub Macro1()

Dim varDataMatrix() As Variant
Dim varDataMatrix2() As Variant
Dim varDataMatrix3() As Variant
Dim lngArrayCount As Long
Dim lngArrayCount2 As Long
Dim lngArrayCount3 As Long
Dim rngMyCell As Range
Dim rngMyCell2 As Range
Dim rngMyCell3 As Range
Dim wbWorkbookOne As Workbook
Dim wbWorkbookTwo As Workbook
Dim wbWorkbookThree As Workbook
Dim wbWorkbookFour As Workbook

Application.ScreenUpdating = False

Set wbWorkbookOne = Workbooks("PositionTest.xls")
Set wbWorkbookTwo = Workbooks("ATest.xlsx")
Set wbWorkbookThree = Workbooks("BTest.xlsx")
Set wbWorkbookFour = Workbooks("CTest.xlsx")

'First create an array of the values in the desired range of the first workbook.
For Each rngMyCell In wbWorkbookOne.Sheets("Positions").Range("B3:B6")
    lngArrayCount = lngArrayCount + 1
    ReDim Preserve varDataMatrix(1 To lngArrayCount)
    varDataMatrix(lngArrayCount) = rngMyCell
Next rngMyCell

lngArrayCount = 0 'Initialise variable

'Loop through Array elements
For Each rngMyCell In wbWorkbookTwo.Sheets("A").Range("B2:B5")
    lngArrayCount = lngArrayCount + 1
    If rngMyCell.Value <> varDataMatrix(lngArrayCount) Then
       GoTo QuitRoutinue
    End If
Next rngMyCell

For Each rngMyCell2 In wbWorkbookOne.Sheets("Positions").Range("F3:F6")
    lngArrayCount2 = lngArrayCount2 + 1
    ReDim Preserve varDataMatrix2(1 To lngArrayCount2)
    varDataMatrix2(lngArrayCount2) = rngMyCell2
Next rngMyCell2

lngArrayCount2 = 0 'Initialise variable

'Loop through Array elements
For Each rngMyCell2 In wbWorkbookThree.Sheets("B").Range("B2:B5")
    lngArrayCount2 = lngArrayCount2 + 1
    If rngMyCell2.Value <> varDataMatrix2(lngArrayCount2) Then
       GoTo QuitRoutinue
    End If
Next rngMyCell2

For Each rngMyCell3 In wbWorkbookOne.Sheets("Positions").Range("J3:J6")
    lngArrayCount3 = lngArrayCount3 + 1
    ReDim Preserve varDataMatrix3(1 To lngArrayCount3) 'Append the record to the existing array
    varDataMatrix3(lngArrayCount3) = rngMyCell3
Next rngMyCell3

lngArrayCount3 = 0 'Initialise variable

For Each rngMyCell3 In wbWorkbookFour.Sheets("C").Range("B2:B5") 'Workbook one range is A10:A15 on 'Sheet2'.
    lngArrayCount3 = lngArrayCount3 + 1
    If rngMyCell3.Value <> varDataMatrix3(lngArrayCount3) Then
       GoTo QuitRoutinue
    End If
Next rngMyCell3

'If we get here both datasets have matched.
Set wbWorkbookOne = Nothing
Set wbWorkbookTwo = Nothing
Application.ScreenUpdating = True
Erase varDataMatrix() 'Deletes the varible contents, free some memory
MsgBox "Data is the same.", vbInformation
Exit Sub

Set wbWorkbookOne = Nothing
Set wbWorkbookTwo = Nothing
Application.ScreenUpdating = True
Erase varDataMatrix() 'Deletes the varible contents, free some memory
MsgBox "Data is different.", vbExclamation
</code>```

End Sub

答:
Highlights differences on Positions sheet and shows values in columns L to N. Uses Application.Transpose to create 1D arrays from a vertical range of cells. Note : Transpose won't work for a non-contiguous range.

Option Explicit

Sub Macro2()

    Dim ws(3) As Worksheet, sht, w, n As Long
    sht = Array("Positions", "A", "B", "C")

    For Each w In Array("PositionTest.xls", "ATest.xlsx", "BTest.xlsx", "CTest.xlsx")
        Set ws(n) = Workbooks(w).Sheets(sht(n))
        n = n + 1
    Next

    Dim i As Long, r As Long, diff As Long
    Dim rng0 As Range, rngN As Range, a As Range, b As Range
    Dim ar0, arN
    ' compare sheets
    For n = 1 To 3
         Set rng0 = ws(0).Range("H5:H7,H9:H11,H13:H19,H21:H22").Offset(, (n - 1) * 4) ' H, L, P
         Set rngN = ws(n).Range("E3:E18") ' sheet A, B, C
         ' copy to array
         arN = Application.Transpose(rngN)

         i = 0
         For Each a In rng0
             i = i + 1
             r = a.Row

             ' cells on position sheet
             Set b = ws(0).Cells(r, "R").Offset(, n) ' diff in col L,M,N

             ' compare arrays
             If a.Value <> arN(i) Then
                 a.Interior.Color = RGB(255, 255, 0) ' yellow
                 b.Value = rngN.Cells(i, 1)
                 diff = diff + 1
             Else
                 a.Interior.Pattern = False
                 b.Clear
             End If
         Next
    Next

    MsgBox diff & " differences", vbInformation
End Sub
```

Body:
I've managed to compare 3 separate ranges on one workbook with 3 single ranges across 3 workbooks.  Right now it's written to just pop up with a message box either letting me know the data is the same or the data is different.  What I would like to do is for the macro to not only let me know there are differences, but to also highlight where the differences are to me.  I guess this could be done by just highlighting the cells on the first workbook that are different to the other three or I guess it could also be done by pasting the different values  on the sheets in question from COL N onward.

Sub Macro1()

Dim varDataMatrix() As Variant
Dim varDataMatrix2() As Variant
Dim varDataMatrix3() As Variant
Dim lngArrayCount As Long
Dim lngArrayCount2 As Long
Dim lngArrayCount3 As Long
Dim rngMyCell As Range
Dim rngMyCell2 As Range
Dim rngMyCell3 As Range
Dim wbWorkbookOne As Workbook
Dim wbWorkbookTwo As Workbook
Dim wbWorkbookThree As Workbook
Dim wbWorkbookFour As Workbook

Application.ScreenUpdating = False

Set wbWorkbookOne = Workbooks("PositionTest.xls")
Set wbWorkbookTwo = Workbooks("ATest.xlsx")
Set wbWorkbookThree = Workbooks("BTest.xlsx")
Set wbWorkbookFour = Workbooks("CTest.xlsx")

'First create an array of the values in the desired range of the first workbook.
For Each rngMyCell In wbWorkbookOne.Sheets("Positions").Range("B3:B6")
    lngArrayCount = lngArrayCount + 1
    ReDim Preserve varDataMatrix(1 To lngArrayCount)
    varDataMatrix(lngArrayCount) = rngMyCell
Next rngMyCell

lngArrayCount = 0 'Initialise variable

'Loop through Array elements
For Each rngMyCell In wbWorkbookTwo.Sheets("A").Range("B2:B5")
    lngArrayCount = lngArrayCount + 1
    If rngMyCell.Value <> varDataMatrix(lngArrayCount) Then
       GoTo QuitRoutinue
    End If
Next rngMyCell

For Each rngMyCell2 In wbWorkbookOne.Sheets("Positions").Range("F3:F6")
    lngArrayCount2 = lngArrayCount2 + 1
    ReDim Preserve varDataMatrix2(1 To lngArrayCount2)
    varDataMatrix2(lngArrayCount2) = rngMyCell2
Next rngMyCell2

lngArrayCount2 = 0 'Initialise variable

'Loop through Array elements
For Each rngMyCell2 In wbWorkbookThree.Sheets("B").Range("B2:B5")
    lngArrayCount2 = lngArrayCount2 + 1
    If rngMyCell2.Value <> varDataMatrix2(lngArrayCount2) Then
       GoTo QuitRoutinue
    End If
Next rngMyCell2

For Each rngMyCell3 In wbWorkbookOne.Sheets("Positions").Range("J3:J6")
    lngArrayCount3 = lngArrayCount3 + 1
    ReDim Preserve varDataMatrix3(1 To lngArrayCount3) 'Append the record to the existing array
    varDataMatrix3(lngArrayCount3) = rngMyCell3
Next rngMyCell3

lngArrayCount3 = 0 'Initialise variable

For Each rngMyCell3 In wbWorkbookFour.Sheets("C").Range("B2:B5") 'Workbook one range is A10:A15 on 'Sheet2'.
    lngArrayCount3 = lngArrayCount3 + 1
    If rngMyCell3.Value <> varDataMatrix3(lngArrayCount3) Then
       GoTo QuitRoutinue
    End If
Next rngMyCell3

'If we get here both datasets have matched.
Set wbWorkbookOne = Nothing
Set wbWorkbookTwo = Nothing
Application.ScreenUpdating = True
Erase varDataMatrix() 'Deletes the varible contents, free some memory
MsgBox "Data is the same.", vbInformation
Exit Sub

Set wbWorkbookOne = Nothing
Set wbWorkbookTwo = Nothing
Application.ScreenUpdating = True
Erase varDataMatrix() 'Deletes the varible contents, free some memory
MsgBox "Data is different.", vbExclamation

End Sub


问:
Taillwind CSS configuration not working with React
Tailwind CSS is not working for me. I've updated to the latest version, and Tailwind is the only thing that's failing with no error in the console.

My header component and file tree: https://i.stack.imgur.com/e3brX.png

tailwind.config.js

module.exports = {
  mode: "jit",
  purge: [
    "./src/pages/**/*.{js,ts,jsx,tsx}",
    "./src/components/**/*.{js,ts,jsx,tsx}",
  ],
  darkMode: false, // or 'media' or 'class'
  theme: {
    extend: {
      colors: {
        amazon_blue: {
          light: "#232F3E",
          DEFAULT: "#131921",
        },
      },
    },
  },
  variants: {
    extend: {},
  },
  plugins: [require("@tailwindcss/line-clamp")],
};
```
<p><strong>My CSS file</strong></p>
<pre class="lang-css prettyprint-override"><code>@tailwind base;
@tailwind components;
@tailwind utilities;
</code>```

my git hub-https://github.com/Shadow2389/amazon-duplicate

答:
I found out solution. Yourtailwind.config.js is still old version. Update as,

```<code>module.exports = {
  content: [
    "./pages/**/*.{js,ts,jsx,tsx}",
    "./components/**/*.{js,ts,jsx,tsx}",
  ],
  theme: {
    extend: {
      colors: {
        amazon_blue: {
          light: "#232F3E",
          DEFAULT: "#131921",
        },
      },
    },
  },
  variants: {
    extend: {},
  },
  plugins: [require("@tailwindcss/line-clamp")],
}
</code>```

Body:
Tailwind CSS is not working for me. I've updated to the latest version, and Tailwind is the only thing that's failing with no error in the console.

My header component and file tree: https://i.stack.imgur.com/e3brX.png

tailwind.config.js

module.exports = {
  mode: "jit",
  purge: [
    "./src/pages/**/*.{js,ts,jsx,tsx}",
    "./src/components/**/*.{js,ts,jsx,tsx}",
  ],
  darkMode: false, // or 'media' or 'class'
  theme: {
    extend: {
      colors: {
        amazon_blue: {
          light: "#232F3E",
          DEFAULT: "#131921",
        },
      },
    },
  },
  variants: {
    extend: {},
  },
  plugins: [require("@tailwindcss/line-clamp")],
};

My CSS file

@tailwind base;
@tailwind components;
@tailwind utilities;

my git hub-https://github.com/Shadow2389/amazon-duplicate

Body:
I found out solution. Yourtailwind.config.js is still old version. Update as,

module.exports = {
  content: [
    "./pages/**/*.{js,ts,jsx,tsx}",
    "./components/**/*.{js,ts,jsx,tsx}",
  ],
  theme: {
    extend: {
      colors: {
        amazon_blue: {
          light: "#232F3E",
          DEFAULT: "#131921",
        },
      },
    },
  },
  variants: {
    extend: {},
  },
  plugins: [require("@tailwindcss/line-clamp")],
}


问:
I have question regarding SQL and phpmyadmin queries
I have two table in my database first is shop_details and second one is shopOwner_login

in shop_details table there is column named

```<code>ShopOwner_email
Shop_Pass
</code>```

and same in shopOwner_login table there is

```<code>ShopOwner_Id,
ShopOwner_email,
Shop_Pass
</code>```

Now i want to make a form in which if user enter data in shop details table like shopowner Email and its password it will store on those two table automatically goes

Can i do this if yes please help me for it i also tried foreign key i am so confused with foreign key because i am new to php and MySql please help me.

答:
Each of your table should have Primary key. Primary Key is the unique id (could be number or string or even uuid. Ex: ShopOwner_Id) which could be used to fetch any row in the table. This primary key is used to establish relationships between tables.

Also for relationships there could be 3 types of major relationships between two tables.

One to One

One to Many or Many to One

Many to Many

For example,

lets say you have two tables UserLogin and UserProfile. UserLogin contains -> id, email, password, and verified. Whereas UserProfile contains -> id name, address, mobile, dob, etc. Here Each UserLogin will have single UserProfile whereas each UserProfile will have only one UserLogin. So they have One to One relationship. In this case, You add the foreign key to the both tables. You will add profile_id as foreign key in UserLogin whereas login_id in UserProfile.

Lets say, you have two tables Shop and User. Where each Shop will belong to a single User (in your case shopowner) But a User can have multiple Shops. In this case, Shop and User have Many to One relationship (or User and Shop have One to Many relationship). In this case we add a foreign key of user_id (which is primary key of User table) to Shop table.

In your case I will suggest to only keep email and password in shopOwner_login table and add its foreign key to shop_details table. This way your data will be normalize and you will not have to make sure to maintain same data in multiple tables.

Body:
I have two table in my database first is shop_details and second one is shopOwner_login

in shop_details table there is column named

ShopOwner_email
Shop_Pass

and same in shopOwner_login table there is

ShopOwner_Id,
ShopOwner_email,
Shop_Pass

Now i want to make a form in which if user enter data in shop details table like shopowner Email and its password it will store on those two table automatically goes

Can i do this if yes please help me for it i also tried foreign key i am so confused with foreign key because i am new to php and MySql please help me.


答:
Heres an alternative that doesn't rely on unique items in column A being consecutive

```<code>=SUM(IF(FREQUENCY(A2:A76,A2:A76)>0,(I2:I76=3)*1,0))
</code>```

Enter as an array formula

Title: Excel distinct count with conditions

Body:
    A            B       C   D  E       F           G           H   I
115492          2009    10  42  5   90160624    15-Oct-09       WH  5
115492          2009    10  42  5   90160624    15-Oct-09       WH  5
115492          2009    10  42  5   90160624    15-Oct-09       WH  5
115492          2009    10  42  5   90160624    15-Oct-09       WH  5
115481          2009    10  44  6   90170587    30-Oct-09       WH  3
115481          2009    10  44  6   90170587    30-Oct-09       WH  3
115481          2009    10  44  6   90170587    30-Oct-09       WH  3
115481          2009    10  44  6   90170587    30-Oct-09       WH  3
115481          2009    10  44  6   90170587    30-Oct-09       WH  3
115481          2009    10  44  6   90170587    30-Oct-09       WH  3
115481          2009    10  44  6   90170587    30-Oct-09       WH  3
115481          2009    10  44  6   90170587    30-Oct-09       WH  3
115481          2009    10  44  6   90170587    30-Oct-09       WH  3
115520          2009    11  45  5   90174693    5-Nov-09        WH  3
115520          2009    11  45  5   90174693    5-Nov-09        WH  3
115520          2009    11  45  5   90174693    5-Nov-09        WH  3
115520          2009    11  45  5   90174693    5-Nov-09        WH  3
115502          2009    11  46  6   90179821    13-Nov-09       WH  3
115502          2009    11  46  6   90179821    13-Nov-09       WH  3
115502          2009    11  46  6   90179821    13-Nov-09       WH  3
115502          2009    11  46  6   90179821    13-Nov-09       WH  3
115502          2009    11  46  6   90179821    13-Nov-09       WH  3
115502          2009    11  46  6   90179821    13-Nov-09       WH  3
115502          2009    11  46  6   90179821    13-Nov-09       WH  3
115502          2009    11  46  6   90179821    13-Nov-09       WH  3
115502          2009    11  46  6   90179821    13-Nov-09       WH  3
123057          2009    11  46  3   90182107    17-Nov-09       WH  3
123057          2009    11  46  3   90182107    17-Nov-09       WH  3
123057          2009    11  46  3   90182107    17-Nov-09       WH  3
123057          2009    11  46  3   90182107    17-Nov-09       WH  3
123056          2009    11  47  3   90186948    24-Nov-09       WH  3
123056          2009    11  47  3   90186948    24-Nov-09       WH  3
123056          2009    11  47  3   90186948    24-Nov-09       WH  3
123056          2009    11  47  3   90186948    24-Nov-09       WH  3
115506          2009    11  47  3   90186673    24-Nov-09       WH  5
115506          2009    11  47  3   90186673    24-Nov-09       WH  5
115506          2009    11  47  3   90186673    24-Nov-09       WH  5
115506          2009    11  47  3   90186673    24-Nov-09       WH  5
115506          2009    11  47  3   90186673    24-Nov-09       WH  5
115506          2009    11  47  3   90186673    24-Nov-09       WH  5
115506          2009    11  47  3   90186673    24-Nov-09       WH  5
115506          2009    11  47  3   90186673    24-Nov-09       WH  5
115496          2009    11  47  4   90187409    25-Nov-09       WH  3
115496          2009    11  47  4   90187409    25-Nov-09       WH  3
115496          2009    11  47  4   90187409    25-Nov-09       WH  3
115496          2009    11  47  4   90187409    25-Nov-09       WH  3
123058          2009    12  50  5   90198449    10-Dec-09       WH  3
123058          2009    12  50  5   90198449    10-Dec-09       WH  3
123058          2009    12  50  5   90198449    10-Dec-09       WH  3
123058          2009    12  50  5   90198449    10-Dec-09       WH  3
115522          2009    12  50  7   90200094    12-Dec-09       WH  7
115522          2009    12  50  7   90200094    12-Dec-09       WH  7
115522          2009    12  50  7   90200094    12-Dec-09       WH  7
115522          2009    12  50  7   90200094    12-Dec-09       WH  7
115522          2009    12  50  7   90200094    12-Dec-09       WH  7
123059          2009    12  51  6   90203897    18-Dec-09       WH  4
123059          2009    12  51  6   90203897    18-Dec-09       WH  4
123059          2009    12  51  6   90203897    18-Dec-09       WH  4
123059          2009    12  51  6   90203897    18-Dec-09       WH  4
115539          2009    12  51  7   90204074    19-Dec-09       WH  5
115539          2009    12  51  7   90204074    19-Dec-09       WH  5
115539          2009    12  51  7   90204074    19-Dec-09       WH  5
115539          2009    12  51  7   90204074    19-Dec-09       WH  5
115539          2009    12  51  7   90204074    19-Dec-09       WH  5
115539          2009    12  51  7   90204074    19-Dec-09       WH  5
115541          2009    12  51  7   90204389    19-Dec-09       WH  4
115541          2009    12  51  7   90204389    19-Dec-09       WH  4
115541          2009    12  51  7   90204389    19-Dec-09       WH  4
115541          2009    12  51  7   90204389    19-Dec-09       WH  4
115534          2009    12  52  2   90209074    28-Dec-09       WH  5
115534          2009    12  52  2   90209074    28-Dec-09       WH  5
115534          2009    12  52  2   90209074    28-Dec-09       WH  5
115534          2009    12  52  2   90209074    28-Dec-09       WH  5
115534          2009    12  52  2   90209074    28-Dec-09       WH  5
115534          2009    12  52  2   90209074    28-Dec-09       WH  5

considering a table above,
How do I get distinct count of "A" column value where "I" has value "3"?

Body:
Heres an alternative that doesn't rely on unique items in column A being consecutive

=SUM(IF(FREQUENCY(A2:A76,A2:A76)>0,(I2:I76=3)*1,0))

Enter as an array formula


问:
rails: how to create record in other Controller
So i need to create two Records

one is appointment, and the other one is answer.

```<code>def create
  @check_up_appointment = CheckUpAppointment.new(appointment_params)
  @check_up_appointment = current_user.check_up_appointments.build(appointment_params)
  companion = Companion.find(@check_up_appointment.companion_id)
  reserved_at = Time.zone.parse(appointment_params[:reserved_at])

  @check_up_answer = CheckUpAnswer.new(
    user: current_user,
    companion_id: @check_up_appointment.companion_id,
    check_up_appointment_id: @check_up_appointment.id,
    basic_info: [],
    health_info: [],
    previous_illness: [],
    recent_info: [],
  )

  @check_up_appointment.save
  result = @check_up_appointment,  @check_up_answer
  render json: {result: result}
end
</code>```

so i need to create answers when the appointment is made, but now the code doesn't works at all

so where do i have to fix??

and second thing is when answer is made it should have empty array

how can I figure this out

答:
When you call current_user.check_up_appointments.build, an instance of
CheckUpAppointment is created. This doesn't mean that it is inserted in the database.

At this point in the execution of the code, the object @check_up_appointment does not have an id, this field is only set for objects that are persisted in the database. You can check this by inserting puts @check_up_appointment.id.nil? in the 4 line of this snippet. It'll output true

When you call @check_up_appointment.save, the record wil be validated and in the positive case inserted to the database. After the save call the id field will be set.

Now you try to set check_up_appointment_id: @check_up_appointment.id, which is most likely the reason for the code not working (I guess that a validation doesn't pass, but some log output would help a lot).

Try this:

```<code>def create
  @check_up_appointment = current_user.check_up_appointments.build(appointment_params)
  companion = Companion.find(@check_up_appointment.companion_id)
  reserved_at = Time.zone.parse(appointment_params[:reserved_at])

  @check_up_appointment.save

  @check_up_answer = CheckUpAnswer.new(
    user: current_user,
    companion_id: @check_up_appointment.companion_id,
    check_up_appointment_id: @check_up_appointment.id,
    basic_info: [],
    health_info: [],
    previous_illness: [],
    recent_info: [],
  )

  result = [@check_up_appointment,  @check_up_answer]
  render json: {result: result}
end
</code>```

Another thing:

The first line of the 2 lines below is 100% redundant and you can remove it.

```<code>  @check_up_appointment = CheckUpAppointment.new(appointment_params)
  @check_up_appointment = current_user.check_up_appointments.build(appointment_params)
</code>```

Also:
I changed a bit in the last 2 lines.

Body:
So i need to create two Records

one is appointment, and the other one is answer.

def create
  @check_up_appointment = CheckUpAppointment.new(appointment_params)
  @check_up_appointment = current_user.check_up_appointments.build(appointment_params)
  companion = Companion.find(@check_up_appointment.companion_id)
  reserved_at = Time.zone.parse(appointment_params[:reserved_at])

  @check_up_answer = CheckUpAnswer.new(
    user: current_user,
    companion_id: @check_up_appointment.companion_id,
    check_up_appointment_id: @check_up_appointment.id,
    basic_info: [],
    health_info: [],
    previous_illness: [],
    recent_info: [],
  )

  @check_up_appointment.save
  result = @check_up_appointment,  @check_up_answer
  render json: {result: result}
end

so i need to create answers when the appointment is made, but now the code doesn't works at all

so where do i have to fix??

and second thing is when answer is made it should have empty array

how can I figure this out

Body:
When you call current_user.check_up_appointments.build, an instance of
CheckUpAppointment is created. This doesn't mean that it is inserted in the database.

At this point in the execution of the code, the object @check_up_appointment does not have an id, this field is only set for objects that are persisted in the database. You can check this by inserting puts @check_up_appointment.id.nil? in the 4 line of this snippet. It'll output true

When you call @check_up_appointment.save, the record wil be validated and in the positive case inserted to the database. After the save call the id field will be set.

Now you try to set check_up_appointment_id: @check_up_appointment.id, which is most likely the reason for the code not working (I guess that a validation doesn't pass, but some log output would help a lot).

Try this:

def create
  @check_up_appointment = current_user.check_up_appointments.build(appointment_params)
  companion = Companion.find(@check_up_appointment.companion_id)
  reserved_at = Time.zone.parse(appointment_params[:reserved_at])

  @check_up_appointment.save

  @check_up_answer = CheckUpAnswer.new(
    user: current_user,
    companion_id: @check_up_appointment.companion_id,
    check_up_appointment_id: @check_up_appointment.id,
    basic_info: [],
    health_info: [],
    previous_illness: [],
    recent_info: [],
  )

  result = [@check_up_appointment,  @check_up_answer]
  render json: {result: result}
end

Another thing:

The first line of the 2 lines below is 100% redundant and you can remove it.

  @check_up_appointment = CheckUpAppointment.new(appointment_params)
  @check_up_appointment = current_user.check_up_appointments.build(appointment_params)

Also:
I changed a bit in the last 2 lines.


问:
How to Migrate from AzDevops server to existing organization in AzDevops service
How to migrate Boards, Pipeline, Test Plan, Artifacts and Repo from on-prem azdevops server to Existing organization in azdevops service? Is it any different tool available?</p>

答:
There is no officially supported way to merge 2 Azure DevOps Organisations or an Azure DevOps Server with an Azure DevOps organization.

With the official import tooling each Project Collection on your Azure DevOps Server will be mapped to a new Azure DevOps Organization.

There are all kinds of tools that can replay the history of work items and test plans. You can git mirror repositories from one place to another. You can use git-tfs or 3rd party tools to migrate TFVC history from one organization to another. Azure Pipelines can be exported/imported and Azure Artefacts can be downloaded/uploaded with the native tools for each kind of supported artifact feed.

This process is complicated, cannot be 100% and will cause certain data to be altered or lost. Since work item IDs and changesets and test case/plan IDs are unique per Organization it's impossible to migrate with these ids in tact. Hence all kinds of mapping and remapping is required. Certain dates (like Created Date, Changed Date) can't be overridden and will be reset to the time of migration


答:
Once the spacebar is pressed, you are starting the timer again regardless of the current value of timer_start. You need to move this to be inside the if statement. I'd also recommend using a Boolean instead of the string "S" and "F".

Here is my proposed rewrite of your code:

```<code>var timer_start = true;

var time;
document.body.onkeyup = function (e) {
  if (e.keyCode == 32) {
    if (timer_start) {
      time = setInterval(timer, 10);
      timer_start = false;
    } else {
      clearInterval(time);
      timer_start = true;
    }
  }
};
</code>```

You could also shorten it a bit by doing this if you wanted

```<code>var timer_start = true;
var time;
document.body.onkeyup = function (e) {
  if (e.keyCode == 32) {
    if (timer_start) {
      time = setInterval(timer, 10);
    } else {
      clearInterval(time);
    }

    timer_start = !timer_start
  }
};
</code>```

Title: I created a stopwatch using JavaScript, and I'm trying to start/stop the timer by space key, but it doesn't stop but always became more faster

Body:
Once the spacebar is pressed, you are starting the timer again regardless of the current value of timer_start. You need to move this to be inside the if statement. I'd also recommend using a Boolean instead of the string "S" and "F".

Here is my proposed rewrite of your code:

var timer_start = true;

var time;
document.body.onkeyup = function (e) {
  if (e.keyCode == 32) {
    if (timer_start) {
      time = setInterval(timer, 10);
      timer_start = false;
    } else {
      clearInterval(time);
      timer_start = true;
    }
  }
};

You could also shorten it a bit by doing this if you wanted

var timer_start = true;
var time;
document.body.onkeyup = function (e) {
  if (e.keyCode == 32) {
    if (timer_start) {
      time = setInterval(timer, 10);
    } else {
      clearInterval(time);
    }

    timer_start = !timer_start
  }
};


问:
How to use va_arg to modify the value of a variadic parameter
```<code>#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>

void tag_log(const char *format, ...) {
    va_list ap;
    va_start(ap, format);
    for (int i = 0; i < 4; i++) {
        va_arg(ap, int) += 100; // is wrong?
    }
    va_end(ap);
    va_start(ap, format);
    vprintf(format, ap);
    va_end(ap);
}

int main() {
    tag_log("%d, %d, %d, %d\n", 1, 2, 3, 4);
}
</code>```

Since va_arg returns an rvalue, the content cannot be modified. How to modify the content of the variable parameter?

Expected output: 101, 102, 103, 104

thanks!!!

答:
va_arg(ap, int) = 100; // is wrong?

Yes, it's wrong. va_arg returns an rvalue (which isn't assignable).

I suggest making a variadic template instead.

```<code>#include <cstdio>
#include <utility>

template<class... Args>
void tag_log(const char *format, Args&&... args) {
    ((args += 100), ...); // fold expression
    std::printf(format, std::forward<Args>(args)...);
}

int main() {
    tag_log("%d, %d, %d, %d\n", 1, 2, 3, 4);
}
</code>```

Output:

```<code>101, 102, 103, 104
</code>```

Body:
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>

void tag_log(const char *format, ...) {
    va_list ap;
    va_start(ap, format);
    for (int i = 0; i < 4; i++) {
        va_arg(ap, int) += 100; // is wrong?
    }
    va_end(ap);
    va_start(ap, format);
    vprintf(format, ap);
    va_end(ap);
}

int main() {
    tag_log("%d, %d, %d, %d\n", 1, 2, 3, 4);
}

Since va_arg returns an rvalue, the content cannot be modified. How to modify the content of the variable parameter?

Expected output: 101, 102, 103, 104

thanks!!!

Body:
va_arg(ap, int) = 100; // is wrong?

Yes, it's wrong. va_arg returns an rvalue (which isn't assignable).

I suggest making a variadic template instead.

#include <cstdio>
#include <utility>

template<class... Args>
void tag_log(const char *format, Args&&... args) {
    ((args += 100), ...); // fold expression
    std::printf(format, std::forward<Args>(args)...);
}

int main() {
    tag_log("%d, %d, %d, %d\n", 1, 2, 3, 4);
}

Output:

101, 102, 103, 104


问:
How to add dynamically attribute in VueJs
I'm using vuejs and I wanna know how to have control on inputs (add disabled attribute when necessary). Is there any way to add dynamically attribute in vuejs ? Below my Textfield component :

```<code>    <template>
     <input type="text" placeholder="{{ placeholder }}" v-model="value">
    </template>
    <script>
    export default  {
      props: {
       disabled: {type: Boolean, default: false},
       placeholder: {type: String, default: ""},
       value: {twoWay: true, default: ""}
      }
     }
    </script>
</code>```

Usage :

```<code><textfield placeholder="Name" value.sync="el.name" :disabled="true"></textfield>
</code>```

答:
I did that with checkboxes:

```<code> <select id="newTwootType" v-model="state.selectedTwootType">
      <option
      :value="option.value"
      v-for="(option, index) in state.twootTypes"
      :key="index">
        {{ option.name }}
      </option>
    </select>
</code>```

my scripts

```<code>export default {
name: 'CreateNewTwootPanel',
setup(props, ctx) {
  const state = reactive({
      selectedTwootType: 'instant',
      twootTypes: [
          { value: 'draft', name: 'Draft' },
          { value: 'instant', name: 'Instant Twoot' }
      ],
  })

  return {
    state,
    }
  }
}
</code>```

Body:
I'm using vuejs and I wanna know how to have control on inputs (add disabled attribute when necessary). Is there any way to add dynamically attribute in vuejs ? Below my Textfield component :

    <template>
     <input type="text" placeholder="{{ placeholder }}" v-model="value">
    </template>

Usage :

<textfield placeholder="Name" value.sync="el.name" :disabled="true"></textfield>

Body:
I did that with checkboxes:

 <select id="newTwootType" v-model="state.selectedTwootType">
      <option
      :value="option.value"
      v-for="(option, index) in state.twootTypes"
      :key="index">
        {{ option.name }}
      </option>
    </select>

my scripts

export default {
name: 'CreateNewTwootPanel',
setup(props, ctx) {
  const state = reactive({
      selectedTwootType: 'instant',
      twootTypes: [
          { value: 'draft', name: 'Draft' },
          { value: 'instant', name: 'Instant Twoot' }
      ],
  })

  return {
    state,
    }
  }
}