问:
adjusted p value group wise or overall
Recently I met an issue, when I do t.test like below:

```<code>library(dplyr)
library(rstatix)
data(ToothGrowth)
ToothGrowth%>%group_by(supp)%>%t_test(len~dose)
</code>```
```<code>  supp  .y.   group1 group2    n1    n2 statistic    df            p      p.adj
* <fct> <chr> <chr>  <chr>  <int> <int>     <dbl> <dbl>        <dbl>      <dbl>
1 OJ    len   0.5    1         10    10     -5.05  17.7 0.0000878    0.000176
2 OJ    len   0.5    2         10    10     -7.82  14.7 0.00000132   0.00000396
3 OJ    len   1      2         10    10     -2.25  15.8 0.039        0.039
4 VC    len   0.5    1         10    10     -7.46  17.9 0.000000681  0.00000136
5 VC    len   0.5    2         10    10    -10.4   14.3 0.0000000468 0.00000014
6 VC    len   1      2         10    10     -5.47  13.6 0.0000916    0.0000916
</code>```

and you will notice that the adjusted p value were calculated within the "supp" group
I can also calculate the adjusted p value with the p.adjust function

```<code>ToothGrowth%>%group_by(supp)%>%t_test(len~dose)%>%ungroup()%>%mutate(padj = p.adjust(p,method="holm"))%>%as.data.frame()
</code>```
```<code>  supp .y. group1 group2 n1 n2  statistic       df        p    p.adj
1   OJ len    0.5      1 10 10  -5.048635 17.69835 8.78e-05 1.76e-04
2   OJ len    0.5      2 10 10  -7.817021 14.66780 1.32e-06 3.96e-06
3   OJ len      1      2 10 10  -2.247761 15.84238 3.90e-02 3.90e-02
4   VC len    0.5      1 10 10  -7.463430 17.86244 6.81e-07 1.36e-06
5   VC len    0.5      2 10 10 -10.387795 14.32712 4.68e-08 1.40e-07
6   VC len      1      2 10 10  -5.469814 13.59996 9.16e-05 9.16e-05
  p.adj.signif      padj
1          *** 2.634e-04
2         **** 5.280e-06
3            * 3.900e-02
4         **** 3.405e-06
5         **** 2.808e-07
6         **** 2.634e-04
</code>```

So I am not sure which should be the correct way. I am thinking the first method is the correct one. But maybe someone will help me to answer the question and explain why?
Thanks!

I also search some resources and try to have a clear idea but I may need to know more about this.

Title: adjusted p value group wise or overall

Body:
Recently I met an issue, when I do t.test like below:

library(dplyr)
library(rstatix)
data(ToothGrowth)
ToothGrowth%>%group_by(supp)%>%t_test(len~dose)

  supp  .y.   group1 group2    n1    n2 statistic    df            p      p.adj
* <fct> <chr> <chr>  <chr>  <int> <int>     <dbl> <dbl>        <dbl>      <dbl>
1 OJ    len   0.5    1         10    10     -5.05  17.7 0.0000878    0.000176
2 OJ    len   0.5    2         10    10     -7.82  14.7 0.00000132   0.00000396
3 OJ    len   1      2         10    10     -2.25  15.8 0.039        0.039
4 VC    len   0.5    1         10    10     -7.46  17.9 0.000000681  0.00000136
5 VC    len   0.5    2         10    10    -10.4   14.3 0.0000000468 0.00000014
6 VC    len   1      2         10    10     -5.47  13.6 0.0000916    0.0000916

and you will notice that the adjusted p value were calculated within the "supp" group
I can also calculate the adjusted p value with the p.adjust function

ToothGrowth%>%group_by(supp)%>%t_test(len~dose)%>%ungroup()%>%mutate(padj = p.adjust(p,method="holm"))%>%as.data.frame()

  supp .y. group1 group2 n1 n2  statistic       df        p    p.adj
1   OJ len    0.5      1 10 10  -5.048635 17.69835 8.78e-05 1.76e-04
2   OJ len    0.5      2 10 10  -7.817021 14.66780 1.32e-06 3.96e-06
3   OJ len      1      2 10 10  -2.247761 15.84238 3.90e-02 3.90e-02
4   VC len    0.5      1 10 10  -7.463430 17.86244 6.81e-07 1.36e-06
5   VC len    0.5      2 10 10 -10.387795 14.32712 4.68e-08 1.40e-07
6   VC len      1      2 10 10  -5.469814 13.59996 9.16e-05 9.16e-05
  p.adj.signif      padj
1          *** 2.634e-04
2         **** 5.280e-06
3            * 3.900e-02
4         **** 3.405e-06
5         **** 2.808e-07
6         **** 2.634e-04

So I am not sure which should be the correct way. I am thinking the first method is the correct one. But maybe someone will help me to answer the question and explain why?
Thanks!

I also search some resources and try to have a clear idea but I may need to know more about this.


来源: stackexchange

问:
Python class, parametr self
I have a question. How to pass self parametr to CharsManager.generate_char because Pycharm is still asking about third parametr 'r_max'. I cannot generate a char with my method. The main thing in this task is to create a class which is adding new chars into list. But when I try to create first char I got this kind of error</p>
```<code>from typing import Final
from dataclasses import dataclass
import random

@dataclass
class CharsManager:
    text: list[str]

    def generate_char(self, r_min: int, r_max: int) -> str:
        c = (random.choice('A-Z') if random.randint(r_min, r_max) % 2 == 0 else random.choice('a-z'))
        self.text.append(c)
        return c

    def delete_last(self) -> str:
        return self.text.pop()

    def clear(self) -> None:
        self.text.clear()

    def __str__(self) -> str:
        return ''.join(self.text)

def main() -> None:
    VALUE_MIN: Final = 1
    VALUE_MAX: Final = 10

    n = CharsManager.generate_char(VALUE_MIN, VALUE_MAX)
    strings = CharsManager([n])

if __name__ == "__main__":
    main()
</code>```

ContentLicense: CC BY-SA 4.0

Title: Python class, parametr self

Body:
I have a question. How to pass self parametr to CharsManager.generate_char because Pycharm is still asking about third parametr 'r_max'. I cannot generate a char with my method. The main thing in this task is to create a class which is adding new chars into list. But when I try to create first char I got this kind of error

from typing import Final
from dataclasses import dataclass
import random

@dataclass
class CharsManager:
    text: list[str]

    def generate_char(self, r_min: int, r_max: int) -> str:
        c = (random.choice('A-Z') if random.randint(r_min, r_max) % 2 == 0 else random.choice('a-z'))
        self.text.append(c)
        return c

    def delete_last(self) -> str:
        return self.text.pop()

    def clear(self) -> None:
        self.text.clear()

    def __str__(self) -> str:
        return ''.join(self.text)

def main() -> None:
    VALUE_MIN: Final = 1
    VALUE_MAX: Final = 10

    n = CharsManager.generate_char(VALUE_MIN, VALUE_MAX)
    strings = CharsManager([n])

if __name__ == "__main__":
    main()


问:
Inconsistent Timestamp format when merging to dataframes
I am merging two dataframes, both have a Timestamp format DD.MM.YYYY. But when I merge them, some rows have format MM.DD.YYYY and others DD.MM.YYYY.

The dataframes I'm using are being exported from csv files and are really big, but here's an example:

df_dts1:

```<code>dict = {'date' : ['01.07.2022 00:01:00', '24.07.2022 22:46:00', '09.08.2022 15:14:00', '06.09.2022 18:45:00'],
'CST_dts_eCO2_FC_out_SGP30' : [469, 1167, 5638, 651],
'CST_dts_IAQ_FC_in_BME680' : [196, 39, 25, 186],
'CST_dts_eCO2_FC_out_BME680' : [891, 12690, 6238, 1701]}

df_dts1 = pd.DataFrame(dict)
display(df_dts1)
</code>```

date
CST_dts_eCO2_FC_out_SGP30
CST_dts_IAQ_FC_in_BME680
CST_dts_eCO2_FC_out_BME680

01.07.2022  00:01:00
469
196
891

24.07.2022  22:46:00
1167
39
12690

09.08.2022  15:14:00
5638
25
6238

06.09.2022  18:45:00
651
186
1701

df_OxyMode:

```<code>dict = {'LOCALTIME' : ['01.07.2022 02:00:04', '20.08.2022 02:00:09', '02.09.2022 02:00:39', '01.10.2022 01:59:56'],
'x_LowOxyRegeneration_SPS' : [0.0, 0.0, 1.0, 0.0]}

df_OxyMode = pd.DataFrame(dict)
display(df_OxyMode)
</code>```

LOCALTIME
x_LowOxyRegeneration_SPS

01.07.2022 02:00:04
0.0

20.08.2022 02:00:09
0.0

02.09.2022 02:00:39
1.0

01.10.2022 01:59:56
0.0

I am currently trying this:

```<code>frames = [df_dts1, df_OxyMode]

# rename columns to have same name
df_dts1.rename(columns={'date':'Timestamp'}, inplace=True)
df_OxyMode.rename(columns={'LOCALTIME':'Timestamp'}, inplace=True)

# datetime format to avoid error (incompatible merge keys [0] dtype('<M8[ns]') and dtype('O'), must be the same type)
df_dts1['Timestamp'] = pd.to_datetime(df_dts1['Timestamp'])
df_OxyMode['Timestamp'] = pd.to_datetime(df_OxyMode['Timestamp'])

# sorting to avoid error (ValueError: left keys must be sorted)
df_dts1 = df_dts1.sort_values(by='Timestamp', ascending=True)
df_OxyMode = df_OxyMode.sort_values(by='Timestamp', ascending=True)

# merge dfs
df_ausw = pd.merge_asof(df_dts1, df_OxyMode, on='Timestamp').assign(Timestamp = lambda x: x['Timestamp'].dt.strftime('%d-%m-%Y %H:%M'))
df_ausw = df_ausw.sort_values(by='Timestamp', ascending=True)

display(df_ausw)
</code>```

but the format of the Timestamp column is inconsistent (some rows MM.DD.YYYY and others DD.MM.YYYY) and looks like this:
merged df

At first I had it without the

.assign(Timestamp = lambda x: x['Timestamp'].dt.strftime('%d-%m-%Y %H:%M'))

but when I plotted the data it looked wrong:
merged df without .assign(Timestamp = lambda...
instead of:
df before merging

Does someone have any idea how I can solve this?

Body:
I am merging two dataframes, both have a Timestamp format DD.MM.YYYY. But when I merge them, some rows have format MM.DD.YYYY and others DD.MM.YYYY.

The dataframes I'm using are being exported from csv files and are really big, but here's an example:

df_dts1:

dict = {'date' : ['01.07.2022 00:01:00', '24.07.2022 22:46:00', '09.08.2022 15:14:00', '06.09.2022 18:45:00'],
'CST_dts_eCO2_FC_out_SGP30' : [469, 1167, 5638, 651],
'CST_dts_IAQ_FC_in_BME680' : [196, 39, 25, 186],
'CST_dts_eCO2_FC_out_BME680' : [891, 12690, 6238, 1701]}

df_dts1 = pd.DataFrame(dict)
display(df_dts1)

date
CST_dts_eCO2_FC_out_SGP30
CST_dts_IAQ_FC_in_BME680
CST_dts_eCO2_FC_out_BME680

01.07.2022  00:01:00
469
196
891

24.07.2022  22:46:00
1167
39
12690

09.08.2022  15:14:00
5638
25
6238

06.09.2022  18:45:00
651
186
1701

df_OxyMode:

dict = {'LOCALTIME' : ['01.07.2022 02:00:04', '20.08.2022 02:00:09', '02.09.2022 02:00:39', '01.10.2022 01:59:56'],
'x_LowOxyRegeneration_SPS' : [0.0, 0.0, 1.0, 0.0]}

df_OxyMode = pd.DataFrame(dict)
display(df_OxyMode)

LOCALTIME
x_LowOxyRegeneration_SPS

01.07.2022 02:00:04
0.0

20.08.2022 02:00:09
0.0

02.09.2022 02:00:39
1.0

01.10.2022 01:59:56
0.0

I am currently trying this:

frames = [df_dts1, df_OxyMode]

# rename columns to have same name
df_dts1.rename(columns={'date':'Timestamp'}, inplace=True)
df_OxyMode.rename(columns={'LOCALTIME':'Timestamp'}, inplace=True)

# datetime format to avoid error (incompatible merge keys [0] dtype('<M8[ns]') and dtype('O'), must be the same type)
df_dts1['Timestamp'] = pd.to_datetime(df_dts1['Timestamp'])
df_OxyMode['Timestamp'] = pd.to_datetime(df_OxyMode['Timestamp'])

# sorting to avoid error (ValueError: left keys must be sorted)
df_dts1 = df_dts1.sort_values(by='Timestamp', ascending=True)
df_OxyMode = df_OxyMode.sort_values(by='Timestamp', ascending=True)

# merge dfs
df_ausw = pd.merge_asof(df_dts1, df_OxyMode, on='Timestamp').assign(Timestamp = lambda x: x['Timestamp'].dt.strftime('%d-%m-%Y %H:%M'))
df_ausw = df_ausw.sort_values(by='Timestamp', ascending=True)

display(df_ausw)

but the format of the Timestamp column is inconsistent (some rows MM.DD.YYYY and others DD.MM.YYYY) and looks like this:
merged df

At first I had it without the

.assign(Timestamp = lambda x: x['Timestamp'].dt.strftime('%d-%m-%Y %H:%M'))

but when I plotted the data it looked wrong:
merged df without .assign(Timestamp = lambda...
instead of:
df before merging

Does someone have any idea how I can solve this?


问:
Import error using VS Code remote interpreter
I am running VS Code with remote ssh extension to a linux server.
I have added a settings.json file with:

"python.analysis.extraPaths": [ "/home/code/module/"

and an entry in the launch.json file:

"env": {"PYTHONPATH": "/home/code/module/"}

Both of them are located on the remote server in the .vscode directory.
When trying to import modules from /home/code/module/ I get a "ModuleNotFoundError"

Printing sys.path shows the interpreter libs, and the sub directory of the specific python code I am running, e.g. /home/code/module/class/examples

What am I doing wrong?


问:
"value larger than specified precision allowed for this column" error when inserting number
Doing a college assignment and can't figure out the error

```<code>ORA-01438: value larger than specified precision allowed for this column
ORA-06512: at "SYS.DBMS_SQL", line 1721

1. INSERT INTO HR_EMPLOYEES
2.     (EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, HIRE_DATE, JOB_ID, SALARY, COMMISSION_PCT, MANAGER_ID, DEPARTMENT_ID)
3. VALUES (203010, 'SUSAN', 'LYNCH', 'SLYNCH@GMAIL.COM', 0878457391, TO_DATE('2017/07/08', 'yyyy/mm/dd'), 93, 36000, 10, 1900, 60);
</code>```

Here is the table I'm trying to insert into

```<code>CREATE TABLE HR_EMPLOYEES
    (
    EMPLOYEE_ID NUMBER(6) NOT NULL,
    FIRST_NAME VARCHAR2(20),
    LAST_NAME VARCHAR2(25) NOT NULL,
    EMAIL VARCHAR2(20) NOT NULL,
    PHONE_NUMBER VARCHAR2(20),
    HIRE_DATE DATE NOT NULL,
    JOB_ID VARCHAR2(10) NOT NULL,
    SALARY NUMERIC (8,2),
    COMMISSION_PCT NUMERIC (2,2),
    MANAGER_ID NUMBER(6),
    DEPARTMENT_ID NUMBER(4)
    );
</code>```

Here is the insert

```<code>INSERT INTO HR_EMPLOYEES
    (EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, HIRE_DATE, JOB_ID, SALARY, COMMISSION_PCT, MANAGER_ID, DEPARTMENT_ID)
VALUES (203010, 'SUSAN', 'LYNCH', 'SLYNCH@GMAIL.COM', 0878457391, TO_DATE('2017/07/08', 'yyyy/mm/dd'), 93, 36000, 10, 1900, 60);

</code>```

Thanks :)

Body:
Doing a college assignment and can't figure out the error

ORA-01438: value larger than specified precision allowed for this column
ORA-06512: at "SYS.DBMS_SQL", line 1721

1. INSERT INTO HR_EMPLOYEES
2.     (EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, HIRE_DATE, JOB_ID, SALARY, COMMISSION_PCT, MANAGER_ID, DEPARTMENT_ID)
3. VALUES (203010, 'SUSAN', 'LYNCH', 'SLYNCH@GMAIL.COM', 0878457391, TO_DATE('2017/07/08', 'yyyy/mm/dd'), 93, 36000, 10, 1900, 60);

Here is the table I'm trying to insert into

CREATE TABLE HR_EMPLOYEES
    (
    EMPLOYEE_ID NUMBER(6) NOT NULL,
    FIRST_NAME VARCHAR2(20),
    LAST_NAME VARCHAR2(25) NOT NULL,
    EMAIL VARCHAR2(20) NOT NULL,
    PHONE_NUMBER VARCHAR2(20),
    HIRE_DATE DATE NOT NULL,
    JOB_ID VARCHAR2(10) NOT NULL,
    SALARY NUMERIC (8,2),
    COMMISSION_PCT NUMERIC (2,2),
    MANAGER_ID NUMBER(6),
    DEPARTMENT_ID NUMBER(4)
    );

Here is the insert

INSERT INTO HR_EMPLOYEES
    (EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, HIRE_DATE, JOB_ID, SALARY, COMMISSION_PCT, MANAGER_ID, DEPARTMENT_ID)
VALUES (203010, 'SUSAN', 'LYNCH', 'SLYNCH@GMAIL.COM', 0878457391, TO_DATE('2017/07/08', 'yyyy/mm/dd'), 93, 36000, 10, 1900, 60);

Thanks :)


问:
How to add an autocomplete field in an existing form?
Given a form

```<code>class SettingsForm(Form):
    first_name = forms.CharField(
        widget=forms.TextInput(attrs={'placeholder': 'First name'}),
        label='',
    )
    last_name = forms.CharField(
        widget=forms.TextInput(attrs={'placeholder': 'Last name'}),
        label='',
    )
</code>```

I'm trying to add an autocomplete field languages that suggests languages using the model below

```<code>class Language(models.Model):
    name = models.CharField(max_length=255, unique=True)
    code = models.CharField(max_length=7, unique=True, null=True)

    def __str__(self):
        return self.name
</code>```

Based on django-autocomplete-light documentation, I tried the below:

```<code>languages = djhacker.formfield(
    Profile.languages,
    forms.ChoiceField,
    widget=autocomplete.ModelSelect2(url='language-autocomplete'),
)
</code>```

but it looks like formfield is not returning anything

```<code>bootstrap5.exceptions.BootstrapError: Parameter "field" should contain a valid Django BoundField.
[29/Dec/2022 13:58:56] "GET /settings/ HTTP/1.1" 500 182091
</code>```

by checking further, the error above occurs because languages is None. If so, then how should I be adding languages as a field of the settings form? The desired outcome is a field that autocompletes and forms a tag, similar to how the tags below work.

Body:
Given a form

class SettingsForm(Form):
    first_name = forms.CharField(
        widget=forms.TextInput(attrs={'placeholder': 'First name'}),
        label='',
    )
    last_name = forms.CharField(
        widget=forms.TextInput(attrs={'placeholder': 'Last name'}),
        label='',
    )

I'm trying to add an autocomplete field languages that suggests languages using the model below

class Language(models.Model):
    name = models.CharField(max_length=255, unique=True)
    code = models.CharField(max_length=7, unique=True, null=True)

    def __str__(self):
        return self.name

Based on django-autocomplete-light documentation, I tried the below:

languages = djhacker.formfield(
    Profile.languages,
    forms.ChoiceField,
    widget=autocomplete.ModelSelect2(url='language-autocomplete'),
)

but it looks like formfield is not returning anything

bootstrap5.exceptions.BootstrapError: Parameter "field" should contain a valid Django BoundField.
[29/Dec/2022 13:58:56] "GET /settings/ HTTP/1.1" 500 182091

by checking further, the error above occurs because languages is None. If so, then how should I be adding languages as a field of the settings form? The desired outcome is a field that autocompletes and forms a tag, similar to how the tags below work.


问:
Arrays relashionship - independent paginations
I want to show a table of data to the user with two independent arrays. I have user data and access permissions.

The user and permissions data are usually of different sizes, that is, I can have a greater number of users than the number of permissions, but it can also be the other way around.

What I want is to show a single table with independent paging for each array.

```<code>=====================================================================
            Users                 ||            Permissions
=====================================================================
[ ] user 1                        ||                 Permission A [ ]
[ ] user 2                        ||                 Permission B [ ]
[ ] user 3                        ||                 Permission C [ ]
...                               ||                              ...
=====================================================================
< 1 2 3 >                   |associate btn|                 < 1 2 3 >
</code>```

My current solution is to join the arrays, where the new array has the format:

```<code>{
    id: int
    user: user[index]
    permission: permission[index]
}
</code>```

So I can loop the final array and list both data in the same table, and when one array is greater than the other it sets the user/permission to null.

But my problem is to create independent paginations. I want to associate permission that is on the last page with the user that is on the first page.

How can I create these independent paginations when I loop through the final array?

Body:
I want to show a table of data to the user with two independent arrays. I have user data and access permissions.

The user and permissions data are usually of different sizes, that is, I can have a greater number of users than the number of permissions, but it can also be the other way around.

What I want is to show a single table with independent paging for each array.

=====================================================================
            Users                 ||            Permissions
=====================================================================
[ ] user 1                        ||                 Permission A [ ]
[ ] user 2                        ||                 Permission B [ ]
[ ] user 3                        ||                 Permission C [ ]
...                               ||                              ...
=====================================================================
< 1 2 3 >                   |associate btn|                 < 1 2 3 >

My current solution is to join the arrays, where the new array has the format:

{
    id: int
    user: user[index]
    permission: permission[index]
}

So I can loop the final array and list both data in the same table, and when one array is greater than the other it sets the user/permission to null.

But my problem is to create independent paginations. I want to associate permission that is on the last page with the user that is on the first page.

How can I create these independent paginations when I loop through the final array?


问:
Node.js open package multiple different chrome profiles
I'm trying to open multiple chrome profiles from my command line interface which I coded in node.js. However, when I use the open package, the links which should be opened in different chrome profiles always get opened in the same profile (in multiple tabs but still the same profile). I want to open them in other chrome profiles tho.</p>
```<code>const opn = require('open');

opn('https://www.google.com', {app: ['C:\Program Files\Google\Chrome\Application\chrome.exe', '--profile-directory="Default"']});

opn('https://www.snipes.com', {app: ['C:\Program Files\Google\Chrome\Application\chrome.exe', '--profile-directory="Profile 2"']});
</code>```

Body:
I'm trying to open multiple chrome profiles from my command line interface which I coded in node.js. However, when I use the open package, the links which should be opened in different chrome profiles always get opened in the same profile (in multiple tabs but still the same profile). I want to open them in other chrome profiles tho.

const opn = require('open');

opn('https://www.google.com', {app: ['C:\Program Files\Google\Chrome\Application\chrome.exe', '--profile-directory="Default"']});

opn('https://www.snipes.com', {app: ['C:\Program Files\Google\Chrome\Application\chrome.exe', '--profile-directory="Profile 2"']});


问:
Alternative to material table
I'm using NextJS and Tailwind. Since NextJS uses react v.18 npm Material Table is no longer supported. I used to use it all the time when I was using React v.16. Is there an alternative npm install that is compatible with React v.18? I'd like something that has similar functionality like being able to export the table to an excel file.</p>

Title: Alternative to material table


问:
How to use viewer.js within Mozilla's PDF.js
From the pdf.js package, I'm trying to integrate the functionality of viewer.js, viewer.html and viewer.css into my application to view and annotate PDF's. viewer.js appears to have a wealth of functionality. Finding documentation has been elusive.

This response to a question here includes a code sample that demonstrates how to use some of this functionality. It has unanswered comments about how to access this functionality as well. This article starts off with an auspicious enough title, "How to use and extend Mozilla's PDF.js Viewer" that inspired my title for this question, but ultimately concludes with "I hope to eventually get a guide into Mozilla's documentation to make this PDF Viewer more approachable." I have found no such guide.

My question: Are there examples or is there a guide to using viewer.js? Where? Alternatively, is there a different, more suitable package that can be used to accomplish the same thing that works with pdf.js?


问:
I need help understanding why JUnit tests throw a `org.postgresql.util.PSQLException: ERROR: cached plan must not change result type`
I have a Spring application with a bunch of integration tests that use TestContainers and JUnit. I create a protected static final PostgreSQLContainer<?> container = new PostgreSQLContainer<>("postgres:14-alpine") that I then use in my tests, and I have a method annotated with @BeforeEach that cleans the DB and then re-apply the migration.

Everything was working fine until I added a new migration script to my application:

CREATE TYPE user_state_enum AS ENUM ('ACTIVE', 'DELETED');

ALTER TABLE users ALTER COLUMN user_state TYPE user_state_enum; -- this was a text field before
```
<p>and suddenly I started getting some fails in my integration tests. It consistently fails on some tests while executing <code>userRepository.findByUserId(userId)</code> with the error <code>org.postgresql.util.PSQLException: ERROR: cached plan must not change result type</code>. I modified my entity Java class according to this tutorial, so I created a class that extends from <code>org.hibernate.type.EnumType</code> and implemented the <code>nullSafeSet</code> method.</p>
<p>I managed to solve the problem already by setting in my <code>application-test.yaml</code> the following property:</p>
<pre class="lang-yaml prettyprint-override"><code>spring:
  datasource:
    hikari:
      data-source-properties:
        preparedStatementCacheQueries: 0
</code>```

but I am still struggling to understand why this is happening. I read on some other SO posts that it might be due to Flyway altering the DB while I execute some select queries in a test, but afaik Flyway should be done migrating the DB once a test is executed, and the next migration should not start until the tests is done executing. I have an idea that it might be due to the fact that I delete and recreate the whole schema after every test, but I never encountered this behaviour in any other integration test I've written.

Body:
I have a Spring application with a bunch of integration tests that use TestContainers and JUnit. I create a protected static final PostgreSQLContainer<?> container = new PostgreSQLContainer<>("postgres:14-alpine") that I then use in my tests, and I have a method annotated with @BeforeEach that cleans the DB and then re-apply the migration.

Everything was working fine until I added a new migration script to my application:

CREATE TYPE user_state_enum AS ENUM ('ACTIVE', 'DELETED');

ALTER TABLE users ALTER COLUMN user_state TYPE user_state_enum; -- this was a text field before

and suddenly I started getting some fails in my integration tests. It consistently fails on some tests while executing userRepository.findByUserId(userId) with the error org.postgresql.util.PSQLException: ERROR: cached plan must not change result type. I modified my entity Java class according to this tutorial, so I created a class that extends from org.hibernate.type.EnumType and implemented the nullSafeSet method.

I managed to solve the problem already by setting in my application-test.yaml the following property:

spring:
  datasource:
    hikari:
      data-source-properties:
        preparedStatementCacheQueries: 0

but I am still struggling to understand why this is happening. I read on some other SO posts that it might be due to Flyway altering the DB while I execute some select queries in a test, but afaik Flyway should be done migrating the DB once a test is executed, and the next migration should not start until the tests is done executing. I have an idea that it might be due to the fact that I delete and recreate the whole schema after every test, but I never encountered this behaviour in any other integration test I've written.


问:
How to validate a TextField?
I'm using uniforms-antd and I want to add the extra parameter to the TextField if the input matches a pattern.
Form.js:

```<code>import { TextField } from 'uniforms-antd';
<TextField {...layout} name="vehicleNumber" extra={vinExtra}/>
</code>```

schema.js:

```<code>        return {
  type: 'object',
  properties: {
    vehicleNumber: { title: 'VIN', type: 'string', isNotEmpty: true },
  },
</code>```

Title: How to validate a TextField?

Body:
I'm using uniforms-antd and I want to add the extra parameter to the TextField if the input matches a pattern.
Form.js:

import { TextField } from 'uniforms-antd';
<TextField {...layout} name="vehicleNumber" extra={vinExtra}/>

schema.js:

        return {
  type: 'object',
  properties: {
    vehicleNumber: { title: 'VIN', type: 'string', isNotEmpty: true },
  },


问:
Monitorin emitted signals of Qt on Visual Studio
I am working on a project in C++ with Qt in Visual Studio. There are multiple level of signal to signal connection.
By saying that, I mean for example

```<code>//ExampleClass1
connect(this, ExampleClass1::signalToBeConnected, obj2, ExampleClass2::signalToBeConnected);

//ExampleClass2
connect(this, ExampleClass2::signalToBeConnected, obj3, ExampleClass3::signalToBeConnected);

//ExampleClass3
connect(this, ExampleClass3::signalToBeConnected, obj3, ExampleClass4::slotEnd);
</code>```

Just like this example, there are signal to signal connections until the last signal is connected to a slot. Although it is obvious that the triggering signal of "slotEnd" comes from "signalToBeConnected" of ExampleClass1, if exists, I want to be sure that which signals are emitted.

Body:
I am working on a project in C++ with Qt in Visual Studio. There are multiple level of signal to signal connection.
By saying that, I mean for example

//ExampleClass1
connect(this, ExampleClass1::signalToBeConnected, obj2, ExampleClass2::signalToBeConnected);

//ExampleClass2
connect(this, ExampleClass2::signalToBeConnected, obj3, ExampleClass3::signalToBeConnected);

//ExampleClass3
connect(this, ExampleClass3::signalToBeConnected, obj3, ExampleClass4::slotEnd);

Just like this example, there are signal to signal connections until the last signal is connected to a slot. Although it is obvious that the triggering signal of "slotEnd" comes from "signalToBeConnected" of ExampleClass1, if exists, I want to be sure that which signals are emitted.


问:
bootJar fails after upgrading to Gradle v7.6 (project is already evaluated)
I've updated Gradle to v7.6 and now the task bootJar does not work longer.
This is what I have configured in the past and what was working:

```<code>bootJar {
    mainClass.set("com.dwiner.app.MainApplication")
    from("$appDir/dist/angular/browser") {
        into 'static'
    }
}

bootJar.dependsOn 'npm_run_buildprod'
</code>```

It seems that the dependsOn has some troubles now, as it the build keeps crashing with the following message:

```<code>org.gradle.api.internal.tasks.TaskDependencyResolveException: Could not determine the dependencies of task ':bootJar'.
    ...
Caused by: org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreationException: Could not create task ':npm_run_buildprod'.
    ...
Caused by: org.gradle.api.tasks.TaskInstantiationException: Could not create task of type 'NpmTask'.
    ...
Caused by: org.gradle.api.InvalidUserCodeException: Cannot run Project.afterEvaluate(Closure) when the project is already evaluated.
</code>```

Update:
It seems that the issue occurs when executing npm_run_buildprod and is not dependent on the dependsOn config.

Any help is appreciated.

Body:
I've updated Gradle to v7.6 and now the task bootJar does not work longer.
This is what I have configured in the past and what was working:

bootJar {
    mainClass.set("com.dwiner.app.MainApplication")
    from("$appDir/dist/angular/browser") {
        into 'static'
    }
}

bootJar.dependsOn 'npm_run_buildprod'

It seems that the dependsOn has some troubles now, as it the build keeps crashing with the following message:

org.gradle.api.internal.tasks.TaskDependencyResolveException: Could not determine the dependencies of task ':bootJar'.
    ...
Caused by: org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreationException: Could not create task ':npm_run_buildprod'.
    ...
Caused by: org.gradle.api.tasks.TaskInstantiationException: Could not create task of type 'NpmTask'.
    ...
Caused by: org.gradle.api.InvalidUserCodeException: Cannot run Project.afterEvaluate(Closure) when the project is already evaluated.

Update:
It seems that the issue occurs when executing npm_run_buildprod and is not dependent on the dependsOn config.

Any help is appreciated.


问:
-F file=@foo.png equivalent in node fetch
I'm trying to perform an API call to Squarespace using node-fetch.

```<code>const FormData = new FormData();
formData.append(
      "file",
      "testimage.jpg",
      fs.createReadStream("testimg.jpg")
    );
    const send_img = await fetch(
      "https://api.squarespace.com/1.0/commerce/products/" + img_id + "/images",
      {
        method: "POST",
        headers: {
          Authorization: "Bearer " + process.env.SQUARESPACE_API_KEY,
          "User-Agent": "foobar",
          "Content-Type": "multipart/form-data",
        },
        body: formData,
      }
    );
</code>```

After performing this call I was getting the error

```<code>{
  type: 'INVALID_REQUEST_ERROR',
  subtype: null,
  message: "Expected exactly one file part named 'file', but found none.",
  details: null,
  contextId: 'IEBROFREUTEWDREAYEAF'
}
</code>```

The following cURL call successfully uploads the image

```<code>curl "https://api.squarespace.com/1.0/commerce/products/63ab0ff8796311649603ee49/images" \
  -i \;
  -H "Authorization: Bearer <myAPIKey>" \
  -H "User-Agent: foobar" \
  -H "Content-Type: multipart/form-data" \
  -X POST \
  -F file=@testimg.png
</code>```

What if -F and what is the equivalent of it in a fetch call?

Squarespace API reference:
https://developers.squarespace.com/commerce-apis/upload-product-image

Body:
I'm trying to perform an API call to Squarespace using node-fetch.

const FormData = new FormData();
formData.append(
      "file",
      "testimage.jpg",
      fs.createReadStream("testimg.jpg")
    );
    const send_img = await fetch(
      "https://api.squarespace.com/1.0/commerce/products/" + img_id + "/images",
      {
        method: "POST",
        headers: {
          Authorization: "Bearer " + process.env.SQUARESPACE_API_KEY,
          "User-Agent": "foobar",
          "Content-Type": "multipart/form-data",
        },
        body: formData,
      }
    );

After performing this call I was getting the error

{
  type: 'INVALID_REQUEST_ERROR',
  subtype: null,
  message: "Expected exactly one file part named 'file', but found none.",
  details: null,
  contextId: 'IEBROFREUTEWDREAYEAF'
}

The following cURL call successfully uploads the image

curl "https://api.squarespace.com/1.0/commerce/products/63ab0ff8796311649603ee49/images" \
  -i \;
  -H "Authorization: Bearer <myAPIKey>" \
  -H "User-Agent: foobar" \
  -H "Content-Type: multipart/form-data" \
  -X POST \
  -F file=@testimg.png

What if -F and what is the equivalent of it in a fetch call?

Squarespace API reference:
https://developers.squarespace.com/commerce-apis/upload-product-image


问:
Junit Test got error NestedServletException when try to excute Junit Test for RestApi DeleteById
org.springframework.web.util.NestedServletException: Request processing failed

Get this exception error when try to execute Junit Test for restApi method to DeleteById

the problem that in Controller implements when i change return type of method from DeviceTO to device it works but i need to be returned as DeviceTO (DTO) so i faced this issue :

```<code>org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException
</code>```

Please help me

this is the code for test class:

```<code>
    @RunWith(MockitoJUnitRunner.class)
    @EnableWebMvc
    public class DeviceControllerFacadeTest {

    @Mock
    DeviceServiceImpl deviceServiceMock;
    @MockBean
    DeviceControllerFacadeImpl deviceControllerFacade = new DeviceControllerFacadeImpl();

    MockMvc mockMvc;

    /**
     *
     */
    @Before
    public void setUp() {

        MockitoAnnotations.initMocks(this);
        mockMvc = MockMvcBuilders.standaloneSetup(deviceControllerFacade)
                .build();

    }

    /**
     * @throws java.lang.Exception
     */

    @After
    public void tearDown()
            throws Exception
    {
    }

    /**
     * @throws Exception
     */
    @Test
    public void DeleteDeviceById()
            throws Exception
    {
            mockMvc.perform(MockMvcRequestBuilders
                    .delete("/device/delete?id=336").accept(MediaType.APPLICATION_JSON)
                              .contentType(MediaType.APPLICATION_JSON))
                              .andDo(MockMvcResultHandlers.print());

    }

</code>```

and this is the controller interface :

```<code>    @DeleteMapping("/delete")
    DeviceTO deleteDevice(@RequestParam("id") long id);
</code>```

and this is for Controller implements class:

```<code>     @Override
     public DeviceTO  deleteDevice(long id)
    {

        try {

            begin();

            Device device = deviceService.getEntity(id);

            //deviceService.delete(device);
            DeviceTO deviceTO = new DeviceTO();
            deviceTO.mergeEntityToTransferObject(device);
            commit();
            return deviceTO;

        } catch (

        final Exception exception) {
            LOG.error(exception.getMessage(), exception);
            throw  exception;

        } finally {
            cleanupTransaction();

        }
    }
</code>```

Thank you for helping

I need this issue of exception will never appear again and the Test of method deleteById worked and return the device are deleted and the return type is DeviceTO not Device.

Thank you for helping.

Body:
org.springframework.web.util.NestedServletException: Request processing failed

Get this exception error when try to execute Junit Test for restApi method to DeleteById

the problem that in Controller implements when i change return type of method from DeviceTO to device it works but i need to be returned as DeviceTO (DTO) so i faced this issue :

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException

Please help me

this is the code for test class:

    @RunWith(MockitoJUnitRunner.class)
    @EnableWebMvc
    public class DeviceControllerFacadeTest {

    @Mock
    DeviceServiceImpl deviceServiceMock;
    @MockBean
    DeviceControllerFacadeImpl deviceControllerFacade = new DeviceControllerFacadeImpl();

    MockMvc mockMvc;

    /**
     *
     */
    @Before
    public void setUp() {

        MockitoAnnotations.initMocks(this);
        mockMvc = MockMvcBuilders.standaloneSetup(deviceControllerFacade)
                .build();

    }

    /**
     * @throws java.lang.Exception
     */

    @After
    public void tearDown()
            throws Exception
    {
    }

    /**
     * @throws Exception
     */
    @Test
    public void DeleteDeviceById()
            throws Exception
    {
            mockMvc.perform(MockMvcRequestBuilders
                    .delete("/device/delete?id=336").accept(MediaType.APPLICATION_JSON)
                              .contentType(MediaType.APPLICATION_JSON))
                              .andDo(MockMvcResultHandlers.print());

    }

and this is the controller interface :

    @DeleteMapping("/delete")
    DeviceTO deleteDevice(@RequestParam("id") long id);

and this is for Controller implements class:

     @Override
     public DeviceTO  deleteDevice(long id)
    {

        try {

            begin();

            Device device = deviceService.getEntity(id);

            //deviceService.delete(device);
            DeviceTO deviceTO = new DeviceTO();
            deviceTO.mergeEntityToTransferObject(device);
            commit();
            return deviceTO;

        } catch (

        final Exception exception) {
            LOG.error(exception.getMessage(), exception);
            throw  exception;

        } finally {
            cleanupTransaction();

        }
    }

Thank you for helping

I need this issue of exception will never appear again and the Test of method deleteById worked and return the device are deleted and the return type is DeviceTO not Device.

Thank you for helping.


问:
RuntimeError: Cannot find the ecCodes library
```<code>import xarray as xr
your_grib_path = "F:\Develop\Codes\Python\OpenStreetMapDataExtraction-master\data.grib2"
data = xr.open_dataset(your_grib_path, engine="cfgrib")
print(data)
</code>```

I opened the.grib2 file with the xarray library on windows and python3. I have installed the eccodes library, but when reading the data, an error is still displayed: RuntimeError: Cannot find the ecCodes library.

Can anyone give me some advice?

Body:
import xarray as xr
your_grib_path = "F:\Develop\Codes\Python\OpenStreetMapDataExtraction-master\data.grib2"
data = xr.open_dataset(your_grib_path, engine="cfgrib")
print(data)

I opened the.grib2 file with the xarray library on windows and python3. I have installed the eccodes library, but when reading the data, an error is still displayed: RuntimeError: Cannot find the ecCodes library.

Can anyone give me some advice?


问:
react mapbox gl: active item on click
I use
react-mapbox-gl 5.1 and
react-mapbox-gl-draw 2.0.4

```<code>const data = {
  features: data.map((layer) => {
    const { coordinates, geo_type } = layer

    return {
      geometry: {
        coordinates, // [32.4123131, 123131.2322]
        type: MAP_TYPE[geo_type], // Point | LineString | Polygon
      },
      properties: layer,
      type: 'Feature',
    }
  }),
  type: 'FeatureCollection',
}

<Map ref={ref}>
    <DrawControl
      onDrawUpdate={onDrawUpdate}
      onDrawCreate={onDrawCreate}
      controls={{
        point: true,
        line_string: true,
        polygon: true,
        trash: true,
        combine_features: false,
        uncombine_features: false,
      }}
    />
  <GeoJSONLayer data={data} {...geojsonStyles} />
</Map>

</code>```

When I add elements through <DrawControl />, they are active and can be draggable
But all items added from data not active

Title: react mapbox gl: active item on click

Body:
I use
react-mapbox-gl 5.1 and
react-mapbox-gl-draw 2.0.4

const data = {
  features: data.map((layer) => {
    const { coordinates, geo_type } = layer

    return {
      geometry: {
        coordinates, // [32.4123131, 123131.2322]
        type: MAP_TYPE[geo_type], // Point | LineString | Polygon
      },
      properties: layer,
      type: 'Feature',
    }
  }),
  type: 'FeatureCollection',
}

<Map ref={ref}>
    <DrawControl
      onDrawUpdate={onDrawUpdate}
      onDrawCreate={onDrawCreate}
      controls={{
        point: true,
        line_string: true,
        polygon: true,
        trash: true,
        combine_features: false,
        uncombine_features: false,
      }}
    />
  <GeoJSONLayer data={data} {...geojsonStyles} />
</Map>

When I add elements through <DrawControl />, they are active and can be draggable
But all items added from data not active


问:
Number of checked in connections keep increasing in SQLAlchemy with MySQL
We are connecting to a MySQL database using SQLAlchemy.

```<code>eng = create_engine(uri, pool_size=25, pool_recycle=60, pool_pre_ping=True)
</code>```

When we monitor the pool, we see that the number of checkedin connections keep increasing while the number of checkedout connections is pretty stable (around 3, for instance).

After a while, the number of checkedin connections reaches the maximum and the software starts to fail TimeoutError: QueuePool limit.

I had already investigated and we call close at the end of every session. We are using a try-finally block for every session usage.

Did someone face this problem?
Do you have ideas on how to investigate what connections are hung?

Body:
We are connecting to a MySQL database using SQLAlchemy.

eng = create_engine(uri, pool_size=25, pool_recycle=60, pool_pre_ping=True)

When we monitor the pool, we see that the number of checkedin connections keep increasing while the number of checkedout connections is pretty stable (around 3, for instance).

After a while, the number of checkedin connections reaches the maximum and the software starts to fail TimeoutError: QueuePool limit.

I had already investigated and we call close at the end of every session. We are using a try-finally block for every session usage.

Did someone face this problem?
Do you have ideas on how to investigate what connections are hung?


问:
Does AWSSecretsManagerRotationPolicy policy apply to all secrets?
I'm trying to use an AWS lambda function (deployed with SAM) to rotate a secret. Reading AWSSecretsManagerRotationPolicy description says:

Gives permission to rotate a secret in AWS Secrets Manager. Source

Based on that, this is applied to a single secret, but seeing the Policy definition seems like it permits all secrets for a given Partition, Region, and AccountId:

        "Statement": [
          {
            "Effect": "Allow",
            "Action": [
              "secretsmanager:DescribeSecret",
              "secretsmanager:GetSecretValue",
              "secretsmanager:PutSecretValue",
              "secretsmanager:UpdateSecretVersionStage"
            ],
            "Resource": {
              "Fn::Sub": "arn:${AWS::Partition}:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:*"
            },
            "Condition": {
              "StringEquals": {
                "secretsmanager:resource/AllowRotationLambdaArn": {
                  "Fn::Sub": [
                    "arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:function:${functionName}",
                    {
                      "functionName": {
                        "Ref": "FunctionName"
                      }
                    }
                  ]
                }
              }
            }
          },
          {
            "Effect": "Allow",
            "Action": [
              "secretsmanager:GetRandomPassword"
            ],
            "Resource": "*"
          }
        ]

```

Is the description misleading, or did I misinterpret something?

Body:
I'm trying to use an AWS lambda function (deployed with SAM) to rotate a secret. Reading AWSSecretsManagerRotationPolicy description says:

Gives permission to rotate a secret in AWS Secrets Manager. Source

Based on that, this is applied to a single secret, but seeing the Policy definition seems like it permits all secrets for a given Partition, Region, and AccountId:

        "Statement": [
          {
            "Effect": "Allow",
            "Action": [
              "secretsmanager:DescribeSecret",
              "secretsmanager:GetSecretValue",
              "secretsmanager:PutSecretValue",
              "secretsmanager:UpdateSecretVersionStage"
            ],
            "Resource": {
              "Fn::Sub": "arn:${AWS::Partition}:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:*"
            },
            "Condition": {
              "StringEquals": {
                "secretsmanager:resource/AllowRotationLambdaArn": {
                  "Fn::Sub": [
                    "arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:function:${functionName}",
                    {
                      "functionName": {
                        "Ref": "FunctionName"
                      }
                    }
                  ]
                }
              }
            }
          },
          {
            "Effect": "Allow",
            "Action": [
              "secretsmanager:GetRandomPassword"
            ],
            "Resource": "*"
          }
        ]

Is the description misleading, or did I misinterpret something?


问:
Validate input with a different mode in react-hook-form
I'm using react-hook-form, and the main validation mode is "onChange":

const formMethods = useForm({ mode: 'onChange' })

I need to change mode prop in specific input (inside a Controller), but I don't know how to do.

Code example:

```<code><Controller
   control={ control }
   name="fecha"
   defaultValue={ null }
   rules={ {
      required: { ... },
      validate: { ... }
   } }
   render={ ({
      field: { onChange, value, ref },
      fieldState: { error }
   }) => (
      <...></...>
   )}
/>

</code>```

I tried searching props like "mode", but I didn't found anything.

Body:
I'm using react-hook-form, and the main validation mode is "onChange":

const formMethods = useForm({ mode: 'onChange' })

I need to change mode prop in specific input (inside a Controller), but I don't know how to do.

Code example:

<Controller
   control={ control }
   name="fecha"
   defaultValue={ null }
   rules={ {
      required: { ... },
      validate: { ... }
   } }
   render={ ({
      field: { onChange, value, ref },
      fieldState: { error }
   }) => (
      <...></...>
   )}
/>

I tried searching props like "mode", but I didn't found anything.


问:
Custom Lookup iteration in Multiple rows
I have created a custom lookup for Name and Related fields for Task and Event objects. And added Multiple rows to enter the records to save but the custom Lookup component is not Iterating while deleting the records in a row.

Is custom Lookup component will Iterate in Multiple rows.


问:
Unreal Engine 5.1 custom docker images creation failure
I am trying to build images for dev and runtime docker containers based on custom unreal engine (right now engine is a full copy of original 5.1 ue)
I am using information from official documentation from this page
https://docs.unrealengine.com/4.27/en-US/SharingAndReleasing/Containers/HowTo/BuildingTheLinuxContainerImagesFromSource/

Steps to rep:
1)Clone unreal engine repo (git clone -b release --single-branch git@github.com:EpicGames/UnrealEngine.git)
2)Run Setup.sh
3)Run GenerateProjectFiles.sh
4)run ./build branchname repourl

Expected result:
Images builded successfully

Actual result:
Engine building fails with unknown error (full log with detailed information here
https://drive.google.com/drive/folders/1kkGCqApdnQBLGYLy7yeHydwb-rTByEX3?usp=share_link)

Extra information:
I have the same error , when try to build 5.1 from epic games repo , but building 5.0 version is okay , after 4 hours of waiting process completed and all images are created(log with it also can be found by the link
https://drive.google.com/drive/folders/1kkGCqApdnQBLGYLy7yeHydwb-rTByEX3?usp=share_link)

Part of the log with the warning after which engine building process stops:

```<code>#22 14630.5 LogCore: Warning: dlopen failed: libxkbcommon.so.0: cannot open shared object file: No such file or directory
#22 14630.5 LogShaderCompilers: Display: ================================================
#22 14630.5 LogShaderCompilers: Display: === FShaderJobCache stats ===
#22 14630.5 LogShaderCompilers: Display: Total job queries 0, among them cache hits 0 (0.00%)
#22 14630.5 LogShaderCompilers: Display: Tracking 0 distinct input hashes that result in 0 distinct outputs (0.00%)
#22 14630.5 LogShaderCompilers: Display: RAM used: 0.00 MB (0.00 GB) of 1587.20 MB (1.55 GB) budget. Usage: 0.00%
#22 14630.5 LogShaderCompilers: Display: === Shader Compilation stats ===
#22 14630.5 LogShaderCompilers: Display: Shaders Compiled: 0
#22 14630.5 LogShaderCompilers: Display: Jobs assigned 0, completed 0 (0.00%)
#22 14630.6 LogShaderCompilers: Display: Time at least one job was in flight (either pending or executed): 0.00 s
#22 14630.6 LogShaderCompilers: Display: ================================================
#22 14630.6 LogShaderCompilers: Display: Shaders left to compile 0
#22 14630.6 LogDerivedDataCache: Display:
../../../Engine/DerivedDataCache/Compressed.ddp.14B7DC4256834265883
9EAC5FDCACDCA: Opened pak cache for reading. (0 MiB)
#22 14630.6 LogDerivedDataCache: Display: ../../../Engine/DerivedDataCache/Compressed.ddp: Opened pak cache for writing.
#22 14630.6 LogDerivedDataCache: Display: Sucessfully wrote ../../../Engine/DerivedDataCache/Compressed.ddp.
#22 14630.6 libc++abi: terminating with uncaught exception of type std::runtime_error: COULDN'T load dxcompiler.
#22 14630.6 Signal 6 caught
</code>```

Body:
I am trying to build images for dev and runtime docker containers based on custom unreal engine (right now engine is a full copy of original 5.1 ue)
I am using information from official documentation from this page
https://docs.unrealengine.com/4.27/en-US/SharingAndReleasing/Containers/HowTo/BuildingTheLinuxContainerImagesFromSource/

Steps to rep:
1)Clone unreal engine repo (git clone -b release --single-branch git@github.com:EpicGames/UnrealEngine.git)
2)Run Setup.sh
3)Run GenerateProjectFiles.sh
4)run ./build branchname repourl

Expected result:
Images builded successfully

Actual result:
Engine building fails with unknown error (full log with detailed information here
https://drive.google.com/drive/folders/1kkGCqApdnQBLGYLy7yeHydwb-rTByEX3?usp=share_link)

Extra information:
I have the same error , when try to build 5.1 from epic games repo , but building 5.0 version is okay , after 4 hours of waiting process completed and all images are created(log with it also can be found by the link
https://drive.google.com/drive/folders/1kkGCqApdnQBLGYLy7yeHydwb-rTByEX3?usp=share_link)

Part of the log with the warning after which engine building process stops:

#22 14630.5 LogCore: Warning: dlopen failed: libxkbcommon.so.0: cannot open shared object file: No such file or directory
#22 14630.5 LogShaderCompilers: Display: ================================================
#22 14630.5 LogShaderCompilers: Display: === FShaderJobCache stats ===
#22 14630.5 LogShaderCompilers: Display: Total job queries 0, among them cache hits 0 (0.00%)
#22 14630.5 LogShaderCompilers: Display: Tracking 0 distinct input hashes that result in 0 distinct outputs (0.00%)
#22 14630.5 LogShaderCompilers: Display: RAM used: 0.00 MB (0.00 GB) of 1587.20 MB (1.55 GB) budget. Usage: 0.00%
#22 14630.5 LogShaderCompilers: Display: === Shader Compilation stats ===
#22 14630.5 LogShaderCompilers: Display: Shaders Compiled: 0
#22 14630.5 LogShaderCompilers: Display: Jobs assigned 0, completed 0 (0.00%)
#22 14630.6 LogShaderCompilers: Display: Time at least one job was in flight (either pending or executed): 0.00 s
#22 14630.6 LogShaderCompilers: Display: ================================================
#22 14630.6 LogShaderCompilers: Display: Shaders left to compile 0
#22 14630.6 LogDerivedDataCache: Display:
../../../Engine/DerivedDataCache/Compressed.ddp.14B7DC4256834265883
9EAC5FDCACDCA: Opened pak cache for reading. (0 MiB)
#22 14630.6 LogDerivedDataCache: Display: ../../../Engine/DerivedDataCache/Compressed.ddp: Opened pak cache for writing.
#22 14630.6 LogDerivedDataCache: Display: Sucessfully wrote ../../../Engine/DerivedDataCache/Compressed.ddp.
#22 14630.6 libc++abi: terminating with uncaught exception of type std::runtime_error: COULDN'T load dxcompiler.
#22 14630.6 Signal 6 caught


问:
How to copy checkbox value form one table to another in django
Hi I have two table in my django database which have one to many relation. In one table I have some data and I want to copy all that data to the next one code is below.

forms.py: I want the exec_summary value from NewProductForm to NewReportForm.

```<code>class NewProductForm(forms.ModelForm):
    exec_summary = forms.BooleanField(required=False)
    scope = forms.BooleanField(required=False)
    isms = forms.BooleanField(required=False)
    methodology = forms.BooleanField(required=False)
    recommendation = forms.BooleanField(required=False)
    class Meta:
        model = DB_Product
        fields = ('name', 'description', 'exec_summary', 'scope','isms','methodology','recommendation')

        widgets = {
            'name': TextInput(attrs={'class': 'form-control', 'type': "text", 'required': "required", 'placeholder': "Product Name"}),
            'exec_summary' : forms.BooleanField(),
            'scope' : forms.BooleanField(),
            'isms' : forms.BooleanField(),
            'methodology' : forms.BooleanField(),
            'recommendation' : forms.BooleanField(),
        }

class ProductModelChoiceField(ModelChoiceField):
    def label_from_instance(self, obj):
        return "%s" % obj.name

class NewReportForm(forms.ModelForm):

    product = ProductModelChoiceField(queryset=DB_Product.objects.all(), empty_label="(Select a product)", widget=forms.Select(attrs={'class': 'form-control'}))
    P_executive_summary = forms.BooleanField(required=False)
    class Meta:
        today = datetime.date.today().strftime('%Y-%m-%d')
        nowformat = datetime.datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S')
        model = DB_Report
        fields = ('product', 'report_id', 'title', 'executive_summary', 'scope', 'outofscope', 'P_executive_summary', 'methodology', 'recommendation', 'report_date' )

        widgets = {
            'report_id': TextInput(attrs={'class': 'form-control', 'type': "text", 'required': "required"}),
            'title': TextInput(attrs={'class': 'form-control', 'type': "text", 'required': "required"}),
            'report_date': DateInput(attrs={'class': 'form-control', 'type': "text", 'data-inputmask': "'alias': 'yyyy-mm-dd'", 'data-mask':'', 'required': "required"}),
            'P_executive_summary' : forms.BooleanField(),
        }
</code>```

models.py: exec_summary from DB_Product --> P_executive_summary in DB_Report

```<code>class DB_Product(models.Model):
    name = models.CharField(max_length=255, blank=False)
    description = MartorField()
    exec_summary = models.BooleanField('exec_summary', default=False)
    scope = models.BooleanField('scope', default=False)
    isms = models.BooleanField('isms', default=False)
    methodology = models.BooleanField('methodology', default=False)
    recommendation = models.BooleanField('recommendation', default=False)

class DB_Report(models.Model):
    product = models.ForeignKey(DB_Product, on_delete=models.CASCADE)
    report_id = models.CharField(max_length=255, blank=False)
    title = models.CharField(max_length=255, blank=False)
    executive_summary_image = models.TextField(blank=True, null=True)
    categories_summary_image = models.TextField(blank=True, null=True)
    executive_summary = MartorField()
    P_executive_summary = models.BooleanField('P_executive_summary', default=False)
    scope = MartorField()
    outofscope = MartorField()
    methodology = MartorField()
    recommendation = MartorField()
    creation_date = models.DateTimeField(auto_now_add=True)
    report_date = models.DateTimeField(blank=False)
</code>```

Body:
Hi I have two table in my django database which have one to many relation. In one table I have some data and I want to copy all that data to the next one code is below.

forms.py: I want the exec_summary value from NewProductForm to NewReportForm.

class NewProductForm(forms.ModelForm):
    exec_summary = forms.BooleanField(required=False)
    scope = forms.BooleanField(required=False)
    isms = forms.BooleanField(required=False)
    methodology = forms.BooleanField(required=False)
    recommendation = forms.BooleanField(required=False)
    class Meta:
        model = DB_Product
        fields = ('name', 'description', 'exec_summary', 'scope','isms','methodology','recommendation')

        widgets = {
            'name': TextInput(attrs={'class': 'form-control', 'type': "text", 'required': "required", 'placeholder': "Product Name"}),
            'exec_summary' : forms.BooleanField(),
            'scope' : forms.BooleanField(),
            'isms' : forms.BooleanField(),
            'methodology' : forms.BooleanField(),
            'recommendation' : forms.BooleanField(),
        }

class ProductModelChoiceField(ModelChoiceField):
    def label_from_instance(self, obj):
        return "%s" % obj.name

class NewReportForm(forms.ModelForm):

    product = ProductModelChoiceField(queryset=DB_Product.objects.all(), empty_label="(Select a product)", widget=forms.Select(attrs={'class': 'form-control'}))
    P_executive_summary = forms.BooleanField(required=False)
    class Meta:
        today = datetime.date.today().strftime('%Y-%m-%d')
        nowformat = datetime.datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S')
        model = DB_Report
        fields = ('product', 'report_id', 'title', 'executive_summary', 'scope', 'outofscope', 'P_executive_summary', 'methodology', 'recommendation', 'report_date' )

        widgets = {
            'report_id': TextInput(attrs={'class': 'form-control', 'type': "text", 'required': "required"}),
            'title': TextInput(attrs={'class': 'form-control', 'type': "text", 'required': "required"}),
            'report_date': DateInput(attrs={'class': 'form-control', 'type': "text", 'data-inputmask': "'alias': 'yyyy-mm-dd'", 'data-mask':'', 'required': "required"}),
            'P_executive_summary' : forms.BooleanField(),
        }

models.py: exec_summary from DB_Product --> P_executive_summary in DB_Report

class DB_Product(models.Model):
    name = models.CharField(max_length=255, blank=False)
    description = MartorField()
    exec_summary = models.BooleanField('exec_summary', default=False)
    scope = models.BooleanField('scope', default=False)
    isms = models.BooleanField('isms', default=False)
    methodology = models.BooleanField('methodology', default=False)
    recommendation = models.BooleanField('recommendation', default=False)

class DB_Report(models.Model):
    product = models.ForeignKey(DB_Product, on_delete=models.CASCADE)
    report_id = models.CharField(max_length=255, blank=False)
    title = models.CharField(max_length=255, blank=False)
    executive_summary_image = models.TextField(blank=True, null=True)
    categories_summary_image = models.TextField(blank=True, null=True)
    executive_summary = MartorField()
    P_executive_summary = models.BooleanField('P_executive_summary', default=False)
    scope = MartorField()
    outofscope = MartorField()
    methodology = MartorField()
    recommendation = MartorField()
    creation_date = models.DateTimeField(auto_now_add=True)
    report_date = models.DateTimeField(blank=False)


问:
Why does ffmpeg keep using more and more RAM and crash?
I am using the following command with ffmpeg to encode a video file using the libsvtav1 codec: ffmpeg -i hevc.mkv -map 0:v:0 -c:v:0 libsvtav1 -preset 8 -crf 22 -format matroska av1.mkv.

However, ffmpeg is using up all of my available RAM and crashing. I have also tried using the libx264 codec, but the same issue occurs, although it happens more slowly. I have already allocated 12 GB of RAM to ffmpeg, but it still seems to be insufficient. How can I prevent ffmpeg from using all of my available RAM and crashing when using either the libsvtav1 or libx264 codecs?

I have tried it on another VM, but the same issue occurs. Here is the full output of the program.

```<code>ffmpeg -i akira.mkv -map 0:v:0 -c:v:0 libsvtav1 -preset 8 -crf 22 -c:a copy -c:s copy -format matroska av1.mkv
ffmpeg version n5.1.2-7-ga6e26053c2-20221106 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.2.0 (crosstool-NG 1.25.0.90_cf9beb1)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --enable-gpl --enable-version3 --disable-debug --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libpulse --enable-libvmaf --enable-libxcb --enable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --disable-chromaprint --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-mbedtls --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --disable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --disable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags=-pie --extra-libs='-ldl -lgomp' --extra-version=20221106
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
Input #0, matroska,webm, from 'akira.mkv':
  Metadata:
    title           : Akira 4K
    encoder         : libebml v1.3.10 + libmatroska v1.5.2
    creation_time   : 2020-05-04T19:57:18.000000Z
  Duration: 02:04:46.50, start: 0.000000, bitrate: 10945 kb/s
  Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2074 [SAR 1:1 DAR 1920:1037], 23.98 fps, 23.98 tbr, 1k tbn (default)
    Metadata:
      BPS-eng         : 9531297
      DURATION-eng    : 02:04:46.479000000
      NUMBER_OF_FRAMES-eng: 179496
      NUMBER_OF_BYTES-eng: 8919482644
      _STATISTICS_WRITING_APP-eng: mkvmerge v43.0.0 ('The Quartermaster') 32-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-05-04 19:57:18
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:1(eng): Subtitle: subrip
    Metadata:
      BPS-eng         : 46
      DURATION-eng    : 01:59:00.755000000
      NUMBER_OF_FRAMES-eng: 1277
      NUMBER_OF_BYTES-eng: 41675
      _STATISTICS_WRITING_APP-eng: mkvmerge v43.0.0 ('The Quartermaster') 32-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-05-04 19:57:18
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:2(ita): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
    Metadata:
      title           : Nuovo doppiaggio
      BPS-eng         : 448000
      DURATION-eng    : 02:04:28.480000000
      NUMBER_OF_FRAMES-eng: 233390
      NUMBER_OF_BYTES-eng: 418234880
      _STATISTICS_WRITING_APP-eng: mkvmerge v43.0.0 ('The Quartermaster') 32-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-05-04 19:57:18
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:3(ita): Audio: ac3, 48000 Hz, stereo, fltp, 448 kb/s
    Metadata:
      title           : Doppiaggio Storico
      BPS-eng         : 448000
      DURATION-eng    : 02:04:28.480000000
      NUMBER_OF_FRAMES-eng: 233390
      NUMBER_OF_BYTES-eng: 418234880
      _STATISTICS_WRITING_APP-eng: mkvmerge v43.0.0 ('The Quartermaster') 32-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-05-04 19:57:18
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:4(ita): Subtitle: dvd_subtitle, 1920x1080
    Metadata:
      title           : Italiano
      BPS-eng         : 8426
      DURATION-eng    : 02:00:14.955000000
      NUMBER_OF_FRAMES-eng: 1201
      NUMBER_OF_BYTES-eng: 7599491
      _STATISTICS_WRITING_APP-eng: mkvmerge v43.0.0 ('The Quartermaster') 32-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-05-04 19:57:18
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:5(ita): Subtitle: subrip (default)
    Metadata:
      title           : Forced
      BPS-eng         : 0
      DURATION-eng    : 01:46:31.753000000
      NUMBER_OF_FRAMES-eng: 14
      NUMBER_OF_BYTES-eng: 462
      _STATISTICS_WRITING_APP-eng: mkvmerge v43.0.0 ('The Quartermaster') 32-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-05-04 19:57:18
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:6(jpn): Audio: eac3, 48000 Hz, 5.1(side), fltp, 256 kb/s
    Metadata:
      BPS-eng         : 256000
      DURATION-eng    : 02:04:46.496000000
      NUMBER_OF_FRAMES-eng: 233953
      NUMBER_OF_BYTES-eng: 239567872
      _STATISTICS_WRITING_APP-eng: mkvmerge v43.0.0 ('The Quartermaster') 32-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-05-04 19:57:18
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:7(eng): Audio: eac3, 48000 Hz, 5.1(side), fltp, 256 kb/s
    Metadata:
      BPS-eng         : 256000
      DURATION-eng    : 02:04:46.496000000
      NUMBER_OF_FRAMES-eng: 233953
      NUMBER_OF_BYTES-eng: 239567872
      _STATISTICS_WRITING_APP-eng: mkvmerge v43.0.0 ('The Quartermaster') 32-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-05-04 19:57:18
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:8: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 1067x600, 90k tbr, 90k tbn (attached pic)
    Metadata:
      filename        : cover_land.jpg
      mimetype        : image/jpeg
  Stream #0:9: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 120x176, 90k tbr, 90k tbn (attached pic)
    Metadata:
      filename        : small_cover.jpg
      mimetype        : image/jpeg
  Stream #0:10: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 213x120, 90k tbr, 90k tbn (attached pic)
    Metadata:
      filename        : small_cover_land.jpg
      mimetype        : image/jpeg
  Stream #0:11: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 600x882, 90k tbr, 90k tbn (attached pic)
    Metadata:
      filename        : cover.jpg
      mimetype        : image/jpeg
  Stream #0:12: Attachment: otf
    Metadata:
      filename        : StoneSansStd-Semibold.otf
      mimetype        : application/vnd.ms-opentype
  Stream #0:13: Attachment: otf
    Metadata:
      filename        : StoneSansStd-SemiboldItalic.otf
      mimetype        : application/vnd.ms-opentype
  Stream #0:14: Attachment: otf
    Metadata:
      filename        : ATPacella-Black.otf
      mimetype        : application/vnd.ms-opentype
  Stream #0:15: Attachment: ttf
    Metadata:
      filename        : ITC Franklin Gothic LT Medium Condensed.ttf
      mimetype        : application/x-truetype-font
File 'av1.mkv' already exists. Overwrite? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (native) -> av1 (libsvtav1))
Press [q] to stop, [?] for help
Svt[info]: -------------------------------------------
Svt[info]: SVT [version]:       SVT-AV1 Encoder Lib v1.3.0
Svt[info]: SVT [build]  :       GCC 12.2.0       64 bit
Svt[info]: LIB Build date: Nov  6 2022 00:41:54
Svt[info]: -------------------------------------------
Svt[info]: Number of logical cores available: 16
Svt[info]: Number of PPCS 71
Svt[info]: [asm level on system : up to avx]
Svt[info]: [asm level selected : up to avx]
Svt[info]: -------------------------------------------
Svt[info]: SVT [config]: main profile   tier (auto)     level (auto)
Svt[info]: SVT [config]: width / height / fps numerator / fps denominator               : 3840 / 2080 / 24000 / 1001
Svt[info]: SVT [config]: bit-depth / color format                      : 10 / YUV420
Svt[info]: SVT [config]: preset / tune / pred struct                   : 8 / PSNR / random access
Svt[info]: SVT [config]: gop size / mini-gop size / key-frame type     : 161 / 16 / key frame
Svt[info]: SVT [config]: BRC mode / rate factor                        : CRF / 22
Svt[info]: -------------------------------------------
Output #0, matroska, to 'av1.mkv':
  Metadata:
    title           : Akira 4K
    encoder         : Lavf59.27.100
  Stream #0:0: Video: av1 (AV01 / 0x31305641), yuv420p10le(tv, bt2020nc/bt2020/smpte2084, progressive), 3840x2074 [SAR 1:1 DAR 1920:1037], q=2-31, 23.98 fps, 1k tbn (default)
    Metadata:
      BPS-eng         : 9531297
      DURATION-eng    : 02:04:46.479000000
      NUMBER_OF_FRAMES-eng: 179496
      NUMBER_OF_BYTES-eng: 8919482644
      _STATISTICS_WRITING_APP-eng: mkvmerge v43.0.0 ('The Quartermaster') 32-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-05-04 19:57:18
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      encoder         : Lavc59.37.100 libsvtav1
frame=    1 fps=0.0 q=0.0 size=       1kB time=00:00:00.00 bitrate=N/A sframe=    2 fps=1.3 q=0.0 size=       1kB time=00:00:00.00 bitrate=N/A sframe=   51 fps= 25 q=0.0 size=       1kB time=00:00:00.00 bitrate=N/A sframe=   73 fps= 16 q=16.0 size=       1kB time=00:00:00.00 bitrate=7480frame=   76 fps= 14 q=16.0 size=       1kB time=00:00:00.00 bitrate=7480frame=   81 fps= 14 q=16.0 size=       1kB time=00:00:00.00 bitrate=7480frame=   87 fps= 14 q=21.0 size=       1kB time=00:00:00.16 bitrate=  44frame=   95 fps= 14 q=21.0 size=       1kB time=00:00:00.50 bitrate=  14frame=  100 fps= 13 q=16.0 size=       1kB time=00:00:00.66 bitrate=  11frame=  110 fps= 13 q=23.0 size=       1kB time=00:00:00.96 bitrate=   7frame=  114 fps= 13 q=23.0 size=       1kB time=00:00:01.12 bitrate=   6frame=  122 fps= 13 q=23.0 size=       1kB time=00:00:01.46 bitrate=   5frame=  126 fps= 12 q=23.0 size=       1kB time=00:00:01.62 bitrate=   4frame=  133 fps= 12 q=22.0 size=       1kB time=00:00:01.92 bitrate=   3frame=  139 fps= 12 q=21.0 size=       1kB time=00:00:02.17 bitrate=   3frame=  141 fps= 11 q=22.0 size=       1kB time=00:00:02.25 bitrate=   3frame=  144 fps= 11 q=23.0 size=       1kB time=00:00:02.37 bitrate=   3frame=  151 fps= 11 q=13.0 size=       1kB time=00:00:02.67 bitrate=   2frame=  159 fps= 11 q=18.0 size=       1kB time=00:00:03.00 bitrate=   2frame=  164 fps= 11 q=22.0 size=       1kB time=00:00:03.21 bitrate=   2frame=  174 fps= 11 q=22.0 size=       1kB time=00:00:03.63 bitrate=   2frame=  179 fps= 11 q=20.0 size=       1kB time=00:00:03.83 bitrate=   1frame=  187 fps= 11 q=20.0 size=       1kB time=00:00:04.17 bitrate=   1frame=  189 fps= 10 q=21.0 size=       1kB time=00:00:04.25 bitrate=   1frame=  192 fps= 10 q=22.0 size=       1kB time=00:00:04.38 bitrate=   1frame=  195 fps=8.0 q=20.0 size=       1kB time=00:00:04.50 bitrate=   1frame=  201 fps=8.0 q=11.0 size=       1kB time=00:00:04.67 bitrate=   1Killeds/s speed=0.187x
</code>```

Body:
I am using the following command with ffmpeg to encode a video file using the libsvtav1 codec: ffmpeg -i hevc.mkv -map 0:v:0 -c:v:0 libsvtav1 -preset 8 -crf 22 -format matroska av1.mkv.

However, ffmpeg is using up all of my available RAM and crashing. I have also tried using the libx264 codec, but the same issue occurs, although it happens more slowly. I have already allocated 12 GB of RAM to ffmpeg, but it still seems to be insufficient. How can I prevent ffmpeg from using all of my available RAM and crashing when using either the libsvtav1 or libx264 codecs?

I have tried it on another VM, but the same issue occurs. Here is the full output of the program.

ffmpeg -i akira.mkv -map 0:v:0 -c:v:0 libsvtav1 -preset 8 -crf 22 -c:a copy -c:s copy -format matroska av1.mkv
ffmpeg version n5.1.2-7-ga6e26053c2-20221106 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.2.0 (crosstool-NG 1.25.0.90_cf9beb1)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --enable-gpl --enable-version3 --disable-debug --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libpulse --enable-libvmaf --enable-libxcb --enable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --disable-chromaprint --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-mbedtls --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --disable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --disable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags=-pie --extra-libs='-ldl -lgomp' --extra-version=20221106
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
Input #0, matroska,webm, from 'akira.mkv':
  Metadata:
    title           : Akira 4K
    encoder         : libebml v1.3.10 + libmatroska v1.5.2
    creation_time   : 2020-05-04T19:57:18.000000Z
  Duration: 02:04:46.50, start: 0.000000, bitrate: 10945 kb/s
  Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2074 [SAR 1:1 DAR 1920:1037], 23.98 fps, 23.98 tbr, 1k tbn (default)
    Metadata:
      BPS-eng         : 9531297
      DURATION-eng    : 02:04:46.479000000
      NUMBER_OF_FRAMES-eng: 179496
      NUMBER_OF_BYTES-eng: 8919482644
      _STATISTICS_WRITING_APP-eng: mkvmerge v43.0.0 ('The Quartermaster') 32-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-05-04 19:57:18
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:1(eng): Subtitle: subrip
    Metadata:
      BPS-eng         : 46
      DURATION-eng    : 01:59:00.755000000
      NUMBER_OF_FRAMES-eng: 1277
      NUMBER_OF_BYTES-eng: 41675
      _STATISTICS_WRITING_APP-eng: mkvmerge v43.0.0 ('The Quartermaster') 32-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-05-04 19:57:18
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:2(ita): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
    Metadata:
      title           : Nuovo doppiaggio
      BPS-eng         : 448000
      DURATION-eng    : 02:04:28.480000000
      NUMBER_OF_FRAMES-eng: 233390
      NUMBER_OF_BYTES-eng: 418234880
      _STATISTICS_WRITING_APP-eng: mkvmerge v43.0.0 ('The Quartermaster') 32-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-05-04 19:57:18
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:3(ita): Audio: ac3, 48000 Hz, stereo, fltp, 448 kb/s
    Metadata:
      title           : Doppiaggio Storico
      BPS-eng         : 448000
      DURATION-eng    : 02:04:28.480000000
      NUMBER_OF_FRAMES-eng: 233390
      NUMBER_OF_BYTES-eng: 418234880
      _STATISTICS_WRITING_APP-eng: mkvmerge v43.0.0 ('The Quartermaster') 32-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-05-04 19:57:18
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:4(ita): Subtitle: dvd_subtitle, 1920x1080
    Metadata:
      title           : Italiano
      BPS-eng         : 8426
      DURATION-eng    : 02:00:14.955000000
      NUMBER_OF_FRAMES-eng: 1201
      NUMBER_OF_BYTES-eng: 7599491
      _STATISTICS_WRITING_APP-eng: mkvmerge v43.0.0 ('The Quartermaster') 32-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-05-04 19:57:18
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:5(ita): Subtitle: subrip (default)
    Metadata:
      title           : Forced
      BPS-eng         : 0
      DURATION-eng    : 01:46:31.753000000
      NUMBER_OF_FRAMES-eng: 14
      NUMBER_OF_BYTES-eng: 462
      _STATISTICS_WRITING_APP-eng: mkvmerge v43.0.0 ('The Quartermaster') 32-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-05-04 19:57:18
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:6(jpn): Audio: eac3, 48000 Hz, 5.1(side), fltp, 256 kb/s
    Metadata:
      BPS-eng         : 256000
      DURATION-eng    : 02:04:46.496000000
      NUMBER_OF_FRAMES-eng: 233953
      NUMBER_OF_BYTES-eng: 239567872
      _STATISTICS_WRITING_APP-eng: mkvmerge v43.0.0 ('The Quartermaster') 32-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-05-04 19:57:18
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:7(eng): Audio: eac3, 48000 Hz, 5.1(side), fltp, 256 kb/s
    Metadata:
      BPS-eng         : 256000
      DURATION-eng    : 02:04:46.496000000
      NUMBER_OF_FRAMES-eng: 233953
      NUMBER_OF_BYTES-eng: 239567872
      _STATISTICS_WRITING_APP-eng: mkvmerge v43.0.0 ('The Quartermaster') 32-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-05-04 19:57:18
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:8: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 1067x600, 90k tbr, 90k tbn (attached pic)
    Metadata:
      filename        : cover_land.jpg
      mimetype        : image/jpeg
  Stream #0:9: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 120x176, 90k tbr, 90k tbn (attached pic)
    Metadata:
      filename        : small_cover.jpg
      mimetype        : image/jpeg
  Stream #0:10: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 213x120, 90k tbr, 90k tbn (attached pic)
    Metadata:
      filename        : small_cover_land.jpg
      mimetype        : image/jpeg
  Stream #0:11: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 600x882, 90k tbr, 90k tbn (attached pic)
    Metadata:
      filename        : cover.jpg
      mimetype        : image/jpeg
  Stream #0:12: Attachment: otf
    Metadata:
      filename        : StoneSansStd-Semibold.otf
      mimetype        : application/vnd.ms-opentype
  Stream #0:13: Attachment: otf
    Metadata:
      filename        : StoneSansStd-SemiboldItalic.otf
      mimetype        : application/vnd.ms-opentype
  Stream #0:14: Attachment: otf
    Metadata:
      filename        : ATPacella-Black.otf
      mimetype        : application/vnd.ms-opentype
  Stream #0:15: Attachment: ttf
    Metadata:
      filename        : ITC Franklin Gothic LT Medium Condensed.ttf
      mimetype        : application/x-truetype-font
File 'av1.mkv' already exists. Overwrite? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (native) -> av1 (libsvtav1))
Press [q] to stop, [?] for help
Svt[info]: -------------------------------------------
Svt[info]: SVT [version]:       SVT-AV1 Encoder Lib v1.3.0
Svt[info]: SVT [build]  :       GCC 12.2.0       64 bit
Svt[info]: LIB Build date: Nov  6 2022 00:41:54
Svt[info]: -------------------------------------------
Svt[info]: Number of logical cores available: 16
Svt[info]: Number of PPCS 71
Svt[info]: [asm level on system : up to avx]
Svt[info]: [asm level selected : up to avx]
Svt[info]: -------------------------------------------
Svt[info]: SVT [config]: main profile   tier (auto)     level (auto)
Svt[info]: SVT [config]: width / height / fps numerator / fps denominator               : 3840 / 2080 / 24000 / 1001
Svt[info]: SVT [config]: bit-depth / color format                      : 10 / YUV420
Svt[info]: SVT [config]: preset / tune / pred struct                   : 8 / PSNR / random access
Svt[info]: SVT [config]: gop size / mini-gop size / key-frame type     : 161 / 16 / key frame
Svt[info]: SVT [config]: BRC mode / rate factor                        : CRF / 22
Svt[info]: -------------------------------------------
Output #0, matroska, to 'av1.mkv':
  Metadata:
    title           : Akira 4K
    encoder         : Lavf59.27.100
  Stream #0:0: Video: av1 (AV01 / 0x31305641), yuv420p10le(tv, bt2020nc/bt2020/smpte2084, progressive), 3840x2074 [SAR 1:1 DAR 1920:1037], q=2-31, 23.98 fps, 1k tbn (default)
    Metadata:
      BPS-eng         : 9531297
      DURATION-eng    : 02:04:46.479000000
      NUMBER_OF_FRAMES-eng: 179496
      NUMBER_OF_BYTES-eng: 8919482644
      _STATISTICS_WRITING_APP-eng: mkvmerge v43.0.0 ('The Quartermaster') 32-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-05-04 19:57:18
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      encoder         : Lavc59.37.100 libsvtav1
frame=    1 fps=0.0 q=0.0 size=       1kB time=00:00:00.00 bitrate=N/A sframe=    2 fps=1.3 q=0.0 size=       1kB time=00:00:00.00 bitrate=N/A sframe=   51 fps= 25 q=0.0 size=       1kB time=00:00:00.00 bitrate=N/A sframe=   73 fps= 16 q=16.0 size=       1kB time=00:00:00.00 bitrate=7480frame=   76 fps= 14 q=16.0 size=       1kB time=00:00:00.00 bitrate=7480frame=   81 fps= 14 q=16.0 size=       1kB time=00:00:00.00 bitrate=7480frame=   87 fps= 14 q=21.0 size=       1kB time=00:00:00.16 bitrate=  44frame=   95 fps= 14 q=21.0 size=       1kB time=00:00:00.50 bitrate=  14frame=  100 fps= 13 q=16.0 size=       1kB time=00:00:00.66 bitrate=  11frame=  110 fps= 13 q=23.0 size=       1kB time=00:00:00.96 bitrate=   7frame=  114 fps= 13 q=23.0 size=       1kB time=00:00:01.12 bitrate=   6frame=  122 fps= 13 q=23.0 size=       1kB time=00:00:01.46 bitrate=   5frame=  126 fps= 12 q=23.0 size=       1kB time=00:00:01.62 bitrate=   4frame=  133 fps= 12 q=22.0 size=       1kB time=00:00:01.92 bitrate=   3frame=  139 fps= 12 q=21.0 size=       1kB time=00:00:02.17 bitrate=   3frame=  141 fps= 11 q=22.0 size=       1kB time=00:00:02.25 bitrate=   3frame=  144 fps= 11 q=23.0 size=       1kB time=00:00:02.37 bitrate=   3frame=  151 fps= 11 q=13.0 size=       1kB time=00:00:02.67 bitrate=   2frame=  159 fps= 11 q=18.0 size=       1kB time=00:00:03.00 bitrate=   2frame=  164 fps= 11 q=22.0 size=       1kB time=00:00:03.21 bitrate=   2frame=  174 fps= 11 q=22.0 size=       1kB time=00:00:03.63 bitrate=   2frame=  179 fps= 11 q=20.0 size=       1kB time=00:00:03.83 bitrate=   1frame=  187 fps= 11 q=20.0 size=       1kB time=00:00:04.17 bitrate=   1frame=  189 fps= 10 q=21.0 size=       1kB time=00:00:04.25 bitrate=   1frame=  192 fps= 10 q=22.0 size=       1kB time=00:00:04.38 bitrate=   1frame=  195 fps=8.0 q=20.0 size=       1kB time=00:00:04.50 bitrate=   1frame=  201 fps=8.0 q=11.0 size=       1kB time=00:00:04.67 bitrate=   1Killeds/s speed=0.187x


问:
Select2 not displaying the select box
I have a problem with the Select2 plugin's last version, I don't know why the select box isn't showing up. I'm using Bootstrap 5.1.3, JQuery 3.6.1, Select2 4.1.0rc

JavaScript:

const locationSelect = $('#location').select2({
    ajax: {
        delay: 250,
        url: "<?= site_url('admin/select2_get_locations'); ?>",
        dataType: 'json',
        type: 'GET',
        data: function (params) {
            return {
                q: params.term
            };
        },
        processResults: function (data) {
            return {
                results: data.results
            };
        },
    },
    minimumInputLength: 3,
    escapeMarkup: function (markup) {
        return markup;
    },
});
```
<p><strong>HTML:</strong></p>
<pre class="lang-html prettyprint-override"><code><div class="col-sm-12 col-md-4 mb-4">
    <label for="location">Filtro per località</label>
    <select id="location" name="location" style="width: 100% !important">
        <option value="" selected>Seleziona</option>
    </select>
</div>
</code>```

Image:

How Select2 appears to me.

I tried to use the stable and RC version, but nothing changed, I'm using its default theme but nothing. Tried to search in the theme if there was a line of code overwriting mine, but nothing was found.

Title: Select2 not displaying the select box

Body:
I have a problem with the Select2 plugin's last version, I don't know why the select box isn't showing up. I'm using Bootstrap 5.1.3, JQuery 3.6.1, Select2 4.1.0rc

JavaScript:

const locationSelect = $('#location').select2({
    ajax: {
        delay: 250,
        url: "<?= site_url('admin/select2_get_locations'); ?>",
        dataType: 'json',
        type: 'GET',
        data: function (params) {
            return {
                q: params.term
            };
        },
        processResults: function (data) {
            return {
                results: data.results
            };
        },
    },
    minimumInputLength: 3,
    escapeMarkup: function (markup) {
        return markup;
    },
});

HTML:

    Filtro per località
    <select id="location" name="location" style="width: 100% !important">
        <option value="" selected>Seleziona</option>
    </select>

Image:

How Select2 appears to me.

I tried to use the stable and RC version, but nothing changed, I'm using its default theme but nothing. Tried to search in the theme if there was a line of code overwriting mine, but nothing was found.


问:
Android App - How To Display 3D Rectangles?
For my final project I am creating an android app that receives as input a .csv file with the dimensions (length, width, height) of a container and boxes that need to be arranged inside that container.
My app then needs to calculate an optimal arrangement for the boxes and display the solution to the user in a 3D environment.
Ideally, the user should be able to rotate the display and click individual boxes and manually re-arrange them.

I am unsure about the best way to display the arrangement.

I did research into the subject and came across options like OpenGL or embedding a Unity project inside my app, but I have no experience with any of them and worry that I will waste time on the wrong approach.

How should I go about displaying the solution? any help or guidance greatly appreciated.


问:
Auto Start Windows Services through Installer in VS.Net 2008
I have installed Windows Services using Setup and Deployment Wizard. I have successfully installed Services  with the help of  link

http://msdn.microsoft.com/en-us/library/zt39148a%28v=VS.90%29.aspx

.But when I go to services(Services.msc) I see that services status is not available(blank).It needs to be Started.Rather it should autmoatically start as above.

ContentLicense: CC BY-SA 3.0


问:
Block pip inside Docker - Windows Server
I'm building a Docker container that have python and import some packages using 'pip install'.

I want to allow 'pip' to communicate only with pypi.org, and block it from communicating with any other channel, including the host that runs the docker container (in which we run the pip).

I tried to create some custom outbound rules in firewall (including blocking the container's IP address, the container's gateway IP address, and the entire 'nat' docker subnet), but somehow it keeps going around the firewall and having access to wherever it wants (and imports any package it tries).

To clarify, I'm first trying to block 'pip' entirely, even for pypi.org

Is it possible to achieve this blocking behavior? What rules should I set in Firewall (or directly in the docker network)?

*I'm running on Windows desktop with Docker desktop, and the container is running with the following image - mcr.microsoft.com/windows/nanoserver:1809.


问:
Request failed with status code 401', name: 'AxiosError', code: 'ERR_BAD_REQUEST'
I'm on a page that uses a vue component and one of my patch routes is saying I'm un-authenticated.

```<code><template>
 ...
  <button @click="editPost(attributes.attributes.post_id)"></button>
 ...
</template>

<script>
export default {
    data() {
        return {
            info: null,
            message: null,
            postTitle: "",
            postContent: ""
        }
    },
    methods: {
        editPost(id) { // not working, 401 unauthenticated
            console.log('edit post clicked', id);
            axios.patch('http://127.0.0.1:8000/api/posts/' + id, {
                headers: {
                    Authorization: 'Bearer 3d58d6cd66e134a59b3a9373a2b4a233e55d00107b9251f654c5c92a2276a1c5'
                }
            })
            .then((response) => {
                this.info = response.data;
                // this.message = 'Success';
                console.log(this.info);

            })
            .catch((error) => {
                console.log(error, error.response.data.message);
                this.message = error.response.data.message;
            })
        },
        deletePost(value){
            console.log('delete post clicked', value);
        }
    },
    mounted() {
        axios.get('http://127.0.0.1:8000/api/posts', { // working as expected, authenticated
            headers: {
                Authorization: 'Bearer 3d58d6cd66e134a59b3a9373a2b4a233e55d00107b9251f654c5c92a2276a1c5'
            }
        })
        .then((response) => {
            this.info = response.data;
            this.message = 'Success';

            console.log(this.info);

        })
        .catch((error) => {
            console.log(error, error.response.data.message);
            this.message = error.response.data.message;
        })
    }
}
</script>
</code>```

I dont understand how this can be since I have to authenticate to get the posts on page load and they load fine, with authentication using a Bearer token in header?

Why is the call to axios using a PATCH not working? The PATCH call works in postman fine also.

Body:
I'm on a page that uses a vue component and one of my patch routes is saying I'm un-authenticated.

<template>
 ...
  <button @click="editPost(attributes.attributes.post_id)"></button>
 ...
</template>

I dont understand how this can be since I have to authenticate to get the posts on page load and they load fine, with authentication using a Bearer token in header?

Why is the call to axios using a PATCH not working? The PATCH call works in postman fine also.


问:
render jsonresult data in partial view
in an ASP.NET MVC application, there is an html containing some checkboxes which are posted to
server via jQuery ajax.

```<code><script>
$('#searchSubmitButton').click(function () {
        var specs = $('#specsPost').val();
        var name = $('#categoryName').val();
        $.ajax({
            url: '/Home/AdvancedSearch',
            data: { name: name, specs: specs }
        })
    })
</script>
</code>```

These parameters are then used to populate a list of products which are sorted and paged.

```<code>public JsonResult AdvancedSearch(string name, int? page, string specs)
{
List<ProductModel> products = new List<ProductModel>();
if (!string.IsNullOrEmpty(specs))
{
//some code resulting in list of products
}
return Json(products.ToPagedList(pageNumber, pageSize), JsonRequestBehavior.AllowGet);
}
</code>```

the question is how to render data returned to the view in a div as a partial view
on success of jquery ajax

Title: render jsonresult data in partial view

Body:
in an ASP.NET MVC application, there is an html containing some checkboxes which are posted to
server via jQuery ajax.

These parameters are then used to populate a list of products which are sorted and paged.

public JsonResult AdvancedSearch(string name, int? page, string specs)
{
List<ProductModel> products = new List<ProductModel>();
if (!string.IsNullOrEmpty(specs))
{
//some code resulting in list of products
}
return Json(products.ToPagedList(pageNumber, pageSize), JsonRequestBehavior.AllowGet);
}

the question is how to render data returned to the view in a div as a partial view
on success of jquery ajax


问:
How can I open developer mode, to enter on mobile mode using Selenium in Python?
I'm developing a selenium bot that opens Bing for doing some daily researches and getting Microsoft Rewards Points. To achieve that, I need to do some researches in desktop, and some in mobile. It's important that the code start to run in the default desktop mode, than switch to mobile mode, and if possible go back to desktop again.

I don't know if it's possible to do only with selenium, but I'd appreciate any suggestions.


问:
Flutter web app should launch a URL and then navigate to another screen
I am working on a Flutter project.

I have an issue only when launching the web app.

There is a button that opens a URL on another browser tab:

```<code>  ElevatedButton(
                onPressed:(){
                  _launchUrl;
                  Navigator.pushAndRemoveUntil(
                      context,
                      MaterialPageRoute(builder: (BuildContext context) => MyHomePage()),
                          (Route<dynamic> route) => false

                  );
                },
                child: Text('pagarpedido'.tr()),
              ),
</code>```

Here you have _launchUrl():

```<code>Future<void> _launchUrl() async {
  if (!await launchUrl(_url)) {
    throw 'Could not launch $_url';
  }
}
</code>```

The issue is that when clicking on the button, the app is pushing MyHomePage(), but not opening the expected URL on another browser tab.

Removing the Navigator.pushAndRemoveUntil function from the code, when the button is clicked, the expected URL is opened on another browser tab.

What I need is ot click the button and after that to open the URL on another browser tab and the web app should show MyHomePage().

Body:
I am working on a Flutter project.

I have an issue only when launching the web app.

There is a button that opens a URL on another browser tab:

  ElevatedButton(
                onPressed:(){
                  _launchUrl;
                  Navigator.pushAndRemoveUntil(
                      context,
                      MaterialPageRoute(builder: (BuildContext context) => MyHomePage()),
                          (Route<dynamic> route) => false

                  );
                },
                child: Text('pagarpedido'.tr()),
              ),

Here you have _launchUrl():

Future<void> _launchUrl() async {
  if (!await launchUrl(_url)) {
    throw 'Could not launch $_url';
  }
}

The issue is that when clicking on the button, the app is pushing MyHomePage(), but not opening the expected URL on another browser tab.

Removing the Navigator.pushAndRemoveUntil function from the code, when the button is clicked, the expected URL is opened on another browser tab.

What I need is ot click the button and after that to open the URL on another browser tab and the web app should show MyHomePage().