问:
PDF won't open from .exe file
my program uses subprocess.Popen to open pdf files. it works when i run the .py script, but when i convert the script to a .exe, and then try to open the pdf's using the .exe, the pdf's no longer open. in fact, after the .exe is run, NO pdf's on my machine open, even if i try to open one from my desktop.</p>
```<code># import _tkinter

import PyPDF2
import os
import json
import tkinter as tk
import subprocess

class FileLabels:
    def __init__(self):
        self.all_widgets = []

    def create_label(self, filename):
        new_label = tk.Label(text=filename)
        new_label.grid(row=6+found_files.index(filename), column=1)
        self.all_widgets.append(new_label)

    def create_copy_button(self, filename):
        new_button = tk.Button(text="Open", command=lambda: openfile(filename))
        new_button.grid(row=6+found_files.index(filename), column=2)
        self.all_widgets.append(new_button)

file_labels = FileLabels()

def openfile(filename):
    path = f'{directory}\{filename}'
    subprocess.Popen([path], shell=True)

def external_get_folder():
    global folder_entry
    global start_window
    start_window = tk.Tk()
    start_window.title("BSP PDF Searcher")
    folder_label = tk.Label(text="1. Copy paste all PDF's into a folder on your computer.\n"
                                 "2. Copy paste the folder location here and click OK.\n"
                                 "Get some coffee. This may take a few minutes.")
    folder_label.grid(row=1, column=1)
    folder_entry = tk.Entry()
    folder_entry.grid(row=1, column=2)
    folder_button = tk.Button(text="OK", command=lambda: external_extract_pdf(widgets))
    folder_button.grid(row=2, column=2)
    widgets = []
    start_window.mainloop()

def external_extract_pdf(widgets):
    for i in widgets:
        i.destroy()
    global directory
    global search_entry
    global drawing_contents
    global files_in_folder
    global damaged
    try:
        directory = folder_entry.get()
    except _tkinter.TclError:
        pass

    #create dictionary of contents
    damaged = []
    files_in_folder = 0
    drawing_contents = {}

    for filename in os.listdir(directory):
        f = os.path.join(directory, filename)
        with open(f, "rb") as pdf_file:
            try:
                read_pdf = PyPDF2.PdfFileReader(pdf_file)
            except:
                pass
            else:
                files_in_folder += 1
            number_of_pages = read_pdf.getNumPages()
            page = read_pdf.pages[0]
            try:
                page_content = page.extractText().lower()
            except IndexError:
                damaged.append(filename)
            else:
                drawing_contents[filename] = page_content
    display_results()

def display_results():
    global search_entry
    global search_button
    try:
        start_window.destroy()
    except _tkinter.TclError:
        pass

    results_window = tk.Tk()
    results_window.title("BSP PDF Searcher")
    dir_label = tk.Label(text=f"Searching in {directory}\n{files_in_folder} files, {len(damaged)} damaged")
    dir_label.grid(row=1, column=1)
    search_label = tk.Label(text="Enter words to search: ")
    search_label.grid(row=3,column=1)
    search_entry = tk.Entry()
    search_entry.grid(row=3, column=2)
    search_button = tk.Button(text="Search", command=lambda: ext_search(widgets))
    search_button.grid(row=3, column=3)
    try:
        x = found_files_label
    except:
        found_files_label = tk.Label()
        found_count_label = tk.Label()
        widgets = []

def ext_search(widgets):
    global found_files_label
    global found_count_label
    global found_files

    for i in file_labels.all_widgets:
        i.destroy()

    try:
        found_count_label.destroy()
    except NameError:
        pass

    key_words_list = list(search_entry.get().split(" "))
    for i in widgets:
        i.destroy()
    found_count = 0
    found_files = []
    for filename, contents in drawing_contents.items():
        if all(i in contents for i in key_words_list):
            found_files.append(filename)
            found_count += 1

    for i in found_files:
        file_labels.create_label(i)
        file_labels.create_copy_button(i)

    found_count_label = tk.Label(text=f"{found_count} results:")
    found_count_label.grid(row=4,column=1)

external_get_folder()

</code>```

Title: PDF won't open from .exe file

Body:
my program uses subprocess.Popen to open pdf files. it works when i run the .py script, but when i convert the script to a .exe, and then try to open the pdf's using the .exe, the pdf's no longer open. in fact, after the .exe is run, NO pdf's on my machine open, even if i try to open one from my desktop.

# import _tkinter

import PyPDF2
import os
import json
import tkinter as tk
import subprocess

class FileLabels:
    def __init__(self):
        self.all_widgets = []

    def create_label(self, filename):
        new_label = tk.Label(text=filename)
        new_label.grid(row=6+found_files.index(filename), column=1)
        self.all_widgets.append(new_label)

    def create_copy_button(self, filename):
        new_button = tk.Button(text="Open", command=lambda: openfile(filename))
        new_button.grid(row=6+found_files.index(filename), column=2)
        self.all_widgets.append(new_button)

file_labels = FileLabels()

def openfile(filename):
    path = f'{directory}\{filename}'
    subprocess.Popen([path], shell=True)

def external_get_folder():
    global folder_entry
    global start_window
    start_window = tk.Tk()
    start_window.title("BSP PDF Searcher")
    folder_label = tk.Label(text="1. Copy paste all PDF's into a folder on your computer.\n"
                                 "2. Copy paste the folder location here and click OK.\n"
                                 "Get some coffee. This may take a few minutes.")
    folder_label.grid(row=1, column=1)
    folder_entry = tk.Entry()
    folder_entry.grid(row=1, column=2)
    folder_button = tk.Button(text="OK", command=lambda: external_extract_pdf(widgets))
    folder_button.grid(row=2, column=2)
    widgets = []
    start_window.mainloop()

def external_extract_pdf(widgets):
    for i in widgets:
        i.destroy()
    global directory
    global search_entry
    global drawing_contents
    global files_in_folder
    global damaged
    try:
        directory = folder_entry.get()
    except _tkinter.TclError:
        pass

    #create dictionary of contents
    damaged = []
    files_in_folder = 0
    drawing_contents = {}

    for filename in os.listdir(directory):
        f = os.path.join(directory, filename)
        with open(f, "rb") as pdf_file:
            try:
                read_pdf = PyPDF2.PdfFileReader(pdf_file)
            except:
                pass
            else:
                files_in_folder += 1
            number_of_pages = read_pdf.getNumPages()
            page = read_pdf.pages[0]
            try:
                page_content = page.extractText().lower()
            except IndexError:
                damaged.append(filename)
            else:
                drawing_contents[filename] = page_content
    display_results()

def display_results():
    global search_entry
    global search_button
    try:
        start_window.destroy()
    except _tkinter.TclError:
        pass

    results_window = tk.Tk()
    results_window.title("BSP PDF Searcher")
    dir_label = tk.Label(text=f"Searching in {directory}\n{files_in_folder} files, {len(damaged)} damaged")
    dir_label.grid(row=1, column=1)
    search_label = tk.Label(text="Enter words to search: ")
    search_label.grid(row=3,column=1)
    search_entry = tk.Entry()
    search_entry.grid(row=3, column=2)
    search_button = tk.Button(text="Search", command=lambda: ext_search(widgets))
    search_button.grid(row=3, column=3)
    try:
        x = found_files_label
    except:
        found_files_label = tk.Label()
        found_count_label = tk.Label()
        widgets = []

def ext_search(widgets):
    global found_files_label
    global found_count_label
    global found_files

    for i in file_labels.all_widgets:
        i.destroy()

    try:
        found_count_label.destroy()
    except NameError:
        pass

    key_words_list = list(search_entry.get().split(" "))
    for i in widgets:
        i.destroy()
    found_count = 0
    found_files = []
    for filename, contents in drawing_contents.items():
        if all(i in contents for i in key_words_list):
            found_files.append(filename)
            found_count += 1

    for i in found_files:
        file_labels.create_label(i)
        file_labels.create_copy_button(i)

    found_count_label = tk.Label(text=f"{found_count} results:")
    found_count_label.grid(row=4,column=1)

external_get_folder()


来源: stackexchange

问:
How to extract FASTA sequences where IDs match with list in a csv file using R studio
I have a fasta file with protein ids and corresponding amino acid sequences. I want to extract the protein sequences from fasta file that are matched in another csv or txt file with protein ids.

Fasta file contains a list of proteins:

Protein 1
YVFAEKDSLFNAVLAEMRDVNIQKDAMRFRYNLERLGYMFAYEISKTLSYRQEEIQTPLG
ISNCRVLDDQIVLATVLRAGLPLHEGMLRIFDKAQNAFIAAYRKYGRNYKFTIQLEYLTS
PVIENKVLILSDPMLATGSTIYLTYQEMVQQKGTPKHCHIVSPIASREGYEYLCRKLPQN
EVSIWLGAIDEELTTKSYIIPGLGDAGDLA

Protein 2
QKLKMMDWAADERPRERLREKGPASLSNAELLAILLRTGTGNMNVMELARTLLSEHGNQL
SELVRSPVEKMTRIKGIGIAKAVTLCAAFELGRRAQIPLKRPAAITSAREVAQMMIPMLR
DLTYETCWVLFFDGGRKFIGKELISTGGLNATIVDIRMVLKKALDKLSCELILVHNHPSG
NNKPGRQDRILTSTLKEAARIVDLHLIDHIVIGGNGYFSFAEEGLL

CSV or txt file contains:

Protein 1

Protein 4

Protein 7

I expect output as

Protein 1 YVFAEKDSLFNAVLAEMRDVNIQKDAMRFRYNLERLGYMFAYEISKTLSYRQEEIQTPLG
ISNCRVLDDQIVLATVLRAGLPLHEGMLRIFDKAQNAFIAAYRKYGRNYKFTIQLEYLTS
PVIENKVLILSDPMLATGSTIYLTYQEMVQQKGTPKHCHIVSPIASREGYEYLCRKLPQN
EVSIWLGAIDEELTTKSYIIPGLGDAGDLA

ContentLicense: CC BY-SA 4.0


问:
Is it possible to set a .Net 6 app to retain memory rather than release it back to the container / OS?
I'm wondering if it's possible to reserve memory for a .Net app and not release that back to the operating system to improve performance?

Java apps have a setting which says "use X amount of heap" and then they have another setting which says "touch all that memory", so effectively a java app allocates all its memory up front and doesn’t allocated it back to the OS.

I was really wondering if there is a similar behavour for .Net apps?

I've tried using the setting DOTNET_GCRetainVM, however this doesn't seem to do what I expected as memory is still getting released back to the container during the application lifecycle, ie:

With that setting on, I would have expected that line to stay flat once the app has been allocated the memory.


问:
Import Oracle 11g SCHEMA dump In parts ( metadata then data )
i've been trying to import an Oracle 11g schema dump using an oracle docker container (dump file size is 750 Mb):

first i had to create a tablespace with the same name in the client db and assign same Username to it , then grant him create(session,table,any procedure,view):

```<code>create tablespace TABLESPACE datafile 'TABLESPACE.dbf' size 64M reuse autoextend ON next
64M maxsize unlimited default storage (initial 10M next 1M pctincrease 10);
</code>```

```<code>create user USERNAME identified by PASS default tablespace TABLESPACE quota
unlimited on TABLESPACE;
</code>```

Impdp command :

```<code>impdp user/pass@localhost DIRECTORY=DATA_PUMP_DIR DUMPFILE=dumpfile.dmpL OGFILE=log_file.log SCHEMAS=SCHEMA_NAME
</code>```

the execution took about 4  hours and then i was left with a large list of errors

ORA-31693: Table data object "SCHEMA_NAME"."Table_name" failed to load/unload and is being skipped due to error:
ORA-00001: unique constraint (SCHEMA_NAME.FK_name) violated

and tables were created but most were empty .

-I tried different import options such as full import ( full=y ).

-Another way i tried to do things , is to import on 2 stages ( metadata then data )

impdp ... CONTENT=METADATA_ONLY   then  impdp ... CONTENT=DATA_ONLY

-Also to import while excluding constraint , ref_constraints and triggers the execute a data_only import

but all theses executions were erroneous , i can't deal with each FK separately because it's over 200 Fk on this database .

So i was wondering , what's the proper way to import a dump without breaking the FK constraints , and is it okay to import metadata then data .

Also , how can i check if the dump provided by the client is dumped correctly or might has some flaws in it

Body:
i've been trying to import an Oracle 11g schema dump using an oracle docker container (dump file size is 750 Mb):

first i had to create a tablespace with the same name in the client db and assign same Username to it , then grant him create(session,table,any procedure,view):

create tablespace TABLESPACE datafile 'TABLESPACE.dbf' size 64M reuse autoextend ON next
64M maxsize unlimited default storage (initial 10M next 1M pctincrease 10);

create user USERNAME identified by PASS default tablespace TABLESPACE quota
unlimited on TABLESPACE;

Impdp command :

impdp user/pass@localhost DIRECTORY=DATA_PUMP_DIR DUMPFILE=dumpfile.dmpL OGFILE=log_file.log SCHEMAS=SCHEMA_NAME

the execution took about 4  hours and then i was left with a large list of errors

ORA-31693: Table data object "SCHEMA_NAME"."Table_name" failed to load/unload and is being skipped due to error:
ORA-00001: unique constraint (SCHEMA_NAME.FK_name) violated

and tables were created but most were empty .

-I tried different import options such as full import ( full=y ).

-Another way i tried to do things , is to import on 2 stages ( metadata then data )

impdp ... CONTENT=METADATA_ONLY   then  impdp ... CONTENT=DATA_ONLY

-Also to import while excluding constraint , ref_constraints and triggers the execute a data_only import

but all theses executions were erroneous , i can't deal with each FK separately because it's over 200 Fk on this database .

So i was wondering , what's the proper way to import a dump without breaking the FK constraints , and is it okay to import metadata then data .

Also , how can i check if the dump provided by the client is dumped correctly or might has some flaws in it


问:
VS Code doesn't open an external terminal for debugging
I am trying to set up vscode so that I have an external terminal when debugging but so far I have not succeeded.
I've tryed to search my problem but the solutions i found are not working.
here is my launch.json.

I've tried unistalling and reistalling MinGW and VSCode but that didn't solve the problem


问:
Issue with getting to some data in a matrix

I need help on how to access data in a matrix (vector of vector) in a expanding round around an origin point (0) and that follow the cells around it like in the visuals I included. It's to check the value of cells adjacent to the first one and then put the distance to the origin of the cell. Its for a labyrinth so I can't just use math to determine it since there might be some walls between them.
Also I can't use the algorithm libraries

Can someone help me ?
Thanks !

I tried using different method but none of them seems to be working since I still cant get some values. it's for a programming assignment so I need you guys help !


问:
Solution to changing currency for Woocommerce products
Hi so I would like to be able to change currency for different products added to the cart/checkout.

I found solution that is filtering woocommerce_currency hook and using cart session to change currency.

Two questions:

Is there a better way of doing it?

Do you see any potential problems with the following solution?

```<code>public function modifyWoocommerceCurrency( $currency ) {

   $cart_data = WC()->session->get('cart');

   foreach ($cart_data as $item) {
      if (isset($item["_campaign_options"]["user_paying_currency"])) {
         $currency = $item['_campaign_options']['user_paying_currency'];
      }
   }

   return $currency;
}
add_filter( 'woocommerce_currency', [$this,'modifyWoocommerceCurrency'], 10, 1 );
</code>```

Body:
Hi so I would like to be able to change currency for different products added to the cart/checkout.

I found solution that is filtering woocommerce_currency hook and using cart session to change currency.

Two questions:

Is there a better way of doing it?

Do you see any potential problems with the following solution?

public function modifyWoocommerceCurrency( $currency ) {

   $cart_data = WC()->session->get('cart');

   foreach ($cart_data as $item) {
      if (isset($item["_campaign_options"]["user_paying_currency"])) {
         $currency = $item['_campaign_options']['user_paying_currency'];
      }
   }

   return $currency;
}
add_filter( 'woocommerce_currency', [$this,'modifyWoocommerceCurrency'], 10, 1 );


问:
Excel export into .txt file with specific format
a very fresh beginner here - I'm trying to help my wife with an automation task. I need to write a Python code, which I'd use for a Macro in Excel to export certain fields from a spreadsheet and import them into a new .txt file with a certain view.

Input

This is my code so far:

```<code>from openpyxl import load_workbook
data_file_path = '/data/new_export.xlsx'
wb = load_workbook(data_file_path)
ws = wb['Sheet1']
row = list(ws.rows)
column = list(ws.columns)

output_file = open ('/data/output.txt', 'w')
for i in range (1, ws.max_row + 1):
    iban_code = ws.cell(row=i, column=1).value
    company = ws.cell(row=i, column=2).value
    iban_number = ws.cell(row=i, column=3).value
    bic = ws.cell(row=i, column=4).value
    currency = ws.cell(row=i, column=5).value
    amount = ws.cell(row=i, column=6).value
    inv_number = ws.cell(row=i, column=7).value
    for j in range (1, ws.max_column + 1):
        output_file.write(???????)
output_file.close()

What do I need to write in the output brackets, so that I can have an output in the .txt file like this (for every row in the Excel file):

iban_code || company || iban_number || bic || currency || amount || inv_number
iban_code || company || iban_number || bic || currency || amount || inv_number
iban_code || company || iban_number || bic || currency || amount || inv_number
etc.

</code>```

Body:
a very fresh beginner here - I'm trying to help my wife with an automation task. I need to write a Python code, which I'd use for a Macro in Excel to export certain fields from a spreadsheet and import them into a new .txt file with a certain view.

Input

This is my code so far:

from openpyxl import load_workbook
data_file_path = '/data/new_export.xlsx'
wb = load_workbook(data_file_path)
ws = wb['Sheet1']
row = list(ws.rows)
column = list(ws.columns)

output_file = open ('/data/output.txt', 'w')
for i in range (1, ws.max_row + 1):
    iban_code = ws.cell(row=i, column=1).value
    company = ws.cell(row=i, column=2).value
    iban_number = ws.cell(row=i, column=3).value
    bic = ws.cell(row=i, column=4).value
    currency = ws.cell(row=i, column=5).value
    amount = ws.cell(row=i, column=6).value
    inv_number = ws.cell(row=i, column=7).value
    for j in range (1, ws.max_column + 1):
        output_file.write(???????)
output_file.close()

What do I need to write in the output brackets, so that I can have an output in the .txt file like this (for every row in the Excel file):

iban_code || company || iban_number || bic || currency || amount || inv_number
iban_code || company || iban_number || bic || currency || amount || inv_number
iban_code || company || iban_number || bic || currency || amount || inv_number
etc.


问:
set a background for the content of a layout [PyQt5] [Qt-designer]
Since layout objects don't have a ".setStyleSheet()" attribute, how do I set the background color for a specific layout keeping the possibility of expanding the content of the layout when maximizing the window?

I am trying to have a background like a transparent style, each layout on my window would have a transparent background, and all of them on top of a general background ''you can see the images'

This is the Layout on Qt-designer:

This is the Layout after maximizing the window, it looks good!

I just added  the layout once on an empty QWidget and once on an empty frame and set the StyleSheet on the widget/frame. but when I maximize the window, the widget or the frame is maximized, NOT the content on the layout.

This is the Layout with widget/frame as transparent background on Qt-designer:

This is the Layout after maximizing the window, only the widget/frame is maximazed:

I am wondering, how can I do it?

I tried the following solution as I explained above:link


问:
vscode typescript import intellisense css not working
The tsconfig.json

```<code>{
  "compilerOptions": {
    "target": "es5",
    "lib": [
      "dom",
      "dom.iterable",
      "esnext"
    ],
    "noImplicitAny": false, //不需要显示地声明变量的类型为any
    "allowJs": true,
    "skipLibCheck": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "noFallthroughCasesInSwitch": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react-jsx",
    "plugins": [
      {
        "name": "typescript-plugin-css-modules"
      }
    ]
  },
  "include": [
    "src"
  ]
}
</code>```

Currently my working environment supports style tips. If I import the css file manually:

If I want to import css files intelligently. Not work:

And there ara a style file in the folder named ProductCollection.module.css

How to fix it?

Think you!

Body:
The tsconfig.json

{
  "compilerOptions": {
    "target": "es5",
    "lib": [
      "dom",
      "dom.iterable",
      "esnext"
    ],
    "noImplicitAny": false, //不需要显示地声明变量的类型为any
    "allowJs": true,
    "skipLibCheck": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "noFallthroughCasesInSwitch": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react-jsx",
    "plugins": [
      {
        "name": "typescript-plugin-css-modules"
      }
    ]
  },
  "include": [
    "src"
  ]
}

Currently my working environment supports style tips. If I import the css file manually:

If I want to import css files intelligently. Not work:

And there ara a style file in the folder named ProductCollection.module.css

How to fix it?

Think you!


问:
How can I distribute the definition of what metrics to keep in the prometheus scraper
Is it possible for a K8s deployment to define itself what metrics a scraper should collect?

We have several hundred K8s managed micro services generating metrics, and we have two prometheus scrapers collecting those metrics. One scraper runs more often and stores all the metrics in a short term storage. The other scraper stores a subset of all the metrics in a (GCP hosted) long term storage (LTS). This question is about how to define what metrics goes into LTS. The rationale is that the LTS is quite expensive.

We are trying to find a distributed way for each micro service to define what metrics it wants to put in long term storage. Different services are in different languages, and the metrics that the different teams needs in LTS differs from service to service.

Is this doable? It seams to me like a common use-case, so I'm surprised that I cannot find any information about how to achieve this.

Ideally we wanted to define the names of the metrics that are meant for LTS in the deployment definition of the service, like this:

apiVersion: apps/v1
kind: Deployment
spec:
  template:
    metadata:
      annotations:
        prometheus.io/path: "/metrics"
        prometheus.io/port: "8080"
        prometheus.io/lts: go_memstats_heap_alloc_bytes;go_goroutines;go_info;
```
<p>The list in <code>prometheus.io/lts</code> would tell what metrics (based on names) to put in Long Term Storage.</p>
<p>I tried to define a deny-list using this configuration in my scrape config:</p>
<pre class="lang-yaml prettyprint-override"><code>  metric_relabel_configs:
    - source_labels: [__name__, __meta_kubernetes_pod_annotation_prometheus_io_lts]
      separator: ";"
      regex: ^([^;]+);([^;]+;)*\1;.*$
      action: keep
</code>```

But it proves that back references in matching statements are not supported...

Any hints on how to achieve this?

Body:
Is it possible for a K8s deployment to define itself what metrics a scraper should collect?

We have several hundred K8s managed micro services generating metrics, and we have two prometheus scrapers collecting those metrics. One scraper runs more often and stores all the metrics in a short term storage. The other scraper stores a subset of all the metrics in a (GCP hosted) long term storage (LTS). This question is about how to define what metrics goes into LTS. The rationale is that the LTS is quite expensive.

We are trying to find a distributed way for each micro service to define what metrics it wants to put in long term storage. Different services are in different languages, and the metrics that the different teams needs in LTS differs from service to service.

Is this doable? It seams to me like a common use-case, so I'm surprised that I cannot find any information about how to achieve this.

Ideally we wanted to define the names of the metrics that are meant for LTS in the deployment definition of the service, like this:

apiVersion: apps/v1
kind: Deployment
spec:
  template:
    metadata:
      annotations:
        prometheus.io/path: "/metrics"
        prometheus.io/port: "8080"
        prometheus.io/lts: go_memstats_heap_alloc_bytes;go_goroutines;go_info;

The list in prometheus.io/lts would tell what metrics (based on names) to put in Long Term Storage.

I tried to define a deny-list using this configuration in my scrape config:

  metric_relabel_configs:
    - source_labels: [__name__, __meta_kubernetes_pod_annotation_prometheus_io_lts]
      separator: ";"
      regex: ^([^;]+);([^;]+;)*\1;.*$
      action: keep

But it proves that back references in matching statements are not supported...

Any hints on how to achieve this?


问:
Probably got a version mismatch on `xmlbeans` in pom.xml when accessing Excel File
I got this error:

```<code>java.lang.NoSuchMethodError: 'org.apache.xmlbeans.XmlOptions org.apache.xmlbeans.XmlOptions.setUseDefaultNamespace(boolean)'
</code>```

when using the following xmlbeans Version in pom.xml:

```<code>        <dependency>
            <groupId>org.apache.xmlbeans</groupId>
            <artifactId>xmlbeans</artifactId>
            <version>5.0.3</version>
        </dependency>
</code>```

I have excluded the xmlbeans from the dependency of poi, poi-ooxml and poi-ooxml-schema.

How to get rid of the error message?

I expect to load Excel file via fileInputStream as follows:

```<code>        workbook= WorkbookFactory.create(fileInputStream);
</code>```

Body:
I got this error:

java.lang.NoSuchMethodError: 'org.apache.xmlbeans.XmlOptions org.apache.xmlbeans.XmlOptions.setUseDefaultNamespace(boolean)'

when using the following xmlbeans Version in pom.xml:

        <dependency>
            <groupId>org.apache.xmlbeans</groupId>
            <artifactId>xmlbeans</artifactId>
            <version>5.0.3</version>
        </dependency>

I have excluded the xmlbeans from the dependency of poi, poi-ooxml and poi-ooxml-schema.

How to get rid of the error message?

I expect to load Excel file via fileInputStream as follows:

        workbook= WorkbookFactory.create(fileInputStream);


问:
Can't get full CA chain using libcurl
I want to get api.dropboxapi.com's Root CA to pass SSL check
But i can only get 2 certs using libcurl, which the domain has 3 certs.
Here is my Code, use libcurl CURLOPT_CERTINFO, Test on WSL2 Debian

```<code>#include <stdio.h>

#include <curl/curl.h>

static size_t wrfu(void *ptr,  size_t  size,  size_t  nmemb,  void *stream)
{
  (void)stream;
  (void)ptr;
  return size * nmemb;
}

int main(void)
{
  CURL *curl;
  CURLcode res;

  curl_global_init(CURL_GLOBAL_DEFAULT);

  curl = curl_easy_init();
  if(curl) {
    curl_easy_setopt(curl, CURLOPT_URL, "https://api.dropboxapi.com/");

    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, wrfu);

    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);

    curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
    curl_easy_setopt(curl, CURLOPT_CERTINFO, 1L);

    res = curl_easy_perform(curl);

    if(!res) {
      struct curl_certinfo *certinfo;

      res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &certinfo);

      if(!res && certinfo) {
        int i;

        printf("%d certs!\n", certinfo->num_of_certs);

        for(i = 0; i < certinfo->num_of_certs; i++) {
          struct curl_slist *slist;

          for(slist = certinfo->certinfo[i]; slist; slist = slist->next)
            printf("%s\n", slist->data);

        }
      }

    }

    curl_easy_cleanup(curl);
  }

  curl_global_cleanup();

  return 0;
}
</code>```

From the output, i find the Root CA missing, but other domain, like youtube.com、google.com can get a full ca chain. I test somemore Websites which use DigiCert signed CA, it all have same problem.

Did these websites have more steps to get ca chain?

Title: Can't get full CA chain using libcurl

Body:
I want to get api.dropboxapi.com's Root CA to pass SSL check
But i can only get 2 certs using libcurl, which the domain has 3 certs.
Here is my Code, use libcurl CURLOPT_CERTINFO, Test on WSL2 Debian

#include <stdio.h>

#include <curl/curl.h>

static size_t wrfu(void *ptr,  size_t  size,  size_t  nmemb,  void *stream)
{
  (void)stream;
  (void)ptr;
  return size * nmemb;
}

int main(void)
{
  CURL *curl;
  CURLcode res;

  curl_global_init(CURL_GLOBAL_DEFAULT);

  curl = curl_easy_init();
  if(curl) {
    curl_easy_setopt(curl, CURLOPT_URL, "https://api.dropboxapi.com/");

    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, wrfu);

    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);

    curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
    curl_easy_setopt(curl, CURLOPT_CERTINFO, 1L);

    res = curl_easy_perform(curl);

    if(!res) {
      struct curl_certinfo *certinfo;

      res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &certinfo);

      if(!res && certinfo) {
        int i;

        printf("%d certs!\n", certinfo->num_of_certs);

        for(i = 0; i < certinfo->num_of_certs; i++) {
          struct curl_slist *slist;

          for(slist = certinfo->certinfo[i]; slist; slist = slist->next)
            printf("%s\n", slist->data);

        }
      }

    }

    curl_easy_cleanup(curl);
  }

  curl_global_cleanup();

  return 0;
}

From the output, i find the Root CA missing, but other domain, like youtube.com、google.com can get a full ca chain. I test somemore Websites which use DigiCert signed CA, it all have same problem.

Did these websites have more steps to get ca chain?


问:
changing php versions in a laravel (valet) app
i am facing an issue regarding changing php versions in valet/brew. i notice that phpmyadmin requires v7.2.5+ and i have been able to move (down) to v7.2.34 .

when i now try to move to v7.3  using the following commands:

brew unlink php@7.2 && brew link --overwrite --force php@7.3 i get the following error:

```<code>Unlinking /opt/homebrew/Cellar/php@7.2/7.2.34_5... 221 symlinks removed.
Error: No such keg: /opt/homebrew/Cellar/php@7.3```
```

Body:
i am facing an issue regarding changing php versions in valet/brew. i notice that phpmyadmin requires v7.2.5+ and i have been able to move (down) to v7.2.34 .

when i now try to move to v7.3  using the following commands:

brew unlink php@7.2 && brew link --overwrite --force php@7.3 i get the following error:

Unlinking /opt/homebrew/Cellar/php@7.2/7.2.34_5... 221 symlinks removed.
Error: No such keg: /opt/homebrew/Cellar/php@7.3```


问:
ReactJS is there a way to get all parent context providers
Is it possible to get all parent context providers?

```<code><Context1.Provider value={...}>
<Context2.Provider value={...}>
<div>
...
<ContextNotIncluded.Provider value={...}>...</ContextNotIncluded.Provider>
<ContextN.Provider value={...}>
<Component />
</ContextN.Provider>
...
</div>
</Context2.Provider>
</Context1.Provider>
</code>```

is there a way to get all parent Context providers as list inside Component? Like
Context1, Context2, ContextN, without ContextNotIncluded, as it is not a parent of Component.

Body:
Is it possible to get all parent context providers?

<Context1.Provider value={...}>
<Context2.Provider value={...}>

...
<ContextNotIncluded.Provider value={...}>...</ContextNotIncluded.Provider>
<ContextN.Provider value={...}>
<Component />
</ContextN.Provider>
...

</Context2.Provider>
</Context1.Provider>

is there a way to get all parent Context providers as list inside Component? Like
Context1, Context2, ContextN, without ContextNotIncluded, as it is not a parent of Component.


问:
Python: How to stop the user from hitting [Enter] and making a new line in the console
I have a small issue with a little 'game' im developing.

I have made the 'speach' output stagger as if it is being spoken in real time wiht the following code below:

```<code>def talking(text):
    for char in text:
        sys.stdout.write(char)
        sys.stdout.flush()
        time.sleep(0.2)
    return ""

talking("My name is Bob, this is a test..")
</code>```

If left alone this works near perfectly! However, if the user hits the enter key it will start a new line whilst the text is being printed. Causing the text to look like:

```<code>My name
 is Bob, thi
s is
a tes
t..
Process finished with exit code 0
</code>```

Is there a way to either disable the enter key whilst the function is called, or some alternative work around?

Cheers

Tired to print the text a line at a time with [time.sleep(1)] but you can still break the text whilst in the delay.

Body:
I have a small issue with a little 'game' im developing.

I have made the 'speach' output stagger as if it is being spoken in real time wiht the following code below:

def talking(text):
    for char in text:
        sys.stdout.write(char)
        sys.stdout.flush()
        time.sleep(0.2)
    return ""

talking("My name is Bob, this is a test..")

If left alone this works near perfectly! However, if the user hits the enter key it will start a new line whilst the text is being printed. Causing the text to look like:

My name
 is Bob, thi
s is
a tes
t..
Process finished with exit code 0

Is there a way to either disable the enter key whilst the function is called, or some alternative work around?

Cheers

Tired to print the text a line at a time with [time.sleep(1)] but you can still break the text whilst in the delay.


问:
Is there a quick way to find out where the colours for an MUI component is coming from?
When experimenting with the theme I often want to try to set the colour of a specific part of a component to a different colour. For example, the inner, grey, borders for a DataGrid component.

If I want to do this across the entire app, the generally best method seems to be to use the palette to set the colour, making it so that any other similar scenario will use that same colour. (Supposing there was a "lite" data-grid that uses the grey borders, for example.)

However, finding out what part of the palette that component involves a huge amount of trial and error, changing all parts of the palette to bright colours until finally the component I'm looking at changes. This is especially time consuming if it turns out that the colour doesn't come from the palette at all.

I've not found any mention on the documentation about what palette colours a component uses.

Is there some way I can easily find out where the colour for a part of a component's coming from?


问:
Is dead lock happening here?
I have the code, where there are two threads runnning in parallel, first produce files and save them in db, if they don't exists. Second thread, each 5 sec. checks if in this db, new files with Status.CREATED appeared, if yes then modify them and update their status to UPDATED.
Suddenly application stops logging from both threads after log:

Loaded 250 files with status CREATED from db.

I suppose this is caused by dead lock, but I am not sure if it can persist here. This is the code:

```<code>@Autowired
FileRepository fileRepository;

public void run(ExecutorService executorService) {
    AtomicBoolean wasLastFile = new AtomicBoolean(false);
    CompletableFuture.runAsync(() -> {
        log.info("Producer of files started");
        while (!wasLastFile.get()) {
            List<File> filesList = firstFileReader.readFileForPositions(provider, genericProperties);
            for (File file : filesList) {
                // if file already exists in db don't save it
                if (fileRepository.findByProviderAndProvidedId(provider, file.getProvidedId()) == null)
                    fileRepository.save(file); // with Status.CREATED
            }
            if (filesList.isEmpty())
                wasLastFile.set(true);
        }
    }, executorService);

    AtomicBoolean producerOfDetailsHasFinished = new AtomicBoolean(false);
    CompletableFuture.runAsync(() -> {
            log.info("Producer of files details started");
            Iterator<File> iterFiles = null;
            while (!wasLastFile.get()) {
                List<File> files = null;
                if (iterFiles == null || !iterFiles.hasNext()) {
                    files = fileRepository.findAllByProviderAndStateIn(provider, Arrays.asList(State.CREATED, State.UPDATING_FAILED));
                    log.info("Loaded " + files.size() + " files with status " + State.CREATED + " from db");
                    iterFiles = files.iterator();
                }
                if (iterFiles.hasNext()) {
                    File file = iterFiles.next();
                    // modify file, set State.UPDATED or State.UPDATING_FAILED
                    fileRepository.save(file);
                    iterFiles.remove();
                    if (files != null)
                        log.info(provider + " " + files.size() + " files left for update");
                } else {
                    try {
                        Thread.sleep(5000);
                    } catch (InterruptedException e) {
                        throw new RuntimeException(e);
                    }
                }
            }
            producerOfDetailsHasFinished.set(true);
            log.info("Producer of files details finished");
        }, executorService);
}
</code>```

File is here only as example object. I made thread dump and it shows 2 threads waiting, but I am not sure if this indicates dead lock, there are no any transactions implemented regarding this db, just default.

Title: Is dead lock happening here?

Body:
I have the code, where there are two threads runnning in parallel, first produce files and save them in db, if they don't exists. Second thread, each 5 sec. checks if in this db, new files with Status.CREATED appeared, if yes then modify them and update their status to UPDATED.
Suddenly application stops logging from both threads after log:

Loaded 250 files with status CREATED from db.

I suppose this is caused by dead lock, but I am not sure if it can persist here. This is the code:

@Autowired
FileRepository fileRepository;

public void run(ExecutorService executorService) {
    AtomicBoolean wasLastFile = new AtomicBoolean(false);
    CompletableFuture.runAsync(() -> {
        log.info("Producer of files started");
        while (!wasLastFile.get()) {
            List<File> filesList = firstFileReader.readFileForPositions(provider, genericProperties);
            for (File file : filesList) {
                // if file already exists in db don't save it
                if (fileRepository.findByProviderAndProvidedId(provider, file.getProvidedId()) == null)
                    fileRepository.save(file); // with Status.CREATED
            }
            if (filesList.isEmpty())
                wasLastFile.set(true);
        }
    }, executorService);

    AtomicBoolean producerOfDetailsHasFinished = new AtomicBoolean(false);
    CompletableFuture.runAsync(() -> {
            log.info("Producer of files details started");
            Iterator<File> iterFiles = null;
            while (!wasLastFile.get()) {
                List<File> files = null;
                if (iterFiles == null || !iterFiles.hasNext()) {
                    files = fileRepository.findAllByProviderAndStateIn(provider, Arrays.asList(State.CREATED, State.UPDATING_FAILED));
                    log.info("Loaded " + files.size() + " files with status " + State.CREATED + " from db");
                    iterFiles = files.iterator();
                }
                if (iterFiles.hasNext()) {
                    File file = iterFiles.next();
                    // modify file, set State.UPDATED or State.UPDATING_FAILED
                    fileRepository.save(file);
                    iterFiles.remove();
                    if (files != null)
                        log.info(provider + " " + files.size() + " files left for update");
                } else {
                    try {
                        Thread.sleep(5000);
                    } catch (InterruptedException e) {
                        throw new RuntimeException(e);
                    }
                }
            }
            producerOfDetailsHasFinished.set(true);
            log.info("Producer of files details finished");
        }, executorService);
}

File is here only as example object. I made thread dump and it shows 2 threads waiting, but I am not sure if this indicates dead lock, there are no any transactions implemented regarding this db, just default.


问:
Spring boot backend produces a HTTP 200 response but front end doesn't receive it
I have an spring boot application that is deployed on a tomcat 8 webserver running on a CentOS machine that uses a MSSQL 13.0.5026.0 db on a windows server 2016.
I have a simple REST controller that produces a response to a request.
I can see from logs that backend produces a 200 response after finishing the request task.

The problem is that frontend never receives the response. It remains in pending.

It's a problem I have been experiencing in production only recently on a codebase that didn't change lately.
The same app worked normally until lately so I dont't believe it's an issue with spring it self but rather with tomcat, catalina, network, DB or other actors that could contribute to the problem

I checked the DB for eventual deadlocks or pending transactions that didn't finish appropriatelly and I found no issues.

I tried restarting the tomcat service and the DB service but unfortunatelly the problem continued to persist.

The response produced is a simple string message so I don't believe that a network problem due to response size is an issue.

Do you have any experience with similar problems? What could produce such a result?

Thank you


问:
Edit default ControlTemplate
I am looking for a way to access the XAML code for a default control in .NET Maui.

In WPF there was a Designer in the XAML view, where I could:
right-click the control - Edit Template - Edit a Copy...

This would give me the XAML for the control so that it was possible to modify the default templates provided by the framework.

Maui does not have the Designer so there is nowhere to click on a control. Is there another way to achieve this?

I am looking specifically for the XAML for the ProgressBar control.

As a sidenote, when looking at microsofts documentation:
https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/controltemplate?view=net-maui-7.0
They show an example of the XAML for the CardView control.

Title: Edit default ControlTemplate


问:
Build a searchbard where pasting any url will load the website
I am trying to build a Search Bar in React where pasting any URL example - https://www.google.com/ would load the webpage below it, the request would be made using Axios.get(url)  setHtmlString(response.data)

My Approaches,

Tried doing Axios get request and used the dangerouslySetInnerHTML attribute to set it with response.data which is the HTML File.

Example:

Tried srcDoc attribute inside an iframe which is also set to Response.data which is a HTML File.

But the problem is many elements are not loading correctly and the page loaded in not functional.

Console is showing these errors.
some Websites are also showing error blocked by client, blocked by CORS policy.


问:
Android, Compose. How to correctly test animated scroll in compose?
I'm trying to test accompanist PagerState.

The author has already added tests (https://github.com/google/accompanist/blob/main/pager/src/sharedTest/kotlin/com/google/accompanist/pager/PagerStateUnitTest.kt), however he uses scrollToPage, but I need to use animateScrollToPage.

But when i replace the scrollToPage with the animateScrollToPage (change_pager_count test) I get exception:

java.lang.IllegalStateException: A MonotonicFrameClock is not
available in this CoroutineContext. Callers should supply an
appropriate MonotonicFrameClock using withContext.

I tried to remember coroutine scope and run animateScrollToPage  inside this scope:

```<code>composeTestRule.setContent {
 scope = rememberCoroutineScope()
.....
}

composeTestRule.runOnIdle {
  scope.launch {
       pagerState.animateScrollToPage(page = 8)
      }
}

// And assert that currentPage and pageCount are correct
assertThat(pagerState.currentPage).isEqualTo(8)
assertThat(pagerState.pageCount).isEqualTo(10)
</code>```

But I still get this exception.

Please help me figure out what I'm doing wrong.

Body:
I'm trying to test accompanist PagerState.

The author has already added tests (https://github.com/google/accompanist/blob/main/pager/src/sharedTest/kotlin/com/google/accompanist/pager/PagerStateUnitTest.kt), however he uses scrollToPage, but I need to use animateScrollToPage.

But when i replace the scrollToPage with the animateScrollToPage (change_pager_count test) I get exception:

java.lang.IllegalStateException: A MonotonicFrameClock is not
available in this CoroutineContext. Callers should supply an
appropriate MonotonicFrameClock using withContext.

I tried to remember coroutine scope and run animateScrollToPage  inside this scope:

composeTestRule.setContent {
 scope = rememberCoroutineScope()
.....
}

composeTestRule.runOnIdle {
  scope.launch {
       pagerState.animateScrollToPage(page = 8)
      }
}

// And assert that currentPage and pageCount are correct
assertThat(pagerState.currentPage).isEqualTo(8)
assertThat(pagerState.pageCount).isEqualTo(10)

But I still get this exception.

Please help me figure out what I'm doing wrong.


问:
Problems with Dexed 0.9.6 in case of SAVIHost v1.43 (and v1.44 beta) x64 and VSTHost v1.57 (and V1.57 beta) x64
I have the problems with both SAVIHost v1.43 and VSTHost v1.57 for the case of Dexed 0.9.6. As I am a hobbist only, related to both MIDI and IT, I wish to ask some help to overcome these problems detailed below.

My problem with SAVIHost V1.43:

I copied savihost.exe (extracted from savihost3x64.zip) copied into directory "C:\Program Files\Common Files\VST3" (i.e. into the installation directory of Dexed.vst3) then renamed it to Dexed.exe, and launched this Dexed.exe.
I set "loopMIDI Port 1" (created prior by "loopMIDI v1.0.16 (27)") as "Input Port 1" via "Devices|MIDI..." and "1764 samples (25 b/s)" via "Devices|Wave...". (The sample rate was 44100 Hz, and both ports were "MME: Microsoft Sound Mapper).
Then I played some sounds by use of the virtual keyboard, and changed Dexed's programs (instruments) randomly - and Dexed seemed to work well, it played the different sounds with the actually selected instruments. Then I sent some MIDI Messages by Cakewalk by Bandlab to "loopMIDI 1"; Dexed produced the appropriate sounds, according to MIDI Note On/Off messages received - except that all the MIDI Program Change messages (C0 xx) were ignored.
Finally, when I clicked onto icon of Dexed.exe (i.e. renamed savihost.exe) in the Windows 10 Taskbar on the screen: the main window of Dexed.exe was minimized,
but when I clicked onto its icon again, although its main window is restored but crashed immediately. A dialog titled as "Dexed" appered,
containing an error message:

```<code>Unhandled exception 0xC0000005 at 00000014005BEBA
reading from FFFFFFFFFFFFFFFF

(followed by a list of the recent content of registers).
</code>```

Furthermore, I noticed that resizing of window of Dexed.exe (moving its bottom edge upward) also causes a crash, but only after when Dexed.exe received some MIDI messages through "loopMIDI Port 1".
(i.e. playing on virtual keyboard, followed by similar resizing did not cause crashes - at least, I have not realized that.)

The situation was ditto for the case of SAVIHost V1.44 beta.

Problem with VSTHost V1.56 x64:

In the second case, I started VTSHost.exe, then loaded Dexed.vst3 via File|New Plugin... . Dexed.vst3 also seemed to work well at the beginning, i.e. while I played on the virtual keyboard bar, and changed the programs (instruments) and modified some parameters by the knobs on the screen. But when VSTHost received the first MIDI messages through the "loopMIDI Port 1", Dexed does not played any notes anymore. Instead, some extra message lines appeared in the dialog "Info" below the line "Chained as Insert before 1: Engine Output":

```<code>...
Processing is turned off (errors in PlugIn?)
    ProcessReplacing
    Exception 0xC0000005 at 000000014007ABF6 reading from 0000000000000000
    ...
    Stack Trace:
    ...
</code>```

Unfortunately, the situation was the same in case of VSTHost V1.57 beta x64.

Comments:

Dexed.vst3 worked without problems in case of other VST host apps (e.g. CakeWalk by BandLab and Cantabile 4 Lite), i.e. also the MIDI Program Change messages were executed properly.
(CakeWalk by Bandlab used Dexed.vst3 directly, Cantabile 4 Light received MIDI messages from CakeWalk by BandLab through "loopMIDI Port 1".)

similarly, the original standalone Dexed application also processed the MIDI Program Change messages through "loopMIDI Port 1" correctly.

version number of Dexed.vst3 reported as 1.0.0 by VSTHost (although is is originated from unzipping of "dexed-0.9.6-win.zip").

my PC has the followings:
-- OS: MS Windows 10, 22H2, build: 19045.2311 (x64)
-- CPU: Intel(R) Core(TM) i5-4460  CPU @ 3.20GHz
-- RAM: 8 GB
-- motherboard: Gigabyte Technology Co., Ltd.  B85M-D2V
-- sound: Realtek, High Definition Audio (on-board)

Finally, I wish to mention that I have tried other VSTs than Dexed's one with both SAVIHost and VSTHost: "sforzando.vst3" and "Roland Sound Canvas VA.dll".
There were no problem at all - no interception of any MIDI Message, no crash, etc -, they had been worked without any problem for hours. So I am not really sure, what and where are the root of the problems above: maybe in SAVIHost or VSTHost - or maybe in Dexed.

I wish ask some help, how I shall continue to determine, which component - ie. savihost/svthost or Dexed - is failed and resulted the problem?

Thank you very much for you kind efforts in advance!

Body:
I have the problems with both SAVIHost v1.43 and VSTHost v1.57 for the case of Dexed 0.9.6. As I am a hobbist only, related to both MIDI and IT, I wish to ask some help to overcome these problems detailed below.

My problem with SAVIHost V1.43:

I copied savihost.exe (extracted from savihost3x64.zip) copied into directory "C:\Program Files\Common Files\VST3" (i.e. into the installation directory of Dexed.vst3) then renamed it to Dexed.exe, and launched this Dexed.exe.
I set "loopMIDI Port 1" (created prior by "loopMIDI v1.0.16 (27)") as "Input Port 1" via "Devices|MIDI..." and "1764 samples (25 b/s)" via "Devices|Wave...". (The sample rate was 44100 Hz, and both ports were "MME: Microsoft Sound Mapper).
Then I played some sounds by use of the virtual keyboard, and changed Dexed's programs (instruments) randomly - and Dexed seemed to work well, it played the different sounds with the actually selected instruments. Then I sent some MIDI Messages by Cakewalk by Bandlab to "loopMIDI 1"; Dexed produced the appropriate sounds, according to MIDI Note On/Off messages received - except that all the MIDI Program Change messages (C0 xx) were ignored.
Finally, when I clicked onto icon of Dexed.exe (i.e. renamed savihost.exe) in the Windows 10 Taskbar on the screen: the main window of Dexed.exe was minimized,
but when I clicked onto its icon again, although its main window is restored but crashed immediately. A dialog titled as "Dexed" appered,
containing an error message:

Unhandled exception 0xC0000005 at 00000014005BEBA
reading from FFFFFFFFFFFFFFFF

(followed by a list of the recent content of registers).

Furthermore, I noticed that resizing of window of Dexed.exe (moving its bottom edge upward) also causes a crash, but only after when Dexed.exe received some MIDI messages through "loopMIDI Port 1".
(i.e. playing on virtual keyboard, followed by similar resizing did not cause crashes - at least, I have not realized that.)

The situation was ditto for the case of SAVIHost V1.44 beta.

Problem with VSTHost V1.56 x64:

In the second case, I started VTSHost.exe, then loaded Dexed.vst3 via File|New Plugin... . Dexed.vst3 also seemed to work well at the beginning, i.e. while I played on the virtual keyboard bar, and changed the programs (instruments) and modified some parameters by the knobs on the screen. But when VSTHost received the first MIDI messages through the "loopMIDI Port 1", Dexed does not played any notes anymore. Instead, some extra message lines appeared in the dialog "Info" below the line "Chained as Insert before 1: Engine Output":

...
Processing is turned off (errors in PlugIn?)
    ProcessReplacing
    Exception 0xC0000005 at 000000014007ABF6 reading from 0000000000000000
    ...
    Stack Trace:
    ...

Unfortunately, the situation was the same in case of VSTHost V1.57 beta x64.

Comments:

Dexed.vst3 worked without problems in case of other VST host apps (e.g. CakeWalk by BandLab and Cantabile 4 Lite), i.e. also the MIDI Program Change messages were executed properly.
(CakeWalk by Bandlab used Dexed.vst3 directly, Cantabile 4 Light received MIDI messages from CakeWalk by BandLab through "loopMIDI Port 1".)

similarly, the original standalone Dexed application also processed the MIDI Program Change messages through "loopMIDI Port 1" correctly.

version number of Dexed.vst3 reported as 1.0.0 by VSTHost (although is is originated from unzipping of "dexed-0.9.6-win.zip").

my PC has the followings:
-- OS: MS Windows 10, 22H2, build: 19045.2311 (x64)
-- CPU: Intel(R) Core(TM) i5-4460  CPU @ 3.20GHz
-- RAM: 8 GB
-- motherboard: Gigabyte Technology Co., Ltd.  B85M-D2V
-- sound: Realtek, High Definition Audio (on-board)

Finally, I wish to mention that I have tried other VSTs than Dexed's one with both SAVIHost and VSTHost: "sforzando.vst3" and "Roland Sound Canvas VA.dll".
There were no problem at all - no interception of any MIDI Message, no crash, etc -, they had been worked without any problem for hours. So I am not really sure, what and where are the root of the problems above: maybe in SAVIHost or VSTHost - or maybe in Dexed.

I wish ask some help, how I shall continue to determine, which component - ie. savihost/svthost or Dexed - is failed and resulted the problem?

Thank you very much for you kind efforts in advance!


问:
How to dlclose and unmap DSO even when tls_dtors exist, or reinitialize DSO when calling dlopen at second round
I want to get fresh DSO (which means it's global variable is set to init status) whenever I call dlopen. But when DSO contains tls dtor, dlclose will not unload/unmap this DSO, and at next time I dlopen it, it gives me old handler and old DSO status.

So how to dlclose and unmap DSO even when tls_dtors exist, or reinitialize DSO when calling dlopen at second round


问:
How to add new browser extension target to existing react-native app?
I have existing React-Native app. I need to create Safari browser extension for iOS and MacOS Safari browser. For extension, I have React.js project for other browser extension. Now I have tried to convert it into Safari extension and It is working fine. But what if I have to add Extension target to existing React-Native app? Which steps I need to follow to add target to iOS app?

Can you please guide me on this? Thank you in advance.


问:
MySQL accessibility from minikube on Ubuntu
I'm trying to connect to a MySQL database running locally from inside minikube, and I keep getting this error. I'm working on Ubuntu, in principle setting up the host to host.minikube.internal and the port to 3306 should work, but I keep getting the following error.

```<code>[2022-12-07 08:46:37,858] ERROR in app: Exception on /login [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2525, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1822, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1820, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1796, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/app/server.py", line 38, in login
    cur = mysql.connection.cursor()
  File "/usr/local/lib/python3.10/site-packages/flask_mysqldb/__init__.py", line 101, in connection
    ctx.mysql_db = self.connect
  File "/usr/local/lib/python3.10/site-packages/flask_mysqldb/__init__.py", line 88, in connect
    return MySQLdb.connect(**kwargs)
  File "/usr/local/lib/python3.10/site-packages/MySQLdb/__init__.py", line 123, in Connect
    return Connection(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/MySQLdb/connections.py", line 185, in __init__
    super().__init__(*args, **kwargs2)
MySQLdb.OperationalError: (2002, "Can't connect to MySQL server on 'host.minikube.internal' (115)")
172.17.0.4 - - [07/Dec/2022 08:46:37] "POST /login HTTP/1.1" 500 -
</code>```

my SQL server is active

```<code>sudo service mysql status
[sudo] password for andrea:
● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2022-12-07 07:40:20 CET; 3h 40min ago
    Process: 950 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
   Main PID: 1134 (mysqld)
     Status: "Server is operational"
      Tasks: 38 (limit: 18604)
     Memory: 394.8M
        CPU: 1min 59.869s
     CGroup: /system.slice/mysql.service
             └─1134 /usr/sbin/mysqld

dic 07 07:39:36 andrea-ThinkPad-S430 systemd[1]: Starting MySQL Community Server...
dic 07 07:40:20 andrea-ThinkPad-S430 systemd[1]: Started MySQL Community Server.
</code>```

Body:
I'm trying to connect to a MySQL database running locally from inside minikube, and I keep getting this error. I'm working on Ubuntu, in principle setting up the host to host.minikube.internal and the port to 3306 should work, but I keep getting the following error.

[2022-12-07 08:46:37,858] ERROR in app: Exception on /login [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2525, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1822, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1820, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1796, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/app/server.py", line 38, in login
    cur = mysql.connection.cursor()
  File "/usr/local/lib/python3.10/site-packages/flask_mysqldb/__init__.py", line 101, in connection
    ctx.mysql_db = self.connect
  File "/usr/local/lib/python3.10/site-packages/flask_mysqldb/__init__.py", line 88, in connect
    return MySQLdb.connect(**kwargs)
  File "/usr/local/lib/python3.10/site-packages/MySQLdb/__init__.py", line 123, in Connect
    return Connection(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/MySQLdb/connections.py", line 185, in __init__
    super().__init__(*args, **kwargs2)
MySQLdb.OperationalError: (2002, "Can't connect to MySQL server on 'host.minikube.internal' (115)")
172.17.0.4 - - [07/Dec/2022 08:46:37] "POST /login HTTP/1.1" 500 -

my SQL server is active

sudo service mysql status
[sudo] password for andrea:
● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2022-12-07 07:40:20 CET; 3h 40min ago
    Process: 950 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
   Main PID: 1134 (mysqld)
     Status: "Server is operational"
      Tasks: 38 (limit: 18604)
     Memory: 394.8M
        CPU: 1min 59.869s
     CGroup: /system.slice/mysql.service
             └─1134 /usr/sbin/mysqld

dic 07 07:39:36 andrea-ThinkPad-S430 systemd[1]: Starting MySQL Community Server...
dic 07 07:40:20 andrea-ThinkPad-S430 systemd[1]: Started MySQL Community Server.


问:
Graphql $limit variable not returning correct amount of items on AWS Appsync
Running the following query, I get two results:

```<code>query x($keyword: String = "Pulp", $limit: Int, $nexttoken: String) {
  listProducts(filter: {or: [{name: {contains: $keyword}}, {description: {contains: $keyword}}]}, limit: $limit, nextToken: $nexttoken) {
    items {
      id
    }
    nextToken
  }
}
</code>```

Response:

```<code>{
  "data": {
    "listProducts": {
      "items": [
        {
          "id": "ba8048f3-1099-4184-8e78-f0e57b521465"
        },
        {
          "id": "335770ad-f566-4385-a861-7d0dab6c9dd8"
        }
      ],
      "nextToken": null
    }
  }
}
</code>```

By setting $limit: Int=1, I get an empty array of items:

```<code>{
  "data": {
    "listProducts": {
      "items": [],
      "nextToken": "xxxxxx"
    }
  }
}
</code>```

By setting $limit: Int=2, I get one item:

```<code>{
  "data": {
    "listProducts": {
      "items": [
        {
          "id": "ba8048f3-1099-4184-8e78-f0e57b521465"
        }
      ],
      "nextToken": "xxxxxx"
    }
  }
}
</code>```

In order to get all 2 two items, I need to set $limit=4. Why?

Body:
Running the following query, I get two results:

query x($keyword: String = "Pulp", $limit: Int, $nexttoken: String) {
  listProducts(filter: {or: [{name: {contains: $keyword}}, {description: {contains: $keyword}}]}, limit: $limit, nextToken: $nexttoken) {
    items {
      id
    }
    nextToken
  }
}

Response:

{
  "data": {
    "listProducts": {
      "items": [
        {
          "id": "ba8048f3-1099-4184-8e78-f0e57b521465"
        },
        {
          "id": "335770ad-f566-4385-a861-7d0dab6c9dd8"
        }
      ],
      "nextToken": null
    }
  }
}

By setting $limit: Int=1, I get an empty array of items:

{
  "data": {
    "listProducts": {
      "items": [],
      "nextToken": "xxxxxx"
    }
  }
}

By setting $limit: Int=2, I get one item:

{
  "data": {
    "listProducts": {
      "items": [
        {
          "id": "ba8048f3-1099-4184-8e78-f0e57b521465"
        }
      ],
      "nextToken": "xxxxxx"
    }
  }
}

In order to get all 2 two items, I need to set $limit=4. Why?


问:
Google isn't displaying mobile SERP favicon
Since one month I always tried to fix my mobile SERP favicon and google recrawled my site many times in the meantime. Even though it's still not working. The GSC isn't showing it either, same with Lighthouse...
What have I done wrong?

Here is my favicon code:

```<code>
<!-- favicon -->

<link rel="apple-touch-icon" sizes="180x180" href="https://eselsbruecken-generator.de/data/apple-touch-icon.png">

<link rel="icon" type="image/png" sizes="32x32" href="https://eselsbruecken-generator.de/data/favicon-32x32.png">

<link rel="icon" type="image/png" sizes="16x16" href="https://eselsbruecken-generator.de/data/favicon-16x16.png">

<link rel="manifest" href="https://eselsbruecken-generator.de/data/site.webmanifest">

<link rel="mask-icon" href="https://eselsbruecken-generator.de/data/safari-pinned-tab.svg" color="#5bbad5">

<link rel="shortcut icon" href="https://eselsbruecken-generator.de/data/favicon.ico">

<meta name="msapplication-TileColor" content="#da532c">

<meta name="msapplication-config" content="/data/browserconfig.xml">

<meta name="theme-color" content="#ffffff">

<!-- favicon end -->

</code>```

I am grateful for anything helpful...

Have a nice day!

Body:
Since one month I always tried to fix my mobile SERP favicon and google recrawled my site many times in the meantime. Even though it's still not working. The GSC isn't showing it either, same with Lighthouse...
What have I done wrong?

Here is my favicon code:

<link rel="apple-touch-icon" sizes="180x180" href="https://eselsbruecken-generator.de/data/apple-touch-icon.png">

<link rel="icon" type="image/png" sizes="32x32" href="https://eselsbruecken-generator.de/data/favicon-32x32.png">

<link rel="icon" type="image/png" sizes="16x16" href="https://eselsbruecken-generator.de/data/favicon-16x16.png">

<link rel="manifest" href="https://eselsbruecken-generator.de/data/site.webmanifest">

<link rel="mask-icon" href="https://eselsbruecken-generator.de/data/safari-pinned-tab.svg" color="#5bbad5">

<link rel="shortcut icon" href="https://eselsbruecken-generator.de/data/favicon.ico">

<meta name="msapplication-TileColor" content="#da532c">

<meta name="msapplication-config" content="/data/browserconfig.xml">

<meta name="theme-color" content="#ffffff">

I am grateful for anything helpful...

Have a nice day!


问:
How to make the color of the number green when its greater than 0, red when less than 0, and black when its 0;
i tried to increase the number of the valueHolder variable when the user click the increase button and make the color green, the first condition happen but the color get green even its less than 0 or equal to 0;
i want to increase the number and alongside number the color should get green according to the conditions which i set.</p>
```<code>
const valueHolder = document.getElementById("value");
const decreaseBtn = document.getElementById("decrease");

increaseBtn.addEventListener("click", increaseNumber);

function increaseNumber(){
   valueHolder.innerText ++;
   if(valueHolder.innerText > 0){
      valueHolder.style.color = "green";
   }else if(valueHolder.innerText < 0){
valueHolder.style.color = "red";
}else{
valueHolder.style.color = "black";
}
}
</code>```

Body:
i tried to increase the number of the valueHolder variable when the user click the increase button and make the color green, the first condition happen but the color get green even its less than 0 or equal to 0;
i want to increase the number and alongside number the color should get green according to the conditions which i set.

const valueHolder = document.getElementById("value");
const decreaseBtn = document.getElementById("decrease");

increaseBtn.addEventListener("click", increaseNumber);

function increaseNumber(){
   valueHolder.innerText ++;
   if(valueHolder.innerText > 0){
      valueHolder.style.color = "green";
   }else if(valueHolder.innerText < 0){
valueHolder.style.color = "red";
}else{
valueHolder.style.color = "black";
}
}


问:
how to train yolov4 on kaggle notebook
i am trying to train yolov4 on kaggle notebook and i am easily able to train model with colab.

i coloned git repo for yolov4 alexy then try to compile it but it showing following error

```<code>Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv' found
./src/image_opencv.cpp:16:10: fatal error: opencv2/core/version.hpp: No such file or directory
   16 | #include <opencv2/core/version.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:182: obj/image_opencv.o] Error 1
</code>```

Title: how to train yolov4 on kaggle notebook

Body:
i am trying to train yolov4 on kaggle notebook and i am easily able to train model with colab.

i coloned git repo for yolov4 alexy then try to compile it but it showing following error

Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv' found
./src/image_opencv.cpp:16:10: fatal error: opencv2/core/version.hpp: No such file or directory
   16 | #include <opencv2/core/version.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:182: obj/image_opencv.o] Error 1


问:
lxml How to keep multi string attribute after find()
I'm trying to parse xml file with namespaces.
XML file contain sql query and parameters like this:

`

```<code><rs:data>
    <z:row Level='0' ParentName='Exam Workplaces' QueryID='7834' QueryName='EWWorksInQueueByPlaceID_v6' Body='--EWWorksInQueueByPlaceID_v6

declare
  @ExamWorkplaceID uniqueidentifier
 ,@SampleNum nvarchar(40)
 ,@PantheraPlatesCode nvarchar(20)
 ,@Locale int
 ,@ET nvarchar(MAX)
 ,@SDate DateTime
 ,@FDate DateTime

set @ExamWorkplaceID = :ExamWorkplaceID

...
**Too many strings skipped**
...

'
         Notes='V-Works in Queue By WorkplaceID' CursorLocation='3' CommandType='1' CursorType='3' LockType='3'>
        <Params ParamID='119448' QueryID='7834' ParamIndex='0' ParamName='ExamWorkplaceID' ParamType='72' ParamDirection='1'
             ParamSize='0'/>
        <Params ParamID='119453' QueryID='7834' ParamIndex='1' ParamName='SampleNum' ParamType='202' ParamDirection='1'
             ParamSize='40'/>
        <Params ParamID='119455' QueryID='7834' ParamIndex='2' ParamName='PantheraPlatesCode' ParamType='202' ParamDirection='1'
             ParamSize='20'/>
    </z:row>
</code>```

My python code for getting sql body:

```<code>from lxml import etree as ET

file = '02_Query_EWWorksInQueueByPlaceID_v6.xml'

tree = ET.parse(file)
root = tree.getroot()

for a in root.findall('rs:data',root.nsmap):
    q = a.find('z:row',root.nsmap)
    body = q.attrib['Body']
</code>```

`
After execute, I got one row string without \t and \n
Where did I make a mistake?

How to get sql body with keeped \n and \t

Body:
I'm trying to parse xml file with namespaces.
XML file contain sql query and parameters like this:

`

<rs:data>
    <z:row Level='0' ParentName='Exam Workplaces' QueryID='7834' QueryName='EWWorksInQueueByPlaceID_v6' Body='--EWWorksInQueueByPlaceID_v6

declare
  @ExamWorkplaceID uniqueidentifier
 ,@SampleNum nvarchar(40)
 ,@PantheraPlatesCode nvarchar(20)
 ,@Locale int
 ,@ET nvarchar(MAX)
 ,@SDate DateTime
 ,@FDate DateTime

set @ExamWorkplaceID = :ExamWorkplaceID

...
**Too many strings skipped**
...

'
         Notes='V-Works in Queue By WorkplaceID' CursorLocation='3' CommandType='1' CursorType='3' LockType='3'>
        <Params ParamID='119448' QueryID='7834' ParamIndex='0' ParamName='ExamWorkplaceID' ParamType='72' ParamDirection='1'
             ParamSize='0'/>
        <Params ParamID='119453' QueryID='7834' ParamIndex='1' ParamName='SampleNum' ParamType='202' ParamDirection='1'
             ParamSize='40'/>
        <Params ParamID='119455' QueryID='7834' ParamIndex='2' ParamName='PantheraPlatesCode' ParamType='202' ParamDirection='1'
             ParamSize='20'/>
    </z:row>

My python code for getting sql body:

from lxml import etree as ET

file = '02_Query_EWWorksInQueueByPlaceID_v6.xml'

tree = ET.parse(file)
root = tree.getroot()

for a in root.findall('rs:data',root.nsmap):
    q = a.find('z:row',root.nsmap)
    body = q.attrib['Body']

`
After execute, I got one row string without \t and \n
Where did I make a mistake?

How to get sql body with keeped \n and \t


问:
Setup local docker Image for google Dataproc service
I am having trouble setting up the google docker image for Dataproc service. I tried steps on below stackoverflow

https://stackoverflow.com/questions/69555415/gcp-dataproc-base-docker-image/74715158#74715158

but getting an error as below

```<code>PS C:\Docker_setup> docker run -v /home/sample-spark-app:/home/sample-spark-app d4e6c561de5b spark-submit --master local[4] /home/sample-spark-app/pi.py
CONDA_HOME: /opt/conda
PYSPARK_PYTHON: /opt/conda/bin/python
/opt/conda/bin/python: can't open file '/home/sample-spark-app/pi.py': [Errno 2] No such file or directory
</code>```

I followed steps from below answer
https://stackoverflow.com/questions/69555415/gcp-dataproc-base-docker-image/74715158#74715158

Body:
I am having trouble setting up the google docker image for Dataproc service. I tried steps on below stackoverflow

https://stackoverflow.com/questions/69555415/gcp-dataproc-base-docker-image/74715158#74715158

but getting an error as below

PS C:\Docker_setup> docker run -v /home/sample-spark-app:/home/sample-spark-app d4e6c561de5b spark-submit --master local[4] /home/sample-spark-app/pi.py
CONDA_HOME: /opt/conda
PYSPARK_PYTHON: /opt/conda/bin/python
/opt/conda/bin/python: can't open file '/home/sample-spark-app/pi.py': [Errno 2] No such file or directory

I followed steps from below answer
https://stackoverflow.com/questions/69555415/gcp-dataproc-base-docker-image/74715158#74715158


问:
function inside a function project online Odata url query
I am trying to create a Project Online OData URL where I use two functions, one inside the other $filter=substring(ResourceName, indexof(ResourceName,','),10) eq 'example'

substring is the first function and index of is the second function called inside the substring brackets and it returns an integer.

so, I get this message back:

```<code>Fehler beim Verarbeiten dieser Anforderung.
</code>```

and I just want to know why and whether I can do the same some other way

Body:
I am trying to create a Project Online OData URL where I use two functions, one inside the other $filter=substring(ResourceName, indexof(ResourceName,','),10) eq 'example'

substring is the first function and index of is the second function called inside the substring brackets and it returns an integer.

so, I get this message back:

Fehler beim Verarbeiten dieser Anforderung.

and I just want to know why and whether I can do the same some other way


问:
Colouring Upper and Lower Sections of Violin Plot
I have a set of data that I want show both the range and distribution of two subsections of the data in groups.

The best I can do so far is to plot a violin for the whole distribution over the top of a floating column graph (created by geom_boxplot) Boxplot and violin plot

```<code>ggplot()+geom_boxplot(data=all,aes(x=improvement_percent,ymin = umin, ymax = umax, lower = umin, upper = umax, middle = umin),colour="darkgrey",fill="darkgrey", stat = 'identity') + geom_boxplot(data=all,aes(x=improvement_percent,ymin = smin, ymax = smax, lower = smin, upper = smax, middle = smin),colour="green",fill="#52D31F", stat = 'identity')+ geom_violin(data=g,aes(x=improvement_percent,y=total_well_to_wheel_co2),alpha=1)
</code>```

However, I have been asked if I can get rid of the box and just colour the violin in two sections...
However the best I can achieve is this - however I want the distribution over the whole set basically for it to be the same shape and size violin in the first example - but just the colours for the two success and unsuccess halves:

```<code>ggplot()+geom_violin(data=g,aes(x=factor(improvement_percent),y=total_well_to_wheel_co2,fill=GOV),alpha=1, position=position_dodge(0))
</code>```

Stacked violins

Can anyone make any suggestions as to whether it is possible and how?

Body:
I have a set of data that I want show both the range and distribution of two subsections of the data in groups.

The best I can do so far is to plot a violin for the whole distribution over the top of a floating column graph (created by geom_boxplot) Boxplot and violin plot

ggplot()+geom_boxplot(data=all,aes(x=improvement_percent,ymin = umin, ymax = umax, lower = umin, upper = umax, middle = umin),colour="darkgrey",fill="darkgrey", stat = 'identity') + geom_boxplot(data=all,aes(x=improvement_percent,ymin = smin, ymax = smax, lower = smin, upper = smax, middle = smin),colour="green",fill="#52D31F", stat = 'identity')+ geom_violin(data=g,aes(x=improvement_percent,y=total_well_to_wheel_co2),alpha=1)

However, I have been asked if I can get rid of the box and just colour the violin in two sections...
However the best I can achieve is this - however I want the distribution over the whole set basically for it to be the same shape and size violin in the first example - but just the colours for the two success and unsuccess halves:

ggplot()+geom_violin(data=g,aes(x=factor(improvement_percent),y=total_well_to_wheel_co2,fill=GOV),alpha=1, position=position_dodge(0))

Stacked violins

Can anyone make any suggestions as to whether it is possible and how?


问:
Ingenico Device - Disable all receipts print on MOVE5000
I'm using a python library to manipulate Ingenico mobile payment device through RS232/USB connection. I'm developing an integration from my own POS solution. I would like to know of i can turn off receipts ( disable both customer and marchand receipts) on a Ingenico Move 5000 terminal. Currently i can only put customer receipt printing to OPTIONAL (asked to the client) but i didn't found how to disable the marchant receipt.

Thanks for help.

For older device (ICT250), i read that we can disable all receipts from an admin menu (put RcptCopies to 1 disable all receipts) but i can't found on MOVE5000 device how to access to the admin menu and the RcptCopies param.


问:
Blinking cursor shifting at start of the text with onInput
I'm handling text using contentEditable and onInput on

```<code><>
  <div
  contentEditable
  data-which="title"
  onClick={e => {
    e.stopPropagation();
    e.preventDefault();
  }}
  onInput={(e) => alter(e)}
  className={styles.widgetSignalTitleText}
 >
    {widget.alterations.title}
 </div>
</>
</code>```

After I insert a text at the end of existing text, the blinking cursor is shifting to the start of the whole text.
How can this be prevented?

Body:
I'm handling text using contentEditable and onInput on

<>

 {
    e.stopPropagation();
    e.preventDefault();
  }}
  onInput={(e) => alter(e)}
  className={styles.widgetSignalTitleText}
 >
    {widget.alterations.title}

</>

After I insert a text at the end of existing text, the blinking cursor is shifting to the start of the whole text.
How can this be prevented?


问:
Can I train object segmentation using RLE for individual objects(COCO dataset format and YOLACT)
I want to train Yolact, I have generated mask images for my data. My question is can I use RLE to define the segmentation for all my individual objects since in every image every object is there exactly once.

Any suggestion will be appreciated.