问:
flutter_native_image not found in xcode build, but pod install log shows otherwise
I have made an app which uses flutter_native_image, image_picker and image_cropper to take pictures and resize them at will. On Android build it works flawless.
While running XCode build to make this work on iOS, the build fails because packages cannot be found, although I followed (to my newbee knowledge) all necessary steps

Steps I did to create a clean build on iOS:

flutter clean
flutter pub get
pod deintegrate; pod install

In the log of the pod install, I can see that the necessary packages are being installed. See log below

```<code>@LMAC-C02F5662MD6R ~/work/git/boekelaar/bierpot/frontend/ios> pod deintegrate; pod install
Deintegrating `Runner.xcodeproj`
Deleted 1 'Check Pods Manifest.lock' build phases.
Deleted 1 'Embed Pods Frameworks' build phases.
- Pods_Runner.framework
Deleting Pod file references from project
- Pods-Runner.debug.xcconfig
- Pods-Runner.release.xcconfig
- Pods-Runner.profile.xcconfig
Deleted 1 empty `Frameworks` groups from project.
Removing `Pods` directory.

Project has been deintegrated. No traces of CocoaPods left in project.
Note: The workspace referencing the Pods project still remains.
Analyzing dependencies
Downloading dependencies
Installing Flutter (1.0.0)
Installing TOCropViewController (2.6.1)
Installing flutter_native_image (0.0.1)
Installing image_cropper (0.0.4)
Installing image_picker_ios (0.0.1)
Installing path_provider_ios (0.0.1)
Installing shared_preferences_ios (0.0.1)
Generating Pods project
Integrating client project
Pod installation complete! There are 6 dependencies from the Podfile and 7 total pods installed.

</code>```

After this install, I tried to build this on a physical device (iPhone X with iOS 15) and my XCode build failed here:

Screenshot of XCode build failure

Does anyone have any clue or ideas?

Body:
I have made an app which uses flutter_native_image, image_picker and image_cropper to take pictures and resize them at will. On Android build it works flawless.
While running XCode build to make this work on iOS, the build fails because packages cannot be found, although I followed (to my newbee knowledge) all necessary steps

Steps I did to create a clean build on iOS:

flutter clean
flutter pub get
pod deintegrate; pod install

In the log of the pod install, I can see that the necessary packages are being installed. See log below

@LMAC-C02F5662MD6R ~/work/git/boekelaar/bierpot/frontend/ios> pod deintegrate; pod install
Deintegrating `Runner.xcodeproj`
Deleted 1 'Check Pods Manifest.lock' build phases.
Deleted 1 'Embed Pods Frameworks' build phases.
- Pods_Runner.framework
Deleting Pod file references from project
- Pods-Runner.debug.xcconfig
- Pods-Runner.release.xcconfig
- Pods-Runner.profile.xcconfig
Deleted 1 empty `Frameworks` groups from project.
Removing `Pods` directory.

Project has been deintegrated. No traces of CocoaPods left in project.
Note: The workspace referencing the Pods project still remains.
Analyzing dependencies
Downloading dependencies
Installing Flutter (1.0.0)
Installing TOCropViewController (2.6.1)
Installing flutter_native_image (0.0.1)
Installing image_cropper (0.0.4)
Installing image_picker_ios (0.0.1)
Installing path_provider_ios (0.0.1)
Installing shared_preferences_ios (0.0.1)
Generating Pods project
Integrating client project
Pod installation complete! There are 6 dependencies from the Podfile and 7 total pods installed.

After this install, I tried to build this on a physical device (iPhone X with iOS 15) and my XCode build failed here:

Screenshot of XCode build failure

Does anyone have any clue or ideas?


来源: stackexchange

问:
Audio link for sending WhatsApp message
I recorded user audio in my web after recording how Can I make a share button where user will click and WhatsApp app will get open and he can send that audio to his friends.

How can I open WhatsApp app after clicking the button and send voice message.

ContentLicense: CC BY-SA 4.0

Title: Audio link for sending WhatsApp message


问:
Unable to search for words contining hyphens using Postgres TSVector
I've got a system in place that uses Postgres and TSVector to search for relevant terms, however whenever I search for text containing a hyphen (-) the results are not very useful. Example: searching IL-7 returns results with April 7.

Is there a configuration option I'm missing?

For background I'm using sqlalchemy-searchable as a frontend.
https://sqlalchemy-searchable.readthedocs.io/en/latest/configuration.html

I've tried modifying my search parameters but I don't believe that to be the issue.


问:
How do I troubleshoot the "ORA-00001: unique constraint violated" error in GridDB?
Can you assist me in determining the issue with my code?</p>
```<code>import griddb_python as gdb

# Connect to the GridDB server
factory = gdb.StoreFactory.get_instance()
store = factory.get_store(host='localhost', port=31999)

# Insert a new customer into the "Customers" table
store.put(container_name='Customers', rows=[(1, 'John Smith',
'john.smith@example.com', '555-555-5555'),
(2, 'Jane Doe', 'jane.doe@example.com', '555-555-5556')])

ORA-00001: unique constraint (sales.PK_Customers) violated
</code>```

Body:
Can you assist me in determining the issue with my code?

import griddb_python as gdb

# Connect to the GridDB server
factory = gdb.StoreFactory.get_instance()
store = factory.get_store(host='localhost', port=31999)

# Insert a new customer into the "Customers" table
store.put(container_name='Customers', rows=[(1, 'John Smith',
'john.smith@example.com', '555-555-5555'),
(2, 'Jane Doe', 'jane.doe@example.com', '555-555-5556')])

ORA-00001: unique constraint (sales.PK_Customers) violated


问:
Can I add a conditional statement to a group by in pandas?
I have a merged dataframe, which I have simplified with some example data:

Tech
State
Capacity
age

wind
CA
15
2002

wind
CA
48
2005

biomass
AK
96
2006

gas
AK
52
2020

gas
IL
10
2014

hydro
CA
12
2056

wind
TX
12
2045

gas
TX
45
2020

nuclear
IL
25
2010

wind
CA
63
2000

nuclear
CA
23
2001

I currently have a bit of code:

```<code>df1.groupby(["Tech","age"])["Capacity"].sum().reset_index()
</code>```

...that groups by the technology and sums the capacity for the year. I want to be able to group it by technology and sum up the total capacity for each year but only for one state at a time. e.g. CA.

So for example I would like to know the sum of "capacity" for "tech" == "wind" in 2002, 2003, 2004 etc and so on for each technology and year accordingly.

I am aware my example dataset is not representative of this but my actual dataset is very large and I hope the example above makes sense!

Thanks.

Body:
I have a merged dataframe, which I have simplified with some example data:

Tech
State
Capacity
age

wind
CA
15
2002

wind
CA
48
2005

biomass
AK
96
2006

gas
AK
52
2020

gas
IL
10
2014

hydro
CA
12
2056

wind
TX
12
2045

gas
TX
45
2020

nuclear
IL
25
2010

wind
CA
63
2000

nuclear
CA
23
2001

I currently have a bit of code:

df1.groupby(["Tech","age"])["Capacity"].sum().reset_index()

...that groups by the technology and sums the capacity for the year. I want to be able to group it by technology and sum up the total capacity for each year but only for one state at a time. e.g. CA.

So for example I would like to know the sum of "capacity" for "tech" == "wind" in 2002, 2003, 2004 etc and so on for each technology and year accordingly.

I am aware my example dataset is not representative of this but my actual dataset is very large and I hope the example above makes sense!

Thanks.


问:
Error: Unable to resolve module ./dist/sanityClient.browser.mjs from D:\React Native\Delivero clone\node_modules\@sanity\client\index.js:
I am making an app on react native via expo and sanity as the backend. But when I try to connect the sanity backend with react native app I got an error mentioned and terminal also shows error mentioned below

None of these files exist:

node_modules@sanity\client\dist\sanityClient.browser.mjs(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)

node_modules@sanity\client\dist\sanityClient.browser.mjs\index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)

The below mentioned code is wrriten in node modules file of sanity

```<code>  3 | if (typeof EdgeRuntime === 'string') {
> 4 |   module.exports = require('./dist/sanityClient.browser.mjs')
    |                             ^
  5 | } else {
  6 |   module.exports = require('./lib/sanityClient.js')
  7 | }
</code>```

The error is because of this yarn add @sanity/client @sanity/image-url as I guess the code imported via this module has some error. I might be wrong .

Body:
I am making an app on react native via expo and sanity as the backend. But when I try to connect the sanity backend with react native app I got an error mentioned and terminal also shows error mentioned below

None of these files exist:

node_modules@sanity\client\dist\sanityClient.browser.mjs(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)

node_modules@sanity\client\dist\sanityClient.browser.mjs\index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)

The below mentioned code is wrriten in node modules file of sanity

  3 | if (typeof EdgeRuntime === 'string') {
> 4 |   module.exports = require('./dist/sanityClient.browser.mjs')
    |                             ^
  5 | } else {
  6 |   module.exports = require('./lib/sanityClient.js')
  7 | }

The error is because of this yarn add @sanity/client @sanity/image-url as I guess the code imported via this module has some error. I might be wrong .


问:
How to make listView Product Table item with Border
Please how can make Product item table in listview iwth border in first and end
like this image:

I made it, but in the middle, I have two lines of border. I need one  only.


问:
Jenkins fetch plugin configuration with groovy
For a custom Jenkins plugin for which there are parameters configured under 'Configure System' on a global level.

I would like to fetch those values and dynamically use that information in a job.

I get the list of all plugins by using:

```<code>def plugins = new ArrayList(jenkins.model.Jenkins.instance.getPluginManager().getPlugins())
</code>```

But, how do I fetch the configuration values for the required plugin, say Plugin:xyz
Is there a way to get all the properties?

Body:
For a custom Jenkins plugin for which there are parameters configured under 'Configure System' on a global level.

I would like to fetch those values and dynamically use that information in a job.

I get the list of all plugins by using:

def plugins = new ArrayList(jenkins.model.Jenkins.instance.getPluginManager().getPlugins())

But, how do I fetch the configuration values for the required plugin, say Plugin:xyz
Is there a way to get all the properties?


问:
Why can't I see PSQL tools in pgAdmin that I installed?
I'm using pgAdmin for creating tables but when I install it in my work computer I can not see the PSQL tools but when I install the same version on my PC I have the PSQL tools.
Does anyone know what might be the reason?

I searched but I did not find an answer, Also I talk with IT sopport in my department they did not know the answer eaither.


问:
Pandas ExcelWriter is overwriting my entire Excel workbook, instead of just appending to a worksheet
I'm trying to add my DataFrame data to an existing Excel worksheet and instead, it's completely overwriting it and deleting all of my existing worksheets. Here's the warning message I get in my console:

```<code>UserWarning: File contains an invalid specification for Closed POA&M Items. This will be removed
  warn(msg)

UserWarning: File contains an invalid specification for Open POA&M Items. This will be removed
  warn(msg)
</code>```

I'm just trying to add to my "Open POA&M Items" sheet using the following code:

```<code>curr_poam = "Reports/September.xlsx"
curr_closed_sheet = "Open POA&M Items"

def main():
    writeToExcel(closed_items, curr_poam, curr_closed_sheet)

def writeToExcel(dataframe, path_to_current_poam, sheet_name):
    with pd.ExcelWriter(path_to_current_poam, engine="openpyxl", mode='a', if_sheet_exists='overlay') as writer:
        dataframe.to_excel(writer, sheet_name=sheet_name,  startrow=5, index=False, header=4)
</code>```

Here's what my Open worksheet looks like, which has all the headers and columns formatted

Is it possible to start writing to this worksheet from row 6, adding my DataFrame to it? Based off the Pandas docs I thought I could just use mode='a' and if_sheet_exists='overlay' to append to an existing worksheet, but instead it's just deleting all worksheets and creating a new one with just my DataFrame in it.

Solutions attempted:

So far tried the two solutions here Pandas mode='a', if_sheet_exists='overlay' not working

Updating Pandas and Openpyxl didn't fix this problem for my use-case

Neither did adding a start row to this line of code dataframe.to_excel(writer, sheet_name=sheet_name, index=False, startrow=writer.sheets[sheet_name].max_row, header=None)

However, this did generate two new errors:

```<code>KeyError: 'Open POA&M Items'

IndexError: At least one sheet must be visible
</code>```

Body:
I'm trying to add my DataFrame data to an existing Excel worksheet and instead, it's completely overwriting it and deleting all of my existing worksheets. Here's the warning message I get in my console:

UserWarning: File contains an invalid specification for Closed POA&M Items. This will be removed
  warn(msg)

UserWarning: File contains an invalid specification for Open POA&M Items. This will be removed
  warn(msg)

I'm just trying to add to my "Open POA&M Items" sheet using the following code:

curr_poam = "Reports/September.xlsx"
curr_closed_sheet = "Open POA&M Items"

def main():
    writeToExcel(closed_items, curr_poam, curr_closed_sheet)

def writeToExcel(dataframe, path_to_current_poam, sheet_name):
    with pd.ExcelWriter(path_to_current_poam, engine="openpyxl", mode='a', if_sheet_exists='overlay') as writer:
        dataframe.to_excel(writer, sheet_name=sheet_name,  startrow=5, index=False, header=4)

Here's what my Open worksheet looks like, which has all the headers and columns formatted

Is it possible to start writing to this worksheet from row 6, adding my DataFrame to it? Based off the Pandas docs I thought I could just use mode='a' and if_sheet_exists='overlay' to append to an existing worksheet, but instead it's just deleting all worksheets and creating a new one with just my DataFrame in it.

Solutions attempted:

So far tried the two solutions here Pandas mode='a', if_sheet_exists='overlay' not working

Updating Pandas and Openpyxl didn't fix this problem for my use-case

Neither did adding a start row to this line of code dataframe.to_excel(writer, sheet_name=sheet_name, index=False, startrow=writer.sheets[sheet_name].max_row, header=None)

However, this did generate two new errors:

KeyError: 'Open POA&M Items'

IndexError: At least one sheet must be visible


问:
Test suite failed to run TypeError: Cannot read property 'html' of undefined
I try execute tests in React JS. I create dir test, my component has name 'component.test.js'. I install jest and other servies. My first bug is 'SyntaxError: Cannot use import statement outside a module', I think I fix it. But now I have problem with cannot read property 'html'.

My code:

```<code>/**
 * @jest-environment jsdom
 */
import React from "react";
import LandingPage from "../components/LandingPage";
import { render, screen } from "@testing-library/react";
import { MemoryRouter as Router } from "react-router-dom";
describe("LandingPage component", () => {
  it("Should render LandingPage component", () => {
    render(
      <Router>
        <LandingPage />
      </Router>
    );

    screen.debug();
    const signInInformation = screen.getByText("TEST");
    expect(signInInformation).toBeInTheDocument();
  });
});
</code>```

I installed jest and I tried to exchange test-environment but it still doesn't work. I also try delete all node-modules and install again.

My dependencies:

```<code>"@babel/plugin-syntax-jsx": "^7.18.6",
"@babel/preset-env": "^7.20.2",
"@babel/preset-react": "^7.18.6",
"@types/react": "^18.0.21",
"babel-jest": "^29.3.1",
"babel-plugin-css-modules-transform": "^1.6.2",
"jest": "^29.3.1",
"jest-environment-jsdom": "^27.5.1",
</code>```

Body:
I try execute tests in React JS. I create dir test, my component has name 'component.test.js'. I install jest and other servies. My first bug is 'SyntaxError: Cannot use import statement outside a module', I think I fix it. But now I have problem with cannot read property 'html'.

My code:

/**
 * @jest-environment jsdom
 */
import React from "react";
import LandingPage from "../components/LandingPage";
import { render, screen } from "@testing-library/react";
import { MemoryRouter as Router } from "react-router-dom";
describe("LandingPage component", () => {
  it("Should render LandingPage component", () => {
    render(
      <Router>
        <LandingPage />
      </Router>
    );

    screen.debug();
    const signInInformation = screen.getByText("TEST");
    expect(signInInformation).toBeInTheDocument();
  });
});

I installed jest and I tried to exchange test-environment but it still doesn't work. I also try delete all node-modules and install again.

My dependencies:

"@babel/plugin-syntax-jsx": "^7.18.6",
"@babel/preset-env": "^7.20.2",
"@babel/preset-react": "^7.18.6",
"@types/react": "^18.0.21",
"babel-jest": "^29.3.1",
"babel-plugin-css-modules-transform": "^1.6.2",
"jest": "^29.3.1",
"jest-environment-jsdom": "^27.5.1",


问:
How to make fields inside nested structure non-nullable
I have data structure like below shown. What I want to make sure is that field2 only contains non-nullable values, and also want to make sure field3.ZZZ is nullable = true.

```<code> root
 |-- field1: string (nullable = true)
 |-- field2: struct (nullable = true)
 |-- field3: struct (nullable = true)
 |    |-- XXX: array (nullable = true)
 |    |    |-- element: struct (containsNull = true)
 |    |    |    |-- s: array (nullable = true)
 |    |    |    |    |-- element: struct (containsNull = true)
 |    |    |    |    |    |-- v: string (nullable = true)
 |    |    |    |-- v: long (nullable = true)
 |    |-- YYY: array (nullable = true)
 |    |    |-- element: struct (containsNull = true)
 |    |    |    |-- s: array (nullable = true)
 |    |    |    |    |-- element: struct (containsNull = true)
 |    |    |    |    |    |-- v: string (nullable = true)
 |    |    |    |-- v: long (nullable = true)
 |    |-- ZZZ: array (nullable = true)
 |    |    |-- element: null (containsNull = true)
</code>```

I did lots of research, but haven't found clear way to do the setting in nested structure. Can anyone help me on this?

Body:
I have data structure like below shown. What I want to make sure is that field2 only contains non-nullable values, and also want to make sure field3.ZZZ is nullable = true.

 root
 |-- field1: string (nullable = true)
 |-- field2: struct (nullable = true)
 |-- field3: struct (nullable = true)
 |    |-- XXX: array (nullable = true)
 |    |    |-- element: struct (containsNull = true)
 |    |    |    |-- s: array (nullable = true)
 |    |    |    |    |-- element: struct (containsNull = true)
 |    |    |    |    |    |-- v: string (nullable = true)
 |    |    |    |-- v: long (nullable = true)
 |    |-- YYY: array (nullable = true)
 |    |    |-- element: struct (containsNull = true)
 |    |    |    |-- s: array (nullable = true)
 |    |    |    |    |-- element: struct (containsNull = true)
 |    |    |    |    |    |-- v: string (nullable = true)
 |    |    |    |-- v: long (nullable = true)
 |    |-- ZZZ: array (nullable = true)
 |    |    |-- element: null (containsNull = true)

I did lots of research, but haven't found clear way to do the setting in nested structure. Can anyone help me on this?


问:
detaching the output of a conv layer and modify using numpy libraries and then pass this as an input to next layers in forward pass
```<code>  self.fc1 = nn.Linear(input_size, hidden_size)
        self.relu = nn.ReLU()
        self.fc2 = nn.Linear(hidden_size, num_classes)

    def forward(self, x):
        out = self.fc1(x)
        out =out.detach().numpy()
        out =rand_func(out)
        out =out.from_numpy()
        out = self.relu(out)
        out = self.fc2(out)

</code>```

RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn

Body:
  self.fc1 = nn.Linear(input_size, hidden_size)
        self.relu = nn.ReLU()
        self.fc2 = nn.Linear(hidden_size, num_classes)

    def forward(self, x):
        out = self.fc1(x)
        out =out.detach().numpy()
        out =rand_func(out)
        out =out.from_numpy()
        out = self.relu(out)
        out = self.fc2(out)

RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn


问:
Map data from one dictionary into another
I have data from two APIs in JSON format and parsing them into 2 dictionaries (d1, d2).

I need to derive two additional fields FieldName(from d1), attrVal (from d2) by mapping subAttrDefId present in d2 ("attrValues") with subAttribDefId present in d2.

I have tried below code, but it's giving me "BoundsError"

```<code>
resp = HTTP.get(URL1)
resp2 = HTTP.get(URL2)
global dict1, dict2

jsonStr = String(resp.body)
dict1 = JSON.parse(jsonStr)

jsonStr2 = String(resp2.body)
dict2 = JSON.parse(jsonStr2)

field_names = values(dict1)

    for item in dict2
        # for field_name in field_names
        #     item[field_name] = missing
        # end
        attr_vals = item["attrValues"]
        for attr_val in attr_vals
            field_name = dict1[attr_val["subAttrDefId"]]
            item[field_name] = attr_val["attr_val"]
            delete!(item,"attrValues")
        end
    end
</code>```

Sample data from 1st API(d1):

```<code>[
   {
      "DefId":4327,
      "DefVersionId":4326,
      "attrValues":[
         {
            "subAttrValId":4328,
            "DefId":4327,
            "subAttrDefId":3888,
            "attrVal":"276",
            "crtUserid":"3456789",
            "crtTmstmp":null,
            "updtUserid":null,
            "updtTmstmp":"2023-01-10T14:08:36.000+00:00"
         },
         {
            "subAttrValId":4329,
            "DefId":4327,
            "subAttrDefId":3889,
            "attrVal":"52",
            "crtUserid":"3456789",
            "crtTmstmp":null,
            "updtUserid":null,
            "updtTmstmp":"2023-01-10T14:08:36.000+00:00"
         },
         {
            "subAttrValId":4330,
            "DefId":4327,
            "subAttrDefId":3890,
            "attrVal":"50",
            "crtUserid":"3456789",
            "crtTmstmp":null,
            "updtUserid":null,
            "updtTmstmp":"2023-01-10T14:08:36.000+00:00"
         },
         {
            "subAttrValId":4331,
            "DefId":4327,
            "subAttrDefId":3891,
            "attrVal":"24",
            "crtUserid":"3456789",
            "crtTmstmp":null,
            "updtUserid":null,
            "updtTmstmp":"2023-01-10T14:08:36.000+00:00"
         }
],
      "code":"AB",
      "typeCode":"00",
      "crtUserid":"12345",
      "crtTmstmp":null,
      "updtUserid":"23456",
      "updtTmstmp":"2023-01-10T14:08:36.000+00:00"
   }
]
</code>```

Sample data from 2nd API(d2):

```<code>[
   {
      "subAttribDefId":3886,
      "displayLabel":"string",
      "attribDesc":"string",
      "attribName":"string",
      "attribDataType":"string",
      "attrFormat":"string",
      "crtUserid":"string",
      "crtTmstmp":"2022-12-21T19:07:14.000+00:00",
      "updtUserid":"string",
      "updtTmstmp":"2022-12-21T19:07:14.000+00:00",
      "FieldName":null,
      "category":null,
      "subcategory":null
   },
   {
      "subAttribDefId":3887,
      "displayLabel":"string",
      "attribDesc":"string",
      "attribName":"string",
      "attribDataType":"string",
      "attrFormat":"string",
      "crtUserid":"string",
      "crtTmstmp":"2022-12-21T19:08:18.000+00:00",
      "updtUserid":"string",
      "updtTmstmp":"2022-12-21T19:08:18.000+00:00",
      "FieldName":null,
      "category":null,
      "subcategory":null
   },
   {
      "subAttribDefId":3888,
      "displayLabel":"Number of bucket",
      "attribDesc":"Number of bucket",
      "attribName":"numbuckets",
      "attribDataType":"number",
      "attrFormat":"",
      "crtUserid":"12345",
      "crtTmstmp":"2022-12-21T19:08:56.000+00:00",
      "updtUserid":null,
      "updtTmstmp":"2022-12-21T19:08:56.000+00:00",
      "FieldName":null,
      "category":null,
      "subcategory":null
   },
   {
      "subAttribDefId":3889,
      "displayLabel":"Cabin",
      "attribDesc":"class Cabin",
      "attribName":"aCabin",
      "attribDataType":"number",
      "attrFormat":"",
      "crtUserid":"1234",
      "crtTmstmp":"2022-12-21T19:08:56.000+00:00",
      "updtUserid":null,
      "updtTmstmp":"2022-12-21T19:08:56.000+00:00",
      "FieldName":null,
      "category":null,
      "subcategory":null
   }
</code>```
```<code>
**Dict1**:

Any[Dict{String, Any}("crtTmstmp" => "2023-01-12T08:17:49.000+00:00", "attribName" => "buckets", "subAttribDefId" => 1, "attrFormat" => "^[\\d]*\$", "updtTmstmp" => "2023-01-12T08:17:49.000+00:00", "displayLabel" => "buckets", "crtUserid" => "23456", "FieldName" => nothing, "attribDesc" => "buckets", "category" => "Seat Attributes",
"updtUserid" => nothing, "attribDataType" => "number", "subcategory" => nothing), Dict{String, Any}("crtTmstmp" => "2023-01-12T08:17:49.000+00:00", "attribName" => "fCabin", "subAttribDefId" => 2, "attrFormat" => "^[\\d]*\$", "updtTmstmp" => "2023-01-12T08:17:49.000+00:00", "displayLabel" => "F Cabin", "crtUserid" => "23456", "FieldName" => nothing, "attribDesc" => "First class Cabin", "category" => "Seat Attributes", "updtUserid" => nothing, "attribDataType" => "number", "subcategory" => nothing), Dict{String, Any}("crtTmstmp" => "2023-01-12T08:17:49.000+00:00", "attribName" => "jCabin", "subAttribDefId" => 3, "attrFormat" => "^[\\d]*\$", "updtTmstmp" => "2023-01-12T08:17:49.000+00:00", "displayLabel" => "J Cabin", "crtUserid" => "23456", "FieldName" => nothing, "attribDesc" => "J Cabin", "category" => "Seat Attributes", "updtUserid" => nothing, "attribDataType" => "number", "subcategory" => nothing), Dict{String, Any}("crtTmstmp" => "2023-01-12T08:17:49.000+00:00", "attribName" => "oCabin", "subAttribDefId" => 4, "attrFormat" => "^[\\d]*\$", "updtTmstmp" => "2023-01-12T08:17:49.000+00:00", "displayLabel" => "O Cabin", "crtUserid" => "23456", "FieldName" => nothing, "attribDesc" => "O Cabin", "category" => "Seat Attributes", "updtUserid" => nothing, "attribDataType" => "number", "subcategory" => nothing), Dict{String, Any}("crtTmstmp" => "2023-01-12T08:17:49.000+00:00", "attribName" => "yPlusCabin", "subAttribDefId"
=> 5, "attrFormat" => "^[\\d]*\$", "updtTmstmp" => "2023-01-12T08:17:49.000+00:00", "displayLabel" => "Y+ Cabin", "crtUserid" => "23456", "FieldName" => nothing, "attribDesc" => "Y Plus Cabin", "category" => "Seat Attributes", "updtUserid" => nothing, "attribDataType" => "number", "subcategory" => nothing)]

**Dict2:**
Any[Dict{String, Any}("proxyCode" => "000", "crtTmstmp" => nothing, "equipCode" => "ABC", "proxyequipCode" => "ABC", "reportequipcode" => "ABC", "userTypeCode" => "ABC", "code" => "AB", "isUserDefined" => 0, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "ftype" => "000", "crtUserid" => "123456", "attrValues" => Any[Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "276", "subAttribValId" => 4328, "crtUserid" => "123456", "subAttribDefId" => 3888, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "52", "subAttribValId" => 4329, "crtUserid" => "123456", "subAttribDefId" => 3889, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "50", "subAttribValId" => 4330, "crtUserid" => "123456", "subAttribDefId" => 3890, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "24", "subAttribValId" => 4331, "crtUserid" => "123456", "subAttribDefId" => 3891, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "46", "subAttribValId" => 4332, "crtUserid" => "123456", "subAttribDefId" => 3892, "subFletDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "202", "subAttribValId" => 4333, "crtUserid" => "123456", "subAttribDefId" => 3893, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "2", "subAttribValId" => 4334, "crtUserid" => "123456", "subAttribDefId" => 3894, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "Normal", "subAttribValId" => 4335, "crtUserid" => "123456", "subAttribDefId" => 3895, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "8", "subAttribValId" => 4336, "crtUserid" => "123456", "subAttribDefId" => 3896, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "180", "subAttribValId" => 4337, "crtUserid" => "123456", "subAttribDefId" => 3897, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "218", "subAttribValId" => 4338, "crtUserid" => "123456", "subAttribDefId" => 3898, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "9", "subAttribValId" => 4339, "crtUserid" => "123456", "subAttribDefId" => 3899, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "181", "subAttribValId" => 4340, "crtUserid" => "123456", "subAttribDefId" => 3900, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "-", "subAttribValId" => 4341, "crtUserid" => "123456", "subAttribDefId" => 3901, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "40000", "subAttribValId" => 4342, "crtUserid" => "123456", "subAttribDefId" => 3902, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "2.71", "subAttribValId" => 4343, "crtUserid" => "123456", "subAttribDefId" => 3903, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "2.96", "subAttribValId" => 4344, "crtUserid" => "123456", "subAttribDefId" => 3904, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "2%", "subAttribValId" => 4345, "crtUserid" => "123456", "subAttribDefId" => 3905, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "-3%", "subAttribValId" => 4346, "crtUserid" => "123456", "subAttribDefId" => 3906, "subDefId" => 4327)], "bodyType" => "W", "DefVersionId" => 4326, "subDefId" => 4327, "updtUserid" => "456789")]
</code>```

Body:
I have data from two APIs in JSON format and parsing them into 2 dictionaries (d1, d2).

I need to derive two additional fields FieldName(from d1), attrVal (from d2) by mapping subAttrDefId present in d2 ("attrValues") with subAttribDefId present in d2.

I have tried below code, but it's giving me "BoundsError"

resp = HTTP.get(URL1)
resp2 = HTTP.get(URL2)
global dict1, dict2

jsonStr = String(resp.body)
dict1 = JSON.parse(jsonStr)

jsonStr2 = String(resp2.body)
dict2 = JSON.parse(jsonStr2)

field_names = values(dict1)

    for item in dict2
        # for field_name in field_names
        #     item[field_name] = missing
        # end
        attr_vals = item["attrValues"]
        for attr_val in attr_vals
            field_name = dict1[attr_val["subAttrDefId"]]
            item[field_name] = attr_val["attr_val"]
            delete!(item,"attrValues")
        end
    end

Sample data from 1st API(d1):

[
   {
      "DefId":4327,
      "DefVersionId":4326,
      "attrValues":[
         {
            "subAttrValId":4328,
            "DefId":4327,
            "subAttrDefId":3888,
            "attrVal":"276",
            "crtUserid":"3456789",
            "crtTmstmp":null,
            "updtUserid":null,
            "updtTmstmp":"2023-01-10T14:08:36.000+00:00"
         },
         {
            "subAttrValId":4329,
            "DefId":4327,
            "subAttrDefId":3889,
            "attrVal":"52",
            "crtUserid":"3456789",
            "crtTmstmp":null,
            "updtUserid":null,
            "updtTmstmp":"2023-01-10T14:08:36.000+00:00"
         },
         {
            "subAttrValId":4330,
            "DefId":4327,
            "subAttrDefId":3890,
            "attrVal":"50",
            "crtUserid":"3456789",
            "crtTmstmp":null,
            "updtUserid":null,
            "updtTmstmp":"2023-01-10T14:08:36.000+00:00"
         },
         {
            "subAttrValId":4331,
            "DefId":4327,
            "subAttrDefId":3891,
            "attrVal":"24",
            "crtUserid":"3456789",
            "crtTmstmp":null,
            "updtUserid":null,
            "updtTmstmp":"2023-01-10T14:08:36.000+00:00"
         }
],
      "code":"AB",
      "typeCode":"00",
      "crtUserid":"12345",
      "crtTmstmp":null,
      "updtUserid":"23456",
      "updtTmstmp":"2023-01-10T14:08:36.000+00:00"
   }
]

Sample data from 2nd API(d2):

[
   {
      "subAttribDefId":3886,
      "displayLabel":"string",
      "attribDesc":"string",
      "attribName":"string",
      "attribDataType":"string",
      "attrFormat":"string",
      "crtUserid":"string",
      "crtTmstmp":"2022-12-21T19:07:14.000+00:00",
      "updtUserid":"string",
      "updtTmstmp":"2022-12-21T19:07:14.000+00:00",
      "FieldName":null,
      "category":null,
      "subcategory":null
   },
   {
      "subAttribDefId":3887,
      "displayLabel":"string",
      "attribDesc":"string",
      "attribName":"string",
      "attribDataType":"string",
      "attrFormat":"string",
      "crtUserid":"string",
      "crtTmstmp":"2022-12-21T19:08:18.000+00:00",
      "updtUserid":"string",
      "updtTmstmp":"2022-12-21T19:08:18.000+00:00",
      "FieldName":null,
      "category":null,
      "subcategory":null
   },
   {
      "subAttribDefId":3888,
      "displayLabel":"Number of bucket",
      "attribDesc":"Number of bucket",
      "attribName":"numbuckets",
      "attribDataType":"number",
      "attrFormat":"",
      "crtUserid":"12345",
      "crtTmstmp":"2022-12-21T19:08:56.000+00:00",
      "updtUserid":null,
      "updtTmstmp":"2022-12-21T19:08:56.000+00:00",
      "FieldName":null,
      "category":null,
      "subcategory":null
   },
   {
      "subAttribDefId":3889,
      "displayLabel":"Cabin",
      "attribDesc":"class Cabin",
      "attribName":"aCabin",
      "attribDataType":"number",
      "attrFormat":"",
      "crtUserid":"1234",
      "crtTmstmp":"2022-12-21T19:08:56.000+00:00",
      "updtUserid":null,
      "updtTmstmp":"2022-12-21T19:08:56.000+00:00",
      "FieldName":null,
      "category":null,
      "subcategory":null
   }

**Dict1**:

Any[Dict{String, Any}("crtTmstmp" => "2023-01-12T08:17:49.000+00:00", "attribName" => "buckets", "subAttribDefId" => 1, "attrFormat" => "^[\\d]*\$", "updtTmstmp" => "2023-01-12T08:17:49.000+00:00", "displayLabel" => "buckets", "crtUserid" => "23456", "FieldName" => nothing, "attribDesc" => "buckets", "category" => "Seat Attributes",
"updtUserid" => nothing, "attribDataType" => "number", "subcategory" => nothing), Dict{String, Any}("crtTmstmp" => "2023-01-12T08:17:49.000+00:00", "attribName" => "fCabin", "subAttribDefId" => 2, "attrFormat" => "^[\\d]*\$", "updtTmstmp" => "2023-01-12T08:17:49.000+00:00", "displayLabel" => "F Cabin", "crtUserid" => "23456", "FieldName" => nothing, "attribDesc" => "First class Cabin", "category" => "Seat Attributes", "updtUserid" => nothing, "attribDataType" => "number", "subcategory" => nothing), Dict{String, Any}("crtTmstmp" => "2023-01-12T08:17:49.000+00:00", "attribName" => "jCabin", "subAttribDefId" => 3, "attrFormat" => "^[\\d]*\$", "updtTmstmp" => "2023-01-12T08:17:49.000+00:00", "displayLabel" => "J Cabin", "crtUserid" => "23456", "FieldName" => nothing, "attribDesc" => "J Cabin", "category" => "Seat Attributes", "updtUserid" => nothing, "attribDataType" => "number", "subcategory" => nothing), Dict{String, Any}("crtTmstmp" => "2023-01-12T08:17:49.000+00:00", "attribName" => "oCabin", "subAttribDefId" => 4, "attrFormat" => "^[\\d]*\$", "updtTmstmp" => "2023-01-12T08:17:49.000+00:00", "displayLabel" => "O Cabin", "crtUserid" => "23456", "FieldName" => nothing, "attribDesc" => "O Cabin", "category" => "Seat Attributes", "updtUserid" => nothing, "attribDataType" => "number", "subcategory" => nothing), Dict{String, Any}("crtTmstmp" => "2023-01-12T08:17:49.000+00:00", "attribName" => "yPlusCabin", "subAttribDefId"
=> 5, "attrFormat" => "^[\\d]*\$", "updtTmstmp" => "2023-01-12T08:17:49.000+00:00", "displayLabel" => "Y+ Cabin", "crtUserid" => "23456", "FieldName" => nothing, "attribDesc" => "Y Plus Cabin", "category" => "Seat Attributes", "updtUserid" => nothing, "attribDataType" => "number", "subcategory" => nothing)]

**Dict2:**
Any[Dict{String, Any}("proxyCode" => "000", "crtTmstmp" => nothing, "equipCode" => "ABC", "proxyequipCode" => "ABC", "reportequipcode" => "ABC", "userTypeCode" => "ABC", "code" => "AB", "isUserDefined" => 0, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "ftype" => "000", "crtUserid" => "123456", "attrValues" => Any[Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "276", "subAttribValId" => 4328, "crtUserid" => "123456", "subAttribDefId" => 3888, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "52", "subAttribValId" => 4329, "crtUserid" => "123456", "subAttribDefId" => 3889, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "50", "subAttribValId" => 4330, "crtUserid" => "123456", "subAttribDefId" => 3890, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "24", "subAttribValId" => 4331, "crtUserid" => "123456", "subAttribDefId" => 3891, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "46", "subAttribValId" => 4332, "crtUserid" => "123456", "subAttribDefId" => 3892, "subFletDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "202", "subAttribValId" => 4333, "crtUserid" => "123456", "subAttribDefId" => 3893, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "2", "subAttribValId" => 4334, "crtUserid" => "123456", "subAttribDefId" => 3894, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "Normal", "subAttribValId" => 4335, "crtUserid" => "123456", "subAttribDefId" => 3895, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "8", "subAttribValId" => 4336, "crtUserid" => "123456", "subAttribDefId" => 3896, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "180", "subAttribValId" => 4337, "crtUserid" => "123456", "subAttribDefId" => 3897, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "218", "subAttribValId" => 4338, "crtUserid" => "123456", "subAttribDefId" => 3898, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "9", "subAttribValId" => 4339, "crtUserid" => "123456", "subAttribDefId" => 3899, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "181", "subAttribValId" => 4340, "crtUserid" => "123456", "subAttribDefId" => 3900, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "-", "subAttribValId" => 4341, "crtUserid" => "123456", "subAttribDefId" => 3901, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "40000", "subAttribValId" => 4342, "crtUserid" => "123456", "subAttribDefId" => 3902, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "2.71", "subAttribValId" => 4343, "crtUserid" => "123456", "subAttribDefId" => 3903, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "2.96", "subAttribValId" => 4344, "crtUserid" => "123456", "subAttribDefId" => 3904, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "2%", "subAttribValId" => 4345, "crtUserid" => "123456", "subAttribDefId" => 3905, "subDefId" => 4327), Dict{String, Any}("crtTmstmp" => nothing, "updtUserid" => nothing, "updtTmstmp" => "2023-01-10T14:08:36.000+00:00", "attrVal" => "-3%", "subAttribValId" => 4346, "crtUserid" => "123456", "subAttribDefId" => 3906, "subDefId" => 4327)], "bodyType" => "W", "DefVersionId" => 4326, "subDefId" => 4327, "updtUserid" => "456789")]


问:
Runtime Permissions Dialog box not showing up in Android 9 and below
The permission dialog does not show up on Android 9 and below. My code works fine on Android 11. i've tried ActivityCompat.requestPermissions() and ActivityResultLauncher but none of them work.

When it runs the line permissionResultLauncher.launch() my app crashes and it also crashes the emulator, such that i have to delete the Emulator and reinstall a new one, otherwise it won't show me anything on the screen.

```<code>  <uses-permission android:name="android.permission.RECORD_AUDIO"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

 <application
   ...
 </application>

</code>```
```<code>
public class MainActivity extends AppCompatActivity{

    private ActivityMainBinding binding;
    private long pressedTime;
    private ActivityResultLauncher<String[]> permissionResultLauncher;
    private boolean isRecordPermGranted = false;
    private boolean isWritePermGranted = false;
    private int totalCount;
    private DBHelper dbHelper;
    private ImageButton imgbtnRecord, imgbtnList;
    private ImageView ivRestore;
    private TextView tvLoading, tvRecord;
    private boolean asyncTaskRunning;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = ActivityMainBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());
        SharedPreferences prefs = getPreferences(Context.MODE_PRIVATE);
        SharedPreferences.Editor editor = prefs.edit();

        totalCount = prefs.getInt("counter", 0);
        if(totalCount < 4){
            totalCount++;
            editor.putInt("counter", totalCount);
            editor.commit();
        }

        dbHelper = new DBHelper(this);
        asyncTaskRunning = false;
        imgbtnRecord = (ImageButton) findViewById(R.id.imgbtnRecord);
        imgbtnList = (ImageButton) findViewById(R.id.imgbtnList);
        tvLoading = findViewById(R.id.tvLoading);
        tvRecord = findViewById(R.id.tvRecord);
        ivRestore = findViewById(R.id.ivRestore);

        tvLoading.setVisibility(View.GONE);
        ivRestore.setVisibility(View.GONE);
        imgbtnRecord.setVisibility(View.VISIBLE);
        imgbtnList.setVisibility(View.VISIBLE);
        tvRecord.setVisibility(View.VISIBLE);
        isRecordPermGranted = ContextCompat.checkSelfPermission(MainActivity.this,Manifest.permission.RECORD_AUDIO) == PackageManager.PERMISSION_GRANTED;
        isWritePermGranted = ContextCompat.checkSelfPermission(MainActivity.this,Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED;

        permissionResultLauncher = registerForActivityResult(new ActivityResultContracts.RequestMultiplePermissions(), new ActivityResultCallback<Map<String, Boolean>>() {
            @Override
            public void onActivityResult(Map<String, Boolean> result) {
                if(result.get(Manifest.permission.RECORD_AUDIO)!= null){
                    isRecordPermGranted = result.get(Manifest.permission.RECORD_AUDIO);
                    Log.d("3","-------------------------" + isRecordPermGranted);
                }
                if(result.get(Manifest.permission.WRITE_EXTERNAL_STORAGE)!= null){
                    isWritePermGranted = result.get(Manifest.permission.WRITE_EXTERNAL_STORAGE);
                    Log.d("4","-------------------------" + isWritePermGranted);
                }

                if(isWritePermGranted == false || isRecordPermGranted == false){
                    if(totalCount <3){
                        finishAffinity();
                    }else{
                        Intent intent = new Intent( MainActivity.this, PermissionActivity.class);
                        startActivity(intent);
                    }
                }

            }
        });

        imgbtnRecord.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if(isRecordPermGranted == false){
                    requestPermission();

                }else{
                    openRecordingActivity();
                }

            }
        });

        imgbtnList.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
               if(!isRecordPermGranted || !isWritePermGranted){
                     requestPermission();
                }else{
                    openRecordingsListActivity();
                }

            }
        });

    }

    public void openRecordingsListActivity() {

        Intent intent = new Intent(this, RecordingsListActivity.class);
        intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
        startActivity(intent);
    }

    public void openRecordingActivity(){
        Intent intent = new Intent(this, RecordingActivity.class);
        startActivity(intent);
    }

    @Override
    public void onBackPressed() {
        if(pressedTime + 2000 > System.currentTimeMillis()){
            super.onBackPressed();
            Intent a = new Intent(Intent.ACTION_MAIN);
            a.addCategory(Intent.CATEGORY_HOME);
            a.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            startActivity(a);
        }else{
            Toast.makeText(this, "Press back again to exit", Toast.LENGTH_SHORT).show();
        }
        pressedTime = System.currentTimeMillis();
    }
</code>```
```<code>    public void requestPermission(){

        List<String> permissionRequests = new ArrayList<>();
        if(!isRecordPermGranted && !isWritePermGranted){
            permissionRequests.add(Manifest.permission.RECORD_AUDIO);
            permissionRequests.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);
        }else if(!isRecordPermGranted){
            permissionRequests.add(Manifest.permission.RECORD_AUDIO);
        }else if(!isWritePermGranted){
            permissionRequests.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);
        }
        Log.d("permissionRequests list", permissionRequests.toString());
        if(!permissionRequests.isEmpty()){
           if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.P){
               boolean shouldShowRationale = false;
               if(ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) ){
                      shouldShowRationale = true;
                       Log.d("1","-------------------------");
               }
               if( ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.RECORD_AUDIO)){
                   shouldShowRationale = true;
                   Log.d("2","-------------------------");
               }
               if(shouldShowRationale){
                   Toast.makeText(this, "Permissions Needed!", Toast.LENGTH_SHORT).show();
                   Log.d("5","-------------------------");
               }else{
                   permissionResultLauncher.launch(permissionRequests.toArray(new String[0]));
                   Log.d("6","-------------------------");
               }

            }else{
                Log.d("old permission ", permissionRequests.toArray(new String[permissionRequests.size()])+" " );
                ActivityCompat.requestPermissions(MainActivity.this,permissionRequests.toArray(new String[permissionRequests.size()]), 5);

           }

        }
    }

    @Override
    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
        if(requestCode == 5){
            for (int i =0; i< permissions.length; i++){
                if(permissions[i].equals(Manifest.permission.RECORD_AUDIO) && grantResults[i] != PackageManager.PERMISSION_GRANTED){
                    isRecordPermGranted = false;
                }
                if(permissions[i].equals(Manifest.permission.WRITE_EXTERNAL_STORAGE) && grantResults[i] != PackageManager.PERMISSION_GRANTED){
                    isWritePermGranted = false;
                }
            }
        }

       if(isWritePermGranted == false || isRecordPermGranted == false){
            Log.d("REQUEST PERMISSIONS RESULT", "onPermissionResult");
            if(totalCount <3){
                finishAffinity();
            }else{
                Intent intent = new Intent( MainActivity.this, PermissionActivity.class);
                startActivity(intent);
            }
        }
        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    }
}
</code>```

When i use the statement  if(ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) || ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.RECORD_AUDIO )

then it runs the first part of the "OR" statement and shows one of the permission dialog but it never shows both, even with an "&&" or my current code in the requestPermission()

i've tried it without shouldShowRequestPermissionRationale, but it still doesn't work.
I've also added the permissions in the AndroidManifest file.

Body:
The permission dialog does not show up on Android 9 and below. My code works fine on Android 11. i've tried ActivityCompat.requestPermissions() and ActivityResultLauncher but none of them work.

When it runs the line permissionResultLauncher.launch() my app crashes and it also crashes the emulator, such that i have to delete the Emulator and reinstall a new one, otherwise it won't show me anything on the screen.

  <uses-permission android:name="android.permission.RECORD_AUDIO"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

 <application
   ...
 </application>

public class MainActivity extends AppCompatActivity{

    private ActivityMainBinding binding;
    private long pressedTime;
    private ActivityResultLauncher<String[]> permissionResultLauncher;
    private boolean isRecordPermGranted = false;
    private boolean isWritePermGranted = false;
    private int totalCount;
    private DBHelper dbHelper;
    private ImageButton imgbtnRecord, imgbtnList;
    private ImageView ivRestore;
    private TextView tvLoading, tvRecord;
    private boolean asyncTaskRunning;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = ActivityMainBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());
        SharedPreferences prefs = getPreferences(Context.MODE_PRIVATE);
        SharedPreferences.Editor editor = prefs.edit();

        totalCount = prefs.getInt("counter", 0);
        if(totalCount < 4){
            totalCount++;
            editor.putInt("counter", totalCount);
            editor.commit();
        }

        dbHelper = new DBHelper(this);
        asyncTaskRunning = false;
        imgbtnRecord = (ImageButton) findViewById(R.id.imgbtnRecord);
        imgbtnList = (ImageButton) findViewById(R.id.imgbtnList);
        tvLoading = findViewById(R.id.tvLoading);
        tvRecord = findViewById(R.id.tvRecord);
        ivRestore = findViewById(R.id.ivRestore);

        tvLoading.setVisibility(View.GONE);
        ivRestore.setVisibility(View.GONE);
        imgbtnRecord.setVisibility(View.VISIBLE);
        imgbtnList.setVisibility(View.VISIBLE);
        tvRecord.setVisibility(View.VISIBLE);
        isRecordPermGranted = ContextCompat.checkSelfPermission(MainActivity.this,Manifest.permission.RECORD_AUDIO) == PackageManager.PERMISSION_GRANTED;
        isWritePermGranted = ContextCompat.checkSelfPermission(MainActivity.this,Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED;

        permissionResultLauncher = registerForActivityResult(new ActivityResultContracts.RequestMultiplePermissions(), new ActivityResultCallback<Map<String, Boolean>>() {
            @Override
            public void onActivityResult(Map<String, Boolean> result) {
                if(result.get(Manifest.permission.RECORD_AUDIO)!= null){
                    isRecordPermGranted = result.get(Manifest.permission.RECORD_AUDIO);
                    Log.d("3","-------------------------" + isRecordPermGranted);
                }
                if(result.get(Manifest.permission.WRITE_EXTERNAL_STORAGE)!= null){
                    isWritePermGranted = result.get(Manifest.permission.WRITE_EXTERNAL_STORAGE);
                    Log.d("4","-------------------------" + isWritePermGranted);
                }

                if(isWritePermGranted == false || isRecordPermGranted == false){
                    if(totalCount <3){
                        finishAffinity();
                    }else{
                        Intent intent = new Intent( MainActivity.this, PermissionActivity.class);
                        startActivity(intent);
                    }
                }

            }
        });

        imgbtnRecord.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if(isRecordPermGranted == false){
                    requestPermission();

                }else{
                    openRecordingActivity();
                }

            }
        });

        imgbtnList.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
               if(!isRecordPermGranted || !isWritePermGranted){
                     requestPermission();
                }else{
                    openRecordingsListActivity();
                }

            }
        });

    }

    public void openRecordingsListActivity() {

        Intent intent = new Intent(this, RecordingsListActivity.class);
        intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
        startActivity(intent);
    }

    public void openRecordingActivity(){
        Intent intent = new Intent(this, RecordingActivity.class);
        startActivity(intent);
    }

    @Override
    public void onBackPressed() {
        if(pressedTime + 2000 > System.currentTimeMillis()){
            super.onBackPressed();
            Intent a = new Intent(Intent.ACTION_MAIN);
            a.addCategory(Intent.CATEGORY_HOME);
            a.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            startActivity(a);
        }else{
            Toast.makeText(this, "Press back again to exit", Toast.LENGTH_SHORT).show();
        }
        pressedTime = System.currentTimeMillis();
    }

    public void requestPermission(){

        List<String> permissionRequests = new ArrayList<>();
        if(!isRecordPermGranted && !isWritePermGranted){
            permissionRequests.add(Manifest.permission.RECORD_AUDIO);
            permissionRequests.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);
        }else if(!isRecordPermGranted){
            permissionRequests.add(Manifest.permission.RECORD_AUDIO);
        }else if(!isWritePermGranted){
            permissionRequests.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);
        }
        Log.d("permissionRequests list", permissionRequests.toString());
        if(!permissionRequests.isEmpty()){
           if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.P){
               boolean shouldShowRationale = false;
               if(ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) ){
                      shouldShowRationale = true;
                       Log.d("1","-------------------------");
               }
               if( ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.RECORD_AUDIO)){
                   shouldShowRationale = true;
                   Log.d("2","-------------------------");
               }
               if(shouldShowRationale){
                   Toast.makeText(this, "Permissions Needed!", Toast.LENGTH_SHORT).show();
                   Log.d("5","-------------------------");
               }else{
                   permissionResultLauncher.launch(permissionRequests.toArray(new String[0]));
                   Log.d("6","-------------------------");
               }

            }else{
                Log.d("old permission ", permissionRequests.toArray(new String[permissionRequests.size()])+" " );
                ActivityCompat.requestPermissions(MainActivity.this,permissionRequests.toArray(new String[permissionRequests.size()]), 5);

           }

        }
    }

    @Override
    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
        if(requestCode == 5){
            for (int i =0; i< permissions.length; i++){
                if(permissions[i].equals(Manifest.permission.RECORD_AUDIO) && grantResults[i] != PackageManager.PERMISSION_GRANTED){
                    isRecordPermGranted = false;
                }
                if(permissions[i].equals(Manifest.permission.WRITE_EXTERNAL_STORAGE) && grantResults[i] != PackageManager.PERMISSION_GRANTED){
                    isWritePermGranted = false;
                }
            }
        }

       if(isWritePermGranted == false || isRecordPermGranted == false){
            Log.d("REQUEST PERMISSIONS RESULT", "onPermissionResult");
            if(totalCount <3){
                finishAffinity();
            }else{
                Intent intent = new Intent( MainActivity.this, PermissionActivity.class);
                startActivity(intent);
            }
        }
        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    }
}

When i use the statement  if(ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) || ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.RECORD_AUDIO )

then it runs the first part of the "OR" statement and shows one of the permission dialog but it never shows both, even with an "&&" or my current code in the requestPermission()

i've tried it without shouldShowRequestPermissionRationale, but it still doesn't work.
I've also added the permissions in the AndroidManifest file.


问:
sort in file (C)
I have a question about sorting records in a file. This is my code

```<code>case 7: {
            struct record ar[1000];
            int x=-1;
            if((ftemp = fopen(file_name, "r")) != NULL) {
                if((f = fopen(temp, "w")) != NULL) {
                    while(fgets(line, 100, ftemp) != NULL) {
                        x++;
                        ar[x] = parse_line(line); //parse the line and store in an array
                    }
                }
            }

            printf("What do you want sort?\n\n1 - region\n2 - area\n3 - population\nYour choose: ");
            while(scanf("%d%c", &choose_sort, &symbol) != 2 || symbol != '\n' || choose_sort > 3 || choose_sort < 1) {
            printf("\nInvalid input. Please, try again\n\n1 - region\n2 - area\n3 - population\nYour choose: ");
            fflush(stdin); }

            printf("Choose order\n\n1 - ascending\n2 - descending\nYour choose: ");
            while(scanf("%d%c", &variant_sort, &symbol) != 2 || symbol != '\n' || variant_sort < 1 || variant_sort > 2) {
            printf("\nInvalid input. Please, try again\n\n1 - ascending\ndescending\nYour choose: ");
            fflush(stdin); }

            switch(choose_sort) {
                case 1: {
                    for(int i = 0; i < x - 1; i++) {
                        for(int j = i + 1; j < x; j++) {
                            if(strcmp(ar[i].region, ar[j].region) > 0) {
                                record e = ar[i];
                                ar[i] = ar[j];
                                ar[j] = e;
                            }
                        }
                    }
                    break;
                }
                case 2: {
                    for(int i = 0; i < x - 1; i++) {
                        for(int j = i + 1; j < x; j++) {
                            if(ar[i].area > ar[j].area) {
                                record e = ar[i];
                                ar[i] = ar[j];
                                ar[j] = e;
                            }
                        }
                    }
                    break;
                }

                case 3: {
                    for(int i = 0; i < x - 1; i++) {
                        for(int j = i + 1; j < x; j++) {
                            if(ar[i].population > ar[j].population) {
                                record e = ar[i];
                                ar[i] = ar[j];
                                ar[j] = e;
                            }
                        }
                    }
                    break;
                }
            }

            if (variant_sort == 1) {
                for (int i = 0; i < x; i++) {
                    fprintf(f,"Region: %s     Area: %lf     Population:%d\n", ar[i].region, ar[i].area, ar[i].population);
                }
                } else {
                    for (int i = x - 1; i >= 0; i--) {
                        fprintf(f, "Region: %s     Area: %lf     Population: %d\n", ar[i].region, ar[i].area, ar[i].population);
                    }
                }

            fclose(ftemp);
            fclose(f);
            remove(file_name);
            rename(temp, file_name);
            break;
        }
</code>```

As well as the function itself

```<code>struct record parse_line(char* line) {
  struct record record;
  memset(record.region, 0, sizeof(record.region));  // Clear the region field
  int spaces=0;

  // Read the region field
  int i = 0;
  while (line[i] != ' ') {
    record.region[i] = line[i];
    i++;
    spaces++;
  }
  i++;  // Skip the space character

  // Read the area field
  char* area_str = malloc(50);  // Allocate memory to hold the area string
  memset(area_str, 0, 50);  // Clear the memory
  int space = 0;
  int j = 0;
  while (line[i] != ' ') {
    area_str[j] = line[i];
    i++;
    space++;
  }
  j++;

  record.area = atof(area_str);  // Convert the area string to a double and store it in the record
  free(area_str);  // Free the memory allocated for the area string

  // Read the population field
  char* population_str = malloc(50);  // Allocate memory to hold the population string
  memset(population_str, 0, 50);  // Clear the memory
  j = 0;
  while (line[i] != '\n' && line[i] != '\0') {
    population_str[j] = line[i];
    i++;
  }
  j++;
  record.population = atoi(population_str);  // Convert the population string to an int and store it in the record
  free(population_str);  // Free the memory allocated for the population string

  return record;
}

</code>```

Can anyone tell me why this is not working properly? I declare x as the upper bound for the outer loop and x - 1 as the upper bound for the inner loop. And it should all work, but nothing happens. I have already dug through everything and so I do not understand. Do you have any ideas?

If I choose sorting by population in ascending form, and then I go to the file, then nothing happens there

Title: sort in file (C)

Body:
I have a question about sorting records in a file. This is my code

case 7: {
            struct record ar[1000];
            int x=-1;
            if((ftemp = fopen(file_name, "r")) != NULL) {
                if((f = fopen(temp, "w")) != NULL) {
                    while(fgets(line, 100, ftemp) != NULL) {
                        x++;
                        ar[x] = parse_line(line); //parse the line and store in an array
                    }
                }
            }

            printf("What do you want sort?\n\n1 - region\n2 - area\n3 - population\nYour choose: ");
            while(scanf("%d%c", &choose_sort, &symbol) != 2 || symbol != '\n' || choose_sort > 3 || choose_sort < 1) {
            printf("\nInvalid input. Please, try again\n\n1 - region\n2 - area\n3 - population\nYour choose: ");
            fflush(stdin); }

            printf("Choose order\n\n1 - ascending\n2 - descending\nYour choose: ");
            while(scanf("%d%c", &variant_sort, &symbol) != 2 || symbol != '\n' || variant_sort < 1 || variant_sort > 2) {
            printf("\nInvalid input. Please, try again\n\n1 - ascending\ndescending\nYour choose: ");
            fflush(stdin); }

            switch(choose_sort) {
                case 1: {
                    for(int i = 0; i < x - 1; i++) {
                        for(int j = i + 1; j < x; j++) {
                            if(strcmp(ar[i].region, ar[j].region) > 0) {
                                record e = ar[i];
                                ar[i] = ar[j];
                                ar[j] = e;
                            }
                        }
                    }
                    break;
                }
                case 2: {
                    for(int i = 0; i < x - 1; i++) {
                        for(int j = i + 1; j < x; j++) {
                            if(ar[i].area > ar[j].area) {
                                record e = ar[i];
                                ar[i] = ar[j];
                                ar[j] = e;
                            }
                        }
                    }
                    break;
                }

                case 3: {
                    for(int i = 0; i < x - 1; i++) {
                        for(int j = i + 1; j < x; j++) {
                            if(ar[i].population > ar[j].population) {
                                record e = ar[i];
                                ar[i] = ar[j];
                                ar[j] = e;
                            }
                        }
                    }
                    break;
                }
            }

            if (variant_sort == 1) {
                for (int i = 0; i < x; i++) {
                    fprintf(f,"Region: %s     Area: %lf     Population:%d\n", ar[i].region, ar[i].area, ar[i].population);
                }
                } else {
                    for (int i = x - 1; i >= 0; i--) {
                        fprintf(f, "Region: %s     Area: %lf     Population: %d\n", ar[i].region, ar[i].area, ar[i].population);
                    }
                }

            fclose(ftemp);
            fclose(f);
            remove(file_name);
            rename(temp, file_name);
            break;
        }

As well as the function itself

struct record parse_line(char* line) {
  struct record record;
  memset(record.region, 0, sizeof(record.region));  // Clear the region field
  int spaces=0;

  // Read the region field
  int i = 0;
  while (line[i] != ' ') {
    record.region[i] = line[i];
    i++;
    spaces++;
  }
  i++;  // Skip the space character

  // Read the area field
  char* area_str = malloc(50);  // Allocate memory to hold the area string
  memset(area_str, 0, 50);  // Clear the memory
  int space = 0;
  int j = 0;
  while (line[i] != ' ') {
    area_str[j] = line[i];
    i++;
    space++;
  }
  j++;

  record.area = atof(area_str);  // Convert the area string to a double and store it in the record
  free(area_str);  // Free the memory allocated for the area string

  // Read the population field
  char* population_str = malloc(50);  // Allocate memory to hold the population string
  memset(population_str, 0, 50);  // Clear the memory
  j = 0;
  while (line[i] != '\n' && line[i] != '\0') {
    population_str[j] = line[i];
    i++;
  }
  j++;
  record.population = atoi(population_str);  // Convert the population string to an int and store it in the record
  free(population_str);  // Free the memory allocated for the population string

  return record;
}

Can anyone tell me why this is not working properly? I declare x as the upper bound for the outer loop and x - 1 as the upper bound for the inner loop. And it should all work, but nothing happens. I have already dug through everything and so I do not understand. Do you have any ideas?

If I choose sorting by population in ascending form, and then I go to the file, then nothing happens there


问:
Bitdev and Storybook | Consuming components using @lit-labs/react causing adoptedStyleSheets error
The issue here is I have lit element components that get wrapped in React using lit-labs-react. I have 1 component working with styles and rendering successfully. Then adding another component causes the error below. Seems to only happen when using components in storybook. Has anyone came across this issue in storybook before? I would've thought since these styles are encapsulated within the shadowDOM, it wouldn't have these issues. Maybe a loading/timing issue of when the styles apply?

The error:

```<code>css-tag.ts:143 Uncaught TypeError: Failed to set the 'adoptedStyleSheets' property on 'ShadowRoot': Failed to convert value to 'CSSStyleSheet'.
</code>```

Within the component here is how lit element loads styles:

```<code>import TextareaStyles from "./textarea.scss";

static get styles() {
    return [TextareaStyles];
}
</code>```

The usage:

```<code>import React from "react";
import { createComponent } from "@lit-labs/react";
import { Textarea } from "@bitdev/textarea";

export const Textarea = createComponent({
  tagName: "textarea",
  elementClass: Textarea,
  react: React,
  events: {
    oninput: "event-textarea-on-input",
  },
});
</code>```

Then adding this within MDX file for preview like so:

```<code>import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks';

import { Textarea } from "./textarea.component";

<Canvas>
  <Story name="Textarea">
    <Textarea rows={7}></Textarea>
  </Story>
</Canvas>

</code>```

Body:
The issue here is I have lit element components that get wrapped in React using lit-labs-react. I have 1 component working with styles and rendering successfully. Then adding another component causes the error below. Seems to only happen when using components in storybook. Has anyone came across this issue in storybook before? I would've thought since these styles are encapsulated within the shadowDOM, it wouldn't have these issues. Maybe a loading/timing issue of when the styles apply?

The error:

css-tag.ts:143 Uncaught TypeError: Failed to set the 'adoptedStyleSheets' property on 'ShadowRoot': Failed to convert value to 'CSSStyleSheet'.

Within the component here is how lit element loads styles:

import TextareaStyles from "./textarea.scss";

static get styles() {
    return [TextareaStyles];
}

The usage:

import React from "react";
import { createComponent } from "@lit-labs/react";
import { Textarea } from "@bitdev/textarea";

export const Textarea = createComponent({
  tagName: "textarea",
  elementClass: Textarea,
  react: React,
  events: {
    oninput: "event-textarea-on-input",
  },
});

Then adding this within MDX file for preview like so:

import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks';

import { Textarea } from "./textarea.component";

<Canvas>
  <Story name="Textarea">
    <Textarea rows={7}></Textarea>
  </Story>
</Canvas>


问:
Periodically play short audio, in the background, on iOS
I need my iOS app to be able to play a very short sound at regular intervals while my app is in the background. I must support almost any duration/interval time. One example would be a one-second sound, played every 3 seconds for 45 minutes.

I've found an app in the App Store which can do exactly this. (On iOS15). Though from what I've read, this is not possible, outside of creating a 45 minute audio file on the fly, and using background audio to play the clip. (Though not sure Apple wouldn't reject even this.)

Any ideas how this app achieves this? Maybe they're creating an audio file?


问:
How to write a Java method which escapes all the whitespaces, newline characters and comments?
I am trying to write a parser of a programming language and I need to escape all whitespaces, newlines and comments(of style /* and //) of a file and to stop just before the token. Assume that the file does not have any syntax error.

This is what I have tried, but I do not think it is the most simple solution. Any help is appreciated.

reader.charPrefetch() gets one character but does not move the reading head in file

reader.charPrefetch(2) gets the 2nd character counting from reading head

```<code>private void passCommentsAndWhitespaces(){
        char endOfFileChar = (char) 65535;
        String twoCharSeq = "" + reader.charPrefetch() + reader.charPrefetch(2);

        if(twoCharSeq.charAt(0) == endOfFileChar){
            return;
        }

        while (twoCharSeq.charAt(0) == ' ' || twoCharSeq.charAt(0) == '\n' ||
                twoCharSeq.equals("//") || twoCharSeq.equals("/*")){
            if(twoCharSeq.equals("/*")){
                twoCharSeq = "" + reader.readChar(3) + reader.charPrefetch();
                while (!twoCharSeq.equals("*/")){
                    twoCharSeq = "" + reader.readChar() + reader.charPrefetch();
                }
                reader.readChar();
            }else if(twoCharSeq.equals("//")){
                reader.readLine();
            }else {
                twoCharSeq = "" + reader.readChar() + reader.charPrefetch();
            }
        }
    }
</code>```

Body:
I am trying to write a parser of a programming language and I need to escape all whitespaces, newlines and comments(of style /* and //) of a file and to stop just before the token. Assume that the file does not have any syntax error.

This is what I have tried, but I do not think it is the most simple solution. Any help is appreciated.

reader.charPrefetch() gets one character but does not move the reading head in file

reader.charPrefetch(2) gets the 2nd character counting from reading head

private void passCommentsAndWhitespaces(){
        char endOfFileChar = (char) 65535;
        String twoCharSeq = "" + reader.charPrefetch() + reader.charPrefetch(2);

        if(twoCharSeq.charAt(0) == endOfFileChar){
            return;
        }

        while (twoCharSeq.charAt(0) == ' ' || twoCharSeq.charAt(0) == '\n' ||
                twoCharSeq.equals("//") || twoCharSeq.equals("/*")){
            if(twoCharSeq.equals("/*")){
                twoCharSeq = "" + reader.readChar(3) + reader.charPrefetch();
                while (!twoCharSeq.equals("*/")){
                    twoCharSeq = "" + reader.readChar() + reader.charPrefetch();
                }
                reader.readChar();
            }else if(twoCharSeq.equals("//")){
                reader.readLine();
            }else {
                twoCharSeq = "" + reader.readChar() + reader.charPrefetch();
            }
        }
    }


问:
Unable to create a conda environment based on yaml file due dependencies issue (protobuf issue)
hope you're doing well.
Wanted to know if you could help me out with the following issue.

I am trying to recreate a conda environment (old) in my local macbook M2 with some issues.

Here is the environment.yaml for the mac.

```<code>name: airflow36
channels:
- anaconda
- conda-forge
- defaults
dependencies:
- blas=1.0=mkl
- intel-openmp=2019.1=144
- libgfortran=3.0.1=h93005f0_2
- mkl=2019.1=144
- numpy=1.15.4=py36hacdab7b_0
- numpy-base=1.15.4=py36h6575580_0
- python-daemon=2.1.2=py36_0
- airflow=1.10.1=py36_0
- alembic=0.8.10=py36_1
- appnope=0.1.0=py36_1000
- apscheduler=3.4.0=py36_0
- asn1crypto=0.24.0=py36_1003
- attrs=18.2.0=py_0
- awscli=1.16.98=py36_0
- babel=2.6.0=py_1
- backcall=0.1.0=py_0
- bleach=2.1.2=py_0
- blinker=1.4=py_1
- boto=2.49.0=py_0
- boto3=1.9.88=py_0
- botocore=1.12.88=py_0
- ca-certificates=2020.6.24=0
- certifi=2020.6.20=py36_0
- cffi=1.11.5=py36h342bebf_1001
- chardet=3.0.4=py36_1003
- click=6.7=py_1
- colorama=0.3.9=py_1
- configparser=3.5.0=py36_1001
- cookies=2.2.1=py_0
- coverage=4.4.2=py36_0
- croniter=0.3.27=py_0
- cryptography=2.3.1=py36hdbc3d79_1000
- decorator=4.3.2=py_0
- defusedxml=0.5.0=py_1
- dicttoxml=1.7.4=py36_0
- dill=0.2.9=py36_0
- docutils=0.14=py36_1001
- entrypoints=0.3=py36_1000
- flake8=3.5.0=py36_0
- flask=0.12.4=py_0
- flask-admin=1.4.1=py36_0
- flask-appbuilder=1.11.1=py_1
- flask-babel=0.11.1=py_0
- flask-cache=0.13.1=py_1000
- flask-caching=1.3.3=py_0
- flask-login=0.2.11=py36_0
- flask-openid=1.2.5=py36_1003
- flask-sqlalchemy=2.1=py36_1
- flask-swagger=0.2.13=py36_0
- flask-wtf=0.14.2=py_1
- future=0.16.0=py36_1002
- gitdb2=2.0.5=py_0
- gitpython=2.1.11=py_0
- gunicorn=19.9.0=py36_1000
- html5lib=1.0.1=py_0
- icu=58.2=h0a44026_1000
- idna=2.8=py36_1000
- ipykernel=5.1.0=py36h24bf2e0_1002
- ipython=7.2.0=py36h24bf2e0_1000
- ipython_genutils=0.2.0=py_1
- iso8601=0.1.12=py_1
- itsdangerous=1.1.0=py_0
- jedi=0.13.2=py36_1000
- jinja2=2.8=py36_1
- jira=2.0.0=py_0
- jmespath=0.9.3=py_1
- jsonschema=3.0.0a3=py36_1000
- jupyter_client=5.2.4=py36_0
- jupyter_core=4.4.0=py_0
- libcxx=4.0.1=hcfea43d_1
- libcxxabi=4.0.1=hcfea43d_1
- libffi=3.2.1=h0a44026_1005
- libiconv=1.15=h1de35cc_1004
- libpq=9.6.3=0
- libsodium=1.0.16=h1de35cc_1001
- libxml2=2.9.8=hf14e9c8_1005
- libxslt=1.1.32=h33a18ac_1002
- llvm-meta=7.0.0=0
- lockfile=0.12.2=py_1
- lxml=3.8.0=py36_0
- mako=1.0.7=py_1
- markdown=2.6.11=py_0
- markupsafe=1.0=py36_0
- mccabe=0.6.1=py_1
- mistune=0.8.4=py36h1de35cc_1000
- mkl_fft=1.0.10=py36h470a237_1
- mkl_random=1.0.2=py36h1702cab_2
- mock=2.0.0=py36_0
- monotonic=1.5=py_0
- moto=1.1.1=py36_0
- mysql-connector-c=6.1.11=he2f1009_1
- mysqlclient=1.3.13=py36_1000
- nbconvert=5.4.1=py_2
- nbformat=4.4.0=py_1
- ncurses=5.9=10
- notebook=5.5.0=py36_0
- numexpr=2.6.4=py36_0
- oauthlib=2.1.0=py_0
- openssl=1.0.2u=h1de35cc_0
- pandas=0.24.0=py36h0a44026_0
- pandoc=2.6=0
- pandocfilters=1.4.2=py_1
- parso=0.3.3=py_0
- pbr=5.1.2=py_0
- pendulum=1.4.4=py36_0
- pep8=1.7.0=py36_0
- pexpect=4.6.0=py36_1000
- pickleshare=0.7.5=py36_1000
- pip=9.0.1=py36_1
- pluggy=0.6.0=py_0
- prompt_toolkit=2.0.8=py_0
- psutil=4.4.2=py36_0
- psycopg2=2.7.5=py36hdffb7b8_2
- ptyprocess=0.6.0=py36_1000
- py=1.7.0=py_0
- pyaml=18.11.0=py_0
- pyasn1=0.4.4=py_1
- pycodestyle=2.3.1=py_1
- pycparser=2.19=py_0
- pyflakes=1.6.0=py36_0
- pygments=2.3.1=py_0
- pyjwt=1.7.1=py_0
- pyopenssl=19.0.0=py36_0
- pyrsistent=0.14.9=py36h1de35cc_1000
- pysocks=1.6.8=py36_1002
- pytest=3.4.0=py36_0
- pytest-cov=2.5.1=py36_0
- pytest-mock=1.6.3=py36_1
- python=3.6.2=0
- python-dateutil=2.8.0=py_0
- python-editor=1.0.4=py_0
- python-nvd3=0.15.0=py_1
- python-slugify=1.2.6=py_0
- python3-openid=3.1.0=py36_1001
- pytz=2018.9=py_0
- pytzdata=2018.9=py_0
- pyyaml=3.12=py36_1
- pyzmq=17.1.2=py36h111632d_1001
- readline=6.2=0
- requests=2.21.0=py36_1000
- requests-oauthlib=1.0.0=py_1
- requests-toolbelt=0.9.1=py_0
- rsa=3.4.2=py_1
- s3transfer=0.1.13=py36_1001
- send2trash=1.5.0=py_0
- setproctitle=1.1.10=py36h1de35cc_1001
- setuptools=38.4.0=py36_0
- simple-salesforce=0.74.2=py36_0
- six=1.12.0=py36_1000
- smmap2=2.0.5=py_0
- sqlalchemy=1.1.18=py36h470a237_0
- sqlite=3.13.0=1
- tabulate=0.7.7=py36_0
- tenacity=4.8.0=py36_0
- terminado=0.8.1=py36_1001
- testpath=0.4.2=py36_1000
- thrift=0.11.0=py36h0a44026_1001
- tk=8.5.19=2
- tornado=5.1.1=py36h1de35cc_1000
- traitlets=4.3.2=py36_1000
- tzlocal=1.5.1=py_0
- unicodecsv=0.14.1=py_1
- unidecode=1.0.23=py_0
- urllib3=1.24.1=py36_1000
- wcwidth=0.1.7=py_1
- webencodings=0.5.1=py_1
- werkzeug=0.14.1=py_0
- wheel=0.30.0=py36_2
- wtforms=2.1=py36_0
- xmltodict=0.11.0=py_1
- xz=5.2.4=h1de35cc_1001
- yaml=0.1.7=h1de35cc_1001
- zeromq=4.2.5=h0a44026_1006
- zlib=1.2.11=0
- zope.deprecation=4.4.0=py_0
- pip:
  - apache-airflow==1.10.1
  - datadiff==1.1.6
  - funcsigs==1.0.0
  - ordereddict==1.1
  - pytest-pythonpath==0.7
  - python-logstash==0.4.5
  - google-api-core==1.14.2
  - google-api-python-client==1.7.11
  - oauth2client==4.1.2
  - cached-property==1.5.1
</code>```

It seems it is causing a conflict when installing some dependencies because I got the following output when running conda env create --force -f "$ENVIRONMENT_FILE"

```<code>Pip subprocess error:
protobuf requires Python '>=3.7' but the running Python is 3.6.2
You are using pip version 9.0.1, however version 22.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

failed

CondaEnvException: Pip failed
</code>```

It is weird because I'm not installing the protobuf library but it looks it is used in one of the libraries I am using.

Here is the conda info:

```<code>     active environment : airflow36
    active env location : /Users/username/opt/anaconda3/envs/airflow36
            shell level : 1
       user config file : /Users/username/.condarc
 populated config files : /Users/username/.condarc
          conda version : 22.11.1
    conda-build version : 3.22.0
         python version : 3.9.13.final.0
       virtual packages : __archspec=1=x86_64
                          __osx=10.16=0
                          __unix=0=0
       base environment : /Users/username/opt/anaconda3  (writable)
      conda av data dir : /Users/username/opt/anaconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/osx-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/username/opt/anaconda3/pkgs
                          /Users/username/.conda/pkgs
       envs directories : /Users/username/opt/anaconda3/envs
                          /Users/username/.conda/envs
               platform : osx-64
             user-agent : conda/22.11.1 requests/2.28.1 CPython/3.9.13 Darwin/21.6.0 OSX/10.16
                UID:GID : 501:20
             netrc file : None
           offline mode : False

# conda environments:
#
base                     /Users/username/opt/anaconda3
airflow36             *  /Users/username/opt/anaconda3/envs/airflow36
                         /opt/homebrew/Caskroom/miniconda/base

</code>```

Would someone faced the same issue?

Thanks

Body:
hope you're doing well.
Wanted to know if you could help me out with the following issue.

I am trying to recreate a conda environment (old) in my local macbook M2 with some issues.

Here is the environment.yaml for the mac.

name: airflow36
channels:
- anaconda
- conda-forge
- defaults
dependencies:
- blas=1.0=mkl
- intel-openmp=2019.1=144
- libgfortran=3.0.1=h93005f0_2
- mkl=2019.1=144
- numpy=1.15.4=py36hacdab7b_0
- numpy-base=1.15.4=py36h6575580_0
- python-daemon=2.1.2=py36_0
- airflow=1.10.1=py36_0
- alembic=0.8.10=py36_1
- appnope=0.1.0=py36_1000
- apscheduler=3.4.0=py36_0
- asn1crypto=0.24.0=py36_1003
- attrs=18.2.0=py_0
- awscli=1.16.98=py36_0
- babel=2.6.0=py_1
- backcall=0.1.0=py_0
- bleach=2.1.2=py_0
- blinker=1.4=py_1
- boto=2.49.0=py_0
- boto3=1.9.88=py_0
- botocore=1.12.88=py_0
- ca-certificates=2020.6.24=0
- certifi=2020.6.20=py36_0
- cffi=1.11.5=py36h342bebf_1001
- chardet=3.0.4=py36_1003
- click=6.7=py_1
- colorama=0.3.9=py_1
- configparser=3.5.0=py36_1001
- cookies=2.2.1=py_0
- coverage=4.4.2=py36_0
- croniter=0.3.27=py_0
- cryptography=2.3.1=py36hdbc3d79_1000
- decorator=4.3.2=py_0
- defusedxml=0.5.0=py_1
- dicttoxml=1.7.4=py36_0
- dill=0.2.9=py36_0
- docutils=0.14=py36_1001
- entrypoints=0.3=py36_1000
- flake8=3.5.0=py36_0
- flask=0.12.4=py_0
- flask-admin=1.4.1=py36_0
- flask-appbuilder=1.11.1=py_1
- flask-babel=0.11.1=py_0
- flask-cache=0.13.1=py_1000
- flask-caching=1.3.3=py_0
- flask-login=0.2.11=py36_0
- flask-openid=1.2.5=py36_1003
- flask-sqlalchemy=2.1=py36_1
- flask-swagger=0.2.13=py36_0
- flask-wtf=0.14.2=py_1
- future=0.16.0=py36_1002
- gitdb2=2.0.5=py_0
- gitpython=2.1.11=py_0
- gunicorn=19.9.0=py36_1000
- html5lib=1.0.1=py_0
- icu=58.2=h0a44026_1000
- idna=2.8=py36_1000
- ipykernel=5.1.0=py36h24bf2e0_1002
- ipython=7.2.0=py36h24bf2e0_1000
- ipython_genutils=0.2.0=py_1
- iso8601=0.1.12=py_1
- itsdangerous=1.1.0=py_0
- jedi=0.13.2=py36_1000
- jinja2=2.8=py36_1
- jira=2.0.0=py_0
- jmespath=0.9.3=py_1
- jsonschema=3.0.0a3=py36_1000
- jupyter_client=5.2.4=py36_0
- jupyter_core=4.4.0=py_0
- libcxx=4.0.1=hcfea43d_1
- libcxxabi=4.0.1=hcfea43d_1
- libffi=3.2.1=h0a44026_1005
- libiconv=1.15=h1de35cc_1004
- libpq=9.6.3=0
- libsodium=1.0.16=h1de35cc_1001
- libxml2=2.9.8=hf14e9c8_1005
- libxslt=1.1.32=h33a18ac_1002
- llvm-meta=7.0.0=0
- lockfile=0.12.2=py_1
- lxml=3.8.0=py36_0
- mako=1.0.7=py_1
- markdown=2.6.11=py_0
- markupsafe=1.0=py36_0
- mccabe=0.6.1=py_1
- mistune=0.8.4=py36h1de35cc_1000
- mkl_fft=1.0.10=py36h470a237_1
- mkl_random=1.0.2=py36h1702cab_2
- mock=2.0.0=py36_0
- monotonic=1.5=py_0
- moto=1.1.1=py36_0
- mysql-connector-c=6.1.11=he2f1009_1
- mysqlclient=1.3.13=py36_1000
- nbconvert=5.4.1=py_2
- nbformat=4.4.0=py_1
- ncurses=5.9=10
- notebook=5.5.0=py36_0
- numexpr=2.6.4=py36_0
- oauthlib=2.1.0=py_0
- openssl=1.0.2u=h1de35cc_0
- pandas=0.24.0=py36h0a44026_0
- pandoc=2.6=0
- pandocfilters=1.4.2=py_1
- parso=0.3.3=py_0
- pbr=5.1.2=py_0
- pendulum=1.4.4=py36_0
- pep8=1.7.0=py36_0
- pexpect=4.6.0=py36_1000
- pickleshare=0.7.5=py36_1000
- pip=9.0.1=py36_1
- pluggy=0.6.0=py_0
- prompt_toolkit=2.0.8=py_0
- psutil=4.4.2=py36_0
- psycopg2=2.7.5=py36hdffb7b8_2
- ptyprocess=0.6.0=py36_1000
- py=1.7.0=py_0
- pyaml=18.11.0=py_0
- pyasn1=0.4.4=py_1
- pycodestyle=2.3.1=py_1
- pycparser=2.19=py_0
- pyflakes=1.6.0=py36_0
- pygments=2.3.1=py_0
- pyjwt=1.7.1=py_0
- pyopenssl=19.0.0=py36_0
- pyrsistent=0.14.9=py36h1de35cc_1000
- pysocks=1.6.8=py36_1002
- pytest=3.4.0=py36_0
- pytest-cov=2.5.1=py36_0
- pytest-mock=1.6.3=py36_1
- python=3.6.2=0
- python-dateutil=2.8.0=py_0
- python-editor=1.0.4=py_0
- python-nvd3=0.15.0=py_1
- python-slugify=1.2.6=py_0
- python3-openid=3.1.0=py36_1001
- pytz=2018.9=py_0
- pytzdata=2018.9=py_0
- pyyaml=3.12=py36_1
- pyzmq=17.1.2=py36h111632d_1001
- readline=6.2=0
- requests=2.21.0=py36_1000
- requests-oauthlib=1.0.0=py_1
- requests-toolbelt=0.9.1=py_0
- rsa=3.4.2=py_1
- s3transfer=0.1.13=py36_1001
- send2trash=1.5.0=py_0
- setproctitle=1.1.10=py36h1de35cc_1001
- setuptools=38.4.0=py36_0
- simple-salesforce=0.74.2=py36_0
- six=1.12.0=py36_1000
- smmap2=2.0.5=py_0
- sqlalchemy=1.1.18=py36h470a237_0
- sqlite=3.13.0=1
- tabulate=0.7.7=py36_0
- tenacity=4.8.0=py36_0
- terminado=0.8.1=py36_1001
- testpath=0.4.2=py36_1000
- thrift=0.11.0=py36h0a44026_1001
- tk=8.5.19=2
- tornado=5.1.1=py36h1de35cc_1000
- traitlets=4.3.2=py36_1000
- tzlocal=1.5.1=py_0
- unicodecsv=0.14.1=py_1
- unidecode=1.0.23=py_0
- urllib3=1.24.1=py36_1000
- wcwidth=0.1.7=py_1
- webencodings=0.5.1=py_1
- werkzeug=0.14.1=py_0
- wheel=0.30.0=py36_2
- wtforms=2.1=py36_0
- xmltodict=0.11.0=py_1
- xz=5.2.4=h1de35cc_1001
- yaml=0.1.7=h1de35cc_1001
- zeromq=4.2.5=h0a44026_1006
- zlib=1.2.11=0
- zope.deprecation=4.4.0=py_0
- pip:
  - apache-airflow==1.10.1
  - datadiff==1.1.6
  - funcsigs==1.0.0
  - ordereddict==1.1
  - pytest-pythonpath==0.7
  - python-logstash==0.4.5
  - google-api-core==1.14.2
  - google-api-python-client==1.7.11
  - oauth2client==4.1.2
  - cached-property==1.5.1

It seems it is causing a conflict when installing some dependencies because I got the following output when running conda env create --force -f "$ENVIRONMENT_FILE"

Pip subprocess error:
protobuf requires Python '>=3.7' but the running Python is 3.6.2
You are using pip version 9.0.1, however version 22.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

failed

CondaEnvException: Pip failed

It is weird because I'm not installing the protobuf library but it looks it is used in one of the libraries I am using.

Here is the conda info:

     active environment : airflow36
    active env location : /Users/username/opt/anaconda3/envs/airflow36
            shell level : 1
       user config file : /Users/username/.condarc
 populated config files : /Users/username/.condarc
          conda version : 22.11.1
    conda-build version : 3.22.0
         python version : 3.9.13.final.0
       virtual packages : __archspec=1=x86_64
                          __osx=10.16=0
                          __unix=0=0
       base environment : /Users/username/opt/anaconda3  (writable)
      conda av data dir : /Users/username/opt/anaconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/osx-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/username/opt/anaconda3/pkgs
                          /Users/username/.conda/pkgs
       envs directories : /Users/username/opt/anaconda3/envs
                          /Users/username/.conda/envs
               platform : osx-64
             user-agent : conda/22.11.1 requests/2.28.1 CPython/3.9.13 Darwin/21.6.0 OSX/10.16
                UID:GID : 501:20
             netrc file : None
           offline mode : False

# conda environments:
#
base                     /Users/username/opt/anaconda3
airflow36             *  /Users/username/opt/anaconda3/envs/airflow36
                         /opt/homebrew/Caskroom/miniconda/base

Would someone faced the same issue?

Thanks


问:
AG-Grid CSS syntax
I'm having problems understanding the AG-grid css syntax (Variable Reference).

disclaimer - I'm not a developer, just self-taught hobbiest, so I'm not sure what to search for.

I want to create my own theme for a project, and I wasn't getting anywhere, so I copied the css file for an existing theme, and intended to modify it to suit my needs, but I don't understand why its not working.

Below is an example (heavily truncated):

```<code>.ag-theme-pz {
...
--ag-background-color: rgba(209,210,210,0.75);   <-- Doesn't work
background-color: rgba(209,210,210,0.75);        <-- Does work
...
}
</code>```

For some reason, in my copied css file, the syntax (--ag-background-color) no longer works - but it worked fine in the original css file.

Is there a reference I need to add to make sure the syntax as per their documentation works??

What have I missed?

Title: AG-Grid CSS syntax

Body:
I'm having problems understanding the AG-grid css syntax (Variable Reference).

disclaimer - I'm not a developer, just self-taught hobbiest, so I'm not sure what to search for.

I want to create my own theme for a project, and I wasn't getting anywhere, so I copied the css file for an existing theme, and intended to modify it to suit my needs, but I don't understand why its not working.

Below is an example (heavily truncated):

.ag-theme-pz {
...
--ag-background-color: rgba(209,210,210,0.75);   <-- Doesn't work
background-color: rgba(209,210,210,0.75);        <-- Does work
...
}

For some reason, in my copied css file, the syntax (--ag-background-color) no longer works - but it worked fine in the original css file.

Is there a reference I need to add to make sure the syntax as per their documentation works??

What have I missed?