问:
Is it possible to Build & Publish a DotNet3.1 function app on DotNet6.0
I'm building and publishing a function app written in.Net6.0 using a DotNet6.0 docker image and a GitLab-CI pipeline. Will the same DotNet6.0 image support building & publishing similar/same function app developed in DotNet3.1 .

Please let me know whether any ways are there to make the Build & Publish of DotNet3.1 function-app with a DOtNet6.0, to make the pipeline backward compatible.


来源: stackexchange

问:
How can I capture the git branch name in Azure DevOps release name?
I'm trying to implement CI/CD for our database changes. I'm trying to capture the git branch name in the Azure DevOps pipeline release name.

I've tried using System.PullRequest.SourceBranch & Build.PullRequest.TargetBranchName but these haven't worked.

Build.SourceBranch only displays the base branch develop, so that isn't going to work. Build.SourceVersionMessage does work if I manually add a note. I can't remember at what step, I think when I confirm the merge of the PR branch. But that's another manual step that I really don't want.

So I'm just wanting the name of the branch that is named based on the task number that we create, steps we take:

I create a new branch with the task number and publish

I add the SQL file that is to be deployed to GitHub and commit the change

I create a pull request and merge

This automatically kicks off the pipeline

I delete the branch that was created

Right now we only build off the base branch, develop. Something about branch protection and consolidation. I don't think our git process is going to change.

ContentLicense: CC BY-SA 4.0


问:
Blog's Index/ main page automatically scrolls to top when click back after visiting a post/page in NEXTJS
I have setup an application  using a startup created by NEXTJS version 13 and sanity.io v3. The blog application is amazingly fast but the problem is that when I (or possibly any other user) clicks and visit a post, and then goes back to main page (i.e. index page) , the index automatically scroll to top instead of staying at same position where user left it.

The link of the demo application is here. please visit and check how this problem can be solved out.

https://sanity-tech-blog.vercel.app/

Please spend  some precious time to solve it out.

The startup that is used is here

https://vercel.com/templates/next.js/blog-nextjs-sanity


问:
Is there any way to add column separator in @silevis/reactgrid
I'm trying to add column separator for couple columns.

Only working option I found is to add separate column without any data, but library doesn't allow me to make it width lower than 40px. This value is to big for my application and looks weird. Second option I've tried was adding border-right to the cell, but this also looks weird. Is there any other was to add separator for columns out of the box?


问:
How does android recognize an application between builds from different workstations?
I am developing an Ionic application which runs fine but is not totally recognized as the same application when built on another workstation.

Both workstations are using the same environment (Ubuntu, Visual Studio Code, ...) and are accessing the same git repo. When I am working on the same station, android recognizes the application and keeps its data and authorizations between different builds, but when I switch between the two stations and build the app again the new build replaces the previous one but its data and authorizations are lost.

Since I am relying on the same git repo, the config files (AndroidManifest.xml, capacitor.config.ts and friends) are identical and I wonder where android does find a difference (and how I fix that)...


问:
How to send traces from rust + tracing_opentelemetry to Honeycomb?
I've set up a basic subscriber for Rust tracing with OpenTelemetry as follows:

let rust_log = dotenv::var("RUST_LOG").unwrap();
if rust_log == "OTEL" {
    // Use OpenTelemetry subscriber
    let tracer = stdout::new_pipeline().install_simple();
    let telemetry = tracing_opentelemetry::layer().with_tracer(tracer);
    let otel_subscriber = tracing_subscriber::Registry::default().with(telemetry);
    tracing::subscriber::set_global_default(otel_subscriber).unwrap();
} else {
    // Revert to what is specified in `RUST_LOG`
    tracing_subscriber::fmt::init();
}
```

I would now like to change this subscriber to send batched data to Honeycomb. The problem is the official Honeycomb documentation (https://docs.honeycomb.io/getting-data-in/opentelemetry-overview/#using-the-honeycomb-opentelemetry-endpoint) suggests using opentelemetry-otlp, which in turn requires running and maintaining a separate "collector service" (https://crates.io/crates/opentelemetry-otlp).

I would like to do this without running a separate collector service. My understanding is that I should be able to directly send logs to Honeycomb without running an intermediary service to do so. Is this viable?

Body:
I've set up a basic subscriber for Rust tracing with OpenTelemetry as follows:

let rust_log = dotenv::var("RUST_LOG").unwrap();
if rust_log == "OTEL" {
    // Use OpenTelemetry subscriber
    let tracer = stdout::new_pipeline().install_simple();
    let telemetry = tracing_opentelemetry::layer().with_tracer(tracer);
    let otel_subscriber = tracing_subscriber::Registry::default().with(telemetry);
    tracing::subscriber::set_global_default(otel_subscriber).unwrap();
} else {
    // Revert to what is specified in `RUST_LOG`
    tracing_subscriber::fmt::init();
}

I would now like to change this subscriber to send batched data to Honeycomb. The problem is the official Honeycomb documentation (https://docs.honeycomb.io/getting-data-in/opentelemetry-overview/#using-the-honeycomb-opentelemetry-endpoint) suggests using opentelemetry-otlp, which in turn requires running and maintaining a separate "collector service" (https://crates.io/crates/opentelemetry-otlp).

I would like to do this without running a separate collector service. My understanding is that I should be able to directly send logs to Honeycomb without running an intermediary service to do so. Is this viable?


问:
Tools for optimizing Shared LIbraries (.so) for ARM32 and ARM64
Is there any possibility to take .so and run it through tool which can optimize further that code for runtime?</p>


问:
Cordova browser app doesn't recognize cordova.plugins.backgroundMode
I'm making a cordova app and I included the background mode plugin, then i used the line cordova.plugins.backgroundMode according to the official documentation and the app doesn't recognize it. Yes I've included cordova.js before app.js, yes I'm sure the plugin is properly installed since it didn't give any error message while installing it, it appears in the plugin list and I reinstalled it with multiple versions and not a single one works. One thing I found weird is that npm didn't add this plugin to config.xml. Can anyone help with this?

I tried reinstalling the plugin, tried just calling backgroundMode, tried using it on an android phone but it doesn't work.


问:
AWS S3 SDK Javascript - MalformedXML response when trying to restore a file
I have been uploading and restoring files from S3 Glacier & Deep Archive, and I wanted to add  a feature that would make a copy the restored file with another prefix ("_restoreComplete"). According to the docs, this would be pretty simple: by adding OutputLocation to the params object sent with restoreObject().

My params looks like this:

```<code>let restoreParams = {
    Bucket: "bucketExample",
    Key: "file.txt",
    RestoreRequest: {
        Days: 1,
        GlacierJobParameters: {
            Tier: "Standard"
        },

        OutputLocation: {
            S3: {
                BucketName: "bucketExample",
                Prefix: "_restoreComplete"
            }
        }
    }
};
</code>```

However, calling restoreObject with these params throws a MalformedXML exception:

MalformedXML: The XML you provided was not well-formed or did not validate against our published schema

I have looked around and found no viable solution. I saw a mention to add ExposedHeaders to the bucket's CORS config, but that didn't do a dent.

Any ideas on how to solve this issue? Thank you in advance!

PS: Please note that restoring files with the same params object (without OutputLocation) works perfectly.

Body:
I have been uploading and restoring files from S3 Glacier & Deep Archive, and I wanted to add  a feature that would make a copy the restored file with another prefix ("_restoreComplete"). According to the docs, this would be pretty simple: by adding OutputLocation to the params object sent with restoreObject().

My params looks like this:

let restoreParams = {
    Bucket: "bucketExample",
    Key: "file.txt",
    RestoreRequest: {
        Days: 1,
        GlacierJobParameters: {
            Tier: "Standard"
        },

        OutputLocation: {
            S3: {
                BucketName: "bucketExample",
                Prefix: "_restoreComplete"
            }
        }
    }
};

However, calling restoreObject with these params throws a MalformedXML exception:

MalformedXML: The XML you provided was not well-formed or did not validate against our published schema

I have looked around and found no viable solution. I saw a mention to add ExposedHeaders to the bucket's CORS config, but that didn't do a dent.

Any ideas on how to solve this issue? Thank you in advance!

PS: Please note that restoring files with the same params object (without OutputLocation) works perfectly.


问:
Listen to XRPL payments: Google Cloud Run container failed to start and listen to the port
I have an XRP wallet and I'm trying to monitor incoming payments to this address with WebSockets.

My code works fine locally.
After I subscribed to the wallet address, I simply listen to "transaction" events and get the details about the payments made to that address.

But, I need it to run 24/7 on the cloud. Nothing heavy is here. It is simply a single connection running forever.
The problem is, when I deploy my code to Google Cloud Run, I get the following error:

The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable.

So here is my question:
Given that I'm listening to "transactions" via wss://xrplcluster.com/ (with no ports), how should I modify my code to resolve the Cloud Run complain.

Here you are my code and thanks in advance.

import { Client } from 'xrpl';
const client = new Client("wss://xrplcluster.com/");

async function main() {
  await client.connect();

  const response = await client.request({
    command: "subscribe",
    accounts: ["my-wallet-address"]
  })

  client.on("transaction", tx => {
    if (tx.validated) {
      const transaction = {
        amount: tx.transaction.Amount,
        from: tx.transaction.Account,
      };
      console.log(transaction);
    }
  });

  client.on("disconnected", async code => {
    console.log(`The wss client is disconnected with code: ${code}`);
    await client.connect();
  });
}

main();

```


问:
I am not getting a “Build failed” rule trigger in Jira for Gitlab pipelines with jobs on “push”
I am running a Jira Cloud instance that is integrated with a Gitlab Cloud (SaaS, no paid subscription) repo using the official tools. I have successfully created several automation rules in Jira, so both apps are well configured and connected, but there is one rule that is not working, it is not being triggered

My goal is to detect in Jira when the pipeline fails in order to change the ticket status

My desired flow is

User creates Merge Request
1.1 Jira detects this event and changes ticket status
1.2 Pipeline is run for $CI_PIPELINE_SOURCE == 'merge_request_event' jobs
1.3 Pipeline finishes (uses feature branch)
1.4 Jira detects failed status and changes ticket status

User merges the MR
2.1 Jira detects this event and changes ticket status
2-2 Pipeline is run for $CI_COMMIT_BRANCH == 'main' && $CI_PIPELINE_SOURCE == 'push' jobs
2.3 Pipeline finishes (uses main branch after the merge)
2.4 Jira detects failed status and changes ticket status
This flow is working except for the last step. I have created the Jira rule for it but the rule is not being triggered. Since the rule trigger is cloned from the 1.4 rule, I am assuming that the problem is that the integration is failing, Gitlab is not publishing the event

This is my .gitlab-ci.yml file

```<code>stages:          # List of stages for jobs, and their order of execution
  - build
  - deploy

build-job:    # This job runs the build stage, which runs on Merge Request creation.
  stage: build
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
  script:
    - echo "Compiling the code..."
    - echo "Compile complete."

deploy-job:   # This job runs the deploy stage, which runs on Merge into Main branch.
  stage: deploy
  rules:
    - if: $CI_COMMIT_BRANCH == 'main' && $CI_PIPELINE_SOURCE == 'push'
  script:
    - echo "Deploying the code..."
    - echo "Deploy complete."
    - fakecommand
</code>```

That fakecommand is on purpose for forcing the pipeline to fail

I created a rule for logging all build state changes.

You can see in the screenshot that all status changed are being detected but the last one (successful to failed)

Should I modified my pipeline? Should I use another rule trigger in Jira? As you can guess, my goal is to have feedback on the main branch performance after the merge is completed.

Body:
I am running a Jira Cloud instance that is integrated with a Gitlab Cloud (SaaS, no paid subscription) repo using the official tools. I have successfully created several automation rules in Jira, so both apps are well configured and connected, but there is one rule that is not working, it is not being triggered

My goal is to detect in Jira when the pipeline fails in order to change the ticket status

My desired flow is

User creates Merge Request
1.1 Jira detects this event and changes ticket status
1.2 Pipeline is run for $CI_PIPELINE_SOURCE == 'merge_request_event' jobs
1.3 Pipeline finishes (uses feature branch)
1.4 Jira detects failed status and changes ticket status

User merges the MR
2.1 Jira detects this event and changes ticket status
2-2 Pipeline is run for $CI_COMMIT_BRANCH == 'main' && $CI_PIPELINE_SOURCE == 'push' jobs
2.3 Pipeline finishes (uses main branch after the merge)
2.4 Jira detects failed status and changes ticket status
This flow is working except for the last step. I have created the Jira rule for it but the rule is not being triggered. Since the rule trigger is cloned from the 1.4 rule, I am assuming that the problem is that the integration is failing, Gitlab is not publishing the event

This is my .gitlab-ci.yml file

stages:          # List of stages for jobs, and their order of execution
  - build
  - deploy

build-job:    # This job runs the build stage, which runs on Merge Request creation.
  stage: build
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
  script:
    - echo "Compiling the code..."
    - echo "Compile complete."

deploy-job:   # This job runs the deploy stage, which runs on Merge into Main branch.
  stage: deploy
  rules:
    - if: $CI_COMMIT_BRANCH == 'main' && $CI_PIPELINE_SOURCE == 'push'
  script:
    - echo "Deploying the code..."
    - echo "Deploy complete."
    - fakecommand

That fakecommand is on purpose for forcing the pipeline to fail

I created a rule for logging all build state changes.

You can see in the screenshot that all status changed are being detected but the last one (successful to failed)

Should I modified my pipeline? Should I use another rule trigger in Jira? As you can guess, my goal is to have feedback on the main branch performance after the merge is completed.


问:
Checkbox or dropdown with Plotly.JS?
I know that Dash provides checkboxes / dropdowns (via dcc, Dash Core Components, see https://dash.plotly.com/dash-core-components).

But how to create a checkbox in the context of a pure Plotly.JS plot, without dash?

Title: Checkbox or dropdown with Plotly.JS?


问:
Connect Power BI to a SAS Dataset located on a network drive
I am a new user to Power BI desktop.  I have been able to connect Power BI to multiple different data sources without a problem.  I have not been able to figure out how to connect Power BI to a SAS dataset that is located on a network drive?  Is there way to do this?</p>


问:
AWS Amplify build failed non-zero exit code detected
My React app has always built without a problem with AWS Amplify until recently where it keeps failing. I have tried every solution I could find online to no avail. Would anybody know a fix to this? Here is the error log:

```<code>2023-01-03T15:16:12.248Z [INFO]: # Cloning repository: git@github.com:othmanez314/inket.git
2023-01-03T15:16:13.956Z [INFO]:
2023-01-03T15:16:13.959Z [INFO]: Cloning into 'inket'...
2023-01-03T15:16:13.959Z [INFO]: # Checking for Git submodules at: /codebuild/output/src695397835/src/inket/.gitmodules
2023-01-03T15:16:13.967Z [INFO]: # Retrieving environment cache...
2023-01-03T15:16:14.014Z [WARNING]: ! Unable to write cache: {"code":"ERR_BAD_REQUEST","message":"Request failed with status code 404"})}
2023-01-03T15:16:14.015Z [INFO]: ---- Setting Up SSM Secrets ----
2023-01-03T15:16:14.015Z [INFO]: SSM params {"Path":"/amplify/d3exa9gu4x1ian/main/","WithDecryption":true}
2023-01-03T15:16:14.074Z [INFO]: # Defaulting to Node version 16
2023-01-03T15:16:25.232Z [INFO]: # Node version 16 is available for installation
2023-01-03T15:16:25.318Z [INFO]: # Installing Node version 16
2023-01-03T15:16:32.947Z [INFO]: # Now using Node version 16
2023-01-03T15:16:33.069Z [INFO]: No live updates for this build run
2023-01-03T15:16:33.075Z [INFO]: # Retrieving cache...
2023-01-03T15:16:33.116Z [INFO]: # Retrieved cache
2023-01-03T15:17:18.783Z [INFO]: ## Starting Backend Build
                                 ## Checking for associated backend environment...
                                 ## No backend environment association found, continuing...
                                 ## Completed Backend Build
2023-01-03T15:17:18.785Z [INFO]: {"backendDuration": 0}
                                 ## Starting Frontend Build
                                 # Starting phase: preBuild
                                 # Executing command: npm ci
2023-01-03T15:17:20.970Z [WARNING]: npm ERR! code
2023-01-03T15:17:20.970Z [WARNING]: ERESOLVE
2023-01-03T15:17:20.973Z [WARNING]: npm
2023-01-03T15:17:20.973Z [WARNING]: ERR! ERESOLVE could not resolve
                                    npm
2023-01-03T15:17:20.973Z [WARNING]: ERR!
                                    npm ERR! While resolving: @material-ui/core@4.12.4
                                    npm ERR! Found: react@18.2.0
                                    npm ERR!
2023-01-03T15:17:20.973Z [WARNING]: node_modules/react
                                    npm ERR!   react@"^18.2.0" from the root project
                                    npm ERR!   peer react@">=16.8.0" from @emotion/react@11.10.5
                                    npm ERR!   node_modules/@emotion/react
                                    npm ERR!     @emotion/react@"^11.10.5" from the root project
                                    npm ERR!     peer @emotion/react@"^11.0.0-rc.0" from @emotion/styled@11.10.5
                                    npm ERR!     node_modules/@emotion/styled
                                    npm ERR!       @emotion/styled@"^11.10.5" from the root project
                                    npm
2023-01-03T15:17:20.973Z [WARNING]: ERR!       3 more (@mui/material, @mui/styled-engine, @mui/system)
                                    npm ERR!     3 more (@mui/material, @mui/styled-engine, @mui/system)
                                    npm ERR!   15 more (@emotion/styled, ...)
                                    npm ERR!
                                    npm ERR! Could not resolve dependency:
                                    npm ERR! peer react@"^16.8.0 || ^17.0.0" from @material-ui/core@4.12.4
                                    npm ERR! node_modules/@material-ui/core
                                    npm ERR!   @material-ui/core@"^4.12.4" from the root project
                                    npm ERR!   peer @material-ui/core@"^4.0.0" from @material-ui/icons@4.11.3
                                    npm ERR!   node_modules/@material-ui/icons
                                    npm ERR!     @material-ui/icons@"^4.11.3" from the root project
                                    npm ERR!
                                    npm ERR! Conflicting peer dependency: react@17.0.2
                                    npm
2023-01-03T15:17:20.974Z [WARNING]: ERR! node_modules/react
                                    npm ERR!   peer react@"^16.8.0 || ^17.0.0" from @material-ui/core@4.12.4
                                    npm ERR!   node_modules/@material-ui/core
                                    npm ERR!     @material-ui/core@"^4.12.4" from the root project
                                    npm ERR!     peer @material-ui/core@"^4.0.0" from @material-ui/icons@4.11.3
                                    npm ERR!     node_modules/@material-ui/icons
                                    npm ERR!       @material-ui/icons@"^4.11.3" from the root project
                                    npm ERR!
                                    npm ERR! Fix the upstream dependency conflict, or retry
                                    npm ERR! this command with --force, or --legacy-peer-deps
                                    npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
                                    npm ERR!
                                    npm ERR! See /root/.npm/eresolve-report.txt for a full report.
2023-01-03T15:17:20.975Z [WARNING]:
2023-01-03T15:17:20.975Z [WARNING]: npm ERR! A complete log of this run can be found in:
                                    npm ERR!     /root/.npm/_logs/2023-01-03T15_17_19_007Z-debug-0.log
2023-01-03T15:17:20.980Z [ERROR]: !!! Build failed
2023-01-03T15:17:20.981Z [ERROR]: !!! Non-Zero Exit Code detected
2023-01-03T15:17:20.981Z [INFO]: # Starting environment caching...
2023-01-03T15:17:20.981Z [INFO]: # Environment caching completed
Terminating logging...

</code>```

I tried adding a service role, reconnecting my Github repo, and adding the Amplify.yaml file to the root directory of my repo but it didn't work.

Body:
My React app has always built without a problem with AWS Amplify until recently where it keeps failing. I have tried every solution I could find online to no avail. Would anybody know a fix to this? Here is the error log:

2023-01-03T15:16:12.248Z [INFO]: # Cloning repository: git@github.com:othmanez314/inket.git
2023-01-03T15:16:13.956Z [INFO]:
2023-01-03T15:16:13.959Z [INFO]: Cloning into 'inket'...
2023-01-03T15:16:13.959Z [INFO]: # Checking for Git submodules at: /codebuild/output/src695397835/src/inket/.gitmodules
2023-01-03T15:16:13.967Z [INFO]: # Retrieving environment cache...
2023-01-03T15:16:14.014Z [WARNING]: ! Unable to write cache: {"code":"ERR_BAD_REQUEST","message":"Request failed with status code 404"})}
2023-01-03T15:16:14.015Z [INFO]: ---- Setting Up SSM Secrets ----
2023-01-03T15:16:14.015Z [INFO]: SSM params {"Path":"/amplify/d3exa9gu4x1ian/main/","WithDecryption":true}
2023-01-03T15:16:14.074Z [INFO]: # Defaulting to Node version 16
2023-01-03T15:16:25.232Z [INFO]: # Node version 16 is available for installation
2023-01-03T15:16:25.318Z [INFO]: # Installing Node version 16
2023-01-03T15:16:32.947Z [INFO]: # Now using Node version 16
2023-01-03T15:16:33.069Z [INFO]: No live updates for this build run
2023-01-03T15:16:33.075Z [INFO]: # Retrieving cache...
2023-01-03T15:16:33.116Z [INFO]: # Retrieved cache
2023-01-03T15:17:18.783Z [INFO]: ## Starting Backend Build
                                 ## Checking for associated backend environment...
                                 ## No backend environment association found, continuing...
                                 ## Completed Backend Build
2023-01-03T15:17:18.785Z [INFO]: {"backendDuration": 0}
                                 ## Starting Frontend Build
                                 # Starting phase: preBuild
                                 # Executing command: npm ci
2023-01-03T15:17:20.970Z [WARNING]: npm ERR! code
2023-01-03T15:17:20.970Z [WARNING]: ERESOLVE
2023-01-03T15:17:20.973Z [WARNING]: npm
2023-01-03T15:17:20.973Z [WARNING]: ERR! ERESOLVE could not resolve
                                    npm
2023-01-03T15:17:20.973Z [WARNING]: ERR!
                                    npm ERR! While resolving: @material-ui/core@4.12.4
                                    npm ERR! Found: react@18.2.0
                                    npm ERR!
2023-01-03T15:17:20.973Z [WARNING]: node_modules/react
                                    npm ERR!   react@"^18.2.0" from the root project
                                    npm ERR!   peer react@">=16.8.0" from @emotion/react@11.10.5
                                    npm ERR!   node_modules/@emotion/react
                                    npm ERR!     @emotion/react@"^11.10.5" from the root project
                                    npm ERR!     peer @emotion/react@"^11.0.0-rc.0" from @emotion/styled@11.10.5
                                    npm ERR!     node_modules/@emotion/styled
                                    npm ERR!       @emotion/styled@"^11.10.5" from the root project
                                    npm
2023-01-03T15:17:20.973Z [WARNING]: ERR!       3 more (@mui/material, @mui/styled-engine, @mui/system)
                                    npm ERR!     3 more (@mui/material, @mui/styled-engine, @mui/system)
                                    npm ERR!   15 more (@emotion/styled, ...)
                                    npm ERR!
                                    npm ERR! Could not resolve dependency:
                                    npm ERR! peer react@"^16.8.0 || ^17.0.0" from @material-ui/core@4.12.4
                                    npm ERR! node_modules/@material-ui/core
                                    npm ERR!   @material-ui/core@"^4.12.4" from the root project
                                    npm ERR!   peer @material-ui/core@"^4.0.0" from @material-ui/icons@4.11.3
                                    npm ERR!   node_modules/@material-ui/icons
                                    npm ERR!     @material-ui/icons@"^4.11.3" from the root project
                                    npm ERR!
                                    npm ERR! Conflicting peer dependency: react@17.0.2
                                    npm
2023-01-03T15:17:20.974Z [WARNING]: ERR! node_modules/react
                                    npm ERR!   peer react@"^16.8.0 || ^17.0.0" from @material-ui/core@4.12.4
                                    npm ERR!   node_modules/@material-ui/core
                                    npm ERR!     @material-ui/core@"^4.12.4" from the root project
                                    npm ERR!     peer @material-ui/core@"^4.0.0" from @material-ui/icons@4.11.3
                                    npm ERR!     node_modules/@material-ui/icons
                                    npm ERR!       @material-ui/icons@"^4.11.3" from the root project
                                    npm ERR!
                                    npm ERR! Fix the upstream dependency conflict, or retry
                                    npm ERR! this command with --force, or --legacy-peer-deps
                                    npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
                                    npm ERR!
                                    npm ERR! See /root/.npm/eresolve-report.txt for a full report.
2023-01-03T15:17:20.975Z [WARNING]:
2023-01-03T15:17:20.975Z [WARNING]: npm ERR! A complete log of this run can be found in:
                                    npm ERR!     /root/.npm/_logs/2023-01-03T15_17_19_007Z-debug-0.log
2023-01-03T15:17:20.980Z [ERROR]: !!! Build failed
2023-01-03T15:17:20.981Z [ERROR]: !!! Non-Zero Exit Code detected
2023-01-03T15:17:20.981Z [INFO]: # Starting environment caching...
2023-01-03T15:17:20.981Z [INFO]: # Environment caching completed
Terminating logging...

I tried adding a service role, reconnecting my Github repo, and adding the Amplify.yaml file to the root directory of my repo but it didn't work.


问:
How to load a DLL from a different folder?
I'm using several large Third Party DLLs that I would like to place in a separate folder from the main application and load them from there at runtime. These DLLs are over 5GB in size all together (mainly PyTorch C++). I have several versions of my application installed, all using the same version of the Third Party DLLs, so I would like to save both disk space and installation time.

My application has several processes that use these DLLs, some are Managed (C# .NET) and some are Native C++.
I have an unmanaged DLL that uses the large DLLs, and this unmanaged DLL is used in a managed application using C++ Managed.
I also have a native application that uses the large DLLs directly.

I tried using AddDllDirectory by adding a DllMain to my unmanaged DLL, but when running the application I got the missing DLL error before the DllMain was called.
When I used AddDllDirectory from managed code at the startup of the application it worked.
But this means I need to use AddDllDirectory in the startup of every process I run, instead of just in one place.
This solution is also not working for the native application. I tried using AddDllDirectory in the main of the native application, but again I got the missing DLL error before I got to the main.

I tried using Delay Load, but that also didn't work. I could see that the large DLLs are marked as delay load by using DumpBin, but when I ran the native application I got the missing DLL error again. I tried to implement a Failure Hook but it wasn't called.

What am I doing wrong?


问:
How do I get an Environment Variable in C# that was set in GitHub Codespaces?
I am using .NET Core 7.

I have set an environment variable in Github Codespaces using the settings secret:
https://github.com/settings/codespaces

When I try to get it out using C# it is blank because code spaces is not using windows:

```<code>string result = Environment.GetEnvironmentVariable("GOLD");
</code>```

How do I get the secret in C#?

Body:
I am using .NET Core 7.

I have set an environment variable in Github Codespaces using the settings secret:
https://github.com/settings/codespaces

When I try to get it out using C# it is blank because code spaces is not using windows:

string result = Environment.GetEnvironmentVariable("GOLD");

How do I get the secret in C#?


问:
Ngx slider flicker issue
In angular ngx- slider library getting flicker issue , it's continuously moving and not fit exact value.

I tried to change version but still getting flicker issue

Title: Ngx slider flicker issue


问:
What's the difference between xargs and xargs bash -c "<command>"
I was trying to delete azure resource groups, testing with [0].name before applying to all with [].name.

Fail Input

az group list --query "[0].name" -o tsv  | xargs -tn 1 az group delete --no-wait -n $0 -y

Fail Output

```<code>az group delete --no-wait -n /bin/zsh -y NetworkWatcherRG
unrecognized arguments: NetworkWatcherRG
</code>```

Success input

az group list --query "[0].name" -o tsv  | xargs -tn 1 bash -c 'az group delete --no-wait -n $0 -y'

Success output

bash -c az group delete --no-wait -n $0 -y NetworkWatcherRG

Questions

Why does the fail output substitute /bin/zsh in place of $0 when I expected the resource group name to be substituted? I'm using zsh

Why does the success output put NetworkWatcherRG at the end of the command when i expected it to substitute $0? (Since echo $0 will output NetworkWatcherRG)

What's the difference between xargs and xargs bash -c "<command>"? Does this difference still apply if i'm using bash from the get-go instead of zsh?

Body:
I was trying to delete azure resource groups, testing with [0].name before applying to all with [].name.

Fail Input

az group list --query "[0].name" -o tsv  | xargs -tn 1 az group delete --no-wait -n $0 -y

Fail Output

az group delete --no-wait -n /bin/zsh -y NetworkWatcherRG
unrecognized arguments: NetworkWatcherRG

Success input

az group list --query "[0].name" -o tsv  | xargs -tn 1 bash -c 'az group delete --no-wait -n $0 -y'

Success output

bash -c az group delete --no-wait -n $0 -y NetworkWatcherRG

Questions

Why does the fail output substitute /bin/zsh in place of $0 when I expected the resource group name to be substituted? I'm using zsh

Why does the success output put NetworkWatcherRG at the end of the command when i expected it to substitute $0? (Since echo $0 will output NetworkWatcherRG)

What's the difference between xargs and xargs bash -c "<command>"? Does this difference still apply if i'm using bash from the get-go instead of zsh?


问:
Teamcity reporting tests two times ( default surefire report and juni XML report)
I am using teamcity to execute some automated test using maven.

I have configured junit XML report processing in the build feature, in the test tab now I see results from both junit report and default surefire report.
How to disable these default surefire report or point teamcity to use junit reports.

I tried removing the surefire reports in the artifacts path but somehow teamcity still picks it up and show the test count on test tab of teamcity


Title: Error in maple to solve two equations and two unknowns

Body:
I have two equations and two unknowns. When I run it in Maple, the error I added in the picture below is displayed. What should I do to fix this error? Do you know the reason for this, please?

This is the Maple code

restart;
ns := (-18*(1/6 + xi)*(n^3 + 4/3*n^2 - 3508*n - 16)*exp(4*RootOf(120*n - 3*n*ln(4 + n*exp(_Z) - 4*exp(_Z)) + 3*_Z*n - 480 - 12*_Z)) + ((18*n^3 - 24*n^2 - 189144*n - 1152)*xi - 14*n^2 - 20952*n - 240)*exp(3*RootOf(120*n - 3*n*ln(4 + n*exp(_Z) - 4*exp(_Z)) + 3*_Z*n - 480 - 12*_Z)) + ((48*n^2 + 188856*n + 1728)*xi + 10428*n + 336)*exp(2*RootOf(120*n - 3*n*ln(4 + n*exp(_Z) - 4*exp(_Z)) + 3*_Z*n - 480 - 12*_Z)) + (-144 + (-62856*n - 1152)*xi)*exp(RootOf(120*n - 3*n*ln(4 + n*exp(_Z) - 4*exp(_Z)) + 3*_Z*n - 480 - 12*_Z)) + 288*xi)/(36*(-1 + exp(RootOf(120*n - 3*n*ln(4 + n*exp(_Z) - 4*exp(_Z)) + 3*_Z*n - 480 - 12*_Z)))^2*(4 + exp(RootOf(120*n - 3*n*ln(4 + n*exp(_Z) - 4*exp(_Z)) + 3*_Z*n - 480 - 12*_Z))*n - 4*exp(RootOf(120*n - 3*n*ln(4 + n*exp(_Z) - 4*exp(_Z)) + 3*_Z*n - 480 - 12*_Z)))*(6*exp(RootOf(120*n - 3*n*ln(4 + n*exp(_Z) - 4*exp(_Z)) + 3*_Z*n - 480 - 12*_Z))*xi + exp(RootOf(120*n - 3*n*ln(4 + n*exp(_Z) - 4*exp(_Z)) + 3*_Z*n - 480 - 12*_Z)) - 6*xi));

r := 32*(6*xi - 6*exp(RootOf(120*n - 3*n*ln(4 + n*exp(_Z) - 4*exp(_Z)) + 3*_Z*n - 480 - 12*_Z))*xi - exp(RootOf(120*n - 3*n*ln(4 + n*exp(_Z) - 4*exp(_Z)) + 3*_Z*n - 480 - 12*_Z)))*(4 + exp(RootOf(120*n - 3*n*ln(4 + n*exp(_Z) - 4*exp(_Z)) + 3*_Z*n - 480 - 12*_Z))*n - 4*exp(RootOf(120*n - 3*n*ln(4 + n*exp(_Z) - 4*exp(_Z)) + 3*_Z*n - 480 - 12*_Z)))^2/(xi*(1 - exp(RootOf(120*n - 3*n*ln(4 + n*exp(_Z) - 4*exp(_Z)) + 3*_Z*n - 480 - 12*_Z)))*(16 + exp(RootOf(120*n - 3*n*ln(4 + n*exp(_Z) - 4*exp(_Z)) + 3*_Z*n - 480 - 12*_Z))*n - 16*exp(RootOf(120*n - 3*n*ln(4 + n*exp(_Z) - 4*exp(_Z)) + 3*_Z*n - 480 - 12*_Z)))^2);

solve([0.9605 <= ns and ns <= 0.9693, 0 < r and r < 0.056], {n, xi});

Like solve or fsolve does not answer.

here is the link to a picture of my work:error in maple


问:
can we add 1 template to 2 view?
i wonder if i can add 1 template like art_detail.html into 2 views template_name
if so objectcontains which ones data?
unfortunately i got a problem with adding comment to posts ,i asked it in reddit but since got 0answer i would be pleased if you answer it:https://www.reddit.com/r/learnpython/comments/1029qyk/why_createview_doesnt_create_text_input/?utm_source=share&utm_medium=web2x&context=3

to create comment input i made a comment model and view and added it to art_detail.html(same html for ArtDetailView),but form doesn't make any input

model:

```<code>class Comment(models.Model):
    writer = models.ForeignKey(get_user_model(),on_delete=models.CASCADE)
    art = models.ForeignKey(Art,on_delete=models.CASCADE)
    text = models.TextField(max_length=500)

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

view:

```<code>class CommentView(CreateView):
    model = Comment
    template_name = 'art_detail.html'
    fields = ['text']

    def form_valid(self, form):
        form.instance.writer = self.request.user
        return super().form_valid(form)
</code>```

template:

```<code><div class="comment">
    <form method="post">
        {% csrf_token %}
        {{ form.as_p }}
        <button class="btn btn-info btn-block" type="submit" value="comment">ارسال</button>
    </form>
    {% for comment in object.comment_set.all %}
        <span>{{comment.writer}}</span>
        <p>{{comment.text}}</p>
    {% endfor %}
</div>
</code>```

i also added url but dont if its ok or not:

```<code>path('art_detail/<int:pk>/add_comment/',views.CommentView.as_view(),name='add_comment')
</code>```

Title: can we add 1 template to 2 view?

Body:
i wonder if i can add 1 template like art_detail.html into 2 views template_name
if so objectcontains which ones data?
unfortunately i got a problem with adding comment to posts ,i asked it in reddit but since got 0answer i would be pleased if you answer it:https://www.reddit.com/r/learnpython/comments/1029qyk/why_createview_doesnt_create_text_input/?utm_source=share&utm_medium=web2x&context=3

to create comment input i made a comment model and view and added it to art_detail.html(same html for ArtDetailView),but form doesn't make any input

model:

class Comment(models.Model):
    writer = models.ForeignKey(get_user_model(),on_delete=models.CASCADE)
    art = models.ForeignKey(Art,on_delete=models.CASCADE)
    text = models.TextField(max_length=500)

    def __str__(self):
        return self.writer.username

view:

class CommentView(CreateView):
    model = Comment
    template_name = 'art_detail.html'
    fields = ['text']

    def form_valid(self, form):
        form.instance.writer = self.request.user
        return super().form_valid(form)

template:

    <form method="post">
        {% csrf_token %}
        {{ form.as_p }}
        <button class="btn btn-info btn-block" type="submit" value="comment">ارسال</button>
    </form>
    {% for comment in object.comment_set.all %}
        {{comment.writer}}

{{comment.text}}

    {% endfor %}

i also added url but dont if its ok or not:

path('art_detail/<int:pk>/add_comment/',views.CommentView.as_view(),name='add_comment')


问:
Why AWS Sagemaker Studio domain is hanging and showing 'Unknown user'
I'm trying to launch a SageMaker studio domain within VPC, but it's hanging all the time. if i check the app status inside my user profile, it shows me 'ready', but the studio interface keeps showing me the logo, also it keeps showing me the text box below:

after waiting for more than 30mins, I can finally see the studio interface, but on the right top it's showing me Unknown User, and it couldn't let me create a new notebook etc. Does anyone know what's going on?


问:
Trying to download a PDF from a website with login and password access
I'm trying to download a PDF from a web site that has login to do.
I'm using selenium and requests library, but my request.get returned me a html insted of a PDF.

the code above

```<code>response=requests.get(pdf_href, auth=HTTPBasicAuth(self.secret_belgo["username"], self.secret_belgo["password"]))
with open("teste.pdf", 'wb') as fd:
        for chunk in response .iter_content(chunk_size=128):
            fd.write(chunk)
with open("teste.txt", 'wb') as fd:
        for chunk in response .iter_content(chunk_size=128):
            fd.write(chunk)

</code>```

with this code I created a pdf and a txt, the PDF doesn't open, but the txt yes, it returns me a text and when I put the text in a html viewer i see this:
enter image description here
enter image description here

the link of download stay  in this webpage
enter image description here

and when i click i go to this place:
enter image description here

I cant use keystrokes, this will run in a container.

please help me

Body:
I'm trying to download a PDF from a web site that has login to do.
I'm using selenium and requests library, but my request.get returned me a html insted of a PDF.

the code above

response=requests.get(pdf_href, auth=HTTPBasicAuth(self.secret_belgo["username"], self.secret_belgo["password"]))
with open("teste.pdf", 'wb') as fd:
        for chunk in response .iter_content(chunk_size=128):
            fd.write(chunk)
with open("teste.txt", 'wb') as fd:
        for chunk in response .iter_content(chunk_size=128):
            fd.write(chunk)

with this code I created a pdf and a txt, the PDF doesn't open, but the txt yes, it returns me a text and when I put the text in a html viewer i see this:
enter image description here
enter image description here

the link of download stay  in this webpage
enter image description here

and when i click i go to this place:
enter image description here

I cant use keystrokes, this will run in a container.

please help me


问:
VBA Help on Data Copy
I have a question about the VBA code I wrote below.

First of all, a brief summary of what I try to achieve:
I have 2 Excel sheets, sheet1 and sheet2. The sheet1 has the data in B:AW and the sheet2 has a data in the M:W. I wanted to create a VBA code that copies the data in B:I and M:O starting from 7th row from sheet1 to B:K of sheet2 starting from again 7th row by also keeping the formatting same. I also set the last row to be copied as the row above the one includes "SGRE" in column B in sheet1. So for instance, lets assume that B1200 has "SGRE" in the cell so the code takes the data in B7:I1199 and M7:O1199 from sheet 1 and copies to sheet2 B7:K1199.

As a next step, I also wanted to capture all the updates in copied columns of sheet1 in sheet2 automatically. The code, apparently, does the job and every time I press run, it captures the update. I will probably assign a button to let the users update sheet2 according to the updates sheet1.

But I have 2 problems:

When I add a new row in sheet1 and run the code, the new row in sheet2 is added for only columns B:K. However, as I said above, I have more data in M:W which is not depending on any data in sheet1 (fixed and manually changed). So when I add a new row in sheet1, I want this row to be added in sheet2 not only for B:K but also M:W (which means a new row for B:W).

When I add a new row in sheet1, run the code, delete the row in sheet1 and run the code, it does not move the last row up in sheet2, instead keeps the last row in sheet2 and duplicates this row above. Lets assume our last row is 1199 and B1199 is "AAA", so when I add a new row in sheet1, run the code, B1199 moves to B1200 as expected but when I delete the row in sheet1 and run the code, B1200 stays as "AAA" and B1199 becomes "AAA" too.

```<code>Sub CopyPartialDataToSheet2()
    'Declare variables
    Dim ws1 As Worksheet
    Dim ws2 As Worksheet
    Dim rng1 As Range
    Dim rng2 As Range

    'Set worksheets
    Set ws1 = ThisWorkbook.Sheets("Sheet1")
    Set ws2 = ThisWorkbook.Sheets("Sheet2")

    'Find last row in Sheet1 and Sheet2
    lastRow1 = ws1.Cells(ws1.Rows.Count, "B").End(xlUp).Row
    lastRow2 = ws2.Cells(ws2.Rows.Count, "B").End(xlUp).Row

    'Find last row to be copied in Sheet1
    Do While ws1.Cells(lastRow1, "B").Value <> "SGRE"
        lastRow1 = lastRow1 - 1
    Loop
    lastRow1 = lastRow1 - 1

    'Print debug information
    Debug.Print "lastRow1: " & lastRow1 & ", lastRow2: " & lastRow2

    'Set ranges to be copied
    Set rng1 = ws1.Range("B7:I" & lastRow1)
    Set rng2 = ws1.Range("M7:O" & lastRow1)

    'Copy ranges from Sheet1 to Sheet2
    rng1.Copy ws2.Range("B7")
    rng2.Copy ws2.Range("B7").Offset(0, rng1.Columns.Count)

    'Adjust column widths in Sheet2 to match those in Sheet1
    For i = 1 To rng1.Columns.Count
        ws2.Columns(i).ColumnWidth = ws1.Columns(i).ColumnWidth
    Next i
    For i = 1 To rng2.Columns.Count
        ws2.Columns(i + rng1.Columns.Count).ColumnWidth = ws1.Columns(i + rng1.Columns.Count).ColumnWidth
    Next i
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
    'Declare variables
    Dim ws1 As Worksheet
    Dim ws2 As Worksheet
    Dim rng1 As Range
    Dim rng2 As Range
    Dim rng3 As Range
    Dim rngHeights As Range
    Dim lastRow1 As Long
    Dim lastRow2 As Long
    Dim i As Long

    'Exit the sub if the change was not made in Sheet1
    If Target.Parent.Name <> "Sheet1" Then Exit Sub

    'Set worksheets
    Set ws1 = ThisWorkbook.Sheets("Sheet1")
    Set ws2 = ThisWorkbook.Sheets("Sheet2")

    'Find last row in Sheet1 and Sheet2
    lastRow1 = ws1.Cells(ws1.Rows.Count, "B").End(xlUp).Row
    lastRow2 = ws2.Cells(ws2.Rows.Count, "B").End(xlUp).Row

    'Find last row to be copied in Sheet1
    Do While ws1.Cells(lastRow1, "B").Value <> "SGRE"
        lastRow1 = lastRow1 - 1
    Loop
    lastRow1 = lastRow1 - 1

    'Print debug information
    Debug.Print "lastRow1: " & lastRow1 & ", lastRow2: " & lastRow2

    'Set ranges to be copied
    Set rng1 = ws1.Range("B7:K" & lastRow1)
    Set rng2 = ws1.Range("M7:O" & lastRow1)
    Set rng3 = ws1.Range("M7:W" & lastRow1)

    'Copy data and row heights from Sheet1 to Sheet2
    rng1.Copy ws2.Range("B7")
    rng2.Copy ws2.Range("B7").Offset(0, rng1.Columns.Count)
    If lastRow1 > lastRow2 Then
        ws2.Range("B" & lastRow2 + 1 & ":K" & lastRow1).Insert Shift:=xlDown
        rng3.Copy ws2.Range("B" & lastRow2 + 1).Offset(0, rng1.Columns.Count + rng2.Columns.Count)
        Set rngHeights = ws1.Range("B" & lastRow2 + 1 & ":B" & lastRow1)
        For i = 1 To rngHeights.Rows.Count
            ws2.Rows(lastRow2 + i).RowHeight = rngHeights.Rows(i).RowHeight
        Next i
    End If
End Sub

</code>```

Title: VBA Help on Data Copy

Body:
I have a question about the VBA code I wrote below.

First of all, a brief summary of what I try to achieve:
I have 2 Excel sheets, sheet1 and sheet2. The sheet1 has the data in B:AW and the sheet2 has a data in the M:W. I wanted to create a VBA code that copies the data in B:I and M:O starting from 7th row from sheet1 to B:K of sheet2 starting from again 7th row by also keeping the formatting same. I also set the last row to be copied as the row above the one includes "SGRE" in column B in sheet1. So for instance, lets assume that B1200 has "SGRE" in the cell so the code takes the data in B7:I1199 and M7:O1199 from sheet 1 and copies to sheet2 B7:K1199.

As a next step, I also wanted to capture all the updates in copied columns of sheet1 in sheet2 automatically. The code, apparently, does the job and every time I press run, it captures the update. I will probably assign a button to let the users update sheet2 according to the updates sheet1.

But I have 2 problems:

When I add a new row in sheet1 and run the code, the new row in sheet2 is added for only columns B:K. However, as I said above, I have more data in M:W which is not depending on any data in sheet1 (fixed and manually changed). So when I add a new row in sheet1, I want this row to be added in sheet2 not only for B:K but also M:W (which means a new row for B:W).

When I add a new row in sheet1, run the code, delete the row in sheet1 and run the code, it does not move the last row up in sheet2, instead keeps the last row in sheet2 and duplicates this row above. Lets assume our last row is 1199 and B1199 is "AAA", so when I add a new row in sheet1, run the code, B1199 moves to B1200 as expected but when I delete the row in sheet1 and run the code, B1200 stays as "AAA" and B1199 becomes "AAA" too.

Sub CopyPartialDataToSheet2()
    'Declare variables
    Dim ws1 As Worksheet
    Dim ws2 As Worksheet
    Dim rng1 As Range
    Dim rng2 As Range

    'Set worksheets
    Set ws1 = ThisWorkbook.Sheets("Sheet1")
    Set ws2 = ThisWorkbook.Sheets("Sheet2")

    'Find last row in Sheet1 and Sheet2
    lastRow1 = ws1.Cells(ws1.Rows.Count, "B").End(xlUp).Row
    lastRow2 = ws2.Cells(ws2.Rows.Count, "B").End(xlUp).Row

    'Find last row to be copied in Sheet1
    Do While ws1.Cells(lastRow1, "B").Value <> "SGRE"
        lastRow1 = lastRow1 - 1
    Loop
    lastRow1 = lastRow1 - 1

    'Print debug information
    Debug.Print "lastRow1: " & lastRow1 & ", lastRow2: " & lastRow2

    'Set ranges to be copied
    Set rng1 = ws1.Range("B7:I" & lastRow1)
    Set rng2 = ws1.Range("M7:O" & lastRow1)

    'Copy ranges from Sheet1 to Sheet2
    rng1.Copy ws2.Range("B7")
    rng2.Copy ws2.Range("B7").Offset(0, rng1.Columns.Count)

    'Adjust column widths in Sheet2 to match those in Sheet1
    For i = 1 To rng1.Columns.Count
        ws2.Columns(i).ColumnWidth = ws1.Columns(i).ColumnWidth
    Next i
    For i = 1 To rng2.Columns.Count
        ws2.Columns(i + rng1.Columns.Count).ColumnWidth = ws1.Columns(i + rng1.Columns.Count).ColumnWidth
    Next i
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
    'Declare variables
    Dim ws1 As Worksheet
    Dim ws2 As Worksheet
    Dim rng1 As Range
    Dim rng2 As Range
    Dim rng3 As Range
    Dim rngHeights As Range
    Dim lastRow1 As Long
    Dim lastRow2 As Long
    Dim i As Long

    'Exit the sub if the change was not made in Sheet1
    If Target.Parent.Name <> "Sheet1" Then Exit Sub

    'Set worksheets
    Set ws1 = ThisWorkbook.Sheets("Sheet1")
    Set ws2 = ThisWorkbook.Sheets("Sheet2")

    'Find last row in Sheet1 and Sheet2
    lastRow1 = ws1.Cells(ws1.Rows.Count, "B").End(xlUp).Row
    lastRow2 = ws2.Cells(ws2.Rows.Count, "B").End(xlUp).Row

    'Find last row to be copied in Sheet1
    Do While ws1.Cells(lastRow1, "B").Value <> "SGRE"
        lastRow1 = lastRow1 - 1
    Loop
    lastRow1 = lastRow1 - 1

    'Print debug information
    Debug.Print "lastRow1: " & lastRow1 & ", lastRow2: " & lastRow2

    'Set ranges to be copied
    Set rng1 = ws1.Range("B7:K" & lastRow1)
    Set rng2 = ws1.Range("M7:O" & lastRow1)
    Set rng3 = ws1.Range("M7:W" & lastRow1)

    'Copy data and row heights from Sheet1 to Sheet2
    rng1.Copy ws2.Range("B7")
    rng2.Copy ws2.Range("B7").Offset(0, rng1.Columns.Count)
    If lastRow1 > lastRow2 Then
        ws2.Range("B" & lastRow2 + 1 & ":K" & lastRow1).Insert Shift:=xlDown
        rng3.Copy ws2.Range("B" & lastRow2 + 1).Offset(0, rng1.Columns.Count + rng2.Columns.Count)
        Set rngHeights = ws1.Range("B" & lastRow2 + 1 & ":B" & lastRow1)
        For i = 1 To rngHeights.Rows.Count
            ws2.Rows(lastRow2 + i).RowHeight = rngHeights.Rows(i).RowHeight
        Next i
    End If
End Sub


问:
Spring boot @Transactional annotation commits before method ends, only with Sql Server
I have a spring boot application that connects on two databases (oracle and sql server), but my @Transactional method commits the transaction before returning to the caller. I launch my app in debug mode and realized that just after calling the .save() method, the SQLServer table already had populated.

This only happen with SQLServer tables, with oracle the tables are filled after @Transactional method returning to the caller.

I have the following configuration classes:

```<code>
@Configuration
@EnableTransactionManagement
@EnableJpaRepositories(
  basePackages = "br.com.getnet.consumerformalizada.repository.mssql",
  entityManagerFactoryRef = "mssqlEntityManagerFactory",
  transactionManagerRef = "mssqlTransactionManager"
)
public class MsSqlDataSourceConfiguration {

    @Bean
    @ConfigurationProperties("spring.datasource.mssql")
    public DataSourceProperties mssqlDataSourceProperties() {
        return new DataSourceProperties();
    }

    @Bean
    public DataSource mssqlDataSource() {
        return mssqlDataSourceProperties()
                .initializeDataSourceBuilder()
                .build();
    }

    @Bean
    public LocalContainerEntityManagerFactoryBean mssqlEntityManagerFactory(
      @Qualifier("mssqlDataSource") DataSource dataSource,
      EntityManagerFactoryBuilder builder) {
        return builder
          .dataSource(dataSource)
          .packages("br.com.getnet.consumerformalizada.model.mssql")
          .build();
    }

    @Bean
    public PlatformTransactionManager mssqlTransactionManager(
      @Qualifier("mssqlEntityManagerFactory")
      LocalContainerEntityManagerFactoryBean mssqlEntityManagerFactory) {
        return new JpaTransactionManager(
                Objects.requireNonNull(mssqlEntityManagerFactory.getObject()));
    }

}

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

@Configuration
@EnableTransactionManagement
@EnableJpaRepositories(
  basePackages = {"br.com.getnet.consumerformalizada.repository.oracle"},
  entityManagerFactoryRef = "oracleEntityManagerFactory",
  transactionManagerRef = "oracleTransactionManager"
)
public class OracleDataSourceConfiguration {

    @Bean
    @Primary
    @ConfigurationProperties("spring.datasource.oracle")
    public DataSourceProperties oracleDataSourceProperties() {
        return new DataSourceProperties();
    }

    @Bean
    @Primary
    public DataSource oracleDataSource() {
        return oracleDataSourceProperties()
               .initializeDataSourceBuilder().build();
    }

    @Bean
    @Primary
    public LocalContainerEntityManagerFactoryBean oracleEntityManagerFactory(
      @Qualifier("oracleDataSource") DataSource dataSource,
      EntityManagerFactoryBuilder builder) {
        return builder
          .dataSource(dataSource)
          .packages("br.com.getnet.consumerformalizada.model.oracle")
          .build();
    }

    @Bean
    @Primary
    public PlatformTransactionManager oracleTransactionManager(
      @Qualifier("oracleEntityManagerFactory")
      LocalContainerEntityManagerFactoryBean oracleEntityManagerFactory) {
        return new JpaTransactionManager(
                Objects.requireNonNull(oracleEntityManagerFactory.getObject()));
    }

}

</code>```

This is my @Transaction method:

```<code>
    @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
    public void iniciarInclusao(OpeInclusaoInput message) throws Exception {

        String idOpeRgsr = message.getIdOpeRgsr();
        int qtdUrs = message.getOperacao().getUrs().size();

        OperacaoSantanderEntityBuilder builder = null;
        //Validar se a mensagem já existe na base azure
        PnrOpeSantanderEntity cttoAplicado = fmzInputService.findContratoAplicado(idOpeRgsr);
        //Se não existir nenhum registro ou não estiver com a flag de aplicado, seguir com a inclusão
        if (cttoAplicado == null || cttoAplicado.contratoNaoAplicado()) {

            log.info("Iniciando inclusão do contrato {} com {} UR(S).", idOpeRgsr, qtdUrs);

            //Salvar informações na base da azure
            //Aplica os logs iniciais na base Azure
            builder = new OperacaoSantanderEntityBuilder(message);
            Long idOpe = fmzInputService.aplicarContrato(builder.build());

            if (idOpe == null || idOpe.equals(Long.valueOf(0)))
                throw new Exception("Erro ao realizar inclusão do contrato via Input Service. IdOpe: " + idOpe);

            aplicarContratoPnr(message, null);

            builder.updateSucessStatus();

            log.info("Contrato {} incluído com sucesso.", idOpeRgsr);
        }
        //Se já existir registro e estiver aplicado, aborta
        else {
            //Não faz nada
            log.info("Contrato {} já aplicado. Status {}, será ignorado.", idOpeRgsr, cttoAplicado.getStatus());

            builder = new OperacaoSantanderEntityBuilder(message, cttoAplicado);
            builder.updateIgnoredStatus();
        }
        //Atualiza os dados na base azure
        this.fmzInputService.aplicarContrato(builder.build());
    }

</code>```

I tried to search on the web, but don't find a compatible solution.

Body:
I have a spring boot application that connects on two databases (oracle and sql server), but my @Transactional method commits the transaction before returning to the caller. I launch my app in debug mode and realized that just after calling the .save() method, the SQLServer table already had populated.

This only happen with SQLServer tables, with oracle the tables are filled after @Transactional method returning to the caller.

I have the following configuration classes:

@Configuration
@EnableTransactionManagement
@EnableJpaRepositories(
  basePackages = "br.com.getnet.consumerformalizada.repository.mssql",
  entityManagerFactoryRef = "mssqlEntityManagerFactory",
  transactionManagerRef = "mssqlTransactionManager"
)
public class MsSqlDataSourceConfiguration {

    @Bean
    @ConfigurationProperties("spring.datasource.mssql")
    public DataSourceProperties mssqlDataSourceProperties() {
        return new DataSourceProperties();
    }

    @Bean
    public DataSource mssqlDataSource() {
        return mssqlDataSourceProperties()
                .initializeDataSourceBuilder()
                .build();
    }

    @Bean
    public LocalContainerEntityManagerFactoryBean mssqlEntityManagerFactory(
      @Qualifier("mssqlDataSource") DataSource dataSource,
      EntityManagerFactoryBuilder builder) {
        return builder
          .dataSource(dataSource)
          .packages("br.com.getnet.consumerformalizada.model.mssql")
          .build();
    }

    @Bean
    public PlatformTransactionManager mssqlTransactionManager(
      @Qualifier("mssqlEntityManagerFactory")
      LocalContainerEntityManagerFactoryBean mssqlEntityManagerFactory) {
        return new JpaTransactionManager(
                Objects.requireNonNull(mssqlEntityManagerFactory.getObject()));
    }

}

@Configuration
@EnableTransactionManagement
@EnableJpaRepositories(
  basePackages = {"br.com.getnet.consumerformalizada.repository.oracle"},
  entityManagerFactoryRef = "oracleEntityManagerFactory",
  transactionManagerRef = "oracleTransactionManager"
)
public class OracleDataSourceConfiguration {

    @Bean
    @Primary
    @ConfigurationProperties("spring.datasource.oracle")
    public DataSourceProperties oracleDataSourceProperties() {
        return new DataSourceProperties();
    }

    @Bean
    @Primary
    public DataSource oracleDataSource() {
        return oracleDataSourceProperties()
               .initializeDataSourceBuilder().build();
    }

    @Bean
    @Primary
    public LocalContainerEntityManagerFactoryBean oracleEntityManagerFactory(
      @Qualifier("oracleDataSource") DataSource dataSource,
      EntityManagerFactoryBuilder builder) {
        return builder
          .dataSource(dataSource)
          .packages("br.com.getnet.consumerformalizada.model.oracle")
          .build();
    }

    @Bean
    @Primary
    public PlatformTransactionManager oracleTransactionManager(
      @Qualifier("oracleEntityManagerFactory")
      LocalContainerEntityManagerFactoryBean oracleEntityManagerFactory) {
        return new JpaTransactionManager(
                Objects.requireNonNull(oracleEntityManagerFactory.getObject()));
    }

}

This is my @Transaction method:

    @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
    public void iniciarInclusao(OpeInclusaoInput message) throws Exception {

        String idOpeRgsr = message.getIdOpeRgsr();
        int qtdUrs = message.getOperacao().getUrs().size();

        OperacaoSantanderEntityBuilder builder = null;
        //Validar se a mensagem já existe na base azure
        PnrOpeSantanderEntity cttoAplicado = fmzInputService.findContratoAplicado(idOpeRgsr);
        //Se não existir nenhum registro ou não estiver com a flag de aplicado, seguir com a inclusão
        if (cttoAplicado == null || cttoAplicado.contratoNaoAplicado()) {

            log.info("Iniciando inclusão do contrato {} com {} UR(S).", idOpeRgsr, qtdUrs);

            //Salvar informações na base da azure
            //Aplica os logs iniciais na base Azure
            builder = new OperacaoSantanderEntityBuilder(message);
            Long idOpe = fmzInputService.aplicarContrato(builder.build());

            if (idOpe == null || idOpe.equals(Long.valueOf(0)))
                throw new Exception("Erro ao realizar inclusão do contrato via Input Service. IdOpe: " + idOpe);

            aplicarContratoPnr(message, null);

            builder.updateSucessStatus();

            log.info("Contrato {} incluído com sucesso.", idOpeRgsr);
        }
        //Se já existir registro e estiver aplicado, aborta
        else {
            //Não faz nada
            log.info("Contrato {} já aplicado. Status {}, será ignorado.", idOpeRgsr, cttoAplicado.getStatus());

            builder = new OperacaoSantanderEntityBuilder(message, cttoAplicado);
            builder.updateIgnoredStatus();
        }
        //Atualiza os dados na base azure
        this.fmzInputService.aplicarContrato(builder.build());
    }

I tried to search on the web, but don't find a compatible solution.


问:
Configure chrome managed storage on MacOS
I am trying to use the chrome.managed.storage storage API in my extension in order to have some initialization data at extension startup.

For testing on MacOs I used this documentation.

I used the exact configuration as in the documentation and of course I changed the manifest id to the test extension:

The test extension used is Show Managed Storage.

I followed the instruction in the documentation and here is the output of dscl:

After reloading the policies there is no managed storage associated with my test extension:

On Windows it worked fine. Did anyone managed to configure the managed storage on MacOs?

EDIT:

The schema defined in the extension manifest needs to be respected. In case of the test extension we have these values defined in the schema:

I imported this config plist:

```<code><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>com.google.Chrome.extensions.ongnjlefhnoajpbodoldndkbkdgfomlp</key>
    <dict>
      <key>string</key>
      <dict>
        <key>state</key>
        <string>always</string>
        <key>value</key>
        <string>hello</string>
      </dict>
      <key>boolean</key>
      <dict>
        <key>state</key>
        <string>always</string>
        <key>value</key>
        <true/>
      </dict>
    </dict>
  </dict>
</plist>
</code>```

This is what I get when I execute dscl -u admin_username /Local/Default -mcxread /Computers/local_computer

```<code>App domain: com.google.Chrome.extensions.ongnjlefhnoajpbodoldndkbkdgfomlp
Key: boolean
State: always
Value: 1

App domain: com.google.Chrome.extensions.ongnjlefhnoajpbodoldndkbkdgfomlp
Key: string
State: always
Value: hello
</code>```

Is the imported config correct? I tried also not adding the state key but the import is not successful.

Body:
I am trying to use the chrome.managed.storage storage API in my extension in order to have some initialization data at extension startup.

For testing on MacOs I used this documentation.

I used the exact configuration as in the documentation and of course I changed the manifest id to the test extension:

The test extension used is Show Managed Storage.

I followed the instruction in the documentation and here is the output of dscl:

After reloading the policies there is no managed storage associated with my test extension:

On Windows it worked fine. Did anyone managed to configure the managed storage on MacOs?

EDIT:

The schema defined in the extension manifest needs to be respected. In case of the test extension we have these values defined in the schema:

I imported this config plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>com.google.Chrome.extensions.ongnjlefhnoajpbodoldndkbkdgfomlp</key>
    <dict>
      <key>string</key>
      <dict>
        <key>state</key>
        <string>always</string>
        <key>value</key>
        <string>hello</string>
      </dict>
      <key>boolean</key>
      <dict>
        <key>state</key>
        <string>always</string>
        <key>value</key>
        <true/>
      </dict>
    </dict>
  </dict>
</plist>

This is what I get when I execute dscl -u admin_username /Local/Default -mcxread /Computers/local_computer

App domain: com.google.Chrome.extensions.ongnjlefhnoajpbodoldndkbkdgfomlp
Key: boolean
State: always
Value: 1

App domain: com.google.Chrome.extensions.ongnjlefhnoajpbodoldndkbkdgfomlp
Key: string
State: always
Value: hello

Is the imported config correct? I tried also not adding the state key but the import is not successful.


问:
I can't see nodes and edges extracted from a website on gephi
hello everyone I'm recently learning python to do data nalisys of a website (themoviedb.org) extract data from a json response sent by the site following my request, to build the network of nodes and edges to show on gephi program. This is my error free code

```<code>import requests
import pandas as pd

api_key = 'my_psw'
language = 'en-US'
nodes=[]
edges=[]
response = requests.get("https://api.themoviedb.org/3/search/person",
                        params={'api_key':api_key,
                                'language':language,
                                'query':'marco'})
jsonresponse=response.json()["results"]
#add nodes
for exstract_id in jsonresponse:
        if(exstract_id["id"]==1372317):
            let_title=exstract_id["known_for"]
            print(let_title)
            for list in let_title:
                nodes.append({"id":list["id"],"original_language":list["original_language"]})
                edges.append({"source":list["original_language"],"target":list["media_type"]})
csv_nodes=pd.DataFrame.from_dict(nodes)
csv_edges=pd.DataFrame.from_dict(edges)
csv_nodes.to_csv('nodes.csv',index=False,header=True)
csv_edges.to_csv('edges.csv',index=False,header=True)
</code>```

in nodes.csv i have only three nodes:

and in edges.csv i have:

when i load to gephi nodes.csv it shows me nothing. The same thing happens if I append edges.csv to nodes.csv, to also load the links. why does this happen? is it because I have few nodes and gephi can't display them?

Body:
hello everyone I'm recently learning python to do data nalisys of a website (themoviedb.org) extract data from a json response sent by the site following my request, to build the network of nodes and edges to show on gephi program. This is my error free code

import requests
import pandas as pd

api_key = 'my_psw'
language = 'en-US'
nodes=[]
edges=[]
response = requests.get("https://api.themoviedb.org/3/search/person",
                        params={'api_key':api_key,
                                'language':language,
                                'query':'marco'})
jsonresponse=response.json()["results"]
#add nodes
for exstract_id in jsonresponse:
        if(exstract_id["id"]==1372317):
            let_title=exstract_id["known_for"]
            print(let_title)
            for list in let_title:
                nodes.append({"id":list["id"],"original_language":list["original_language"]})
                edges.append({"source":list["original_language"],"target":list["media_type"]})
csv_nodes=pd.DataFrame.from_dict(nodes)
csv_edges=pd.DataFrame.from_dict(edges)
csv_nodes.to_csv('nodes.csv',index=False,header=True)
csv_edges.to_csv('edges.csv',index=False,header=True)

in nodes.csv i have only three nodes:

and in edges.csv i have:

when i load to gephi nodes.csv it shows me nothing. The same thing happens if I append edges.csv to nodes.csv, to also load the links. why does this happen? is it because I have few nodes and gephi can't display them?


问:
What's the type match here?
When the code compiles, it highlights "rs.Range" as a TypeMatch error. I can't figure out why-- I don't think I set anything as a number instead of a string....

```<code>Dim rs As Worksheet
Dim MonthYear As String
Dim Month() As String

  MonthYear = Range("N1")
  Month = Split(MonthYear, ";")

For Each rs In Sheets
rs.Name = rs.Range("O2") & "(" & Month & ")"
Next rs
</code>```

What this should do -- I hope -- is take the currency in column O and the name of the month in the header of column N and name the sheet accordingly, like so:

N: Jan-22

O: ILS

intended sheet name: ILS (Jan)

Title: What's the type match here?

Body:
When the code compiles, it highlights "rs.Range" as a TypeMatch error. I can't figure out why-- I don't think I set anything as a number instead of a string....

Dim rs As Worksheet
Dim MonthYear As String
Dim Month() As String

  MonthYear = Range("N1")
  Month = Split(MonthYear, ";")

For Each rs In Sheets
rs.Name = rs.Range("O2") & "(" & Month & ")"
Next rs

What this should do -- I hope -- is take the currency in column O and the name of the month in the header of column N and name the sheet accordingly, like so:

N: Jan-22

O: ILS

intended sheet name: ILS (Jan)


问:
Position label in NavBar
How i can position my Label "Lady in Home" in the middle of NavBar. verticail-aligin:middle does no work for me.
i want to create my first site, if you know nice tutorial for HTML and CSS, could paste in this question, it will be help me to better understand, back-end sometimes more simple for me))

my

```<code>  <body style="font-family:montserrat;">
<nav style="background:rgb(232,158,200); height:140px;">
<img src="C:\Users\Java\Desktop\nail\s.png" style="height:135px; margin-left:77px;">
<label class="logo" style ="color:white; font-size:45px; margin-left:25px; margin-bottom:45px; line-height:25px;
"> Lady in Home </label>

<ul style="float:right; margin-right:66px;">
<li> <a class="as" href="#"> Services </a></li>
<li> <a href="#"> Price </a></li>
<li> <a href="#"> Photo </a></li>
<li> <a href="#"> Contacts </a></li>
<li> <a href="#"> About  </a></li>

</ul>
</nav>

</body>
</code>```

Some css code

```<code>*{
    padding:0;
    margin:0;
    text-decoration:none;
    list-style:none;
    box-sizing:border-box;

}

nav ul li{
    display:inline-block;
    line-height:140px;
    font-size:24px;
}

nav ul li a {
    color:white;
    text-transform:uppercase;
    padding: 7px 13px;
    border-radius:4px;
    }

 a:hover {
    background:#f5c4ed;
    transition:.5s;
    color:black;

}
</code>```

and picture

Title: Position label in NavBar

Body:
How i can position my Label "Lady in Home" in the middle of NavBar. verticail-aligin:middle does no work for me.
i want to create my first site, if you know nice tutorial for HTML and CSS, could paste in this question, it will be help me to better understand, back-end sometimes more simple for me))

my

 Lady in Home

  Services

  Price

  Photo

  Contacts

  About

Some css code

*{
    padding:0;
    margin:0;
    text-decoration:none;
    list-style:none;
    box-sizing:border-box;

}

nav ul li{
    display:inline-block;
    line-height:140px;
    font-size:24px;
}

nav ul li a {
    color:white;
    text-transform:uppercase;
    padding: 7px 13px;
    border-radius:4px;
    }

 a:hover {
    background:#f5c4ed;
    transition:.5s;
    color:black;

}

and picture


问:
Py2App application isn't reading changes made to text file
I have an application I've made using py2app, that is intended to read a text document and search each line therein in a search engine.

When I was testing this code in the terminal before using py2app, any changes made in the text file would be properly reflected the next time I ran the code. Example: I add a new line at the top of the document, it opens a new tab searching that string.

Now, after using py2app to bundle the code into a .app executable, it will only read the version of the file I gave it at creation, and won't read any changes.

I'm doing this on MacOS so here are the commands I've used to create the setup file and build it.

```<code>py2applet --make-setup searchscript3.py testdoc.txt
</code>```
```<code>python3 setup.py py2app
</code>```

I believe there's some way to implement a resources folder using "-r", but I cant get it to work, and even if so, how would I point the script to that directory?

Body:
I have an application I've made using py2app, that is intended to read a text document and search each line therein in a search engine.

When I was testing this code in the terminal before using py2app, any changes made in the text file would be properly reflected the next time I ran the code. Example: I add a new line at the top of the document, it opens a new tab searching that string.

Now, after using py2app to bundle the code into a .app executable, it will only read the version of the file I gave it at creation, and won't read any changes.

I'm doing this on MacOS so here are the commands I've used to create the setup file and build it.

py2applet --make-setup searchscript3.py testdoc.txt

python3 setup.py py2app

I believe there's some way to implement a resources folder using "-r", but I cant get it to work, and even if so, how would I point the script to that directory?


问:
i am working on a browser game. I was working on the replay system. i made a replay button but it I can't click it
I am working on a replay system in my browser game I made a replay button that calls the replay function , the problem is I can't click it, I tried setting the z-index to 1000 but it didn't work even I put it after every element in the document but it  didn't work, any help would be appreciated

enter image description here

code :

```<code>    <style>
        #retry {
            z-index: 1000;
        }
    </style>

    <button id="retry" onclick="replay()">retry</button>
</code>```

any one can help ?

Body:
I am working on a replay system in my browser game I made a replay button that calls the replay function , the problem is I can't click it, I tried setting the z-index to 1000 but it didn't work even I put it after every element in the document but it  didn't work, any help would be appreciated

enter image description here

code :

    <button id="retry" onclick="replay()">retry</button>

any one can help ?


问:
No 'Access-Control-Allow-Origin' header is present on the requested resource when trying to register
The error: Access to XMLHttpRequest at 'http://localhost:8000/localhost:8000/api/register' from origin 'http://localhost:5173' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

In the controller I have:

```<code>
public function register(Request $request){
        $validator = Validator::make($request->all(),[
            'name' => 'required|max:40',
            'email' => 'required|email|max:200|unique:users,email',
            'password' => 'required|min:8',

        ]);
        if($validator->fails()){
            return response()->json(['validation_errors'=>messages()]);
        }
        else{
            $user = User::create([
                'name'=> $request->name,
                'email'=> $request->email,
                'password'=> Hash::make($request->password),
            ]);
            $token = $user->createToken($user->email.'_Token')->plainTextToken;
            return response()->json([
                'status'=>200,
                'username'=>$user->name,
                'token'=>$token,
                'message'=>'Registration Successful'           ]);
        }
    }
</code>```

The register component:

```<code>import React, { useState } from 'react';
import axios from 'axios';
import swal from 'sweetalert';
import { useNavigate } from 'react-router-dom';
import Navbar from "../Navbar";
import Footer from "../Footer"
import "./css/login.css"

function Register() {

    const navigate = useNavigate();
    const [registerInput, setRegister] = useState({
        name: '',
        email: '',
        password: '',
        error_list: [],
    });

    const handleInput = (e) => {
        e.persist();
        setRegister({...registerInput, [e.target.name]: e.target.value });
    }

    const registerSubmit = (e) => {
        e.preventDefault();

        const data = {
            name: registerInput.name,
            email: registerInput.email,
            password: registerInput.password,
        }

        axios.get('/sanctum/csrf-cookie').then(response => {
            axios.post(`localhost:8000/api/register`, data).then(res => {
                if(res.data.status === 200)
                {
                    localStorage.setItem('auth_token', res.data.token);
                    localStorage.setItem('auth_name', res.data.username);
                    swal("Success",res.data.message,"success");
                    navigate.push('/');
                }
                else
                {
                    setRegister({...registerInput, error_list: res.data.validation_errors});
                }
            });
        });
    }
    const goBack = () =>{navigate('/login')}

    return (
        <>
        <Navbar/>
            <div className='center'>
                <form onSubmit={registerSubmit}>
                    <h1>Register</h1>
                    <br></br>
                    <div className="form-group mb-3">
                        <input placeholder="Username" type="text" name="name" onChange={handleInput} value={registerInput.name} className="form-control"  />
                        <span>{registerInput.error_list.name}</span>
                    </div>
                    <div className="form-group mb-3">
                        <input placeholder="Email" type="text" name="email" onChange={handleInput} value={registerInput.email} className="form-control"  />
                        <span>{registerInput.error_list.email}</span>
                    </div>
                    <div className="form-group mb-3">
                        <input placeholder="Password" type="password" name="password" onChange={handleInput} value={registerInput.password} className="form-control"  />
                        <span>{registerInput.error_list.password}</span>
                    </div>
                    <div className="form-group mb-3">
                        <button type="submit" className="btn btn-primary">Register</button>
                    </div>
                    <div>
                        <button onClick={goBack}>Back</button>
                    </div>
                </form>
            </div>
            <Footer/>
        </>
    );
}

export default Register;

</code>```

Body:
The error: Access to XMLHttpRequest at 'http://localhost:8000/localhost:8000/api/register' from origin 'http://localhost:5173' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

In the controller I have:

public function register(Request $request){
        $validator = Validator::make($request->all(),[
            'name' => 'required|max:40',
            'email' => 'required|email|max:200|unique:users,email',
            'password' => 'required|min:8',

        ]);
        if($validator->fails()){
            return response()->json(['validation_errors'=>messages()]);
        }
        else{
            $user = User::create([
                'name'=> $request->name,
                'email'=> $request->email,
                'password'=> Hash::make($request->password),
            ]);
            $token = $user->createToken($user->email.'_Token')->plainTextToken;
            return response()->json([
                'status'=>200,
                'username'=>$user->name,
                'token'=>$token,
                'message'=>'Registration Successful'           ]);
        }
    }

The register component:

import React, { useState } from 'react';
import axios from 'axios';
import swal from 'sweetalert';
import { useNavigate } from 'react-router-dom';
import Navbar from "../Navbar";
import Footer from "../Footer"
import "./css/login.css"

function Register() {

    const navigate = useNavigate();
    const [registerInput, setRegister] = useState({
        name: '',
        email: '',
        password: '',
        error_list: [],
    });

    const handleInput = (e) => {
        e.persist();
        setRegister({...registerInput, [e.target.name]: e.target.value });
    }

    const registerSubmit = (e) => {
        e.preventDefault();

        const data = {
            name: registerInput.name,
            email: registerInput.email,
            password: registerInput.password,
        }

        axios.get('/sanctum/csrf-cookie').then(response => {
            axios.post(`localhost:8000/api/register`, data).then(res => {
                if(res.data.status === 200)
                {
                    localStorage.setItem('auth_token', res.data.token);
                    localStorage.setItem('auth_name', res.data.username);
                    swal("Success",res.data.message,"success");
                    navigate.push('/');
                }
                else
                {
                    setRegister({...registerInput, error_list: res.data.validation_errors});
                }
            });
        });
    }
    const goBack = () =>{navigate('/login')}

    return (
        <>
        <Navbar/>

                <form onSubmit={registerSubmit}>

Register

                        <input placeholder="Username" type="text" name="name" onChange={handleInput} value={registerInput.name} className="form-control"  />
                        {registerInput.error_list.name}

                        <input placeholder="Email" type="text" name="email" onChange={handleInput} value={registerInput.email} className="form-control"  />
                        {registerInput.error_list.email}

                        <input placeholder="Password" type="password" name="password" onChange={handleInput} value={registerInput.password} className="form-control"  />
                        {registerInput.error_list.password}

                        <button type="submit" className="btn btn-primary">Register</button>

                        <button onClick={goBack}>Back</button>

                </form>

        </>
    );
}

export default Register;


问:
java.lang.NoSuchMethodError: net.thucydides.core.model.TestStep.getStartTime()Ljava/time/ZonedDateTime
I recently was able to integrate my BDD cucumber framework with Report Portal.

I run my tests in Circle CI.

Now, what happening is Serenity BDD cucumber tests are appearing blank. I found that it is happening due to below error:

```<code>java.lang.NoSuchMethodError: net.thucydides.core.model.TestStep.getStartTime()Ljava/time/ZonedDateTime;
        at com.github.invictum.reportportal.recorder.BddDataDriven.record(BddDataDriven.java:30)
        at com.github.invictum.reportportal.ReportPortalListener.testFinished(ReportPortalListener.java:51)
        at net.thucydides.core.steps.StepEventBus.testFinished(StepEventBus.java:256)
        at net.serenitybdd.cucumber.SerenityReporter.result(SerenityReporter.java:611)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at cucumber.runtime.Utils$1.call(Utils.java:40)
        at cucumber.runtime.Timeout.timeout(Timeout.java:16)
        at cucumber.runtime.Utils.invoke(Utils.java:34)
        at cucumber.runtime.RuntimeOptions$1.invoke(RuntimeOptions.java:294)
        at com.sun.proxy.$Proxy21.result(Unknown Source)
        at cucumber.runtime.junit.JUnitReporter.result(JUnitReporter.java:121)
        at cucumber.runtime.Runtime.runStep(Runtime.java:310)
        at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44)
        at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39)
        at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44)
        at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:102)
        at org.junit.runners.Suite.runChild(Suite.java:128)
        at org.junit.runners.Suite.runChild(Suite.java:27)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at cucumber.runtime.junit.ExamplesRunner.run(ExamplesRunner.java:59)
        at org.junit.runners.Suite.runChild(Suite.java:128)
        at org.junit.runners.Suite.runChild(Suite.java:27)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at cucumber.runtime.junit.ScenarioOutlineRunner.run(ScenarioOutlineRunner.java:53)
        at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63)
        at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70)
        at cucumber.api.junit.Cucumber.runChild(Cucumber.java:95)
        at cucumber.api.junit.Cucumber.runChild(Cucumber.java:38)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at cucumber.api.junit.Cucumber.run(Cucumber.java:100)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
</code>```

This error goes away if I comment out below ReportPortal and BDD reports also start appearing in Circle CI, but then report portal has no reports (obviously because I have commented its core dependency)

```<code><dependency>
    <groupId>com.github.invictum</groupId>
    <artifactId>serenity-reportportal-integration</artifactId>
    <version>1.5.8</version>
</dependency>
</code>```

It looks like both of these will not work together.

I am using these dependencies for serenity.

```<code><!--        // net.serenity-bdd serenity-core-->
        <serenity.version>1.2.4</serenity.version>
        <serenity.maven.version>1.2.4</serenity.maven.version>
<!--        // net.serenity-bdd serenity-cucumber-->
        <serenity.cucumber.version>1.1.27</serenity.cucumber.version>
</code>```

What can I do so that both will work together?

Body:
I recently was able to integrate my BDD cucumber framework with Report Portal.

I run my tests in Circle CI.

Now, what happening is Serenity BDD cucumber tests are appearing blank. I found that it is happening due to below error:

java.lang.NoSuchMethodError: net.thucydides.core.model.TestStep.getStartTime()Ljava/time/ZonedDateTime;
        at com.github.invictum.reportportal.recorder.BddDataDriven.record(BddDataDriven.java:30)
        at com.github.invictum.reportportal.ReportPortalListener.testFinished(ReportPortalListener.java:51)
        at net.thucydides.core.steps.StepEventBus.testFinished(StepEventBus.java:256)
        at net.serenitybdd.cucumber.SerenityReporter.result(SerenityReporter.java:611)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at cucumber.runtime.Utils$1.call(Utils.java:40)
        at cucumber.runtime.Timeout.timeout(Timeout.java:16)
        at cucumber.runtime.Utils.invoke(Utils.java:34)
        at cucumber.runtime.RuntimeOptions$1.invoke(RuntimeOptions.java:294)
        at com.sun.proxy.$Proxy21.result(Unknown Source)
        at cucumber.runtime.junit.JUnitReporter.result(JUnitReporter.java:121)
        at cucumber.runtime.Runtime.runStep(Runtime.java:310)
        at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44)
        at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39)
        at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44)
        at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:102)
        at org.junit.runners.Suite.runChild(Suite.java:128)
        at org.junit.runners.Suite.runChild(Suite.java:27)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at cucumber.runtime.junit.ExamplesRunner.run(ExamplesRunner.java:59)
        at org.junit.runners.Suite.runChild(Suite.java:128)
        at org.junit.runners.Suite.runChild(Suite.java:27)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at cucumber.runtime.junit.ScenarioOutlineRunner.run(ScenarioOutlineRunner.java:53)
        at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63)
        at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70)
        at cucumber.api.junit.Cucumber.runChild(Cucumber.java:95)
        at cucumber.api.junit.Cucumber.runChild(Cucumber.java:38)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at cucumber.api.junit.Cucumber.run(Cucumber.java:100)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)

This error goes away if I comment out below ReportPortal and BDD reports also start appearing in Circle CI, but then report portal has no reports (obviously because I have commented its core dependency)

<dependency>
    <groupId>com.github.invictum</groupId>
    <artifactId>serenity-reportportal-integration</artifactId>
    <version>1.5.8</version>
</dependency>

It looks like both of these will not work together.

I am using these dependencies for serenity.

        <serenity.version>1.2.4</serenity.version>
        <serenity.maven.version>1.2.4</serenity.maven.version>

        <serenity.cucumber.version>1.1.27</serenity.cucumber.version>

What can I do so that both will work together?


问:
Fetching the Max Payment from Group with Payer ID in pandas dataframe
Existing Dataframe :

```<code>Group        Payer_ID          status          Payment_Amount
 A              11               P                 100
 A              12               P                 100
 A              13               Q                  50
 A              14               P                 100
 A              15               P                  -
 B              11               P                  10
 B              16               Q                 150
</code>```

Expected Dataframe :

```<code>Group        Payer_ID              Payment_Amount
 A              11                      100
 B              16                      150
</code>```

if Payment amount is same it should take the first Payer_ID

by below code i could get the max payment amount but need to fetch the respective Payer_ID as well

what changes needs to be done.?

```<code>Max_Payment_Amt = df.groupby('Group',as_index=False)['Payment_Amount'].max()
</code>```

Body:
Existing Dataframe :

Group        Payer_ID          status          Payment_Amount
 A              11               P                 100
 A              12               P                 100
 A              13               Q                  50
 A              14               P                 100
 A              15               P                  -
 B              11               P                  10
 B              16               Q                 150

Expected Dataframe :

Group        Payer_ID              Payment_Amount
 A              11                      100
 B              16                      150

if Payment amount is same it should take the first Payer_ID

by below code i could get the max payment amount but need to fetch the respective Payer_ID as well

what changes needs to be done.?

Max_Payment_Amt = df.groupby('Group',as_index=False)['Payment_Amount'].max()


问:
why doesn't a struct conform to Equatable when only its only property conforms to an Equatable protocol?
Compiler provides error message Type 'A' does not conform to protocol 'Equatable''

Why? The extension on the Accessible protocol should provides Equatable conformance, no?

```<code>struct A: Equatable {
    var simp: any Accessible
}

protocol Accessible: Equatable {
    var accessToken: String {get set}
}

extension Accessible {
    static func ==(lhs: Self, rhs: Self) -> Bool {
        return lhs.accessToken == rhs.accessToken}
}
</code>```

Body:
Compiler provides error message Type 'A' does not conform to protocol 'Equatable''

Why? The extension on the Accessible protocol should provides Equatable conformance, no?

struct A: Equatable {
    var simp: any Accessible
}

protocol Accessible: Equatable {
    var accessToken: String {get set}
}

extension Accessible {
    static func ==(lhs: Self, rhs: Self) -> Bool {
        return lhs.accessToken == rhs.accessToken}
}