问:
Flutter: RenderBox was not laid out
I'm new to flutter and I'm trying to populate a dropdown box with data from firestore using the document's name. I'm not sure how to do it so I searched for a reference. My reference had deprecated code which I edited so that might also be part of the problem. The code runs on chrome webview but doesn't on android. Help is greatly appreciated. I looked for other answers on the topic such as applying shrinkwrap however that didn't work.

ERROR

```<code>
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderRepaintBoundary#a43b4 NEEDS-LAYOUT NEEDS-PAINT
'package:flutter/src/rendering/box.dart':
package:flutter/…/rendering/box.dart:1
Failed assertion: line 2001 pos 12: 'hasSize'

</code>```

Code

```<code>      body: ListView(
        shrinkWrap: true,
        children: [
          Container(
            padding: const EdgeInsets.all(20),
            child: Card(
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  StreamBuilder<QuerySnapshot>(
                      stream: FirebaseFirestore.instance
                          .collection("currency")
                          .snapshots(),
                      builder: (context, snapshot) {
                        if (!snapshot.hasData) {
                          const Text("Loading.....");
                        } else {
                          List<DropdownMenuItem> currencyItems = [];
                          for (int i = 0; i < snapshot.data!.docs.length; i++) {
                            DocumentSnapshot snap = snapshot.data!.docs[i];
                            currencyItems.add(
                              DropdownMenuItem(
                                value: snap.id,
                                child: Text(
                                  snap.id,
                                  style:
                                      const TextStyle(color: Color(0xff11b719)),
                                ),
                              ),
                            );
                          }
                          return Row(
                            children: <Widget>[
                              Container(width: 50.0),
                              DropdownButton(
                                items: currencyItems,
                                onChanged: (currencyValue) {
                                  setState(() {
                                    selectedCurrency = currencyValue;
                                  });
                                },
                                value: selectedCurrency,
                                isExpanded: false,
                                hint: const Text(
                                  "Choose Currency Type",
                                  style: TextStyle(color: Color(0xff11b719)),
                                ),
                              ),
                            ],
                          );
                        }
                        return (const HomeView2());
                      }),
                ],
              ),
            ),
          ),
        ],
      ),

</code>```

Title: Flutter: RenderBox was not laid out

Body:
I'm new to flutter and I'm trying to populate a dropdown box with data from firestore using the document's name. I'm not sure how to do it so I searched for a reference. My reference had deprecated code which I edited so that might also be part of the problem. The code runs on chrome webview but doesn't on android. Help is greatly appreciated. I looked for other answers on the topic such as applying shrinkwrap however that didn't work.

ERROR

════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderRepaintBoundary#a43b4 NEEDS-LAYOUT NEEDS-PAINT
'package:flutter/src/rendering/box.dart':
package:flutter/…/rendering/box.dart:1
Failed assertion: line 2001 pos 12: 'hasSize'

Code

      body: ListView(
        shrinkWrap: true,
        children: [
          Container(
            padding: const EdgeInsets.all(20),
            child: Card(
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  StreamBuilder<QuerySnapshot>(
                      stream: FirebaseFirestore.instance
                          .collection("currency")
                          .snapshots(),
                      builder: (context, snapshot) {
                        if (!snapshot.hasData) {
                          const Text("Loading.....");
                        } else {
                          List<DropdownMenuItem> currencyItems = [];
                          for (int i = 0; i < snapshot.data!.docs.length; i++) {
                            DocumentSnapshot snap = snapshot.data!.docs[i];
                            currencyItems.add(
                              DropdownMenuItem(
                                value: snap.id,
                                child: Text(
                                  snap.id,
                                  style:
                                      const TextStyle(color: Color(0xff11b719)),
                                ),
                              ),
                            );
                          }
                          return Row(
                            children: <Widget>[
                              Container(width: 50.0),
                              DropdownButton(
                                items: currencyItems,
                                onChanged: (currencyValue) {
                                  setState(() {
                                    selectedCurrency = currencyValue;
                                  });
                                },
                                value: selectedCurrency,
                                isExpanded: false,
                                hint: const Text(
                                  "Choose Currency Type",
                                  style: TextStyle(color: Color(0xff11b719)),
                                ),
                              ),
                            ],
                          );
                        }
                        return (const HomeView2());
                      }),
                ],
              ),
            ),
          ),
        ],
      ),


来源: stackexchange

问:
Placing find command result in a file using output redirection
Command to search the file having the name “Ali” under your home directory using the find command. In case the file is found write its name in the file “hello.txt” in the current directory by using the standard output redirection.

Maybe the answer is
Find /home “Ali” > hello.txt
But I am not sure. Please Help

ContentLicense: CC BY-SA 4.0


问:
Problem in adding p-values of null hypothesis while creating a table in Stata
As per the model on which I am working where I try to find the impact of mentoring versus formal business classes on profits of small entrepreneurs, I regressed profits (tprofits) on Mentee (a categorical variable if assigned the status of mentorship), Class (a categorical variable if assigned the status of business classes), previous years baseline profits (tprofits_b) and a few other control variables like age, education, sector fixed effects etc. for which I used the global command: ($controls). The code I ran is as follows:

global controls ln_age higher_edu l_empl sec_0 sec_1 sec_02
reg tprofits Mentee Class tprofits_b $controls, cluster(id) robust
estadd local Controls "Yes", replace
est sto tab3_col1

reg tprofits Mentee Class tprofits_b $controls if months_since_treatment == 1, cluster(id) robust
estadd local Controls "Yes", replace
est sto tab3_col2

reg tprofits Mentee Class tprofits_b $controls if months_since_treatment == 17, cluster(id) robust
estadd local Controls "Yes", replace
est sto tab3_col3
esttab tab3_col* using table3.rtf, replace label b(3) se(3) stats(N r2 Controls, fmt(0 3 0) labels("Observations" "R2" "Controls")) nomtitle onecell

My first question is that in my newly created table, I want only the Mentee and Class variables to be displayed on the rows, however, although I control for the other variables, I do not want to display them in my table. I am not able to use the absorb command as the error message says that there are too many variables to absorb. Could you please tell me how I can go about this?

I also want to add the p-value of the null hypothesis: Mentee = Class using estadd command for each of the columns, but totally clueless how to add them.

Thanks in advance for your precious time!


问:
vue-json-excel: exporting data with leading zeros
I'm using the vue-json-excel dependency to export my data from a vue.js table into a excel file.

```<code><download-excel :data="artikel" name="artikel_export">
    <v-btn color="success">
       Excel Export <i class="mdi mdi-export-variant" aria-hidden="true"></i>
    </v-btn>
</download-excel>
</code>```

The variable artikel is an array with entries like this:

```<code>let artikel = [{
  name: 'Apple TV',
  barcode: '0000123458',
  owner: 'Max Mustermann'
}];
</code>```

If I start an export with the vue-json-excel-api the excel file opens with all entries from the artikel array.
My problem is that the barcodes loses its leading-zeros in the excel file, for example '0000123458' becomes '123458'.

Body:
I'm using the vue-json-excel dependency to export my data from a vue.js table into a excel file.

<download-excel :data="artikel" name="artikel_export">
    <v-btn color="success">
       Excel Export
    </v-btn>
</download-excel>

The variable artikel is an array with entries like this:

let artikel = [{
  name: 'Apple TV',
  barcode: '0000123458',
  owner: 'Max Mustermann'
}];

If I start an export with the vue-json-excel-api the excel file opens with all entries from the artikel array.
My problem is that the barcodes loses its leading-zeros in the excel file, for example '0000123458' becomes '123458'.


问:
Using filters to check if user is authenticated in drogon
I'm making a small chat application/server to train myself using WinUI and Drogon with postgresql. This post is about the Drogon part.

I wonder about when and how I should use filters. They are used to filter requests, but as I can't communicate data from the filter to the request handler, there seems to be some issues if the filter communicates with the database. Wouldn't using SQL transactions inside the request handlers lower the database work?

In the worst case, if I use a filter to check if the user is authenticated only to send him his account data, I get this, which doubles the database work:

//filter

//open transation
db->execSqlSync("select count(*) from users where token=$1", ...);
...
fccb(); //handle the request
//close transation

//request handler

//open transaction and do the same request
db->execSqlSync("select id, username, avataruri, etc from users where token=$1", ...)
//close transaction again
```

So my question is, is it really worth it to use filters when they would need to interact with the database like they show it on the wiki? I do not plan to have a lot of users or opening it to the public at all, but I would like my application to be as clean as possible. Is doing the same SQL request twice a big deal?

Body:
I'm making a small chat application/server to train myself using WinUI and Drogon with postgresql. This post is about the Drogon part.

I wonder about when and how I should use filters. They are used to filter requests, but as I can't communicate data from the filter to the request handler, there seems to be some issues if the filter communicates with the database. Wouldn't using SQL transactions inside the request handlers lower the database work?

In the worst case, if I use a filter to check if the user is authenticated only to send him his account data, I get this, which doubles the database work:

//filter

//open transation
db->execSqlSync("select count(*) from users where token=$1", ...);
...
fccb(); //handle the request
//close transation

//request handler

//open transaction and do the same request
db->execSqlSync("select id, username, avataruri, etc from users where token=$1", ...)
//close transaction again

So my question is, is it really worth it to use filters when they would need to interact with the database like they show it on the wiki? I do not plan to have a lot of users or opening it to the public at all, but I would like my application to be as clean as possible. Is doing the same SQL request twice a big deal?


问:
How to forecast for a time series where the input and output sequences have different time steps and datasets for both are multivariate?
Case: Lets take minute-wise 7-featured data for 4 hours a day for last 5 years and take P periods (per day) as input to output a sequence of Q periods (per day). I tried using feed forward dense layers and I immediately ran into errors because the output of that model had the length of P, which was different than that of target Q.

I tried appending zeros to Q to make its dimensions (rows) equal to P, and while it caused the model to "work" the predictions were either all 1s or 0s.

Using LSTM, I run into errors like, Error when checking target: expected dense_9 to have 2 dimensions, but got array with shape (1540, 120, 7), where 1540 is batch size, 120 is the number of time-steps and 7 is the number of features.

Would be grateful for right guidance on the matter.


问:
Trouble understanding how Airflow, Docker and AWS can work together
I have a bunch of scripts running on both AWS and on prem servers which are currently handled by a cronjob.

I'm looking to migrate them to airflow so I can have more control over the execution and alerts etc.

I'm trying to understand how I can do this using a docker instance to protect my existing python environments. If I want to migrate, will I also have to migrate and update the scripts so they now run using the docker filepaths etc. or is there a way I can have the airflow communicate from the docker instance to the existing server to execute the scripts?

Additionally, I wanted to setup a scheduler in one server and then have the workers execute the scripts on other servers but I'm not sure if this is possible with one server being on prem and one being AWS. Are there any issues I should look out for here? I'm new to AWS and the restrictions that can come with it.

I've tried looking through the documentation, but I haven't found anything that has answers for my particular implementation.

I've seen people mention named pipes, but I've also seen others saying that I shouldn't do anything from docker which interacts with the server because it defeats the purpose of the docker/is bad practice.

Any help would be appreciated!


问:
Cannot read serial messages using AEK-MCU-C4MLT1 and SPC5 studio
I am currently working on a project where I am using the serial communication.

I am using an AEK-MCU-C4MLT1, with SPC5 studio on a windows PC.

In particular, I am capable to transmit data but not to receive data.

I tried also enabling the interrupt, either for the transmission and the reception, and I found out that the program enters the interrupt each time I call the function sd_lld_read, even if I send no data externally (from docklight).

By sending data from docklight, and looking at the rx_buffer I am not able to read anything.

I attach the relevant part of the code here:

```<code>int main(void) {

    /* Initialization of all the imported components in the order specified in
     the application wizard. The function is generated automatically.*/
    componentsInit();

    /* Uncomment the below routine to Enable Interrupts. */
    irqIsrEnable();
    sd_lld_start(&SD1,&serial_config_UART);

    sd_lld_read(&SD1, (uint8_t*)aux_rx, 1000);

    memset(aux_rx,0,sizeof(aux_rx));
    /* Application main loop.*/
    for ( ; ; )
    {
        sprintf(aux_tx,"ATE1\r\n");
        sd_lld_write(&SD1,(uint8_t *)aux_tx, (uint16_t)(strlen(aux_tx)));
        osalThreadDelayMilliseconds(5000);
}

void rxreceive(SerialDriver *sdp)
{
    (void)sdp;
}

void txreceive(SerialDriver *sdp)
{
    (void)sdp;
    pal_togglepad(PORT_F,10);
}

</code>```

Do you have any idea of what do I have to do in order to receive data and correctly read data? Do you know if I have to call another function in the interrupt?

Body:
I am currently working on a project where I am using the serial communication.

I am using an AEK-MCU-C4MLT1, with SPC5 studio on a windows PC.

In particular, I am capable to transmit data but not to receive data.

I tried also enabling the interrupt, either for the transmission and the reception, and I found out that the program enters the interrupt each time I call the function sd_lld_read, even if I send no data externally (from docklight).

By sending data from docklight, and looking at the rx_buffer I am not able to read anything.

I attach the relevant part of the code here:

int main(void) {

    /* Initialization of all the imported components in the order specified in
     the application wizard. The function is generated automatically.*/
    componentsInit();

    /* Uncomment the below routine to Enable Interrupts. */
    irqIsrEnable();
    sd_lld_start(&SD1,&serial_config_UART);

    sd_lld_read(&SD1, (uint8_t*)aux_rx, 1000);

    memset(aux_rx,0,sizeof(aux_rx));
    /* Application main loop.*/
    for ( ; ; )
    {
        sprintf(aux_tx,"ATE1\r\n");
        sd_lld_write(&SD1,(uint8_t *)aux_tx, (uint16_t)(strlen(aux_tx)));
        osalThreadDelayMilliseconds(5000);
}

void rxreceive(SerialDriver *sdp)
{
    (void)sdp;
}

void txreceive(SerialDriver *sdp)
{
    (void)sdp;
    pal_togglepad(PORT_F,10);
}

Do you have any idea of what do I have to do in order to receive data and correctly read data? Do you know if I have to call another function in the interrupt?


问:
Impala create external table prevent parsing of newline in double quotes
Impala version: impalad version 4.0.0.2022.0.11.0-122

I have a CSV in S3 that has a field with newlines in it but the field is wrapped in double quotes. I can see that the CSV ignores the newlines in the field correctly but when issuing the CREATE statement in Impala it takes the newline as an actual newline for the row instead of just inside the field value, and messes up the structure of the CSV being ingested.

What can I do to ensure that newlines inside field values, that are wrapped in double quotations in the Impala table, are ignored?

CSV:

SQL CREATE statement:

CREATE EXTERNAL TABLE IF NOT EXISTS schema_name.table_name (
    `week` VARCHAR(10),
    notes STRING,
)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
-- ESCAPED BY '"' -- tried this, didn't work
STORED AS TEXTFILE
LOCATION 's3a://bucket_name/folder_name/'
TBLPROPERTIES("skip.header.line.count"="1")
-- Also tried this (get syntax error, also tried without ROW FORMAT keywords):
-- ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde' WITH SERDEPROPERTIES ( "separatorChar" = ",", "quoteChar" = """ )
```

Table:

Body:
Impala version: impalad version 4.0.0.2022.0.11.0-122

I have a CSV in S3 that has a field with newlines in it but the field is wrapped in double quotes. I can see that the CSV ignores the newlines in the field correctly but when issuing the CREATE statement in Impala it takes the newline as an actual newline for the row instead of just inside the field value, and messes up the structure of the CSV being ingested.

What can I do to ensure that newlines inside field values, that are wrapped in double quotations in the Impala table, are ignored?

CSV:

SQL CREATE statement:

CREATE EXTERNAL TABLE IF NOT EXISTS schema_name.table_name (
    `week` VARCHAR(10),
    notes STRING,
)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
-- ESCAPED BY '"' -- tried this, didn't work
STORED AS TEXTFILE
LOCATION 's3a://bucket_name/folder_name/'
TBLPROPERTIES("skip.header.line.count"="1")
-- Also tried this (get syntax error, also tried without ROW FORMAT keywords):
-- ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde' WITH SERDEPROPERTIES ( "separatorChar" = ",", "quoteChar" = """ )

Table:


问:
Allow cognito users to view images in s3
I have granted the Cognito user access to the S3 object matching that user attribute with Cognito Identity Pool.

How can I view images in a bucket from a URL in a browser logged in as the Cognito user?

What I want to

To split the s3 bucket into tenants and only allow image files from the tenant to which the Cognito user belongs to be viewed.

To display images with img tag .

What I did

S3 object arn: arn:aws:s3:::sample-tenant-bucket/public/1/photos/test.jpg

Create Cognito User with custom attributes

aws cognito-idp admin-create-user \
  --user-pool-id "ap-northeast-1_xxxx" \
  --username "USER_NAME" \
  --user-attributes Name=custom:tenant_id,Value=1
```
<ul>
<li>Cognito Identity Pool
<ul>
<li>Mapping of user attributes to principal tags
<ul>
<li><code>"tenantId": "custom:tenant_id"</code></li>
</ul>
</li>
<li>Added <code>sts:TagSession</code> permission to the authenticated role</li>
<li>Attach policy to the authenticated role</li>
</ul>
</li>
</ul>
<pre class="lang-json prettyprint-override"><code>{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": "*",
            "Resource": "arn:aws:s3:::sample-tenant-bucket/public/${aws:PrincipalTag/tenantId}/*",
            "Effect": "Allow"
        }
    ]
}
</code>```

Hypothesis

Typing the object URL (https://sample-tenant-bucket.s3.ap-northeast-1.amazonaws.com/public/1/1670773819-1.jpg) into the address bar results in a 403, even when logged in with an AWS account as an administrator, not as a Cognito User. Therefore,
I thought that Object URLs could not be used for non-public objects.

The Presigned URL seems to work, but I was wondering if there is another way to do it, since it is a method that does not depend on whether the user is already logged in to the AWS account or not.

Maybe this question is the same as asking how to display an image in a bucket by URL in a browser that is already logged in with the object owner's AWS account

Body:
I have granted the Cognito user access to the S3 object matching that user attribute with Cognito Identity Pool.

How can I view images in a bucket from a URL in a browser logged in as the Cognito user?

What I want to

To split the s3 bucket into tenants and only allow image files from the tenant to which the Cognito user belongs to be viewed.

To display images with img tag .

What I did

S3 object arn: arn:aws:s3:::sample-tenant-bucket/public/1/photos/test.jpg

Create Cognito User with custom attributes

aws cognito-idp admin-create-user \
  --user-pool-id "ap-northeast-1_xxxx" \
  --username "USER_NAME" \
  --user-attributes Name=custom:tenant_id,Value=1

Cognito Identity Pool

Mapping of user attributes to principal tags

"tenantId": "custom:tenant_id"

Added sts:TagSession permission to the authenticated role

Attach policy to the authenticated role

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": "*",
            "Resource": "arn:aws:s3:::sample-tenant-bucket/public/${aws:PrincipalTag/tenantId}/*",
            "Effect": "Allow"
        }
    ]
}

Hypothesis

Typing the object URL (https://sample-tenant-bucket.s3.ap-northeast-1.amazonaws.com/public/1/1670773819-1.jpg) into the address bar results in a 403, even when logged in with an AWS account as an administrator, not as a Cognito User. Therefore,
I thought that Object URLs could not be used for non-public objects.

The Presigned URL seems to work, but I was wondering if there is another way to do it, since it is a method that does not depend on whether the user is already logged in to the AWS account or not.

Maybe this question is the same as asking how to display an image in a bucket by URL in a browser that is already logged in with the object owner's AWS account


问:
Cannot resolve symbol - IntelliJ
In my IntelliJ, I have a maven project imported. In some of the classes when I am importing a class from different package, getting an error stating "cannot resolve symbol 'Utils'"

```<code>import com.acc.app.Utils;
</code>```

Where I have cross checked Utils class is in the right package under app and path is also correct and mvn clean install build is also successful but why the class Utils import is failing?

Title: Cannot resolve symbol - IntelliJ

Body:
In my IntelliJ, I have a maven project imported. In some of the classes when I am importing a class from different package, getting an error stating "cannot resolve symbol 'Utils'"

import com.acc.app.Utils;

Where I have cross checked Utils class is in the right package under app and path is also correct and mvn clean install build is also successful but why the class Utils import is failing?


问:
Consume Azure Event Hub events to AWS
We have a requirement as below

A publisher is using MS Azure and will be publishing events to the EventHub in Azure

We expect around 4000 events per second now and over time this will go to around 60000 events      per second over time

We want to ingest these events into AWS cloud

I want to check whether there are any out of the box integration between EventHub to say Kinesis or EventBridge?

Please note we are looking for a plug and play solution or service.

Title: Consume Azure Event Hub events to AWS


问:
How do I resolve 'require is not defined' errors in the environment using electron and vue.js?
I'm a beginner Java developer, and this time I came across node and electron for the first time.
And i'm making a desktop app using Vue.js and Electron for the new project.

I am using the vscode IDE.

After downloading Vue cli and electron,
The first thing I did was create a vue project through npm. The code is as follows.

vue create easyfax

After this, I have added the following for the use of electronic.
vue add electron-builder

And I entered the command below for execution.
npm run serve

The terminal said it was working properly, but the Chrome developer tool showed the following error.

```<code>    at Object.util (app.js:352:1)
    at __webpack_require__ (app.js:381:33)
    at fn (app.js:622:21)
    at eval (index.js?47b9:2:1)
    at ./node_modules/console-browserify/index.js
</code>```

To solve the problem, I modified the background.js file set to main in package.json like this.

```<code>  // Create the browser window.
  const win = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
      // Use pluginOptions.nodeIntegration, leave this alone
      // See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info
      // nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION,
      // contextIsolation: !process.env.ELECTRON_NODE_INTEGRATION
      nodeIntegration: true,
      contextIsolation: false
    }
  })\
</code>```

Desktop applications do not experience problems, but Chrome still experiences 'require' problems.

Please help me. Thank you.

Body:
I'm a beginner Java developer, and this time I came across node and electron for the first time.
And i'm making a desktop app using Vue.js and Electron for the new project.

I am using the vscode IDE.

After downloading Vue cli and electron,
The first thing I did was create a vue project through npm. The code is as follows.

vue create easyfax

After this, I have added the following for the use of electronic.
vue add electron-builder

And I entered the command below for execution.
npm run serve

The terminal said it was working properly, but the Chrome developer tool showed the following error.

    at Object.util (app.js:352:1)
    at __webpack_require__ (app.js:381:33)
    at fn (app.js:622:21)
    at eval (index.js?47b9:2:1)
    at ./node_modules/console-browserify/index.js

To solve the problem, I modified the background.js file set to main in package.json like this.

  // Create the browser window.
  const win = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
      // Use pluginOptions.nodeIntegration, leave this alone
      // See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info
      // nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION,
      // contextIsolation: !process.env.ELECTRON_NODE_INTEGRATION
      nodeIntegration: true,
      contextIsolation: false
    }
  })\

Desktop applications do not experience problems, but Chrome still experiences 'require' problems.

Please help me. Thank you.


问:
Why the program cann`t run properly through adb shell?

adb shell
#nohup /data/hello_test > /dev/null 2>&1 &

adb shell "nohup /data/hello_test > /dev/null 2>&1 &"

The first way is ok, the program can run at background.

While the second way is bad, the program is not running via 'ps -elf'.


问:
How can I archive my project tasks in Asana?
I have a list of tasks in my Asana board which I need to archive since I no longer require them. How can I archive them in a bulk? Thank you!</p>


问:
getting error in launching video file from local server
D/MULTI_WINDOW_SWITCH_ENABLED: false
D/SurfaceView: UPDATE null, mIsCastMode = false
V/MediaHTTPService: MediaHTTPService(android.media.MediaHTTPService@9f7e182): Cookies: null
V/MediaHTTPService: makeHTTPConnection: CookieManager created: java.net.CookieManager@1ccd093
V/MediaHTTPService: makeHTTPConnection(android.media.MediaHTTPService@9f7e182): cookieHandler: java.net.CookieManager@1ccd093 Cookies: null
D/DecorView[]: onWindowFocusChanged hasWindowFocus false
D/DecorView[]: onWindowFocusChanged hasWindowFocus true
D/OpenGLRenderer: endAllActiveAnimators on 0xb400007ab41e8400 (RippleDrawable) with handle 0xb400007a50bde960
W/System: A resource failed to call close.
E/MediaPlayerNative: error (1, -2147483648)
E/MediaPlayer: Error (1,-2147483648)
D/VideoView: Error: 1,-2147483648
D/IS_CTS_MODE: false
D/MULTI_WINDOW_SWITCH_ENABLED: false
D/CompatibilityChangeReporter: Compat change id reported: 171228096; UID 10427; state: ENABLED
D/DecorView[]: onWindowFocusChanged hasWindowFocus false
D/DecorView[]: onWindowFocusChanged hasWindowFocus true

Please give me the solution


问:
Do all pages of a website read the dist folder? Same question goes for the main.css coming from many scss files. Is reading from a big file efficient?
Do all pages of a website need to read from the dist folder?  Doesn't JS throw an error when looking for a variable that doesnt exist in the DOM? Same for main.css, that contains all scss files for the whole multipage project for example. Shouldn't each page read only what it needs?

This is not a coding related question, more like a workflow and mindset. Thanks in advance.


问:
MsAccess - Combobox inputs ID into table instead of the text I want it too
I'm using a combobox in a Ms Access form that gets it options from a separate table. I want it to be used by end users to input data into a table. Said data needs to be without errors because a 3rd party program (Qlik) will read the table contents and create a report on our workers and their "statistics".
I figured I want a dropdown menu, but when I use the combobox it input the ID of the text instead of the text itself.

Is there a way to have a dropdown menu in a Ms Access form that will input text into my table.

PS: I don't know if it's relevant but Ms Access is only being used as a front end for end-users. the data all ends up in a MySQL database.

I've looked at all the options I could find and I've been googling for a while but I can't seem to find a solution.


问:
Command phasescriptexecution failed with a nonzero exit development and production firebase
I'm trying to add firebase for my own project in dev and production environtment.
I need to add GoogleService-Info.plist for Dev and Prod environment.

After add new run script phase. There's error show phase script execution failed.

```<code>GOOG_DEV=${PROJECT_DIR}/${TARGET_NAME}/Debug/GoogleService-Info-Dev.plist
GOOG_PROD=${PROJECT_DIR}/${TARGET_NAME}/Release/GoogleService-Info.plist

GOOG_DST=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist

if [ "${CONFIGURATION}" == "Release" ]; then
  GOOG_SRC="${GOOG_PROD}"
else
  GOOG_SRC="${GOOG_DEV}"
fi

if [ ! -f "$GOOG_SRC" ]; then
  echo "Missing 'GoogleService-Info.plist' source at '${GOOG_SRC}"
  exit 1
fi

cp "${GOOG_SRC}" "${GOOG_DST}"
</code>```

GoogleService plist located like image below
googleservice plist location

NOTE

This will run smoothly if i'm using the same GoogleService-Info.plist NAME for both dev and prod

and i just tick the checkbox for 1 one of them in target Membership when i build the app. But it's really bother me to change it for every build environment changes

Body:
I'm trying to add firebase for my own project in dev and production environtment.
I need to add GoogleService-Info.plist for Dev and Prod environment.

After add new run script phase. There's error show phase script execution failed.

GOOG_DEV=${PROJECT_DIR}/${TARGET_NAME}/Debug/GoogleService-Info-Dev.plist
GOOG_PROD=${PROJECT_DIR}/${TARGET_NAME}/Release/GoogleService-Info.plist

GOOG_DST=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist

if [ "${CONFIGURATION}" == "Release" ]; then
  GOOG_SRC="${GOOG_PROD}"
else
  GOOG_SRC="${GOOG_DEV}"
fi

if [ ! -f "$GOOG_SRC" ]; then
  echo "Missing 'GoogleService-Info.plist' source at '${GOOG_SRC}"
  exit 1
fi

cp "${GOOG_SRC}" "${GOOG_DST}"

GoogleService plist located like image below
googleservice plist location

NOTE

This will run smoothly if i'm using the same GoogleService-Info.plist NAME for both dev and prod

and i just tick the checkbox for 1 one of them in target Membership when i build the app. But it's really bother me to change it for every build environment changes


问:
org.hibernate.AssertionFailure: force initializing collection loading
After upgraded Spring to v.6 and Spring boot to v.3 (and automatically Hibernate to 6.1.5), tests started to fail because of org.hibernate.AssertionFailure: force initializing collection loading

I have an entity class AClass with a field

```<code>@OneToMany(mappedBy = "aClass", fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval = true)
private Set<BClass> items;
</code>```

When repository of AClass is triggering several methods, hashCode method is invoked and when it tries to execute items.hashCode(), I'm getting the exception:

```<code>2022-12-13T09:42:46.314+01:00 ERROR 15336 --- [    Test worker] org.hibernate.AssertionFailure           : HHH000099: an assertion failure occurred (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session): org.hibernate.AssertionFailure: force initializing collection loading

org.hibernate.AssertionFailure: force initializing collection loading
    at app//org.hibernate.collection.spi.AbstractPersistentCollection.forceInitialization(AbstractPersistentCollection.java:807)
    at app//org.hibernate.engine.internal.StatefulPersistenceContext.initializeNonLazyCollections(StatefulPersistenceContext.java:995)
    at app//org.hibernate.engine.internal.StatefulPersistenceContext.initializeNonLazyCollections(StatefulPersistenceContext.java:981)
    at app//org.hibernate.sql.results.spi.ListResultsConsumer.consume(ListResultsConsumer.java:170)
    at app//org.hibernate.sql.results.spi.ListResultsConsumer.consume(ListResultsConsumer.java:32)
    at app//org.hibernate.sql.exec.internal.JdbcSelectExecutorStandardImpl.doExecuteQuery(JdbcSelectExecutorStandardImpl.java:443)
    at app//org.hibernate.sql.exec.internal.JdbcSelectExecutorStandardImpl.executeQuery(JdbcSelectExecutorStandardImpl.java:166)
    at app//org.hibernate.sql.exec.internal.JdbcSelectExecutorStandardImpl.list(JdbcSelectExecutorStandardImpl.java:91)
    at app//org.hibernate.sql.exec.spi.JdbcSelectExecutor.list(JdbcSelectExecutor.java:31)
    at app//org.hibernate.loader.ast.internal.CollectionLoaderSingleKey.load(CollectionLoaderSingleKey.java:121)
    at app//org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:789)
    at app//org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:75)
    at app//org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107)
    at app//org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:1710)
    at app//org.hibernate.collection.spi.AbstractPersistentCollection.lambda$initialize$3(AbstractPersistentCollection.java:613)
    at app//org.hibernate.collection.spi.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:265)
    at app//org.hibernate.collection.spi.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:611)
    at app//org.hibernate.collection.spi.AbstractPersistentCollection.read(AbstractPersistentCollection.java:136)
    at app//org.hibernate.collection.spi.PersistentSet.hashCode(PersistentSet.java:407)
    at app//xyz.example.AClass.hashCode(AClass.java:52)
...
</code>```

When I used default Lombok hashCode method, or IntelliJ default like

```<code>@Override
public int hashCode() {
    int result = super.hashCode();
    result = 31 * result + (x != null ? x.hashCode() : 0);
    result = 31 * result + (y != null ? y.hashCode() : 0);
    result = 31 * result + (z != null ? z.hashCode() : 0);
    result = 31 * result + (items != null ? items.hashCode() : 0);
    return result;
}
</code>```

I'm getting exception, but when I removed this line:

```<code>    result = 31 * result + (items != null ? items.hashCode() : 0);
</code>```

tests are passing. However, I wouldn't like to remove items from hashCode method.

Body:
After upgraded Spring to v.6 and Spring boot to v.3 (and automatically Hibernate to 6.1.5), tests started to fail because of org.hibernate.AssertionFailure: force initializing collection loading

I have an entity class AClass with a field

@OneToMany(mappedBy = "aClass", fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval = true)
private Set<BClass> items;

When repository of AClass is triggering several methods, hashCode method is invoked and when it tries to execute items.hashCode(), I'm getting the exception:

2022-12-13T09:42:46.314+01:00 ERROR 15336 --- [    Test worker] org.hibernate.AssertionFailure           : HHH000099: an assertion failure occurred (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session): org.hibernate.AssertionFailure: force initializing collection loading

org.hibernate.AssertionFailure: force initializing collection loading
    at app//org.hibernate.collection.spi.AbstractPersistentCollection.forceInitialization(AbstractPersistentCollection.java:807)
    at app//org.hibernate.engine.internal.StatefulPersistenceContext.initializeNonLazyCollections(StatefulPersistenceContext.java:995)
    at app//org.hibernate.engine.internal.StatefulPersistenceContext.initializeNonLazyCollections(StatefulPersistenceContext.java:981)
    at app//org.hibernate.sql.results.spi.ListResultsConsumer.consume(ListResultsConsumer.java:170)
    at app//org.hibernate.sql.results.spi.ListResultsConsumer.consume(ListResultsConsumer.java:32)
    at app//org.hibernate.sql.exec.internal.JdbcSelectExecutorStandardImpl.doExecuteQuery(JdbcSelectExecutorStandardImpl.java:443)
    at app//org.hibernate.sql.exec.internal.JdbcSelectExecutorStandardImpl.executeQuery(JdbcSelectExecutorStandardImpl.java:166)
    at app//org.hibernate.sql.exec.internal.JdbcSelectExecutorStandardImpl.list(JdbcSelectExecutorStandardImpl.java:91)
    at app//org.hibernate.sql.exec.spi.JdbcSelectExecutor.list(JdbcSelectExecutor.java:31)
    at app//org.hibernate.loader.ast.internal.CollectionLoaderSingleKey.load(CollectionLoaderSingleKey.java:121)
    at app//org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:789)
    at app//org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:75)
    at app//org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107)
    at app//org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:1710)
    at app//org.hibernate.collection.spi.AbstractPersistentCollection.lambda$initialize$3(AbstractPersistentCollection.java:613)
    at app//org.hibernate.collection.spi.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:265)
    at app//org.hibernate.collection.spi.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:611)
    at app//org.hibernate.collection.spi.AbstractPersistentCollection.read(AbstractPersistentCollection.java:136)
    at app//org.hibernate.collection.spi.PersistentSet.hashCode(PersistentSet.java:407)
    at app//xyz.example.AClass.hashCode(AClass.java:52)
...

When I used default Lombok hashCode method, or IntelliJ default like

@Override
public int hashCode() {
    int result = super.hashCode();
    result = 31 * result + (x != null ? x.hashCode() : 0);
    result = 31 * result + (y != null ? y.hashCode() : 0);
    result = 31 * result + (z != null ? z.hashCode() : 0);
    result = 31 * result + (items != null ? items.hashCode() : 0);
    return result;
}

I'm getting exception, but when I removed this line:

    result = 31 * result + (items != null ? items.hashCode() : 0);

tests are passing. However, I wouldn't like to remove items from hashCode method.


问:
RocketChat: Convert LDAP user to local users
Description

Hello, I would like to remove the LDAP connection. We used it already for quite some time. But for security reasons I would like to remove because MFA is not an option. reCAPTCHA would be an alternative but I haven´t found sth about.

Anyway, I would like to remove the LDAP connection and I was wondering what happens to the existing users. Will they be local users? Do I have to convert them in some way?
Server Setup Information

```<code>    Version of Rocket.Chat Server: 4.8.7
    Operating System: Ubuntu 18.04
    Deployment Method: Docker
    Number of Running Instances: 1
    DB Replicaset Oplog: dunno
    NodeJS Version: v12.22.1
    MongoDB Version: 5.0.14
    Proxy: nginx
    Firewalls involved: Yes

</code>```

Nothing yet due to production system.

Body:
Description

Hello, I would like to remove the LDAP connection. We used it already for quite some time. But for security reasons I would like to remove because MFA is not an option. reCAPTCHA would be an alternative but I haven´t found sth about.

Anyway, I would like to remove the LDAP connection and I was wondering what happens to the existing users. Will they be local users? Do I have to convert them in some way?
Server Setup Information

    Version of Rocket.Chat Server: 4.8.7
    Operating System: Ubuntu 18.04
    Deployment Method: Docker
    Number of Running Instances: 1
    DB Replicaset Oplog: dunno
    NodeJS Version: v12.22.1
    MongoDB Version: 5.0.14
    Proxy: nginx
    Firewalls involved: Yes

Nothing yet due to production system.


问:
c#, ESC_POS_USB_NET, Unable to access pos printer
My PC (192.168.1.3) attached a shared POS printer (pos-80) which is connected via USB cable to my colleague's PC (192.168.1.9) as shown below

How can I access the shared POS printer on my PC?
Any advice will be much appreciated.

If I set the printer name to "POS-80" or "POS-80 on 192.168.1.9" and run the program I receive an error.

My code is shown below

The error if I set the printer name to "POS-80"

The error if I set the printer name to "POS-80 on 192.168.1.9"


问:
App-to-app flow for flutter app with Truelayer
I am trying to implement app-to-app flow from flutter mobile app to the UK bank's app. We are using truelayer.  Here is the documentation from truelayer. This GitHub repository contains code from truelayer for sample iOS and Android apps configured for app-to-app redirects to work correctly.

For the flutter app, we are using webview_flutter: ^3.0.4.

It is not redirecting to the bank app, here is the code using webview_flutter package.

```<code>import 'dart:io';

import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

class WebViewTruelayer extends StatefulWidget {
  const WebViewTruelayer({super.key});

  @override
  WebViewTruelayerState createState() => WebViewTruelayerState();
}

class WebViewTruelayerState extends State<WebViewTruelayer> {
  @override
  void initState() {
    super.initState();
    // Enable virtual display.
    if (Platform.isAndroid) WebView.platform = AndroidWebView();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Trulayer example'),
      ),
      body: WebView(
        javascriptMode: JavascriptMode.unrestricted,
        initialUrl:
            'https://truelayer-sandbox.com/test-redirect',
      ),
    );
  }
}
</code>```

Result:

Demo

Expected result Source code

Body:
I am trying to implement app-to-app flow from flutter mobile app to the UK bank's app. We are using truelayer.  Here is the documentation from truelayer. This GitHub repository contains code from truelayer for sample iOS and Android apps configured for app-to-app redirects to work correctly.

For the flutter app, we are using webview_flutter: ^3.0.4.

It is not redirecting to the bank app, here is the code using webview_flutter package.

import 'dart:io';

import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

class WebViewTruelayer extends StatefulWidget {
  const WebViewTruelayer({super.key});

  @override
  WebViewTruelayerState createState() => WebViewTruelayerState();
}

class WebViewTruelayerState extends State<WebViewTruelayer> {
  @override
  void initState() {
    super.initState();
    // Enable virtual display.
    if (Platform.isAndroid) WebView.platform = AndroidWebView();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Trulayer example'),
      ),
      body: WebView(
        javascriptMode: JavascriptMode.unrestricted,
        initialUrl:
            'https://truelayer-sandbox.com/test-redirect',
      ),
    );
  }
}

Result:

Demo

Expected result Source code


问:
useEffect not grabbing current state
So I have a state that is set to some fetched data, which I then store a copy of into a variable within a useEffect. I then use the data within that variable to map out elements.

```<code>import React, { useContext, useEffect } from 'react'
import { newContext } from './Context'
import { PrivateChatArea } from './PrivateChatArea'
import { PrivateChatContent } from './PrivateChatContent'

function PrivateMessages() {
    const { pmData } = useContext(newContext)
    let mutable = { ...pmData }
    useEffect(() => {
        console.log(pmData)
        mutable = { ...pmData }
        console.log(mutable)
    }, [pmData])

    return (
        <>
            <PrivateChatArea>
                {Object.keys(mutable).length !== 0 && mutable.messages.map((messages, key) => {
                    return (
                        <PrivateChatContent key={key} id={messages.messageID}>{messages.message}    </PrivateChatContent>
                    )
                })}
            </PrivateChatArea>
        </>
    )
}
</code>```

I was hoping useEffect would grab and store the current state(pmData) on state change, however based on the logs useEffect seems to be grabbing the previous state instead of the current state. Causing the mapped elements to be inaccurate.

Refreshing immediately fixes this, but I would rather not have to refresh just to see the updated state changes.

Title: useEffect not grabbing current state

Body:
So I have a state that is set to some fetched data, which I then store a copy of into a variable within a useEffect. I then use the data within that variable to map out elements.

import React, { useContext, useEffect } from 'react'
import { newContext } from './Context'
import { PrivateChatArea } from './PrivateChatArea'
import { PrivateChatContent } from './PrivateChatContent'

function PrivateMessages() {
    const { pmData } = useContext(newContext)
    let mutable = { ...pmData }
    useEffect(() => {
        console.log(pmData)
        mutable = { ...pmData }
        console.log(mutable)
    }, [pmData])

    return (
        <>
            <PrivateChatArea>
                {Object.keys(mutable).length !== 0 && mutable.messages.map((messages, key) => {
                    return (
                        <PrivateChatContent key={key} id={messages.messageID}>{messages.message}    </PrivateChatContent>
                    )
                })}
            </PrivateChatArea>
        </>
    )
}

I was hoping useEffect would grab and store the current state(pmData) on state change, however based on the logs useEffect seems to be grabbing the previous state instead of the current state. Causing the mapped elements to be inaccurate.

Refreshing immediately fixes this, but I would rather not have to refresh just to see the updated state changes.


问:
SqlAlchemy AmbiguousForeign Keys Error - foreign key attribute is specified
THIS IS NOT A DUPLICATE, PLEASE DONT DELETE

My problem is using 2 foreign keys from the same ref table and using back_populates in order to relate them. Docs and previous SO answers say to specify the foreign keys with the 'foreign_keys= ' attribute which is what I have. AND THIS WORKS WHEN REMOVING THE BACK_POPULATES attribute. However I need to be able to access the user schema when looking up the Connections table in one of my api endpoints:

class Connections(db.Model):
    __tablename__ = 'connections'

    id = db.Column(db.Integer, primary_key = True)
    followee_id = db.Column(db.Integer, db.ForeignKey("users.id"), nullable = False)
    follower_id = db.Column(db.Integer, db.ForeignKey("users.id"), nullable = False)

    followee = db.relationship('User', foreign_keys="Connections.followee_id")
    follower = db.relationship('User', foreign_keys="Connections.follower_id")
    messages = db.relationship('Messages', back_populates = 'connection', cascade = "all, delete")

class User(db.Model):
    __tablename__ = 'users'

    id = db.Column(db.Integer, primary_key = True)
    name = db.Column(db.String(30), nullable = False)
    email = db.Column(db.String, nullable = False, unique = True)
    password = db.Column(db.String, nullable = False, unique = True)
    phonenumber = db.Column(db.String, nullable = False)
    age = db.Column(db.Date, nullable = False)
    is_admin = db.Column(db.Boolean, nullable = True, default = False)
    connection = db.relationship('Connections', back_populates = 'users', cascade = "all, delete")
    connection = db.relationship('Connections', back_populates = 'users', cascade = "all, delete")

```

If there's another way to set up the back relationship between Connections and User, please let me know. Any help would be greatly appreaciated however just to reiterate, I have tried the solutions on here that relate to relationships without backref or back_populates

Body:
THIS IS NOT A DUPLICATE, PLEASE DONT DELETE

My problem is using 2 foreign keys from the same ref table and using back_populates in order to relate them. Docs and previous SO answers say to specify the foreign keys with the 'foreign_keys= ' attribute which is what I have. AND THIS WORKS WHEN REMOVING THE BACK_POPULATES attribute. However I need to be able to access the user schema when looking up the Connections table in one of my api endpoints:

class Connections(db.Model):
    __tablename__ = 'connections'

    id = db.Column(db.Integer, primary_key = True)
    followee_id = db.Column(db.Integer, db.ForeignKey("users.id"), nullable = False)
    follower_id = db.Column(db.Integer, db.ForeignKey("users.id"), nullable = False)

    followee = db.relationship('User', foreign_keys="Connections.followee_id")
    follower = db.relationship('User', foreign_keys="Connections.follower_id")
    messages = db.relationship('Messages', back_populates = 'connection', cascade = "all, delete")

class User(db.Model):
    __tablename__ = 'users'

    id = db.Column(db.Integer, primary_key = True)
    name = db.Column(db.String(30), nullable = False)
    email = db.Column(db.String, nullable = False, unique = True)
    password = db.Column(db.String, nullable = False, unique = True)
    phonenumber = db.Column(db.String, nullable = False)
    age = db.Column(db.Date, nullable = False)
    is_admin = db.Column(db.Boolean, nullable = True, default = False)
    connection = db.relationship('Connections', back_populates = 'users', cascade = "all, delete")
    connection = db.relationship('Connections', back_populates = 'users', cascade = "all, delete")

If there's another way to set up the back relationship between Connections and User, please let me know. Any help would be greatly appreaciated however just to reiterate, I have tried the solutions on here that relate to relationships without backref or back_populates


问:
Can we containerize an electron app using docker?
Currently, I have developed a desktop application using electron JS, and I am using electron-store to save user preference. And these prefernce are being saved in a config.json file inside the C:/Users/<user>/AppData/Roaming/<applicationName>/config.json

I wonder if I have containerized my electron app using docker:

Would I face any issues related to storage or anything else?

Would I be able to run the app normally?

Would I be able to run the GUI of the electron app?


问:
feature selection: minimum redundancy, maximum relevancy (mRMR) using mutual information and scikit-learn
I've been trying to implement a minimum redondancy, maximum relevency strategy for feature selection using mutual information.

```<code>def mrmr(X_train, y_train):
    X_train_copy = X_train.copy()
    y_train_copy = y_train.copy()

    # relevancy of input features with the continuous target
    relevancies = mutual_info_regression(X_train_copy, y_train_copy)

    redundancies = []
    for index, data in X_train_copy.iteritems():
        # redundancy of input feature "i" with all other input features
        target = X_train_copy.loc[:, index]
        input = X_train_copy.drop(columns=index)
        redundancy = mutual_info_regression(input, target)
        redundancies.append(redundancy.sum() / input.shape[1])

    # compute score
    scores = relevancies - np.abs(redundancies)

    idx_sorted = np.argsort(scores)[::-1]
    sorted_scores = scores[idx_sorted]
    sorted_columns = X_train.columns[idx_sorted].values

    return sorted_scores, sorted_columns
</code>```

However, when plotting the result, I get negative scores, does that make sense ?

```<code>scores, columns = mrmr(X_train, y_train)

scores_df = pd.Series(scores, index=columns)
scores_df.plot.bar(figsize=(20, 5))
</code>```

Body:
I've been trying to implement a minimum redondancy, maximum relevency strategy for feature selection using mutual information.

def mrmr(X_train, y_train):
    X_train_copy = X_train.copy()
    y_train_copy = y_train.copy()

    # relevancy of input features with the continuous target
    relevancies = mutual_info_regression(X_train_copy, y_train_copy)

    redundancies = []
    for index, data in X_train_copy.iteritems():
        # redundancy of input feature "i" with all other input features
        target = X_train_copy.loc[:, index]
        input = X_train_copy.drop(columns=index)
        redundancy = mutual_info_regression(input, target)
        redundancies.append(redundancy.sum() / input.shape[1])

    # compute score
    scores = relevancies - np.abs(redundancies)

    idx_sorted = np.argsort(scores)[::-1]
    sorted_scores = scores[idx_sorted]
    sorted_columns = X_train.columns[idx_sorted].values

    return sorted_scores, sorted_columns

However, when plotting the result, I get negative scores, does that make sense ?

scores, columns = mrmr(X_train, y_train)

scores_df = pd.Series(scores, index=columns)
scores_df.plot.bar(figsize=(20, 5))


问:
Reloading a div using ajax
I'm Using ajax to reload a specific div after the function is complete. It works fine but when it reloads it just gets behind a transparent black so I can just see it but can't click any thing
like this:
problem image
also the menu bar displays double after reloading:

```<code>$('#updateemployee').click(function(e) {
                    //sending the data gathered from input of user to php file where api is called

                    e.preventDefault();
                        $.ajax({
                            url: "php/updatePersonnelByID.php",
                            type: 'POST',
                            dataType:'json',

                            data: {
                                firstName: $('#fename').val(),
                                lastName:$('#lename').val(),
                                jobTitle:$('#Jetitle').val(),
                                email:$('#eemail').val(),
                                departmentID:$('#udept').val(),
                                id:$('#employeeid').val(),
                            },
                            //if user enters correct data and api gives back the data then we run success funtion
                            success: function(result) {

                                console.log(result);

                                //if status of data is ok we fetch the data from fields and put them in results table in html
                                if (result.status.name == "ok") {

                                    //fetching fields from api and showing them in html table
                                  Swal.fire({
                                    title:"updated",
                                    text:"updated",
                                    type:"success"
                                  }).then(function(){
                                    $("#updateconfirmation").modal("hide");
                                    $("#editemployeemodal").modal("hide");
                                     $('#employeestable').load(location.href + "#employeestable>*")

                                  });

                                }else{
                                    //if the upper condition  fails
                                    console.log("error");

                                }

                            },
                            //if there is no success in retrieving data from api
                            error: function(jqXHR, textStatus, errorThrown) {

                                console.log("error");
                                $('#txterror').html("Enter Valid Id");
                            }
                        });

                    });
</code>```

I'm making this ajax request to update employee data its all working fine the problem is in Swal.fire part that when it reloads the div it just gets it behind a transparent black probably because some of the alert or modal is not closing properly please help

tried reloading a specific div and working fine but gets hide behind black transparent screen

Title: Reloading a div using ajax

Body:
I'm Using ajax to reload a specific div after the function is complete. It works fine but when it reloads it just gets behind a transparent black so I can just see it but can't click any thing
like this:
problem image
also the menu bar displays double after reloading:

$('#updateemployee').click(function(e) {
                    //sending the data gathered from input of user to php file where api is called

                    e.preventDefault();
                        $.ajax({
                            url: "php/updatePersonnelByID.php",
                            type: 'POST',
                            dataType:'json',

                            data: {
                                firstName: $('#fename').val(),
                                lastName:$('#lename').val(),
                                jobTitle:$('#Jetitle').val(),
                                email:$('#eemail').val(),
                                departmentID:$('#udept').val(),
                                id:$('#employeeid').val(),
                            },
                            //if user enters correct data and api gives back the data then we run success funtion
                            success: function(result) {

                                console.log(result);

                                //if status of data is ok we fetch the data from fields and put them in results table in html
                                if (result.status.name == "ok") {

                                    //fetching fields from api and showing them in html table
                                  Swal.fire({
                                    title:"updated",
                                    text:"updated",
                                    type:"success"
                                  }).then(function(){
                                    $("#updateconfirmation").modal("hide");
                                    $("#editemployeemodal").modal("hide");
                                     $('#employeestable').load(location.href + "#employeestable>*")

                                  });

                                }else{
                                    //if the upper condition  fails
                                    console.log("error");

                                }

                            },
                            //if there is no success in retrieving data from api
                            error: function(jqXHR, textStatus, errorThrown) {

                                console.log("error");
                                $('#txterror').html("Enter Valid Id");
                            }
                        });

                    });

I'm making this ajax request to update employee data its all working fine the problem is in Swal.fire part that when it reloads the div it just gets it behind a transparent black probably because some of the alert or modal is not closing properly please help

tried reloading a specific div and working fine but gets hide behind black transparent screen


问:
Keras UNet: AttributeError
I am currently trying to run a U-Net model in Keras, using PyCharm and Anaconda on Windows. My first attempts kept on working well. However, now I'm getting an error when I try to acces keras:

My imports:

```<code>from unet_model import multi_unet_model

from keras.utils import normalize
import os
import glob
import cv2
import numpy as np
from matplotlib import pyplot as plt
</code>```

The error:
AttributeError: module 'tensorflow.python.client.pywrap_tf_session' has no attribute 'cxx_version'

Maybe one of you encountered the same problem and can give me a hint how to solve it.

The problem occured after trying to move the model from cpu to gpu. Now the model can't be processed at all. Maybe I changed some references without knowing it.

Title: Keras UNet: AttributeError

Body:
I am currently trying to run a U-Net model in Keras, using PyCharm and Anaconda on Windows. My first attempts kept on working well. However, now I'm getting an error when I try to acces keras:

My imports:

from unet_model import multi_unet_model

from keras.utils import normalize
import os
import glob
import cv2
import numpy as np
from matplotlib import pyplot as plt

The error:
AttributeError: module 'tensorflow.python.client.pywrap_tf_session' has no attribute 'cxx_version'

Maybe one of you encountered the same problem and can give me a hint how to solve it.

The problem occured after trying to move the model from cpu to gpu. Now the model can't be processed at all. Maybe I changed some references without knowing it.


问:
Why is LAMPP making a copy of every single file in the project folder, as " ._. " format, ( e.g., ._.index.php) when moving the folder to vsc?
screenshot
Hi all!
I am using OS X, xampp for localhost, when I mount the volume lampp where htdocs is and bring one project folder to vsc it makes a copy of every single file in the folder in this format ._.   e.g.   ._.index.php

If I open the project folder in vsc from different directory than htdocs from xampp/lampp these files do not exist.

Any idea on how to get rid of this files while using lampp?


问:
Export all the different tables from a database (AdventureWorks2019) into CSV format as table name in same path using python in VScode
```<code>import pandas as pd
import pyodbc

conn = pyodbc.connect('Driver={SQL Server};'
                      'Server=DESKTOP-0LA566U\SQLEXPRESS;'
                      'Database=AdventureWorksDW2019;'
                      'Trusted_Connection=yes;')

tables= ["DatabaseLog", "DimAccount"] # i have just wrriten two table but it is 30
for table in tables:
    sql_query = pd.read_sql_query('''select * from {table}''',conn)

    df = pd.DataFrame(sql_query)
    df.to_csv (f'C:\Users\cdtpr\OneDrive\Desktop\connections\{table}.csv', index = False)
</code>```

I tried the above code and the error is: "Unicode Error "unicodeescape" codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape.

I am Using pthon in Vscode.
I want to export all the 30 tables from AdventureWorks2019 database as table name into CSV format. Please help me that how can I do it.

Body:
import pandas as pd
import pyodbc

conn = pyodbc.connect('Driver={SQL Server};'
                      'Server=DESKTOP-0LA566U\SQLEXPRESS;'
                      'Database=AdventureWorksDW2019;'
                      'Trusted_Connection=yes;')

tables= ["DatabaseLog", "DimAccount"] # i have just wrriten two table but it is 30
for table in tables:
    sql_query = pd.read_sql_query('''select * from {table}''',conn)

    df = pd.DataFrame(sql_query)
    df.to_csv (f'C:\Users\cdtpr\OneDrive\Desktop\connections\{table}.csv', index = False)

I tried the above code and the error is: "Unicode Error "unicodeescape" codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape.

I am Using pthon in Vscode.
I want to export all the 30 tables from AdventureWorks2019 database as table name into CSV format. Please help me that how can I do it.


问:
What is this thing in NetBeans interface and how to turn it off?

I just installed NetBeans on Linux and see these useless hints. I just want to turn it off but I don't even know what it is called.

Most options in Tools -> Options -> Editor don't work.


问:
Change the supertool tip popupDirection based on available space in flutter web
I am using super_tooltip: ^1.0.1 for display tooltip with actions

How do I make the tooltip appear on top if there's not enough space at the bottom, and vice-versa? Is there any way to change it automatically?


问:
WCF service with MTOM attachment post request return "Error creating a reader for the MTOM message"
I have a WCF serivce that receives a soap message from a client, simple post Service Contract that receives message with MTOM file attachment.

```<code>[ServiceContract(Namespace = "http://example.com/schema/service/Upload/1.0")]
[XmlSerializerFormat]
public interface IBillerReconcileNotificationService
{
    [OperationContract(Action = "Reconcile")]
    [FaultContract(typeof(BillerNotificationFault))]
    UploadMsgRs Reconcile(UploadMsgRq requestModel);
}

public class BillerReconcileNotificationService : IBillerReconcileNotificationService
{
    public UploadMsgRs Reconcile(UploadMsgRq requestModel)
    {//handling request business}
}
</code>```

While testing the service by sending a request in postman I always received 400 bad request response, WCF trace log show the following exception :

```<code>**<Exception>
<ExceptionType>System.ServiceModel.CommunicationException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
<Message>Error creating a reader for the MTOM message</Message>
<StackTrace>
at System.ServiceModel.Channels.MtomMessageEncoder.MtomBufferedMessageData.TakeXmlReader()
at System.ServiceModel.Channels.BufferedMessageData.GetMessageReader()
at System.ServiceModel.Channels.BufferedMessage..ctor(IBufferedMessageData messageData, RecycledMessageState recycledMessageState, Boolean[] understoodHeaders, Boolean understoodHeadersModified)
at System.ServiceModel.Channels.MtomMessageEncoder.ReadMessage(ArraySegment`1 buffer, BufferManager bufferManager, String contentType)
at System.ServiceModel.Channels.HttpInput.DecodeBufferedMessage(ArraySegment`1 buffer, Stream inputStream)
at System.ServiceModel.Channels.HttpInput.ParseMessageAsyncResult.ContinueReading(Int32 bytesRead)
at System.ServiceModel.Channels.HttpInput.ParseMessageAsyncResult.DecodeBufferedMessageAsync()
at System.ServiceModel.Channels.HttpInput.ParseMessageAsyncResult.BeginParse()
at System.ServiceModel.Channels.HttpInput.BeginParseIncomingMessage(HttpRequestMessage httpRequestMessage, AsyncCallback callback, Object state)
at System.ServiceModel.Channels.HttpPipeline.EmptyHttpPipeline.BeginParseIncomingMessage(AsyncCallback asynCallback, Object state)
at System.ServiceModel.Channels.HttpPipeline.EnqueueMessageAsyncResult..ctor(ReplyChannelAcceptor acceptor, Action dequeuedCallback, HttpPipeline pipeline, AsyncCallback callback, Object state)
at System.ServiceModel.Channels.HttpPipeline.EmptyHttpPipeline.BeginProcessInboundRequest(ReplyChannelAcceptor replyChannelAcceptor, Action dequeuedCallback, AsyncCallback callback, Object state)
at System.ServiceModel.Channels.HttpChannelListener`1.HttpContextReceivedAsyncResult`1.ProcessHttpContextAsync()
at System.ServiceModel.Channels.HttpChannelListener`1.BeginHttpContextReceived(HttpRequestContext context, Action acceptorCallback, AsyncCallback callback, Object state)
at System.ServiceModel.Activation.HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result)
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest()
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest()
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequest(Object state)
at System.ServiceModel.AspNetPartialTrustHelpers.PartialTrustInvoke(ContextCallback callback, Object state)
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequestWithFlow(Object state)
at System.Runtime.IOThreadScheduler.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Runtime.Fx.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
</StackTrace>
<ExceptionString>System.ServiceModel.CommunicationException: Error creating a reader for the MTOM message ---> System.Xml.XmlException: Root MIME part containing infoset not found.
   at System.Xml.XmlMtomReader.ReadRootMimePart()
   at System.Xml.XmlMtomReader.Initialize(Stream stream, String contentType, XmlDictionaryReaderQuotas quotas, Int32 maxBufferSize)
   at System.Xml.XmlMtomReader.SetInput(Stream stream, Encoding[] encodings, String contentType, XmlDictionaryReaderQuotas quotas, Int32 maxBufferSize, OnXmlDictionaryReaderClose onClose)
   at System.ServiceModel.Channels.MtomMessageEncoder.MtomBufferedMessageData.TakeXmlReader()
   --- End of inner exception stack trace ---</ExceptionString>
<InnerException>
<ExceptionType>System.Xml.XmlException, System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
<Message>Root MIME part containing infoset not found.</Message>
<StackTrace>
at System.Xml.XmlMtomReader.ReadRootMimePart()
at System.Xml.XmlMtomReader.Initialize(Stream stream, String contentType, XmlDictionaryReaderQuotas quotas, Int32 maxBufferSize)
at System.Xml.XmlMtomReader.SetInput(Stream stream, Encoding[] encodings, String contentType, XmlDictionaryReaderQuotas quotas, Int32 maxBufferSize, OnXmlDictionaryReaderClose onClose)
at System.ServiceModel.Channels.MtomMessageEncoder.MtomBufferedMessageData.TakeXmlReader()
</StackTrace>
<ExceptionString>System.Xml.XmlException: Root MIME part containing infoset not found.
   at System.Xml.XmlMtomReader.ReadRootMimePart()
   at System.Xml.XmlMtomReader.Initialize(Stream stream, String contentType, XmlDictionaryReaderQuotas quotas, Int32 maxBufferSize)
   at System.Xml.XmlMtomReader.SetInput(Stream stream, Encoding[] encodings, String contentType, XmlDictionaryReaderQuotas quotas, Int32 maxBufferSize, OnXmlDictionaryReaderClose onClose)
   at System.ServiceModel.Channels.MtomMessageEncoder.MtomBufferedMessageData.TakeXmlReader()</ExceptionString>
</InnerException>
</Exception>**
</code>```

Note: I'm using multipart/related Content-Type request header as following : multipart/related; boundary=3f9d206f-1054-4731-b737-6e724723832a; start-info="text/xml"; type="application/xop+xml"

In configuration file it really simple wcf service configuration with basicHttpBinding inplace :

```<code><system.serviceModel>
<services>
<service name="BPNotificationWeb.Services.BillerReconcileNotificationService" behaviorConfiguration="ReconcileHttpBindingBehavior">
                <endpoint address="" binding="basicHttpBinding"
                          contract="BPNotificationWeb.Services.IBillerReconcileNotificationService"
                          bindingConfiguration="httpBinding">
                </endpoint>
            </service>
</services>
<bindings>
<basicHttpBinding>
<binding name="httpBinding"  messageEncoding="Mtom" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647"></binding>
</basicHttpBinding>
</bindings>
        <behaviors>
            <serviceBehaviors>
                <behavior name="BillerNotificationHttpBindingBehavior">
                    <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
                    <serviceDebug includeExceptionDetailInFaults="true" />
                </behavior>
            </serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
</code>```

I guess I'm missing something here any suggestions are welcome.

Body:
I have a WCF serivce that receives a soap message from a client, simple post Service Contract that receives message with MTOM file attachment.

[ServiceContract(Namespace = "http://example.com/schema/service/Upload/1.0")]
[XmlSerializerFormat]
public interface IBillerReconcileNotificationService
{
    [OperationContract(Action = "Reconcile")]
    [FaultContract(typeof(BillerNotificationFault))]
    UploadMsgRs Reconcile(UploadMsgRq requestModel);
}

public class BillerReconcileNotificationService : IBillerReconcileNotificationService
{
    public UploadMsgRs Reconcile(UploadMsgRq requestModel)
    {//handling request business}
}

While testing the service by sending a request in postman I always received 400 bad request response, WCF trace log show the following exception :

**<Exception>
<ExceptionType>System.ServiceModel.CommunicationException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
<Message>Error creating a reader for the MTOM message</Message>
<StackTrace>
at System.ServiceModel.Channels.MtomMessageEncoder.MtomBufferedMessageData.TakeXmlReader()
at System.ServiceModel.Channels.BufferedMessageData.GetMessageReader()
at System.ServiceModel.Channels.BufferedMessage..ctor(IBufferedMessageData messageData, RecycledMessageState recycledMessageState, Boolean[] understoodHeaders, Boolean understoodHeadersModified)
at System.ServiceModel.Channels.MtomMessageEncoder.ReadMessage(ArraySegment`1 buffer, BufferManager bufferManager, String contentType)
at System.ServiceModel.Channels.HttpInput.DecodeBufferedMessage(ArraySegment`1 buffer, Stream inputStream)
at System.ServiceModel.Channels.HttpInput.ParseMessageAsyncResult.ContinueReading(Int32 bytesRead)
at System.ServiceModel.Channels.HttpInput.ParseMessageAsyncResult.DecodeBufferedMessageAsync()
at System.ServiceModel.Channels.HttpInput.ParseMessageAsyncResult.BeginParse()
at System.ServiceModel.Channels.HttpInput.BeginParseIncomingMessage(HttpRequestMessage httpRequestMessage, AsyncCallback callback, Object state)
at System.ServiceModel.Channels.HttpPipeline.EmptyHttpPipeline.BeginParseIncomingMessage(AsyncCallback asynCallback, Object state)
at System.ServiceModel.Channels.HttpPipeline.EnqueueMessageAsyncResult..ctor(ReplyChannelAcceptor acceptor, Action dequeuedCallback, HttpPipeline pipeline, AsyncCallback callback, Object state)
at System.ServiceModel.Channels.HttpPipeline.EmptyHttpPipeline.BeginProcessInboundRequest(ReplyChannelAcceptor replyChannelAcceptor, Action dequeuedCallback, AsyncCallback callback, Object state)
at System.ServiceModel.Channels.HttpChannelListener`1.HttpContextReceivedAsyncResult`1.ProcessHttpContextAsync()
at System.ServiceModel.Channels.HttpChannelListener`1.BeginHttpContextReceived(HttpRequestContext context, Action acceptorCallback, AsyncCallback callback, Object state)
at System.ServiceModel.Activation.HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result)
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest()
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest()
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequest(Object state)
at System.ServiceModel.AspNetPartialTrustHelpers.PartialTrustInvoke(ContextCallback callback, Object state)
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequestWithFlow(Object state)
at System.Runtime.IOThreadScheduler.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Runtime.Fx.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
</StackTrace>
<ExceptionString>System.ServiceModel.CommunicationException: Error creating a reader for the MTOM message ---> System.Xml.XmlException: Root MIME part containing infoset not found.
   at System.Xml.XmlMtomReader.ReadRootMimePart()
   at System.Xml.XmlMtomReader.Initialize(Stream stream, String contentType, XmlDictionaryReaderQuotas quotas, Int32 maxBufferSize)
   at System.Xml.XmlMtomReader.SetInput(Stream stream, Encoding[] encodings, String contentType, XmlDictionaryReaderQuotas quotas, Int32 maxBufferSize, OnXmlDictionaryReaderClose onClose)
   at System.ServiceModel.Channels.MtomMessageEncoder.MtomBufferedMessageData.TakeXmlReader()
   --- End of inner exception stack trace ---</ExceptionString>
<InnerException>
<ExceptionType>System.Xml.XmlException, System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
<Message>Root MIME part containing infoset not found.</Message>
<StackTrace>
at System.Xml.XmlMtomReader.ReadRootMimePart()
at System.Xml.XmlMtomReader.Initialize(Stream stream, String contentType, XmlDictionaryReaderQuotas quotas, Int32 maxBufferSize)
at System.Xml.XmlMtomReader.SetInput(Stream stream, Encoding[] encodings, String contentType, XmlDictionaryReaderQuotas quotas, Int32 maxBufferSize, OnXmlDictionaryReaderClose onClose)
at System.ServiceModel.Channels.MtomMessageEncoder.MtomBufferedMessageData.TakeXmlReader()
</StackTrace>
<ExceptionString>System.Xml.XmlException: Root MIME part containing infoset not found.
   at System.Xml.XmlMtomReader.ReadRootMimePart()
   at System.Xml.XmlMtomReader.Initialize(Stream stream, String contentType, XmlDictionaryReaderQuotas quotas, Int32 maxBufferSize)
   at System.Xml.XmlMtomReader.SetInput(Stream stream, Encoding[] encodings, String contentType, XmlDictionaryReaderQuotas quotas, Int32 maxBufferSize, OnXmlDictionaryReaderClose onClose)
   at System.ServiceModel.Channels.MtomMessageEncoder.MtomBufferedMessageData.TakeXmlReader()</ExceptionString>
</InnerException>
</Exception>**

Note: I'm using multipart/related Content-Type request header as following : multipart/related; boundary=3f9d206f-1054-4731-b737-6e724723832a; start-info="text/xml"; type="application/xop+xml"

In configuration file it really simple wcf service configuration with basicHttpBinding inplace :

<system.serviceModel>
<services>
<service name="BPNotificationWeb.Services.BillerReconcileNotificationService" behaviorConfiguration="ReconcileHttpBindingBehavior">
                <endpoint address="" binding="basicHttpBinding"
                          contract="BPNotificationWeb.Services.IBillerReconcileNotificationService"
                          bindingConfiguration="httpBinding">
                </endpoint>
            </service>
</services>
<bindings>
<basicHttpBinding>
<binding name="httpBinding"  messageEncoding="Mtom" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647"></binding>
</basicHttpBinding>
</bindings>
        <behaviors>
            <serviceBehaviors>
                <behavior name="BillerNotificationHttpBindingBehavior">
                    <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
                    <serviceDebug includeExceptionDetailInFaults="true" />
                </behavior>
            </serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>

I guess I'm missing something here any suggestions are welcome.


问:
HOMEBREW PYSIDE2 - It is not recognizable by python
I installed pyside2 through homebrew. It installs python10.

I confirmed that python10 is working bu python3 --version

But i get an error when importing pyside2 in python console.

Is there something that i miss?

many thanks.
m1, osx 12.6.1


问:
Intermittent curl: (28) Failed to connect to XX.XXX.XXX.XX port XXXXX : Connection timed out
I have a service deployed on AWS EKS cluster. The issue is, when I make requests to the service, sometimes I get a response sometimes I get a curl: (28) Failed to connect to 18.134.143.231 port 31969: Connection timed out

More specifically, the issue becomes even more frequence when I add a ```--connect-timeout X''' flag

I have two pods running the service


问:
Show a form as dialog but keep going in the main form
I have a tool that starts and stops services. When a service is being started, I want to show a form that simply shows "Please wait while the service starts". I created a form that has a label and a progress bar in marquee-mode. When that form is shown, I want the main form to be blocked. So I called the please wait form with .ShowDialog. But of course, that stops the main form until the please wait dialog is closed. So I simply used .Show for the please-wait-dialog. So I call this:

```<code>PleaseWaitDialog.Show()
service.Start()
service.WaitForStatus(ServiceControllerStatus.Running)
PleaseWaitDialog.Dispose()
</code>```

However, the PleaseWait dialog is shown but the waiting for the service to start stops the whole GUI so that the progress bar won't show the marquee.

How can I show the PleaseWait-dialog and make the progress bar do the marquee but also keep the program running and waiting for the service to start? I guess it has something to do with multi threading but I am not very familiar with that.

I tried using .ShowDialog which let's the GUI on the please wait form do its thing but that of course stops all other things that should be done while that dialog is shown

Body:
I have a tool that starts and stops services. When a service is being started, I want to show a form that simply shows "Please wait while the service starts". I created a form that has a label and a progress bar in marquee-mode. When that form is shown, I want the main form to be blocked. So I called the please wait form with .ShowDialog. But of course, that stops the main form until the please wait dialog is closed. So I simply used .Show for the please-wait-dialog. So I call this:

PleaseWaitDialog.Show()
service.Start()
service.WaitForStatus(ServiceControllerStatus.Running)
PleaseWaitDialog.Dispose()

However, the PleaseWait dialog is shown but the waiting for the service to start stops the whole GUI so that the progress bar won't show the marquee.

How can I show the PleaseWait-dialog and make the progress bar do the marquee but also keep the program running and waiting for the service to start? I guess it has something to do with multi threading but I am not very familiar with that.

I tried using .ShowDialog which let's the GUI on the please wait form do its thing but that of course stops all other things that should be done while that dialog is shown


问:
Auto Login Script on Android
Recently, I made an auto-login script using Selenium on my Windows for my ISP's page. (I used Firefox's Geckodriver) :
`

```<code>from selenium import webdriver
from time import sleep
from selenium.webdriver.common.by import By
from selenium.webdriver.firefox.options import Options
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException
import warnings

warnings.filterwarnings("ignore")

url = "..."
un = "..."
pwd = "..."

options = Options()
options.binary_location = r"C:\\Program Files\\Mozilla Firefox\\firefox.exe" #my firefox binary was custom installed elsewhere
driver=webdriver.Firefox(executable_path = r'C:\\geckodriver.exe' , options=options)
driver.get(url)
# .get() generally waits for a page to load, but cannot tell why the page is taking time to load
# router login pages generally load within a second
# if they don't, then there is generally a problem with the ISP

delay = 10
print ("A period of 10 seconds will be given for the site to load in case of a slow connection.")
print ("...")
sleep (6)

try:
    WebDriverWait(driver, delay).until(EC.presence_of_element_located((By.ID, 'templatemo_wrapper'))) #common ID b/w log in & logged in page
except TimeoutException:
    print ("Loading took too much time! Maybe your connection is not right")

try :
    driver.find_element(By.NAME, "Username").send_keys(un)
    driver.find_element(By.NAME, "Password").send_keys(pwd)
    driver.find_element(By.ID, "submit_btn").click()
    print("Done Logging In !!!")
    sleep (6)
except NoSuchElementException :
    print ("Already Logged In.")
    sleep (6)
</code>```

My next target is to automate my ISP login page on Android. But I cannot figure out how to do that. I made a simple application using Kivy (since Kivy is based on Python).

```<code>from kivymd.app import MDApp
from kivymd.uix.screen import Screen
from kivymd.uix.dialog import MDDialog
from kivymd.uix.button import MDRoundFlatButton, MDFlatButton
from kivy.lang import Builder

screen_helper = """
Screen:
    BoxLayout:
        orientation:"vertical"
        MDTopAppBar:
            title: "Login App"
            elevation: 5
        MDLabel:
"""

class Loginapp(MDApp):
    def build(self):
        self.theme_cls.primary_palette = "Blue"
        screen = Screen()

        button = MDRoundFlatButton(text="Login", pos_hint={"center_x": 0.5, "center_y": 0.5},
                                   on_release=self.showresult)

        titlebar = Builder.load_string(screen_helper)

        screen.add_widget(button)
        screen.add_widget(titlebar)
        return screen

    def showresult(self, obj):

        #  the connection STATUS would go to the MDDialog(text portion)

        close_btn = MDFlatButton(text="Close", on_release=self.closedialog)
        self.dlg = MDDialog(title="Connection Status :", text = ""
                            size_hint=(0.7, 1), buttons=[close_btn])
        self.dlg.open()

    def closedialog(self, obj):
        self.dlg.dismiss()

Loginapp().run()

</code>```

`
Here are the images of my App :

Login Page of App &

Result Page of App

The problem lies here :
In my Windows script, I had to specify my geckodriver location, my Python version etc. But how do I do that on Android (I use Chrome on Android)? Also, will the packages that worked on Windows work on Android despite using Kivy?

I must specify here that I am currently learning Kivy / Selenium. Really a beginner here.

I could not find any conclusive result on googling :(
Thanks to anyone who helps me out here :)

Title: Auto Login Script on Android

Body:
Recently, I made an auto-login script using Selenium on my Windows for my ISP's page. (I used Firefox's Geckodriver) :
`

from selenium import webdriver
from time import sleep
from selenium.webdriver.common.by import By
from selenium.webdriver.firefox.options import Options
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException
import warnings

warnings.filterwarnings("ignore")

url = "..."
un = "..."
pwd = "..."

options = Options()
options.binary_location = r"C:\\Program Files\\Mozilla Firefox\\firefox.exe" #my firefox binary was custom installed elsewhere
driver=webdriver.Firefox(executable_path = r'C:\\geckodriver.exe' , options=options)
driver.get(url)
# .get() generally waits for a page to load, but cannot tell why the page is taking time to load
# router login pages generally load within a second
# if they don't, then there is generally a problem with the ISP

delay = 10
print ("A period of 10 seconds will be given for the site to load in case of a slow connection.")
print ("...")
sleep (6)

try:
    WebDriverWait(driver, delay).until(EC.presence_of_element_located((By.ID, 'templatemo_wrapper'))) #common ID b/w log in & logged in page
except TimeoutException:
    print ("Loading took too much time! Maybe your connection is not right")

try :
    driver.find_element(By.NAME, "Username").send_keys(un)
    driver.find_element(By.NAME, "Password").send_keys(pwd)
    driver.find_element(By.ID, "submit_btn").click()
    print("Done Logging In !!!")
    sleep (6)
except NoSuchElementException :
    print ("Already Logged In.")
    sleep (6)

My next target is to automate my ISP login page on Android. But I cannot figure out how to do that. I made a simple application using Kivy (since Kivy is based on Python).

from kivymd.app import MDApp
from kivymd.uix.screen import Screen
from kivymd.uix.dialog import MDDialog
from kivymd.uix.button import MDRoundFlatButton, MDFlatButton
from kivy.lang import Builder

screen_helper = """
Screen:
    BoxLayout:
        orientation:"vertical"
        MDTopAppBar:
            title: "Login App"
            elevation: 5
        MDLabel:
"""

class Loginapp(MDApp):
    def build(self):
        self.theme_cls.primary_palette = "Blue"
        screen = Screen()

        button = MDRoundFlatButton(text="Login", pos_hint={"center_x": 0.5, "center_y": 0.5},
                                   on_release=self.showresult)

        titlebar = Builder.load_string(screen_helper)

        screen.add_widget(button)
        screen.add_widget(titlebar)
        return screen

    def showresult(self, obj):

        #  the connection STATUS would go to the MDDialog(text portion)

        close_btn = MDFlatButton(text="Close", on_release=self.closedialog)
        self.dlg = MDDialog(title="Connection Status :", text = ""
                            size_hint=(0.7, 1), buttons=[close_btn])
        self.dlg.open()

    def closedialog(self, obj):
        self.dlg.dismiss()

Loginapp().run()

`
Here are the images of my App :

Login Page of App &

Result Page of App

The problem lies here :
In my Windows script, I had to specify my geckodriver location, my Python version etc. But how do I do that on Android (I use Chrome on Android)? Also, will the packages that worked on Windows work on Android despite using Kivy?

I must specify here that I am currently learning Kivy / Selenium. Really a beginner here.

I could not find any conclusive result on googling :(
Thanks to anyone who helps me out here :)


问:
How to set Month text size in CalendarView
This answer describes how to change text color for Android's CalendarView: https://stackoverflow.com/a/60661903/16250412

I tried to used the same approach to change the text size:

```<code><style name="CustomCalendarMonth" parent="AppTheme">
    <item name="android:textSize">18sp</item>
</style>

<style name="CustomCalendarDay" parent="@android:style/TextAppearance.Medium">
    <item name="android:textSize">18sp</item>
</style>

<style name="CustomCalendarWeek" parent="@android:style/TextAppearance.Medium">
    <item name="android:textSize">18sp</item>
</style>

<CalendarView
    android:id="@+id/calendarView"
    android:theme="@style/CustomCalendarMonth"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:dateTextAppearance="@style/CustomCalendarDay"
    android:weekDayTextAppearance="@style/CustomCalendarWeek" />
</code>```

It works for the day and the week text but not the month. What am I doing wrong?

I did also try "@android:style/TextAppearance.Medium" as the parent for the CustomCalendarMonth but that didn't make a difference.

Body:
This answer describes how to change text color for Android's CalendarView: https://stackoverflow.com/a/60661903/16250412

I tried to used the same approach to change the text size:

<CalendarView
    android:id="@+id/calendarView"
    android:theme="@style/CustomCalendarMonth"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:dateTextAppearance="@style/CustomCalendarDay"
    android:weekDayTextAppearance="@style/CustomCalendarWeek" />

It works for the day and the week text but not the month. What am I doing wrong?

I did also try "@android:style/TextAppearance.Medium" as the parent for the CustomCalendarMonth but that didn't make a difference.


问:
How can we add descriptions to gds reports?
I have a bunch of reports created in data studio.
I would like to add a short description to each report, so users can more easily find which report to use. The description should be visible on the main reports catalog (without needing to open each report).

Is it even possible?

How?

If not, any suggestions for workarounds?

Thanks


问:
C: Making Simple Cash Register
I'd like to make very simple cash register program. I have no idea why my program skips the user input for item2, then it jumped to Quantity2 and Price2, and cash, then the program stop without calculating anything. Please help me. Thanks in advance.

```<code>/*Cash register*/
#include <stdio.h>

int main () {
  char Item1 [10], Item2 [10];
  int Price1, Price2, Quantity1, Quantity2, Cash, Total1, Total2, Subtotal, Tax, Total, Change;
  printf ("Welcome to Sejahtera Electronics Store \n");

  printf ("Please input your items, quantities, and price of each item: \n");
  printf("Item 1: ");
  fgets (Item1, 10, stdin);
  printf("Quantity: ");
  scanf("%i", &Quantity1);
  printf("Price: ");
  scanf("%i", &Price1);
  printf("Item 2: \n");
  fgets (Item2, 10, stdin);
  printf("Quantity: ");
  scanf ("%i", &Quantity2);
  printf("Price: ");
  scanf ("%i", &Price2);
  printf ("Input your cash: $");
  scanf ("%i", Cash);
  Total1=Quantity1*Price1;
  Total2=Quantity2*Price2;
  Subtotal=Total1+Total2;
  Tax=Subtotal*0.1;
  Total=Subtotal+Tax;
  Change=Cash-Total;
  printf ("Subtotal: $%i", &Subtotal);
  printf ("Tax: $%i", &Tax);
  printf ("Total: $%i", &Total);
  printf ("Change: $%i", &Change);
  return 0;
}
</code>```

Output:
Welcome to Sejahtera Electronics Store
Please input your items, quantities, and price of each item:
Item 1: wire
Quantity: 5
Price: 5
**Item 2: ** *the program skip this part so I can only insert the quantity and price for item 2
Quantity: 5
Price: 5
Input your cash: $50000 *program stops here, it supposed to calculate the subtotal, tax, total, and change

Title: C: Making Simple Cash Register

Body:
I'd like to make very simple cash register program. I have no idea why my program skips the user input for item2, then it jumped to Quantity2 and Price2, and cash, then the program stop without calculating anything. Please help me. Thanks in advance.

/*Cash register*/
#include <stdio.h>

int main () {
  char Item1 [10], Item2 [10];
  int Price1, Price2, Quantity1, Quantity2, Cash, Total1, Total2, Subtotal, Tax, Total, Change;
  printf ("Welcome to Sejahtera Electronics Store \n");

  printf ("Please input your items, quantities, and price of each item: \n");
  printf("Item 1: ");
  fgets (Item1, 10, stdin);
  printf("Quantity: ");
  scanf("%i", &Quantity1);
  printf("Price: ");
  scanf("%i", &Price1);
  printf("Item 2: \n");
  fgets (Item2, 10, stdin);
  printf("Quantity: ");
  scanf ("%i", &Quantity2);
  printf("Price: ");
  scanf ("%i", &Price2);
  printf ("Input your cash: $");
  scanf ("%i", Cash);
  Total1=Quantity1*Price1;
  Total2=Quantity2*Price2;
  Subtotal=Total1+Total2;
  Tax=Subtotal*0.1;
  Total=Subtotal+Tax;
  Change=Cash-Total;
  printf ("Subtotal: $%i", &Subtotal);
  printf ("Tax: $%i", &Tax);
  printf ("Total: $%i", &Total);
  printf ("Change: $%i", &Change);
  return 0;
}

Output:
Welcome to Sejahtera Electronics Store
Please input your items, quantities, and price of each item:
Item 1: wire
Quantity: 5
Price: 5
**Item 2: ** *the program skip this part so I can only insert the quantity and price for item 2
Quantity: 5
Price: 5
Input your cash: $50000 *program stops here, it supposed to calculate the subtotal, tax, total, and change


问:
Android NavGraph Circular Include
I have two separate navGraph.

The functionalitiy is the following:

By default the user arrives at navGraph A and then he/she can move to navGraph B by pressing a button.

But with a push notification the user's screen opens up with navGraph B and if the user presses the back button the navGraph A should appears keeping the consistency.

It causes a circular include in my opinion.

navGraph A includes navGraph B

navGraph B includes navGraph A

Title: Android NavGraph Circular Include


问:
How to generate table grid dynamically using JSON data in Nintex workflow cloud responsive form
How to generate table grid dynamically and display in the responsive form with respect to the query response which contains JSON data (array of object) ?