问:
Load multiple rda files and keep their names in the global environment in R
I have 24 neural networks (obtained with caret::train(), and I saved all of them in a folder with .rda extension.

```<code>path <- "ann models/"

file_list <- list.files(path) #list of file names

file_list <- paste0(path,file_list) #adding to the file name, the path to get it

 [1] "ann models/ann_canine_1_DC1.rda"     "ann models/ann_canine_12_DC1.rda"
 [3] "ann models/ann_canine_12_DC2.rda"    "ann models/ann_canine_123_DC1.rda"
 [5] "ann models/ann_canine_123_DC2.rda"   "ann models/ann_canine_123_DC3.rda"
 [7] "ann models/ann_incisor_1_DC1.rda"    "ann models/ann_incisor_12_DC1.rda"
 [9] "ann models/ann_incisor_12_DC2.rda"   "ann models/ann_incisor_123_DC1.rda"
[11] "ann models/ann_incisor_123_DC2.rda"  "ann models/ann_incisor_123_DC3.rda"
[13] "ann models/ann_molar_1_DC1.rda"      "ann models/ann_molar_12_DC1.rda"
[15] "ann models/ann_molar_12_DC2.rda"     "ann models/ann_molar_123_DC1.rda"
[17] "ann models/ann_molar_123_DC2.rda"    "ann models/ann_molar_123_DC3.rda"
[19] "ann models/ann_premolar_1_DC1.rda"   "ann models/ann_premolar_12_DC1.rda"
[21] "ann models/ann_premolar_12_DC2.rda"  "ann models/ann_premolar_123_DC1.rda"
[23] "ann models/ann_premolar_123_DC2.rda" "ann models/ann_premolar_123_DC3.rda"
</code>```

To load in the global environment I use readRDS(), and give it a name:

```<code>ann_molar_123_DC3 <- readRDS("ann models/ann_molar_123_DC3.rda")
</code>```

How can I load all of them iteratively keeping the names of the objects in R with the name of file *.rda?

Body:
I have 24 neural networks (obtained with caret::train(), and I saved all of them in a folder with .rda extension.

path <- "ann models/"

file_list <- list.files(path) #list of file names

file_list <- paste0(path,file_list) #adding to the file name, the path to get it

 [1] "ann models/ann_canine_1_DC1.rda"     "ann models/ann_canine_12_DC1.rda"
 [3] "ann models/ann_canine_12_DC2.rda"    "ann models/ann_canine_123_DC1.rda"
 [5] "ann models/ann_canine_123_DC2.rda"   "ann models/ann_canine_123_DC3.rda"
 [7] "ann models/ann_incisor_1_DC1.rda"    "ann models/ann_incisor_12_DC1.rda"
 [9] "ann models/ann_incisor_12_DC2.rda"   "ann models/ann_incisor_123_DC1.rda"
[11] "ann models/ann_incisor_123_DC2.rda"  "ann models/ann_incisor_123_DC3.rda"
[13] "ann models/ann_molar_1_DC1.rda"      "ann models/ann_molar_12_DC1.rda"
[15] "ann models/ann_molar_12_DC2.rda"     "ann models/ann_molar_123_DC1.rda"
[17] "ann models/ann_molar_123_DC2.rda"    "ann models/ann_molar_123_DC3.rda"
[19] "ann models/ann_premolar_1_DC1.rda"   "ann models/ann_premolar_12_DC1.rda"
[21] "ann models/ann_premolar_12_DC2.rda"  "ann models/ann_premolar_123_DC1.rda"
[23] "ann models/ann_premolar_123_DC2.rda" "ann models/ann_premolar_123_DC3.rda"

To load in the global environment I use readRDS(), and give it a name:

ann_molar_123_DC3 <- readRDS("ann models/ann_molar_123_DC3.rda")

How can I load all of them iteratively keeping the names of the objects in R with the name of file *.rda?


来源: stackexchange

问:
when I sort the record in jQuery dataTable. All the record goes disappear from the table, in ASP.NET MVC

I am implementing jQuery dataTable in ASP.NET MVC project. Data is showing in the table based on the item selected in the drop down list.
When we sort the data based on the any column then data in the table goes disappeared or it showing the previous selected item data.
HTML Table
This is HTML Table in which we showing the data

```<code><table class="table table-condensed table-striped table-hover" id="myTable">
        <thead class="bg-primary">
            <tr>
                <th>S.No</th>
                <th width="20%">Name of Air Operator</th>
                <th width="20%">ID</th>
                <th width="20%">Type</th>
                <th>Submitted</th>
                <th>Approved</th>
                <th>Rejected</th>
                <th>Pending</th>

            </tr>
        </thead>
        <tbody id="OpeatatorDetails" class="table-bordered">

        </tbody>
    </table>
</code>```

Dropdown

This is dropdown in which item is binded

```<code><div class="container mt-5" id="operatorwiseContainer">
    <div class="row">
        <div class="col-md">
            <select class="form-control" id="ddlOperatorwise">
                <option value="-1">--Select--</option>
                <option value=""> ALL </option>
            </select>
        </div>
    </div>
</div>
</code>```

onchange event of dropdown

code for onchange event occurs

```<code>
        $('#ddlOperatorwise').change(function () {
            var aopID = $(this).val();
            ShowData(aopID);
        });
</code>```

ShowData code  method to show the data in table

This method call using ajax when drop down item change

```<code>function ShowData(aopID) {
            var aopID = aopID;
            $.ajax({
                type: "GET",
                url: '/t_operation_request/NewAOI',
                dataType: "json",
                contentType: "application/json; charset=utf-8",
                data: { aopID: aopID},
                success: function (data) {
                    $('#OpeatatorDetails').empty();
                    var j = 1;
                    var rows;
                    $.each(data, function (i, item) {

                       rows +="<tr>"
                            + "<td>" + j++ + "</td>"
                            + "<td>" + name + "</td>"
                            + "<td>" + item.id + "</td>"
                            + "<td>" + " " + "</td>"
                            + "<td>" + item.submitted + "</td>"
                            + "<td>" + item.approved + "</td>"
                            + "<td>" + item.rejected + "</td>"
                            + "<td>" + item.pending +"</td>"
                            + "</tr>";

                    });

                    $('#OpeatatorDetails').append(rows);
                    $('#myTable').dataTable();

                },
                error: function () {
                    alert("Something went wrong!");
                }
            });
    }
</code>```

ContentLicense: CC BY-SA 4.0

Body:
I am implementing jQuery dataTable in ASP.NET MVC project. Data is showing in the table based on the item selected in the drop down list.
When we sort the data based on the any column then data in the table goes disappeared or it showing the previous selected item data.
HTML Table
This is HTML Table in which we showing the data

                S.No
                Name of Air Operator
                ID
                Type
                Submitted
                Approved
                Rejected
                Pending

Dropdown

This is dropdown in which item is binded

            <select class="form-control" id="ddlOperatorwise">
                <option value="-1">--Select--</option>
                <option value=""> ALL </option>
            </select>

onchange event of dropdown

code for onchange event occurs

        $('#ddlOperatorwise').change(function () {
            var aopID = $(this).val();
            ShowData(aopID);
        });

ShowData code  method to show the data in table

This method call using ajax when drop down item change

function ShowData(aopID) {
            var aopID = aopID;
            $.ajax({
                type: "GET",
                url: '/t_operation_request/NewAOI',
                dataType: "json",
                contentType: "application/json; charset=utf-8",
                data: { aopID: aopID},
                success: function (data) {
                    $('#OpeatatorDetails').empty();
                    var j = 1;
                    var rows;
                    $.each(data, function (i, item) {

                       rows +="
"
                            + "" + j++ + "	"
                            + "" + name + "	"
                            + "" + item.id + "	"
                            + "" + " " + "	"
                            + "" + item.submitted + "	"
                            + "" + item.approved + "	"
                            + "" + item.rejected + "	"
                            + "" + item.pending +"	"
                            + "
";

                    });

                    $('#OpeatatorDetails').append(rows);
                    $('#myTable').dataTable();

                },
                error: function () {
                    alert("Something went wrong!");
                }
            });
    }


问:
Ubuntu - delete all files from certain date
Trying to remove all packages installed on my Ubuntu after a certain date.

Hi, I've been trying to remove all packages installed on my Ubuntu after a certain date.

I can print the list of all the packages installed by running the following command on terminal:

zgrep 'install ' /var/log/dpkg.log* | sort | cut -f1,2,4 -d' '

and, following some other Stack Overflow questions, I have tried to delete all the packages installed at a certain date by running:

grep "2022-04-18.*.install " /var/log/dpkg.log |

\awk '{ print $4 }' | cut -d: -f1 | xargs sudo apt remove -y

or the ones installed after a certain date:

grep "2022-04-18.*.install " /var/log/dpkg.log | awk '{ print $4 }' | cut -d: -f1

Now, if I list again the packages installed, I still have the ones I supposedly have canceled.

How can I tackle this issue?


问:
Changes are not reflecting in azure app service after deploying via azure devops pipeline
I have a CI/CD pipeline in the Azure DevOps pipeline that deploys the app into the Azure App Service. Both the build and release pipelines are executing without any errors. Before some days, the deployed changes were working fine but now the changes are not reflecting even though the pipeline is executing without any errors.

Release pipeline definition: https://prnt.sc/UE1039_bI6Tz

While analyzing the release pipeline, in the 'Deploy azure app service' task it shows,
Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed

build pipeline debug log file: https://drive.google.com/drive/folders/1ReX_rCuqANfvmFrfHb7es-CiU7GxDEPf?usp=share_link

release pipeline debug log file: https://drive.google.com/file/d/1xrokn_itGWMKqcKRMIRf-OigRhJOHvVp/view?usp=share_link

I checked the artifact created in build pipeline and the changes are there in artifact. But in the release pipeline the changes are not refelected. I checked in the kudu console and the changes are not there also.

When I manually deploy the changes to the app services, they are successfully deployed and the changes are reflected. I don't know what happens behind the scene.

Can anyone please guide me on this? Thanks!

I need the changes to be reflected in the azure app service deployed via the azure DevOps release pipeline.


问:
Notification icon in dark mode
There is a problem with the notification icon in the dark theme in the application on Android 12+. The application was created at Expo (SDK 45). In a light theme, the color is displayed correctly, but in a dark theme, it changes. How to make color not change? Or what is the color changing process?

```<code> minSdkVersion 21
 targetSdkVersion 31
</code>```

The notification icon is set to blue (#192BC2). In a light theme it is displayed correctly, and in a dark theme it turns purple. Setting the color in color.xml (night) didn't help

Title: Notification icon in dark mode

Body:
There is a problem with the notification icon in the dark theme in the application on Android 12+. The application was created at Expo (SDK 45). In a light theme, the color is displayed correctly, but in a dark theme, it changes. How to make color not change? Or what is the color changing process?

 minSdkVersion 21
 targetSdkVersion 31

The notification icon is set to blue (#192BC2). In a light theme it is displayed correctly, and in a dark theme it turns purple. Setting the color in color.xml (night) didn't help


问:
Send unique mails using wp_mail to all subscribers on new post published
In my WordPress v6.1, I have a set of subscribers to whom I want to send a email notification on a new post published.

Using save_post filter, with below code I am trying to send mails to all subscribers:

```<code>// get all subscribers
$subscribers = get_users(array('role__in' => array('subscribers')));

// send mails to each subscriber
foreach ($subscribers as $subscriber) {

    // name and mail
    $name = $subscriber->display_name;
    $email = $subscriber->user_email;

    // mail
    $to[] = sprintf('%s <%s>', $name, $email);
    $subject = 'New post published';
    $headers[] = 'MIME-Version: 1.0';
    $headers[] = 'Content-type: text/html; charset=iso-8859-1';
    $body = 'A new post is published';

    // mail to each subscriber
    wp_mail($to, $subject, $body, $headers);
}
</code>```

The above code does sending emails, but it is sending all emails to all subscribers with all subscribers email address displaying in the to field. The foreach is supposed to send unique emails to each subscribers.

How can I send unique email to each subscriber and only has his/her email address in the to field?

Body:
In my WordPress v6.1, I have a set of subscribers to whom I want to send a email notification on a new post published.

Using save_post filter, with below code I am trying to send mails to all subscribers:

// get all subscribers
$subscribers = get_users(array('role__in' => array('subscribers')));

// send mails to each subscriber
foreach ($subscribers as $subscriber) {

    // name and mail
    $name = $subscriber->display_name;
    $email = $subscriber->user_email;

    // mail
    $to[] = sprintf('%s <%s>', $name, $email);
    $subject = 'New post published';
    $headers[] = 'MIME-Version: 1.0';
    $headers[] = 'Content-type: text/html; charset=iso-8859-1';
    $body = 'A new post is published';

    // mail to each subscriber
    wp_mail($to, $subject, $body, $headers);
}

The above code does sending emails, but it is sending all emails to all subscribers with all subscribers email address displaying in the to field. The foreach is supposed to send unique emails to each subscribers.

How can I send unique email to each subscriber and only has his/her email address in the to field?


问:
renderToString returns empty <svg> applied at react barcode
I want to create a pdf file out of a HTML element containing a react-barcode. I've been having trouble with it and in my testing I got the following code:

```<code>  import Barcode from 'react-barcode';
  import { renderToString } from 'react-dom/server';

  const barElement = (
    <div>
      <Barcode value={'test'} />
    </div>);

  const stringValue = renderToString(barElement);
  console.log(stringValue);
</code>```

where stringValue equals
<svg></svg>
. The Barcode component shows up in my browser fine, but when running renderToString it doesn't work. Does anyone know how to solve this?

Body:
I want to create a pdf file out of a HTML element containing a react-barcode. I've been having trouble with it and in my testing I got the following code:

  import Barcode from 'react-barcode';
  import { renderToString } from 'react-dom/server';

  const barElement = (

      <Barcode value={'test'} />

);

  const stringValue = renderToString(barElement);
  console.log(stringValue);

where stringValue equals
<svg></svg>
. The Barcode component shows up in my browser fine, but when running renderToString it doesn't work. Does anyone know how to solve this?


问:
Loading WFST to Memory Mapped File in Lucene
I'm loading multiple WFST with ~1.1 Gb and the JVM memory increases proportionally. Looks like the file is stored in memory, meaning not using Memory Mapped Files at all.

Example code:

On the following code we setup the Lucene to use /tmp/deleteme2 for the memory mapped file and we load the file from /tmp/deleteme/file.wfst via an InputStream.

After file load I list the files on /tmp/deleteme2 and nothing is found, but I'm able to query the WFST file.

```<code>  @Test
  @SneakyThrows
  void WFSTLoad() throws IOException {
    Path wfstPath = Paths.get("/tmp/deleteme2");
    Path wfstFilePath = Paths.get("/tmp/deleteme/file.wfst");

    var directory = new MMapDirectory(wfstPath);

    WFSTCompletionLookup wfst =
            new WFSTCompletionLookup(directory, "temp");

    try (var is = new FileInputStream(wfstFilePath.toFile())) {
      wfst.load(is);
      System.out.println("FILE LOADED");
    }

    Files.list(wfstPath).forEach(System.out::println);
    System.out.println("FILES LISTED");

    assertThat(wfst.get("qwert123qwert")).isEqualTo(123);
  }
</code>```

What am I doing wrong?

Body:
I'm loading multiple WFST with ~1.1 Gb and the JVM memory increases proportionally. Looks like the file is stored in memory, meaning not using Memory Mapped Files at all.

Example code:

On the following code we setup the Lucene to use /tmp/deleteme2 for the memory mapped file and we load the file from /tmp/deleteme/file.wfst via an InputStream.

After file load I list the files on /tmp/deleteme2 and nothing is found, but I'm able to query the WFST file.

  @Test
  @SneakyThrows
  void WFSTLoad() throws IOException {
    Path wfstPath = Paths.get("/tmp/deleteme2");
    Path wfstFilePath = Paths.get("/tmp/deleteme/file.wfst");

    var directory = new MMapDirectory(wfstPath);

    WFSTCompletionLookup wfst =
            new WFSTCompletionLookup(directory, "temp");

    try (var is = new FileInputStream(wfstFilePath.toFile())) {
      wfst.load(is);
      System.out.println("FILE LOADED");
    }

    Files.list(wfstPath).forEach(System.out::println);
    System.out.println("FILES LISTED");

    assertThat(wfst.get("qwert123qwert")).isEqualTo(123);
  }

What am I doing wrong?


问:
How do I change -webkit-color-swatch properties in JavaScript?
I had to make a costum color picker for work. i used -webkit-color-swatch to change how the color picker looked and I also used it to add a background image over it.

Whenever I click on the ColorPicker the background image should disappear, so you just see your standard color picker. this however does not work.

This is the code I used

JavaScript

document.getElementById("short-text-yk693v5pm").onclick = function() {
    removeColorGradient()
};

function removeColorGradient() {
    document.getElementById("short-text-yk693v5pm").style['-webkit-color-swatch'] = "none";
}
document.getElementById("short-text-yk693v5pm").value = "#FFFFFF";
```
<p>CSS</p>
<pre class="lang-css prettyprint-override"><code>#short-text-yk693v5pm::-webkit-color-swatch {
    border-radius: 10px;
    border: 3px solid white;
    background-image: url(/wp-content/uploads/color-gradient.jpg);
    background-repeat: no-repeat;
    background-size: cover;
}
</code>```

Body:
I had to make a costum color picker for work. i used -webkit-color-swatch to change how the color picker looked and I also used it to add a background image over it.

Whenever I click on the ColorPicker the background image should disappear, so you just see your standard color picker. this however does not work.

This is the code I used

JavaScript

document.getElementById("short-text-yk693v5pm").onclick = function() {
    removeColorGradient()
};

function removeColorGradient() {
    document.getElementById("short-text-yk693v5pm").style['-webkit-color-swatch'] = "none";
}
document.getElementById("short-text-yk693v5pm").value = "#FFFFFF";

CSS

#short-text-yk693v5pm::-webkit-color-swatch {
    border-radius: 10px;
    border: 3px solid white;
    background-image: url(/wp-content/uploads/color-gradient.jpg);
    background-repeat: no-repeat;
    background-size: cover;
}


问:
Why the automated deployment from GitHub to DigitalOcean, will change the image urls in my RubyOnRails app?
I have Ruby On Rails (version 6) app deployed in DigitalOcean, I am using ActionText for the images, the images are stored in DOSpaces.

I display them in the following way in file _blob.html.erb <%= image_tag "https://bucketname.ams3.cdn.digitaloceanspaces.com/#{blob.key}", width:"75%" %>.

So the problem is every time when I push new changes to GH, and automated deployment to DO is finished, the image URLs are changing from https://bucketname.ams3.cdn.digitaloceanspaces.com/eervq9p7jvgib1xv5b3gn3yznw7h

to

https://bucketname.dev/rails/active_storage/blobs/eyJfcmFpbMHiOnsibWVzc2FnZSI6IkJBaHBJdz09IiwiZXhdIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--9583e973a78dfe6588daa5af8c0d4cda5d3c1fa8/3532792.png

When I upload an image from browser it's ok, but after every time I push to GH their URLs are changing and then I got code 404 for all of them.

Do you know why this happens? How can I avoid this from happening and what do you think is the best practice in this sort of situation?

I did change the DigitalOcean(Amazon S3) bucket policy so the images can be publicly visible by default.


问:
How convert object to datetime (data come from Tableau hyper as timestamp)?
I'm using a tableauhyperapi in order to read a hyper file from KNIME Analytics using Python script, everything looks good, but when I tried to convert this data to a panda dataframe and try to show it at KNIME I got this error:
"tableauhyperapi.timestamp.Timestamp" could be found.
Unsupported column type in column: "0", column type: "<class 'tableauhyperapi.timestamp.Timestamp'>".

this is part of the code:

```<code>
</code>```
```<code>        # The table names in the "Extract" schema (the default schema).
      rows_in_table = connection.execute_list_query(query=f"SELECT \"Last Update\" FROM {table_name}")
      rows=rows_in_table
</code>```

df=pd.DataFrame(rows)

output_table=df

```<code>
</code>```

output_table is mandatory variable from KNIME in order to show data.

When I used to covert this column to string I got all the data of data columns in a single cells in KNIME:

enter image description here

I also tried convert this column using:

df[0]=pd.datetime(df[0].astype(str)) but get error: cannot convert the series to <class 'int'>

look at spider and print the data of this column it has coming from tableau like this:

enter image description here

Body:
I'm using a tableauhyperapi in order to read a hyper file from KNIME Analytics using Python script, everything looks good, but when I tried to convert this data to a panda dataframe and try to show it at KNIME I got this error:
"tableauhyperapi.timestamp.Timestamp" could be found.
Unsupported column type in column: "0", column type: "<class 'tableauhyperapi.timestamp.Timestamp'>".

this is part of the code:

        # The table names in the "Extract" schema (the default schema).
      rows_in_table = connection.execute_list_query(query=f"SELECT \"Last Update\" FROM {table_name}")
      rows=rows_in_table

df=pd.DataFrame(rows)

output_table=df

output_table is mandatory variable from KNIME in order to show data.

When I used to covert this column to string I got all the data of data columns in a single cells in KNIME:

enter image description here

I also tried convert this column using:

df[0]=pd.datetime(df[0].astype(str)) but get error: cannot convert the series to <class 'int'>

look at spider and print the data of this column it has coming from tableau like this:

enter image description here


问:
Only One failure msg is displaying for bulk record deletion in dynamics 365 why?
Hi Folks,

```<code>         I have executed bulk record deletion in dynamics 365 and due to behavioral action of those table relationship those records not deleted and shown failure message. my question is there i can see only one msg for one record deletion what happened to the second record deleted on the same bulk delete window?
</code>```

above image you can see 2 failures of records but below image you can get only one failure response for that record

why was this happening? only display for record 001 not 002?

Body:
Hi Folks,

         I have executed bulk record deletion in dynamics 365 and due to behavioral action of those table relationship those records not deleted and shown failure message. my question is there i can see only one msg for one record deletion what happened to the second record deleted on the same bulk delete window?

above image you can see 2 failures of records but below image you can get only one failure response for that record

why was this happening? only display for record 001 not 002?


问:
muy player start/stop video by javascript
I'm embedded my videos with MUX (https://www.mux.com) and the MUX Player.

```<code> <mux-player
    stream-type="on-demand"
    playback-id="xxxxx"
    autoplay
  ></mux-player>
</code>```

the video is playing in an overlay. My problem is now, that if the video is playing and the overlay closed, it still plays. How can I control - by javascript/jquery - this video f.e. I want to stop if the overlay is closed. Does anybody have experience with this player und JS.

thanks for any help

Body:
I'm embedded my videos with MUX (https://www.mux.com) and the MUX Player.

 <mux-player
    stream-type="on-demand"
    playback-id="xxxxx"
    autoplay
  ></mux-player>

the video is playing in an overlay. My problem is now, that if the video is playing and the overlay closed, it still plays. How can I control - by javascript/jquery - this video f.e. I want to stop if the overlay is closed. Does anybody have experience with this player und JS.

thanks for any help


问:
Intermittent org.apache.spark.SparkException: Could not find spark-version-info.properties in K8s
My application uses K8s cronjob to schedule the application run, consequently creating a pod for each occurrence.
In most of the cases, the application runs well, but in some of them, it fails with the following error:

```<code>  java.lang.ExceptionInInitializerError
  2022-12-23T10:45:32.899555393Z    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  2022-12-23T10:45:32.899572625Z    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  2022-12-23T10:45:32.899576309Z    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  2022-12-23T10:45:32.899590250Z    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
  2022-12-23T10:45:32.899601166Z    at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:600)
  2022-12-23T10:45:32.899604720Z    at java.base/java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:678)
  2022-12-23T10:45:32.899608169Z    at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:737)
  2022-12-23T10:45:32.899610934Z    at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:159)
  2022-12-23T10:45:32.899613557Z    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:173)
  2022-12-23T10:45:32.899629628Z    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
  2022-12-23T10:45:32.899633296Z    at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
  2022-12-23T10:45:32.899637988Z    at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:661)
  [...]
  2022-12-23T10:45:32.899959490Z Caused by: java.lang.ExceptionInInitializerError
  2022-12-23T10:45:32.899972035Z    at org.apache.spark.package$.<init>(package.scala:93)
  2022-12-23T10:45:32.899985422Z    at org.apache.spark.package$.<clinit>(package.scala)
  2022-12-23T10:45:32.899990812Z    at org.apache.spark.SparkContext.$anonfun$new$1(SparkContext.scala:183)
  2022-12-23T10:45:32.899996770Z    at org.apache.spark.internal.Logging.logInfo(Logging.scala:54)
  2022-12-23T10:45:32.899998834Z    at org.apache.spark.internal.Logging.logInfo$(Logging.scala:53)
  2022-12-23T10:45:32.900029297Z    at org.apache.spark.SparkContext.logInfo(SparkContext.scala:73)
  2022-12-23T10:45:32.900031985Z    at org.apache.spark.SparkContext.<init>(SparkContext.scala:183)
  2022-12-23T10:45:32.900033999Z    at org.apache.spark.SparkContext$.getOrCreate(SparkContext.scala:2526)
  2022-12-23T10:45:32.900049879Z    at org.apache.spark.sql.SparkSession$Builder.$anonfun$getOrCreate$1(SparkSession.scala:930)
  2022-12-23T10:45:32.900055477Z    at scala.Option.getOrElse(Option.scala:189)
  2022-12-23T10:45:32.900061375Z    at org.apache.spark.sql.SparkSession$Builder.getOrCreate(SparkSession.scala:921)
  [...]
  2022-12-23T10:45:32.900111374Z    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
  2022-12-23T10:45:32.900134359Z    at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
  2022-12-23T10:45:32.900137775Z    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
  2022-12-23T10:45:32.900145849Z    at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290)
  2022-12-23T10:45:32.900159046Z    at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
  2022-12-23T10:45:32.900178955Z    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
  2022-12-23T10:45:32.900183168Z    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
  2022-12-23T10:45:32.900206355Z    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
  2022-12-23T10:45:32.900214981Z    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
  2022-12-23T10:45:32.900227137Z    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
  2022-12-23T10:45:32.900377715Z Caused by: org.apache.spark.SparkException: Could not find spark-version-info.properties
  2022-12-23T10:45:32.900381131Z    at org.apache.spark.package$SparkBuildInfo$.<init>(package.scala:62)
  2022-12-23T10:45:32.900396317Z    at org.apache.spark.package$SparkBuildInfo$.<clinit>(package.scala)
  2022-12-23T10:45:32.900399396Z    ... 25 more
</code>```

How spark sesssion is being build

```<code>lazy val spark: SparkSession = SparkSession.builder
.appName("My application")
.master("local") //Error occur here
.getOrCreate()
</code>```

Spark version: 2.4.8

Scala version: 2.12

Anyone already had a similar problem?

Body:
My application uses K8s cronjob to schedule the application run, consequently creating a pod for each occurrence.
In most of the cases, the application runs well, but in some of them, it fails with the following error:

  java.lang.ExceptionInInitializerError
  2022-12-23T10:45:32.899555393Z    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  2022-12-23T10:45:32.899572625Z    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  2022-12-23T10:45:32.899576309Z    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  2022-12-23T10:45:32.899590250Z    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
  2022-12-23T10:45:32.899601166Z    at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:600)
  2022-12-23T10:45:32.899604720Z    at java.base/java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:678)
  2022-12-23T10:45:32.899608169Z    at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:737)
  2022-12-23T10:45:32.899610934Z    at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:159)
  2022-12-23T10:45:32.899613557Z    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:173)
  2022-12-23T10:45:32.899629628Z    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
  2022-12-23T10:45:32.899633296Z    at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
  2022-12-23T10:45:32.899637988Z    at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:661)
  [...]
  2022-12-23T10:45:32.899959490Z Caused by: java.lang.ExceptionInInitializerError
  2022-12-23T10:45:32.899972035Z    at org.apache.spark.package$.<init>(package.scala:93)
  2022-12-23T10:45:32.899985422Z    at org.apache.spark.package$.<clinit>(package.scala)
  2022-12-23T10:45:32.899990812Z    at org.apache.spark.SparkContext.$anonfun$new$1(SparkContext.scala:183)
  2022-12-23T10:45:32.899996770Z    at org.apache.spark.internal.Logging.logInfo(Logging.scala:54)
  2022-12-23T10:45:32.899998834Z    at org.apache.spark.internal.Logging.logInfo$(Logging.scala:53)
  2022-12-23T10:45:32.900029297Z    at org.apache.spark.SparkContext.logInfo(SparkContext.scala:73)
  2022-12-23T10:45:32.900031985Z    at org.apache.spark.SparkContext.<init>(SparkContext.scala:183)
  2022-12-23T10:45:32.900033999Z    at org.apache.spark.SparkContext$.getOrCreate(SparkContext.scala:2526)
  2022-12-23T10:45:32.900049879Z    at org.apache.spark.sql.SparkSession$Builder.$anonfun$getOrCreate$1(SparkSession.scala:930)
  2022-12-23T10:45:32.900055477Z    at scala.Option.getOrElse(Option.scala:189)
  2022-12-23T10:45:32.900061375Z    at org.apache.spark.sql.SparkSession$Builder.getOrCreate(SparkSession.scala:921)
  [...]
  2022-12-23T10:45:32.900111374Z    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
  2022-12-23T10:45:32.900134359Z    at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
  2022-12-23T10:45:32.900137775Z    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
  2022-12-23T10:45:32.900145849Z    at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290)
  2022-12-23T10:45:32.900159046Z    at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
  2022-12-23T10:45:32.900178955Z    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
  2022-12-23T10:45:32.900183168Z    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
  2022-12-23T10:45:32.900206355Z    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
  2022-12-23T10:45:32.900214981Z    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
  2022-12-23T10:45:32.900227137Z    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
  2022-12-23T10:45:32.900377715Z Caused by: org.apache.spark.SparkException: Could not find spark-version-info.properties
  2022-12-23T10:45:32.900381131Z    at org.apache.spark.package$SparkBuildInfo$.<init>(package.scala:62)
  2022-12-23T10:45:32.900396317Z    at org.apache.spark.package$SparkBuildInfo$.<clinit>(package.scala)
  2022-12-23T10:45:32.900399396Z    ... 25 more

How spark sesssion is being build

lazy val spark: SparkSession = SparkSession.builder
.appName("My application")
.master("local") //Error occur here
.getOrCreate()

Spark version: 2.4.8

Scala version: 2.12

Anyone already had a similar problem?


问:
Eclipse IDE don't import static Mockito method
I write simple test, where is mockito static method like verify, times, any.
And problem next, i can not import this method automatically or click to method and chose Import,
i can only write in the top of my class import static org.mockito.Mockito.verify; or  import static org.mockito.Mockito.test;


问:
Why nest_asyncio makes the asyncio.run not to block the main thread where event loop works in although it is a blocking function?
Consider the follwing program:

```<code>import asyncio
import signal

import nest_asyncio
nest_asyncio.apply()

async_event_obj = asyncio.Event()
shutdown_command_issued = False

async def async_exit_handler():
    await async_event_obj.wait()

def exit_handler(signal, frame):
    global shutdown_command_issued
    shutdown_command_issued = True
    asyncio.run(async_exit_handler())
    quit()

signal.signal(signal.SIGINT, exit_handler)

async def coroutine_one():
    while True:
        if not shutdown_command_issued:
            print('coroutine one works')
            await asyncio.sleep(1)
        else:
            break
    print('Coroutine one finished.')
    async_event_obj.set()

loop = asyncio.new_event_loop()
loop.create_task(coroutine_one())
loop.run_forever()

</code>```

What I have done is: I added a sync signal handler (i.e.: exit_handler) to gently wait for the running tasks to be completed in the only event loop that runs in the main thread. As everybody knows, the asyncio.run is a synchronize blocking function and because it runs in the main thread where all the singal handlers, handle the signal and my event loop runs in, it has to block the main thread and stop other coroutines. But magically, when I use the nest_asyncio module, the asyncio.run function becomes non blocking and other coroutines in the event loop (i.e.: coroutine_one) continue their execution. What nest_asyncio does exactly under the hood? I know that it lets multiple event loops to be run in one single thread but how it makes a blocking function non blocking?

Body:
Consider the follwing program:

import asyncio
import signal

import nest_asyncio
nest_asyncio.apply()

async_event_obj = asyncio.Event()
shutdown_command_issued = False

async def async_exit_handler():
    await async_event_obj.wait()

def exit_handler(signal, frame):
    global shutdown_command_issued
    shutdown_command_issued = True
    asyncio.run(async_exit_handler())
    quit()

signal.signal(signal.SIGINT, exit_handler)

async def coroutine_one():
    while True:
        if not shutdown_command_issued:
            print('coroutine one works')
            await asyncio.sleep(1)
        else:
            break
    print('Coroutine one finished.')
    async_event_obj.set()

loop = asyncio.new_event_loop()
loop.create_task(coroutine_one())
loop.run_forever()

What I have done is: I added a sync signal handler (i.e.: exit_handler) to gently wait for the running tasks to be completed in the only event loop that runs in the main thread. As everybody knows, the asyncio.run is a synchronize blocking function and because it runs in the main thread where all the singal handlers, handle the signal and my event loop runs in, it has to block the main thread and stop other coroutines. But magically, when I use the nest_asyncio module, the asyncio.run function becomes non blocking and other coroutines in the event loop (i.e.: coroutine_one) continue their execution. What nest_asyncio does exactly under the hood? I know that it lets multiple event loops to be run in one single thread but how it makes a blocking function non blocking?


问:
Error: Parse Error: Invalid method encountered (ws)
I've recently had an issue with the ws library in node.js, where i get the HPE_INVALID_METHOD error code. The entire error that is logged while using ws.on("error") is :

```<code>[Error: Parse Error: Invalid method encountered] {
  bytesParsed: 0,
  code: 'HPE_INVALID_METHOD',
  reason: 'Invalid method encountered',
  rawPacket: <Buffer 16 03 01 02 00 01 00 01 fc 03 03 f5 f7 10 84 a8 45 4e df b5 7b 88 09 f5 09 75 ec 28 09 57 08 f4 96 f6 52 96 2e 6d 03 c3 a8 72 bf 20 ad f7 ee 0a d0 f1 ... 467 more bytes>
}
</code>```

I tried to find how to fix it, but I do not know how. Note that the error happens on connection, so I haven't manipulated the wss yet.

Body:
I've recently had an issue with the ws library in node.js, where i get the HPE_INVALID_METHOD error code. The entire error that is logged while using ws.on("error") is :

[Error: Parse Error: Invalid method encountered] {
  bytesParsed: 0,
  code: 'HPE_INVALID_METHOD',
  reason: 'Invalid method encountered',
  rawPacket: <Buffer 16 03 01 02 00 01 00 01 fc 03 03 f5 f7 10 84 a8 45 4e df b5 7b 88 09 f5 09 75 ec 28 09 57 08 f4 96 f6 52 96 2e 6d 03 c3 a8 72 bf 20 ad f7 ee 0a d0 f1 ... 467 more bytes>
}

I tried to find how to fix it, but I do not know how. Note that the error happens on connection, so I haven't manipulated the wss yet.


问:
Not receving notification by onMessage and OnonBackgroundMessage in firebase cloud messaging
I am trying to integrate firebase cloud messaging for notifications, I have added a firebase configure file in App.js and add a service worker (firebase-messaging-sw.js) file in the root (public folder).
while heating an API "https://fcm.googleapis.com/fcm/send", I am getting a message, but it only receives in the background and in the notification, it is not sowing any data, that I have sent by API, It sends just a message "The site has been updated in the background"

file app.js

```<code>const firebaseConfig = {
    apiKey: "AIz.........................",
    authDomain: "firebase project",
    projectId: "projectId......",
    storageBucket: "storageBucket........",
    messagingSenderId: "5487851245788....",
    appId: "546497946497995....",
    measurementId: "D-54646464646446",
};
const app = initializeApp(firebaseConfig);
const messaging = getMessaging(app);
console.log("messaging: ", messaging)

const VapidKey = "BK08o6mE9WMPK5Wovhkn-..............."

const subscribe = () => {
    Notification.requestPermission().then((permission) => {
        console.log("permission: ", permission);

        if (permission === "granted") {
            firebaseToken(messaging, { vapidKey: VapidKey }).then((currentToken) => {
                console.log("CurrentToken firebase: ", currentToken);
                storeFirebaseToken(currentToken)

            }).catch((err) => {
                console.log("err: ", err)
            })

        }
    })
}

useEffect(() => {

    subscribe();
}, [])
</code>```

file firebase-messaging-sw.js

```<code>import { initializeApp } from "firebase/app";
import { getMessaging,  onMessage} from "firebase/messaging/sw";
import { onBackgroundMessage } from "firebase/messaging/sw";

  const firebaseConfig = {
    apiKey: "AIz.........................",
    authDomain: "firebase project",
    projectId: "projectId......",
    storageBucket: "storageBucket........",
    messagingSenderId: "5487851245788....",
    appId: "546497946497995....",
    measurementId: "D-54646464646446",
  };

const app = initializeApp(firebaseConfig);
const messaging = getMessaging(app);

onBackgroundMessage(messaging, (payload) => {
    console.log('[firebase-messaging-sw.js] Received background message ', payload);
    // Customize notification here
    const notificationTitle = 'Background Message Title';
    const notificationOptions = {
        body: 'Background Message body.',
        icon: '/firebase-logo.png'
    };

    // self.registration.showNotification(notificationTitle,
    //     notificationOptions);
});

onMessage(messaging, (payload) => {
    console.log('Message received. ', payload);
    // ...
});
</code>```

I have added Onmessage and background methods in firebase-messaging-sw.js file, but I am not getting in that method,
I am expecting to receive a notification with title and icon and want to implement a click function on that

Body:
I am trying to integrate firebase cloud messaging for notifications, I have added a firebase configure file in App.js and add a service worker (firebase-messaging-sw.js) file in the root (public folder).
while heating an API "https://fcm.googleapis.com/fcm/send", I am getting a message, but it only receives in the background and in the notification, it is not sowing any data, that I have sent by API, It sends just a message "The site has been updated in the background"

file app.js

const firebaseConfig = {
    apiKey: "AIz.........................",
    authDomain: "firebase project",
    projectId: "projectId......",
    storageBucket: "storageBucket........",
    messagingSenderId: "5487851245788....",
    appId: "546497946497995....",
    measurementId: "D-54646464646446",
};
const app = initializeApp(firebaseConfig);
const messaging = getMessaging(app);
console.log("messaging: ", messaging)

const VapidKey = "BK08o6mE9WMPK5Wovhkn-..............."

const subscribe = () => {
    Notification.requestPermission().then((permission) => {
        console.log("permission: ", permission);

        if (permission === "granted") {
            firebaseToken(messaging, { vapidKey: VapidKey }).then((currentToken) => {
                console.log("CurrentToken firebase: ", currentToken);
                storeFirebaseToken(currentToken)

            }).catch((err) => {
                console.log("err: ", err)
            })

        }
    })
}

useEffect(() => {

    subscribe();
}, [])

file firebase-messaging-sw.js

import { initializeApp } from "firebase/app";
import { getMessaging,  onMessage} from "firebase/messaging/sw";
import { onBackgroundMessage } from "firebase/messaging/sw";

  const firebaseConfig = {
    apiKey: "AIz.........................",
    authDomain: "firebase project",
    projectId: "projectId......",
    storageBucket: "storageBucket........",
    messagingSenderId: "5487851245788....",
    appId: "546497946497995....",
    measurementId: "D-54646464646446",
  };

const app = initializeApp(firebaseConfig);
const messaging = getMessaging(app);

onBackgroundMessage(messaging, (payload) => {
    console.log('[firebase-messaging-sw.js] Received background message ', payload);
    // Customize notification here
    const notificationTitle = 'Background Message Title';
    const notificationOptions = {
        body: 'Background Message body.',
        icon: '/firebase-logo.png'
    };

    // self.registration.showNotification(notificationTitle,
    //     notificationOptions);
});

onMessage(messaging, (payload) => {
    console.log('Message received. ', payload);
    // ...
});

I have added Onmessage and background methods in firebase-messaging-sw.js file, but I am not getting in that method,
I am expecting to receive a notification with title and icon and want to implement a click function on that


问:
Reading in a CSV file with whitespace as value holder as well as delimiter Python
Im currently working on the advent of code day 5 task, but im struggling to import the CSV file. Values seem to be separated by whitespace as delimiter, however, there are also whitespaces which are meant to be place holders for a missing value (outline below makes it more clear).

Note: I tried doing this using read_csv from the pandas package

```<code>    [H]         [H]         [V]
    [V]         [V] [J]     [F] [F]
    [S] [L]     [M] [B]     [L] [J]
    [C] [N] [B] [W] [D]     [D] [M]
[G] [L] [M] [S] [S] [C]     [T] [V]
[P] [B] [B] [P] [Q] [S] [L] [H] [B]
[N] [J] [D] [V] [C] [Q] [Q] [M] [P]
[R] [T] [T] [R] [G] [W] [F] [W] [L]
 1   2   3   4   5   6   7   8   9
</code>```

Is there a way to import CSV files dictating that, when multiple whitespaces occur, they should be treated as a missing value instead and not as a delimiter? Im assuming that I have to manually loop through the file in order to do this.

Body:
Im currently working on the advent of code day 5 task, but im struggling to import the CSV file. Values seem to be separated by whitespace as delimiter, however, there are also whitespaces which are meant to be place holders for a missing value (outline below makes it more clear).

Note: I tried doing this using read_csv from the pandas package

    [H]         [H]         [V]
    [V]         [V] [J]     [F] [F]
    [S] [L]     [M] [B]     [L] [J]
    [C] [N] [B] [W] [D]     [D] [M]
[G] [L] [M] [S] [S] [C]     [T] [V]
[P] [B] [B] [P] [Q] [S] [L] [H] [B]
[N] [J] [D] [V] [C] [Q] [Q] [M] [P]
[R] [T] [T] [R] [G] [W] [F] [W] [L]
 1   2   3   4   5   6   7   8   9

Is there a way to import CSV files dictating that, when multiple whitespaces occur, they should be treated as a missing value instead and not as a delimiter? Im assuming that I have to manually loop through the file in order to do this.


问:
Selenium webdriver permission denied
I m using selenium in my android phone  via termux using python and getting a chrome drive error

Permission denied
enter image description here

This problem is eating me.....
Please help

Title: Selenium webdriver permission denied


问:
Why components disappears and reappears while fast scrolling
Here is the link of the website https://ecom-website-f483.vercel.app/ after website homepage is completely loaded and then if you scroll little faster you will start seeing blank screen and after few milliseconds component appears again.</p>


问:
SpirePDF: I can't new PdfCertificate() because I don't know how to generate .pfx file correctly
I want to use SpirePDF to help me make a digital signature for PDF file. However, when I use OpenSSL generate a pfx file and try in a demo, I got an error like

```<code>java.lang.NullPointerException: Cannot invoke "com.spire.pdf.packages.spreyb.spr  (int)" because the return value of "com.spire.pdf.packages.spreyb.spr  (int, byte)" is null

    at com.spire.pdf.packages.sprwxb.spr (clc:127)
    at com.spire.pdf.packages.sprwxb.<init>(clc:0)
    at com.spire.ms.System.Security.Cryptography.X509Certificates.X509Certificate.spr  (clc:4)
    at com.spire.ms.System.Security.Cryptography.X509Certificates.X509Certificate2.spr  (oic:399)
    at com.spire.ms.System.Security.Cryptography.X509Certificates.X509Certificate2.spr  (oic:427)
    at com.spire.ms.System.Security.Cryptography.X509Certificates.X509Certificate2.<init>(oic:149)
    at com.spire.pdf.security.PdfCertificate.<init>(Unknown Source)
</code>```

The following is my java code:

```<code>String pdfPath = "target/test-classes/Input.pdf";
String pfxCertPath = "target/test-classes/1.pfx";
String pfxCertPasswd = "131110";

PdfDocument doc = new PdfDocument();
doc.loadFromFile(pdfPath);
PdfCertificate cert = new PdfCertificate(pfxCertPath,pfxCertPasswd);
</code>```

I found that few people meet this problem, so I don't know how to resolve it by myself.
I also ask in E-iceblue forum, the group member told me that maybe my .pfx file has some wrong as they test my code with their .pfx file can run successfully.
So, if there anyone who knows about this? or anyone used try this successfully? I really need your help. How can I generate a properate .pfx file?

Body:
I want to use SpirePDF to help me make a digital signature for PDF file. However, when I use OpenSSL generate a pfx file and try in a demo, I got an error like

java.lang.NullPointerException: Cannot invoke "com.spire.pdf.packages.spreyb.spr  (int)" because the return value of "com.spire.pdf.packages.spreyb.spr  (int, byte)" is null

    at com.spire.pdf.packages.sprwxb.spr (clc:127)
    at com.spire.pdf.packages.sprwxb.<init>(clc:0)
    at com.spire.ms.System.Security.Cryptography.X509Certificates.X509Certificate.spr  (clc:4)
    at com.spire.ms.System.Security.Cryptography.X509Certificates.X509Certificate2.spr  (oic:399)
    at com.spire.ms.System.Security.Cryptography.X509Certificates.X509Certificate2.spr  (oic:427)
    at com.spire.ms.System.Security.Cryptography.X509Certificates.X509Certificate2.<init>(oic:149)
    at com.spire.pdf.security.PdfCertificate.<init>(Unknown Source)

The following is my java code:

String pdfPath = "target/test-classes/Input.pdf";
String pfxCertPath = "target/test-classes/1.pfx";
String pfxCertPasswd = "131110";

PdfDocument doc = new PdfDocument();
doc.loadFromFile(pdfPath);
PdfCertificate cert = new PdfCertificate(pfxCertPath,pfxCertPasswd);

I found that few people meet this problem, so I don't know how to resolve it by myself.
I also ask in E-iceblue forum, the group member told me that maybe my .pfx file has some wrong as they test my code with their .pfx file can run successfully.
So, if there anyone who knows about this? or anyone used try this successfully? I really need your help. How can I generate a properate .pfx file?


问:
Proguard -obfuscationdictionary in used aar library caused file not found exception
I add aar library to my project, that has following in proguard rules:

```<code>-obfuscationdictionary build/obfuscation-dictionary.txt
-classobfuscationdictionary build/class-dictionary.txt
</code>```

I got error, when build with

```<code>isMinifyEnabled = true
</code>```

java.nio.file.NoSuchFileException: C:\Users....gradle\caches\transforms-3\07478cf30c50e6fe3820e9cff7b7aab9\transformed...\build\obfuscation-dictionary.txt
java.nio.file.NoSuchFileException: C:\Users....gradle\caches\transforms-3\07478cf30c50e6fe3820e9cff7b7aab9\transformed...\build\class-dictionary.txt

I tried add next to my project, but it didn't help

```<code>release {
            minifyEnabled true
            debuggable false
            // automatically add your proguard rules into your library user
            consumerProguardFiles 'proguard-rules.pro'
            proguardFiles 'proguard-rules-dic.pro', 'proguard-rules.pro'
        }
</code>```

Body:
I add aar library to my project, that has following in proguard rules:

-obfuscationdictionary build/obfuscation-dictionary.txt
-classobfuscationdictionary build/class-dictionary.txt

I got error, when build with

isMinifyEnabled = true

java.nio.file.NoSuchFileException: C:\Users....gradle\caches\transforms-3\07478cf30c50e6fe3820e9cff7b7aab9\transformed...\build\obfuscation-dictionary.txt
java.nio.file.NoSuchFileException: C:\Users....gradle\caches\transforms-3\07478cf30c50e6fe3820e9cff7b7aab9\transformed...\build\class-dictionary.txt

I tried add next to my project, but it didn't help

release {
            minifyEnabled true
            debuggable false
            // automatically add your proguard rules into your library user
            consumerProguardFiles 'proguard-rules.pro'
            proguardFiles 'proguard-rules-dic.pro', 'proguard-rules.pro'
        }


问:
pip install iceberg - Preparing metadata (setup.py) error
Command:

```<code>pip install iceberg
</code>```

Returns this error:

```<code>C:\Users\abc>pip install iceberg
Collecting iceberg
  Using cached iceberg-0.4.tar.gz (17 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [10 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
</code>```

When I'm trying to install the iceberg library.

Body:
Command:

pip install iceberg

Returns this error:

C:\Users\abc>pip install iceberg
Collecting iceberg
  Using cached iceberg-0.4.tar.gz (17 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [10 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>

When I'm trying to install the iceberg library.


问:
Sass Partials are creating Css files
I'm using sass partials in my project but Easy Sass Vs Code extension making css files out of sass partials IDK how . Can any help me to fix this issue. I'm using underscore _typography.scss . It's still creating css files out of scss partials

Partials are creating css files

Title: Sass Partials are creating Css files


问:
How to redraw all subtable at once / Nested Tables
I have a tabulator with subtable on each lane (Nested Tables example). I wanted to redraw all the subtable when i detect a change in screen resolution. But I'm blocked because "subtable.redraw();" don't work.
Did someone have an idea ?
I can change properties of the subtable div but without redraw(), i can't resize my column.</p>


问:
Dataframe append too slow
I'm trying to optimize my code that uses Dataframe append. I read that one tway is to use from_dict instead of dataframe append, but in my case I'm not facing performance improvement. I use Python3.8 and pandas==1.5.2

```<code>global_dict = {}
dict_index = 0

for box, score, label in zip(boxes, scores, labels):

    if score >= score_threshold:
        global_dframe.append(
                        {
                         'Image': images,
                         'Label': text[label],
                         'Confidence':  round(score.item(), 3),
                         'Bounding box': [round(i, 2) for i in box.tolist()]
                        }
                )
</code>```

To:

```<code>    global_dict = {}
    dict_index = 0

    for box, score, label in zip(boxes, scores, labels):

        if score >= score_threshold:
            global_dict[dict_index] = {"Image": images, 'Label': text[label], 'Confidence':  round(score.item(), 3), 'Bounding box': [round(i, 2) for i in box.tolist()] }
            dict_index = dict_index + 1
</code>```

Any help is appreciated.

Title: Dataframe append too slow

Body:
I'm trying to optimize my code that uses Dataframe append. I read that one tway is to use from_dict instead of dataframe append, but in my case I'm not facing performance improvement. I use Python3.8 and pandas==1.5.2

global_dict = {}
dict_index = 0

for box, score, label in zip(boxes, scores, labels):

    if score >= score_threshold:
        global_dframe.append(
                        {
                         'Image': images,
                         'Label': text[label],
                         'Confidence':  round(score.item(), 3),
                         'Bounding box': [round(i, 2) for i in box.tolist()]
                        }
                )

To:

    global_dict = {}
    dict_index = 0

    for box, score, label in zip(boxes, scores, labels):

        if score >= score_threshold:
            global_dict[dict_index] = {"Image": images, 'Label': text[label], 'Confidence':  round(score.item(), 3), 'Bounding box': [round(i, 2) for i in box.tolist()] }
            dict_index = dict_index + 1

Any help is appreciated.


问:
_InternalLinkedHashMap<dynamic, dynamic>' is not a subtype of type 'DocumentSnapshot<Object?>
I'm trying to display a list of images but I am getting this error.

```<code>ListView.builder(
                                                    scrollDirection: Axis.horizontal,
                                                    shrinkWrap: true,
                                                    itemCount: snapshot.data.length ?? 0,
                                                    itemBuilder:
                                                        (context, index) {
                                                      final NoteModel note =
                                                          NoteModel.fromJson(
                                                              snapshot.data[index]); // Getting the error here
                                                      return CachedNetworkImage(
                                                        imageUrl: note.image![index],

</code>```
```<code>class NoteModel {
  List<String>? image;
  ...

 NoteModel({
 this.image,
 ...
 });

  factory NoteModel.fromJson(DocumentSnapshot streamSnapshot){
     return NoteModel(
      image: List<String>.from(streamSnapshot["image"].map((x) => x)),
      ...
    );
  }
 }
</code>```

Let me know if you need to see more code.

Any help is appreciated!

Body:
I'm trying to display a list of images but I am getting this error.

ListView.builder(
                                                    scrollDirection: Axis.horizontal,
                                                    shrinkWrap: true,
                                                    itemCount: snapshot.data.length ?? 0,
                                                    itemBuilder:
                                                        (context, index) {
                                                      final NoteModel note =
                                                          NoteModel.fromJson(
                                                              snapshot.data[index]); // Getting the error here
                                                      return CachedNetworkImage(
                                                        imageUrl: note.image![index],

class NoteModel {
  List<String>? image;
  ...

 NoteModel({
 this.image,
 ...
 });

  factory NoteModel.fromJson(DocumentSnapshot streamSnapshot){
     return NoteModel(
      image: List<String>.from(streamSnapshot["image"].map((x) => x)),
      ...
    );
  }
 }

Let me know if you need to see more code.

Any help is appreciated!


问:
Why pip can't install any packages on my pc?
Every time I try installing a package using pip I get the same error

 error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [41 lines of output]
      Collecting setuptools>=40.8.0
        Using cached setuptools-65.6.3-py3-none-any.whl (1.2 MB)
      Collecting Cython>=3.0a11
        Using cached Cython-3.0.0a11-py2.py3-none-any.whl (1.1 MB)
      Collecting cffi>=1.12.3
        Using cached cffi-1.15.1.tar.gz (508 kB)
        Preparing metadata (setup.py): started
        Preparing metadata (setup.py): finished with status 'error'
        error: subprocess-exited-with-error

        python setup.py egg_info did not run successfully.
        exit code: 1

        [16 lines of output]
        Traceback (most recent call last):
          File "<string>", line 2, in <module>
          File "<pip-setuptools-caller>", line 34, in <module>
          File "C:\Users\amm25\AppData\Local\Temp\pip-install-ygsg1v5y\cffi_f0b1a39fa2e94757852c83125193be0d\setup.py", line 126, in <module>
            if sys.platform == "win32" and uses_msvc():
          File "C:\Users\amm25\AppData\Local\Temp\pip-install-ygsg1v5y\cffi_f0b1a39fa2e94757852c83125193be0d\setup.py", line 105, in uses_msvc
            return config.try_compile('#ifndef _MSC_VER\n#error "not MSVC"\n#endif')
          File "C:\msys64\mingw64\lib\python3.10\site-packages\setuptools\_distutils\command\config.py", line 224, in try_compile
            self._compile(body, headers, include_dirs, lang)
          File "C:\msys64\mingw64\lib\python3.10\site-packages\setuptools\_distutils\command\config.py", line 129, in _compile
            self.compiler.compile([src], include_dirs=include_dirs)
          File "C:\msys64\mingw64\lib\python3.10\site-packages\setuptools\_distutils\_msvccompiler.py", line 344, in compile
            self.initialize()
          File "C:\msys64\mingw64\lib\python3.10\site-packages\setuptools\_distutils\_msvccompiler.py", line 246, in initialize
            raise DistutilsPlatformError(
        distutils.errors.DistutilsPlatformError: --plat-name must be one of ('win32', 'win-amd64', 'win-arm32', 'win-arm64')
        [end of output]

        note: This error originates from a subprocess, and is likely not a problem with pip.
      error: metadata-generation-failed

      Encountered error while generating package metadata.

      See above for output.

      note: This is an issue with the package mentioned above, not pip.
      hint: See above for details.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
```

I have tried pip install setuptools==65.0.1 when I googled it (I had very few answers to such a problem then I got this message Requirement already satisfied: setuptools in c:\msys64\mingw64\lib\python3.10\site-packages (65.6.3) I had the same problem when installing opencv working in another project and it has been more of 2 weeks searching for a solution

Body:
Every time I try installing a package using pip I get the same error

 error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [41 lines of output]
      Collecting setuptools>=40.8.0
        Using cached setuptools-65.6.3-py3-none-any.whl (1.2 MB)
      Collecting Cython>=3.0a11
        Using cached Cython-3.0.0a11-py2.py3-none-any.whl (1.1 MB)
      Collecting cffi>=1.12.3
        Using cached cffi-1.15.1.tar.gz (508 kB)
        Preparing metadata (setup.py): started
        Preparing metadata (setup.py): finished with status 'error'
        error: subprocess-exited-with-error

        python setup.py egg_info did not run successfully.
        exit code: 1

        [16 lines of output]
        Traceback (most recent call last):
          File "<string>", line 2, in <module>
          File "<pip-setuptools-caller>", line 34, in <module>
          File "C:\Users\amm25\AppData\Local\Temp\pip-install-ygsg1v5y\cffi_f0b1a39fa2e94757852c83125193be0d\setup.py", line 126, in <module>
            if sys.platform == "win32" and uses_msvc():
          File "C:\Users\amm25\AppData\Local\Temp\pip-install-ygsg1v5y\cffi_f0b1a39fa2e94757852c83125193be0d\setup.py", line 105, in uses_msvc
            return config.try_compile('#ifndef _MSC_VER\n#error "not MSVC"\n#endif')
          File "C:\msys64\mingw64\lib\python3.10\site-packages\setuptools\_distutils\command\config.py", line 224, in try_compile
            self._compile(body, headers, include_dirs, lang)
          File "C:\msys64\mingw64\lib\python3.10\site-packages\setuptools\_distutils\command\config.py", line 129, in _compile
            self.compiler.compile([src], include_dirs=include_dirs)
          File "C:\msys64\mingw64\lib\python3.10\site-packages\setuptools\_distutils\_msvccompiler.py", line 344, in compile
            self.initialize()
          File "C:\msys64\mingw64\lib\python3.10\site-packages\setuptools\_distutils\_msvccompiler.py", line 246, in initialize
            raise DistutilsPlatformError(
        distutils.errors.DistutilsPlatformError: --plat-name must be one of ('win32', 'win-amd64', 'win-arm32', 'win-arm64')
        [end of output]

        note: This error originates from a subprocess, and is likely not a problem with pip.
      error: metadata-generation-failed

      Encountered error while generating package metadata.

      See above for output.

      note: This is an issue with the package mentioned above, not pip.
      hint: See above for details.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

I have tried pip install setuptools==65.0.1 when I googled it (I had very few answers to such a problem then I got this message Requirement already satisfied: setuptools in c:\msys64\mingw64\lib\python3.10\site-packages (65.6.3) I had the same problem when installing opencv working in another project and it has been more of 2 weeks searching for a solution


问:
Yii2 popup when table update
Good morning everyone.
I am facing the following situation.
I have a management software written with Yii2.
This management software works with gyms and the following functionality was requested:

Every time a user enters to particular gym, a popup/message/notificatino with data relating to the user must be shown on a specific management page.

Now I already have a controller that writes a row to the access table on every new access (the access is managed by a mqtt).

I thought about using websockets, to send the client a notification whenever a user logs in.
I saw this extension of Yii2

https://github.com/consik/yii2-websocket

I just want to know if my idea is a valid approach to solve the problem and moreover if you know or have used this extension (any suggestion or advice will be welcome).
Thanks in advance!

Title: Yii2 popup when table update


问:
Symlink and React
I can not figure out one problem.

I made this folder structure on my server:
clients/shop1/ and clients/shop2/
then I added file name shop_config.json into folder shop1 & shop2.

Now here is the problem, when I make a symlink inside shop1 & shop2 folders pointing to frontend folder which is react build, I cannot figure out how to include config to my webapp. I am using react and my include looks like this:

```<code>import shopConfig from '../../../../../shop_config.json';

export const SHOP_ID = shopConfig.shopID;
</code>```

When I am in a yarn dev mode, everything works perfect, but when i build the app. But no change will take effect in shop_config.json after build.

Here is the screenshot of frontend symlink and shop_config.json how it looks on the server inside folder shop1

Any help or explanation will help. Thanks. (I Have same web app for more users)

Title: Symlink and React

Body:
I can not figure out one problem.

I made this folder structure on my server:
clients/shop1/ and clients/shop2/
then I added file name shop_config.json into folder shop1 & shop2.

Now here is the problem, when I make a symlink inside shop1 & shop2 folders pointing to frontend folder which is react build, I cannot figure out how to include config to my webapp. I am using react and my include looks like this:

import shopConfig from '../../../../../shop_config.json';

export const SHOP_ID = shopConfig.shopID;

When I am in a yarn dev mode, everything works perfect, but when i build the app. But no change will take effect in shop_config.json after build.

Here is the screenshot of frontend symlink and shop_config.json how it looks on the server inside folder shop1

Any help or explanation will help. Thanks. (I Have same web app for more users)


问:
Add kivy datepicker widget in my kivy app
Hey I want to create add a kivy datepicker widget to one of my screens in my kivy app.
I did find some solutions using KivyMD, which i do not want to use for now, and some other solutions which do not seem to work with the screen manager and in general with multiple screens.

The datepicker widget should display the usually calender features like any other datepicker out there, I just can not seem to figure out how to do so.

Thanks in advance.


问:
How to configure spring boot integration tests with random coordinates of external mocks?
I have a spring boot application that sends requests to external services. url and port of those services are configured using standard spring boot way - configuration properties. During integration tests i want to start my external mocks (e.g. test-container) using random free port, provide this port to spring-boot config and start the spring boot app.

but any @SpringBootTest requires config provided in annotation. that must be static. there is no way to provide a port this way. i need something like:

```<code>class IntegrationTest {

  static int port;

  @BeforeAll
  static void initialize_external_mocks() {
     port = start_docker_and_get_its_port()
  }

  @Test
  void should_call_external_service() {

     start_my_spring_boot_app_with_port(port); // how to do this?

     restTemplate.get("/my-spring-boot-app/request");

     assert_my_docker_received_a_call_from_my_app();
  }
}
</code>```

Body:
I have a spring boot application that sends requests to external services. url and port of those services are configured using standard spring boot way - configuration properties. During integration tests i want to start my external mocks (e.g. test-container) using random free port, provide this port to spring-boot config and start the spring boot app.

but any @SpringBootTest requires config provided in annotation. that must be static. there is no way to provide a port this way. i need something like:

class IntegrationTest {

  static int port;

  @BeforeAll
  static void initialize_external_mocks() {
     port = start_docker_and_get_its_port()
  }

  @Test
  void should_call_external_service() {

     start_my_spring_boot_app_with_port(port); // how to do this?

     restTemplate.get("/my-spring-boot-app/request");

     assert_my_docker_received_a_call_from_my_app();
  }
}


问:
Flutter- Small Size & Simple local Image loading very slowly
I have a bunch of these .jpg images (each having a size <130 kb) with a width of 800 and height  within 500-600 stored in assets/categeory_images in folder which I am trying to load in my app. But it is taking 1-2 seconds for each of the image to load and thus producing the flickering effect which is completely ruining the feel of app

I have tried precaching image following the accepted answer of Very simple image loaded pretty slow with Flutter , however it doesn't seem to help at all. Below is part of my implementation-

In main.dart file (build function)-

```<code>Widget build(BuildContext context) {
precacheImage(AssetImage("assets/category_images/motivation.jpg"), context);
precacheImage(AssetImage("assets/category_images/courage.jpg"), context);
//Eliminated many of the precacheImage() statements so as to keep this function short

SystemChrome.setEnabledSystemUIOverlays([]);
  return MultiProvider(
    providers: [
    ListenableProvider<Quotes_DataProvider>(create: (context) => Quotes_DataProvider()),
    ListenableProvider<searchQuote_DataProvider>(create: (context) => searchQuote_DataProvider()),
    ],
    child: MaterialApp(

theme:ThemeData(backgroundColor: Color.fromARGB(255, 234, 234, 234)),

        home:WelcomeScreen(),

      routes: {

  '/favourites': (context) =>  favouriteScreen(),
  '/quotes': (context) =>  QuoteDisplayScreen(),
  '/categories':(context)=> CategoryScreen(),

},
    ),
  );
}
}
</code>```

And my FeaturedQuoteCategory.dart

```<code>class _FeaturedQuoteCategoryState extends State<FeaturedQuoteCategory> {

  late final ImageProvider image;
  @override
  void initState() {

    super.initState();
    image = AssetImage(widget.imageLocation);

  }
  Widget build(BuildContext context) {

    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        Stack(
          children: [
            ClipRRect(
                borderRadius: BorderRadius.only(topLeft: Radius.circular(10),topRight: Radius.circular(10)),
                child: Image(image:image,

                    fit: BoxFit.cover,
                    width: double.infinity,
                    height: 120,
                    //gaplessPlayback: true,
                  ),
                ),

      )

         ,
               //backgroundColor: Color.fromARGB(255, 30, 30, 30)

          ],

        ),

      ],
    );
  }
}
</code>```

As I have manually excluded un-necessary part from the above snippet, there may be missing colons/brackets. Apologizes for that.

I am displaying the widget via-

```<code>FeaturedQuoteCategory(title: "Life Quotes", imageLocation: "assets/category_images/life.jpg",subject: "life",),
</code>```

Basically I am passing the image Location as argument to the widget

What I have tried-

Reducing the size of each imageto <130kb

Reducing the dimensions of image

Installing the release version of this (flutter run --release). Definitely speeds up the things but doesnt help with the issue I am facing

Precaching (doesn't work either)

Crying (helps lessen the pain but doesn't solve the issue)

Stuck on this issue since last 2 days. Any help would be greatly appreciated

My flutter installation configuration-

Body:
I have a bunch of these .jpg images (each having a size <130 kb) with a width of 800 and height  within 500-600 stored in assets/categeory_images in folder which I am trying to load in my app. But it is taking 1-2 seconds for each of the image to load and thus producing the flickering effect which is completely ruining the feel of app

I have tried precaching image following the accepted answer of Very simple image loaded pretty slow with Flutter , however it doesn't seem to help at all. Below is part of my implementation-

In main.dart file (build function)-

Widget build(BuildContext context) {
precacheImage(AssetImage("assets/category_images/motivation.jpg"), context);
precacheImage(AssetImage("assets/category_images/courage.jpg"), context);
//Eliminated many of the precacheImage() statements so as to keep this function short

SystemChrome.setEnabledSystemUIOverlays([]);
  return MultiProvider(
    providers: [
    ListenableProvider<Quotes_DataProvider>(create: (context) => Quotes_DataProvider()),
    ListenableProvider<searchQuote_DataProvider>(create: (context) => searchQuote_DataProvider()),
    ],
    child: MaterialApp(

theme:ThemeData(backgroundColor: Color.fromARGB(255, 234, 234, 234)),

        home:WelcomeScreen(),

      routes: {

  '/favourites': (context) =>  favouriteScreen(),
  '/quotes': (context) =>  QuoteDisplayScreen(),
  '/categories':(context)=> CategoryScreen(),

},
    ),
  );
}
}

And my FeaturedQuoteCategory.dart

class _FeaturedQuoteCategoryState extends State<FeaturedQuoteCategory> {

  late final ImageProvider image;
  @override
  void initState() {

    super.initState();
    image = AssetImage(widget.imageLocation);

  }
  Widget build(BuildContext context) {

    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        Stack(
          children: [
            ClipRRect(
                borderRadius: BorderRadius.only(topLeft: Radius.circular(10),topRight: Radius.circular(10)),
                child: Image(image:image,

                    fit: BoxFit.cover,
                    width: double.infinity,
                    height: 120,
                    //gaplessPlayback: true,
                  ),
                ),

      )

         ,
               //backgroundColor: Color.fromARGB(255, 30, 30, 30)

          ],

        ),

      ],
    );
  }
}

As I have manually excluded un-necessary part from the above snippet, there may be missing colons/brackets. Apologizes for that.

I am displaying the widget via-

FeaturedQuoteCategory(title: "Life Quotes", imageLocation: "assets/category_images/life.jpg",subject: "life",),

Basically I am passing the image Location as argument to the widget

What I have tried-

Reducing the size of each imageto <130kb

Reducing the dimensions of image

Installing the release version of this (flutter run --release). Definitely speeds up the things but doesnt help with the issue I am facing

Precaching (doesn't work either)

Crying (helps lessen the pain but doesn't solve the issue)

Stuck on this issue since last 2 days. Any help would be greatly appreciated

My flutter installation configuration-


问:
How to create a Table DropdownList in ASP.NET MVC
At the moment I have a simple way to display all the created elements in one single list, but in the future I would like to have multiple dropdown lists, which would contain all of the elements created in that month and expand them, but I don't know how to put the whole table inside a dropdownlist.

View:

```<code><table>
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.Date)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Name)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Value)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Criteria)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Employee)
            </th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model)
        {
            var timeCreated = item.Date.Date.ToString("yyyy MMMM dd");
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => timeCreated)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Name)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Value)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Criteria.Name)
                </td>
                <td>
                    @if (item.Employee != null)
                    {
                        @Html.DisplayFor(modelItem => item.Employee.FullName);
                    }
                    else
                    {
                        @Html.Raw("-");
                    }
                </td>
                <td>
                    <a class="btn-small waves-effect waves-light" asp-action="Edit" asp-route-id="@item.ID">Edit</a>
                    <a class="btn-small waves-effect waves-light" asp-action="Delete" asp-route-id="@item.ID">Delete</a>
                </td>
            </tr>
        }
    </tbody>
</table>
</code>```

Body:
At the moment I have a simple way to display all the created elements in one single list, but in the future I would like to have multiple dropdown lists, which would contain all of the elements created in that month and expand them, but I don't know how to put the whole table inside a dropdownlist.

View:

                @Html.DisplayNameFor(model => model.Date)

                @Html.DisplayNameFor(model => model.Name)

                @Html.DisplayNameFor(model => model.Value)

                @Html.DisplayNameFor(model => model.Criteria)

                @Html.DisplayNameFor(model => model.Employee)

        @foreach (var item in Model)
        {
            var timeCreated = item.Date.Date.ToString("yyyy MMMM dd");

                    @Html.DisplayFor(modelItem => timeCreated)

                    @Html.DisplayFor(modelItem => item.Name)

                    @Html.DisplayFor(modelItem => item.Value)

                    @Html.DisplayFor(modelItem => item.Criteria.Name)

                    @if (item.Employee != null)
                    {
                        @Html.DisplayFor(modelItem => item.Employee.FullName);
                    }
                    else
                    {
                        @Html.Raw("-");
                    }

                    Edit
                    Delete

        }


问:
Finding embedding of a molecule dataset
Embeddings of a drug dataset using macaw (Molecular Autoencoding AutoWorkAround) which is an Accessible Tool for Molecular Embedding and InverseMolecular Design.
After that I convert the embeddings into pandas dataframe and the convert it into a .csv file which includes class labels of the main dataset.

But when I try to apply the smote algorithm on MLP or Logistic Regression Classifier the classification metrices named precision, recall, F1 score remains the same that means there is no improvement after applying the smote.

So, I think there is a problem in finding the embeddings. Please help.

The code which I applied, the dataset and the paper from where I got the idea are given below.

My source code:

```<code>import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split, cross_val_score
from sklearn.svm import SVR

from rdkit import SimDivFilters
from rdkit.Chem import rdMolDescriptors
import sys
sys.path.append('../')
import macaw
print(macaw.__version__)
from macaw import *
from google.colab import files
df=files.upload()
df=pd.read_csv("BBBP.csv")
smiles=df.smiles
print(len(smiles))
mcw = MACAW(random_state=42)
mcw.fit(smiles)
BBBP_embedding=mcw.transform(smiles)
print(BBBP_embedding)
hiv_embedding=pd.DataFrame(BBBP_embedding)
extracted_col=df["p_np"]
hiv_embedding=hiv_embedding.join(extracted_col)
hiv_embedding.to_csv("BBBP_embedding.csv")
from google.colab import files
files.download("BBBP_embedding.csv")
</code>```

Dataset link: https://moleculenet.org/

Paper link: https://pubs.acs.org/doi/10.1021/acs.jcim.2c00229

I expect someone can find the code's mistake and help me to correct it. Thanks!

Title: Finding embedding of a molecule dataset

Body:
Embeddings of a drug dataset using macaw (Molecular Autoencoding AutoWorkAround) which is an Accessible Tool for Molecular Embedding and InverseMolecular Design.
After that I convert the embeddings into pandas dataframe and the convert it into a .csv file which includes class labels of the main dataset.

But when I try to apply the smote algorithm on MLP or Logistic Regression Classifier the classification metrices named precision, recall, F1 score remains the same that means there is no improvement after applying the smote.

So, I think there is a problem in finding the embeddings. Please help.

The code which I applied, the dataset and the paper from where I got the idea are given below.

My source code:

import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split, cross_val_score
from sklearn.svm import SVR

from rdkit import SimDivFilters
from rdkit.Chem import rdMolDescriptors
import sys
sys.path.append('../')
import macaw
print(macaw.__version__)
from macaw import *
from google.colab import files
df=files.upload()
df=pd.read_csv("BBBP.csv")
smiles=df.smiles
print(len(smiles))
mcw = MACAW(random_state=42)
mcw.fit(smiles)
BBBP_embedding=mcw.transform(smiles)
print(BBBP_embedding)
hiv_embedding=pd.DataFrame(BBBP_embedding)
extracted_col=df["p_np"]
hiv_embedding=hiv_embedding.join(extracted_col)
hiv_embedding.to_csv("BBBP_embedding.csv")
from google.colab import files
files.download("BBBP_embedding.csv")

Dataset link: https://moleculenet.org/

Paper link: https://pubs.acs.org/doi/10.1021/acs.jcim.2c00229

I expect someone can find the code's mistake and help me to correct it. Thanks!


问:
Find same name in a table in different PDF files
i need to find if in different pdf files there is a given name that is present in 2 or more files. the table in the files that i use is like this:

enter image description here

and i want to excract and compare only the strings under the "name surname" column and if they are the same, print them.

```<code>nomi_comuni = []

for file_path in ['documento1.pdf', 'documento2.pdf']:
    with open(file_path, 'rb') as file:
        from pdfminer.pdfparser import PDFParser
        from pdfminer.pdfdocument import PDFDocument
        from pdfminer.pdfpage import PDFPage
        from pdfminer.pdfpage import PDFTextExtractionNotAllowed
        from pdfminer.pdfinterp import PDFResourceManager
        from pdfminer.pdfinterp import PDFPageInterpreter
        from pdfminer.layout import LAParams
        from pdfminer.layout import LTTextBox, LTTextLine
        from pdfminer.converter import PDFPageAggregator

        parser = PDFParser(file)

        document = PDFDocument(parser)

        rsrcmgr = PDFResourceManager()

        laparams = LAParams()

        device = PDFPageAggregator(rsrcmgr, laparams=laparams)

        interpreter = PDFPageInterpreter(rsrcmgr, device)

        for page in PDFPage.create_pages(document):

            interpreter.process_page(page)

            layout = device.get_result()

            for element in layout:

                if isinstance(element, LTTextBox) or isinstance(element, LTTextLine):

                    parole = element.get_text().split()

                for indice, parola in enumerate(parole):

                    if parola == 'name':

                        if indice < len(parole) - 1:

                            nomi_comuni.append(parole[indice + 1])

print(nomi_comuni)
</code>```

i wrote this code, it runs, but it doesn't give me what i want

Body:
i need to find if in different pdf files there is a given name that is present in 2 or more files. the table in the files that i use is like this:

enter image description here

and i want to excract and compare only the strings under the "name surname" column and if they are the same, print them.

nomi_comuni = []

for file_path in ['documento1.pdf', 'documento2.pdf']:
    with open(file_path, 'rb') as file:
        from pdfminer.pdfparser import PDFParser
        from pdfminer.pdfdocument import PDFDocument
        from pdfminer.pdfpage import PDFPage
        from pdfminer.pdfpage import PDFTextExtractionNotAllowed
        from pdfminer.pdfinterp import PDFResourceManager
        from pdfminer.pdfinterp import PDFPageInterpreter
        from pdfminer.layout import LAParams
        from pdfminer.layout import LTTextBox, LTTextLine
        from pdfminer.converter import PDFPageAggregator

        parser = PDFParser(file)

        document = PDFDocument(parser)

        rsrcmgr = PDFResourceManager()

        laparams = LAParams()

        device = PDFPageAggregator(rsrcmgr, laparams=laparams)

        interpreter = PDFPageInterpreter(rsrcmgr, device)

        for page in PDFPage.create_pages(document):

            interpreter.process_page(page)

            layout = device.get_result()

            for element in layout:

                if isinstance(element, LTTextBox) or isinstance(element, LTTextLine):

                    parole = element.get_text().split()

                for indice, parola in enumerate(parole):

                    if parola == 'name':

                        if indice < len(parole) - 1:

                            nomi_comuni.append(parole[indice + 1])

print(nomi_comuni)

i wrote this code, it runs, but it doesn't give me what i want


问:
Cloudwatch Custom Metrics different queries issue
I'm might be doing this all wrong, as what I am doing seems quite simple but I'm having issues.

I want a Custom Metric of Logins to an Application. In the Graph I want to see "Number of logins" and also "Number of unique logins".

I have created a Custom Metric called Login, with a Dimension of UserId (name) and UUID (value).

I can run a query over that Metric using the Count Aggregation, to view "Number of Logins". However there doesn't seem to be a Distinct keyword (like there is in CloudWatch Log Insights), to view "Number of unique logins".

The other issue is that it seems like you can only add 1 query to your Graph ? Which seems quite a limitation ?


问:
How to see what data is passed to the class?
I have a product model with a json field as product attributes. I want to make filters on all keys of this field. I am using Djnago-filter.
enter image description here

When I declare a field and process this request in the method, everything works.
Example:

```<code>tip = django_filters.CharFilter(method = 'filter_attrs')
</code>```

"api/v1/product/?tip=Городской"
name = tip
in the "filter_attrs" method I get the name argument which is equal to the key in the filter. Its work.
But if I make such a "api/v1/product/?ves=30" request, the method is not even called.

So I want this method to process requests regardless of what is in the name argument.

I wanted to see inside the class what request comes in and in what case the method is called, and override this rule. But I don't understand how to do it.

Please help me how to learn how to do this so that in the future I can cope with such tasks on my own

I tried to call the "init" method inside which to call print(request,queryset), but this method was apparently not called, I did not see anything in the terminal.

I tore off the files filterset.py(djang0_filters/rest_framework/filterset.py) and tried to find methods in which you can try queries and override them. But didn't find

Body:
I have a product model with a json field as product attributes. I want to make filters on all keys of this field. I am using Djnago-filter.
enter image description here

When I declare a field and process this request in the method, everything works.
Example:

tip = django_filters.CharFilter(method = 'filter_attrs')

"api/v1/product/?tip=Городской"
name = tip
in the "filter_attrs" method I get the name argument which is equal to the key in the filter. Its work.
But if I make such a "api/v1/product/?ves=30" request, the method is not even called.

So I want this method to process requests regardless of what is in the name argument.

I wanted to see inside the class what request comes in and in what case the method is called, and override this rule. But I don't understand how to do it.

Please help me how to learn how to do this so that in the future I can cope with such tasks on my own

I tried to call the "init" method inside which to call print(request,queryset), but this method was apparently not called, I did not see anything in the terminal.

I tore off the files filterset.py(djang0_filters/rest_framework/filterset.py) and tried to find methods in which you can try queries and override them. But didn't find


问:
Error: Cannot find module './client/BaseClient'
I was testing a discord bot package that was included in a Xenforo Addon. However, when I wanted to run the bot, it just returned this error

```<code>Error: Cannot find module './client/BaseClient'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/home/bot/node_modules/discord.js/src/index.js:4:22)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
</code>```

Any solution for that? Google doesn't seem to be good help at all.

Body:
I was testing a discord bot package that was included in a Xenforo Addon. However, when I wanted to run the bot, it just returned this error

Error: Cannot find module './client/BaseClient'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/home/bot/node_modules/discord.js/src/index.js:4:22)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)

Any solution for that? Google doesn't seem to be good help at all.


问:
Stream MongoDB Result of FindAll documents
I want to write a mongo query to fetch All Documents in a collection and project just 2 fields and no criteria.
I want to use streams here and iterate over the list of documents to process them.
How can I write this in Java Spring Mongo?

I have something like this:

```<code>    public CloseableIterator<Employees> streamAllEmployees() {
        Query query = new Query();
        query.fields().include("_id.name","_id.dept");
        query.addCriteria(Criteria.where("_id.dept").is(1));

        return mongoOperations.stream(query, Employee.class);
    }
</code>```

but how can I change this to not have any QueryCriteria?

Body:
I want to write a mongo query to fetch All Documents in a collection and project just 2 fields and no criteria.
I want to use streams here and iterate over the list of documents to process them.
How can I write this in Java Spring Mongo?

I have something like this:

    public CloseableIterator<Employees> streamAllEmployees() {
        Query query = new Query();
        query.fields().include("_id.name","_id.dept");
        query.addCriteria(Criteria.where("_id.dept").is(1));

        return mongoOperations.stream(query, Employee.class);
    }

but how can I change this to not have any QueryCriteria?


问:
Spring Cloud config with JDBC Backend Failure in Spring boot
I have a client-server based microservice architecture. i.e, a server-config(Spring cloud config) service that has all the configurations and properties that are fetched using jdbc Backend-(PostgreSQL in my case) along with profiling.

I wanted to understand that incase of failure of my server-config service are there any chances of the rest of the dependent services to fail as they will no longer be able to fetch the required properties from the server-config service? If yes, then how can I mitigate this issue.

I could think of implementing cache but will have to go through the steps required to do so. Can someone help me clear out the above scenario.


问:
How to accessing the value in fieldset
I am writing a code that will allow users to write note, I'm using fieldset instead of textarea. I need to access the value in the fieldset and make use of the text. I can't access it unless I add an input elements.

```<code>const write = document.querySelector("#write");
const body = document.querySelector("body");
const form = document.querySelector("#form")
const list = document.querySelector("#list");
const button = document.createElement("button");

write.addEventListener("click", function (e){
        e.preventDefault()
        console.log(e);
        const page = document.createElement("form");
        const fieldset = document.createElement("fieldset");
        page.action = "./nowhere";
        fieldset.contentEditable = true;
        fieldset.id = "text";
        fieldset.name = "text";
        // fieldset.append(input)
        page.append(fieldset);
        write.append(page);
        page.append(button);
        const myText = write.form.fieldset.value;
        console.log(myText);
})
</code>```

Title: How to accessing the value in fieldset

Body:
I am writing a code that will allow users to write note, I'm using fieldset instead of textarea. I need to access the value in the fieldset and make use of the text. I can't access it unless I add an input elements.

const write = document.querySelector("#write");
const body = document.querySelector("body");
const form = document.querySelector("#form")
const list = document.querySelector("#list");
const button = document.createElement("button");

write.addEventListener("click", function (e){
        e.preventDefault()
        console.log(e);
        const page = document.createElement("form");
        const fieldset = document.createElement("fieldset");
        page.action = "./nowhere";
        fieldset.contentEditable = true;
        fieldset.id = "text";
        fieldset.name = "text";
        // fieldset.append(input)
        page.append(fieldset);
        write.append(page);
        page.append(button);
        const myText = write.form.fieldset.value;
        console.log(myText);
})