问:
JVM threads and heap issue due to filtercache
I have a huge sharded collection. Each shard contains 100 millions docs.

Queries are using at maximum 20 filter queries. 10 are very often used and the other not often.
filterCache size is 10 and autoWarmCount is 10.
filterCache statistics are very good except warmupTime is a little long.

```<code>"CACHE.searcher.filterCache":{
    "lookups":4048,
    "hits":4048,
    "cumulative_evictions":52,
    "size":10,
    "hitratio":1.0,
    "evictions":0,
    "cumulative_lookups":2048362,
    "cumulative_hitratio":1.0,
    "warmupTime":13956,
    "inserts":0,
    "cumulative_inserts":146,
    "cumulative_hits":2048049},
</code>```

autoSoftCommit maxtime is 60000
autoCommit maxtime si 300000

softCommits occur nearly each one to 3 minutes according when updates occur.

At some moment (once a day), there is suddenly a threads count spike with more than 150 threads executing the methods building and populating the filter cache.

```<code>java.lang.Thread.State: RUNNABLE
at org.apache.lucene.search.ConjunctionDISI.doNext(ConjunctionDISI.java:200)
at org.apache.lucene.search.ConjunctionDISI.nextDoc(ConjunctionDISI.java:240)
at org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:261)
at org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:214)
at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:39)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:670)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:471)
at org.apache.solr.search.DocSetUtil.createDocSetGeneric(DocSetUtil.java:151)
at org.apache.solr.search.DocSetUtil.createDocSet(DocSetUtil.java:140)
at org.apache.solr.search.SolrIndexSearcher.getDocSetNC(SolrIndexSearcher.java:1178)
at org.apache.solr.search.SolrIndexSearcher.getPositiveDocSet(SolrIndexSearcher.java:818)
</code>```

Each thread uses 36 Mb in the heap, so this makes the heap size grow suddenly and consecutive full GCs append.

I don't understand how it is possible that in the minute following a softCommit 150 queries try to build filter caches whereas at maximum 10 distinct filter queries were executed..

There is no newSearcher or firstSearcher listener configured
useColdSearcher is set to false

I think I need to configure the firstSearcher listener in order to avoid issues at solr startup, but I don't need to configure the newSearcher listener because the 10 most used filter caches are autoWarmed.

Any suggestions ?

In order to reduce this "race condition" when a new searcher is created, we plan to increase autoSoftCommit maxtime and increase a little filterCache size. This should not fix the issue, but reduce its frequency.

Body:
I have a huge sharded collection. Each shard contains 100 millions docs.

Queries are using at maximum 20 filter queries. 10 are very often used and the other not often.
filterCache size is 10 and autoWarmCount is 10.
filterCache statistics are very good except warmupTime is a little long.

"CACHE.searcher.filterCache":{
    "lookups":4048,
    "hits":4048,
    "cumulative_evictions":52,
    "size":10,
    "hitratio":1.0,
    "evictions":0,
    "cumulative_lookups":2048362,
    "cumulative_hitratio":1.0,
    "warmupTime":13956,
    "inserts":0,
    "cumulative_inserts":146,
    "cumulative_hits":2048049},

autoSoftCommit maxtime is 60000
autoCommit maxtime si 300000

softCommits occur nearly each one to 3 minutes according when updates occur.

At some moment (once a day), there is suddenly a threads count spike with more than 150 threads executing the methods building and populating the filter cache.

java.lang.Thread.State: RUNNABLE
at org.apache.lucene.search.ConjunctionDISI.doNext(ConjunctionDISI.java:200)
at org.apache.lucene.search.ConjunctionDISI.nextDoc(ConjunctionDISI.java:240)
at org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:261)
at org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:214)
at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:39)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:670)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:471)
at org.apache.solr.search.DocSetUtil.createDocSetGeneric(DocSetUtil.java:151)
at org.apache.solr.search.DocSetUtil.createDocSet(DocSetUtil.java:140)
at org.apache.solr.search.SolrIndexSearcher.getDocSetNC(SolrIndexSearcher.java:1178)
at org.apache.solr.search.SolrIndexSearcher.getPositiveDocSet(SolrIndexSearcher.java:818)

Each thread uses 36 Mb in the heap, so this makes the heap size grow suddenly and consecutive full GCs append.

I don't understand how it is possible that in the minute following a softCommit 150 queries try to build filter caches whereas at maximum 10 distinct filter queries were executed..

There is no newSearcher or firstSearcher listener configured
useColdSearcher is set to false

I think I need to configure the firstSearcher listener in order to avoid issues at solr startup, but I don't need to configure the newSearcher listener because the 10 most used filter caches are autoWarmed.

Any suggestions ?

In order to reduce this "race condition" when a new searcher is created, we plan to increase autoSoftCommit maxtime and increase a little filterCache size. This should not fix the issue, but reduce its frequency.


来源: stackexchange

问:
how can we get detailed debug statements for perl exe
One of our application is running using perl v5.16.3 and perl.exe is crashing in Windows environment after application ran successfully for couple of hours. I would like to get the maximum debug statements/details possible for the crash.

Need help on how this can be achieved, basically like we do in gdb for other languages, how can we do it for perl ?

In case of C, like we get the coredump and can get the call stack attaching the dump in GDB, is there a similar way to get a perl coredump or additional logging and check the backtrace ?

Sample Code for reference :

```<code>@echo off

set PERL_EXE=perl
set PERL5LIB=

"%PERL_EXE%" "test.pl" %*
</code>```

Perl application crashed after couple of hours.

ContentLicense: CC BY-SA 4.0

Body:
One of our application is running using perl v5.16.3 and perl.exe is crashing in Windows environment after application ran successfully for couple of hours. I would like to get the maximum debug statements/details possible for the crash.

Need help on how this can be achieved, basically like we do in gdb for other languages, how can we do it for perl ?

In case of C, like we get the coredump and can get the call stack attaching the dump in GDB, is there a similar way to get a perl coredump or additional logging and check the backtrace ?

Sample Code for reference :

@echo off

set PERL_EXE=perl
set PERL5LIB=

"%PERL_EXE%" "test.pl" %*

Perl application crashed after couple of hours.


问:
Compiler gives error code in Visual Studio 2022 but compiles fine on other programs/compilers
I get This error on VS 2022 but I ran the program on VS code and on online compilers just fine with no errors.

```<code>Error (active)  E0028   expression must have a constant value   line 64
the value of variable "x" (declared at line 54) cannot be used as a constant
</code>```

I don't really understand what the error means but the code just ran with no problems on other programs/compilers.
I get the feeling that maybe that compiler is more strict so I made a mistake, but if that's the case why did it run normally on other compilers?

This is the code

```<code>#include <iostream>
#include<string>
using namespace std;

class persondata
{
private:
    string lastname, firstname, address, city, phone;
public:
    persondata(string In, string fn, string a, string c, string p) {
        setPData(In, fn, a, c, p);
    }

    void setPData(string In, string fn, string a, string c, string p) {
        firstname = In;
        lastname = fn;
        address = a;
        city = c;
        phone = p;
    }
    void printperson()
    {
        cout << firstname << endl << lastname << endl << address << endl << city << endl << phone;
    };
};
class CustomerData :public persondata
{
private:
    int customernum;
    bool mailinglist;
public:
    CustomerData(string In, string fn, string a, string c, string p) : persondata(In, fn, a, c, p)
    {
        customernum = 0;
        mailinglist = false;
    }
    CustomerData(string In, string fn, string a, string c, string p, int num, bool z) : persondata(In, fn, a, c, p)
    {
        customernum = num;
        mailinglist = z;
    }

    void printcust()
    {
        printperson();

        cout << customernum << endl << mailinglist;
    };
};

int main() {
    int x;
    string In;
    string fn;
    string a;
    string c;
    string p;
    int num;
    bool z;
    cout << "enter num: ";
    cin >> x;
    CustomerData* s[x];  // I get the error here
    for (int i = 0; i < x; i++)
    {
        cin >> In >> fn >> a >> c >> p >> num >> z;
        s[i] = new CustomerData(In, fn, a, c, p, num, 2);
    }
    for (int i = 0; i < x; i++)
    {
        s[i]->printcus();
    }

    return 0;
}

</code>```

I'm not sure weather it's because the VS compiler is more strict or if it's a bug or a problem in the program.

Body:
I get This error on VS 2022 but I ran the program on VS code and on online compilers just fine with no errors.

Error (active)  E0028   expression must have a constant value   line 64
the value of variable "x" (declared at line 54) cannot be used as a constant

I don't really understand what the error means but the code just ran with no problems on other programs/compilers.
I get the feeling that maybe that compiler is more strict so I made a mistake, but if that's the case why did it run normally on other compilers?

This is the code

#include <iostream>
#include<string>
using namespace std;

class persondata
{
private:
    string lastname, firstname, address, city, phone;
public:
    persondata(string In, string fn, string a, string c, string p) {
        setPData(In, fn, a, c, p);
    }

    void setPData(string In, string fn, string a, string c, string p) {
        firstname = In;
        lastname = fn;
        address = a;
        city = c;
        phone = p;
    }
    void printperson()
    {
        cout << firstname << endl << lastname << endl << address << endl << city << endl << phone;
    };
};
class CustomerData :public persondata
{
private:
    int customernum;
    bool mailinglist;
public:
    CustomerData(string In, string fn, string a, string c, string p) : persondata(In, fn, a, c, p)
    {
        customernum = 0;
        mailinglist = false;
    }
    CustomerData(string In, string fn, string a, string c, string p, int num, bool z) : persondata(In, fn, a, c, p)
    {
        customernum = num;
        mailinglist = z;
    }

    void printcust()
    {
        printperson();

        cout << customernum << endl << mailinglist;
    };
};

int main() {
    int x;
    string In;
    string fn;
    string a;
    string c;
    string p;
    int num;
    bool z;
    cout << "enter num: ";
    cin >> x;
    CustomerData* s[x];  // I get the error here
    for (int i = 0; i < x; i++)
    {
        cin >> In >> fn >> a >> c >> p >> num >> z;
        s[i] = new CustomerData(In, fn, a, c, p, num, 2);
    }
    for (int i = 0; i < x; i++)
    {
        s[i]->printcus();
    }

    return 0;
}

I'm not sure weather it's because the VS compiler is more strict or if it's a bug or a problem in the program.


问:
Is ASP.NET Core EphemeralDataProtectionProvider useful for credential protection in memory?
I want to use ASP.NET Core DataProtection, EphemeralDataProtectionProvider, for protection of credentials in memory, to prevent passwords etc. from being leaked through memory dumps, swap files, or to be logged accidentally. Actual password is retrieved from web service; caching in memory to avoid call for every usage. The password shall not be persisted locally.

According to documentation, it's for testing or scripts, but it looks like a good option for memory caching. Is there any catch?
https://learn.microsoft.com/en-us/aspnet/core/security/data-protection/implementation/key-storage-ephemeral?view=aspnetcore-7.0

The applications are supposed to run on Alpine linux containers, currently still .NET 6.0, and locally on Windows for testing.

Security features to be implemented:

Different purposes paths if different users/access rights exist in the application.

only unique service access in many cases.

Passwords in char arrays instead of strings, overwrite immediately after use, through a DisposableArray and using blocks.

To SecureString class where usable.

Known possible leaks (I know it's not 100% safe, but shall make attacks harder):

dump/swap creation while password still in array.

Basic HttpClient authentication requires string; immutable and lack of erasing (GC cleanup doesn't erase).

Currently for applications still having user-password credentials, but could be extended to other confidential data, too.


问:
Create and center a small ListRowSeparator
I have a list that currently has the listRowSeparator hidden to keep the UI clean. I thought maybe I could add a listRowSeparator but given the new features in iOS 16 maybe I could aim to get a small separator centered in between cells in the list.

I tried playing with the different options of .alignmentGuide, for example:

```<code>List(0..<51) { i in
    Label("Row \(i)", systemImage: "\(i).circle")
        .alignmentGuide(.listRowSeparatorLeading) { d in
            d[.leading]
        }
}
</code>```

or

```<code>List(0..<51) { i in
    Label("Row \(i)", systemImage: "\(i).circle")
        .alignmentGuide(.listRowSeparatorTrailing) { _ in
            100
        }
}
</code>```

And trying to use d[.center] in the first case, or a combination of the size (100 in the example) and change .listRowSeparatorTrailing to .listRowSeparatorLeading. But not luck. In some cases it follows the text, and if it's short then it stops with the text, in some other it assigned random length for no apparent reason.

Is there any way to get the separator to be a small line (maybe 1/4 of the overall width of the cell) regardless of the text?

The code I'm using for the list is:

```<code>List {
    ForEach(section) { tip in
        VStack(alignment: .leading) {
            Spacer()
            Text(tip.amount!).font(.body).padding(.bottom, 1)
                .alignmentGuide(.listRowSeparatorTrailing) {
                            $0[.center]  // ---> this is not correct
                }
            Spacer()
        }
    }
    //.listRowSeparator(.hidden)
}
</code>```

In the meantime I'm using this, but it's less than ideal since I can't get the vertical space correct:

```<code>HStack {
          Spacer()
          VStack {
               Divider()
                  .frame(width: 100, alignment: .center)
          }
          Spacer()
</code>```

}

EDIT: Screenshots requested.

With .listRowSeparatorLeading

With .listRowSeparatorTrailing

Body:
I have a list that currently has the listRowSeparator hidden to keep the UI clean. I thought maybe I could add a listRowSeparator but given the new features in iOS 16 maybe I could aim to get a small separator centered in between cells in the list.

I tried playing with the different options of .alignmentGuide, for example:

List(0..<51) { i in
    Label("Row \(i)", systemImage: "\(i).circle")
        .alignmentGuide(.listRowSeparatorLeading) { d in
            d[.leading]
        }
}

or

List(0..<51) { i in
    Label("Row \(i)", systemImage: "\(i).circle")
        .alignmentGuide(.listRowSeparatorTrailing) { _ in
            100
        }
}

And trying to use d[.center] in the first case, or a combination of the size (100 in the example) and change .listRowSeparatorTrailing to .listRowSeparatorLeading. But not luck. In some cases it follows the text, and if it's short then it stops with the text, in some other it assigned random length for no apparent reason.

Is there any way to get the separator to be a small line (maybe 1/4 of the overall width of the cell) regardless of the text?

The code I'm using for the list is:

List {
    ForEach(section) { tip in
        VStack(alignment: .leading) {
            Spacer()
            Text(tip.amount!).font(.body).padding(.bottom, 1)
                .alignmentGuide(.listRowSeparatorTrailing) {
                            $0[.center]  // ---> this is not correct
                }
            Spacer()
        }
    }
    //.listRowSeparator(.hidden)
}

In the meantime I'm using this, but it's less than ideal since I can't get the vertical space correct:

HStack {
          Spacer()
          VStack {
               Divider()
                  .frame(width: 100, alignment: .center)
          }
          Spacer()

}

EDIT: Screenshots requested.

With .listRowSeparatorLeading

With .listRowSeparatorTrailing


问:
Liferay: How to change the textarea for ckeditor in the portal's own pages?
I need the CKEditor field to appear by default in the portal property pages instead of the textarea fields.

For example, in the Categories page when you create a Category there are 2 fields (name and description), so the description field should be a CKEditor instead of textarea.

I have tried to add these lines in the portal-ext.properties file but without results:

```<code>editor.wysiwyg.default=ckeditor
editor.wysiwyg.portal-impl.portlet.ddm.text_html.ftl=ckeditor
editor.wysiwyg.portal-impl.portlet.ddm.text_html.textarea=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.blogs.edit_entry.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.journal.edit_article_content.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.announcements.edit_entry.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.mail.edit.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.mail.edit_message.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.taglib.ui.discussion.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.taglib.ui.email_notification_settings.jsp=ckeditor
</code>```

If it were a default widget I could make a hook/fragment but we are talking about an element of a page of the portal, do you think it is possible?

Body:
I need the CKEditor field to appear by default in the portal property pages instead of the textarea fields.

For example, in the Categories page when you create a Category there are 2 fields (name and description), so the description field should be a CKEditor instead of textarea.

I have tried to add these lines in the portal-ext.properties file but without results:

editor.wysiwyg.default=ckeditor
editor.wysiwyg.portal-impl.portlet.ddm.text_html.ftl=ckeditor
editor.wysiwyg.portal-impl.portlet.ddm.text_html.textarea=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.blogs.edit_entry.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.journal.edit_article_content.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.announcements.edit_entry.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.mail.edit.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.portlet.mail.edit_message.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.taglib.ui.discussion.jsp=ckeditor
editor.wysiwyg.portal-web.docroot.html.taglib.ui.email_notification_settings.jsp=ckeditor

If it were a default widget I could make a hook/fragment but we are talking about an element of a page of the portal, do you think it is possible?


问:
How to use provided SSL Certificate files to install SSL on NGINX
I have purchased a SSL certificate from my VPS provider for https security of my web application and I have got five(5) files from them such as:

certificate.key

certificate.csr

certificate.crt

certificate.pfx

certificate_chain.crt

And they told my to install the SSL myself but honestly I don't know how to do it. More especially the NGINX configuration file that is located on /etc/nginx/sites-available/ directory.
Bellow is the structure of the nginx configuration file. It is just to have an idea on how the nginx file is structed.

```<code>upstream django {
    server unix:///my_project_path/file.sock; # for a file socket
}

# configuration of the server
server {
    # the port your site will be served on
    listen      80;
    # the domain name it will serve for
    server_name my_server_name;
    charset     utf-8;

    # max upload size
    client_max_body_size 75M;

    # Django media
    location /media  {
        alias /my_project_path/media;
    }

    location /static {
        alias /my_project_path/static;
    }

    location / {
        uwsgi_pass  django;
        include     /my_project_path/uwsgi_params;
    }
}
</code>```

Questions are:

How can I install the SSL certificate based on these files aforementioned?

Should I use another nginx configuration file or I have to use the same, please?

Please assist me on how to install the SSL certificate?

Thanks

Body:
I have purchased a SSL certificate from my VPS provider for https security of my web application and I have got five(5) files from them such as:

certificate.key

certificate.csr

certificate.crt

certificate.pfx

certificate_chain.crt

And they told my to install the SSL myself but honestly I don't know how to do it. More especially the NGINX configuration file that is located on /etc/nginx/sites-available/ directory.
Bellow is the structure of the nginx configuration file. It is just to have an idea on how the nginx file is structed.

upstream django {
    server unix:///my_project_path/file.sock; # for a file socket
}

# configuration of the server
server {
    # the port your site will be served on
    listen      80;
    # the domain name it will serve for
    server_name my_server_name;
    charset     utf-8;

    # max upload size
    client_max_body_size 75M;

    # Django media
    location /media  {
        alias /my_project_path/media;
    }

    location /static {
        alias /my_project_path/static;
    }

    location / {
        uwsgi_pass  django;
        include     /my_project_path/uwsgi_params;
    }
}

Questions are:

How can I install the SSL certificate based on these files aforementioned?

Should I use another nginx configuration file or I have to use the same, please?

Please assist me on how to install the SSL certificate?

Thanks


问:
How to prevent unwind from unwinding fields removed with $project
I'm trying to use unwind in the following code but this results in a list longer than expected .

For instance:The lookup returns an array with 6 objects and after performing the unwind, it returns 20+ documents in the app and 10 in mongodb Atlas (I guess this is the max since it's the example window).

What I really need is that the unwind only returns the original 6 documents but with the subject array dispersed in all of them.(Which kinda does except that it repeats the documents)

```<code>[
  {
    '$match': {
      'student': '63938a5202c86f10ad890740'
    }
  }, {
    '$project': {
      'student': 1,
      'partialGrades': 1,
      'finalGrade': 1,
      'group': 1
    }
  }, {
    '$lookup': {
      'from': 'classrooms',
      'localField': 'group',
      'foreignField': 'group',
      'as': 'subject'
    }
  }, {
    '$project': {
      'subject.teacher': 0,
      'subject.group': 0,
      'subject._id': 0
    }
  }, {
    '$unwind': {
      'path': '$subject',
      'preserveNullAndEmptyArrays': false
    }
  }
]
</code>```

Body:
I'm trying to use unwind in the following code but this results in a list longer than expected .

For instance:The lookup returns an array with 6 objects and after performing the unwind, it returns 20+ documents in the app and 10 in mongodb Atlas (I guess this is the max since it's the example window).

What I really need is that the unwind only returns the original 6 documents but with the subject array dispersed in all of them.(Which kinda does except that it repeats the documents)

[
  {
    '$match': {
      'student': '63938a5202c86f10ad890740'
    }
  }, {
    '$project': {
      'student': 1,
      'partialGrades': 1,
      'finalGrade': 1,
      'group': 1
    }
  }, {
    '$lookup': {
      'from': 'classrooms',
      'localField': 'group',
      'foreignField': 'group',
      'as': 'subject'
    }
  }, {
    '$project': {
      'subject.teacher': 0,
      'subject.group': 0,
      'subject._id': 0
    }
  }, {
    '$unwind': {
      'path': '$subject',
      'preserveNullAndEmptyArrays': false
    }
  }
]


问:
How to record video in ARView(Reality Kit)?
I'm using ReplayKit RPScreenRecorder but it's recording whole screen, which is not my requirement, my requirement is to record ARView area only.</p>


问:
react-select Type 'StateManagedSelect' is not generic
I am totally newbie using react. I am tried to modify per my requeriments a fork of twilio-react-demo-conversations app.

Here is what I have

```<code>import { ModalBody, Box } from "@twilio-paste/core";
import { RefObject, useState } from "react";
import ModalInputField from "./ModalInputField";
import AddParticipantFooter from "./addParticipantFooter";
import { ActionName } from "../../types";
import ConvoModal from "./ConvoModal";
import Select from "react-select";
import ValueType from "react-select";

interface AddWhatsAppParticipantModalProps {
  name: string;
  isModalOpen: boolean;
  title: string;
  proxyName: string;
  setName: (name: string) => void;
  setProxyName: (name: string) => void;
  error: string;
  errorProxy: string;
  nameInputRef: RefObject<HTMLInputElement>;
  onBack: () => void;
  action: () => void;
  handleClose: () => void;
}

type OptionType = {
  value: string;
  label: string;
};

const twilio_numbers: OptionType[] = [
  { value: "0000000000", label: "0000000000" },
];

const AddWhatsAppParticipantModal: React.FC<AddWhatsAppParticipantModalProps> =
  (props: AddWhatsAppParticipantModalProps) => {
    // SELECT BOX
    const [selectedOption, setSelectedOption] =
      useState<ValueType<OptionType>>();

    const handleChange = (option: ValueType<OptionType>) => {
      setSelectedOption(option);
    };

    return (
      <>
        <ConvoModal
          handleClose={() => props.handleClose()}
          isModalOpen={props.isModalOpen}
          title={props.title}
          modalBody={
            <ModalBody>
              <h3>Añadir Participante de WhatsApp</h3>
              <Box as="form">
                <ModalInputField
                  isFocused={true}
                  label="WhatsApp del Contacto"
                  input={props.name}
                  placeholder="2222222222"
                  onChange={props.setName}
                  error={props.error}
                  help_text="El número WhatsApp del Participante."
                  prefixType="WhatsApp"
                />
                <Select
                  options={twilio_numbers}
                  value={selectedOption as ValueType<OptionType>}
                  onChange={(option) => handleChange(option)}
                />
              </Box>
            </ModalBody>
          }
          modalFooter={
            <AddParticipantFooter
              isSaveDisabled={
                !props.name.trim() || !props.proxyName.trim() || !!props.error
              }
              actionName={ActionName.Save}
              onBack={() => {
                props.onBack();
              }}
              action={props.action}
            />
          }
        />
      </>
    );
  };

export default AddWhatsAppParticipantModal;
</code>```

Error:

```<code>Type 'StateManagedSelect' is not generic.
    36 |     // SELECT BOX
    37 |     const [selectedOption, setSelectedOption] =
  > 38 |       useState<ValueType<OptionType>>();
       |                ^^^^^^^^^^^^^^^^^^^^^
    39 |
    40 |     const handleChange = (option: ValueType<OptionType>) => {
    41 |       setSelectedOption(option);

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
</code>```

The original file is here: https://github.com/twilio/twilio-conversations-demo-react/blob/main/src/components/modals/addWhatsAppParticipant.tsx

Here is an example that I found here what was a guide for me: https://codesandbox.io/s/angry-frost-5bh1o?file=/src/App.tsx:444-478

Also, I found a similar question but no answer yet -> Type 'StateManagedSelect' is not generic

What do I need: I need a select box which replaces the input field that push props.proxyName / setProxyName. I want to display a predetermined list of phone numbers instead write one.

Thanks and sorry if my english is bad.
Best regards

Body:
I am totally newbie using react. I am tried to modify per my requeriments a fork of twilio-react-demo-conversations app.

Here is what I have

import { ModalBody, Box } from "@twilio-paste/core";
import { RefObject, useState } from "react";
import ModalInputField from "./ModalInputField";
import AddParticipantFooter from "./addParticipantFooter";
import { ActionName } from "../../types";
import ConvoModal from "./ConvoModal";
import Select from "react-select";
import ValueType from "react-select";

interface AddWhatsAppParticipantModalProps {
  name: string;
  isModalOpen: boolean;
  title: string;
  proxyName: string;
  setName: (name: string) => void;
  setProxyName: (name: string) => void;
  error: string;
  errorProxy: string;
  nameInputRef: RefObject<HTMLInputElement>;
  onBack: () => void;
  action: () => void;
  handleClose: () => void;
}

type OptionType = {
  value: string;
  label: string;
};

const twilio_numbers: OptionType[] = [
  { value: "0000000000", label: "0000000000" },
];

const AddWhatsAppParticipantModal: React.FC<AddWhatsAppParticipantModalProps> =
  (props: AddWhatsAppParticipantModalProps) => {
    // SELECT BOX
    const [selectedOption, setSelectedOption] =
      useState<ValueType<OptionType>>();

    const handleChange = (option: ValueType<OptionType>) => {
      setSelectedOption(option);
    };

    return (
      <>
        <ConvoModal
          handleClose={() => props.handleClose()}
          isModalOpen={props.isModalOpen}
          title={props.title}
          modalBody={
            <ModalBody>

Añadir Participante de WhatsApp

              <Box as="form">
                <ModalInputField
                  isFocused={true}
                  label="WhatsApp del Contacto"
                  input={props.name}
                  placeholder="2222222222"
                  onChange={props.setName}
                  error={props.error}
                  help_text="El número WhatsApp del Participante."
                  prefixType="WhatsApp"
                />
                <Select
                  options={twilio_numbers}
                  value={selectedOption as ValueType<OptionType>}
                  onChange={(option) => handleChange(option)}
                />
              </Box>
            </ModalBody>
          }
          modalFooter={
            <AddParticipantFooter
              isSaveDisabled={
                !props.name.trim() || !props.proxyName.trim() || !!props.error
              }
              actionName={ActionName.Save}
              onBack={() => {
                props.onBack();
              }}
              action={props.action}
            />
          }
        />
      </>
    );
  };

export default AddWhatsAppParticipantModal;

Error:

Type 'StateManagedSelect' is not generic.
    36 |     // SELECT BOX
    37 |     const [selectedOption, setSelectedOption] =
  > 38 |       useState<ValueType<OptionType>>();
       |                ^^^^^^^^^^^^^^^^^^^^^
    39 |
    40 |     const handleChange = (option: ValueType<OptionType>) => {
    41 |       setSelectedOption(option);

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

The original file is here: https://github.com/twilio/twilio-conversations-demo-react/blob/main/src/components/modals/addWhatsAppParticipant.tsx

Here is an example that I found here what was a guide for me: https://codesandbox.io/s/angry-frost-5bh1o?file=/src/App.tsx:444-478

Also, I found a similar question but no answer yet -> Type 'StateManagedSelect' is not generic

What do I need: I need a select box which replaces the input field that push props.proxyName / setProxyName. I want to display a predetermined list of phone numbers instead write one.

Thanks and sorry if my english is bad.
Best regards


问:
What's the purpose of default pa_mainloop thread in QT?
I write a helloworld of QAudioOutput by QT5.15.2 like this:

`

```<code>#include <QCoreApplication>
#include <QAudioOutput>

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    QAudioOutput *m_pAudioOutput = nullptr;
    QIODevice *m_pAudioDevice = nullptr;

    QAudioDeviceInfo info(QAudioDeviceInfo::defaultOutputDevice());
    if (info.deviceName().isEmpty())
    {
        qInfo() << "No default auido output device available!";
        return 0;
    }

    return a.exec();
}
</code>```

`
Then run it on Debian 10.9 x64, and gdb attach to the process, show threads:

`

```<code>(gdb) info threads
  Id   Target Id                                        Frame
* 1    Thread 0x7f62b082d8c0 (LWP 12787) "HelloQtAudio" 0x00007f62b2753589 in __GI___poll (fds=0x5562098188a0, nfds=1,
    timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
  2    Thread 0x7f62b0513700 (LWP 12788) "threaded-ml"  0x00007f62b2753589 in __GI___poll (fds=0x7f62a4007030, nfds=3,
    timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
(gdb) thread 2
[Switching to thread 2 (Thread 0x7f62b0513700 (LWP 12788))]
#0  0x00007f62b2753589 in __GI___poll (fds=0x7f62a4007030, nfds=3, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
29  in ../sysdeps/unix/sysv/linux/poll.c
(gdb) bt
#0  0x00007f62b2753589 in __GI___poll (fds=0x7f62a4007030, nfds=3, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f62b263f131 in ?? () from /lib/x86_64-linux-gnu/libpulse.so.0
#2  0x00007f62b26309a0 in pa_mainloop_poll () from /lib/x86_64-linux-gnu/libpulse.so.0
#3  0x00007f62b2630fee in pa_mainloop_iterate () from /lib/x86_64-linux-gnu/libpulse.so.0
#4  0x00007f62b26310a0 in pa_mainloop_run () from /lib/x86_64-linux-gnu/libpulse.so.0
#5  0x00007f62b263f079 in ?? () from /lib/x86_64-linux-gnu/libpulse.so.0
#6  0x00007f62b22d3468 in ?? () from /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-12.2.so
#7  0x00007f62b2b4ffa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
#8  0x00007f62b275deff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb)
</code>```

`

I do nothing in my main, why does QT starts a pa_mainloop_run thread? Is it usable?
Then if call m_pAudioOutput->start(), it start another same thread, does it means a thread pool increasing workers?

I'm trying to resolve an alsa underrun bug in audio playback.

Body:
I write a helloworld of QAudioOutput by QT5.15.2 like this:

`

#include <QCoreApplication>
#include <QAudioOutput>

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    QAudioOutput *m_pAudioOutput = nullptr;
    QIODevice *m_pAudioDevice = nullptr;

    QAudioDeviceInfo info(QAudioDeviceInfo::defaultOutputDevice());
    if (info.deviceName().isEmpty())
    {
        qInfo() << "No default auido output device available!";
        return 0;
    }

    return a.exec();
}

`
Then run it on Debian 10.9 x64, and gdb attach to the process, show threads:

`

(gdb) info threads
  Id   Target Id                                        Frame
* 1    Thread 0x7f62b082d8c0 (LWP 12787) "HelloQtAudio" 0x00007f62b2753589 in __GI___poll (fds=0x5562098188a0, nfds=1,
    timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
  2    Thread 0x7f62b0513700 (LWP 12788) "threaded-ml"  0x00007f62b2753589 in __GI___poll (fds=0x7f62a4007030, nfds=3,
    timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
(gdb) thread 2
[Switching to thread 2 (Thread 0x7f62b0513700 (LWP 12788))]
#0  0x00007f62b2753589 in __GI___poll (fds=0x7f62a4007030, nfds=3, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
29  in ../sysdeps/unix/sysv/linux/poll.c
(gdb) bt
#0  0x00007f62b2753589 in __GI___poll (fds=0x7f62a4007030, nfds=3, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f62b263f131 in ?? () from /lib/x86_64-linux-gnu/libpulse.so.0
#2  0x00007f62b26309a0 in pa_mainloop_poll () from /lib/x86_64-linux-gnu/libpulse.so.0
#3  0x00007f62b2630fee in pa_mainloop_iterate () from /lib/x86_64-linux-gnu/libpulse.so.0
#4  0x00007f62b26310a0 in pa_mainloop_run () from /lib/x86_64-linux-gnu/libpulse.so.0
#5  0x00007f62b263f079 in ?? () from /lib/x86_64-linux-gnu/libpulse.so.0
#6  0x00007f62b22d3468 in ?? () from /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-12.2.so
#7  0x00007f62b2b4ffa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
#8  0x00007f62b275deff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb)

`

I do nothing in my main, why does QT starts a pa_mainloop_run thread? Is it usable?
Then if call m_pAudioOutput->start(), it start another same thread, does it means a thread pool increasing workers?

I'm trying to resolve an alsa underrun bug in audio playback.


问:
Scheduler Service of JBoss
How to find the value for SchedulePeriod?

File name: Scheduler-service.xml

```<code><mbean code="com.jps.svc.WebServiceClient"
           name="com.jps.svc:service=WebServiceClient">
    </mbean>
    <mbean code="org.jboss.varia.scheduler.Scheduler"
           name="com.jps.svc:service=WebServiceClientScheduler">

<attribute name="StartAtStartup">true</attribute>

<attribute name="SchedulableClass">com.jps.svc.WebServiceClient</attribute>

<attribute name="InitialStartDate">NOW</attribute>

<attribute name="SchedulePeriod">${ws.scheduler.time}</attribute>

 <attribute name="InitialRepetitions">-1</attribute>
        <depends>com.jps.svc:service=WebApiCapService</depends>
    </mbean>
</server>
</code>```

Title: Scheduler Service of JBoss

Body:
How to find the value for SchedulePeriod?

File name: Scheduler-service.xml

<mbean code="com.jps.svc.WebServiceClient"
           name="com.jps.svc:service=WebServiceClient">
    </mbean>
    <mbean code="org.jboss.varia.scheduler.Scheduler"
           name="com.jps.svc:service=WebServiceClientScheduler">

<attribute name="StartAtStartup">true</attribute>

<attribute name="SchedulableClass">com.jps.svc.WebServiceClient</attribute>

<attribute name="InitialStartDate">NOW</attribute>

<attribute name="SchedulePeriod">${ws.scheduler.time}</attribute>

 <attribute name="InitialRepetitions">-1</attribute>
        <depends>com.jps.svc:service=WebApiCapService</depends>
    </mbean>
</server>


问:
Standard Logic App "Workflow '' not found"
I'm facing an issue working on standard logic apps. We created a bicep deployment to create all the resources.

Using az cli I'm able to deploy src (a total of 5 workflows), can see the list, enter any ws and edit it, but if I press on run I get

and later I noticed that event the overview tab for each ws has a strange behaviour.
The bottom part (get started tab, run history for example) isn't loading, but no error is displayed

and this happens in az cli deployes ws but in manual created too (under same logic app resource).

I tried to create another las (from portal) and i was able to create a new one and see those tabs.

The main difference between those to instances is that the bicep one is under vnet, but all related resources are in the same vnet aswell.

That's the bicep i'm using

```<code>param env string
param location string = resourceGroup().location
param aspId string
param private bool
param subnetResourceId string = ''
param privateDNSZonesIds object = {}
param lasConfig object
param storageConnectionString string

param vnetDnsServer string
param vnetDnsAltServer string

var name = 'lasintranet${env}'

var portaleName = 'webcontents-portale'
var erpName = 'webcontents-erp'
var hashifyName = 'hashifyip'

resource portaleConnector 'Microsoft.Web/connections@2016-06-01' existing = {
  name: portaleName
  scope: resourceGroup()
}

resource erpConnector 'Microsoft.Web/connections@2016-06-01' existing = {
  name: erpName
  scope: resourceGroup()
}

resource hashifyConnector 'Microsoft.Web/connections@2016-06-01' existing = {
  name: hashifyName
  scope: resourceGroup()
}

var privateAppsettings = [
  {
    name: 'AzureWebJobsStorage'
    value: storageConnectionString
  }
  {
    name: 'FUNCTIONS_EXTENSION_VERSION'
    value: '~4'
  }
  {
    name: 'FUNCTIONS_WORKER_RUNTIME'
    value: 'node'
  }
  {
    name: 'WEBSITE_NODE_DEFAULT_VERSION'
    value: '~14'
  }
  {
    name: 'AzureFunctionsJobHost__extensionBundle__id'
    value: 'Microsoft.Azure.Functions.ExtensionBundle.Workflows'
  }
  {
    name: 'AzureFunctionsJobHost__extensionBundle__version'
    value: '[1.*, 2.0.0)'
  }
  {
    name: 'APP_KIND'
    value: 'workflowApp'
  }
  {
    name: 'FUNCTIONS_V2_COMPATIBILITY_MODE'
    value: 'true'
  }
  {
    name: 'WORKFLOWS_SUBSCRIPTION_ID'
    value: subscription().subscriptionId
  }
  {
    name: 'WORKFLOWS_RESOURCE_GROUP_NAME'
    value: resourceGroup().name
  }
  {
    name: 'WORKFLOWS_LOCATION_NAME'
    value: location
  }
  {
    name: 'WEBSITE_CONTENTOVERVNET'
    value: '1'
  }
  // {
  //   name: 'WEBSITE_DNS_SERVER'
  //   value: vnetDnsServer
  // }
  // {
  //   name: 'WEBSITE_DNS_ALT_SERVER'
  //   value: vnetDnsAltServer
  // }
  {
    name: 'CONNECTIONS_HASHIFYIP_RUNTIMEURL'
    #disable-next-line BCP053
    value: hashifyConnector.properties.connectionRuntimeUrl
  }
  {
    name: 'CONNECTIONS_WEBCONTENTSERP_RUNTIMEURL'
    #disable-next-line BCP053
    value: erpConnector.properties.connectionRuntimeUrl
  }
  {
    name: 'CONNECTIONS_WEBCONTENTSPORTALE_RUNTIMEURL'
    #disable-next-line BCP053
    value: portaleConnector.properties.connectionRuntimeUrl
  }
  {
    name: 'WEBSITE_CONTENTAZUREFILECONNECTIONSTRING'
    value: storageConnectionString
  }
  {
    name: 'WEBSITE_CONTENTSHARE'
    value: 'lasintranet${env}-contentshare'
  }
]

var publicAppsettings = [
  {
    name: 'AzureWebJobsStorage'
    value: storageConnectionString
  }
  {
    name: 'FUNCTIONS_EXTENSION_VERSION'
    value: '~3'
  }
  {
    name: 'FUNCTIONS_WORKER_RUNTIME'
    value: 'node'
  }
  {
    name: 'WEBSITE_NODE_DEFAULT_VERSION'
    value: '~14'
  }
  {
    name: 'AzureFunctionsJobHost__extensionBundle__id'
    value: 'Microsoft.Azure.Functions.ExtensionBundle.Workflows'
  }
  {
    name: 'AzureFunctionsJobHost__extensionBundle__version'
    value: '[1.*, 2.0.0)'
  }
  {
    name: 'APP_KIND'
    value: 'workflowApp'
  }
  {
    name: 'FUNCTIONS_V2_COMPATIBILITY_MODE'
    value: 'true'
  }
  {
    name: 'WORKFLOWS_SUBSCRIPTION_ID'
    value: subscription().subscriptionId
  }
  {
    name: 'WORKFLOWS_RESOURCE_GROUP_NAME'
    value: resourceGroup().name
  }
  {
    name: 'CONNECTIONS_HASHIFYIP_RUNTIMEURL'
    #disable-next-line BCP053
    value: hashifyConnector.properties.connectionRuntimeUrl
  }
  {
    name: 'CONNECTIONS_WEBCONTENTSERP_RUNTIMEURL'
    #disable-next-line BCP053
    value: erpConnector.properties.connectionRuntimeUrl
  }
  {
    name: 'CONNECTIONS_WEBCONTENTSPORTALE_RUNTIMEURL'
    #disable-next-line BCP053
    value: portaleConnector.properties.connectionRuntimeUrl
  }
  {
    name: 'WEBSITE_CONTENTAZUREFILECONNECTIONSTRING'
    value: storageConnectionString
  }
  {
    name: 'WEBSITE_CONTENTSHARE'
    value: 'lasintranet${env}-contentshare'
  }
]

resource logicAppDeploy 'Microsoft.Web/sites@2021-03-01' = {
  name: name
  location: location
  kind: 'functionapp,workflowapp'
  identity: {
    type: 'SystemAssigned'
  }
  properties: {
    serverFarmId: aspId
    siteConfig: {
      appSettings: private ? privateAppsettings : publicAppsettings
      vnetRouteAllEnabled: private ? true : null
      cors: {
        allowedOrigins: [
          '*'
        ]
      }
    }
    virtualNetworkSubnetId: private ? lasConfig.logicAppSubnetResourceId : null
    clientAffinityEnabled: false
  }
}

output logicAppId string = logicAppDeploy.id

resource privateEndpoint 'Microsoft.Network/privateEndpoints@2022-05-01' = if (private) {
  name: '${name}-pe'
  location: location
  dependsOn: []
  properties: {
    privateLinkServiceConnections: [
      {
        name: '${name}-pe'
        properties: {
          privateLinkServiceId: logicAppDeploy.id
          groupIds: [
            'sites'
          ]
        }
      }
    ]
    subnet: private ? { id: subnetResourceId } : {}
  }
}

output peName string = privateEndpoint.name

resource dnsRecord 'Microsoft.Network/privateEndpoints/privateDnsZoneGroups@2022-05-01' = if (private) {
  name: '${privateEndpoint.name}/default'
  dependsOn: []
  properties: {
    privateDnsZoneConfigs: [
      {
        name: privateEndpoint.name
        properties: {
          privateDnsZoneId: privateDNSZonesIds.sites
        }
      }
    ]
  }
}

output lasPrincipalId string = logicAppDeploy.identity.principalId

</code>```

What may I be missing?

Body:
I'm facing an issue working on standard logic apps. We created a bicep deployment to create all the resources.

Using az cli I'm able to deploy src (a total of 5 workflows), can see the list, enter any ws and edit it, but if I press on run I get

and later I noticed that event the overview tab for each ws has a strange behaviour.
The bottom part (get started tab, run history for example) isn't loading, but no error is displayed

and this happens in az cli deployes ws but in manual created too (under same logic app resource).

I tried to create another las (from portal) and i was able to create a new one and see those tabs.

The main difference between those to instances is that the bicep one is under vnet, but all related resources are in the same vnet aswell.

That's the bicep i'm using

param env string
param location string = resourceGroup().location
param aspId string
param private bool
param subnetResourceId string = ''
param privateDNSZonesIds object = {}
param lasConfig object
param storageConnectionString string

param vnetDnsServer string
param vnetDnsAltServer string

var name = 'lasintranet${env}'

var portaleName = 'webcontents-portale'
var erpName = 'webcontents-erp'
var hashifyName = 'hashifyip'

resource portaleConnector 'Microsoft.Web/connections@2016-06-01' existing = {
  name: portaleName
  scope: resourceGroup()
}

resource erpConnector 'Microsoft.Web/connections@2016-06-01' existing = {
  name: erpName
  scope: resourceGroup()
}

resource hashifyConnector 'Microsoft.Web/connections@2016-06-01' existing = {
  name: hashifyName
  scope: resourceGroup()
}

var privateAppsettings = [
  {
    name: 'AzureWebJobsStorage'
    value: storageConnectionString
  }
  {
    name: 'FUNCTIONS_EXTENSION_VERSION'
    value: '~4'
  }
  {
    name: 'FUNCTIONS_WORKER_RUNTIME'
    value: 'node'
  }
  {
    name: 'WEBSITE_NODE_DEFAULT_VERSION'
    value: '~14'
  }
  {
    name: 'AzureFunctionsJobHost__extensionBundle__id'
    value: 'Microsoft.Azure.Functions.ExtensionBundle.Workflows'
  }
  {
    name: 'AzureFunctionsJobHost__extensionBundle__version'
    value: '[1.*, 2.0.0)'
  }
  {
    name: 'APP_KIND'
    value: 'workflowApp'
  }
  {
    name: 'FUNCTIONS_V2_COMPATIBILITY_MODE'
    value: 'true'
  }
  {
    name: 'WORKFLOWS_SUBSCRIPTION_ID'
    value: subscription().subscriptionId
  }
  {
    name: 'WORKFLOWS_RESOURCE_GROUP_NAME'
    value: resourceGroup().name
  }
  {
    name: 'WORKFLOWS_LOCATION_NAME'
    value: location
  }
  {
    name: 'WEBSITE_CONTENTOVERVNET'
    value: '1'
  }
  // {
  //   name: 'WEBSITE_DNS_SERVER'
  //   value: vnetDnsServer
  // }
  // {
  //   name: 'WEBSITE_DNS_ALT_SERVER'
  //   value: vnetDnsAltServer
  // }
  {
    name: 'CONNECTIONS_HASHIFYIP_RUNTIMEURL'
    #disable-next-line BCP053
    value: hashifyConnector.properties.connectionRuntimeUrl
  }
  {
    name: 'CONNECTIONS_WEBCONTENTSERP_RUNTIMEURL'
    #disable-next-line BCP053
    value: erpConnector.properties.connectionRuntimeUrl
  }
  {
    name: 'CONNECTIONS_WEBCONTENTSPORTALE_RUNTIMEURL'
    #disable-next-line BCP053
    value: portaleConnector.properties.connectionRuntimeUrl
  }
  {
    name: 'WEBSITE_CONTENTAZUREFILECONNECTIONSTRING'
    value: storageConnectionString
  }
  {
    name: 'WEBSITE_CONTENTSHARE'
    value: 'lasintranet${env}-contentshare'
  }
]

var publicAppsettings = [
  {
    name: 'AzureWebJobsStorage'
    value: storageConnectionString
  }
  {
    name: 'FUNCTIONS_EXTENSION_VERSION'
    value: '~3'
  }
  {
    name: 'FUNCTIONS_WORKER_RUNTIME'
    value: 'node'
  }
  {
    name: 'WEBSITE_NODE_DEFAULT_VERSION'
    value: '~14'
  }
  {
    name: 'AzureFunctionsJobHost__extensionBundle__id'
    value: 'Microsoft.Azure.Functions.ExtensionBundle.Workflows'
  }
  {
    name: 'AzureFunctionsJobHost__extensionBundle__version'
    value: '[1.*, 2.0.0)'
  }
  {
    name: 'APP_KIND'
    value: 'workflowApp'
  }
  {
    name: 'FUNCTIONS_V2_COMPATIBILITY_MODE'
    value: 'true'
  }
  {
    name: 'WORKFLOWS_SUBSCRIPTION_ID'
    value: subscription().subscriptionId
  }
  {
    name: 'WORKFLOWS_RESOURCE_GROUP_NAME'
    value: resourceGroup().name
  }
  {
    name: 'CONNECTIONS_HASHIFYIP_RUNTIMEURL'
    #disable-next-line BCP053
    value: hashifyConnector.properties.connectionRuntimeUrl
  }
  {
    name: 'CONNECTIONS_WEBCONTENTSERP_RUNTIMEURL'
    #disable-next-line BCP053
    value: erpConnector.properties.connectionRuntimeUrl
  }
  {
    name: 'CONNECTIONS_WEBCONTENTSPORTALE_RUNTIMEURL'
    #disable-next-line BCP053
    value: portaleConnector.properties.connectionRuntimeUrl
  }
  {
    name: 'WEBSITE_CONTENTAZUREFILECONNECTIONSTRING'
    value: storageConnectionString
  }
  {
    name: 'WEBSITE_CONTENTSHARE'
    value: 'lasintranet${env}-contentshare'
  }
]

resource logicAppDeploy 'Microsoft.Web/sites@2021-03-01' = {
  name: name
  location: location
  kind: 'functionapp,workflowapp'
  identity: {
    type: 'SystemAssigned'
  }
  properties: {
    serverFarmId: aspId
    siteConfig: {
      appSettings: private ? privateAppsettings : publicAppsettings
      vnetRouteAllEnabled: private ? true : null
      cors: {
        allowedOrigins: [
          '*'
        ]
      }
    }
    virtualNetworkSubnetId: private ? lasConfig.logicAppSubnetResourceId : null
    clientAffinityEnabled: false
  }
}

output logicAppId string = logicAppDeploy.id

resource privateEndpoint 'Microsoft.Network/privateEndpoints@2022-05-01' = if (private) {
  name: '${name}-pe'
  location: location
  dependsOn: []
  properties: {
    privateLinkServiceConnections: [
      {
        name: '${name}-pe'
        properties: {
          privateLinkServiceId: logicAppDeploy.id
          groupIds: [
            'sites'
          ]
        }
      }
    ]
    subnet: private ? { id: subnetResourceId } : {}
  }
}

output peName string = privateEndpoint.name

resource dnsRecord 'Microsoft.Network/privateEndpoints/privateDnsZoneGroups@2022-05-01' = if (private) {
  name: '${privateEndpoint.name}/default'
  dependsOn: []
  properties: {
    privateDnsZoneConfigs: [
      {
        name: privateEndpoint.name
        properties: {
          privateDnsZoneId: privateDNSZonesIds.sites
        }
      }
    ]
  }
}

output lasPrincipalId string = logicAppDeploy.identity.principalId

What may I be missing?


问:
Using PySpark Pandas API, how can I store multiple splits of a dataframe into a list without using a loop?
Using PySpark Pandas API, I would like to split the rows of a dataframe based on the column SEGMENT (then do some operations on each of these split dataframes later on).

```<code>d = {'col1': [1, 2, 3], 'SEGMENT': ['a', 'b', 'c']}

df = ps.DataFrame(data = d, columns = ['col1', 'SEGMENT'])

list_segments = ['a', 'b', 'c']

list_segmented_dataframes = []

i = 0
while i < len(list_segments):
    print(list_segments[i])
    df_temp_segment = df[df['SEGMENT'] == list_segments[i]]
    list_segmented_dataframes.insert(i, df_temp_segment)
    i += 1
</code>```

Body:
Using PySpark Pandas API, I would like to split the rows of a dataframe based on the column SEGMENT (then do some operations on each of these split dataframes later on).

d = {'col1': [1, 2, 3], 'SEGMENT': ['a', 'b', 'c']}

df = ps.DataFrame(data = d, columns = ['col1', 'SEGMENT'])

list_segments = ['a', 'b', 'c']

list_segmented_dataframes = []

i = 0
while i < len(list_segments):
    print(list_segments[i])
    df_temp_segment = df[df['SEGMENT'] == list_segments[i]]
    list_segmented_dataframes.insert(i, df_temp_segment)
    i += 1


问:
Why does the post-build event not cd?
I put this on the post-build event:

```<code>cd
echo "hello"
cd bin\Release
</code>```

The result doesn't cd to bin\Release:

```<code>1>D:\QC supplements\Code\LOS Installer
1>"hello"
</code>```

Do you know why is that?

Title: Why does the post-build event not cd?

Body:
I put this on the post-build event:

cd
echo "hello"
cd bin\Release

The result doesn't cd to bin\Release:

1>D:\QC supplements\Code\LOS Installer
1>"hello"

Do you know why is that?


问:
How to make the input group component border radius to rounded-full in DaisyUI (React)
I'm new here(and in programming). I'm wondering how the heck do you override the input group component from DaisyUI,

It has a border-radius: 0px and when I try to add a `rounded-full' as className it still won't change.

I've tried using the @layer and @apply border-radius:999px to the input group but react says that 'the border-radius class does not exist, tried rounded-full too, The react warning disappear but still it didn't do anything.


问:
NameError: name 'monitoring' is not defined
I'am writing a liddle script which monitors my cpu, memory and disk utilization.

But i get this error msg:

```<code>    threading.Timer(5.0, monitoring).start()
NameError: name 'monitoring' is not defined
</code>```

I wrote an alarm class and ui main programm:

this is my ui main:

```<code>
import alarmsystem

def main():
    print('Welcome you just started your Computer Monitoring')
    print('Please enter your name and your email adress')
    print('An alarm will be send if utilization is above 80 percent of your cpu, memory or disk')
    print('You can close the script by pressing crtl + c')
    name=input('Enter your name: ')
    email=input('Enter your email: ')

    a=alarmsystem.Alarmsystem(name, email)
    a.monitoring()

if __name__ == "__main__":
    main()

</code>```

And this is my alarm class it uses other classes to gain the information:

```<code>
import client
import server
import ui
import threading

class Alarmsystem:

    def __init__(self, name,email):

        c=client.Client(name,email)

    def alarm(self):
        print('ALARM!!!')

    def monitoring(self):

        threading.Timer(5.0, monitoring).start()

        cpu=server.cpu()
        memory=server.memory()
        disk=server.disk()

        print('CPU usage: '+ cpu + ' Memory usage: ' + memory + ' Disk usage is: ' + disk)

        if( cpu > 80 or memory > 80 or disk > 80 ):
            alarm()

</code>```

Doesnt now why monitoring is not defined ? Pls help me

Thx

Body:
I'am writing a liddle script which monitors my cpu, memory and disk utilization.

But i get this error msg:

    threading.Timer(5.0, monitoring).start()
NameError: name 'monitoring' is not defined

I wrote an alarm class and ui main programm:

this is my ui main:

import alarmsystem

def main():
    print('Welcome you just started your Computer Monitoring')
    print('Please enter your name and your email adress')
    print('An alarm will be send if utilization is above 80 percent of your cpu, memory or disk')
    print('You can close the script by pressing crtl + c')
    name=input('Enter your name: ')
    email=input('Enter your email: ')

    a=alarmsystem.Alarmsystem(name, email)
    a.monitoring()

if __name__ == "__main__":
    main()

And this is my alarm class it uses other classes to gain the information:

import client
import server
import ui
import threading

class Alarmsystem:

    def __init__(self, name,email):

        c=client.Client(name,email)

    def alarm(self):
        print('ALARM!!!')

    def monitoring(self):

        threading.Timer(5.0, monitoring).start()

        cpu=server.cpu()
        memory=server.memory()
        disk=server.disk()

        print('CPU usage: '+ cpu + ' Memory usage: ' + memory + ' Disk usage is: ' + disk)

        if( cpu > 80 or memory > 80 or disk > 80 ):
            alarm()

Doesnt now why monitoring is not defined ? Pls help me

Thx


问:
Zap flagging failure for "Found csrf token parameters in URL."
I am using the nginx web server, and has the form page which have the CSRF token(anticsrf) as a hidden field in the form. But since it is used in the form i guess it forms the query string and appears in the URL. Now the Zap is detecting it as the vunerability.

alert :  CSRF information in URL parameters.
name :  CSRF information in URL parameters.
riskcode :  3
confidence :  2
riskdesc :  High (Medium)
desc :
Scans to ensure that URL's formed to make HTTP requests do not contain csrf tokens.

Instances:

```<code> uri :  https://10.197.127.174/?anticsrf
 method :  GET
 param :  anticsrf
 attack :
 evidence :
 uri :  https://10.197.127.174/?anticsrf&body_input&cmds&endpoints=%2Fapi%2Fmo%2Fsys.json&endpoints=restconf%2Fdata%2FCisco-NX-OS-device%3ASystem%2F&rollback_type=stop-on-error
 method :  GET
 param :  anticsrf
 attack :
 evidence :
</code>```

Why is ZAP detetcing it as a failure? since the tokens are anyway needed in the form.

Also what is the way to fix it?

Body:
I am using the nginx web server, and has the form page which have the CSRF token(anticsrf) as a hidden field in the form. But since it is used in the form i guess it forms the query string and appears in the URL. Now the Zap is detecting it as the vunerability.

alert :  CSRF information in URL parameters.
name :  CSRF information in URL parameters.
riskcode :  3
confidence :  2
riskdesc :  High (Medium)
desc :
Scans to ensure that URL's formed to make HTTP requests do not contain csrf tokens.

Instances:

 uri :  https://10.197.127.174/?anticsrf
 method :  GET
 param :  anticsrf
 attack :
 evidence :
 uri :  https://10.197.127.174/?anticsrf&body_input&cmds&endpoints=%2Fapi%2Fmo%2Fsys.json&endpoints=restconf%2Fdata%2FCisco-NX-OS-device%3ASystem%2F&rollback_type=stop-on-error
 method :  GET
 param :  anticsrf
 attack :
 evidence :

Why is ZAP detetcing it as a failure? since the tokens are anyway needed in the form.

Also what is the way to fix it?


问:
Im trying to write unit test case first time using mockito in Android studio and get the correct code coverage.The test method is written below
```<code>private void setCountryCodeData() {

    try {

        mCountryCode = PreferenceManager.getPrefIsoCode(LoginActivity.this);

        if (mCountryCode != null || !mCountryCode.equalsIgnoreCase("")) {
            for (CountryCodesResponse codesResponse : mCountryCodeResponse) {
                if (codesResponse.getIso_code().equalsIgnoreCase(mCountryCode)) {
                    countrycode = codesResponse.getInternationalCallingCode();
                    countryflag = codesResponse.getImage();
                    isonumber = codesResponse.getIso_code();
                    countryname = codesResponse.getName();
                }
            }
        } else if (getCountryCode() != null && !getCountryCode().equalsIgnoreCase("error")) {
            mCountryCode = getCountryCode();
            for (CountryCodesResponse codesResponse : mCountryCodeResponse) {
                if (codesResponse.getIso_code().equalsIgnoreCase(mCountryCode)) {
                    countrycode = codesResponse.getInternationalCallingCode();
                    countryflag = codesResponse.getImage();
                    isonumber = codesResponse.getIso_code();
                    countryname = codesResponse.getName();
                }
            }
        } else {
            countrycode = "+91";
            countryflag = "https://isprava-oi-development.s3.amazonaws.com/country/india/IN_3x.png";
            isonumber = "IN";
            countryname = getResources().getResourceName(R.string.india);
        }

        Glide.with(LoginActivity.this).asBitmap().load(countryflag).into(binding.tvFlagImage);

        binding.tvCountryCode.setText(countrycode);

    } catch (Exception ignored) {
        Log.e("country_code_error", "" + ignored);
        countrycode = "+91";
        countryflag = "https://isprava-oi-development.s3.amazonaws.com/country/india/IN_3x.png";
        isonumber = "IN";
        countryname = getResources().getResourceName(R.string.india);
        binding.tvCountryCode.setText(getResources().getString(R.string.india_country_code));
        binding.tvFlagImage.setImageResource(R.drawable.flag_india);
    }

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

I am writing the test cases for that but that not working and I dont know how to start the unit test of this code and which part to mock. and from where to start to write the test cases

Body:
private void setCountryCodeData() {

    try {

        mCountryCode = PreferenceManager.getPrefIsoCode(LoginActivity.this);

        if (mCountryCode != null || !mCountryCode.equalsIgnoreCase("")) {
            for (CountryCodesResponse codesResponse : mCountryCodeResponse) {
                if (codesResponse.getIso_code().equalsIgnoreCase(mCountryCode)) {
                    countrycode = codesResponse.getInternationalCallingCode();
                    countryflag = codesResponse.getImage();
                    isonumber = codesResponse.getIso_code();
                    countryname = codesResponse.getName();
                }
            }
        } else if (getCountryCode() != null && !getCountryCode().equalsIgnoreCase("error")) {
            mCountryCode = getCountryCode();
            for (CountryCodesResponse codesResponse : mCountryCodeResponse) {
                if (codesResponse.getIso_code().equalsIgnoreCase(mCountryCode)) {
                    countrycode = codesResponse.getInternationalCallingCode();
                    countryflag = codesResponse.getImage();
                    isonumber = codesResponse.getIso_code();
                    countryname = codesResponse.getName();
                }
            }
        } else {
            countrycode = "+91";
            countryflag = "https://isprava-oi-development.s3.amazonaws.com/country/india/IN_3x.png";
            isonumber = "IN";
            countryname = getResources().getResourceName(R.string.india);
        }

        Glide.with(LoginActivity.this).asBitmap().load(countryflag).into(binding.tvFlagImage);

        binding.tvCountryCode.setText(countrycode);

    } catch (Exception ignored) {
        Log.e("country_code_error", "" + ignored);
        countrycode = "+91";
        countryflag = "https://isprava-oi-development.s3.amazonaws.com/country/india/IN_3x.png";
        isonumber = "IN";
        countryname = getResources().getResourceName(R.string.india);
        binding.tvCountryCode.setText(getResources().getString(R.string.india_country_code));
        binding.tvFlagImage.setImageResource(R.drawable.flag_india);
    }

    requestHint();
}

I am writing the test cases for that but that not working and I dont know how to start the unit test of this code and which part to mock. and from where to start to write the test cases


问:
Firebase returning object with extra [[prototype]] named key
Querying my realtime database in Firebase used to work perfectly for several months.
Today the same query returns the object with an extra key named [[prototype]] that doesn't exist in the database.

Here is what the database contains:

and here is the returned object:

any idea what is happening?
I tried querying many things and it always behaves like this.

I am using this simple query:

```<code>myFunction(){
var data = dbFirebase.getData("Next Card/data");
}
</code>```

Here is what this key contains:

Thanks to who might help

Body:
Querying my realtime database in Firebase used to work perfectly for several months.
Today the same query returns the object with an extra key named [[prototype]] that doesn't exist in the database.

Here is what the database contains:

and here is the returned object:

any idea what is happening?
I tried querying many things and it always behaves like this.

I am using this simple query:

myFunction(){
var data = dbFirebase.getData("Next Card/data");
}

Here is what this key contains:

Thanks to who might help


问:
How do i fix the error when updating state
In my application, I am making a request to the backend with redux-thunk and fetching the pricingData. I keep the items in the pricingData first 10 items in the items variable by passing certain operations. I want to update the questionRange variable with the first items[0] value. But using setQuestionRange immediately causes infinite loop.
So i tried these:

if i have an array with multiple elements, update the setQuestionRange. But but the error still persisted
React limits the number of renders to prevent an infinite loop.

```<code>  if (items.length > 0) {
    setQuestionRange(items[0])
  }
</code>```

I used useEffect. But this caused another error:

Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.

```<code>  useEffect(() => {
    if (items) {
      setQuestionRange(items[0])
    }
  }, [items])
</code>```

How can i solve this? Here is my component:

```<code>import { Container } from '@/components/Container'
import Filters from './Filters'
import Cost from './Filters/Cost'
import { useState, useEffect } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { getAllPricing } from '@/store/actions/pricingAction'

function SwirlyDoodle({ className }) {
  return (
    <svg
      aria-hidden="true"
      viewBox="0 0 281 40"
      className={className}
      preserveAspectRatio="none"
    >
      <path
        fillRule="evenodd"
        clipRule="evenodd"
        d="M240.172 22.994c-8.007 1.246-15.477 2.23-31.26 4.114-18.506 2.21-26.323 2.977-34.487 3.386-2.971.149-3.727.324-6.566 1.523-15.124 6.388-43.775 9.404-69.425 7.31-26.207-2.14-50.986-7.103-78-15.624C10.912 20.7.988 16.143.734 14.657c-.066-.381.043-.344 1.324.456 10.423 6.506 49.649 16.322 77.8 19.468 23.708 2.65 38.249 2.95 55.821 1.156 9.407-.962 24.451-3.773 25.101-4.692.074-.104.053-.155-.058-.135-1.062.195-13.863-.271-18.848-.687-16.681-1.389-28.722-4.345-38.142-9.364-15.294-8.15-7.298-19.232 14.802-20.514 16.095-.934 32.793 1.517 47.423 6.96 13.524 5.033 17.942 12.326 11.463 18.922l-.859.874.697-.006c2.681-.026 15.304-1.302 29.208-2.953 25.845-3.07 35.659-4.519 54.027-7.978 9.863-1.858 11.021-2.048 13.055-2.145a61.901 61.901 0 0 0 4.506-.417c1.891-.259 2.151-.267 1.543-.047-.402.145-2.33.913-4.285 1.707-4.635 1.882-5.202 2.07-8.736 2.903-3.414.805-19.773 3.797-26.404 4.829Zm40.321-9.93c.1-.066.231-.085.29-.041.059.043-.024.096-.183.119-.177.024-.219-.007-.107-.079ZM172.299 26.22c9.364-6.058 5.161-12.039-12.304-17.51-11.656-3.653-23.145-5.47-35.243-5.576-22.552-.198-33.577 7.462-21.321 14.814 12.012 7.205 32.994 10.557 61.531 9.831 4.563-.116 5.372-.288 7.337-1.559Z"
      />
    </svg>
  )
}

export function Pricing() {
  const [fieldSelectionMultipliers, setFieldSelectionMultipliers] = useState(0)
  const [questionRange, setQuestionRange] = useState(0)
  const [audienceCount, setAudienceCount] = useState(100)
  const [totalCost, setTotalCost] = useState(null)
  const dispatch = useDispatch()
  const { pricingData } = useSelector((state) => state.pricing.getPricingData)
  const isPricingDataEmpty = Object.keys(pricingData).length === 0

  const fieldsData =
    !isPricingDataEmpty &&
    pricingData.items.filter((item) => item.content_object.content_type === 27)
  const comboboxData =
    !isPricingDataEmpty &&
    pricingData.items.filter((data) => data.content_object.content_type === 41)

  let items = !comboboxData
    ? []
    : comboboxData.map((item) => ({
        id: item.content_object.nanoid,
        name: item.content_object.name,
        multiplier: item.multiplier,
      }))

  const selectedFields = JSON.parse(JSON.stringify(fieldsData))
  const exchangeRate = !isPricingDataEmpty && +pricingData.exchange_rate
  const basePrice = !isPricingDataEmpty && +pricingData.base_price

  const calculateCost = () => {
    let numberFormat = Intl.NumberFormat('en-US')
    let rate = exchangeRate * basePrice
    let questionRangeMultiplier = questionRange ? questionRange.multiplier : 0
    let total_multiplier =
      (+fieldSelectionMultipliers + +questionRangeMultiplier) * rate
    let total = Math.round(total_multiplier * audienceCount * 100) / 100
    setTotalCost(numberFormat.format(total))
  }

  useEffect(() => {
    calculateCost()
  }, [fieldSelectionMultipliers, questionRange, exchangeRate, audienceCount])

  useEffect(() => {
    dispatch(getAllPricing())
  }, [])

  // if (items) {
  //   setQuestionRange(items[0])
  // }

  // useEffect(() => {
  //   if (items) {
  //     setQuestionRange(items[0])
  //   }
  // }, [items])

  return (
    <section
      id="pricing"
      aria-label="Pricing"
      className="bg-slate-900 py-20 sm:py-32"
    >
      <Container>
        <div className="bg-slate-900">
          <div className="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
            <div className="text-center">
              <h2 className="font-display text-3xl tracking-tight text-white sm:text-4xl">
                <span className="relative whitespace-nowrap">
                  <SwirlyDoodle className="absolute top-1/2 left-0 h-[1em] w-full fill-indigo-400" />
                  <span className="relative">Net fiyatlama,</span>
                </span>{' '}
                sometext
              </h2>
              <p className="my-5 text-lg text-slate-400">
              sometext
              </p>
            </div>
          </div>

          <div className="relative">
            <div className="absolute inset-0 h-1/2 bg-slate-900" />
            <div className="relative mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
              <div className="mx-auto max-w-lg overflow-hidden rounded-lg shadow-lg lg:flex lg:max-w-none">
                <div className="flex-1 bg-white px-6 py-8 lg:p-12">
                  <h3 className="text-2xl font-bold text-gray-900 sm:text-3xl sm:tracking-tight">
                  sometext
                  </h3>
                  <div className="mt-8">
                    <div className="flex items-center">
                      <h4 className="flex-shrink-0 bg-white pr-4 text-base font-semibold text-indigo-600">
                      sometext
                      </h4>
                      <div className="flex-1 border-t-2 border-gray-200" />
                    </div>
                    {selectedFields && (
                      <Filters
                        selectedFields={selectedFields}
                        fieldSelectionMultipliers={fieldSelectionMultipliers}
                        setFieldSelectionMultipliers={
                          setFieldSelectionMultipliers
                        }
                      />
                    )}
                  </div>
                </div>
                {comboboxData && (
                  <Cost
                    items={items}
                    questionRange={questionRange}
                    setQuestionRange={setQuestionRange}
                    audienceCount={audienceCount}
                    setAudienceCount={setAudienceCount}
                    totalCost={totalCost}
                  />
                )}
              </div>
            </div>
          </div>
        </div>
      </Container>
    </section>
  )
}

</code>```

Body:
In my application, I am making a request to the backend with redux-thunk and fetching the pricingData. I keep the items in the pricingData first 10 items in the items variable by passing certain operations. I want to update the questionRange variable with the first items[0] value. But using setQuestionRange immediately causes infinite loop.
So i tried these:

if i have an array with multiple elements, update the setQuestionRange. But but the error still persisted
React limits the number of renders to prevent an infinite loop.

  if (items.length > 0) {
    setQuestionRange(items[0])
  }

I used useEffect. But this caused another error:

Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.

  useEffect(() => {
    if (items) {
      setQuestionRange(items[0])
    }
  }, [items])

How can i solve this? Here is my component:

import { Container } from '@/components/Container'
import Filters from './Filters'
import Cost from './Filters/Cost'
import { useState, useEffect } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { getAllPricing } from '@/store/actions/pricingAction'

function SwirlyDoodle({ className }) {
  return (
    <svg
      aria-hidden="true"
      viewBox="0 0 281 40"
      className={className}
      preserveAspectRatio="none"
    >
      <path
        fillRule="evenodd"
        clipRule="evenodd"
        d="M240.172 22.994c-8.007 1.246-15.477 2.23-31.26 4.114-18.506 2.21-26.323 2.977-34.487 3.386-2.971.149-3.727.324-6.566 1.523-15.124 6.388-43.775 9.404-69.425 7.31-26.207-2.14-50.986-7.103-78-15.624C10.912 20.7.988 16.143.734 14.657c-.066-.381.043-.344 1.324.456 10.423 6.506 49.649 16.322 77.8 19.468 23.708 2.65 38.249 2.95 55.821 1.156 9.407-.962 24.451-3.773 25.101-4.692.074-.104.053-.155-.058-.135-1.062.195-13.863-.271-18.848-.687-16.681-1.389-28.722-4.345-38.142-9.364-15.294-8.15-7.298-19.232 14.802-20.514 16.095-.934 32.793 1.517 47.423 6.96 13.524 5.033 17.942 12.326 11.463 18.922l-.859.874.697-.006c2.681-.026 15.304-1.302 29.208-2.953 25.845-3.07 35.659-4.519 54.027-7.978 9.863-1.858 11.021-2.048 13.055-2.145a61.901 61.901 0 0 0 4.506-.417c1.891-.259 2.151-.267 1.543-.047-.402.145-2.33.913-4.285 1.707-4.635 1.882-5.202 2.07-8.736 2.903-3.414.805-19.773 3.797-26.404 4.829Zm40.321-9.93c.1-.066.231-.085.29-.041.059.043-.024.096-.183.119-.177.024-.219-.007-.107-.079ZM172.299 26.22c9.364-6.058 5.161-12.039-12.304-17.51-11.656-3.653-23.145-5.47-35.243-5.576-22.552-.198-33.577 7.462-21.321 14.814 12.012 7.205 32.994 10.557 61.531 9.831 4.563-.116 5.372-.288 7.337-1.559Z"
      />
    </svg>
  )
}

export function Pricing() {
  const [fieldSelectionMultipliers, setFieldSelectionMultipliers] = useState(0)
  const [questionRange, setQuestionRange] = useState(0)
  const [audienceCount, setAudienceCount] = useState(100)
  const [totalCost, setTotalCost] = useState(null)
  const dispatch = useDispatch()
  const { pricingData } = useSelector((state) => state.pricing.getPricingData)
  const isPricingDataEmpty = Object.keys(pricingData).length === 0

  const fieldsData =
    !isPricingDataEmpty &&
    pricingData.items.filter((item) => item.content_object.content_type === 27)
  const comboboxData =
    !isPricingDataEmpty &&
    pricingData.items.filter((data) => data.content_object.content_type === 41)

  let items = !comboboxData
    ? []
    : comboboxData.map((item) => ({
        id: item.content_object.nanoid,
        name: item.content_object.name,
        multiplier: item.multiplier,
      }))

  const selectedFields = JSON.parse(JSON.stringify(fieldsData))
  const exchangeRate = !isPricingDataEmpty && +pricingData.exchange_rate
  const basePrice = !isPricingDataEmpty && +pricingData.base_price

  const calculateCost = () => {
    let numberFormat = Intl.NumberFormat('en-US')
    let rate = exchangeRate * basePrice
    let questionRangeMultiplier = questionRange ? questionRange.multiplier : 0
    let total_multiplier =
      (+fieldSelectionMultipliers + +questionRangeMultiplier) * rate
    let total = Math.round(total_multiplier * audienceCount * 100) / 100
    setTotalCost(numberFormat.format(total))
  }

  useEffect(() => {
    calculateCost()
  }, [fieldSelectionMultipliers, questionRange, exchangeRate, audienceCount])

  useEffect(() => {
    dispatch(getAllPricing())
  }, [])

  // if (items) {
  //   setQuestionRange(items[0])
  // }

  // useEffect(() => {
  //   if (items) {
  //     setQuestionRange(items[0])
  //   }
  // }, [items])

  return (

      <Container>

                  <SwirlyDoodle className="absolute top-1/2 left-0 h-[1em] w-full fill-indigo-400" />
                  Net fiyatlama,
                {' '}
                sometext

              sometext

                  sometext

                      sometext

                    {selectedFields && (
                      <Filters
                        selectedFields={selectedFields}
                        fieldSelectionMultipliers={fieldSelectionMultipliers}
                        setFieldSelectionMultipliers={
                          setFieldSelectionMultipliers
                        }
                      />
                    )}

                {comboboxData && (
                  <Cost
                    items={items}
                    questionRange={questionRange}
                    setQuestionRange={setQuestionRange}
                    audienceCount={audienceCount}
                    setAudienceCount={setAudienceCount}
                    totalCost={totalCost}
                  />
                )}

      </Container>

  )
}


问:
ModuleNotFoundError: No module named 'sandbox': Docker Build failed with error code [1]
I'm building a django oscar commerce v 3.2 project(https://github.com/django-oscar/django-oscar) on ubuntu 20.04 on GCP with a virtual environment using python 3.8.14 and getting the following error when i run the docker build command using

docker-compose -f docker-compose-full.yml up

ModuleNotFoundError: No module named 'sandbox'

The trace is with regards to the following line in my settings.py:

```<code>from sandbox.environment import EnvironmentChecker
</code>```

My project folder structure is as follows :

django-commerce
|- src
|- sandbox
|    |- __init__.py
|    |- environment.py
|    |- settings.py
|    |- manage.py
|    |- urls.py
|    |- wsgi.py
|    |- uwsgi.ini
|- DockerFile
|- MakeFile
|- Manifest.in
|- setup.py
|- setup.cfg```
</div>
</div>
</p>
<p>The top lines in my Settings.py</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>import os
import sys
import logging.config
from django.utils.translation import gettext_lazy as _
from sandbox.environment import EnvironmentChecker

Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

Path helper
location = lambda x: os.path.join(
os.path.dirname(os.path.realpath(__file__)), x)</code>```

My wsgi.py

# isort:skip
import os
import sys

root_path = os.path.abspath(os.path.split(__file__)[0])
sys.path.insert(0, os.path.join(root_path, 'django-commerce'))
sys.path.insert(0, root_path)

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")

from django.core.wsgi import get_wsgi_application  # isort:skip

application = get_wsgi_application()```
</div>
</div>
</p>
<p>I've also tried adding django-commerce.sandbox to my INSTALLED_APPS in settings.py as a last try but its not working. I've spent hours trying this to work. Help appreciated.</p>
<p>My docker make file :</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>VENV = venv
PYTEST = $(PWD)/$(VENV)/bin/py.test

# These targets are not files
.PHONY: build_sandbox clean compile_translations coverage css docs extract_translations help install install-python \
 install-test install-js lint release retest sandbox_clean sandbox_image sandbox test todo venv

help: ## Display this help message
    @echo "Please use \`make <target>\` where <target> is one of"
    @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; \
    {printf "\033[36m%-40s\033[0m %s\n", $$1, $$2}'

##################
# Install commands
##################
install: install-python install-test assets ## Install requirements for local development and production

install-python: ## Install python requirements
    pip install -r requirements.txt

install-test: ## Install test requirements
    pip install -e .[test]

install-migrations-testing-requirements: ## Install migrations testing requirements
    pip install -r requirements_migrations.txt

assets: ## Install static assets
    npm install
    npm run build

# venv: ## Create a virtual env and install test and production requirements
#   $(shell which python3) -m venv $(VENV)
#   $(VENV)/bin/pip install -e .[test]
#   $(VENV)/bin/pip install -r docs/requirements.txt

#############################
# Sandbox management commands
#############################
sandbox: install build_sandbox ## Install requirements and create a sandbox

build_sandbox: sandbox_clean sandbox_load_user sandbox_load_data ## Creates a sandbox from scratch

sandbox_clean: ## Clean sandbox images,cache,static and database
    # Remove media
    -rm -rf sandbox/public/media/images
    -rm -rf sandbox/public/media/cache
    -rm -rf sandbox/public/static
    -rm -f sandbox/db.mysql
    # Create database
    python3.8 sandbox/manage.py migrate

sandbox_load_user: ## Load user data into sandbox
    python3.8 sandbox/manage.py loaddata sandbox/fixtures/auth.json

sandbox_load_data: ## Import fixtures and collect static
    # Import some fixtures. Order is important as JSON fixtures include primary keys
    python3.8 sandbox/manage.py loaddata sandbox/fixtures/child_products.json
    python3.8 sandbox/manage.py commerce_import_catalogue sandbox/fixtures/*.csv
    python3.8 sandbox/manage.py commerce_import_catalogue_images sandbox/fixtures/images.tar.gz
    python3.8 sandbox/manage.py commerce_populate_countries --initial-only
    python3.8 sandbox/manage.py loaddata sandbox/fixtures/pages.json sandbox/fixtures/ranges.json sandbox/fixtures/offers.json
    python3.8 sandbox/manage.py loaddata sandbox/fixtures/orders.json
    python3.8 sandbox/manage.py clear_index --noinput
    python3.8 sandbox/manage.py update_index catalogue
    python3.8 sandbox/manage.py thumbnail cleanup
    python3.8 sandbox/manage.py collectstatic --noinput

sandbox_image: ## Build latest docker image of django-commerce-sandbox
    docker build -t django-commerce-sandbox:latest .

##################
# Tests and checks
##################
test: venv ## Run tests
    $(PYTEST)

retest: venv ## Run failed tests only
    $(PYTEST) --lf

coverage: venv ## Generate coverage report
    $(PYTEST) --cov=commerce --cov-report=term-missing

lint: ## Run flake8 and isort checks
    flake8 src/commerce/
    flake8 tests/
    isort -c -q --diff src/ tests/

test_migrations: install-migrations-testing-requirements ## Tests migrations
    cd sandbox && ./test_migrations.sh

#######################
# Translations Handling
#######################
extract_translations: ## Extract strings and create source .po files
    cd src/commerce; django-admin.py makemessages -a

compile_translations: ## Compile translation files and create .mo files
    cd src/commerce; django-admin.py compilemessages

######################
# Project Management
######################
clean: ## Remove files not in source control
    find . -type f -name "*.pyc" -delete
    rm -rf nosetests.xml coverage.xml htmlcov *.egg-info *.pdf dist violations.txt

docs: venv ## Compile docs
    make -C docs html SPHINXBUILD=$(PWD)/$(VENV)/bin/sphinx-build

todo: ## Look for areas of the code that need updating when some event has taken place (like Commerce dropping support for a Django version)
    -grep -rnH TODO *.txt
    -grep -rnH TODO src/commerce/apps/
    -grep -rnH "django.VERSION" src/commerce/apps

release: clean ## Creates release
    pip install twine wheel
    rm -rf dist/*
    rm -rf src/commerce/static/*
    npm run build
    python setup.py sdist bdist_wheel
    twine upload -s dist/*</code>```

The docker build stops above at sandbox_clean in the Make file with the trace of

File "/app/sandbox/settings.py", line 5, in <module>
    from sandbox.environment import EnvironmentChecker
ModuleNotFoundError: No module named 'sandbox'
make: *** [Makefile:50: sandbox_clean] Error 1```

Body:
I'm building a django oscar commerce v 3.2 project(https://github.com/django-oscar/django-oscar) on ubuntu 20.04 on GCP with a virtual environment using python 3.8.14 and getting the following error when i run the docker build command using

docker-compose -f docker-compose-full.yml up

ModuleNotFoundError: No module named 'sandbox'

The trace is with regards to the following line in my settings.py:

from sandbox.environment import EnvironmentChecker

My project folder structure is as follows :

django-commerce
|- src
|- sandbox
|    |- __init__.py
|    |- environment.py
|    |- settings.py
|    |- manage.py
|    |- urls.py
|    |- wsgi.py
|    |- uwsgi.ini
|- DockerFile
|- MakeFile
|- Manifest.in
|- setup.py
|- setup.cfg

The top lines in my Settings.py

import os
import sys
import logging.config
from django.utils.translation import gettext_lazy as _
from sandbox.environment import EnvironmentChecker

Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

Path helper
location = lambda x: os.path.join(
os.path.dirname(os.path.realpath(__file__)), x)

My wsgi.py

# isort:skip
import os
import sys

root_path = os.path.abspath(os.path.split(__file__)[0])
sys.path.insert(0, os.path.join(root_path, 'django-commerce'))
sys.path.insert(0, root_path)

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")

from django.core.wsgi import get_wsgi_application  # isort:skip

application = get_wsgi_application()

I've also tried adding django-commerce.sandbox to my INSTALLED_APPS in settings.py as a last try but its not working. I've spent hours trying this to work. Help appreciated.

My docker make file :

VENV = venv
PYTEST = $(PWD)/$(VENV)/bin/py.test

# These targets are not files
.PHONY: build_sandbox clean compile_translations coverage css docs extract_translations help install install-python \
 install-test install-js lint release retest sandbox_clean sandbox_image sandbox test todo venv

help: ## Display this help message
    @echo "Please use \`make <target>\` where <target> is one of"
    @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; \
    {printf "\033[36m%-40s\033[0m %s\n", $$1, $$2}'

##################
# Install commands
##################
install: install-python install-test assets ## Install requirements for local development and production

install-python: ## Install python requirements
    pip install -r requirements.txt

install-test: ## Install test requirements
    pip install -e .[test]

install-migrations-testing-requirements: ## Install migrations testing requirements
    pip install -r requirements_migrations.txt

assets: ## Install static assets
    npm install
    npm run build

# venv: ## Create a virtual env and install test and production requirements
#   $(shell which python3) -m venv $(VENV)
#   $(VENV)/bin/pip install -e .[test]
#   $(VENV)/bin/pip install -r docs/requirements.txt

#############################
# Sandbox management commands
#############################
sandbox: install build_sandbox ## Install requirements and create a sandbox

build_sandbox: sandbox_clean sandbox_load_user sandbox_load_data ## Creates a sandbox from scratch

sandbox_clean: ## Clean sandbox images,cache,static and database
    # Remove media
    -rm -rf sandbox/public/media/images
    -rm -rf sandbox/public/media/cache
    -rm -rf sandbox/public/static
    -rm -f sandbox/db.mysql
    # Create database
    python3.8 sandbox/manage.py migrate

sandbox_load_user: ## Load user data into sandbox
    python3.8 sandbox/manage.py loaddata sandbox/fixtures/auth.json

sandbox_load_data: ## Import fixtures and collect static
    # Import some fixtures. Order is important as JSON fixtures include primary keys
    python3.8 sandbox/manage.py loaddata sandbox/fixtures/child_products.json
    python3.8 sandbox/manage.py commerce_import_catalogue sandbox/fixtures/*.csv
    python3.8 sandbox/manage.py commerce_import_catalogue_images sandbox/fixtures/images.tar.gz
    python3.8 sandbox/manage.py commerce_populate_countries --initial-only
    python3.8 sandbox/manage.py loaddata sandbox/fixtures/pages.json sandbox/fixtures/ranges.json sandbox/fixtures/offers.json
    python3.8 sandbox/manage.py loaddata sandbox/fixtures/orders.json
    python3.8 sandbox/manage.py clear_index --noinput
    python3.8 sandbox/manage.py update_index catalogue
    python3.8 sandbox/manage.py thumbnail cleanup
    python3.8 sandbox/manage.py collectstatic --noinput

sandbox_image: ## Build latest docker image of django-commerce-sandbox
    docker build -t django-commerce-sandbox:latest .

##################
# Tests and checks
##################
test: venv ## Run tests
    $(PYTEST)

retest: venv ## Run failed tests only
    $(PYTEST) --lf

coverage: venv ## Generate coverage report
    $(PYTEST) --cov=commerce --cov-report=term-missing

lint: ## Run flake8 and isort checks
    flake8 src/commerce/
    flake8 tests/
    isort -c -q --diff src/ tests/

test_migrations: install-migrations-testing-requirements ## Tests migrations
    cd sandbox && ./test_migrations.sh

#######################
# Translations Handling
#######################
extract_translations: ## Extract strings and create source .po files
    cd src/commerce; django-admin.py makemessages -a

compile_translations: ## Compile translation files and create .mo files
    cd src/commerce; django-admin.py compilemessages

######################
# Project Management
######################
clean: ## Remove files not in source control
    find . -type f -name "*.pyc" -delete
    rm -rf nosetests.xml coverage.xml htmlcov *.egg-info *.pdf dist violations.txt

docs: venv ## Compile docs
    make -C docs html SPHINXBUILD=$(PWD)/$(VENV)/bin/sphinx-build

todo: ## Look for areas of the code that need updating when some event has taken place (like Commerce dropping support for a Django version)
    -grep -rnH TODO *.txt
    -grep -rnH TODO src/commerce/apps/
    -grep -rnH "django.VERSION" src/commerce/apps

release: clean ## Creates release
    pip install twine wheel
    rm -rf dist/*
    rm -rf src/commerce/static/*
    npm run build
    python setup.py sdist bdist_wheel
    twine upload -s dist/*

The docker build stops above at sandbox_clean in the Make file with the trace of

File "/app/sandbox/settings.py", line 5, in <module>
    from sandbox.environment import EnvironmentChecker
ModuleNotFoundError: No module named 'sandbox'
make: *** [Makefile:50: sandbox_clean] Error 1


问:
BluetoothHidHost doesn't have disconnect method
I'm working on Bluetooth app and adding connection/disconnection functionality. The device I'm working on has 3 Bluetooth profiles A2dp, Headset, HID. When I'm calling via reflection connect/disconnect methods with the BluetoothDevice as a parameter from A2dp and Headset it works like a charm but not for HID profile. For this profile I'm getting

java.lang.NoSuchMethodException: android.bluetooth.BluetoothHidHost.disconnect [class android.bluetooth.BluetoothDevice]

In fact, I checked the existing methods by reflection and found out that BluetoothHidHost has twice less methods than two other profiles. And I'm confused whether it's possible to disconnect that profile programmatically at all.

I checked that on Android 12 and 13. Also, HID_HOST constant (4) is hidden in BluetoothProfile. The new profile was added BluetoothHidDevice on Android API 28 but it didn't work for me (connected devices list was empty while BluetoothHidHost showed my device)


问:
Is saving a user identity token as a key, a secure approach using expo-secure-store?
I have a react-native app - users can log in and out with firebase authentication, but expo-secure-store is accessible app-wide, so users could potentially access data from other users stored in secure-store who logged in on the same device.

I want to save and retrieve specific user data from secure-store, and my solution to the above is to save each user identity token as the key, with the value containing its respective data. Is this a secure approach?  Does expo-secure-store encrypt the key and values or just the values?

My main gripe with this approach is that given each user can only have one key-value pair, data store for each user would be limited to the max size of 2048 bytes, which isn't a whole lot. Other solutions welcome :)


问:
Unable to label inside ring pie chart
The following code :

```<code>import matplotlib.pyplot as plt
import numpy as np

def autopct_format(values):
    def my_format(pct):
        total = sum(values)
        val = int(round(pct*total/100.0)/1000000)
        if val == 0:
            return ""
        else:
            return '{:.1f}%\n({v:,d})'.format(pct, v=val)
    return my_format

fig, ax = plt.subplots(1,1,figsize=(10,10),dpi=100,layout="constrained")

ax.axis('equal')

width = 0.3
#Color
A, B, C=[plt.cm.Blues, plt.cm.Reds, plt.cm.Greens]

#OUTSIDE
cin = [A(0.5),A(0.4),A(0.3),B(0.5),B(0.4),B(0.3),B(0.2),B(0.1), C(0.5),C(0.4),C(0.3)]

Labels_Smalls = ['groupA', 'groupB', 'groupC']
labels = ['A.1', 'A.2', 'A.3', 'B.1', 'B.2', 'C.1', 'C.2', 'C.3',
'C.4', 'C.5']
Sizes_Detail = [4,3,5,6,5,10,5,5,4,6]
Sizes = [12,11,30]

pie2, _ ,junk = ax.pie(Sizes_Detail ,radius=1,
                 labels=labels,labeldistance=0.85,
                 autopct=autopct_format(Sizes_Detail) ,pctdistance = 1.15,
                 colors=cin)

for ea, eb in zip(pie2, _):
    mang =(ea.theta1 + ea.theta2)/2
    tourner = 360 - mang
    eb.set_rotation(mang+tourner)         # rotate the label by (mean_angle + 270)
    eb.set_va("center")
    eb.set_ha("center")

plt.setp(pie2, width=width, edgecolor='white')

#INSIDE
pie, _, junk = ax.pie(Sizes, radius=1-width,
                autopct=autopct_format(Sizes) ,pctdistance = 0.8,
                colors = [A(0.6), B(0.6), C(0.6)])

plt.setp(pie, width=width, edgecolor='white')
plt.margins(0,0)

bbox_props = dict(boxstyle="square,pad=0.3", fc="w", ec="k", lw=0.72)
kw = dict(arrowprops=dict(arrowstyle="-"),
          bbox=bbox_props, zorder=3, va="center")

for i, p in enumerate(pie):
    ang = (p.theta2 - p.theta1)/2. + p.theta1
    y = np.sin(np.deg2rad(ang))
    x = np.cos(np.deg2rad(ang))
    horizontalalignment = {-1: "right", 1: "left"}[int(np.sign(x))]
    connectionstyle = "angle,angleA=0,angleB={}".format(ang)
    kw["arrowprops"].update({"connectionstyle": connectionstyle})
    ax.annotate(Labels_Smalls[i], xy=(x, y), xytext=(1.35*np.sign(x), 1.4*y),
                horizontalalignment=horizontalalignment, **kw)

for ea, eb in zip(pie, _):
    mang =(ea.theta1 + ea.theta2)/2.  # get mean_angle of the wedge
    #print(mang, eb.get_rotation())
    tourner = 360 - mang
    eb.set_rotation(mang+tourner)         # rotate the label by (mean_angle + 270)
    eb.set_va("center")
    eb.set_ha("center")
</code>```

gives the following output :

But It does only link the outside pie and not the inside one, so how would I do the same chart but with the arrow linking the inside pie to the bbox ?

Title: Unable to label inside ring pie chart

Body:
The following code :

import matplotlib.pyplot as plt
import numpy as np

def autopct_format(values):
    def my_format(pct):
        total = sum(values)
        val = int(round(pct*total/100.0)/1000000)
        if val == 0:
            return ""
        else:
            return '{:.1f}%\n({v:,d})'.format(pct, v=val)
    return my_format

fig, ax = plt.subplots(1,1,figsize=(10,10),dpi=100,layout="constrained")

ax.axis('equal')

width = 0.3
#Color
A, B, C=[plt.cm.Blues, plt.cm.Reds, plt.cm.Greens]

#OUTSIDE
cin = [A(0.5),A(0.4),A(0.3),B(0.5),B(0.4),B(0.3),B(0.2),B(0.1), C(0.5),C(0.4),C(0.3)]

Labels_Smalls = ['groupA', 'groupB', 'groupC']
labels = ['A.1', 'A.2', 'A.3', 'B.1', 'B.2', 'C.1', 'C.2', 'C.3',
'C.4', 'C.5']
Sizes_Detail = [4,3,5,6,5,10,5,5,4,6]
Sizes = [12,11,30]

pie2, _ ,junk = ax.pie(Sizes_Detail ,radius=1,
                 labels=labels,labeldistance=0.85,
                 autopct=autopct_format(Sizes_Detail) ,pctdistance = 1.15,
                 colors=cin)

for ea, eb in zip(pie2, _):
    mang =(ea.theta1 + ea.theta2)/2
    tourner = 360 - mang
    eb.set_rotation(mang+tourner)         # rotate the label by (mean_angle + 270)
    eb.set_va("center")
    eb.set_ha("center")

plt.setp(pie2, width=width, edgecolor='white')

#INSIDE
pie, _, junk = ax.pie(Sizes, radius=1-width,
                autopct=autopct_format(Sizes) ,pctdistance = 0.8,
                colors = [A(0.6), B(0.6), C(0.6)])

plt.setp(pie, width=width, edgecolor='white')
plt.margins(0,0)

bbox_props = dict(boxstyle="square,pad=0.3", fc="w", ec="k", lw=0.72)
kw = dict(arrowprops=dict(arrowstyle="-"),
          bbox=bbox_props, zorder=3, va="center")

for i, p in enumerate(pie):
    ang = (p.theta2 - p.theta1)/2. + p.theta1
    y = np.sin(np.deg2rad(ang))
    x = np.cos(np.deg2rad(ang))
    horizontalalignment = {-1: "right", 1: "left"}[int(np.sign(x))]
    connectionstyle = "angle,angleA=0,angleB={}".format(ang)
    kw["arrowprops"].update({"connectionstyle": connectionstyle})
    ax.annotate(Labels_Smalls[i], xy=(x, y), xytext=(1.35*np.sign(x), 1.4*y),
                horizontalalignment=horizontalalignment, **kw)

for ea, eb in zip(pie, _):
    mang =(ea.theta1 + ea.theta2)/2.  # get mean_angle of the wedge
    #print(mang, eb.get_rotation())
    tourner = 360 - mang
    eb.set_rotation(mang+tourner)         # rotate the label by (mean_angle + 270)
    eb.set_va("center")
    eb.set_ha("center")

gives the following output :

But It does only link the outside pie and not the inside one, so how would I do the same chart but with the arrow linking the inside pie to the bbox ?