问:
doxygen: nest subpage titles inside section title in treeview
I would like to customise the appearance of the navigation tree column to have subpages' title nested inside the section's title they are referenced in. For instance, this simple example

```<code>/**
 * @mainpage Mainpage
 * @section section_1 Section 1
 * Description of section 1
 *
 * @section section_2 Section 2
 * Section 2 is composed of the following modules:
 * - @subpage module_1_page
 * - @subpage module_2_page
 */

/**
 * @page module_1_page Module 1
 * Module 1 description
 */

/**
 * @page module_2_page Module 2
 * Module 2 description
 */
</code>```

results in the following output:

What I would like to achieve is something like this (I manually edited the HTML result):

I had a look at the page Customizing the output of the Doxygen documentation, but I was not able to find anything that seems helpful in this case.

Also, I had a look at grouping as an alternative to pages, but it does not really fit my purposes - I use groups for actual APIs documentation, whereas I'd like to use pages for more "descriptive" documentation.

Is this possible to achieve? For the sake of completeness, I am using doxygen v1.8.13.

Body:
I would like to customise the appearance of the navigation tree column to have subpages' title nested inside the section's title they are referenced in. For instance, this simple example

/**
 * @mainpage Mainpage
 * @section section_1 Section 1
 * Description of section 1
 *
 * @section section_2 Section 2
 * Section 2 is composed of the following modules:
 * - @subpage module_1_page
 * - @subpage module_2_page
 */

/**
 * @page module_1_page Module 1
 * Module 1 description
 */

/**
 * @page module_2_page Module 2
 * Module 2 description
 */

results in the following output:

What I would like to achieve is something like this (I manually edited the HTML result):

I had a look at the page Customizing the output of the Doxygen documentation, but I was not able to find anything that seems helpful in this case.

Also, I had a look at grouping as an alternative to pages, but it does not really fit my purposes - I use groups for actual APIs documentation, whereas I'd like to use pages for more "descriptive" documentation.

Is this possible to achieve? For the sake of completeness, I am using doxygen v1.8.13.


来源: stackexchange

问:
Vue-i18n loader webpack config with Laravel Mix
We have a project setup with Laravel and Mix, Vue (2.7) and Vue-i18n which was working up to now. We recently had to ugprade to Mix 6 and Webpack 5 in order to install TailwindCSS and the Vue-i18n loader is no longer working.

Here's my config:
webpack.mix.js:

```<code>const mix = require('laravel-mix');

mix.extend( 'i18n', new class {
    webpackRules() {
        return [{
            resourceQuery: /blockType=i18n/,
            type: 'javascript/auto',
            loader: '@intlify/vue-i18n-loader',
        }];
    }
}());

mix.js('resources/js/app.js', 'public/js')
    .sass('resources/sass/app.scss', 'public/css/app.css')
    .options({
        postCss: [
            require("tailwindcss"),
        ]
    })
    .i18n();
</code>```

package.json:

```<code>{
    "private": true,
    "scripts": {
        "development": "mix",
        "watch": "mix watch",
        "watch-poll": "mix watch -- --watch-options-poll=1000",
        "hot": "mix watch --hot",
        "production": "mix --production"
    },
    "dependencies": {
        "autoprefixer": "^10.4.13",
        "axios": "^0.19.0",
        "bootstrap": "^4.4.1",
        "bootstrap-vue": "^2.5.0",
        "browserslist": "^4.8.7",
        "caniuse-lite": "^1.0.30001030",
        "cross-env": "^5.2.1",
        "jquery": "^3.4.1",
        "laravel-echo": "^1.6.1",
        "laravel-mix": "^6.0.49",
        "lodash": "^4.17.15",
        "nprogress": "^0.2.0",
        "popper.js": "^1.16.1",
        "postcss": "^8.4.19",
        "pusher-js": "^4.4.0",
        "resolve-url-loader": "^5.0.0",
        "sass": "^1.32.13",
        "sass-loader": "^11.1.0",
        "tailwindcss": "^3.2.4",
        "vue": "^2.7.14",
        "vue-bootstrap-typeahead": "^0.2.6",
        "vue-i18n": "^8.15.3",
        "vue-progressbar": "^0.7.5",
        "vue-router": "^3.1.5",
        "vue-template-compiler": "^2.6.11",
        "vuejs-datepicker": "^1.6.2",
        "vuex": "^3.1.2"
    },
    "devDependencies": {
        "webpack-cli": "^5.0.1"
    },
    "main": "tailwind.config.js"
}

</code>```

The error I'm getting now is:
Module parse failed: Unexpected token (1:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

in every file where I'm referencing vue-i18n

ContentLicense: CC BY-SA 4.0

Body:
We have a project setup with Laravel and Mix, Vue (2.7) and Vue-i18n which was working up to now. We recently had to ugprade to Mix 6 and Webpack 5 in order to install TailwindCSS and the Vue-i18n loader is no longer working.

Here's my config:
webpack.mix.js:

const mix = require('laravel-mix');

mix.extend( 'i18n', new class {
    webpackRules() {
        return [{
            resourceQuery: /blockType=i18n/,
            type: 'javascript/auto',
            loader: '@intlify/vue-i18n-loader',
        }];
    }
}());

mix.js('resources/js/app.js', 'public/js')
    .sass('resources/sass/app.scss', 'public/css/app.css')
    .options({
        postCss: [
            require("tailwindcss"),
        ]
    })
    .i18n();

package.json:

{
    "private": true,
    "scripts": {
        "development": "mix",
        "watch": "mix watch",
        "watch-poll": "mix watch -- --watch-options-poll=1000",
        "hot": "mix watch --hot",
        "production": "mix --production"
    },
    "dependencies": {
        "autoprefixer": "^10.4.13",
        "axios": "^0.19.0",
        "bootstrap": "^4.4.1",
        "bootstrap-vue": "^2.5.0",
        "browserslist": "^4.8.7",
        "caniuse-lite": "^1.0.30001030",
        "cross-env": "^5.2.1",
        "jquery": "^3.4.1",
        "laravel-echo": "^1.6.1",
        "laravel-mix": "^6.0.49",
        "lodash": "^4.17.15",
        "nprogress": "^0.2.0",
        "popper.js": "^1.16.1",
        "postcss": "^8.4.19",
        "pusher-js": "^4.4.0",
        "resolve-url-loader": "^5.0.0",
        "sass": "^1.32.13",
        "sass-loader": "^11.1.0",
        "tailwindcss": "^3.2.4",
        "vue": "^2.7.14",
        "vue-bootstrap-typeahead": "^0.2.6",
        "vue-i18n": "^8.15.3",
        "vue-progressbar": "^0.7.5",
        "vue-router": "^3.1.5",
        "vue-template-compiler": "^2.6.11",
        "vuejs-datepicker": "^1.6.2",
        "vuex": "^3.1.2"
    },
    "devDependencies": {
        "webpack-cli": "^5.0.1"
    },
    "main": "tailwind.config.js"
}

The error I'm getting now is:
Module parse failed: Unexpected token (1:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

in every file where I'm referencing vue-i18n


问:
How do I add a test case in NestJs and Jest(e2e) where I need to determine whether or not a function is called
I have a controller(report.controller.ts):

In this controller, I have a function/endpoint exportReport and in this function, I am calling another function from the slideChartService service. I need to write a test case where I want to know whether or not the function is called

```<code>@Controller('/reports')
export class ReportController {
  constructor(
    .
    .
    .
    private readonly slideChartService: SlideChartService,
  ) {}

  @Post(':id/export')
  async exportReport(
    @Param('id', ParseIntPipe) id: number,
    @CurrentUser() user: User,
  ) {
    .
    .
    .
    if(conditionSatisfied) {
        await this.slideChartService.updateSlideChart(section.chart.id, {
           data: res,
           firstChartId: chart.id,
        });
    }

}
</code>```

I looked around to find an example but couldn't really find one similar to the issue that I am facing. Also, I'm coming from a front-end background so I apologize if I'm missing some crucial details here. Thanks

Body:
I have a controller(report.controller.ts):

In this controller, I have a function/endpoint exportReport and in this function, I am calling another function from the slideChartService service. I need to write a test case where I want to know whether or not the function is called

@Controller('/reports')
export class ReportController {
  constructor(
    .
    .
    .
    private readonly slideChartService: SlideChartService,
  ) {}

  @Post(':id/export')
  async exportReport(
    @Param('id', ParseIntPipe) id: number,
    @CurrentUser() user: User,
  ) {
    .
    .
    .
    if(conditionSatisfied) {
        await this.slideChartService.updateSlideChart(section.chart.id, {
           data: res,
           firstChartId: chart.id,
        });
    }

}

I looked around to find an example but couldn't really find one similar to the issue that I am facing. Also, I'm coming from a front-end background so I apologize if I'm missing some crucial details here. Thanks


问:
how to create a stub of non-existent property?

I am writing a unit-test case using chai-mocha.

I imported a third-party player library as Player.
I see there are two predefined functions in Player, addModule & getModules.

Now I need to add some 'non-existance' properties like: EventType

```<code>import Player from "bitmovin-player";
import BtmPlayer from "./BtmPlayer";
import chai from 'chai';
import sinon from 'sinon';

describe("BtmPlayer", function () {
   var sandbox;
   var player;

   beforeEach(function () {
      sandbox = sinon.createSandbox();
      /* create stubs for existent property */
      sandbox.stub(Player, "addModule").returns(true);
      sandbox.stub(Player, "getModules").returns(['module1', 'module2']);

      /* create a stub for non-existent property */
      sandbox.stub(Player, "PlayerEvent").returns({ // Issue: throwing error
         Error: "error",
         Ready: 'ready',
         Play: 'play',
         Paused: 'paused'
      });
   });
   afterEach(function () {
      sandbox.restore();
   });

   it("BitmovinPlayer Instance", function () {
        player = new BtmPlayer();
        chai.expect(player).to.be.an.instanceOf(BtmPlayer);
   });
)};
</code>```

It's not working.
It's throwing errors like: TypeError: Cannot stub non-existent property.

Have you any idea, --

how to create a stub of non-existent property?

Body:
I am writing a unit-test case using chai-mocha.

I imported a third-party player library as Player.
I see there are two predefined functions in Player, addModule & getModules.

Now I need to add some 'non-existance' properties like: EventType

import Player from "bitmovin-player";
import BtmPlayer from "./BtmPlayer";
import chai from 'chai';
import sinon from 'sinon';

describe("BtmPlayer", function () {
   var sandbox;
   var player;

   beforeEach(function () {
      sandbox = sinon.createSandbox();
      /* create stubs for existent property */
      sandbox.stub(Player, "addModule").returns(true);
      sandbox.stub(Player, "getModules").returns(['module1', 'module2']);

      /* create a stub for non-existent property */
      sandbox.stub(Player, "PlayerEvent").returns({ // Issue: throwing error
         Error: "error",
         Ready: 'ready',
         Play: 'play',
         Paused: 'paused'
      });
   });
   afterEach(function () {
      sandbox.restore();
   });

   it("BitmovinPlayer Instance", function () {
        player = new BtmPlayer();
        chai.expect(player).to.be.an.instanceOf(BtmPlayer);
   });
)};

It's not working.
It's throwing errors like: TypeError: Cannot stub non-existent property.

Have you any idea, --

how to create a stub of non-existent property?


问:
SimpleMaterial line causes my app to crash

iOS 16, Xcode 14.1

When I run my app, its a simple game it crashed on this line...

```<code>let newMaterial = SimpleMaterial(color: .brown, roughness: 0.9, isMetallic: true)
</code>```

I tried moving it around, still crashes. I tried excluding roughness, still crashes. I tried changing isMetallic from true to false, still crashes.

Anything else I can try?

Body:
iOS 16, Xcode 14.1

When I run my app, its a simple game it crashed on this line...

let newMaterial = SimpleMaterial(color: .brown, roughness: 0.9, isMetallic: true)

I tried moving it around, still crashes. I tried excluding roughness, still crashes. I tried changing isMetallic from true to false, still crashes.

Anything else I can try?


问:
Can't Unable Model Monitoring in Vertex AI
I have a model in an endpoint in Vertex AI and enabled the Model Monitoring by 3 hours. My problems are:

I can't see any information about the monitoring of the model. Also in the logging nothing appears. (show an example below)

There's a comment that say: "The first execution of a monitoring job is pending".

I can't deactivate the Model Monitoring for Vertex AI.


问:
How to use Entity Framework with an Oracle database?
I am using VS 2022 and .NET 6.0.

I am trying to use Entity Framework Core for an Oracle database. I have used Scaffold-DbContext before but with a SQL Server database and no problems.

However, when I run Scaffold-DbContext for the Oracle database, I get an error:

Oracle.ManagedDataAccess.Client.OracleException (0x80004005): Connection request timed out

even though I can connect to it via Oracle SQL Developer with no problems.

```<code>Scaffold-DbContext -Context ComDBContext -Force "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<host>)(PORT=<port>))(CONNECT_DATA=(SERVICE_NAME=<servicename>)));User Id=<userid>;Password=<password>;load balancing=true;pooling=true;Min Pool Size=10;Connection Lifetime=120;Connection Timeout=60;" -Provider Oracle.EntityFrameworkCore -Verbose -OutputDir Models
</code>```

My project is a .NET 6.0 console app and have installed the following Nuget packages:

Microsoft.EntityFrameworkCore 6.0.3

Microsoft.EntityFrameworkCore.Abstractions  6.0.3

Microsoft.EntityFrameworkCore.Analyzers  6.0.3

Microsoft.EntityFrameworkCore.Design 6.0.3

Microsoft.EntityFrameworkCore.Relational 6.0.3

Microsoft.EntityFrameworkCore.SqIServer 6.0.3

Microsoft.EntityFrameworkCore.Tools 6.0.3

Oracle.EntityFrameworkCore 6.21.61

I assume, I need to scaffold the database to create the DbContext and all the entity classes for Entity Framework Core.

Body:
I am using VS 2022 and .NET 6.0.

I am trying to use Entity Framework Core for an Oracle database. I have used Scaffold-DbContext before but with a SQL Server database and no problems.

However, when I run Scaffold-DbContext for the Oracle database, I get an error:

Oracle.ManagedDataAccess.Client.OracleException (0x80004005): Connection request timed out

even though I can connect to it via Oracle SQL Developer with no problems.

Scaffold-DbContext -Context ComDBContext -Force "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<host>)(PORT=<port>))(CONNECT_DATA=(SERVICE_NAME=<servicename>)));User Id=<userid>;Password=<password>;load balancing=true;pooling=true;Min Pool Size=10;Connection Lifetime=120;Connection Timeout=60;" -Provider Oracle.EntityFrameworkCore -Verbose -OutputDir Models

My project is a .NET 6.0 console app and have installed the following Nuget packages:

Microsoft.EntityFrameworkCore 6.0.3

Microsoft.EntityFrameworkCore.Abstractions  6.0.3

Microsoft.EntityFrameworkCore.Analyzers  6.0.3

Microsoft.EntityFrameworkCore.Design 6.0.3

Microsoft.EntityFrameworkCore.Relational 6.0.3

Microsoft.EntityFrameworkCore.SqIServer 6.0.3

Microsoft.EntityFrameworkCore.Tools 6.0.3

Oracle.EntityFrameworkCore 6.21.61

I assume, I need to scaffold the database to create the DbContext and all the entity classes for Entity Framework Core.


问:
Creating an interactive network plolt (visNetwork) with a dictionay and loop in R (shiny app)
I am trying to create a network graph with the following code (see below) but I seem to be replacing each plot during the loop iteration, instead of creating a fully connected network. I am fairly new to R, any direction in the matter would be greatly appreciated!

Here is the code I a, trying to implement:
`

```<code>library(shiny)
library(visNetwork)

# Define UI for application that draws a histogram
ui <- fluidPage(
  visNetworkOutput("networkR"),
  # verbatimTextOutput("shiny_return")

)

# Define server logic required to draw a histogram
server <- function(input, output) {

    output$networkR <- renderVisNetwork({

      data <- read.csv('Random.csv')

      thresh = 0.00000001

      filt_data <- data[data$adj.P.Val.original<=thresh,]
      uniq_cmpds <-list(unique(filt_data$Group))

      temp = list()
      for (el in uniq_cmpds){

        temp_data[[el]] <- c(filt_data[filt_data$Group==el,])
        node <-  data.frame(id=c(unique(temp_data[[el]]$Group),temp_data[[el]]$Shown.ID),
                            label=c(unique(temp_data[[el]]$Group),temp_data[[el]]$Shown.ID),
                            color=c('lightblue',c(rep('purple',times=length(temp_data[[el]]$Shown.ID)))))
        edges <- data.frame(from=c(temp_data[[el]]$Group), to=c(temp_data[[el]]$Shown.ID))
      }
    visNetwork(node,edges)

    })

}

# Run the application
shinyApp(ui = ui, server = server)
</code>```

`

Body:
I am trying to create a network graph with the following code (see below) but I seem to be replacing each plot during the loop iteration, instead of creating a fully connected network. I am fairly new to R, any direction in the matter would be greatly appreciated!

Here is the code I a, trying to implement:
`

library(shiny)
library(visNetwork)

# Define UI for application that draws a histogram
ui <- fluidPage(
  visNetworkOutput("networkR"),
  # verbatimTextOutput("shiny_return")

)

# Define server logic required to draw a histogram
server <- function(input, output) {

    output$networkR <- renderVisNetwork({

      data <- read.csv('Random.csv')

      thresh = 0.00000001

      filt_data <- data[data$adj.P.Val.original<=thresh,]
      uniq_cmpds <-list(unique(filt_data$Group))

      temp = list()
      for (el in uniq_cmpds){

        temp_data[[el]] <- c(filt_data[filt_data$Group==el,])
        node <-  data.frame(id=c(unique(temp_data[[el]]$Group),temp_data[[el]]$Shown.ID),
                            label=c(unique(temp_data[[el]]$Group),temp_data[[el]]$Shown.ID),
                            color=c('lightblue',c(rep('purple',times=length(temp_data[[el]]$Shown.ID)))))
        edges <- data.frame(from=c(temp_data[[el]]$Group), to=c(temp_data[[el]]$Shown.ID))
      }
    visNetwork(node,edges)

    })

}

# Run the application
shinyApp(ui = ui, server = server)

`


问:
Can I do Fine-Gray regression on a split survival dataset?
This is my first question here, so if I need to share more information please let me know.

I have done a Cox regression analysis in R in which I am interested in the effect of implant surface on reoperation over 36 months. Here's a reproducible example:

```<code>library(survival)

n <- 100
df <- data.frame(id=1:n,
                 time=sample(1:36, n, replace=TRUE),
                 event=sample(0:2, n, replace=TRUE),
                 implantsurface=sample(0:1, n, replace=TRUE),
                 covariate1=sample(0:1, n, replace=TRUE),
                 covariate2=sample(0:1, n, replace=TRUE))
df$time <- as.numeric(df$time)
</code>```

I adjusted for a number of covariates, which showed that the proportional hazards assumption was violated for covariate1. I split my dataset into 0-4 mo and 4-36 mo as follows (simplified code), so that the PH assumption was no longer violated:

```<code>fit1 <- survSplit(Surv(time, event == 1) ~
implantsurface + covariate1 + covariate2,
data = df, cut=c(4),
episode= "tgroup")

fit2 <- coxph(Surv(tstart, time, event) ~
implantsurface + strata(tgroup):covariate1 + covariate2,
data = fit1)
</code>```

Now I would also like to adjust for competing risks with Fine-Gray regression, but I am unable to do this for the split dataset. I have tried the following:

```<code>FG <- finegray(Surv(time = time, event = event.competing, type = "mstate") ~
implantsurface + strata(tgroup):covariate1 + covariate2,
data = fit1, etype = "event_of_interest")

FGfit <- coxph(Surv(fgstart, fgstop, fgstatus) ~
implantsurface + strata(tgroup):covariate1 + covariate2,
weights = fgwt, data = FG)

Error in strata(tgroup) : object 'tgroup' not found
</code>```

Does anyone know how/if Fine-Gray can be applied to a split survival dataset? Many thanks in advance for thinking along!

Body:
This is my first question here, so if I need to share more information please let me know.

I have done a Cox regression analysis in R in which I am interested in the effect of implant surface on reoperation over 36 months. Here's a reproducible example:

library(survival)

n <- 100
df <- data.frame(id=1:n,
                 time=sample(1:36, n, replace=TRUE),
                 event=sample(0:2, n, replace=TRUE),
                 implantsurface=sample(0:1, n, replace=TRUE),
                 covariate1=sample(0:1, n, replace=TRUE),
                 covariate2=sample(0:1, n, replace=TRUE))
df$time <- as.numeric(df$time)

I adjusted for a number of covariates, which showed that the proportional hazards assumption was violated for covariate1. I split my dataset into 0-4 mo and 4-36 mo as follows (simplified code), so that the PH assumption was no longer violated:

fit1 <- survSplit(Surv(time, event == 1) ~
implantsurface + covariate1 + covariate2,
data = df, cut=c(4),
episode= "tgroup")

fit2 <- coxph(Surv(tstart, time, event) ~
implantsurface + strata(tgroup):covariate1 + covariate2,
data = fit1)

Now I would also like to adjust for competing risks with Fine-Gray regression, but I am unable to do this for the split dataset. I have tried the following:

FG <- finegray(Surv(time = time, event = event.competing, type = "mstate") ~
implantsurface + strata(tgroup):covariate1 + covariate2,
data = fit1, etype = "event_of_interest")

FGfit <- coxph(Surv(fgstart, fgstop, fgstatus) ~
implantsurface + strata(tgroup):covariate1 + covariate2,
weights = fgwt, data = FG)

Error in strata(tgroup) : object 'tgroup' not found

Does anyone know how/if Fine-Gray can be applied to a split survival dataset? Many thanks in advance for thinking along!


问:
How to multiplex a stream in rust using sinks and tokio?
I would like to split a stream in Rust, but I'd like to do it idiomatically without side effects in my stream functions.

This is what I have now where I pipe the stream result into a for_each

```<code>let (sender, receiver) tokio::sync::broadcast::channel(1);
let mut base_stream = inf_async_stream_gen().await
     .map(function1)
     .for_each(|x| {
         let inner_sender = sender.clone();
         async move { inner_sender.send(x); }
     });

let stream_1 = BroadcastStream::new(receiver.resubscribe());
let stream_2 = BroadcastStream::new(receiver.resubscribe());
</code>```

But this feels a little bit odd.  Isn't receiver conceptually a Sink (despite not implementing the trait)?

Body:
I would like to split a stream in Rust, but I'd like to do it idiomatically without side effects in my stream functions.

This is what I have now where I pipe the stream result into a for_each

let (sender, receiver) tokio::sync::broadcast::channel(1);
let mut base_stream = inf_async_stream_gen().await
     .map(function1)
     .for_each(|x| {
         let inner_sender = sender.clone();
         async move { inner_sender.send(x); }
     });

let stream_1 = BroadcastStream::new(receiver.resubscribe());
let stream_2 = BroadcastStream::new(receiver.resubscribe());

But this feels a little bit odd.  Isn't receiver conceptually a Sink (despite not implementing the trait)?


问:
The following method did not exist: java.lang.String javax.servlet.ServletContext.getVirtualServerName()
```<code>Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.apache.catalina.authenticator.AuthenticatorBase.startInternal(AuthenticatorBase.java:1319)

The following method did not exist:

    'java.lang.String javax.servlet.ServletContext.getVirtualServerName()'

The calling method's class, org.apache.catalina.authenticator.AuthenticatorBase, was loaded from the following location:

    jar:file:/C:/Users/james/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.68/tomcat-embed-core-9.0.68.jar!/org/apache/catalina/authenticator/AuthenticatorBase.class

The called method's class, javax.servlet.ServletContext, is available from the following locations:

    jar:file:/C:/Users/james/.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar!/javax/servlet/ServletContext.class
    jar:file:/C:/Users/james/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.68/tomcat-embed-core-9.0.68.jar!/javax/servlet/ServletContext.class

The called method's class hierarchy was loaded from the following locations:

    javax.servlet.ServletContext: file:/C:/Users/james/.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar

Action:

Correct the classpath of your application so that it contains compatible versions of the classes org.apache.catalina.authenticator.AuthenticatorBase and javax.servlet.ServletContext

</code>```

tried downloading latest servlet 4.0.1. tried to remove old files specified in error description. Unsure how to proceed. Is there a way to exclude the servlet somehow?

Body:
Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.apache.catalina.authenticator.AuthenticatorBase.startInternal(AuthenticatorBase.java:1319)

The following method did not exist:

    'java.lang.String javax.servlet.ServletContext.getVirtualServerName()'

The calling method's class, org.apache.catalina.authenticator.AuthenticatorBase, was loaded from the following location:

    jar:file:/C:/Users/james/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.68/tomcat-embed-core-9.0.68.jar!/org/apache/catalina/authenticator/AuthenticatorBase.class

The called method's class, javax.servlet.ServletContext, is available from the following locations:

    jar:file:/C:/Users/james/.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar!/javax/servlet/ServletContext.class
    jar:file:/C:/Users/james/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.68/tomcat-embed-core-9.0.68.jar!/javax/servlet/ServletContext.class

The called method's class hierarchy was loaded from the following locations:

    javax.servlet.ServletContext: file:/C:/Users/james/.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar

Action:

Correct the classpath of your application so that it contains compatible versions of the classes org.apache.catalina.authenticator.AuthenticatorBase and javax.servlet.ServletContext

tried downloading latest servlet 4.0.1. tried to remove old files specified in error description. Unsure how to proceed. Is there a way to exclude the servlet somehow?


问:
Start timer in interrupt mode without HAL
I'm using a STM32F0 and have some time critical stuff happening, including starting some timers in another interrupt routine.
To reduce delays I'm trying to replace calls to HAL with lower-level stuff.
To make things easier for now I want to keep HAL for stuff that's not time critical.

I've got one timer that I don't need to be in interrupt mode. For this one I replaced:
HAL_TIM_Base_Start(&htim3);
with
TIM3->CR1 |= 0x1UL;
Which works well.

I have another timer that was using HAL interrupt mode. I replaced
HAL_TIM_Base_Start_IT(&htim14);
with TIM14->CR1 |= 0x1UL;
NVIC_EnableIRQ(TIM14_IRQn);
but it appears that either the counter or the interrupt does not get enabled.

I've tried enabling the interrupt first but that does not make any difference.


问:
Rank duplicate values by specific criteria
I have a set of data (over 1 million records) with many instances of duplicative email addresses. I am looking to build a formula that prioritizes duplicate emails by other criteria, so I can identify a unique set of email addresses to update.

In this scenario, I am looking to rank by the following criteria:

Duplicate record has a Campaign ID

Duplicate record has the most recent modified date

If both of the above are true, I want the formula to return '1', otherwise return '0'

If criteria #1 does not exist, I want criteria #2 to take over (i.e. the 'excelisfun@gmail.com' example in the table below, I would expect the 6/5/22 modified date row to return a '1')

Where I am getting tripped up is that I want the rank formula to be controlled only by the duplicative emails in question. For instance, I do not want to compare all Most Recent Modified Dates against each other.

Any help is much appreciated!

Tried a formula similar to the below:

=IF(COUNTIFS(E:E,E2,I:I,"<="&I2)=COUNTIF(E:E,E2),1,0)

This works when you are only controlling for one email, but does not work against the dataset as a whole with all of the different emails mixed in. Also doesn't control for the second condition (the presence of a Campaign ID)


问:
Is omitting template parameter that has a default template argument in a template template parameter legal?
The title may be hard to parse, consider the following code

#include <algorithm>
#include <vector>

template <template<typename> typename C, typename T>
void sort(C<T>& c)
{
  std::sort(c.begin(), c.end());
}

void f()
{
  std::vector vi = { 1, 2, 3, 4, 5 };
  ::sort(vi);
}
```

vector has a second template parameter Alloc that has a default template argument.

The template template parameter C of sort has only one template parameter.

gcc compiles this code, while clang issues an error of "no matching function to 'sort'" (both with -std=c++20).

Which compiler conforms to the standard? Is this code legal?

Body:
The title may be hard to parse, consider the following code

#include <algorithm>
#include <vector>

template <template<typename> typename C, typename T>
void sort(C<T>& c)
{
  std::sort(c.begin(), c.end());
}

void f()
{
  std::vector vi = { 1, 2, 3, 4, 5 };
  ::sort(vi);
}

vector has a second template parameter Alloc that has a default template argument.

The template template parameter C of sort has only one template parameter.

gcc compiles this code, while clang issues an error of "no matching function to 'sort'" (both with -std=c++20).

Which compiler conforms to the standard? Is this code legal?


问:
How to create 32-Bit (i686) binaries with Cygwin, as of Dec 2022?
Note: This is not a duplicate, existing solution is obsolete (not working) as of Dec 2022

There is no package cygwin32-* (anymore?) in Cygwin64

https://www.cygwin.com/packages/summary/cygwin32-gcc-core.html

 404 Not Found

I use Cygwin to build our library and app on the Windows platform. This works fine, so far. But only 64-Bit (x64) version is created until now. We need to create 32-Bit (i686) DLL too, because some developers still create 32-Bit (i686) programs, so they need our DLL as 32-Bit (i686) version!

How do I do this with Cygwin?

The gcc that comes with Cygwin64 (setup-x86_64.exe) only creates 64-Bit (x64) binaries, it appears. I tried switch -m32, but will fail with some obscure errors; looks like some libraries are wrong:

```<code>$ make CC="gcc -m32"
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-cygwin/11//libgcc_s.dll.a when searching for -lgcc_s
</code>```

I also tried installing 32-Bit Cygwin (setup-x86.exe), but setup only shows a weird error message:
Cygwin is not supported on 32-Bit Windows

But I try to install Cygwin on a 64-Bit Windows machine (Windows 10 22H2, fully patched), so this error message makes no sense to me! How to install Cygwin 32-Bit version?

I also found various sources claiming that Cygwin64 can cross-compile to 32-Bit and that I need to install the cross-compiler packages cygwin32-* for that. But how do I do this? I tried to install those packages with the "setup-x86_64.exe" program, but can not seems to find them...

What am I missing?

Regards.

I tried to install 32-Bit Cygwin (setup-x86.exe), but it cannot install on my Windows 10 system.

Also I tried to cross-compile from Cygwin64 (x86_64) to 32-Bit (i686) platform, but it cannot find how to install the required cross-compiler packages (cygwin32-*).

Minimal example:

Command to create 64-Bit (x64) DLL in Cygwin64 shell works fine:

```<code>$ gcc -shared -o test.dll -Wl,--out-implib test.dll.a dll_test.c
</code>```

But this command to create 32-Bit (i686) DLL cannot work:

```<code>$ gcc -m32 -shared -o test.dll -Wl,--out-implib test.dll.a dll_test.c
</code>```

Error messages:

```<code>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-cygwin/11//libgcc_s.dll.a when searching for -lgcc_s
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-cygwin/11/libgcc_s.dll.a when searching for -lgcc_s
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-cygwin/11//libgcc_s.dll.a when searching for -lgcc_s
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-cygwin/11/libgcc_s.dll.a when searching for -lgcc_s
[...]
collect2: error: ld returned 1 exit status
</code>```

dll_test.c:

```<code>int test_function(void)
{
    return 42;
}
</code>```

Body:
Note: This is not a duplicate, existing solution is obsolete (not working) as of Dec 2022

There is no package cygwin32-* (anymore?) in Cygwin64

https://www.cygwin.com/packages/summary/cygwin32-gcc-core.html

 404 Not Found

I use Cygwin to build our library and app on the Windows platform. This works fine, so far. But only 64-Bit (x64) version is created until now. We need to create 32-Bit (i686) DLL too, because some developers still create 32-Bit (i686) programs, so they need our DLL as 32-Bit (i686) version!

How do I do this with Cygwin?

The gcc that comes with Cygwin64 (setup-x86_64.exe) only creates 64-Bit (x64) binaries, it appears. I tried switch -m32, but will fail with some obscure errors; looks like some libraries are wrong:

$ make CC="gcc -m32"
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-cygwin/11//libgcc_s.dll.a when searching for -lgcc_s

I also tried installing 32-Bit Cygwin (setup-x86.exe), but setup only shows a weird error message:
Cygwin is not supported on 32-Bit Windows

But I try to install Cygwin on a 64-Bit Windows machine (Windows 10 22H2, fully patched), so this error message makes no sense to me! How to install Cygwin 32-Bit version?

I also found various sources claiming that Cygwin64 can cross-compile to 32-Bit and that I need to install the cross-compiler packages cygwin32-* for that. But how do I do this? I tried to install those packages with the "setup-x86_64.exe" program, but can not seems to find them...

What am I missing?

Regards.

I tried to install 32-Bit Cygwin (setup-x86.exe), but it cannot install on my Windows 10 system.

Also I tried to cross-compile from Cygwin64 (x86_64) to 32-Bit (i686) platform, but it cannot find how to install the required cross-compiler packages (cygwin32-*).

Minimal example:

Command to create 64-Bit (x64) DLL in Cygwin64 shell works fine:

$ gcc -shared -o test.dll -Wl,--out-implib test.dll.a dll_test.c

But this command to create 32-Bit (i686) DLL cannot work:

$ gcc -m32 -shared -o test.dll -Wl,--out-implib test.dll.a dll_test.c

Error messages:

/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-cygwin/11//libgcc_s.dll.a when searching for -lgcc_s
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-cygwin/11/libgcc_s.dll.a when searching for -lgcc_s
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-cygwin/11//libgcc_s.dll.a when searching for -lgcc_s
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-cygwin/11/libgcc_s.dll.a when searching for -lgcc_s
[...]
collect2: error: ld returned 1 exit status

dll_test.c:

int test_function(void)
{
    return 42;
}


问:
Google Cloud Run Restarts after too many 500 responses?
I've been debugging an issue with 503 Server Unavailable errors and I think GCP Run is stopping the instance if my code returns too many 500 status code errors which then causes all the other requests to throw 503 Server Unavailable errors.

Will Google Cloud Run shut down an instance if it responds too many times with status code 500?


问:
how to clamp a float the "other way" in unity
so i want to clamp the rotation in my 2d gameobject but the rotation float is when it reach 180
it change to -180, so when i clamp

```<code>mathf.clamp(rotation, -90, 90);
</code>```

it is clamp so i cant rotate to the "right side",but when i do want so i cant rotate to the "left side" i cant.here is my code

```<code>mathf.clamp(rotation, 90, -90);
</code>```

how can i make it so i cant rotate to the "left side"?(its platformer game fyi)

here some example
that is 180/-180 degrees

this is 90 degree

and this is -90 degree

Body:
so i want to clamp the rotation in my 2d gameobject but the rotation float is when it reach 180
it change to -180, so when i clamp

mathf.clamp(rotation, -90, 90);

it is clamp so i cant rotate to the "right side",but when i do want so i cant rotate to the "left side" i cant.here is my code

mathf.clamp(rotation, 90, -90);

how can i make it so i cant rotate to the "left side"?(its platformer game fyi)

here some example
that is 180/-180 degrees

this is 90 degree

and this is -90 degree


问:
I sent data from database to a html file. But how can make this to no redirect to that page in laravel?
this is my controller. I want to return on this page 'home.checkout'.
`

```<code>public function checkoutpage(Request $request)
    {

         $n= $request->name;
         $g= $request->guests;
         $d= $request->duration;
         $t= $request->to;
         $date= $request->date;
         $data = $request->tid;
         booking::select('id')->where('name', $n)->first();

         return view ('home.paymentconfirm',compact('n','g','d','t','date','data'));

         return view('home.checkout');
</code>```

`

this is my route

Route::post('ticket-checkout',[bookingController::class,'checkoutpage'])->name('getmethod-checkout');

my view file

`

```<code><div class='wp'>Guests<h2>{{$g}}</h2></div>
      <div class='wp'>Type<h2>VIP</h2></div>
      <div class='wp'>Time<h2> {{$d}}</h2></div>
</code>```

`

Now i want this checkout page appear before the paymentconfirm page.

Body:
this is my controller. I want to return on this page 'home.checkout'.
`

public function checkoutpage(Request $request)
    {

         $n= $request->name;
         $g= $request->guests;
         $d= $request->duration;
         $t= $request->to;
         $date= $request->date;
         $data = $request->tid;
         booking::select('id')->where('name', $n)->first();

         return view ('home.paymentconfirm',compact('n','g','d','t','date','data'));

         return view('home.checkout');

`

this is my route

Route::post('ticket-checkout',[bookingController::class,'checkoutpage'])->name('getmethod-checkout');

my view file

`

Guests
{{$g}}

Type
VIP

Time
 {{$d}}

`

Now i want this checkout page appear before the paymentconfirm page.


问:
Embarcadero linker errors
I am trying to use OpenSSL crypting/decrypting methods in C++ Embarcadero project (Embarcadero® C++Builder® XE2 Version 16.0.4429.46931).
I am facing linker errors on each method/object used from the OpenSSL libs:

```<code>[ILINK32 Erreur] Error: '_EVP_CIPHER_CTX_new' externe non résolu, référencé depuis C:\USERS\ADMIN_ISS\DOCUMENTS\RAD STUDIO\PROJETS\WIN32\DEBUG\OPENSSL.OBJ
[ILINK32 Erreur] Error: '_EVP_aes_256_cbc' externe non résolu, référencé depuis C:\USERS\ADMIN_ISS\DOCUMENTS\RAD STUDIO\PROJETS\WIN32\DEBUG\OPENSSL.OBJ
[ILINK32 Erreur] Error: '_EVP_EncryptInit_ex' externe non résolu, référencé depuis C:\USERS\ADMIN_ISS\DOCUMENTS\RAD STUDIO\PROJETS\WIN32\DEBUG\OPENSSL.OBJ
[ILINK32 Erreur] Error: '_ERR_print_errors_fp' externe non résolu, référencé depuis C:\USERS\ADMIN_ISS\DOCUMENTS\RAD STUDIO\PROJETS\WIN32\DEBUG\OPENSSL.OBJ
[ILINK32 Erreur] Error: '_EVP_EncryptUpdate' externe non résolu, référencé depuis C:\USERS\ADMIN_ISS\DOCUMENTS\RAD STUDIO\PROJETS\WIN32\DEBUG\OPENSSL.OBJ
[ILINK32 Erreur] Error: '_EVP_EncryptFinal_ex' externe non résolu, référencé depuis C:\USERS\ADMIN_ISS\DOCUMENTS\RAD STUDIO\PROJETS\WIN32\DEBUG\OPENSSL.OBJ
[ILINK32 Erreur] Error: '_EVP_CIPHER_CTX_free' externe non résolu, référencé depuis C:\USERS\ADMIN_ISS\DOCUMENTS\RAD STUDIO\PROJETS\WIN32\DEBUG\OPENSSL.OBJ
[ILINK32 Erreur] Error: '_BIO_dump_fp' externe non résolu, référencé depuis C:\USERS\ADMIN_ISS\DOCUMENTS\RAD STUDIO\PROJETS\WIN32\DEBUG\OPENSSL.OBJ
[ILINK32 Erreur] Error: '_EVP_DecryptInit_ex' externe non résolu, référencé depuis C:\USERS\ADMIN_ISS\DOCUMENTS\RAD STUDIO\PROJETS\WIN32\DEBUG\OPENSSL.OBJ
[ILINK32 Erreur] Error: '_EVP_DecryptUpdate' externe non résolu, référencé depuis C:\USERS\ADMIN_ISS\DOCUMENTS\RAD STUDIO\PROJETS\WIN32\DEBUG\OPENSSL.OBJ
[ILINK32 Erreur] Error: '_EVP_DecryptFinal_ex' externe non résolu, référencé depuis C:\USERS\ADMIN_ISS\DOCUMENTS\RAD STUDIO\PROJETS\WIN32\DEBUG\OPENSSL.OBJ
</code>```

I have found many clues about this type of issues on these webpages but no one worked for me.

I have verified my inclusion and library paths, I have used implib.exe to convert ssleay32.dll and libeay32.dll into .lib (I am running 32 bit OS as dev environment) and added it to the project.

Despite this, still the link errors. I don't know what I have done wrong.

I have always had this type of issue when creating new projects and trying to use libraries in them.
Using libraries seems so complicated in this IDE...

Does anybody have some clues on what to check to make it work please.

Thank you in advance.

Title: Embarcadero linker errors

Body:
I am trying to use OpenSSL crypting/decrypting methods in C++ Embarcadero project (Embarcadero® C++Builder® XE2 Version 16.0.4429.46931).
I am facing linker errors on each method/object used from the OpenSSL libs:

[ILINK32 Erreur] Error: '_EVP_CIPHER_CTX_new' externe non résolu, référencé depuis C:\USERS\ADMIN_ISS\DOCUMENTS\RAD STUDIO\PROJETS\WIN32\DEBUG\OPENSSL.OBJ
[ILINK32 Erreur] Error: '_EVP_aes_256_cbc' externe non résolu, référencé depuis C:\USERS\ADMIN_ISS\DOCUMENTS\RAD STUDIO\PROJETS\WIN32\DEBUG\OPENSSL.OBJ
[ILINK32 Erreur] Error: '_EVP_EncryptInit_ex' externe non résolu, référencé depuis C:\USERS\ADMIN_ISS\DOCUMENTS\RAD STUDIO\PROJETS\WIN32\DEBUG\OPENSSL.OBJ
[ILINK32 Erreur] Error: '_ERR_print_errors_fp' externe non résolu, référencé depuis C:\USERS\ADMIN_ISS\DOCUMENTS\RAD STUDIO\PROJETS\WIN32\DEBUG\OPENSSL.OBJ
[ILINK32 Erreur] Error: '_EVP_EncryptUpdate' externe non résolu, référencé depuis C:\USERS\ADMIN_ISS\DOCUMENTS\RAD STUDIO\PROJETS\WIN32\DEBUG\OPENSSL.OBJ
[ILINK32 Erreur] Error: '_EVP_EncryptFinal_ex' externe non résolu, référencé depuis C:\USERS\ADMIN_ISS\DOCUMENTS\RAD STUDIO\PROJETS\WIN32\DEBUG\OPENSSL.OBJ
[ILINK32 Erreur] Error: '_EVP_CIPHER_CTX_free' externe non résolu, référencé depuis C:\USERS\ADMIN_ISS\DOCUMENTS\RAD STUDIO\PROJETS\WIN32\DEBUG\OPENSSL.OBJ
[ILINK32 Erreur] Error: '_BIO_dump_fp' externe non résolu, référencé depuis C:\USERS\ADMIN_ISS\DOCUMENTS\RAD STUDIO\PROJETS\WIN32\DEBUG\OPENSSL.OBJ
[ILINK32 Erreur] Error: '_EVP_DecryptInit_ex' externe non résolu, référencé depuis C:\USERS\ADMIN_ISS\DOCUMENTS\RAD STUDIO\PROJETS\WIN32\DEBUG\OPENSSL.OBJ
[ILINK32 Erreur] Error: '_EVP_DecryptUpdate' externe non résolu, référencé depuis C:\USERS\ADMIN_ISS\DOCUMENTS\RAD STUDIO\PROJETS\WIN32\DEBUG\OPENSSL.OBJ
[ILINK32 Erreur] Error: '_EVP_DecryptFinal_ex' externe non résolu, référencé depuis C:\USERS\ADMIN_ISS\DOCUMENTS\RAD STUDIO\PROJETS\WIN32\DEBUG\OPENSSL.OBJ

I have found many clues about this type of issues on these webpages but no one worked for me.

I have verified my inclusion and library paths, I have used implib.exe to convert ssleay32.dll and libeay32.dll into .lib (I am running 32 bit OS as dev environment) and added it to the project.

Despite this, still the link errors. I don't know what I have done wrong.

I have always had this type of issue when creating new projects and trying to use libraries in them.
Using libraries seems so complicated in this IDE...

Does anybody have some clues on what to check to make it work please.

Thank you in advance.


问:
Issue adding a JWKS to panva's node oidc-provider
I am trying to add a JWKS to in node oidc-provider's configuration:

```<code>// configuration of oidc provider
const configuration = {
    jwks: {
        keys: [process.env.JWKS_PRIVATE_KEY]
    }
}
</code>```

I saved the JSKW_PRIVATE_KEY in a .env file.

```<code>JWKS_PRIVATE_KEY={"kty":"RSA","n":"lxCIgFKl1Y2yN5THM9kvV7IXI ......etc}
</code>```

But  I get the following error:

```<code>  throw new Error(err instanceof AssertionError ? err.message : 'keystore must be a JSON Web Key Set formatted object');
    ^

Error: keystore must be a JSON Web Key Set formatted object

</code>```

How do i get through this error?

Body:
I am trying to add a JWKS to in node oidc-provider's configuration:

// configuration of oidc provider
const configuration = {
    jwks: {
        keys: [process.env.JWKS_PRIVATE_KEY]
    }
}

I saved the JSKW_PRIVATE_KEY in a .env file.

JWKS_PRIVATE_KEY={"kty":"RSA","n":"lxCIgFKl1Y2yN5THM9kvV7IXI ......etc}

But  I get the following error:

  throw new Error(err instanceof AssertionError ? err.message : 'keystore must be a JSON Web Key Set formatted object');
    ^

Error: keystore must be a JSON Web Key Set formatted object

How do i get through this error?


问:
Would you annotate numbers in names as a second name / middle name or as part of the first name?
I'm currently just working on some datasets and annotate them (to train a model later) and I cannot decide if I should mark numbers (e.g. "Charles V somelastname" or "Henry the Fifth somelastname" or similar) as their own middle names or as part of the first name.

On the pro side of separating them: In natural language, we usual refer to people with names like this without the numbers so it'd make sense if my data showed that.

On the contra side: having "V" or "the Fifth" as separate middle names doesn't make much sense either to me?

This really is mainly a discussion I suppose to gather other opinions!


问:
Treating null filter values as "any" when filtering on multiple columns in SQLAlchemy
We are trying to implement the ability to search across multiple (or all) columns on joined tables in our database, but with the requirement that an arbitrary number of columns can actually be left "blank" (null) to mean "any value".

The tables can consist of 1:1, 1:Many, and Many:Many relationships, meaning that it can be problematic to try to filter on a single column at a time using Query.filter().

Here is an example of what our DB might look like:

Car

id
color
fuel_remaining

1
'Red'
14

2
'Blue'
17

Passengers

id
name
age
favorite_food
car_id

1
'Sue'
24
'spaghetti'
1

2
'Todd'
17
'oranges'
1

3
'Allison'
52
'pumpkin pie'
1

4
'Todd'
44
'spaghetti'
2

5
'Allison'
36
'nachos'
2

6
'Stephen'
46
'turkey'
2

Some examples of the types of searches we want to support:

Example A - "Find all Car.id where at least one passenger's favorite food is spaghetti." (Expected: [1, 2]).

Example B - "Find all Car.id where there is a passenger named Sue and a passenger named Stephen." (Expected: []).

Example C - "Find all Car.id where there is a passenger named Allison (age 52) and a passenger named Todd (age 17)." (Expected: [1]).

Is there a way to do this with SQLAlchemy, such that we can simply write out the code for a single query and set of filters that covers all of the possible columns we wish to filter by and then ignores any columns where the filter value for that column is None?

Our current method has been to try to map the search criteria as pydantic BaseModel and then append filters on that model that are "valid" (non-null). So first we create a basic query:

car = Car(id=1, color='Red')
passenger_a = Passenger(name='Allison', age=52)
passenger_b = Passenger(name='Todd', age=17)

new_query = session.query(Car.id)
```
<p>Then we start adding filters dynamically per column if the value of that column is not null in the pydantic BaseModel we are using as our search criteria.</p>
<p>Note that <code>my_orm_models.py</code> contains SQLAlchemy Base ORM classes (e.g <code>class Car(Base)</code>, <code>class Passenger(Base)</code>)</p>
<pre class="lang-py prettyprint-override"><code>new_query = filter_non_null(query=new_query, orm_model=car, orm_class="Car")
new_query = filter_non_null(query=new_query, orm_model=passenger_a, orm_class="Passenger")
new_query = filter_non_null(query=new_query, orm_model=passenger_b, orm_class="Passenger")
</code>```

Where filter_non_null looks like this:

import my_orm_models

def filter_non_null(query: Query, orm_model: BaseModel, orm_class: str) -> Query:
    orm_model_type = getattr(my_orm_models, orm_class)
    for k, v in orm_model.dict().items():
        if v is not None:
            field = getattr(orm_model_type, k)
            query = query.filter(field == v)

    return query
```

Obviously this implementation runs into issues as soon as we need to try to do something like Example C above, where we want to retrieve a car where each passenger is filtered on a set of AND column values.

Any ideas would be welcomed, either to try to improve our current implementation or outright replace it with another method.

Body:
We are trying to implement the ability to search across multiple (or all) columns on joined tables in our database, but with the requirement that an arbitrary number of columns can actually be left "blank" (null) to mean "any value".

The tables can consist of 1:1, 1:Many, and Many:Many relationships, meaning that it can be problematic to try to filter on a single column at a time using Query.filter().

Here is an example of what our DB might look like:

Car

id
color
fuel_remaining

1
'Red'
14

2
'Blue'
17

Passengers

id
name
age
favorite_food
car_id

1
'Sue'
24
'spaghetti'
1

2
'Todd'
17
'oranges'
1

3
'Allison'
52
'pumpkin pie'
1

4
'Todd'
44
'spaghetti'
2

5
'Allison'
36
'nachos'
2

6
'Stephen'
46
'turkey'
2

Some examples of the types of searches we want to support:

Example A - "Find all Car.id where at least one passenger's favorite food is spaghetti." (Expected: [1, 2]).

Example B - "Find all Car.id where there is a passenger named Sue and a passenger named Stephen." (Expected: []).

Example C - "Find all Car.id where there is a passenger named Allison (age 52) and a passenger named Todd (age 17)." (Expected: [1]).

Is there a way to do this with SQLAlchemy, such that we can simply write out the code for a single query and set of filters that covers all of the possible columns we wish to filter by and then ignores any columns where the filter value for that column is None?

Our current method has been to try to map the search criteria as pydantic BaseModel and then append filters on that model that are "valid" (non-null). So first we create a basic query:

car = Car(id=1, color='Red')
passenger_a = Passenger(name='Allison', age=52)
passenger_b = Passenger(name='Todd', age=17)

new_query = session.query(Car.id)

Then we start adding filters dynamically per column if the value of that column is not null in the pydantic BaseModel we are using as our search criteria.

Note that my_orm_models.py contains SQLAlchemy Base ORM classes (e.g class Car(Base), class Passenger(Base))

new_query = filter_non_null(query=new_query, orm_model=car, orm_class="Car")
new_query = filter_non_null(query=new_query, orm_model=passenger_a, orm_class="Passenger")
new_query = filter_non_null(query=new_query, orm_model=passenger_b, orm_class="Passenger")

Where filter_non_null looks like this:

import my_orm_models

def filter_non_null(query: Query, orm_model: BaseModel, orm_class: str) -> Query:
    orm_model_type = getattr(my_orm_models, orm_class)
    for k, v in orm_model.dict().items():
        if v is not None:
            field = getattr(orm_model_type, k)
            query = query.filter(field == v)

    return query

Obviously this implementation runs into issues as soon as we need to try to do something like Example C above, where we want to retrieve a car where each passenger is filtered on a set of AND column values.

Any ideas would be welcomed, either to try to improve our current implementation or outright replace it with another method.


问:
eRm package - RM function - extrapolation
I estimated a Rasch model with the eRm-Package via the RM() function in R with a data set (w_demo) that contains four binary items (W11_s:W14_s; 0/1) and 1510 cases.

```<code>w_demo <- rent21 %>%
  select(W11_s:W14_s)
# Rasch-Model (CML-estimator, conditional maximum likelihood)
rm.demo <- eRm::RM(w_demo)
tmp1 <- eRm::person.parameter(rm.demo)
pp_ml <- coef(tmp1)
</code>```

In the default-settings, there should be an estimation of the person.parameter for raw scoures 0 and 4 (via extrapolation), but I get NAs for these cases (which is described in the documentation of the package). Can anyone explain why this is the case? (I didn't find any clues).

Thank you.

I tried to set the argument

```<code>extrapolated=TRUE
</code>```

of  the coef() function in case the default is changed, but the result was the same (NA for the cases with a raw score 0 or 4).

Body:
I estimated a Rasch model with the eRm-Package via the RM() function in R with a data set (w_demo) that contains four binary items (W11_s:W14_s; 0/1) and 1510 cases.

w_demo <- rent21 %>%
  select(W11_s:W14_s)
# Rasch-Model (CML-estimator, conditional maximum likelihood)
rm.demo <- eRm::RM(w_demo)
tmp1 <- eRm::person.parameter(rm.demo)
pp_ml <- coef(tmp1)

In the default-settings, there should be an estimation of the person.parameter for raw scoures 0 and 4 (via extrapolation), but I get NAs for these cases (which is described in the documentation of the package). Can anyone explain why this is the case? (I didn't find any clues).

Thank you.

I tried to set the argument

extrapolated=TRUE

of  the coef() function in case the default is changed, but the result was the same (NA for the cases with a raw score 0 or 4).


问:
How to quantize a Sequence classification network in Matlab using calibrate
I used this network as a basic for my own Sequence classification network:

https://de.mathworks.com/help/deeplearning/ug/sequence-classification-using-1-d-convolutions.html

I used dlquantizer to quantize my network
quantObj = dlquantizer(net)

Now i want to use calibrate "calResults = calibrate(quantObj,XValidation);" but it gives me the error "scalare structure required"
If i use  "calResults = calibrate(quantObj,TValidation);" it outputs me the error "Datastore must be either an imageDatastore, augmentedImageDatastore, TransformedDatastore,
PixelLabelImageDatastore or CombinedDatastore."

How can I load the Calibrationdata?

TValidation and XValidation are 370x1 cell with Validation Data


问:
Is there a way to find a function given a picture of its graph?
For example, if I have two lists,  one representing speed, and the other, time an I plot them, plt.plot(list1,list2), I get a graph.

I would like to be able to get a mathematical function from that graph.

Using python or whatever else.


问:
Can't get Grpc-net client to log to Serilog file
No log file is created.  What's wrong with this code?  .Net Framework 4.8.</p>
```<code>var log = new LoggerConfiguration()
        .WriteTo.File(@"d:\temp\mdlogfile.txt", rollingInterval: RollingInterval.Day)
        .CreateLogger();
//log.Information("Here I am, logging.");  // this works
var lf = LoggerFactory.Create(builder =>
          builder.AddSerilog(log).SetMinimumLevel(LogLevel.Trace));
var handler = new HttpClientHandler();
var grpcChannel = GrpcChannel.ForAddress(GrpcUrl,
         new GrpcChannelOptions {
            HttpHandler = new GrpcWebHandler(handler),
            LoggerFactory = lf
         });
</code>```

Body:
No log file is created.  What's wrong with this code?  .Net Framework 4.8.

var log = new LoggerConfiguration()
        .WriteTo.File(@"d:\temp\mdlogfile.txt", rollingInterval: RollingInterval.Day)
        .CreateLogger();
//log.Information("Here I am, logging.");  // this works
var lf = LoggerFactory.Create(builder =>
          builder.AddSerilog(log).SetMinimumLevel(LogLevel.Trace));
var handler = new HttpClientHandler();
var grpcChannel = GrpcChannel.ForAddress(GrpcUrl,
         new GrpcChannelOptions {
            HttpHandler = new GrpcWebHandler(handler),
            LoggerFactory = lf
         });


问:
Chart.js : Dynamic grouped bar chart spacing issue
How can we remove the empty space and fit the chart based on the bar. I just want to check whther it is achieve with chart.js.

Here is the jsfiddle link - https://stackblitz.com/edit/chartjs-bar-chart-vsybhh?file=src%2Fapp%2Fapp.component.ts

I had tried the skipNull option but it is increasing the bar size when the no. of bar is less.


问:
Can we input json files using readStream in spark without flattening fields
I have an input streaming source that has json format source file. I want to input the data into my data frame as complete json object without flattening the fields in json.
I tried using
readStream.toJSON

but its giving me error, Can you guys suggest some possible ways to do it.

spark.readStream.load.toJSON

I m expecting complete json object but throwing me an error


问:
Is there an array/list variant that supports the "with" related functions __enter__ and __exit__ for its entries?
I want to have a list of open connections, which will be pooled within a short list. I might have reasons to remove/replace these within the list. My wrapper will implement the enter/exit API:

```<code>class ConnectionWrapper:
    def __init__(self, conn_params):
        self.conn_params = conn_params

    def __enter__(self):
        self._connection = create_connection_somehow(self.conn_params)

    def __exit__(self, exc_type, exc_val, traceback):
        # in real code, I will be handling some of the exceptions here
        # ...
        return self._connection.exit(exc_type, exc_val, traceback)
</code>```

Now say I want to have a list that manages these, I'd imagine something like:

```<code>with with_list() as connections:
    for _ in range(0, 10):
        connections.append(ConnectionWrapper("some params"))
    for conn in connections:
        conn.do_something()

### Expect here that all connection wrapper's __exit__ was called by the magic list I made up
</code>```

I think I'd know how to implement this, but I'd rather not reinvent the wheel.

Body:
I want to have a list of open connections, which will be pooled within a short list. I might have reasons to remove/replace these within the list. My wrapper will implement the enter/exit API:

class ConnectionWrapper:
    def __init__(self, conn_params):
        self.conn_params = conn_params

    def __enter__(self):
        self._connection = create_connection_somehow(self.conn_params)

    def __exit__(self, exc_type, exc_val, traceback):
        # in real code, I will be handling some of the exceptions here
        # ...
        return self._connection.exit(exc_type, exc_val, traceback)

Now say I want to have a list that manages these, I'd imagine something like:

with with_list() as connections:
    for _ in range(0, 10):
        connections.append(ConnectionWrapper("some params"))
    for conn in connections:
        conn.do_something()

### Expect here that all connection wrapper's __exit__ was called by the magic list I made up

I think I'd know how to implement this, but I'd rather not reinvent the wheel.


问:
Segmentation fault when trying to build image (with Dockerfile) after upgrading to .net 7
When trying to upgrade a project from .NET 6 to 7, I've stumbled across an issue publishing the project inside the Dockerfile flow.

On my environment the same command works without any issues, but when doing the same through the Dockerfile (docker build [...]) if fails and throws a Segmentation fault.

It might be relevant to note that I'm on a Mac with a M1 chip. I'm aware I'm building a linux image on a Mac; passing through the --platform linux/amd64 argument.

The publish step in the Dockerfile is as follows

```<code>RUN dotnet publish \
    -c release \
    -r linux-x64 \
    --no-self-contained \
    -p:PublishReadyToRun=true \
    -o published \
    function/function.csproj
</code>```

I'm also using the following base image

```<code>FROM mcr.microsoft.com/dotnet/sdk:7.0 as builder
</code>```

Before I was using the bullseye-slim variant, but swapped for the "regular" one, just in case.

Here's the error output

```<code>#26 4.225 MSBuild version 17.4.0+18d5aef85 for .NET
#26 6.047 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
#26 6.438 Segmentation fault
</code>```

I've added the -v d to get more verbosity out of the publish command but can't see anything useful in it. If anyone has any thoughts, they would be greatly appreciated.

```<code>#25 4.036 MSBuild version 17.4.0+18d5aef85 for .NET
#25 4.616 Build started 12/06/2022 15:58:06.
#25 4.635      0>Process = "/usr/share/dotnet/dotnet"
#25 4.636        MSBuild executable path = "/usr/share/dotnet/sdk/7.0.100/MSBuild.dll"
#25 4.636        Command line arguments = "/usr/share/dotnet/sdk/7.0.100/MSBuild.dll -maxcpucount -verbosity:m -restore -target:Publish --property:_IsPublishing=true --property:PublishReadyToRun=true -property:PublishDir=/source/faas/published -property:SelfContained=False -property:_CommandLineDefinedSelfContained=true -property:RuntimeIdentifier=linux-x64 -property:_CommandLineDefinedRuntimeIdentifier=true -property:Configuration=release -verbosity:d function/function.csproj"
#25 4.636        Current directory = "/source/faas"
#25 4.636        MSBuild version = "17.4.0+18d5aef85"
#25 5.120        Resolving SDK 'Microsoft.NET.Sdk'...
#25 5.416        Property 'MSBuildExtensionsPath' with value '/usr/share/dotnet/sdk/7.0.100/' expanded from the environment.
#25 5.449        Property reassignment: $(MSBuildProjectExtensionsPath)="/source/faas/function/obj/" (previous value: "obj\") at /usr/share/dotnet/sdk/7.0.100/Current/Microsoft.Common.props (56,5)
#25 5.474        The "Configuration" property is a global property, and cannot be modified.
#25 5.481        The "Configuration" property is a global property, and cannot be modified.
#25 5.482        Property reassignment: $(AssemblySearchPaths)="{CandidateAssemblyFiles};{HintPathFromItem}" (previous value: "{CandidateAssemblyFiles}") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.props (82,5)
#25 5.482        Property reassignment: $(AssemblySearchPaths)="{CandidateAssemblyFiles};{HintPathFromItem};{TargetFrameworkDirectory}" (previous value: "{CandidateAssemblyFiles};{HintPathFromItem}") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.props (83,5)
#25 5.483        Property reassignment: $(AssemblySearchPaths)="{CandidateAssemblyFiles};{HintPathFromItem};{TargetFrameworkDirectory};{RawFileName}" (previous value: "{CandidateAssemblyFiles};{HintPathFromItem};{TargetFrameworkDirectory}") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.props (84,5)
#25 5.511        Resolving SDK 'Microsoft.NET.SDK.WorkloadAutoImportPropsLocator'...
#25 5.535        Resolving SDK 'Microsoft.DotNet.ILCompiler'...
#25 5.538        Resolving SDK 'Microsoft.NET.ILLink.Tasks'...
#25 5.542        Property reassignment: $(TargetsForTfmSpecificContentInPackage)=";PackTool;_PackProjectToolValidation" (previous value: ";PackTool") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.PackProjectTool.props (15,5)
#25 5.550        Property reassignment: $(OutputType)="Exe" (previous value: "Library") at /source/faas/function/function.csproj (4,5)
#25 5.550        Property reassignment: $(RootNamespace)="OpenFaaS" (previous value: "function") at /source/faas/function/function.csproj (6,5)
#25 5.562        The "Configuration" property is a global property, and cannot be modified.
#25 5.565        Property reassignment: $(PublishProfileImported)="false" (previous value: "true") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportPublishProfile.targets (28,5)
#25 5.638        Property reassignment: $(TargetPlatformVersion)="" (previous value: "0.0") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets (65,5)
#25 5.651        Property reassignment: $(DefaultItemExcludes)=";bin\release//**;obj\release//**" (previous value: ";bin\release//**") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets (226,5)
#25 5.652        Property reassignment: $(IntermediateOutputPath)="obj\release/net7.0/" (previous value: "obj\release/") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets (245,5)
#25 5.652        Property reassignment: $(OutputPath)="bin\release/net7.0/" (previous value: "bin\release/") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets (246,5)
#25 5.655        Resolving SDK 'Microsoft.NET.SDK.WorkloadManifestTargetsLocator'...
#25 5.688        The "SelfContained" property is a global property, and cannot be modified.
#25 5.688        The "SelfContained" property is a global property, and cannot be modified.
#25 5.691        Property reassignment: $(IntermediateOutputPath)="obj\release/net7.0/linux-x64/" (previous value: "obj\release/net7.0/") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.RuntimeIdentifierInference.targets (279,5)
#25 5.691        Property reassignment: $(OutputPath)="bin\release/net7.0/linux-x64/" (previous value: "bin\release/net7.0/") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.RuntimeIdentifierInference.targets (280,5)
#25 5.693        The "PublishDir" property is a global property, and cannot be modified.
#25 5.693        The "PublishDir" property is a global property, and cannot be modified.
#25 5.695        Property reassignment: $(_FrameworkIdentifierForImplicitDefine)="NET" (previous value: "NETCOREAPP") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.BeforeCommon.targets (181,5)
#25 5.695        Property reassignment: $(_FrameworkVersionForImplicitDefine)="7_0" (previous value: "7.0") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.BeforeCommon.targets (186,5)
#25 5.766        Property reassignment: $(CommandLineArgsForDesignTimeEvaluation)="-langversion:11.0 -define:TRACE" (previous value: "-langversion:11.0") at /usr/share/dotnet/sdk/7.0.100/Roslyn/Microsoft.CSharp.Core.targets (188,5)
#25 5.857        The "Configuration" property is a global property, and cannot be modified.
#25 5.859        Property reassignment: $(_DebugSymbolsProduced)="true" (previous value: "false") at /usr/share/dotnet/sdk/7.0.100/Microsoft.Common.CurrentVersion.targets (179,5)
#25 5.859        Property reassignment: $(_DocumentationFileProduced)="false" (previous value: "true") at /usr/share/dotnet/sdk/7.0.100/Microsoft.Common.CurrentVersion.targets (185,5)
#25 5.864        The "PublishDir" property is a global property, and cannot be modified.
#25 5.864        The "PublishDir" property is a global property, and cannot be modified.
#25 5.864        Property reassignment: $(ClickOncePublishDir)="/source/faas/published/" (previous value: "/source/faas/published") at /usr/share/dotnet/sdk/7.0.100/Microsoft.Common.CurrentVersion.targets (497,5)
#25 5.864        Property reassignment: $(ProcessorArchitecture)="amd64" (previous value: "x64") at /usr/share/dotnet/sdk/7.0.100/Microsoft.Common.CurrentVersion.targets (516,5)
#25 5.865        Property reassignment: $(DelaySign)="" (previous value: "false") at /usr/share/dotnet/sdk/7.0.100/Microsoft.Common.CurrentVersion.targets (568,5)
#25 5.867        Property 'LocalAppData' with value '/root/.local/share' expanded from the environment.
#25 5.869        Property reassignment: $(_SGenGenerateSerializationAssembliesConfig)="Auto" (previous value: "") at /usr/share/dotnet/sdk/7.0.100/Microsoft.Common.CurrentVersion.targets (3789,5)
#25 5.870        Property reassignment: $(_TargetsThatPrepareProjectReferences)="
#25 5.870              AssignProjectConfiguration;
#25 5.870              _SplitProjectReferencesByFileExistence
#25 5.870            " (previous value: "_SplitProjectReferencesByFileExistence") at /usr/share/dotnet/sdk/7.0.100/Microsoft.Common.CurrentVersion.targets (4927,5)
#25 5.871        Property 'MSBuildExtensionsPath32' with value '/usr/share/dotnet/sdk/7.0.100' expanded from the environment.
#25 5.928 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
#25 6.319 Segmentation fault
</code>```

If I revert to .NET 6 (both the project and image on Dockerfile) everything works fine.

Body:
When trying to upgrade a project from .NET 6 to 7, I've stumbled across an issue publishing the project inside the Dockerfile flow.

On my environment the same command works without any issues, but when doing the same through the Dockerfile (docker build [...]) if fails and throws a Segmentation fault.

It might be relevant to note that I'm on a Mac with a M1 chip. I'm aware I'm building a linux image on a Mac; passing through the --platform linux/amd64 argument.

The publish step in the Dockerfile is as follows

RUN dotnet publish \
    -c release \
    -r linux-x64 \
    --no-self-contained \
    -p:PublishReadyToRun=true \
    -o published \
    function/function.csproj

I'm also using the following base image

FROM mcr.microsoft.com/dotnet/sdk:7.0 as builder

Before I was using the bullseye-slim variant, but swapped for the "regular" one, just in case.

Here's the error output

#26 4.225 MSBuild version 17.4.0+18d5aef85 for .NET
#26 6.047 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
#26 6.438 Segmentation fault

I've added the -v d to get more verbosity out of the publish command but can't see anything useful in it. If anyone has any thoughts, they would be greatly appreciated.

#25 4.036 MSBuild version 17.4.0+18d5aef85 for .NET
#25 4.616 Build started 12/06/2022 15:58:06.
#25 4.635      0>Process = "/usr/share/dotnet/dotnet"
#25 4.636        MSBuild executable path = "/usr/share/dotnet/sdk/7.0.100/MSBuild.dll"
#25 4.636        Command line arguments = "/usr/share/dotnet/sdk/7.0.100/MSBuild.dll -maxcpucount -verbosity:m -restore -target:Publish --property:_IsPublishing=true --property:PublishReadyToRun=true -property:PublishDir=/source/faas/published -property:SelfContained=False -property:_CommandLineDefinedSelfContained=true -property:RuntimeIdentifier=linux-x64 -property:_CommandLineDefinedRuntimeIdentifier=true -property:Configuration=release -verbosity:d function/function.csproj"
#25 4.636        Current directory = "/source/faas"
#25 4.636        MSBuild version = "17.4.0+18d5aef85"
#25 5.120        Resolving SDK 'Microsoft.NET.Sdk'...
#25 5.416        Property 'MSBuildExtensionsPath' with value '/usr/share/dotnet/sdk/7.0.100/' expanded from the environment.
#25 5.449        Property reassignment: $(MSBuildProjectExtensionsPath)="/source/faas/function/obj/" (previous value: "obj\") at /usr/share/dotnet/sdk/7.0.100/Current/Microsoft.Common.props (56,5)
#25 5.474        The "Configuration" property is a global property, and cannot be modified.
#25 5.481        The "Configuration" property is a global property, and cannot be modified.
#25 5.482        Property reassignment: $(AssemblySearchPaths)="{CandidateAssemblyFiles};{HintPathFromItem}" (previous value: "{CandidateAssemblyFiles}") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.props (82,5)
#25 5.482        Property reassignment: $(AssemblySearchPaths)="{CandidateAssemblyFiles};{HintPathFromItem};{TargetFrameworkDirectory}" (previous value: "{CandidateAssemblyFiles};{HintPathFromItem}") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.props (83,5)
#25 5.483        Property reassignment: $(AssemblySearchPaths)="{CandidateAssemblyFiles};{HintPathFromItem};{TargetFrameworkDirectory};{RawFileName}" (previous value: "{CandidateAssemblyFiles};{HintPathFromItem};{TargetFrameworkDirectory}") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.props (84,5)
#25 5.511        Resolving SDK 'Microsoft.NET.SDK.WorkloadAutoImportPropsLocator'...
#25 5.535        Resolving SDK 'Microsoft.DotNet.ILCompiler'...
#25 5.538        Resolving SDK 'Microsoft.NET.ILLink.Tasks'...
#25 5.542        Property reassignment: $(TargetsForTfmSpecificContentInPackage)=";PackTool;_PackProjectToolValidation" (previous value: ";PackTool") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.PackProjectTool.props (15,5)
#25 5.550        Property reassignment: $(OutputType)="Exe" (previous value: "Library") at /source/faas/function/function.csproj (4,5)
#25 5.550        Property reassignment: $(RootNamespace)="OpenFaaS" (previous value: "function") at /source/faas/function/function.csproj (6,5)
#25 5.562        The "Configuration" property is a global property, and cannot be modified.
#25 5.565        Property reassignment: $(PublishProfileImported)="false" (previous value: "true") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportPublishProfile.targets (28,5)
#25 5.638        Property reassignment: $(TargetPlatformVersion)="" (previous value: "0.0") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets (65,5)
#25 5.651        Property reassignment: $(DefaultItemExcludes)=";bin\release//**;obj\release//**" (previous value: ";bin\release//**") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets (226,5)
#25 5.652        Property reassignment: $(IntermediateOutputPath)="obj\release/net7.0/" (previous value: "obj\release/") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets (245,5)
#25 5.652        Property reassignment: $(OutputPath)="bin\release/net7.0/" (previous value: "bin\release/") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets (246,5)
#25 5.655        Resolving SDK 'Microsoft.NET.SDK.WorkloadManifestTargetsLocator'...
#25 5.688        The "SelfContained" property is a global property, and cannot be modified.
#25 5.688        The "SelfContained" property is a global property, and cannot be modified.
#25 5.691        Property reassignment: $(IntermediateOutputPath)="obj\release/net7.0/linux-x64/" (previous value: "obj\release/net7.0/") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.RuntimeIdentifierInference.targets (279,5)
#25 5.691        Property reassignment: $(OutputPath)="bin\release/net7.0/linux-x64/" (previous value: "bin\release/net7.0/") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.RuntimeIdentifierInference.targets (280,5)
#25 5.693        The "PublishDir" property is a global property, and cannot be modified.
#25 5.693        The "PublishDir" property is a global property, and cannot be modified.
#25 5.695        Property reassignment: $(_FrameworkIdentifierForImplicitDefine)="NET" (previous value: "NETCOREAPP") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.BeforeCommon.targets (181,5)
#25 5.695        Property reassignment: $(_FrameworkVersionForImplicitDefine)="7_0" (previous value: "7.0") at /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.BeforeCommon.targets (186,5)
#25 5.766        Property reassignment: $(CommandLineArgsForDesignTimeEvaluation)="-langversion:11.0 -define:TRACE" (previous value: "-langversion:11.0") at /usr/share/dotnet/sdk/7.0.100/Roslyn/Microsoft.CSharp.Core.targets (188,5)
#25 5.857        The "Configuration" property is a global property, and cannot be modified.
#25 5.859        Property reassignment: $(_DebugSymbolsProduced)="true" (previous value: "false") at /usr/share/dotnet/sdk/7.0.100/Microsoft.Common.CurrentVersion.targets (179,5)
#25 5.859        Property reassignment: $(_DocumentationFileProduced)="false" (previous value: "true") at /usr/share/dotnet/sdk/7.0.100/Microsoft.Common.CurrentVersion.targets (185,5)
#25 5.864        The "PublishDir" property is a global property, and cannot be modified.
#25 5.864        The "PublishDir" property is a global property, and cannot be modified.
#25 5.864        Property reassignment: $(ClickOncePublishDir)="/source/faas/published/" (previous value: "/source/faas/published") at /usr/share/dotnet/sdk/7.0.100/Microsoft.Common.CurrentVersion.targets (497,5)
#25 5.864        Property reassignment: $(ProcessorArchitecture)="amd64" (previous value: "x64") at /usr/share/dotnet/sdk/7.0.100/Microsoft.Common.CurrentVersion.targets (516,5)
#25 5.865        Property reassignment: $(DelaySign)="" (previous value: "false") at /usr/share/dotnet/sdk/7.0.100/Microsoft.Common.CurrentVersion.targets (568,5)
#25 5.867        Property 'LocalAppData' with value '/root/.local/share' expanded from the environment.
#25 5.869        Property reassignment: $(_SGenGenerateSerializationAssembliesConfig)="Auto" (previous value: "") at /usr/share/dotnet/sdk/7.0.100/Microsoft.Common.CurrentVersion.targets (3789,5)
#25 5.870        Property reassignment: $(_TargetsThatPrepareProjectReferences)="
#25 5.870              AssignProjectConfiguration;
#25 5.870              _SplitProjectReferencesByFileExistence
#25 5.870            " (previous value: "_SplitProjectReferencesByFileExistence") at /usr/share/dotnet/sdk/7.0.100/Microsoft.Common.CurrentVersion.targets (4927,5)
#25 5.871        Property 'MSBuildExtensionsPath32' with value '/usr/share/dotnet/sdk/7.0.100' expanded from the environment.
#25 5.928 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
#25 6.319 Segmentation fault

If I revert to .NET 6 (both the project and image on Dockerfile) everything works fine.


问:
Text label from variable
Good afternoon, I have a problem, I would like to know if someone can help me: The objective is to display the text of a variable("value_to_display_1"- This variable is defined on the "ScreenLogin"), inside "ScreenDisplayLabel" inside a label or something else:

```<code>from __future__ import print_function
from kivy.lang.builder import Builder
from kivy.uix.screenmanager import ScreenManager, Screen
from kivymd.app import MDApp
from plyer import notification
KV = """
WindowManager:
    ScreenLogin:
        id: ScreenLogin
    ScreenDisplayLabel:
        id: ScreenDisplayLabel
<ScreenLogin>:
    name: "ScreenLogin"
    FloatLayout:
        canvas.before:
            Color:
                rgba: 1, 1, 1, 1
            Rectangle:
                pos: self.pos
                size: self.size
        GridLayout:
            cols: 1
            spacing: 5
            size_hint: 0.8, .6
            pos_hint: {"center_x": .5, "center_y": .4}
            Label:
                text: "User"
                size_hint_x: .3
                text_size: self.size
                halign: 'center'
                valign: 'middle'
                color: 0,0,0,1
                allow_copy: True
            TextInput:
                id: user
                multiline: False
                halign: 'center'
                focus: True

            Label:
                text: "Password"
                size_hint_x: .3
                text_size: self.size
                halign: 'center'
                valign: 'middle'
                color: 0,0,0,1
            TextInput:
                id: password
                multiline: False
                password: True
                password_mask: '#'
                halign: 'center'
            Button:
                size_hint: 1., 1.
                text: "Login"
                on_release:
                    app.login()
                    app.root.current = "ScreenDisplayLabel"
                    root.manager.transition.direction = "left"
<ScreenDisplayLabel>:
    name: "ScreenDisplayLabel"
    FloatLayout:
        canvas.before:
            Color:
                rgba: 1, 1, 1, 1
            Rectangle:
                pos: self.pos
                size: self.size

"""
class ScreenLogin(Screen):
    pass
class ScreenDisplayLabel(Screen):
    pass
class WindowManager(ScreenManager):
    pass
class Teste(MDApp):
    def __init__(self, **kwargs):
        super().__init__(**kwargs)
    def build(self):
        return Builder.load_string(KV)
    def login(self):
        global user
        user = self.root.get_screen('ScreenLogin').ids.user.text
        print(user)
        password = self.root.get_screen('ScreenLogin').ids.password.text
        # Implemesta regras para acesso. Exemplo:
        if user == '1' and password == '1' \
                or user == '2' and password == '2':
                value_to_display_1 = "xxxxxxxxxxx"
                notification.notify(title='Login', message='Succsess!')
    def Extract_Value_Login(self):
        value_to_display_2 = 'yyyyyyyyyyyyyyyy'
Teste().run()
</code>```

I can't even just display the text of "value_to_display_2"

I've tried several ways to solve my problem, I've looked for alternatives all over the internet, but I haven't found a solution.

Title: Text label from variable

Body:
Good afternoon, I have a problem, I would like to know if someone can help me: The objective is to display the text of a variable("value_to_display_1"- This variable is defined on the "ScreenLogin"), inside "ScreenDisplayLabel" inside a label or something else:

from __future__ import print_function
from kivy.lang.builder import Builder
from kivy.uix.screenmanager import ScreenManager, Screen
from kivymd.app import MDApp
from plyer import notification
KV = """
WindowManager:
    ScreenLogin:
        id: ScreenLogin
    ScreenDisplayLabel:
        id: ScreenDisplayLabel
<ScreenLogin>:
    name: "ScreenLogin"
    FloatLayout:
        canvas.before:
            Color:
                rgba: 1, 1, 1, 1
            Rectangle:
                pos: self.pos
                size: self.size
        GridLayout:
            cols: 1
            spacing: 5
            size_hint: 0.8, .6
            pos_hint: {"center_x": .5, "center_y": .4}
            Label:
                text: "User"
                size_hint_x: .3
                text_size: self.size
                halign: 'center'
                valign: 'middle'
                color: 0,0,0,1
                allow_copy: True
            TextInput:
                id: user
                multiline: False
                halign: 'center'
                focus: True

            Label:
                text: "Password"
                size_hint_x: .3
                text_size: self.size
                halign: 'center'
                valign: 'middle'
                color: 0,0,0,1
            TextInput:
                id: password
                multiline: False
                password: True
                password_mask: '#'
                halign: 'center'
            Button:
                size_hint: 1., 1.
                text: "Login"
                on_release:
                    app.login()
                    app.root.current = "ScreenDisplayLabel"
                    root.manager.transition.direction = "left"
<ScreenDisplayLabel>:
    name: "ScreenDisplayLabel"
    FloatLayout:
        canvas.before:
            Color:
                rgba: 1, 1, 1, 1
            Rectangle:
                pos: self.pos
                size: self.size

"""
class ScreenLogin(Screen):
    pass
class ScreenDisplayLabel(Screen):
    pass
class WindowManager(ScreenManager):
    pass
class Teste(MDApp):
    def __init__(self, **kwargs):
        super().__init__(**kwargs)
    def build(self):
        return Builder.load_string(KV)
    def login(self):
        global user
        user = self.root.get_screen('ScreenLogin').ids.user.text
        print(user)
        password = self.root.get_screen('ScreenLogin').ids.password.text
        # Implemesta regras para acesso. Exemplo:
        if user == '1' and password == '1' \
                or user == '2' and password == '2':
                value_to_display_1 = "xxxxxxxxxxx"
                notification.notify(title='Login', message='Succsess!')
    def Extract_Value_Login(self):
        value_to_display_2 = 'yyyyyyyyyyyyyyyy'
Teste().run()

I can't even just display the text of "value_to_display_2"

I've tried several ways to solve my problem, I've looked for alternatives all over the internet, but I haven't found a solution.


问:
How to collide with walls in Python Turtle maze app
I have a labyrinth and I am moving my turtle with arrow keys using the turtle.onkeypress() function. I want it to not move if my next move is a wall.

ts is length of a single wall. mur means wall.

```<code>def gauche():
    if (typeCellule(a, b, turtle.xcor()-ts/2, turtle.ycor(), ts, liste1) == 'mur'):
        turtle.speed(0)
        turtle.color("red")
        print("wall on left")
    else:
        turtle.color("black")
        turtle.speed(120)
        turtle.setheading(180)
        turtle.forward(ts/2)
        print("gauche ; left")
def droite():
    if (typeCellule(a, b, turtle.xcor()+ts/2, turtle.ycor(), ts, liste1) == 'mur'):
        turtle.speed(0)
        turtle.color("red")
        print("mur a droite")
    else:
        turtle.color("black")
        turtle.speed(120)
        turtle.setheading(0)
        turtle.forward(ts/2)
        print("droite ; right")

def bas():
    if (typeCellule(a, b, turtle.xcor(), turtle.ycor()-ts/2, ts, liste1) == 'mur'):
        turtle.speed(0)
        turtle.color("red")
        print("mur en bas")
    else:
        turtle.color("black")
        turtle.speed(120)
        turtle.setheading(270)
        turtle.forward(ts/2)
        print("bas ; down")

def haut():
    if (typeCellule(a, b, turtle.xcor(), turtle.ycor()+ts/2, ts, liste1) == 'mur'):
        turtle.speed(0)
        turtle.color("red")
        print("mur en haut")
    else:
        turtle.color("black")
        turtle.speed(120)
        turtle.setheading(90)
        turtle.forward(ts/2)
        print("haut ; up")

# key bindings
turtle.onkeypress(gauche)
turtle.onkeypress(droite, "Right")
turtle.onkeypress(haut, "Up")
turtle.onkeypress(bas, "Down")
turtle.listen()
</code>```

With this code, when I am on a wall, it turns red but it doesn't stop moving.

Body:
I have a labyrinth and I am moving my turtle with arrow keys using the turtle.onkeypress() function. I want it to not move if my next move is a wall.

ts is length of a single wall. mur means wall.

def gauche():
    if (typeCellule(a, b, turtle.xcor()-ts/2, turtle.ycor(), ts, liste1) == 'mur'):
        turtle.speed(0)
        turtle.color("red")
        print("wall on left")
    else:
        turtle.color("black")
        turtle.speed(120)
        turtle.setheading(180)
        turtle.forward(ts/2)
        print("gauche ; left")
def droite():
    if (typeCellule(a, b, turtle.xcor()+ts/2, turtle.ycor(), ts, liste1) == 'mur'):
        turtle.speed(0)
        turtle.color("red")
        print("mur a droite")
    else:
        turtle.color("black")
        turtle.speed(120)
        turtle.setheading(0)
        turtle.forward(ts/2)
        print("droite ; right")

def bas():
    if (typeCellule(a, b, turtle.xcor(), turtle.ycor()-ts/2, ts, liste1) == 'mur'):
        turtle.speed(0)
        turtle.color("red")
        print("mur en bas")
    else:
        turtle.color("black")
        turtle.speed(120)
        turtle.setheading(270)
        turtle.forward(ts/2)
        print("bas ; down")

def haut():
    if (typeCellule(a, b, turtle.xcor(), turtle.ycor()+ts/2, ts, liste1) == 'mur'):
        turtle.speed(0)
        turtle.color("red")
        print("mur en haut")
    else:
        turtle.color("black")
        turtle.speed(120)
        turtle.setheading(90)
        turtle.forward(ts/2)
        print("haut ; up")

# key bindings
turtle.onkeypress(gauche)
turtle.onkeypress(droite, "Right")
turtle.onkeypress(haut, "Up")
turtle.onkeypress(bas, "Down")
turtle.listen()

With this code, when I am on a wall, it turns red but it doesn't stop moving.


问:
Can't understand how to use eventEmitter with async listener
Project
Nestjs Node Fastify EventEmitter Nestjs Event Emitter

I've been using event emitting for 2 years, and i've recently updated nestjs and nestJS/eventemitter to 9.X.

I don't know why but my listener are now running in an infinite loop.
I've been reading all the internet today and can't manage to find a good explanation about what is doing  those options https://github.com/EventEmitter2/EventEmitter2#emitteronevent-listener-options-objectboolean

I just want to do this kinda stuff :

```<code>controller.someroute() => {
   await doingSomeStuff()

   // no await, i dont want the listener to return anything
   // those listener makes unimportant stuff
   emit('event.someEvent')

   return "ok"
}

@OnEvent('event.someEvent')
async listenMethod() {
  await sendemail()
  await sendnotif()
}
</code>```

Is this behavior the right approach ? or am i missing something ?
Again , it was working before upgrading .

The request was replied BEFORE the listener could do their stuff

Body:
Project
Nestjs Node Fastify EventEmitter Nestjs Event Emitter

I've been using event emitting for 2 years, and i've recently updated nestjs and nestJS/eventemitter to 9.X.

I don't know why but my listener are now running in an infinite loop.
I've been reading all the internet today and can't manage to find a good explanation about what is doing  those options https://github.com/EventEmitter2/EventEmitter2#emitteronevent-listener-options-objectboolean

I just want to do this kinda stuff :

controller.someroute() => {
   await doingSomeStuff()

   // no await, i dont want the listener to return anything
   // those listener makes unimportant stuff
   emit('event.someEvent')

   return "ok"
}

@OnEvent('event.someEvent')
async listenMethod() {
  await sendemail()
  await sendnotif()
}

Is this behavior the right approach ? or am i missing something ?
Again , it was working before upgrading .

The request was replied BEFORE the listener could do their stuff


问:
How to remove default superscript from gtsummary table column headers?
enter image description here
gtsummary creates column headers with a superscript of 1 when we use variables in the superscript. Is there a way to disable this?

I've tried using exponential = FALSE, but that doesn't seem to work with tbl_reg_summary(). I also need to remove the superscript "1" on the first line of the foot note. This is the table I'm trying to create

```<code> dm_shell <-  dm %>%
  select(-USUBJID) %>%

mutate(AGEGR1 = factor(AGEGR1, levels = c("18 - < 65", "65 - < 75", "> = 75"))) %>%

  tbl_reg_summary(
    digits = everything() ~  style_xxx,
    by = TRTPG4,
    hide_n = TRUE,
    #type = all_continuous() ~ "continuous2",
    #stat_fns = everything() ~ my_stats
    exponential = FALSE,
    statistic = all_continuous() ~ c("{N_nonmiss}","{mean}({sd})","{median}","{min},{max}","{N_miss}")
  ) %>%

  add_overall(last = TRUE, col_label = "All Patients") %>%

  bold_labels() %>%

  modify_header(
    list(
      all_stat_cols(stat_0 = FALSE) ~ "**{level}**  \n (N=xx)",
      stat_0 ~ "**All Patients**  \n (N=xx)"
    ))  %>%

  add_stat_label(label = AGE ~ c("N","Mean (SD)","Median","Min,Max", "Missing")) %>%

  modify_footnote(all_stat_cols() ~ "Date of Data Cut: DD-MONTH NAME-YY, N = number of patients in each group; n = number of patients with data available;percentages are based on N.\n")
</code>```

I didn't not find any sources online that can resolve the problem.

Body:
enter image description here
gtsummary creates column headers with a superscript of 1 when we use variables in the superscript. Is there a way to disable this?

I've tried using exponential = FALSE, but that doesn't seem to work with tbl_reg_summary(). I also need to remove the superscript "1" on the first line of the foot note. This is the table I'm trying to create

 dm_shell <-  dm %>%
  select(-USUBJID) %>%

mutate(AGEGR1 = factor(AGEGR1, levels = c("18 - < 65", "65 - < 75", "> = 75"))) %>%

  tbl_reg_summary(
    digits = everything() ~  style_xxx,
    by = TRTPG4,
    hide_n = TRUE,
    #type = all_continuous() ~ "continuous2",
    #stat_fns = everything() ~ my_stats
    exponential = FALSE,
    statistic = all_continuous() ~ c("{N_nonmiss}","{mean}({sd})","{median}","{min},{max}","{N_miss}")
  ) %>%

  add_overall(last = TRUE, col_label = "All Patients") %>%

  bold_labels() %>%

  modify_header(
    list(
      all_stat_cols(stat_0 = FALSE) ~ "**{level}**  \n (N=xx)",
      stat_0 ~ "**All Patients**  \n (N=xx)"
    ))  %>%

  add_stat_label(label = AGE ~ c("N","Mean (SD)","Median","Min,Max", "Missing")) %>%

  modify_footnote(all_stat_cols() ~ "Date of Data Cut: DD-MONTH NAME-YY, N = number of patients in each group; n = number of patients with data available;percentages are based on N.\n")

I didn't not find any sources online that can resolve the problem.


问:
504 Gateway Time-out django mail
I use nginx. I get this error when I try to send an email. The SMTP data is completely correct.

settings.py:

```<code>EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.yandex.ru'
EMAIL_PORT = 465
EMAIL_USE_TLS = True
EMAIL_HOST_USER = "123@yandex.ru"
EMAIL_HOST_PASSWORD = "1234"
DEFAULT_FROM_EMAIL = "123@yandex.ru"
</code>```

send email

```<code>message = render_to_string('user/email_confirmation.html', context=context)
email = EmailMessage(
    '124',
    message,
    to=[user.email],
)
email.send()
</code>```

On the other server, everything is exactly the same and everything works. But here there is an error.

Title: 504 Gateway Time-out django mail

Body:
I use nginx. I get this error when I try to send an email. The SMTP data is completely correct.

settings.py:

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.yandex.ru'
EMAIL_PORT = 465
EMAIL_USE_TLS = True
EMAIL_HOST_USER = "123@yandex.ru"
EMAIL_HOST_PASSWORD = "1234"
DEFAULT_FROM_EMAIL = "123@yandex.ru"

send email

message = render_to_string('user/email_confirmation.html', context=context)
email = EmailMessage(
    '124',
    message,
    to=[user.email],
)
email.send()

On the other server, everything is exactly the same and everything works. But here there is an error.


问:
User will enter: 1.His/her DOB. 2.Present day date . You need to calculate and let the user know how many days that person survived in this world
Design an application where user will input two dates.

His/her date of birth in DD/MM/YY format.

Current (Present day) date in DD/MM/YY format.
You have to calculate and let the user know how many days that person survived in this world.

i tried to make the code but my output days are coming wrong. Please help me in this.