问:
How do I fix the terminal problem in launching C exes using vs code?
Both templates of launch.json don't work. None of the configs print anything in console.

I have made a folder full of C programs and I want to run those programs using vs code (one by one ofc). I am facing problems while using the windows template of launch.json since it needs exact filename of executables while I need that launch.json for the whole folder.
So I chose the GDB/LLDB one but it is not working well even with "externalConsole" = true.
The terminal closes in a splitsecond. I saw many similar questions but none of them had the answer I needed.

Launch.json:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "gcc.exe - Build and debug active file",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "C:\\MinGW64\\bin",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "miDebuggerPath": "C:\\MinGW64\\bin\\gdb.exe",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "C/C++: gcc.exe build active file"
        }
    ]
}
```
<p><code>Tasks.json</code>:</p>
<pre class="lang-json prettyprint-override"><code>{
    "tasks": [
        {
            "type": "cppbuild",
            "label": "C/C++: gcc.exe build active file",
            "command": "C:\\MinGW64\\bin\\gcc.exe",
            "args": [
                "-g",
                "${file}",
                "-o",
                "${fileDirname}\\${fileBasenameNoExtension}.exe"
            ],
            "options": {
                "cwd": "C:\\MinGW64\\bin"
            },
            "problemMatcher": [
                "$gcc"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "detail": "Task generated by Debugger."
        }
    ],
    "version": "2.0.0"
}
</code>```

Body:
Both templates of launch.json don't work. None of the configs print anything in console.

I have made a folder full of C programs and I want to run those programs using vs code (one by one ofc). I am facing problems while using the windows template of launch.json since it needs exact filename of executables while I need that launch.json for the whole folder.
So I chose the GDB/LLDB one but it is not working well even with "externalConsole" = true.
The terminal closes in a splitsecond. I saw many similar questions but none of them had the answer I needed.

Launch.json:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "gcc.exe - Build and debug active file",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "C:\\MinGW64\\bin",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "miDebuggerPath": "C:\\MinGW64\\bin\\gdb.exe",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "C/C++: gcc.exe build active file"
        }
    ]
}

Tasks.json:

{
    "tasks": [
        {
            "type": "cppbuild",
            "label": "C/C++: gcc.exe build active file",
            "command": "C:\\MinGW64\\bin\\gcc.exe",
            "args": [
                "-g",
                "${file}",
                "-o",
                "${fileDirname}\\${fileBasenameNoExtension}.exe"
            ],
            "options": {
                "cwd": "C:\\MinGW64\\bin"
            },
            "problemMatcher": [
                "$gcc"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "detail": "Task generated by Debugger."
        }
    ],
    "version": "2.0.0"
}


来源: stackexchange

问:
AKS Storage Class network acl
I'm trying to create a storage class in AKS that needs to have the public access disabled and the specific vnet and subnet allowed. Basically using service endpoint.

I can create the storage account with specific params like storage type, but the other settings dont apply.

```<code>kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: ######files2
provisioner: file.csi.azure.com
allowVolumeExpansion: true
mountOptions:
  - dir_mode=0777
  - file_mode=0777
  - uid=0
  - gid=0
  - mfsymlinks
  - cache=strict
  - actimeo=30
parameters:
  skuName: Standard_GRS
  vnetResourceGroup: r##########
  vnetName: v#######-#####
  subnetName: s############s
  allowBlobPublicAccess: false
</code>```

this link seems to imply its possible:
https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/aks/azure-files-csi.md

But I can't get it working and I can't have storage accounts exposed to the internet.

Any ideas?

Thanks

ContentLicense: CC BY-SA 4.0

Title: AKS Storage Class network acl

Body:
I'm trying to create a storage class in AKS that needs to have the public access disabled and the specific vnet and subnet allowed. Basically using service endpoint.

I can create the storage account with specific params like storage type, but the other settings dont apply.

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: ######files2
provisioner: file.csi.azure.com
allowVolumeExpansion: true
mountOptions:
  - dir_mode=0777
  - file_mode=0777
  - uid=0
  - gid=0
  - mfsymlinks
  - cache=strict
  - actimeo=30
parameters:
  skuName: Standard_GRS
  vnetResourceGroup: r##########
  vnetName: v#######-#####
  subnetName: s############s
  allowBlobPublicAccess: false

this link seems to imply its possible:
https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/aks/azure-files-csi.md

But I can't get it working and I can't have storage accounts exposed to the internet.

Any ideas?

Thanks


问:
Dynamically change URL query parameters on button clicks via JavaScript
I am using the below script to dynamically change links with query parameters. The links are dynamically changed when I click on the button.

example.com/abc?client_id=123

The problem is when a user lands on the site with this URL from Google Ads -  example.com/abc?gclid_id=786, and then clicks on the button the URL is dynamically changed to example.com/abc?gclid=786?client_id=123

I want it example.com/abc?gclid=786&client_id=123

Can I modify the existing script if the users come from Google change the parameter to &client_id=123 and when the user comes organically change the script to ?client_id=123

The parameter values are dynamic and they are mapped with cookie values (This is sorted). The main problem is & and ?

```<code><script>

(function () {

var links = document.querySelectorAll('a[href*=abc]');

var clientId = '?client_id={{Read Cookie Value}}'

links.forEach(function(link) {

var original = link.getAttribute('href');
link.setAttribute('href', original+clientId)

 })

}) ();

</script>
</code>```


问:
Prevent copying slicer in excel
I created figures by power pivot and I have also slicer.
I want to share this excel with other but I dont want that they have access to data.
I protect the excel in such a way that they cannot change, modify and copy anything.
They are only able to change the data in slicer.
The point is that only slicer can be copied and as slicer is linked to power pivot the data can be also copied,
how can I prevent copying slicer?</p>

Title: Prevent copying slicer in excel


问:
How to inspect requests send by importing URL module in a script tag which type is module?
For example:

```

How can I inspect the request to the https://esm.sh/react@18.2.0?

The request did not show up in the Network tab in Chrome dev tools.

Body:
For example:

How can I inspect the request to the https://esm.sh/react@18.2.0?

The request did not show up in the Network tab in Chrome dev tools.


问:
Radio input not reflecting changes in AlertDialog in Flutter
So I am trying to have a simple form in a Dialog box in Flutter with one input field. The input can be interpreted in two ways so I have put a radio field to determine the type of input. Now the radio fields are not reflecting change in the UI even when the state is being updated. Checkout the screenshot below. No change occurs in selection when I select Minutes. I checked the state and it is being updated but not getting reflected in the UI.

Screenshot for problem description

Here is what I have done. The dialog appears on click of a button.

showDialog Function:

```<code>Future<void> showSetTargetDialog(
    BuildContext context, TextEditingController targetController) async {
  return await showDialog(
      context: context,
      builder: (context) {
        int? type = 1;
        return StatefulBuilder(builder: (context, setState) {
          return AlertDialog(
            shape: RoundedRectangleBorder(
                borderRadius: BorderRadius.circular(10.0)),
            // contentPadding: const EdgeInsets.all(0),
            insetPadding: const EdgeInsets.all(16),
            contentPadding:
                const EdgeInsets.symmetric(horizontal: 24.0, vertical: 16),
            content: Column(
              mainAxisSize: MainAxisSize.min,
              children: [
                Row(
                  children: [
                    Expanded(
                      child: RadioListTile(
                          title: const Text('Pages'),
                          value: 1,
                          groupValue: type,
                          onChanged: (value) => setState(() {
                                type = value;
                                print('Value is $value, type is $type');
                              })),
                    ),
                    Expanded(
                      child: RadioListTile(
                          title: const Text('Minutes'),
                          value: 2,
                          groupValue: type,
                          onChanged: (value) => setState(() {
                                type = value;
                                print('Value is $value, type is $type');
                              })),
                    )
                  ],
                ),
                TextFormField(
                  controller: targetController,
                  keyboardType: TextInputType.number,
                  decoration:
                      const InputDecoration(hintText: "Enter your goal"),
                ),
                const SizedBox(
                  height: 10,
                ),
                Align(
                  alignment: Alignment.centerRight,
                  child: TextButton(
                    onPressed: () {
                      Navigator.of(context).pop();
                    },
                    child: const Text('Save'),
                  ),
                ),
              ],
            ),
          );
        });
      });
}

</code>```

Widget From which it is called:

```<code>class OnboardingSetTargetScreen extends ConsumerStatefulWidget {
  const OnboardingSetTargetScreen({super.key});

  @override
  ConsumerState<ConsumerStatefulWidget> createState() =>
      _OnboardingSetTargetScreenState();
}

class _OnboardingSetTargetScreenState
    extends ConsumerState<OnboardingSetTargetScreen> {
  int? pages;
  int? minutes;

  TextEditingController _targetController = TextEditingController();

  @override
  Widget build(BuildContext context) {
    final devHeight = MediaQuery.of(context).size.height;

    final Widget onboardingSetTargetIllustration = SvgPicture.asset(
        Constants.onboardingSetTargetIllustration,
        height: devHeight * 0.6);

    final selectedBook = ref.watch(bookControllerProvider).selectedBook;

    final pages = ref.watch(onboardingControllerProvider).pages;

    final minutes = ref.watch(onboardingControllerProvider).minutes;

    void routeBack() {
      Routemaster.of(context).pop();
    }

    void updateTarget(String text) {
      ref.read(onboardingControllerProvider.notifier).setPages(int.parse(text));
    }

    String getSubtext() {
      if (pages != null) {
        return 'You have set your goal to read $pages pages per day';
      } else if (minutes != null) {
        return 'You have set your goal to read $minutes minutes per day';
      } else {
        return 'Tell us about your daily reading goals either in pages or minutes';
      }
    }

    return Scaffold(
        body: SafeArea(
      child: Padding(
        padding:
            const EdgeInsets.only(top: 8, bottom: 16.0, left: 16, right: 16),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            const SizedBox(
              height: 20,
            ),
            InkWell(
              onTap: routeBack,
              child: const Icon(
                FeatherIcons.chevronLeft,
                color: Pallete.primaryBlue,
              ),
            ),
            onboardingSetTargetIllustration,
            const SizedBox(
              height: 20,
            ),
            const Text(
              'Set your goal',
              style: AppStyles.headingTwo,
            ),
            Text(
              getSubtext(),
              style: AppStyles.subtext,
            ),
            Expanded(
              child: Align(
                alignment: Alignment.bottomCenter,
                child: Row(
                  children: [
                    Expanded(
                      child: CustomButton(
                          text: 'Set Goal',
                          onPressed: () async {
                            await showSetTargetDialog(
                                context, _targetController);
                            if (_targetController.text.isNotEmpty) {
                              updateTarget(_targetController.text);
                            }
                          }),
                    ),
                    Visibility(
                      visible: pages != null || minutes != null,
                      child: const SizedBox(
                        width: 16,
                      ),
                    ),
                    Visibility(
                      visible: pages != null || minutes != null,
                      child: InkWell(
                        onTap: () {
                          Routemaster.of(context)
                              .push('/onboarding/select-time');
                        },
                        child: Container(
                          padding: const EdgeInsets.all(16),
                          decoration: BoxDecoration(
                              borderRadius: BorderRadius.circular(100),
                              color: Pallete.primaryBlue),
                          child: const Icon(
                            FeatherIcons.arrowRight,
                            color: Pallete.white,
                          ),
                        ),
                      ),
                    )
                  ],
                ),
              ),
            )
          ],
        ),
      ),
    ));
  }
}

</code>```

Body:
So I am trying to have a simple form in a Dialog box in Flutter with one input field. The input can be interpreted in two ways so I have put a radio field to determine the type of input. Now the radio fields are not reflecting change in the UI even when the state is being updated. Checkout the screenshot below. No change occurs in selection when I select Minutes. I checked the state and it is being updated but not getting reflected in the UI.

Screenshot for problem description

Here is what I have done. The dialog appears on click of a button.

showDialog Function:

Future<void> showSetTargetDialog(
    BuildContext context, TextEditingController targetController) async {
  return await showDialog(
      context: context,
      builder: (context) {
        int? type = 1;
        return StatefulBuilder(builder: (context, setState) {
          return AlertDialog(
            shape: RoundedRectangleBorder(
                borderRadius: BorderRadius.circular(10.0)),
            // contentPadding: const EdgeInsets.all(0),
            insetPadding: const EdgeInsets.all(16),
            contentPadding:
                const EdgeInsets.symmetric(horizontal: 24.0, vertical: 16),
            content: Column(
              mainAxisSize: MainAxisSize.min,
              children: [
                Row(
                  children: [
                    Expanded(
                      child: RadioListTile(
                          title: const Text('Pages'),
                          value: 1,
                          groupValue: type,
                          onChanged: (value) => setState(() {
                                type = value;
                                print('Value is $value, type is $type');
                              })),
                    ),
                    Expanded(
                      child: RadioListTile(
                          title: const Text('Minutes'),
                          value: 2,
                          groupValue: type,
                          onChanged: (value) => setState(() {
                                type = value;
                                print('Value is $value, type is $type');
                              })),
                    )
                  ],
                ),
                TextFormField(
                  controller: targetController,
                  keyboardType: TextInputType.number,
                  decoration:
                      const InputDecoration(hintText: "Enter your goal"),
                ),
                const SizedBox(
                  height: 10,
                ),
                Align(
                  alignment: Alignment.centerRight,
                  child: TextButton(
                    onPressed: () {
                      Navigator.of(context).pop();
                    },
                    child: const Text('Save'),
                  ),
                ),
              ],
            ),
          );
        });
      });
}

Widget From which it is called:

class OnboardingSetTargetScreen extends ConsumerStatefulWidget {
  const OnboardingSetTargetScreen({super.key});

  @override
  ConsumerState<ConsumerStatefulWidget> createState() =>
      _OnboardingSetTargetScreenState();
}

class _OnboardingSetTargetScreenState
    extends ConsumerState<OnboardingSetTargetScreen> {
  int? pages;
  int? minutes;

  TextEditingController _targetController = TextEditingController();

  @override
  Widget build(BuildContext context) {
    final devHeight = MediaQuery.of(context).size.height;

    final Widget onboardingSetTargetIllustration = SvgPicture.asset(
        Constants.onboardingSetTargetIllustration,
        height: devHeight * 0.6);

    final selectedBook = ref.watch(bookControllerProvider).selectedBook;

    final pages = ref.watch(onboardingControllerProvider).pages;

    final minutes = ref.watch(onboardingControllerProvider).minutes;

    void routeBack() {
      Routemaster.of(context).pop();
    }

    void updateTarget(String text) {
      ref.read(onboardingControllerProvider.notifier).setPages(int.parse(text));
    }

    String getSubtext() {
      if (pages != null) {
        return 'You have set your goal to read $pages pages per day';
      } else if (minutes != null) {
        return 'You have set your goal to read $minutes minutes per day';
      } else {
        return 'Tell us about your daily reading goals either in pages or minutes';
      }
    }

    return Scaffold(
        body: SafeArea(
      child: Padding(
        padding:
            const EdgeInsets.only(top: 8, bottom: 16.0, left: 16, right: 16),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            const SizedBox(
              height: 20,
            ),
            InkWell(
              onTap: routeBack,
              child: const Icon(
                FeatherIcons.chevronLeft,
                color: Pallete.primaryBlue,
              ),
            ),
            onboardingSetTargetIllustration,
            const SizedBox(
              height: 20,
            ),
            const Text(
              'Set your goal',
              style: AppStyles.headingTwo,
            ),
            Text(
              getSubtext(),
              style: AppStyles.subtext,
            ),
            Expanded(
              child: Align(
                alignment: Alignment.bottomCenter,
                child: Row(
                  children: [
                    Expanded(
                      child: CustomButton(
                          text: 'Set Goal',
                          onPressed: () async {
                            await showSetTargetDialog(
                                context, _targetController);
                            if (_targetController.text.isNotEmpty) {
                              updateTarget(_targetController.text);
                            }
                          }),
                    ),
                    Visibility(
                      visible: pages != null || minutes != null,
                      child: const SizedBox(
                        width: 16,
                      ),
                    ),
                    Visibility(
                      visible: pages != null || minutes != null,
                      child: InkWell(
                        onTap: () {
                          Routemaster.of(context)
                              .push('/onboarding/select-time');
                        },
                        child: Container(
                          padding: const EdgeInsets.all(16),
                          decoration: BoxDecoration(
                              borderRadius: BorderRadius.circular(100),
                              color: Pallete.primaryBlue),
                          child: const Icon(
                            FeatherIcons.arrowRight,
                            color: Pallete.white,
                          ),
                        ),
                      ),
                    )
                  ],
                ),
              ),
            )
          ],
        ),
      ),
    ));
  }
}


问:
How to fix footer on top of content and can't scroll vertically on mobile view when use overflow x hidden?
So i try to make a page responsive, and i try to use overflow x hidden for mobile phone can't scroll horizontally. but the problem is when i'm on mobile the vertical scroll didn't work and footer is on top of content/back button.

code of footer:

```<code><div style= "text-align: center;
                            height:65px; line-height:30px;
                            background-color: #7895B2;
                            position: fixed;
                            width: 100%;
                            bottom: 0;">
  <p style= "color: #F5EFE6;">Developed by Kelompok 2<br>
  Aldi, Raja, Yovan</p>
</div>
</code>```

code css on the index:

```<code><style>
      html, body {
  overflow-x: hidden;
}
body {
  position: relative
}
    </style>
</code>```

Body:
So i try to make a page responsive, and i try to use overflow x hidden for mobile phone can't scroll horizontally. but the problem is when i'm on mobile the vertical scroll didn't work and footer is on top of content/back button.

code of footer:

Developed by Kelompok 2

  Aldi, Raja, Yovan

code css on the index:


问:
Error executing putObject - Unable to write file at Location
Yesterday everything worked fine.

But today minio dashbord still works, but I am not able to put files there. No changes made since yesterday.

```<code>Unable to write file at location: 8596cc71-2db5-4f32-b51b-acdbeee05b86.jpg. Error executing "PutObject" on "http://images.localhost:9000/8596cc71-2db5-4f32-b51b-acdbeee05b86.jpg"; AWS HTTP error: cURL error 7: Failed to connect to images.localhost port 9000 after 0 ms: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://images.localhost:9000/8596cc71-2db5-4f32-b51b-acdbeee05b86.jpg
</code>```

My config:

```<code>AWS_ACCESS_KEY_ID=sail
AWS_SECRET_ACCESS_KEY=password
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=images
AWS_USE_PATH_STYLE_ENDPOINT=false
AWS_ENDPOINT=http://localhost:9000
AWS_URL=http://localhost:9000/images
</code>```

Weird thing I found:
if I set bucket name (in .env file) to be shorter than 3 characters, eg xx, it tries to call http://localhost:9000/xx/8596cc71-2db5-4f32-b51b-acdbeee05b86.jpg url. If longer than 3 characters like images it calls http://images.localhost:9000/8596cc71-2db5-4f32-b51b-acdbeee05b86.jpg.

In both cases it does not work.

I have absolutely no idea what happened.

Stack used:

laravel sail with php 8.1

laravel "^9.19"

league/flysystem-aws-s3-v3": "^3.0"

league/flysystem-ftp": "^3.0"

Body:
Yesterday everything worked fine.

But today minio dashbord still works, but I am not able to put files there. No changes made since yesterday.

Unable to write file at location: 8596cc71-2db5-4f32-b51b-acdbeee05b86.jpg. Error executing "PutObject" on "http://images.localhost:9000/8596cc71-2db5-4f32-b51b-acdbeee05b86.jpg"; AWS HTTP error: cURL error 7: Failed to connect to images.localhost port 9000 after 0 ms: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://images.localhost:9000/8596cc71-2db5-4f32-b51b-acdbeee05b86.jpg

My config:

AWS_ACCESS_KEY_ID=sail
AWS_SECRET_ACCESS_KEY=password
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=images
AWS_USE_PATH_STYLE_ENDPOINT=false
AWS_ENDPOINT=http://localhost:9000
AWS_URL=http://localhost:9000/images

Weird thing I found:
if I set bucket name (in .env file) to be shorter than 3 characters, eg xx, it tries to call http://localhost:9000/xx/8596cc71-2db5-4f32-b51b-acdbeee05b86.jpg url. If longer than 3 characters like images it calls http://images.localhost:9000/8596cc71-2db5-4f32-b51b-acdbeee05b86.jpg.

In both cases it does not work.

I have absolutely no idea what happened.

Stack used:

laravel sail with php 8.1

laravel "^9.19"

league/flysystem-aws-s3-v3": "^3.0"

league/flysystem-ftp": "^3.0"


问:
From meteorological GRIB with 1D x and y coordinates to 2D lat lon coordinates in netCDF format
I want to compile a meteorological dataset out of DWD weather data (https://opendata.dwd.de/climate_environment/REA/COSMO_REA6/daily/2D/)  in .grb format with one dimensional coordinates (x and y) into a spatial subset in the netCDF fileformat with twodimensional lat lon coordinates.
And I need to do it in python and on windows. So tools like "ecCodes" or "CDO" are not viable.
I have tried to do this with xarray since it is able to read .grb files, but the very different structure of netCDF and GRIB, seems to make it difficult for me.

The error message I get:

KeyError: "no index found for coordinate 'latitude'"

But when I look at the dataset there should be longitude and latitude:

```<code>Out[24]:
<xarray.Dataset>
Dimensions:     (time: 31, y: 824, x: 848)
Coordinates:
  * time        (time) datetime64[ns] 2008-01-01T01:00:00 ... 2008-01-31T01:0...
    step        timedelta64[ns] 1 days
    surface     float64 0.0
    latitude    (y, x) float64 21.95 21.97 21.99 22.01 ... 66.76 66.73 66.7
    longitude   (y, x) float64 ...
    valid_time  (time) datetime64[ns] 2008-01-02T01:00:00 ... 2008-02-01T01:0...
Dimensions without coordinates: y, x
Data variables:
    ASWDIFD_S   (time, y, x) float32 ...
Attributes:
    GRIB_edition:            1
    GRIB_centre:             edzw
    GRIB_centreDescription:  Offenbach
    GRIB_subCentre:          255
    Conventions:             CF-1.7
    institution:             Offenbach
    history:                 2022-12-09T13:41 GRIB to CDM+CF via cfgrib-0.9.1...
</code>```

My current code:

```<code>from tqdm import tqdm
import xarray as xr
from tqdm import tqdm
import os

folders = [x for x in os.listdir() ]
for var in tqdm(folders,desc=" outer", position=0):
    variables = [x for x in os.listdir(var) if not ".idx" in x]
    for i, file in tqdm(enumerate(variables), desc="inner", position = 1):
        if i == 0:
            try:
                ds = xr.open_dataset(var+"/"+file)
                ds = ds.sel(latitude = slice(53.6287, 54.95), longitude = slice(9.35, 14.685))
            except:
                ds = xr.open_dataset(var+"/"+file,engine="cfgrib")
                ds = ds.sel(latitude = slice(53.6287, 54.95), longitude = slice(9.35, 14.685))
            i += 1
        else:
            try:
                ds   = xr.concat([ds, xr.open_dataset(var+"/"+file)], dim = "time")
            except:
                ds   = xr.concat([ds, xr.open_dataset(var+"/"+file,engine="cfgrib")], dim = "time")

    ds.to_netcdf("COSMO_REA6_"+var+"_2008-2019.nc")

</code>```

Body:
I want to compile a meteorological dataset out of DWD weather data (https://opendata.dwd.de/climate_environment/REA/COSMO_REA6/daily/2D/)  in .grb format with one dimensional coordinates (x and y) into a spatial subset in the netCDF fileformat with twodimensional lat lon coordinates.
And I need to do it in python and on windows. So tools like "ecCodes" or "CDO" are not viable.
I have tried to do this with xarray since it is able to read .grb files, but the very different structure of netCDF and GRIB, seems to make it difficult for me.

The error message I get:

KeyError: "no index found for coordinate 'latitude'"

But when I look at the dataset there should be longitude and latitude:

Out[24]:
<xarray.Dataset>
Dimensions:     (time: 31, y: 824, x: 848)
Coordinates:
  * time        (time) datetime64[ns] 2008-01-01T01:00:00 ... 2008-01-31T01:0...
    step        timedelta64[ns] 1 days
    surface     float64 0.0
    latitude    (y, x) float64 21.95 21.97 21.99 22.01 ... 66.76 66.73 66.7
    longitude   (y, x) float64 ...
    valid_time  (time) datetime64[ns] 2008-01-02T01:00:00 ... 2008-02-01T01:0...
Dimensions without coordinates: y, x
Data variables:
    ASWDIFD_S   (time, y, x) float32 ...
Attributes:
    GRIB_edition:            1
    GRIB_centre:             edzw
    GRIB_centreDescription:  Offenbach
    GRIB_subCentre:          255
    Conventions:             CF-1.7
    institution:             Offenbach
    history:                 2022-12-09T13:41 GRIB to CDM+CF via cfgrib-0.9.1...

My current code:

from tqdm import tqdm
import xarray as xr
from tqdm import tqdm
import os

folders = [x for x in os.listdir() ]
for var in tqdm(folders,desc=" outer", position=0):
    variables = [x for x in os.listdir(var) if not ".idx" in x]
    for i, file in tqdm(enumerate(variables), desc="inner", position = 1):
        if i == 0:
            try:
                ds = xr.open_dataset(var+"/"+file)
                ds = ds.sel(latitude = slice(53.6287, 54.95), longitude = slice(9.35, 14.685))
            except:
                ds = xr.open_dataset(var+"/"+file,engine="cfgrib")
                ds = ds.sel(latitude = slice(53.6287, 54.95), longitude = slice(9.35, 14.685))
            i += 1
        else:
            try:
                ds   = xr.concat([ds, xr.open_dataset(var+"/"+file)], dim = "time")
            except:
                ds   = xr.concat([ds, xr.open_dataset(var+"/"+file,engine="cfgrib")], dim = "time")

    ds.to_netcdf("COSMO_REA6_"+var+"_2008-2019.nc")


问:
What's App like Status Border with Oval shape in flutter
How to build the status border like what's app with Oval shape dynamically in flutter.

Below is my code.

Help me to generate the dynamic border with Oval shape.

```<code>path.moveTo(size.width * 0.78787878, size.height * 0.2);
path.addArc(
    Rect.fromLTWH(rrect.left, rrect.top, rrect.width, rrect.height),
    // Rect.fromPoints(Offset(76.06, 99.9999), Offset(0, -10)),

    doubleToAngle((start + (((angle) + spacing) * i))),
    doubleToAngle(angle - 5));
canvas.drawPath(path, alreadyWatch - 1 >= i ? seenPaint : unSeenPaint);
</code>```

Body:
How to build the status border like what's app with Oval shape dynamically in flutter.

Below is my code.

Help me to generate the dynamic border with Oval shape.

path.moveTo(size.width * 0.78787878, size.height * 0.2);
path.addArc(
    Rect.fromLTWH(rrect.left, rrect.top, rrect.width, rrect.height),
    // Rect.fromPoints(Offset(76.06, 99.9999), Offset(0, -10)),

    doubleToAngle((start + (((angle) + spacing) * i))),
    doubleToAngle(angle - 5));
canvas.drawPath(path, alreadyWatch - 1 >= i ? seenPaint : unSeenPaint);


问:
Installing packages in R using minicran
I am a corporate user of R with firewall constraints. I downloaded miniCRAN in another laptop and transferred the local repository to my laptop. Now I am running the following code

```<code>> install.packages("dplyr", repos = "C:/Users/1030780/Documents/R/packages_Mrunal" , type = c("win.binary"), dependencies = TRUE)

</code>```

I get the following error:

```<code>>  Warning in install.packages :
>       unable to access index for repository http://cran.csiro.au/src/contrib:
>       cannot open URL 'http://cran.csiro.au/src/contrib/PACKAGES'
>     Installing package into ‘C:/Users/1030780/AppData/Local/R/win-library/4.2’
>     (as ‘lib’ is unspecified)
>     Warning in install.packages :
>       unable to access index for repository C:/Users/1030780/Documents/R packages_Mrunal/bin/windows/contrib/4.2:
>       cannot open URL 'C:/Users/1030780/Documents/R packages_Mrunal/bin/windows/contrib/4.2/PACKAGES'
>     Warning in install.packages :
>       package ‘dplyr’ is not available as a binary package for this version of R
>
>     A version of this package for your version of R might be available elsewhere,
>     see the ideas at
>     https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
</code>```

Title: Installing packages in R using minicran

Body:
I am a corporate user of R with firewall constraints. I downloaded miniCRAN in another laptop and transferred the local repository to my laptop. Now I am running the following code

> install.packages("dplyr", repos = "C:/Users/1030780/Documents/R/packages_Mrunal" , type = c("win.binary"), dependencies = TRUE)

I get the following error:

>  Warning in install.packages :
>       unable to access index for repository http://cran.csiro.au/src/contrib:
>       cannot open URL 'http://cran.csiro.au/src/contrib/PACKAGES'
>     Installing package into ‘C:/Users/1030780/AppData/Local/R/win-library/4.2’
>     (as ‘lib’ is unspecified)
>     Warning in install.packages :
>       unable to access index for repository C:/Users/1030780/Documents/R packages_Mrunal/bin/windows/contrib/4.2:
>       cannot open URL 'C:/Users/1030780/Documents/R packages_Mrunal/bin/windows/contrib/4.2/PACKAGES'
>     Warning in install.packages :
>       package ‘dplyr’ is not available as a binary package for this version of R
>
>     A version of this package for your version of R might be available elsewhere,
>     see the ideas at
>     https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages


问:
Optimal way of pivoting visuals in power bi?
In power bi, I need to “recreate” a report from another system, and I have to do visuals like:

This cannot be natively achieved in PowerBI… Therefore I end up doing this “”trick” in my model:

Then I create a measure, to use the measures:

Then I just drag them in my Table visual:

Is there any other way to achieve this? It definitely works, but it seems very very cumbersome, and I hope someone knows an easier way?


问:
How to get the preview page returned in the OneDrive UI in OneDrive from MS Graph
MS Graph provides various link types (weburl, sharelinks, preview link, etc) however I am struggling to get the correct link for what I am looking for. If you log into OneDrive UI and you right click on a file and click preview. It takes you to a page that is kind of a in between for the Office 365 online word editor or the Adobe Cloud PDF editor. It has a toolbar up top that lets you choose to open a file in the browser or in the appropriate editor they offer. I cannot seem to find where this link is produced in MS Graph API. The closest I get is the CreateLink() which produces a link with this toolbar and editor choice for PDFs but for docx files that link takes you directly into the file so there is no in between. I prefer consistency so this in between page for all document types is perfect.

Is there anyway to get this link correctly and not some workaround like shareable links since my users already have access to the shared folder these files sit in?


问:
How to pass Mapped Diagnostic Context (MDC) from one micro-service to another micro-service for one request?
I'm using Mapped Diagnostic Context (MDC) to logs unique key in logs and i'm getting the unique id for one request in the logs but problem is that i'm calling another micro-service to get some data so unique id in both service's logs is different.
so is there any way that i can print the same uuid in both service logs for one request ?? Because this is one request so should be same unique id also.

Ex: for understanding

one request come to first service

// first micro-service running
method() {
  data = call second micro-service to fetch some data
  return response; // return response to request
}

// second micro-service running
methodSecond() {
  return firstServiceResponse; // return response to first service
}
```

I want both services to have the same uuid for one request in their service logs.

Body:
I'm using Mapped Diagnostic Context (MDC) to logs unique key in logs and i'm getting the unique id for one request in the logs but problem is that i'm calling another micro-service to get some data so unique id in both service's logs is different.
so is there any way that i can print the same uuid in both service logs for one request ?? Because this is one request so should be same unique id also.

Ex: for understanding

one request come to first service

// first micro-service running
method() {
  data = call second micro-service to fetch some data
  return response; // return response to request
}

// second micro-service running
methodSecond() {
  return firstServiceResponse; // return response to first service
}

I want both services to have the same uuid for one request in their service logs.


问:
XGBoost API's plot_importance displays unknown feature, `unnamed : 0`
XGBoost native API's plot_importance displays an unknown feature, unnamed: 0, on the top of the chart.
Here is the output image.

Feature Importance Ranking

I checked all the columns in the original dataframe input into DMatrix and confirmed that there is no unknown feature left in it. I also removed the key ID as well.
So, I confirmed that the original dataset did not include any unspecified feature in its columns.

My code of plot_importance is here.
`

```<code>plot_importance(pw_model_1, max_num_features=10)
pyplot.savefig('plot.png')
pyplot.show()
</code>```

`
Here pw_model_1 is the selected model after hyperparameter tuning.

I would appreciate it if anyone can advise me how to resolve this issue.
Thank you
Best regards
Michio

Body:
XGBoost native API's plot_importance displays an unknown feature, unnamed: 0, on the top of the chart.
Here is the output image.

Feature Importance Ranking

I checked all the columns in the original dataframe input into DMatrix and confirmed that there is no unknown feature left in it. I also removed the key ID as well.
So, I confirmed that the original dataset did not include any unspecified feature in its columns.

My code of plot_importance is here.
`

plot_importance(pw_model_1, max_num_features=10)
pyplot.savefig('plot.png')
pyplot.show()

`
Here pw_model_1 is the selected model after hyperparameter tuning.

I would appreciate it if anyone can advise me how to resolve this issue.
Thank you
Best regards
Michio


问:
How can I receive SignalR hub messages in Swagger
net 6.0 Web API app with SignalR, and I found a tool which helps me send signalR requests from Swagger, but I can't receive Socket response in swagger. Can you please tell me how can I do that.(I asked for owners of this package and they said that this package doesn't support this feature)
Package URL : https://github.com/essencebit/SignalRSwaggerGen/wiki

```<code>`    public void ConfigureServices(IServiceCollection services)
        {
            services.AddSignalR(options =>
            {
                options.EnableDetailedErrors = true;
            });
            services.AddControllers();
            services.AddSwaggerGen(c =>
            {
                c.SwaggerDoc("v1", new OpenApiInfo { Title = "Game", Version = "v1" });
                c.AddSignalRSwaggerGen(ssgOption => ssgOption.HubPathFunc = (hubPath) => "/game");
            });

        }    `

`    app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
                endpoints.MapHub<GameHub>("/game", config =>
                {
                    config.Transports = HttpTransportType.WebSockets;

                });
            });

 app.Run(async (context) =>
            {
                var hubConnection = new HubConnectionBuilder().WithUrl($"https://{context.Request.Host.Value}/game{context.Request.QueryString}").WithAutomaticReconnect().Build();
                await hubConnection.StartAsync();
            });   `

</code>```

I want to receive signalR responses in swagger

Body:
net 6.0 Web API app with SignalR, and I found a tool which helps me send signalR requests from Swagger, but I can't receive Socket response in swagger. Can you please tell me how can I do that.(I asked for owners of this package and they said that this package doesn't support this feature)
Package URL : https://github.com/essencebit/SignalRSwaggerGen/wiki

`    public void ConfigureServices(IServiceCollection services)
        {
            services.AddSignalR(options =>
            {
                options.EnableDetailedErrors = true;
            });
            services.AddControllers();
            services.AddSwaggerGen(c =>
            {
                c.SwaggerDoc("v1", new OpenApiInfo { Title = "Game", Version = "v1" });
                c.AddSignalRSwaggerGen(ssgOption => ssgOption.HubPathFunc = (hubPath) => "/game");
            });

        }    `

`    app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
                endpoints.MapHub<GameHub>("/game", config =>
                {
                    config.Transports = HttpTransportType.WebSockets;

                });
            });

 app.Run(async (context) =>
            {
                var hubConnection = new HubConnectionBuilder().WithUrl($"https://{context.Request.Host.Value}/game{context.Request.QueryString}").WithAutomaticReconnect().Build();
                await hubConnection.StartAsync();
            });   `

I want to receive signalR responses in swagger


问:
Make samba share not public
I have a public share that I can write to without username and password.
But I try to make it private and can't figure out how to.
Here is smb.conf:

```<code>[global]
   workgroup = WORKGROUP

   server string = RankzyServer

   panic action = /usr/share/samba/panic-action %d

   server role = standalone server

   obey pam restrictions = yes

   unix password sync = yes

   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

   pam password change = yes

   map to guest = Bad User

   security = user

# COCKPIT ZFS MANAGER
# WARNING: DO NOT EDIT, AUTO-GENERATED CONFIGURATION
    include = /etc/cockpit/zfs/shares.conf

[data1]
   path = /data1
   public = yes
   writeable = yes
   force user = root
</code>```

I tried:

```<code>[data1]
   path = /data1
   public = no
   writeable = yes
   force user = root
   valid users = rankzy
</code>```
```<code>[data1]
   path = /data1
   public = no
   writeable = yes
   force user = root
   read list = rankzy
   write list = rankzy
</code>```

For both i get

'You do not have permission to access \IP\data1. Contact your network administrator to request access.'

Title: Make samba share not public

Body:
I have a public share that I can write to without username and password.
But I try to make it private and can't figure out how to.
Here is smb.conf:

[global]
   workgroup = WORKGROUP

   server string = RankzyServer

   panic action = /usr/share/samba/panic-action %d

   server role = standalone server

   obey pam restrictions = yes

   unix password sync = yes

   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

   pam password change = yes

   map to guest = Bad User

   security = user

# COCKPIT ZFS MANAGER
# WARNING: DO NOT EDIT, AUTO-GENERATED CONFIGURATION
    include = /etc/cockpit/zfs/shares.conf

[data1]
   path = /data1
   public = yes
   writeable = yes
   force user = root

I tried:

[data1]
   path = /data1
   public = no
   writeable = yes
   force user = root
   valid users = rankzy

[data1]
   path = /data1
   public = no
   writeable = yes
   force user = root
   read list = rankzy
   write list = rankzy

For both i get

'You do not have permission to access \IP\data1. Contact your network administrator to request access.'


问:
Basic cypress example is aborted after page visit
My basic test is aborted after the reddit page is visited.
Could you tell me how to keep the log window open?

cy.wait() is also not working. Could you tell me why?

```<code>/// <reference types="cypress" />

describe('My First Test', () => {
  it('Does not do much!', () => {
    expect(true).to.equal(true)

    cy.visit('www.reddit.com')
    cy.url().contains('reddit')
    cy.wait(10000)
    cy.log("hello")
    cy.wait(10000)
  })
})
</code>```

Body:
My basic test is aborted after the reddit page is visited.
Could you tell me how to keep the log window open?

cy.wait() is also not working. Could you tell me why?

/// <reference types="cypress" />

describe('My First Test', () => {
  it('Does not do much!', () => {
    expect(true).to.equal(true)

    cy.visit('www.reddit.com')
    cy.url().contains('reddit')
    cy.wait(10000)
    cy.log("hello")
    cy.wait(10000)
  })
})


问:
Problem Finding Differences Between Objetcs
I'm a python self student in early stages of my process. I've decided to write a code that does some reverse-engineering on Adobe Premiere's PRPROJ files. This files are gzipped XMLs, and I've managed to parse it and extract most of the attributes I've wanted to and store them in objects. I've later found out what I'm trying to do is kind of an Open Source API to read PRPROJ files. I might learn something in the way and have a lot lo learn yet, so thanks for your patience.

Now, when trying to find what the inner timecodes of Audio Clips in timelines are, I've couldn't find the right criteria to distinguish between them in the XML Code. Premiere seems to know the difference between them and I can't find find it.

My first hypothesis was the difference was about audios having embed timecode or not. My second was file formats —WAVs, AIFFs, mp3 etc— and now I'm in total blank.

Audio clips in timelines are a result of the XML different objects combined in this way:

Object Structure in XML

So I've made this Premiere Project containing different kind of Audio Clips and tried different codes to actually retrieve In and Out points for the audio selection.

Representation of Timeline and Clip's in and outs

I've managed to successfully retrieve 3 of 4 inPoints and OutPoints, resulting of the adding of XMLs object's inPoint + MediaInPoints and OutPoint + MediaOutPoints properly divided by the MediaFrameRate attribute corresponding (for some reason for me still unknown, some kinds use the clip MediaFrame attributes, other uses ProjectSettings' MediaFrame attribute)

**Sample 1 (.mov's audio coming from video file)
**

```<code><MediaInPoint>0</MediaInPoint>
<MediaOutPoint>23843635200000</MediaOutPoint>
<MediaFrameRate>4233600000</MediaFrameRate>
</code>```

And was successfully calculated this way:

```<code>cframerate = int(clip_loggings.find('MediaFrameRate').text)
cinpoint = int(clip_loggings.find('MediaInPoint').text)
cinpoint = round((media_outpoint / cframerate))

</code>```
```<code>clip_timecode_in = round((clip_timecode_in / cframerate)) + cinpoint
clip_timecode_out = round((clip_timecode_out - 1) / cframerate) + cinpoint - 1
</code>```

**Sample 2 (mp3 file, this particular file I found it sourced its time code from Project's)
**

```<code><MediaInPoint>0</MediaInPoint>
<MediaOutPoint>52835328000000</MediaOutPoint>
<MediaFrameRate>5760000</MediaFrameRate>

VideoSettings' <FrameRate>8475667200</FrameRate>
</code>```
```<code>proj_fr_ref = root.find('ProjectSettings/VideoSettings').get('ObjectRef')
cinpoint = int(clip_loggings.find('MediaInPoint').text)
cinpoint = round((media_outpoint / cframerate))

for proj_frs in root.findall ('VideoSettings'):
    if proj_frs.get('ObjectID') == proj_fr_ref:
        if clip_speed > 0:
            cframerate = int(proj_frs.find('FrameRate').text)
            clip_timecode_in = round((clip_timecode_in) / cframerate) + cinpoint # Seems to be linked to Project's VideoSetting's FrameRate, Why???
            clip_timecode_out = round((clip_timecode_out - 1)/ cframerate) + cinpoint - 1

</code>```

**Sample 3 (WAV file, '2000'is a factor I found empirically)
**

```<code><MediaInPoint>472035821292000</MediaInPoint>
<MediaOutPoint>8715173208084000</MediaOutPoint>
<MediaFrameRate>5292000</MediaFrameRate>
<TimecodeFormat>200</TimecodeFormat>
</code>```
```<code>cinpoint = int(clip_loggings.find('MediaInPoint').text)
cinpoint = round((media_outpoint / media_framerate / 2000))
clip_timecode_in = round((clip_timecode_in / cframerate / 2000)) + cinpoint
clip_timecode_out = round((clip_timecode_out - 1) / cframerate / 2000) + cinpoint - 1
</code>```

**Sample 4 (Criteria Pending)
**

```<code><CaptureMode>1</CaptureMode>
<ClipName>Sample 4.wav</ClipName>
<MediaInPoint>0</MediaInPoint>
<MediaOutPoint>186823687680000</MediaOutPoint>
<MediaFrameRate>5292000</MediaFrameRate>
<TimecodeFormat>200</TimecodeFormat>
</code>```

The last, second WAV, Sample 4, I couldnt make it work, and made me realize my criteria was wrong. What Could it Be?

Please Help me! Complete information needed is uploaded to a Google Drive and is here: https://drive.google.com/drive/folders/1zbK42WFh4SN-8-ppo7QMSkTsXlZEv9MB

Body:
I'm a python self student in early stages of my process. I've decided to write a code that does some reverse-engineering on Adobe Premiere's PRPROJ files. This files are gzipped XMLs, and I've managed to parse it and extract most of the attributes I've wanted to and store them in objects. I've later found out what I'm trying to do is kind of an Open Source API to read PRPROJ files. I might learn something in the way and have a lot lo learn yet, so thanks for your patience.

Now, when trying to find what the inner timecodes of Audio Clips in timelines are, I've couldn't find the right criteria to distinguish between them in the XML Code. Premiere seems to know the difference between them and I can't find find it.

My first hypothesis was the difference was about audios having embed timecode or not. My second was file formats —WAVs, AIFFs, mp3 etc— and now I'm in total blank.

Audio clips in timelines are a result of the XML different objects combined in this way:

Object Structure in XML

So I've made this Premiere Project containing different kind of Audio Clips and tried different codes to actually retrieve In and Out points for the audio selection.

Representation of Timeline and Clip's in and outs

I've managed to successfully retrieve 3 of 4 inPoints and OutPoints, resulting of the adding of XMLs object's inPoint + MediaInPoints and OutPoint + MediaOutPoints properly divided by the MediaFrameRate attribute corresponding (for some reason for me still unknown, some kinds use the clip MediaFrame attributes, other uses ProjectSettings' MediaFrame attribute)

**Sample 1 (.mov's audio coming from video file)
**

<MediaInPoint>0</MediaInPoint>
<MediaOutPoint>23843635200000</MediaOutPoint>
<MediaFrameRate>4233600000</MediaFrameRate>

And was successfully calculated this way:

cframerate = int(clip_loggings.find('MediaFrameRate').text)
cinpoint = int(clip_loggings.find('MediaInPoint').text)
cinpoint = round((media_outpoint / cframerate))

clip_timecode_in = round((clip_timecode_in / cframerate)) + cinpoint
clip_timecode_out = round((clip_timecode_out - 1) / cframerate) + cinpoint - 1

**Sample 2 (mp3 file, this particular file I found it sourced its time code from Project's)
**

<MediaInPoint>0</MediaInPoint>
<MediaOutPoint>52835328000000</MediaOutPoint>
<MediaFrameRate>5760000</MediaFrameRate>

VideoSettings' <FrameRate>8475667200</FrameRate>

proj_fr_ref = root.find('ProjectSettings/VideoSettings').get('ObjectRef')
cinpoint = int(clip_loggings.find('MediaInPoint').text)
cinpoint = round((media_outpoint / cframerate))

for proj_frs in root.findall ('VideoSettings'):
    if proj_frs.get('ObjectID') == proj_fr_ref:
        if clip_speed > 0:
            cframerate = int(proj_frs.find('FrameRate').text)
            clip_timecode_in = round((clip_timecode_in) / cframerate) + cinpoint # Seems to be linked to Project's VideoSetting's FrameRate, Why???
            clip_timecode_out = round((clip_timecode_out - 1)/ cframerate) + cinpoint - 1

**Sample 3 (WAV file, '2000'is a factor I found empirically)
**

<MediaInPoint>472035821292000</MediaInPoint>
<MediaOutPoint>8715173208084000</MediaOutPoint>
<MediaFrameRate>5292000</MediaFrameRate>
<TimecodeFormat>200</TimecodeFormat>

cinpoint = int(clip_loggings.find('MediaInPoint').text)
cinpoint = round((media_outpoint / media_framerate / 2000))
clip_timecode_in = round((clip_timecode_in / cframerate / 2000)) + cinpoint
clip_timecode_out = round((clip_timecode_out - 1) / cframerate / 2000) + cinpoint - 1

**Sample 4 (Criteria Pending)
**

<CaptureMode>1</CaptureMode>
<ClipName>Sample 4.wav</ClipName>
<MediaInPoint>0</MediaInPoint>
<MediaOutPoint>186823687680000</MediaOutPoint>
<MediaFrameRate>5292000</MediaFrameRate>
<TimecodeFormat>200</TimecodeFormat>

The last, second WAV, Sample 4, I couldnt make it work, and made me realize my criteria was wrong. What Could it Be?

Please Help me! Complete information needed is uploaded to a Google Drive and is here: https://drive.google.com/drive/folders/1zbK42WFh4SN-8-ppo7QMSkTsXlZEv9MB


问:
Creating columns(hdr_id) from record header to details record in pyspark
Need to add hdr_id(substring of the header record) from header to the subsequent detail records in Pyspark. The source data is a raw text column(value).</p>
```<code>source:
value
4445 14-APR-2022
(2):12
(3):test1
(4):01.01.2022
1114 14-APR-2022
(a):10
(b):2222
(e):01.01.2022
(d):abc
111 14-APR-2022
(2):12
(3):test3
(4):01.01.2022
</code>```
```<code>code :
df1 = (df
            .withColumn('value',F.split(F.col('value'),':'))
            .withColumn('tag',F.regexp_replace(F.col('value')[0],'\(|\)',''))
            .withColumn('tag',F.regexp_replace(F.col('tag'),'\.| +','_'))
            .withColumn('tag_text',F.col('value')[1]))
</code>```
```<code>Expected output:
output:
value                 hdr_id
4445 14-APR-2022      4445
(2):12                4445
(3):test1             4445
(4):01.01.2022        4445
1114 14-APR-2022      1114
(a):10                1114
(b):14851             1114
(e):01.01.2022        1114
(d):abc               1114
1112 14-APR-2022      1112
(2):12                1112
(3):test3             1112
(4):01.01.2022        1112
</code>```

Body:
Need to add hdr_id(substring of the header record) from header to the subsequent detail records in Pyspark. The source data is a raw text column(value).

source:
value
4445 14-APR-2022
(2):12
(3):test1
(4):01.01.2022
1114 14-APR-2022
(a):10
(b):2222
(e):01.01.2022
(d):abc
111 14-APR-2022
(2):12
(3):test3
(4):01.01.2022

code :
df1 = (df
            .withColumn('value',F.split(F.col('value'),':'))
            .withColumn('tag',F.regexp_replace(F.col('value')[0],'\(|\)',''))
            .withColumn('tag',F.regexp_replace(F.col('tag'),'\.| +','_'))
            .withColumn('tag_text',F.col('value')[1]))

Expected output:
output:
value                 hdr_id
4445 14-APR-2022      4445
(2):12                4445
(3):test1             4445
(4):01.01.2022        4445
1114 14-APR-2022      1114
(a):10                1114
(b):14851             1114
(e):01.01.2022        1114
(d):abc               1114
1112 14-APR-2022      1112
(2):12                1112
(3):test3             1112
(4):01.01.2022        1112


问:
Localization Flutter problem with Material Date Picker on Android
I'm trying to make my Flutter app use multiple languages, and especially Calendar (Material Date Picker). It should work like this: if the device’s first language is available in the App, use it language in the App. As Android could have a list of user languages in Settings, it should look if the next language available in the App and so on. If there are no such languages, use English as default. On my Android Emulator I now have two languages (Polish and German).

In my App I only have English, German and Italian. As my App doesn’t have Polish, my native Material Date Picker should be in German (because it’s the next available language that my App supports).
Unfortunately its only partially the case.

The part above (Fr., 9. Dez.) is in German. The part below is in Polish.
I need it to be completely in German in this case.

My pubspec.yaml file:

```<code>dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  intl: ^0.17.0
flutter:
  uses-material-design: true
</code>```

My locales_config.xml:

```<code><?xml version="1.0" encoding="utf-8"?>
<locale-config xmlns:android="http://schemas.android.com/apk/res/android">
   <locale android:name="en"/>
   <locale android:name="de"/>
   <locale android:name="it"/>
</locale-config>
</code>```

My build.gradle:

```<code>defaultConfig {
 resConfigs ("en", "de", "it")
}
</code>```

My main.dart:

```<code>class App extends StatelessWidget {
  const App({Key? key}) : super(key: key);

  static const supportedLanguages = [
    Locale('en', 'US'),
    Locale('de', 'DE'),
    Locale('it‘, 'IT'),
  ];

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      localizationsDelegates: const [
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
        GlobalCupertinoLocalizations.delegate,
      ],
      supportedLocales: supportedLanguages,
      localeListResolutionCallback: ((locales, supportedLocales) {
        for (Locale locale in locales!) {
          // if device language is supported by the app,
          // just return it to set it as current app language
          if (supportedLocales.contains(locale)) {
            return locale;
          }
        }
        return const Locale('en', 'US');
      }),
      home: BlocProvider(
        create: (BuildContext context) => sl<WebviewBloc>(),
        child: const Root(),
      ),
    );
  }
}
</code>```

All the logs are showing that the app is running in German as it should be. But the Calendar is partly in German and partly in Polish.

Body:
I'm trying to make my Flutter app use multiple languages, and especially Calendar (Material Date Picker). It should work like this: if the device’s first language is available in the App, use it language in the App. As Android could have a list of user languages in Settings, it should look if the next language available in the App and so on. If there are no such languages, use English as default. On my Android Emulator I now have two languages (Polish and German).

In my App I only have English, German and Italian. As my App doesn’t have Polish, my native Material Date Picker should be in German (because it’s the next available language that my App supports).
Unfortunately its only partially the case.

The part above (Fr., 9. Dez.) is in German. The part below is in Polish.
I need it to be completely in German in this case.

My pubspec.yaml file:

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  intl: ^0.17.0
flutter:
  uses-material-design: true

My locales_config.xml:

<?xml version="1.0" encoding="utf-8"?>
<locale-config xmlns:android="http://schemas.android.com/apk/res/android">
   <locale android:name="en"/>
   <locale android:name="de"/>
   <locale android:name="it"/>
</locale-config>

My build.gradle:

defaultConfig {
 resConfigs ("en", "de", "it")
}

My main.dart:

class App extends StatelessWidget {
  const App({Key? key}) : super(key: key);

  static const supportedLanguages = [
    Locale('en', 'US'),
    Locale('de', 'DE'),
    Locale('it‘, 'IT'),
  ];

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      localizationsDelegates: const [
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
        GlobalCupertinoLocalizations.delegate,
      ],
      supportedLocales: supportedLanguages,
      localeListResolutionCallback: ((locales, supportedLocales) {
        for (Locale locale in locales!) {
          // if device language is supported by the app,
          // just return it to set it as current app language
          if (supportedLocales.contains(locale)) {
            return locale;
          }
        }
        return const Locale('en', 'US');
      }),
      home: BlocProvider(
        create: (BuildContext context) => sl<WebviewBloc>(),
        child: const Root(),
      ),
    );
  }
}

All the logs are showing that the app is running in German as it should be. But the Calendar is partly in German and partly in Polish.


问:
Internet Explorer problem with long file names in input type=file
My QA tester is running long filename use cases through our application and ran into unexpected behavior in Internet Explorer 8 (shocking, I know...).

The filename including path is 258 characters long. In Firefox/Chrom/Safari, the filepath and/or name displays as expected. In IE, the filepath/name doesn't display at all.

I've been googling all morning and haven't found anything close to related to this issue. If we go over 260 characters, we get IE's invalid file name error.

I'd post code, but at this point it's an HTML input issue, so the code is:

```<code><input type="file" name="myUploadField" />
</code>```

ContentLicense: CC BY-SA 3.0

Body:
My QA tester is running long filename use cases through our application and ran into unexpected behavior in Internet Explorer 8 (shocking, I know...).

The filename including path is 258 characters long. In Firefox/Chrom/Safari, the filepath and/or name displays as expected. In IE, the filepath/name doesn't display at all.

I've been googling all morning and haven't found anything close to related to this issue. If we go over 260 characters, we get IE's invalid file name error.

I'd post code, but at this point it's an HTML input issue, so the code is:

<input type="file" name="myUploadField" />


问:
Permission error when trying to connect to MySQL DB using CGI Script
Little background, I'm running a small CGI script with Python that takes form value and inserts it into MySQL Database.  I run my own Apache (httpd) server with MySQL.  Here is my connection argument:

```<code>import mysql
import mysql.connector
conn = mysql.connector.connect(user='xxxx', password='xxxx', host='localhost', port='3306', database='DID_MASTER')

if conn:
    print("connected successfully")
else:
    print("connection not established")
</code>```

And here is the error I'm getting:

```<code>Traceback (most recent call last):
  File "/var/www/html/getData.py", line 11, in <module>
    conn = mysql.connector.connect(user='xxxx', password='xxxx', host='localhost', database='DID_MASTER')
  File "/usr/local/lib/python3.6/site-packages/mysql/connector/pooling.py", line 287, in connect
    return MySQLConnection(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/mysql/connector/connection.py", line 137, in __init__
    self.connect(**kwargs)
  File "/usr/local/lib/python3.6/site-packages/mysql/connector/abstracts.py", line 1108, in connect
    self._open_connection()
  File "/usr/local/lib/python3.6/site-packages/mysql/connector/connection.py", line 533, in _open_connection
    self._socket.open_connection()
  File "/usr/local/lib/python3.6/site-packages/mysql/connector/network.py", line 576, in open_connection
    ) from err
mysql.connector.errors.InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306' (13 Permission denied)
[Fri Dec 09 08:47:36.304380 2022] [core:error] [pid 4890:tid 139695883282176] (104)Connection reset by peer: [client 172.16.19.65:59261] AH00574: ap_content_length_filter: apr_bucket_read() failed, referer: http://10.143.110.70/user_add.html
[root@localhost html]#
</code>```

Not sure how this is permission issue because I've opened up the firewall for SQL connection and I have no issues accessing the DB from the outside.

Body:
Little background, I'm running a small CGI script with Python that takes form value and inserts it into MySQL Database.  I run my own Apache (httpd) server with MySQL.  Here is my connection argument:

import mysql
import mysql.connector
conn = mysql.connector.connect(user='xxxx', password='xxxx', host='localhost', port='3306', database='DID_MASTER')

if conn:
    print("connected successfully")
else:
    print("connection not established")

And here is the error I'm getting:

Traceback (most recent call last):
  File "/var/www/html/getData.py", line 11, in <module>
    conn = mysql.connector.connect(user='xxxx', password='xxxx', host='localhost', database='DID_MASTER')
  File "/usr/local/lib/python3.6/site-packages/mysql/connector/pooling.py", line 287, in connect
    return MySQLConnection(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/mysql/connector/connection.py", line 137, in __init__
    self.connect(**kwargs)
  File "/usr/local/lib/python3.6/site-packages/mysql/connector/abstracts.py", line 1108, in connect
    self._open_connection()
  File "/usr/local/lib/python3.6/site-packages/mysql/connector/connection.py", line 533, in _open_connection
    self._socket.open_connection()
  File "/usr/local/lib/python3.6/site-packages/mysql/connector/network.py", line 576, in open_connection
    ) from err
mysql.connector.errors.InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306' (13 Permission denied)
[Fri Dec 09 08:47:36.304380 2022] [core:error] [pid 4890:tid 139695883282176] (104)Connection reset by peer: [client 172.16.19.65:59261] AH00574: ap_content_length_filter: apr_bucket_read() failed, referer: http://10.143.110.70/user_add.html
[root@localhost html]#

Not sure how this is permission issue because I've opened up the firewall for SQL connection and I have no issues accessing the DB from the outside.


问:
how to get data between two date filtering user wise which user is logged in already using php?
my database two table image
user table
all data store table

user interface after login
working area
data filtering page

I want to After logged in each user they only can see their entered data and they can print their entered data by between two date filter.

This is the page that I want to retrieve data by logged userwise...who already login
print page

#this code for data filtering page

I want to fetch data printing page that I want fetch data between two date filtering userwise who already logged in using php and mysql.

Code Link : https://github.com/Mithun-Miah/stack-overflow-help.git


问:
How do I do Authentication flow with react-navigation that keeps the last page state?
In short, I am trying to find a proper way of doing an authentication flow with multiple screens for each set.  However, one feature I would want it to have is on Expo reload it returns to the current page state using the state that has been persisted in AsyncStorage using state persistence.

If you look at the tab navigator template from Expo and add the persist storage then changes to higher elements would restore to the same tab that was last visited.  I want to keep that behaviour since I have an app screen structure that has stack navigators on top of a tab navigator.  That is...

```<code><NativeStackNavigator>
  <BottomTabNavigator>
    <Screen>
      <StackNavigator>
        <Screen />
         ...
      </StackNavigator>
    </Screen>
    <Screen>
      <StackNavigator>
        <Screen />
         ...
      </StackNavigator>
    </Screen>
  </BottomTabNavigator>
  <Group modals="">...</Group>
</NativeStackNavigator>
</code>```

So sometimes if you're working on a nested screen if there is a reload it will bring you back to the initial screen.

(I know this only applies to development, just trying to make the DX a little bit better so they don't have to renavigate to the screen they are working on if they wanted to add additional state to a higher level context).

What I've checked so far:

Related:

Authentication flows | React Navigation v6 seems related but I can't really understand what's going on, but it was self-answered.

I'm not doing deep linking at least not to my knowledge.  So these two don't really apply

Nested react-navigation deep-linking with expo react native

React-navigation: Deep linking with authentication

History

I'm looking at React Navigation authentication flow this was what our app used to have before we changed the navigation structure.

I'm revisiting it again because when we first had the app what we noticed was when there was a "reload" on Expo it kept on bringing us back to the "home" screen of the app rather than where we last were.

Their approach is

```<code>isAuthenticated ? <>
  <Stack.Screen name="HomeScreen" />
  <Stack.Screen name="SecureScreen" />
</> : <>
  <Stack.Screen name="SignInScreen" />
  <Stack.Screen name="SignUpScreen" />
</>
</code>```

What I suspecting happens is since my isAuthenticated is a useState stored in a React.Context way above my tree and React.Context provides a default which is {isAuthenticated: false} much like the another React-Navigation Authentication Flow question. When there's a reload it starts with false and applies the render path and state accordingly.

What I've done so far

Here's conceptually what I've done.  Namely just remove the isAuthenticated check and simplify the whole navigation tree.  But I am not sure if this is the most ideal way of doing it because now everything is intermingled.

```<code><NavigationContainer initialState={...} onStateChange={...}>
  <Stack.Navigator>
    <Stack.Screen name="HomeScreen" />
    <Stack.Screen name="SecureScreen" />
    <Stack.Screen name="SignInScreen" />
    <Stack.Screen name="SignUpScreen" />
  </Stack.Navigator>
</NavigationContainer>
</code>```

What I haven't done but I am thinking of

Have two <NavigationContainer>s each storing it's own persisted state (though authentication likely won't store a state because I always want it to go to the beginning) I am thinking this would work because it will restore the navigation state when the authentication state has been set correctly.  I am also thinking having it done this way will unload all the authentication screen related components from memory including the navigation since it will be no longer be relevant.  I am also thinking the typings would be simplified because the authenticated and non-authenticate won't be intermingled.

Redo what was recommended in React Navigation authentication flow because the hacks I did was when we were still in React Navigation 4 and it's now React Navigation 6 and it may work as is.

Are there any other approach I should consider?

Body:
In short, I am trying to find a proper way of doing an authentication flow with multiple screens for each set.  However, one feature I would want it to have is on Expo reload it returns to the current page state using the state that has been persisted in AsyncStorage using state persistence.

If you look at the tab navigator template from Expo and add the persist storage then changes to higher elements would restore to the same tab that was last visited.  I want to keep that behaviour since I have an app screen structure that has stack navigators on top of a tab navigator.  That is...

<NativeStackNavigator>
  <BottomTabNavigator>
    <Screen>
      <StackNavigator>
        <Screen />
         ...
      </StackNavigator>
    </Screen>
    <Screen>
      <StackNavigator>
        <Screen />
         ...
      </StackNavigator>
    </Screen>
  </BottomTabNavigator>
  <Group modals="">...</Group>
</NativeStackNavigator>

So sometimes if you're working on a nested screen if there is a reload it will bring you back to the initial screen.

(I know this only applies to development, just trying to make the DX a little bit better so they don't have to renavigate to the screen they are working on if they wanted to add additional state to a higher level context).

What I've checked so far:

Related:

Authentication flows | React Navigation v6 seems related but I can't really understand what's going on, but it was self-answered.

I'm not doing deep linking at least not to my knowledge.  So these two don't really apply

Nested react-navigation deep-linking with expo react native

React-navigation: Deep linking with authentication

History

I'm looking at React Navigation authentication flow this was what our app used to have before we changed the navigation structure.

I'm revisiting it again because when we first had the app what we noticed was when there was a "reload" on Expo it kept on bringing us back to the "home" screen of the app rather than where we last were.

Their approach is

isAuthenticated ? <>
  <Stack.Screen name="HomeScreen" />
  <Stack.Screen name="SecureScreen" />
</> : <>
  <Stack.Screen name="SignInScreen" />
  <Stack.Screen name="SignUpScreen" />
</>

What I suspecting happens is since my isAuthenticated is a useState stored in a React.Context way above my tree and React.Context provides a default which is {isAuthenticated: false} much like the another React-Navigation Authentication Flow question. When there's a reload it starts with false and applies the render path and state accordingly.

What I've done so far

Here's conceptually what I've done.  Namely just remove the isAuthenticated check and simplify the whole navigation tree.  But I am not sure if this is the most ideal way of doing it because now everything is intermingled.

<NavigationContainer initialState={...} onStateChange={...}>
  <Stack.Navigator>
    <Stack.Screen name="HomeScreen" />
    <Stack.Screen name="SecureScreen" />
    <Stack.Screen name="SignInScreen" />
    <Stack.Screen name="SignUpScreen" />
  </Stack.Navigator>
</NavigationContainer>

What I haven't done but I am thinking of

Have two <NavigationContainer>s each storing it's own persisted state (though authentication likely won't store a state because I always want it to go to the beginning) I am thinking this would work because it will restore the navigation state when the authentication state has been set correctly.  I am also thinking having it done this way will unload all the authentication screen related components from memory including the navigation since it will be no longer be relevant.  I am also thinking the typings would be simplified because the authenticated and non-authenticate won't be intermingled.

Redo what was recommended in React Navigation authentication flow because the hacks I did was when we were still in React Navigation 4 and it's now React Navigation 6 and it may work as is.

Are there any other approach I should consider?


问:
generate autoincrementing column in firestore
I'm starting to work with flutter and firestore in a simple sales application, for which I need to have a field that increments by one each time a new record is generated, something like an autoincrement in mysql or other relational databases Is there a way to do this in firestore?</p>


问:
Kotlin - error while writing /a/very/long/file/name.class (permission denied) - How can I solve this?
I get this error while building a specific project:

```<code>error while writing /home/myuser/AndroidStudioProjects/WalletConnectKotlinV2/foundation/build/classes/kotlin/main/com/walletconnect/foundation/network/model/RelayDTO_Subscribe_Result_AcknowledgementJsonAdapter$annotationImpl$com_walletconnect_foundation_common_adapters_SubscriptionIdAdapter_Qualifier$0.class (Permission denied)
</code>```

While I ensured chmodding everything properly (yes: ugo+w!!!!!!), I'm still getting the same error. When looking through this link they said this might be related to the file name being too long, and gave what it seems to be something framework-specific to solve it.

This project, in particular, was made by someone else and I just cloned it to try using the related packages (WalletConnect per se is out of the scope of this question, but the project is anyway cloned). I am running the latest Android Studio version (2021.3.1, released few months ago). What can I do to ensure this code actually builds instead of giving me this error?

The gradle file looks like this:

```<code>import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
    id("java-library")
    kotlin("jvm")
    id("com.google.devtools.ksp") version kspVersion
    id("publish-module-java")
}

project.apply {
    extra[KEY_PUBLISH_ARTIFACT_ID] = "foundation"
    extra[KEY_PUBLISH_VERSION] = "1.2.0-SNAPSHOT"
    extra[KEY_SDK_NAME] = "Foundation"
}

java {
    sourceCompatibility = jvmVersion
    targetCompatibility = jvmVersion
}

tasks.withType<KotlinCompile>() {
    kotlinOptions {
        jvmTarget = jvmVersion.toString()
    }
}

tasks.withType<Test>() {
    systemProperty("SDK_VERSION", requireNotNull(project.extra.get(KEY_PUBLISH_VERSION)))
    systemProperty("TEST_RELAY_URL", System.getenv("TEST_RELAY_URL"))
    systemProperty("TEST_PROJECT_ID", System.getenv("TEST_PROJECT_ID"))
}

dependencies {
    scarlet()
    okhttp()
    koinJvm()
    moshi()
    moshiKsp()
    bouncyCastle()
    multibaseJava()
    restEasyJava()

    jUnit5()
    mockk()
}
</code>```

While these (buildSrc) functions look mostly like this:

```<code>// The constants file:
import org.gradle.api.JavaVersion

const val KEY_PUBLISH_VERSION = "PUBLISH_VERSION"
const val KEY_PUBLISH_ARTIFACT_ID = "PUBLISH_ARTIFACT_ID"
const val KEY_SDK_NAME = "SDK_NAME"
const val dokkaVersion = "1.6.21"

const val CORE_VERSION = "1.6.0"
const val BOM_VERSION = "1.0.1"

val jvmVersion = JavaVersion.VERSION_11
const val MIN_SDK: Int = 23
const val TARGET_SDK: Int = 32
const val COMPILE_SDK: Int = TARGET_SDK
const val kotlinVersion = "1.7.10"
const val kspVersion = "1.7.10-1.0.6"

const val sqlDelightVersion = "1.5.2"
const val moshiVersion = "1.13.0"
const val coroutinesVersion = "1.6.4"
const val scarletVersion = "1.0.0"
const val scarletPackage = "com.github.WalletConnect.Scarlet"
const val koinVersion = "3.2.0"
const val mlKitBarcode = "16.0.1"
const val camera2Version = "1.1.0-alpha01"
const val lifecycleVersion = "2.5.1"
const val lifecycleRuntimeKtx = "2.4.1"
const val navVersion = "2.4.1"
const val retrofitVersion = "2.9.0"
const val okhttpVersion = "4.9.0"
const val bouncyCastleVersion = "1.70"
const val sqlCipherVersion = "4.5.0@aar"
const val multibaseVersion = "1.1.0"
const val jUnit5Version = "5.7.2"
const val androidxTestVersion = "1.4.0"
const val robolectricVersion = "4.6"
const val mockkVersion = "1.12.0"
const val jsonVersion = "20220320"
const val timberVersion = "5.0.1"
const val androidSecurityVersion = "1.1.0-alpha03"
const val web3jVersion = "4.9.4"
const val restEasyVersion = "3.15.3.Final"

// The functions file:
import org.gradle.kotlin.dsl.DependencyHandlerScope

fun DependencyHandlerScope.scanner() {
    "implementation"("com.google.mlkit:barcode-scanning:$mlKitBarcode")
    "implementation"("androidx.camera:camera-camera2:$camera2Version")
    "implementation"("androidx.camera:camera-lifecycle:$camera2Version")
    "implementation"("androidx.camera:camera-view:1.0.0-alpha21")
}

fun DependencyHandlerScope.lifecycle() {
    "implementation"("androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion")
    "implementation"("androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion")
    "implementation"("androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleRuntimeKtx")
}

fun DependencyHandlerScope.navigationComponent() {
    "api"("androidx.navigation:navigation-fragment-ktx:$navVersion")
    "api"("androidx.navigation:navigation-ui-ktx:$navVersion")
}

fun DependencyHandlerScope.coroutines() {
    "api"("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
}

fun DependencyHandlerScope.coroutinesTest() {
    "testImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutinesVersion")
}

fun DependencyHandlerScope.scarlet() {
    "api"("$scarletPackage:scarlet:$scarletVersion")
    "api"("$scarletPackage:websocket-okhttp:$scarletVersion")
    "api"("$scarletPackage:stream-adapter-coroutines:$scarletVersion")
    "api"("$scarletPackage:message-adapter-moshi:$scarletVersion")
}

fun DependencyHandlerScope.scarletAndroid() {
    "api"("$scarletPackage:lifecycle-android:$scarletVersion")
}

fun DependencyHandlerScope.scarletTest() {
    "testImplementation"("$scarletPackage:websocket-mockwebserver:$scarletVersion")
    "testImplementation"("$scarletPackage:test-utils:$scarletVersion")
}

fun DependencyHandlerScope.retrofit() {
    "api"("com.squareup.retrofit2:retrofit:$retrofitVersion")
    "api"("com.squareup.retrofit2:converter-moshi:$retrofitVersion")
}

fun DependencyHandlerScope.moshi() {
    "api"("com.squareup.moshi:moshi-adapters:$moshiVersion")
    "api"("com.squareup.moshi:moshi-kotlin:$moshiVersion")
}

fun DependencyHandlerScope.moshiKsp() {
    "ksp"("com.squareup.moshi:moshi-kotlin-codegen:$moshiVersion")
}

fun DependencyHandlerScope.okhttp() {
    "api"(platform("com.squareup.okhttp3:okhttp-bom:$okhttpVersion"))
    "api"("com.squareup.okhttp3:okhttp")
    "api"("com.squareup.okhttp3:logging-interceptor")
}

fun DependencyHandlerScope.bouncyCastle() {
    "api"("org.bouncycastle:bcprov-jdk15on:$bouncyCastleVersion")
}

fun DependencyHandlerScope.sqlDelightAndroid() {
    "api"("com.squareup.sqldelight:android-driver:$sqlDelightVersion")
    "api"("com.squareup.sqldelight:coroutines-extensions-jvm:$sqlDelightVersion")

}

fun DependencyHandlerScope.sqlCipher() {
    "api"("net.zetetic:android-database-sqlcipher:$sqlCipherVersion")
}

fun DependencyHandlerScope.sqlDelightTest() {
    "testImplementation"("com.squareup.sqldelight:sqlite-driver:$sqlDelightVersion")
    "testImplementation"("org.xerial:sqlite-jdbc:3.8.10.2") {
        // Override the version of sqlite used by sqlite-driver to match Android API 23
        version {
            strictly("3.8.10.2")
        }
    }
}

fun DependencyHandlerScope.koinJvm() {
    "implementation"("io.insert-koin:koin-core:$koinVersion")
}

fun DependencyHandlerScope.koinAndroid() {
    "api"("io.insert-koin:koin-android:$koinVersion")
}

fun DependencyHandlerScope.koinTest() {
    "testImplementation"("io.insert-koin:koin-test-junit5:$koinVersion")
}

fun DependencyHandlerScope.glide_N_kapt() {
    "implementation"("com.github.bumptech.glide:glide:4.12.0")
    "kapt"("com.github.bumptech.glide:compiler:4.12.0")
}

fun DependencyHandlerScope.multibaseJava() {
    "api"("com.github.multiformats:java-multibase:$multibaseVersion") //https://mvnrepository.com/artifact/com.github.multiformats/java-multibase/1.1.0 vulnerability detected with library
}

fun DependencyHandlerScope.restEasyJava() {
    "implementation"("org.jboss.resteasy:resteasy-jaxrs:$restEasyVersion")
}

fun DependencyHandlerScope.jUnit5() {
    "testImplementation"(platform("org.junit:junit-bom:$jUnit5Version"))
    "testImplementation"("org.junit.jupiter:junit-jupiter-api:$jUnit5Version")
    "testRuntimeOnly"("org.junit.jupiter:junit-jupiter-engine:$jUnit5Version")
    "testImplementation"("org.jetbrains.kotlin:kotlin-test-junit5:$kotlinVersion")
}

fun DependencyHandlerScope.jUnit5Android() {
    "androidTestImplementation"("org.junit.jupiter:junit-jupiter-api:$jUnit5Version")
    "androidTestImplementation"("de.mannodermaus.junit5:android-test-core:1.3.0")
    "androidTestRuntimeOnly"("de.mannodermaus.junit5:android-test-runner:1.3.0")
}

fun DependencyHandlerScope.androidXTest() {
    "testImplementation"("androidx.test.ext:junit-ktx:1.1.3")
    "testImplementation"("androidx.test:core-ktx:$androidxTestVersion")

    "androidTestImplementation"("androidx.test:core-ktx:$androidxTestVersion")
    "androidTestImplementation"("androidx.test:runner:$androidxTestVersion")
    "androidTestImplementation"("androidx.test:rules:$androidxTestVersion")
}

fun DependencyHandlerScope.robolectric() {
    "testImplementation"("org.robolectric:robolectric:$robolectricVersion")
}

fun DependencyHandlerScope.mockk() {
    "testImplementation"("io.mockk:mockk:$mockkVersion")
}

fun DependencyHandlerScope.testJson() {
    "testImplementation"("org.json:json:$jsonVersion")
}

fun DependencyHandlerScope.timber() {
    "api"("com.jakewharton.timber:timber:$timberVersion")
}

fun DependencyHandlerScope.security() {
    "api"("androidx.security:security-crypto-ktx:$androidSecurityVersion")
}

fun DependencyHandlerScope.web3jCrypto() {
    "api"("org.web3j:crypto:$web3jVersion")
}
</code>```

Body:
I get this error while building a specific project:

error while writing /home/myuser/AndroidStudioProjects/WalletConnectKotlinV2/foundation/build/classes/kotlin/main/com/walletconnect/foundation/network/model/RelayDTO_Subscribe_Result_AcknowledgementJsonAdapter$annotationImpl$com_walletconnect_foundation_common_adapters_SubscriptionIdAdapter_Qualifier$0.class (Permission denied)

While I ensured chmodding everything properly (yes: ugo+w!!!!!!), I'm still getting the same error. When looking through this link they said this might be related to the file name being too long, and gave what it seems to be something framework-specific to solve it.

This project, in particular, was made by someone else and I just cloned it to try using the related packages (WalletConnect per se is out of the scope of this question, but the project is anyway cloned). I am running the latest Android Studio version (2021.3.1, released few months ago). What can I do to ensure this code actually builds instead of giving me this error?

The gradle file looks like this:

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
    id("java-library")
    kotlin("jvm")
    id("com.google.devtools.ksp") version kspVersion
    id("publish-module-java")
}

project.apply {
    extra[KEY_PUBLISH_ARTIFACT_ID] = "foundation"
    extra[KEY_PUBLISH_VERSION] = "1.2.0-SNAPSHOT"
    extra[KEY_SDK_NAME] = "Foundation"
}

java {
    sourceCompatibility = jvmVersion
    targetCompatibility = jvmVersion
}

tasks.withType<KotlinCompile>() {
    kotlinOptions {
        jvmTarget = jvmVersion.toString()
    }
}

tasks.withType<Test>() {
    systemProperty("SDK_VERSION", requireNotNull(project.extra.get(KEY_PUBLISH_VERSION)))
    systemProperty("TEST_RELAY_URL", System.getenv("TEST_RELAY_URL"))
    systemProperty("TEST_PROJECT_ID", System.getenv("TEST_PROJECT_ID"))
}

dependencies {
    scarlet()
    okhttp()
    koinJvm()
    moshi()
    moshiKsp()
    bouncyCastle()
    multibaseJava()
    restEasyJava()

    jUnit5()
    mockk()
}

While these (buildSrc) functions look mostly like this:

// The constants file:
import org.gradle.api.JavaVersion

const val KEY_PUBLISH_VERSION = "PUBLISH_VERSION"
const val KEY_PUBLISH_ARTIFACT_ID = "PUBLISH_ARTIFACT_ID"
const val KEY_SDK_NAME = "SDK_NAME"
const val dokkaVersion = "1.6.21"

const val CORE_VERSION = "1.6.0"
const val BOM_VERSION = "1.0.1"

val jvmVersion = JavaVersion.VERSION_11
const val MIN_SDK: Int = 23
const val TARGET_SDK: Int = 32
const val COMPILE_SDK: Int = TARGET_SDK
const val kotlinVersion = "1.7.10"
const val kspVersion = "1.7.10-1.0.6"

const val sqlDelightVersion = "1.5.2"
const val moshiVersion = "1.13.0"
const val coroutinesVersion = "1.6.4"
const val scarletVersion = "1.0.0"
const val scarletPackage = "com.github.WalletConnect.Scarlet"
const val koinVersion = "3.2.0"
const val mlKitBarcode = "16.0.1"
const val camera2Version = "1.1.0-alpha01"
const val lifecycleVersion = "2.5.1"
const val lifecycleRuntimeKtx = "2.4.1"
const val navVersion = "2.4.1"
const val retrofitVersion = "2.9.0"
const val okhttpVersion = "4.9.0"
const val bouncyCastleVersion = "1.70"
const val sqlCipherVersion = "4.5.0@aar"
const val multibaseVersion = "1.1.0"
const val jUnit5Version = "5.7.2"
const val androidxTestVersion = "1.4.0"
const val robolectricVersion = "4.6"
const val mockkVersion = "1.12.0"
const val jsonVersion = "20220320"
const val timberVersion = "5.0.1"
const val androidSecurityVersion = "1.1.0-alpha03"
const val web3jVersion = "4.9.4"
const val restEasyVersion = "3.15.3.Final"

// The functions file:
import org.gradle.kotlin.dsl.DependencyHandlerScope

fun DependencyHandlerScope.scanner() {
    "implementation"("com.google.mlkit:barcode-scanning:$mlKitBarcode")
    "implementation"("androidx.camera:camera-camera2:$camera2Version")
    "implementation"("androidx.camera:camera-lifecycle:$camera2Version")
    "implementation"("androidx.camera:camera-view:1.0.0-alpha21")
}

fun DependencyHandlerScope.lifecycle() {
    "implementation"("androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion")
    "implementation"("androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion")
    "implementation"("androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleRuntimeKtx")
}

fun DependencyHandlerScope.navigationComponent() {
    "api"("androidx.navigation:navigation-fragment-ktx:$navVersion")
    "api"("androidx.navigation:navigation-ui-ktx:$navVersion")
}

fun DependencyHandlerScope.coroutines() {
    "api"("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
}

fun DependencyHandlerScope.coroutinesTest() {
    "testImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutinesVersion")
}

fun DependencyHandlerScope.scarlet() {
    "api"("$scarletPackage:scarlet:$scarletVersion")
    "api"("$scarletPackage:websocket-okhttp:$scarletVersion")
    "api"("$scarletPackage:stream-adapter-coroutines:$scarletVersion")
    "api"("$scarletPackage:message-adapter-moshi:$scarletVersion")
}

fun DependencyHandlerScope.scarletAndroid() {
    "api"("$scarletPackage:lifecycle-android:$scarletVersion")
}

fun DependencyHandlerScope.scarletTest() {
    "testImplementation"("$scarletPackage:websocket-mockwebserver:$scarletVersion")
    "testImplementation"("$scarletPackage:test-utils:$scarletVersion")
}

fun DependencyHandlerScope.retrofit() {
    "api"("com.squareup.retrofit2:retrofit:$retrofitVersion")
    "api"("com.squareup.retrofit2:converter-moshi:$retrofitVersion")
}

fun DependencyHandlerScope.moshi() {
    "api"("com.squareup.moshi:moshi-adapters:$moshiVersion")
    "api"("com.squareup.moshi:moshi-kotlin:$moshiVersion")
}

fun DependencyHandlerScope.moshiKsp() {
    "ksp"("com.squareup.moshi:moshi-kotlin-codegen:$moshiVersion")
}

fun DependencyHandlerScope.okhttp() {
    "api"(platform("com.squareup.okhttp3:okhttp-bom:$okhttpVersion"))
    "api"("com.squareup.okhttp3:okhttp")
    "api"("com.squareup.okhttp3:logging-interceptor")
}

fun DependencyHandlerScope.bouncyCastle() {
    "api"("org.bouncycastle:bcprov-jdk15on:$bouncyCastleVersion")
}

fun DependencyHandlerScope.sqlDelightAndroid() {
    "api"("com.squareup.sqldelight:android-driver:$sqlDelightVersion")
    "api"("com.squareup.sqldelight:coroutines-extensions-jvm:$sqlDelightVersion")

}

fun DependencyHandlerScope.sqlCipher() {
    "api"("net.zetetic:android-database-sqlcipher:$sqlCipherVersion")
}

fun DependencyHandlerScope.sqlDelightTest() {
    "testImplementation"("com.squareup.sqldelight:sqlite-driver:$sqlDelightVersion")
    "testImplementation"("org.xerial:sqlite-jdbc:3.8.10.2") {
        // Override the version of sqlite used by sqlite-driver to match Android API 23
        version {
            strictly("3.8.10.2")
        }
    }
}

fun DependencyHandlerScope.koinJvm() {
    "implementation"("io.insert-koin:koin-core:$koinVersion")
}

fun DependencyHandlerScope.koinAndroid() {
    "api"("io.insert-koin:koin-android:$koinVersion")
}

fun DependencyHandlerScope.koinTest() {
    "testImplementation"("io.insert-koin:koin-test-junit5:$koinVersion")
}

fun DependencyHandlerScope.glide_N_kapt() {
    "implementation"("com.github.bumptech.glide:glide:4.12.0")
    "kapt"("com.github.bumptech.glide:compiler:4.12.0")
}

fun DependencyHandlerScope.multibaseJava() {
    "api"("com.github.multiformats:java-multibase:$multibaseVersion") //https://mvnrepository.com/artifact/com.github.multiformats/java-multibase/1.1.0 vulnerability detected with library
}

fun DependencyHandlerScope.restEasyJava() {
    "implementation"("org.jboss.resteasy:resteasy-jaxrs:$restEasyVersion")
}

fun DependencyHandlerScope.jUnit5() {
    "testImplementation"(platform("org.junit:junit-bom:$jUnit5Version"))
    "testImplementation"("org.junit.jupiter:junit-jupiter-api:$jUnit5Version")
    "testRuntimeOnly"("org.junit.jupiter:junit-jupiter-engine:$jUnit5Version")
    "testImplementation"("org.jetbrains.kotlin:kotlin-test-junit5:$kotlinVersion")
}

fun DependencyHandlerScope.jUnit5Android() {
    "androidTestImplementation"("org.junit.jupiter:junit-jupiter-api:$jUnit5Version")
    "androidTestImplementation"("de.mannodermaus.junit5:android-test-core:1.3.0")
    "androidTestRuntimeOnly"("de.mannodermaus.junit5:android-test-runner:1.3.0")
}

fun DependencyHandlerScope.androidXTest() {
    "testImplementation"("androidx.test.ext:junit-ktx:1.1.3")
    "testImplementation"("androidx.test:core-ktx:$androidxTestVersion")

    "androidTestImplementation"("androidx.test:core-ktx:$androidxTestVersion")
    "androidTestImplementation"("androidx.test:runner:$androidxTestVersion")
    "androidTestImplementation"("androidx.test:rules:$androidxTestVersion")
}

fun DependencyHandlerScope.robolectric() {
    "testImplementation"("org.robolectric:robolectric:$robolectricVersion")
}

fun DependencyHandlerScope.mockk() {
    "testImplementation"("io.mockk:mockk:$mockkVersion")
}

fun DependencyHandlerScope.testJson() {
    "testImplementation"("org.json:json:$jsonVersion")
}

fun DependencyHandlerScope.timber() {
    "api"("com.jakewharton.timber:timber:$timberVersion")
}

fun DependencyHandlerScope.security() {
    "api"("androidx.security:security-crypto-ktx:$androidSecurityVersion")
}

fun DependencyHandlerScope.web3jCrypto() {
    "api"("org.web3j:crypto:$web3jVersion")
}