问:
How to draw a line with registration color using itext7
I want to draw a line with PANTONE color using iText7.Code here.

```<code>string src = @"Registrationcolor.pdf";
string outPath = @"Registrationcolor_out.pdf";
using PdfDocument doc = new PdfDocument(new PdfReader(src), new PdfWriter(outPath));
var page = doc.GetFirstPage();
PdfCanvas canvas = new PdfCanvas(page);
canvas.SaveState();
canvas.MoveTo(40f, 700f);
canvas.LineTo(80f, 700f);
Color color = new Separation(CreateCmykColorSpace(1f,1f,1f,1f, "PANTONE 124 EC 1"));
canvas.SetStrokeColor(color);
canvas.SetLineWidth(3f);
canvas.Stroke();
canvas.RestoreState();

PdfSpecialCs.Separation CreateCmykColorSpace(float c, float m, float y, float k, string name)
{
    float[] c0 = new float[] { 0, 0, 0, 0 };
    float[] c1 = new float[] { c, m, y, k };
    PdfFunction pdfFunction = new PdfFunction.Type2(new PdfArray(new float[] { 0, 1 }),
            null, new PdfArray(c0), new PdfArray(c1), new PdfNumber(1));
    PdfSpecialCs.Separation cs = new PdfSpecialCs.Separation(name,
            new DeviceCmyk(c, m, y, k).GetColorSpace(), pdfFunction);
    return cs;
}
</code>```

The original color is all 100%,Total Area Coverage is 500%.screenshot.

But the color of my line just PANTONE 100%,Total Area Coverage is 100%.screenshot

It seems that I should try to add CMYK color separated on the basis of PANTONE color.

Is it possible to draw a line with the same color as the original.

The source pdf
and the output pdf.

Body:
I want to draw a line with PANTONE color using iText7.Code here.

string src = @"Registrationcolor.pdf";
string outPath = @"Registrationcolor_out.pdf";
using PdfDocument doc = new PdfDocument(new PdfReader(src), new PdfWriter(outPath));
var page = doc.GetFirstPage();
PdfCanvas canvas = new PdfCanvas(page);
canvas.SaveState();
canvas.MoveTo(40f, 700f);
canvas.LineTo(80f, 700f);
Color color = new Separation(CreateCmykColorSpace(1f,1f,1f,1f, "PANTONE 124 EC 1"));
canvas.SetStrokeColor(color);
canvas.SetLineWidth(3f);
canvas.Stroke();
canvas.RestoreState();

PdfSpecialCs.Separation CreateCmykColorSpace(float c, float m, float y, float k, string name)
{
    float[] c0 = new float[] { 0, 0, 0, 0 };
    float[] c1 = new float[] { c, m, y, k };
    PdfFunction pdfFunction = new PdfFunction.Type2(new PdfArray(new float[] { 0, 1 }),
            null, new PdfArray(c0), new PdfArray(c1), new PdfNumber(1));
    PdfSpecialCs.Separation cs = new PdfSpecialCs.Separation(name,
            new DeviceCmyk(c, m, y, k).GetColorSpace(), pdfFunction);
    return cs;
}

The original color is all 100%,Total Area Coverage is 500%.screenshot.

But the color of my line just PANTONE 100%,Total Area Coverage is 100%.screenshot

It seems that I should try to add CMYK color separated on the basis of PANTONE color.

Is it possible to draw a line with the same color as the original.

The source pdf
and the output pdf.


来源: stackexchange

问:
VSCode extension's configuration get conflicts between Native Windows and WSL2
I use VSCode for both Windows and WSL2. When VSCode connecting to WSL2, I can download extension for WSL2. I think it is independent from Windows.

But I found the extension share a same configuration for Windows and WSL2.
For excample, the extension CMake Tools. In its setting, I can set CMake Path. I want that, in Windows, the CMake Path is c:\packages\msys2\usr\bin\cmake.exe and in WSL2, the path should be /usr/bin/cmake.

But it seems if I change the configuration on Windows, the WSL's changes simultaneously. Vice versa.

Can I have independent configurations?

ContentLicense: CC BY-SA 4.0


问:
Why does loop based on empty vector return unique values
Suppose the following list which is a result of an api call

```<code>    y <- list(list(`@_fa` = "true", `$` = "Computer Science (all)", `@code` = "1700",
        `@abbrev` = "COMP"), list(`@_fa` = "true", `$` = "Information Systems and Management",
        `@code` = "1802", `@abbrev` = "DECI"), list(`@_fa` = "true",
        `$` = "Library and Information Sciences", `@code` = "3309",
        `@abbrev` = "SOCI"))

> y

[[1]]
[[1]]$`@_fa`
[1] "true"

[[1]]$`$`
[1] "Computer Science (all)"

[[1]]$`@code`
[1] "1700"

[[1]]$`@abbrev`
[1] "COMP"

[[2]]
[[2]]$`@_fa`
[1] "true"

[[2]]$`$`
[1] "Information Systems and Management"

[[2]]$`@code`
[1] "1802"

[[2]]$`@abbrev`
[1] "DECI"

[[3]]
[[3]]$`@_fa`
[1] "true"

[[3]]$`$`
[1] "Library and Information Sciences"

[[3]]$`@code`
[1] "3309"

[[3]]$`@abbrev`
[1] "SOCI"
</code>```

If I run the following loop, I get a vector, my_vec, of the values stored in $@code. However, these are duplicated three times, i.e.:

```<code>for (i in 1:length(y)) {

  #extract
  out <- y[[i]]$`@code`
  my_vec <- c(out, my_vec)

}

> my_vec
[1] "3309" "1802" "1700" "3309" "1802" "1700" "3309" "1802" "1700"
</code>```

If I create an empty character vector before running the loop, it gives me the unique values:

```<code>my_vec <- character() #empty vector

for (i in 1:length(y)) {

  #extract
  out <- y[[i]]$`@code`
  my_vec <- c(out, my_vec)

}

> my_vec
[1] "3309" "1802" "1700"
</code>```

The last result is what I need, but I am afraid it does other things that I am not aware of - and I am using it in a very large loop, so I want to be sure that no un-intended things happen!

Can anyone explain the difference - why does making the empty vector return unique values?

Body:
Suppose the following list which is a result of an api call

    y <- list(list(`@_fa` = "true", `$` = "Computer Science (all)", `@code` = "1700",
        `@abbrev` = "COMP"), list(`@_fa` = "true", `$` = "Information Systems and Management",
        `@code` = "1802", `@abbrev` = "DECI"), list(`@_fa` = "true",
        `$` = "Library and Information Sciences", `@code` = "3309",
        `@abbrev` = "SOCI"))

> y

[[1]]
[[1]]$`@_fa`
[1] "true"

[[1]]$`$`
[1] "Computer Science (all)"

[[1]]$`@code`
[1] "1700"

[[1]]$`@abbrev`
[1] "COMP"

[[2]]
[[2]]$`@_fa`
[1] "true"

[[2]]$`$`
[1] "Information Systems and Management"

[[2]]$`@code`
[1] "1802"

[[2]]$`@abbrev`
[1] "DECI"

[[3]]
[[3]]$`@_fa`
[1] "true"

[[3]]$`$`
[1] "Library and Information Sciences"

[[3]]$`@code`
[1] "3309"

[[3]]$`@abbrev`
[1] "SOCI"

If I run the following loop, I get a vector, my_vec, of the values stored in $@code. However, these are duplicated three times, i.e.:

for (i in 1:length(y)) {

  #extract
  out <- y[[i]]$`@code`
  my_vec <- c(out, my_vec)

}

> my_vec
[1] "3309" "1802" "1700" "3309" "1802" "1700" "3309" "1802" "1700"

If I create an empty character vector before running the loop, it gives me the unique values:

my_vec <- character() #empty vector

for (i in 1:length(y)) {

  #extract
  out <- y[[i]]$`@code`
  my_vec <- c(out, my_vec)

}

> my_vec
[1] "3309" "1802" "1700"

The last result is what I need, but I am afraid it does other things that I am not aware of - and I am using it in a very large loop, so I want to be sure that no un-intended things happen!

Can anyone explain the difference - why does making the empty vector return unique values?


问:
How to implement axon server connection check to readiness probe
I need to implement readiness and liveness probes for every microservice in my project.
In my readiness probe I need to check if our springboot application is connected to axon server.
How can I manually test if axon server is connected?

I was thinking that it is enough to add axon-spring-boot-starter dependency and it will be attached to
/actuator/health. But it did't happen.


问:
Databricks: Jar file changed but does not reflect to cluster
I made a 'a' job with 'A' cluster and uploaded 'former.jar' file on dependent libraries.
I found that I had a typo on 'former.jar' so I changed it with 'latter.jar' file on the dependent libraries.
However, when I see the log I can see same error log with 'former.jar'

I tried to made a new job named 'b' with 'A' cluster but it does not reflect change of 'latter.jar' too. But when I made a new job named 'c' with 'B' cluster. it worked.
And then, I made a 'latterlatter.jar' and uploaded in 'c', it does not reflect too.

I don't know what is the problem


问:
Serilog does not send log to Elasticsearch asp.net core
I'm using Serilog and Elasticearch For my asp.net core app but when I open Kibana => Managment => DataViews, I can not find my application, and here is the configuration:

Program.cs

```<code>builder.AddSerilog(builder.Configuration, "Appraisal360-Backend");
</code>```
```<code>public static class SerilogExtensions
    {

        public static WebApplicationBuilder AddSerilog(this WebApplicationBuilder builder, IConfiguration configuration, string applicationName)
        {
            Log.Logger = new LoggerConfiguration()
                .ReadFrom.Configuration(configuration)
                .Enrich.FromLogContext()
                .Enrich.WithProperty("ApplicationName", $"{applicationName} - {Environment.GetEnvironmentVariable("DOTNET_ENVIRONMENT")}")
                .Enrich.WithExceptionDetails()
                .Filter.ByExcluding(Matching.FromSource("Microsoft.AspNetCore.StaticFiles"))
                .WriteTo.Async(writeTo => writeTo.Elasticsearch(new ElasticsearchSinkOptions(new Uri(configuration["ElasticsearchSettings:uri"]))
                {
                    TypeName = null,
                    AutoRegisterTemplate = true,
                    IndexFormat = configuration["ElasticsearchSettings:defaultIndex"],
                    BatchAction = ElasticOpType.Create,
                    CustomFormatter = new EcsTextFormatter(),
                    //ModifyConnectionSettings = x => x.BasicAuthentication(configuration["ElasticsearchSettings:username"], configuration["ElasticsearchSettings:password"])
                }))
                .WriteTo.Async(writeTo => writeTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj} {Properties:j}{NewLine}{Exception}"))
                .CreateLogger();

            builder.Logging.ClearProviders();
            builder.Host.UseSerilog(Log.Logger, true);

            return builder;
        }

        public static WebApplication UseSerilog(this WebApplication app)
        {
            app.UseMiddleware<ExceptionMiddleware>();
            app.UseSerilogRequestLogging(opts =>
            {
                opts.EnrichDiagnosticContext = LogEnricherExtensions.EnrichFromRequest;
            });

            return app;
        }
    }
</code>```

appsettings.json

```<code>{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning",
      "Hangfire": "Information"
    }
  },
  "Serilog": {
    "Using": [ "Serilog.Sinks.File", "Serilog.Sinks.Console", "Serilog.Sinks.Elasticsearch" ],
    "MinimumLevel": {
      "Default": "Information"
    },
    "WriteTo": [
      {
        "Name": "File",
        "Args": {
          "path": "../logs/360-.log",
          "rollingInterval": "Day",
          "outputTemplate": "[{Timestamp:yyyy-MM-dd HH:mm:ss} {CorrelationId} {Level:u3}] {Message:lj}{NewLine}{Exception}"
        }
      },
      {
        "Name": "Console",
        "Args": {
          "theme": "Serilog.Sinks.SystemConsole.Themes.AnsiConsoleTheme::Code, Serilog.Sinks.Console",
          "outputTemplate": "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj} <s:{SourceContext}>{NewLine}{Exception}"
        }
      }
    ]
  },
  "ElasticsearchSettings": {
    "uri": "http://localhost:9200",
    "defaultIndex": "Appraisal360-BackEnd"
  },

  "ElasticApm": {
    "SecretToken": "",
    "ServerUrls": "http://192.168.62.66:8200", //Set custom APM Server URL (default: http://localhost:8200)
    "ServiceName": "Appraisal360-BackEnd", //allowed characters: a-z, A-Z, 0-9, -, _, and space. Default is the entry assembly of the application
    "Environment": "production" // Set the service environment
  },
  "AllowedHosts": "*"
}
</code>```

as you see I added all the configuration that needed, but the problem is that Kibana in ViewData could not find my Application

Note: My Elasticsearch and Kibana work without problem.

Body:
I'm using Serilog and Elasticearch For my asp.net core app but when I open Kibana => Managment => DataViews, I can not find my application, and here is the configuration:

Program.cs

builder.AddSerilog(builder.Configuration, "Appraisal360-Backend");

public static class SerilogExtensions
    {

        public static WebApplicationBuilder AddSerilog(this WebApplicationBuilder builder, IConfiguration configuration, string applicationName)
        {
            Log.Logger = new LoggerConfiguration()
                .ReadFrom.Configuration(configuration)
                .Enrich.FromLogContext()
                .Enrich.WithProperty("ApplicationName", $"{applicationName} - {Environment.GetEnvironmentVariable("DOTNET_ENVIRONMENT")}")
                .Enrich.WithExceptionDetails()
                .Filter.ByExcluding(Matching.FromSource("Microsoft.AspNetCore.StaticFiles"))
                .WriteTo.Async(writeTo => writeTo.Elasticsearch(new ElasticsearchSinkOptions(new Uri(configuration["ElasticsearchSettings:uri"]))
                {
                    TypeName = null,
                    AutoRegisterTemplate = true,
                    IndexFormat = configuration["ElasticsearchSettings:defaultIndex"],
                    BatchAction = ElasticOpType.Create,
                    CustomFormatter = new EcsTextFormatter(),
                    //ModifyConnectionSettings = x => x.BasicAuthentication(configuration["ElasticsearchSettings:username"], configuration["ElasticsearchSettings:password"])
                }))
                .WriteTo.Async(writeTo => writeTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj} {Properties:j}{NewLine}{Exception}"))
                .CreateLogger();

            builder.Logging.ClearProviders();
            builder.Host.UseSerilog(Log.Logger, true);

            return builder;
        }

        public static WebApplication UseSerilog(this WebApplication app)
        {
            app.UseMiddleware<ExceptionMiddleware>();
            app.UseSerilogRequestLogging(opts =>
            {
                opts.EnrichDiagnosticContext = LogEnricherExtensions.EnrichFromRequest;
            });

            return app;
        }
    }

appsettings.json

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning",
      "Hangfire": "Information"
    }
  },
  "Serilog": {
    "Using": [ "Serilog.Sinks.File", "Serilog.Sinks.Console", "Serilog.Sinks.Elasticsearch" ],
    "MinimumLevel": {
      "Default": "Information"
    },
    "WriteTo": [
      {
        "Name": "File",
        "Args": {
          "path": "../logs/360-.log",
          "rollingInterval": "Day",
          "outputTemplate": "[{Timestamp:yyyy-MM-dd HH:mm:ss} {CorrelationId} {Level:u3}] {Message:lj}{NewLine}{Exception}"
        }
      },
      {
        "Name": "Console",
        "Args": {
          "theme": "Serilog.Sinks.SystemConsole.Themes.AnsiConsoleTheme::Code, Serilog.Sinks.Console",
          "outputTemplate": "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj} <s:{SourceContext}>{NewLine}{Exception}"
        }
      }
    ]
  },
  "ElasticsearchSettings": {
    "uri": "http://localhost:9200",
    "defaultIndex": "Appraisal360-BackEnd"
  },

  "ElasticApm": {
    "SecretToken": "",
    "ServerUrls": "http://192.168.62.66:8200", //Set custom APM Server URL (default: http://localhost:8200)
    "ServiceName": "Appraisal360-BackEnd", //allowed characters: a-z, A-Z, 0-9, -, _, and space. Default is the entry assembly of the application
    "Environment": "production" // Set the service environment
  },
  "AllowedHosts": "*"
}

as you see I added all the configuration that needed, but the problem is that Kibana in ViewData could not find my Application

Note: My Elasticsearch and Kibana work without problem.


问:
Getting RuntimeError when running code in VSC jupyter notebook on a server
I am trying to run code on a ubuntu server via VSC and in Jupyter notebook. I have installed ipykernel and jupyter in my environment.
This is the error I am getting:

```<code>RuntimeError: Permissions assignment failed for secure file: '~/.local/share/jupyter/runtime/kernel-v2-57188QDPtO0X1JWo.json'. Got '0o677' instead of '0o0600'
</code>```

I do not have root access on this ubuntu server machine. Is this error related to the permissions over the files? I appreciate any guidance.

Body:
I am trying to run code on a ubuntu server via VSC and in Jupyter notebook. I have installed ipykernel and jupyter in my environment.
This is the error I am getting:

RuntimeError: Permissions assignment failed for secure file: '~/.local/share/jupyter/runtime/kernel-v2-57188QDPtO0X1JWo.json'. Got '0o677' instead of '0o0600'

I do not have root access on this ubuntu server machine. Is this error related to the permissions over the files? I appreciate any guidance.


问:
How to force FastApi to return formatted DateTime
According to the documentation, this is how the datetime type is returned:

A Python datetime.datetime.  In requests and responses will be
represented as a str in ISO 8601 format, like:
2008-09-15T15:53:00+05:00

I'm having difficulties dealing with that date format on my front end. Is it possible to force FastAPI to return a DateTime so it only shows date + hours/minutes/seconds?


问:
Dash server unavailable
I developed a data science app using Dash, the code runs fine (I get no code related errors)
Yet from time to time, I get this error that forces to re-start my data treatment from the beginning.

```<code>Error: Callback failed: the server did not respond.

    at http://127.0.0.1:8034/_dash-component-suites/dash/dash-renderer/build/dash_renderer.v2_5_1m1664281770.dev.js:845:11
</code>```

Have any of you seen this before?

Thanks in advance

I tried to look for solutions on the dash plotly community page, nothing works for now.

Title: Dash server unavailable

Body:
I developed a data science app using Dash, the code runs fine (I get no code related errors)
Yet from time to time, I get this error that forces to re-start my data treatment from the beginning.

Error: Callback failed: the server did not respond.

    at http://127.0.0.1:8034/_dash-component-suites/dash/dash-renderer/build/dash_renderer.v2_5_1m1664281770.dev.js:845:11

Have any of you seen this before?

Thanks in advance

I tried to look for solutions on the dash plotly community page, nothing works for now.


问:
selectbox 1 selection controls select box 2 (But with data from mySQL)
How do I control select box 2's output based on what is selected in select box 1?

If I select Record 1 from Select Box 1, it outputs the Record 1 ID in header. I want to output all Records in Select Box 2 with Record 1 ID.

How do I implement this, is my SQL select statement incorrect? Do I need to say something like:

Edit
Please delete.

```<code>$quer=mysql_query("SELECT DISTINCT projectName, projectID
                   FROM projects
                   WHERE clientID=$cat
                   ORDER BY projectName");
</code>```

Above works.

```<code>else {
  $quer=mysql_query("SELECT DISTINCT projectName, projectID
                     FROM projects
                     WHERE projectID = $cat
                     ORDER BY projectName"); }
</code>```

Above doesn't work but I feel I'm close but no cigar?

```<code><?php
@$cat=$_GET['cat'];
if(strlen($cat) > 0 and !is_numeric($cat)) {
  echo "Data Error";
  exit;
}

$quer2 = mysql_query("SELECT DISTINCT clientName,clientID
                      FROM clients
                      ORDER BY clientName");

if(isset($cat) and strlen($cat) > 0) {
  $quer = mysql_query("SELECT DISTINCT projectName
                     FROM projects
                     WHERE projectID = $cat
                     ORDER BY projectName");
} else {
  $quer = mysql_query("SELECT DISTINCT projectName
                       FROM projects
                       ORDER BY projectName");
}
echo "<form method=post name=f1 action='dd-check.php'>";

echo "<select name='cat' onchange=\"reload(this.form)\"><option value=''>Select one</option>";
while ($noticia2 = mysql_fetch_array($quer2)) {
  if ($noticia2['clientID'] == @$cat) {
    echo "<option selected value='$noticia2[clientID]'>$noticia2[clientName]</option>"."<BR>";
  } else {
    echo  "<option value='$noticia2[clientID]'>$noticia2[clientName]</option>";
  }
}
echo "</select>";

echo "<select name='subcat'><option value=''>Select one</option>";
while($noticia = mysql_fetch_array($quer)) {
  echo  "<option value='$noticia[projectName]'>$noticia[projectName]</option>";
}
echo "</select>";

echo "<input type=submit value=Submit>";
echo "</form>";
?>
</code>```

ContentLicense: CC BY-SA 3.0

Body:
How do I control select box 2's output based on what is selected in select box 1?

If I select Record 1 from Select Box 1, it outputs the Record 1 ID in header. I want to output all Records in Select Box 2 with Record 1 ID.

How do I implement this, is my SQL select statement incorrect? Do I need to say something like:

Edit
Please delete.

$quer=mysql_query("SELECT DISTINCT projectName, projectID
                   FROM projects
                   WHERE clientID=$cat
                   ORDER BY projectName");

Above works.

else {
  $quer=mysql_query("SELECT DISTINCT projectName, projectID
                     FROM projects
                     WHERE projectID = $cat
                     ORDER BY projectName"); }

Above doesn't work but I feel I'm close but no cigar?

<?php
@$cat=$_GET['cat'];
if(strlen($cat) > 0 and !is_numeric($cat)) {
  echo "Data Error";
  exit;
}

$quer2 = mysql_query("SELECT DISTINCT clientName,clientID
                      FROM clients
                      ORDER BY clientName");

if(isset($cat) and strlen($cat) > 0) {
  $quer = mysql_query("SELECT DISTINCT projectName
                     FROM projects
                     WHERE projectID = $cat
                     ORDER BY projectName");
} else {
  $quer = mysql_query("SELECT DISTINCT projectName
                       FROM projects
                       ORDER BY projectName");
}
echo "<form method=post name=f1 action='dd-check.php'>";

echo "<select name='cat' onchange=\"reload(this.form)\"><option value=''>Select one</option>";
while ($noticia2 = mysql_fetch_array($quer2)) {
  if ($noticia2['clientID'] == @$cat) {
    echo "<option selected value='$noticia2[clientID]'>$noticia2[clientName]</option>"."
";
  } else {
    echo  "<option value='$noticia2[clientID]'>$noticia2[clientName]</option>";
  }
}
echo "</select>";

echo "<select name='subcat'><option value=''>Select one</option>";
while($noticia = mysql_fetch_array($quer)) {
  echo  "<option value='$noticia[projectName]'>$noticia[projectName]</option>";
}
echo "</select>";

echo "<input type=submit value=Submit>";
echo "</form>";
?>


问:
Converting MDX content to array for Next.js
I try to create NextJS component for my content project.

I am using this starter:

https://github.com/timlrx/tailwind-nextjs-starter-blog

which use MDX for rendering Markdown documents.

In my .md file I'd like to use the following structute:

```<code>`<Proscons>
[-] cons
[-] cons
[+] pros
</Proscons>`
</code>```

Please help me, thanks!

I added MDX component to my NextJS project:

```<code>`const Proscons = ({ ...rest }) =>
<div className="alert alert-secondary" {...rest} />
export default Proscons`
</code>```

I want to convert 'Proscons' content (from .md file) to a string and then convert it to array with pros and cons list as HTML UL list.

The problem that I don't know how to get  content which I can convert to array.

Body:
I try to create NextJS component for my content project.

I am using this starter:

https://github.com/timlrx/tailwind-nextjs-starter-blog

which use MDX for rendering Markdown documents.

In my .md file I'd like to use the following structute:

`<Proscons>
[-] cons
[-] cons
[+] pros
</Proscons>`

Please help me, thanks!

I added MDX component to my NextJS project:

`const Proscons = ({ ...rest }) =>

export default Proscons`

I want to convert 'Proscons' content (from .md file) to a string and then convert it to array with pros and cons list as HTML UL list.

The problem that I don't know how to get  content which I can convert to array.


问:
relation does not exist 42P01
I am getting folowwing error when execute my stored procedure. Does anyone knows how can i solve this issue? The table mentioned in error is always the same and it's the first one from the top of the list from my schema.

This is my error:

```<code> relation "t_ser_d2ert" does not exist 42P01
</code>```

This is my stored procedure:

```<code>CREATE OR REPLACE PROCEDURE schem.myprocedure()
 LANGUAGE plpgsql
AS $procedure$
declare
sessionPid numeric = pg_backend_pid();
BEGIN

    begin
        raise notice 'schem.myprocedure()';

            insert into myschema.t_tables (tablename, sizemb, rowcounts, created)
SELECT
   table_name as tablename,
   (pg_relation_size(quote_ident(table_name)) / 1024 /1024) sizemb,
   reltuples as rowcounts, NOW() FROM information_schema.tables ist
left join pg_class pc on pc.relname = ist.table_name
   WHERE table_schema = 'myschema';

  exception
                    when others then
                        raise notice ' >> Error for schem.myprocedure()>> % %', sqlerrm, sqlstate;

            end ;

END;
$procedure$
;
</code>```

Title: relation does not exist 42P01

Body:
I am getting folowwing error when execute my stored procedure. Does anyone knows how can i solve this issue? The table mentioned in error is always the same and it's the first one from the top of the list from my schema.

This is my error:

 relation "t_ser_d2ert" does not exist 42P01

This is my stored procedure:

CREATE OR REPLACE PROCEDURE schem.myprocedure()
 LANGUAGE plpgsql
AS $procedure$
declare
sessionPid numeric = pg_backend_pid();
BEGIN

    begin
        raise notice 'schem.myprocedure()';

            insert into myschema.t_tables (tablename, sizemb, rowcounts, created)
SELECT
   table_name as tablename,
   (pg_relation_size(quote_ident(table_name)) / 1024 /1024) sizemb,
   reltuples as rowcounts, NOW() FROM information_schema.tables ist
left join pg_class pc on pc.relname = ist.table_name
   WHERE table_schema = 'myschema';

  exception
                    when others then
                        raise notice ' >> Error for schem.myprocedure()>> % %', sqlerrm, sqlstate;

            end ;

END;
$procedure$
;


问:
I have a problem with using AWS secrets manager with Spring Boot app to get AWS RDS credentials
this is my pom.xml dependencie that I'm using:

```<code><dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>com.amazonaws.secretsmanager</groupId>
        <artifactId>aws-secretsmanager-jdbc</artifactId>
        <version>${aws-secretsmanager-jdbc.version}</version>
    </dependency>
    <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
    </dependency>
</dependencies>

<properties>
    <aws-secretsmanager-jdbc.version>1.0.5</aws-secretsmanager-jdbc.version>
</properties>
</code>```

this is my application.properties:

```<code>spring.datasource.driver-classname=com.amazonaws.secretsmanager.sql.AWSSecretsManagerPostgreSQLDriver
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
spring.datasource.url=jdbc-secretsmanager:postgresql://postgres-db.cjqt4bf02oy9.ap-northeast-2.rds.amazonaws.com:5432/postgres-db
spring.datasource.username=dev/dbCreds/demo
</code>```

unfortunately I got this error:

```<code>com.amazonaws.services.secretsmanager.model.ResourceNotFoundException: Secrets Manager can't find the specified secret. (Service: AWSSecretsManager; Status Code: 400; Error Code: ResourceNotFoundException; Request ID: 6571600b-61bc-4889-ad74-f41c678bfd89; Proxy: null)
</code>```

BTW I was following this article: Spring Boot Externalized Database Configuration with AWS Secrets Manager

I have searched around but couldn't find any solution.

Body:
this is my pom.xml dependencie that I'm using:

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>com.amazonaws.secretsmanager</groupId>
        <artifactId>aws-secretsmanager-jdbc</artifactId>
        <version>${aws-secretsmanager-jdbc.version}</version>
    </dependency>
    <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
    </dependency>
</dependencies>

<properties>
    <aws-secretsmanager-jdbc.version>1.0.5</aws-secretsmanager-jdbc.version>
</properties>

this is my application.properties:

spring.datasource.driver-classname=com.amazonaws.secretsmanager.sql.AWSSecretsManagerPostgreSQLDriver
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
spring.datasource.url=jdbc-secretsmanager:postgresql://postgres-db.cjqt4bf02oy9.ap-northeast-2.rds.amazonaws.com:5432/postgres-db
spring.datasource.username=dev/dbCreds/demo

unfortunately I got this error:

com.amazonaws.services.secretsmanager.model.ResourceNotFoundException: Secrets Manager can't find the specified secret. (Service: AWSSecretsManager; Status Code: 400; Error Code: ResourceNotFoundException; Request ID: 6571600b-61bc-4889-ad74-f41c678bfd89; Proxy: null)

BTW I was following this article: Spring Boot Externalized Database Configuration with AWS Secrets Manager

I have searched around but couldn't find any solution.


问:
OpenCV with CMake not working, unsure why
Trying to get OpenCV included in my C++ project, but having issues for some reason...

I followed the instructions to install from source:

```<code>git clone https://github.com/opencv/opencv.git
mkdir build && cd build
cmake ../opencv
make -j4
make install
</code>```

I can see it in my /usr/local/include under 'opencv4'

In my CMakeLists.txt I have:

```<code>add_executable(Nssams main.cpp ${BACKWARD_ENABLE})

add_subdirectory(camera)
add_subdirectory(mqtt_client)
add_subdirectory(jsoncpp)
add_subdirectory(serial)
add_subdirectory(backward-cpp)

if(${BUILD_WITH_TESTING})
    add_subdirectory(tests)
endif()

find_package(PahoMqttCpp REQUIRED)
find_package(spdlog REQUIRED)
find_package(OpenCV REQUIRED)

message(STATUS "OpenCV_INCLUDE_DIRS = ${OpenCV_INCLUDE_DIRS}")
message(STATUS "OpenCV LIBS = ${OpenCV_LIBS}")

target_link_libraries(Nssams
    mqtt
    camera
    jsoncpp
    serial
    PahoMqttCpp::paho-mqttpp3-static
    spdlog
    ${OpenCV_LIBS}
)
</code>```

The messages are spitting out:

```<code>[cmake] -- OpenCV_INCLUDE_DIRS = /usr/local/include/opencv4
[cmake] -- OpenCV LIBS = opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_gapi;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;
</code>```

But when I try to #include, i.e.

```<code>#include "opencv4/opencv2/core.hpp"
</code>```

It's red underlined and the error says

```<code>#include errors detected based on information provided by the configurationProvider setting. Squiggles are disabled for this translation unit (/home/bwhitely/Projects/NSSAMS/nssams-cpp-ebcmos/src/camera/ebcmos.cpp).C/C++(1696)
cannot open source file "opencv2/core/cvdef.h" (dependency of "opencv4/opencv2/core.hpp")C/C++(1696)
</code>```

Where am I going wrong?
I have done very similar things with the spdlog library that's in the CMakeLists.txt with no issues. Just built it from source, added it to the CMakeLists.txt and could use without issues

EDIT:
CMakeLists.txt build output while having #include "opencv4/opencv2/core/core.hpp" included in a .cpp file

```<code>[main] Building folder: nssams-cpp-ebcmos
[build] Starting build
[proc] Executing command: /usr/bin/cmake --build /home/bwhitely/Projects/NSSAMS/nssams-cpp-ebcmos/build --config Debug --target all -j 4 --
[build] Consolidate compiler generated dependencies of target backward_object
[build] Consolidate compiler generated dependencies of target camera
[build] Consolidate compiler generated dependencies of target jsoncpp
[build] Consolidate compiler generated dependencies of target mqtt
[build] [  6%] Built target backward_object
[build] [ 12%] Building CXX object src/camera/CMakeFiles/camera.dir/ebcmos.cpp.o
[build] [ 31%] Built target mqtt
[build] [ 43%] Built target jsoncpp
[build] Consolidate compiler generated dependencies of target serial
[build] Consolidate compiler generated dependencies of target backward
[build] [ 56%] Built target backward
[build] [ 68%] Built target serial
[build] In file included from /home/bwhitely/Projects/NSSAMS/nssams-cpp-ebcmos/src/camera/ebcmos.cpp:8:
[build] /usr/local/include/opencv4/opencv2/core/core.hpp:48:10: fatal error: opencv2/core.hpp: No such file or directory
[build]    48 | #include "opencv2/core.hpp"
[build]       |          ^~~~~~~~~~~~~~~~~~
[build] compilation terminated.
[build] gmake[2]: *** [src/camera/CMakeFiles/camera.dir/build.make:104: src/camera/CMakeFiles/camera.dir/ebcmos.cpp.o] Error 1
[build] gmake[1]: *** [CMakeFiles/Makefile2:219: src/camera/CMakeFiles/camera.dir/all] Error 2
[build] gmake: *** [Makefile:136: all] Error 2
[proc] The command: /usr/bin/cmake --build /home/bwhitely/Projects/NSSAMS/nssams-cpp-ebcmos/build --config Debug --target all -j 4 -- exited with code: 2 and signal: null
[build] Build finished with exit code 2
</code>```

It does build correctly if I do not have that include defined
output below:

```<code>[main] Building folder: nssams-cpp-ebcmos
[build] Starting build
[proc] Executing command: /usr/bin/cmake --build /home/bwhitely/Projects/NSSAMS/nssams-cpp-ebcmos/build --config Debug --target all -j 4 --
[build] [  6%] Building CXX object src/camera/CMakeFiles/camera.dir/ebcmos.cpp.o
[build] [ 12%] Built target backward_object
[build] [ 25%] Built target jsoncpp
[build] [ 43%] Built target mqtt
[build] [ 56%] Built target serial
[build] [ 68%] Built target backward
[build] [ 75%] Linking CXX static library ../../lib/libcamera.a
[build] [ 87%] Built target camera
[build] Consolidate compiler generated dependencies of target Nssams
[build] [ 93%] Linking CXX executable ../bin/Nssams
[build] [100%] Built target Nssams
[build] Build finished with exit code 0
</code>```

Body:
Trying to get OpenCV included in my C++ project, but having issues for some reason...

I followed the instructions to install from source:

git clone https://github.com/opencv/opencv.git
mkdir build && cd build
cmake ../opencv
make -j4
make install

I can see it in my /usr/local/include under 'opencv4'

In my CMakeLists.txt I have:

add_executable(Nssams main.cpp ${BACKWARD_ENABLE})

add_subdirectory(camera)
add_subdirectory(mqtt_client)
add_subdirectory(jsoncpp)
add_subdirectory(serial)
add_subdirectory(backward-cpp)

if(${BUILD_WITH_TESTING})
    add_subdirectory(tests)
endif()

find_package(PahoMqttCpp REQUIRED)
find_package(spdlog REQUIRED)
find_package(OpenCV REQUIRED)

message(STATUS "OpenCV_INCLUDE_DIRS = ${OpenCV_INCLUDE_DIRS}")
message(STATUS "OpenCV LIBS = ${OpenCV_LIBS}")

target_link_libraries(Nssams
    mqtt
    camera
    jsoncpp
    serial
    PahoMqttCpp::paho-mqttpp3-static
    spdlog
    ${OpenCV_LIBS}
)

The messages are spitting out:

[cmake] -- OpenCV_INCLUDE_DIRS = /usr/local/include/opencv4
[cmake] -- OpenCV LIBS = opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_gapi;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;

But when I try to #include, i.e.

#include "opencv4/opencv2/core.hpp"

It's red underlined and the error says

#include errors detected based on information provided by the configurationProvider setting. Squiggles are disabled for this translation unit (/home/bwhitely/Projects/NSSAMS/nssams-cpp-ebcmos/src/camera/ebcmos.cpp).C/C++(1696)
cannot open source file "opencv2/core/cvdef.h" (dependency of "opencv4/opencv2/core.hpp")C/C++(1696)

Where am I going wrong?
I have done very similar things with the spdlog library that's in the CMakeLists.txt with no issues. Just built it from source, added it to the CMakeLists.txt and could use without issues

EDIT:
CMakeLists.txt build output while having #include "opencv4/opencv2/core/core.hpp" included in a .cpp file

[main] Building folder: nssams-cpp-ebcmos
[build] Starting build
[proc] Executing command: /usr/bin/cmake --build /home/bwhitely/Projects/NSSAMS/nssams-cpp-ebcmos/build --config Debug --target all -j 4 --
[build] Consolidate compiler generated dependencies of target backward_object
[build] Consolidate compiler generated dependencies of target camera
[build] Consolidate compiler generated dependencies of target jsoncpp
[build] Consolidate compiler generated dependencies of target mqtt
[build] [  6%] Built target backward_object
[build] [ 12%] Building CXX object src/camera/CMakeFiles/camera.dir/ebcmos.cpp.o
[build] [ 31%] Built target mqtt
[build] [ 43%] Built target jsoncpp
[build] Consolidate compiler generated dependencies of target serial
[build] Consolidate compiler generated dependencies of target backward
[build] [ 56%] Built target backward
[build] [ 68%] Built target serial
[build] In file included from /home/bwhitely/Projects/NSSAMS/nssams-cpp-ebcmos/src/camera/ebcmos.cpp:8:
[build] /usr/local/include/opencv4/opencv2/core/core.hpp:48:10: fatal error: opencv2/core.hpp: No such file or directory
[build]    48 | #include "opencv2/core.hpp"
[build]       |          ^~~~~~~~~~~~~~~~~~
[build] compilation terminated.
[build] gmake[2]: *** [src/camera/CMakeFiles/camera.dir/build.make:104: src/camera/CMakeFiles/camera.dir/ebcmos.cpp.o] Error 1
[build] gmake[1]: *** [CMakeFiles/Makefile2:219: src/camera/CMakeFiles/camera.dir/all] Error 2
[build] gmake: *** [Makefile:136: all] Error 2
[proc] The command: /usr/bin/cmake --build /home/bwhitely/Projects/NSSAMS/nssams-cpp-ebcmos/build --config Debug --target all -j 4 -- exited with code: 2 and signal: null
[build] Build finished with exit code 2

It does build correctly if I do not have that include defined
output below:

[main] Building folder: nssams-cpp-ebcmos
[build] Starting build
[proc] Executing command: /usr/bin/cmake --build /home/bwhitely/Projects/NSSAMS/nssams-cpp-ebcmos/build --config Debug --target all -j 4 --
[build] [  6%] Building CXX object src/camera/CMakeFiles/camera.dir/ebcmos.cpp.o
[build] [ 12%] Built target backward_object
[build] [ 25%] Built target jsoncpp
[build] [ 43%] Built target mqtt
[build] [ 56%] Built target serial
[build] [ 68%] Built target backward
[build] [ 75%] Linking CXX static library ../../lib/libcamera.a
[build] [ 87%] Built target camera
[build] Consolidate compiler generated dependencies of target Nssams
[build] [ 93%] Linking CXX executable ../bin/Nssams
[build] [100%] Built target Nssams
[build] Build finished with exit code 0


问:
Flutter Stepper overflow
Hi I am creating a horizontal stepper but it's getting overflow to the right any fixes ?

```<code>Container(
  height: MediaQuery.of(context).size.height - 200,
  width: MediaQuery.of(context).size.width,
  child: Stepper(
    type: StepperType.horizontal,
    physics:
        const ScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
    currentStep: _currentStep,
    onStepTapped: (step) => tapped(step),
    onStepContinue: continued,
    onStepCancel: cancel,
    steps: <Step>[
      Step(
        title: const Text('Personal Info'),
        content: Column(
          children: <Widget>[
            TextFormField(
              decoration:
                  const InputDecoration(labelText: 'Email Address'),
            ),
            TextFormField(
              decoration:
                  const InputDecoration(labelText: 'Password'),
            ),
            const SizedBox(
              height: 15,
            ),
          ],
        ),
        isActive: _currentStep >= 0,
        state: _currentStep >= 0
            ? StepState.complete
            : StepState.disabled,
      ),
      Step(
        title: const Text('Company Info'),
        content: Column(
          children: <Widget>[
            TextFormField(
              decoration:
                  const InputDecoration(labelText: 'Home Address'),
            ),
            TextFormField(
              decoration:
                  const InputDecoration(labelText: 'Postcode'),
            ),
          ],
        ),
        isActive: _currentStep >= 0,
        state: _currentStep >= 1
            ? StepState.complete
            : StepState.disabled,
      ),
      Step(
        title: const Text('Request Detail'),
        content: Column(
          children: <Widget>[
            TextFormField(
              decoration:
                  const InputDecoration(labelText: 'Mobile Number'),
            ),
          ],
        ),
        isActive: _currentStep >= 0,
        state: _currentStep >= 2
            ? StepState.complete
            : StepState.disabled,
      ),
    ],
  ),
),
</code>```

have tried with listview and giving it horizontal axis but doesn't work any fixes in the code will be great thanks in advance and what can be the best way to manage stepper

also tried
physics:
const ScrollPhysics(parent: AlwaysScrollableScrollPhysics()), don't know this can help

Title: Flutter Stepper overflow

Body:
Hi I am creating a horizontal stepper but it's getting overflow to the right any fixes ?

Container(
  height: MediaQuery.of(context).size.height - 200,
  width: MediaQuery.of(context).size.width,
  child: Stepper(
    type: StepperType.horizontal,
    physics:
        const ScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
    currentStep: _currentStep,
    onStepTapped: (step) => tapped(step),
    onStepContinue: continued,
    onStepCancel: cancel,
    steps: <Step>[
      Step(
        title: const Text('Personal Info'),
        content: Column(
          children: <Widget>[
            TextFormField(
              decoration:
                  const InputDecoration(labelText: 'Email Address'),
            ),
            TextFormField(
              decoration:
                  const InputDecoration(labelText: 'Password'),
            ),
            const SizedBox(
              height: 15,
            ),
          ],
        ),
        isActive: _currentStep >= 0,
        state: _currentStep >= 0
            ? StepState.complete
            : StepState.disabled,
      ),
      Step(
        title: const Text('Company Info'),
        content: Column(
          children: <Widget>[
            TextFormField(
              decoration:
                  const InputDecoration(labelText: 'Home Address'),
            ),
            TextFormField(
              decoration:
                  const InputDecoration(labelText: 'Postcode'),
            ),
          ],
        ),
        isActive: _currentStep >= 0,
        state: _currentStep >= 1
            ? StepState.complete
            : StepState.disabled,
      ),
      Step(
        title: const Text('Request Detail'),
        content: Column(
          children: <Widget>[
            TextFormField(
              decoration:
                  const InputDecoration(labelText: 'Mobile Number'),
            ),
          ],
        ),
        isActive: _currentStep >= 0,
        state: _currentStep >= 2
            ? StepState.complete
            : StepState.disabled,
      ),
    ],
  ),
),

have tried with listview and giving it horizontal axis but doesn't work any fixes in the code will be great thanks in advance and what can be the best way to manage stepper

also tried
physics:
const ScrollPhysics(parent: AlwaysScrollableScrollPhysics()), don't know this can help


问:
TOMCAT 8.5 does not accept requests, when I post SOAP Envilopes as plain string via EthernetClient
I have a WebApp running on Tomcat. WebApp has its own Apache CXF Web-service inside.

Test version is running on tomcat 8.0,
Prod version is running on tomcat 8.5

There are some IoT devices within my network sending data to WebService.

All of them uses Arduino httpClent and are sending plain SOAP envilopes as XML.
This works fine both on TC 8.0/8.5

One device use Arduino EthernetClient and it is more sophisticated task to send POST request to WebService.

```<code>client.println("POST http://10.2.222.91:8080/OBe111/services/outers HTTP/1.1");
//client.println("Accept-Encoding: gzip,deflate");
//client.println("Content-Type: text/xml;charset=UTF-8");
//client.println("SOAPAction: 'saveBeamData'");
client.println("User-Agent: arduino-ethernet");
client.println("Connection: Keep-Alive");
String data= "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:out='http://outer.kanika.com/'><soapenv:Header/><soapenv:Body><out:saveBeamData><department_id>2</department_id><beamAddress>2893EB0030210845</beamAddress><outletAddress>8</outletAddress></out:saveBeamData></soapenv:Body></soapenv:Envelope>";

client.print("Content-Length: ");
client.println(data.length());
client.println();
client.print(data);
client.println();
client.println();
</code>```

This code, as it was mentioned before, works fine on TC 8.0 and backed error 400 on TC 8.5.
I do understand that some symbols are wrong for TC 8.5 but can't understand how to send XMLSOAP body without <,>,'

There are samples how to return TC 8.5 into scence. To congigure Connector in server.xml.
I tried all samples I've got
The last one

```<code><Connector URIEncoding="utf-8" connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" relaxedPathChars="[]|{}^\`"<>" relaxedQueryChars="[]|{}^\`"<>"/>
</code>```

There were several relaxedQueryChars variants.

But no magic happened. I even can't see what happens on TC 8.5 side because HTTP Server monitor stayed calm.

On the client side I tried to encode XMLSOAP part but then 403 or 500 error were returning.

I tried to understand how to organize my client side code looking at SmartBear SOAP UI.
SOAP UI sends requests both to webService on TC 8.0 and TC 8.5 successfully.

SOAP UI Request and Response

I will highly appreciate any suggestions on the subject.
Thanks in advance!

Body:
I have a WebApp running on Tomcat. WebApp has its own Apache CXF Web-service inside.

Test version is running on tomcat 8.0,
Prod version is running on tomcat 8.5

There are some IoT devices within my network sending data to WebService.

All of them uses Arduino httpClent and are sending plain SOAP envilopes as XML.
This works fine both on TC 8.0/8.5

One device use Arduino EthernetClient and it is more sophisticated task to send POST request to WebService.

client.println("POST http://10.2.222.91:8080/OBe111/services/outers HTTP/1.1");
//client.println("Accept-Encoding: gzip,deflate");
//client.println("Content-Type: text/xml;charset=UTF-8");
//client.println("SOAPAction: 'saveBeamData'");
client.println("User-Agent: arduino-ethernet");
client.println("Connection: Keep-Alive");
String data= "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:out='http://outer.kanika.com/'><soapenv:Header/><soapenv:Body><out:saveBeamData><department_id>2</department_id><beamAddress>2893EB0030210845</beamAddress><outletAddress>8</outletAddress></out:saveBeamData></soapenv:Body></soapenv:Envelope>";

client.print("Content-Length: ");
client.println(data.length());
client.println();
client.print(data);
client.println();
client.println();

This code, as it was mentioned before, works fine on TC 8.0 and backed error 400 on TC 8.5.
I do understand that some symbols are wrong for TC 8.5 but can't understand how to send XMLSOAP body without <,>,'

There are samples how to return TC 8.5 into scence. To congigure Connector in server.xml.
I tried all samples I've got
The last one

<Connector URIEncoding="utf-8" connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" relaxedPathChars="[]|{}^\`"<>" relaxedQueryChars="[]|{}^\`"<>"/>

There were several relaxedQueryChars variants.

But no magic happened. I even can't see what happens on TC 8.5 side because HTTP Server monitor stayed calm.

On the client side I tried to encode XMLSOAP part but then 403 or 500 error were returning.

I tried to understand how to organize my client side code looking at SmartBear SOAP UI.
SOAP UI sends requests both to webService on TC 8.0 and TC 8.5 successfully.

SOAP UI Request and Response

I will highly appreciate any suggestions on the subject.
Thanks in advance!


问:
How to fix Module parse failed: Unexpected token (7463:26) with VueJs and Nuxt Js
I got this Error when i try to use PDFKit with vuejs and nuxtjs how can I fix it

```<code> ERROR  in ./node_modules/fontkit/dist/module.mjs                                                                                friendly-errors 15:00:37

Module parse failed: Unexpected token (7463:26)                                                                                friendly-errors 15:00:37
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
| };
| class $5340de7a86f3ae85$export$2e2bcd8739ae039 {
>     static zeroMarkWidths = 'AFTER_GPOS';
|     static plan(plan, glyphs, features) {
|         // Plan the features we want to apply
                                                                                friendly-errors 15:00:37
 @ ./node_modules/pdfkit/js/pdfkit.es5.js 5:0-30 3897:15-22 3899:15-22 3901:15-22
 @ ./node_modules/babel-loader/lib??ref--3-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/index.vue?vue&type=script&lang=js&
 @ ./pages/index.vue?vue&type=script&lang=js&
 @ ./pages/index.vue
 @ ./.nuxt/router.js
 @ ./.nuxt/index.js
 @ ./.nuxt/client.js
 @ multi ./node_modules/eventsource-polyfill/dist/browserify-eventsource.js (webpack)-hot-middleware/client.js?reload=true&timeout=30000&ansiColors=&overlayStyles=&path=%2F__webpack_hmr%2Fclient&name=client ./.nuxt/client.js
                                                                                friendly-errors 15:00:37
i Nuxt Bridge has now been released in beta. It has full composition API support and it's strongly recommended to migrate from @nuxtjs/composition-api, if possible, by following the steps at https://v3.nuxtjs.org/getting-started/bridge. Feedback welcome at https://github.com/nuxt-community/composition-api/discussions/585.
</code>```

first it's error with can't find fs and I fix it but at least this one error i can't solve
I try to find any solve but I can't please help

Body:
I got this Error when i try to use PDFKit with vuejs and nuxtjs how can I fix it

 ERROR  in ./node_modules/fontkit/dist/module.mjs                                                                                friendly-errors 15:00:37

Module parse failed: Unexpected token (7463:26)                                                                                friendly-errors 15:00:37
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
| };
| class $5340de7a86f3ae85$export$2e2bcd8739ae039 {
>     static zeroMarkWidths = 'AFTER_GPOS';
|     static plan(plan, glyphs, features) {
|         // Plan the features we want to apply
                                                                                friendly-errors 15:00:37
 @ ./node_modules/pdfkit/js/pdfkit.es5.js 5:0-30 3897:15-22 3899:15-22 3901:15-22
 @ ./node_modules/babel-loader/lib??ref--3-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/index.vue?vue&type=script&lang=js&
 @ ./pages/index.vue?vue&type=script&lang=js&
 @ ./pages/index.vue
 @ ./.nuxt/router.js
 @ ./.nuxt/index.js
 @ ./.nuxt/client.js
 @ multi ./node_modules/eventsource-polyfill/dist/browserify-eventsource.js (webpack)-hot-middleware/client.js?reload=true&timeout=30000&ansiColors=&overlayStyles=&path=%2F__webpack_hmr%2Fclient&name=client ./.nuxt/client.js
                                                                                friendly-errors 15:00:37
i Nuxt Bridge has now been released in beta. It has full composition API support and it's strongly recommended to migrate from @nuxtjs/composition-api, if possible, by following the steps at https://v3.nuxtjs.org/getting-started/bridge. Feedback welcome at https://github.com/nuxt-community/composition-api/discussions/585.

first it's error with can't find fs and I fix it but at least this one error i can't solve
I try to find any solve but I can't please help


问:
How to output 'msg' from Backend(Express.js) to Frontend(Vue.js) of my template
So in my case I want to display the error from Backend(Express.js) I declared the message with 'msg' and it worked by masking data in postman and now I want to output the error to my frontend(Vue.js).
How to? I've tried and failed

This my code Backend(Express.js)

```<code>export const createUser = async (req, res) => {
    const {name, email, password, confPassword, number, role} = req.body;

    if (password !== confPassword) return res.status(400).json({msg: 'Password Tidak Sama!!'});
    const hashPassword = await argon2.hash(password);
    try{
        await User.create({
            name: name,
            email: email,
            password: hashPassword,
            number: number,
            role: role
        });

        const transporter = nodemailer.createTransport({
            service: "gmail",
            auth: {
                user: process.env.EMAIL,
                pass: process.env.PASSWORD,
            },
        });
        const mailOptions = {
            from: process.env.EMAIL,
            to: email,
            subject: "Register Telah Berhasil",
            html: `<h1>Selamat Bergabung</h1>`,
        };
        transporter.sendMail(mailOptions, (err, info) => {
            if (err) {
                console.log(err);
            } else {
                console.log(`Email sent: ${info.response}`);
            }
        });

        res.status(201).json({msg: "Registrasi Berhasil!!"});
    } catch (error){
        res.status(400).json(error);
    }
}
</code>```

Then my code Frontend(Vue.js) Template

```<code><template>
    <!-- register vuetify with icon -->
    <v-container>
        <div>
        <Header/>
        </div>
        <v-row>
            <v-col cols="12" sm="8" md="6">
                <v-card>
                    <v-card-title>
                        <v-icon>mdi-account-plus</v-icon>
                        <span class="headline ml-1">Register Disini</span>
                    </v-card-title>
                    <v-card-text>
                    <p> Pesan : {{message}} </p>
                        <v-form ref="form">
                            <v-text-field
                                v-model="name"
                                label="Name"
                                required
                            ></v-text-field>
                            <v-text-field
                                v-model="email"
                                label="E-mail"
                                required
                            ></v-text-field>
                            <v-text-field
                                v-model="password"
                                label="Password"
                                required
                            ></v-text-field>
                            <v-text-field
                                v-model="confPassword"
                                label="Conf Password"
                                required
                            ></v-text-field>
                            <v-text-field
                                v-model="number"
                                label="Number"
                                required
                            ></v-text-field>
                            <v-text-field
                                v-model="role"
                                label="Roles"
                                required
                            ></v-text-field>
                        </v-form>
                    </v-card-text>
                    <v-card-actions>
                        <v-spacer></v-spacer>
                        <v-btn color="primary" style="width: 100%;" @click="register">Register</v-btn>
                    </v-card-actions>
                </v-card>
            </v-col>
        </v-row>
    </v-container>
</template>
</code>```

And this my code Frontend(Vue.js) Script

```<code><script>

import Header from '@/components/Header.vue';
import axios from 'axios';
export default {
    name: "createUser",
    data () {
        return {
          name: "",
          email: "",
          password: "",
          confPassword: "",
          number: "",
          role: "",
          message: "",
        };
    },
    methods:{
        async register(){
            try{
                await axios.post("http://localhost:5000/user",{
                    name: this.name,
                    email: this.email,
                    password: this.password,
                    confPassword: this.confPassword,
                    number: this.number,
                    role: this.role
                }).then((res) => {
                    this.message = res.data.id
                });
                this.name;
                this.email;
                this.password;
                this.confPassword;
                this.number;
                this.role;
                this.$router.push("/");
            } catch (err){
                console.log(err);
            }
        },
    },
  };

</script>
</code>```

Body:
So in my case I want to display the error from Backend(Express.js) I declared the message with 'msg' and it worked by masking data in postman and now I want to output the error to my frontend(Vue.js).
How to? I've tried and failed

This my code Backend(Express.js)

export const createUser = async (req, res) => {
    const {name, email, password, confPassword, number, role} = req.body;

    if (password !== confPassword) return res.status(400).json({msg: 'Password Tidak Sama!!'});
    const hashPassword = await argon2.hash(password);
    try{
        await User.create({
            name: name,
            email: email,
            password: hashPassword,
            number: number,
            role: role
        });

        const transporter = nodemailer.createTransport({
            service: "gmail",
            auth: {
                user: process.env.EMAIL,
                pass: process.env.PASSWORD,
            },
        });
        const mailOptions = {
            from: process.env.EMAIL,
            to: email,
            subject: "Register Telah Berhasil",
            html: `<h1>Selamat Bergabung</h1>`,
        };
        transporter.sendMail(mailOptions, (err, info) => {
            if (err) {
                console.log(err);
            } else {
                console.log(`Email sent: ${info.response}`);
            }
        });

        res.status(201).json({msg: "Registrasi Berhasil!!"});
    } catch (error){
        res.status(400).json(error);
    }
}

Then my code Frontend(Vue.js) Template

<template>

    <v-container>

        <v-row>
            <v-col cols="12" sm="8" md="6">
                <v-card>
                    <v-card-title>
                        <v-icon>mdi-account-plus</v-icon>
                        Register Disini
                    </v-card-title>
                    <v-card-text>

 Pesan : {{message}}

                        <v-form ref="form">
                            <v-text-field
                                v-model="name"
                                label="Name"
                                required
                            ></v-text-field>
                            <v-text-field
                                v-model="email"
                                label="E-mail"
                                required
                            ></v-text-field>
                            <v-text-field
                                v-model="password"
                                label="Password"
                                required
                            ></v-text-field>
                            <v-text-field
                                v-model="confPassword"
                                label="Conf Password"
                                required
                            ></v-text-field>
                            <v-text-field
                                v-model="number"
                                label="Number"
                                required
                            ></v-text-field>
                            <v-text-field
                                v-model="role"
                                label="Roles"
                                required
                            ></v-text-field>
                        </v-form>
                    </v-card-text>
                    <v-card-actions>
                        <v-spacer></v-spacer>
                        <v-btn color="primary" style="width: 100%;" @click="register">Register</v-btn>
                    </v-card-actions>
                </v-card>
            </v-col>
        </v-row>
    </v-container>
</template>

And this my code Frontend(Vue.js) Script


问:
When serializing my Java map key-value pair to JSON, how can I add JSON keys?
I have a Java map Map<String, String> map = Collections.singletonMap("dummyKey", "dummyValue").
When I use ObjectMapper to serialize it, I get {"dummyKey":"dummyValue"}.
Is there any way that I can insert JSON keys in the process of serialization so my JSON string looks like {"key":"dummyKey", "value":"dummyValue"}.

I'd like to be able to do this without having to create a separate class, if possible. I'm looking for something like the allow explicit property renaming feature.

I looked at the other mapper features provided, but can't find anything useful. I don't want to create a different class because I want to retain the ability to be able to use it as a map (look up by key) when I deserialize it later. I'm looking for something that'll only change the way serialization and deserialization happen.


问:
Google Play Developer reporting api crash rate not working (Kotlin)
I'm trying to get crash rate of my app on play store by reporting api.

so, i threw some exception in downloaded app.

in google play console, crash was recorded.

but reporting api still gives nothing.

response code: 200

Json: {} (nothing in json)

how can i do that..

documentis here

and my code:

Main.kt

val metricRetrofit = Retrofit.Builder()
    .baseUrl(BaseUrl.CRASH_RATE_BASE_URL)
    .addConverterFactory(GsonConverterFactory.create())
    .addCallAdapterFactory(CoroutineCallAdapterFactory())
    .client(OkHttpClient.Builder().build())
    .build()
    .create(MetricSetApi::class.java)

val startTime = DateTime(year = 2021, month = 11, day = 1,null,null,null,null)// time_zone = TimeZone())
val endTime = DateTime(year = 2022, month = 12, day = 6,null,null,null,null)// time_zone = TimeZone())

val crashMQueryBody = CrashRateQueryBody(
    TimelineSpec(
        aggregation_period = "DAILY",
        startTime = startTime,//TimeZone()),
        endTime = endTime//TimeZone())
    ), arrayListOf("apiLevel"), arrayListOf("crashRate")
)
val mBody = metricRetrofit.postCrashRageMetricSet("Bearer $token", "{my package name}", crashMQueryBody)
```
<p><strong>interface for retrofit</strong></p>
<pre class="lang-kotlin prettyprint-override"><code>interface MetricSetApi {

    @POST("{packageName}/crashRateMetricSet:query")
    suspend fun postCrashRageMetricSet(
        @Header("Authorization")
        token:String,
        @Path("packageName")
        packageName:String,
        @Body
        body: CrashRateQueryBody
    ): Response<ResponseBody>
}
</code>```

data class for body

data class TimelineSpec(
    @SerializedName("aggregation_period")
    val aggregation_period: String =
        "DAILY",
    @SerializedName("startTime")
    val startTime: DateTime?,
    @SerializedName("endTime")
    val endTime: DateTime?
)

data class DateTime(
    @SerializedName("year")
    val year: Int = 0,
    @SerializedName("month")
    val month: Int = 0,
    @SerializedName("day")
    val day: Int = 0,
    @SerializedName("hours")
    val hours : Int?,
    @SerializedName("minutes")
    val minutes : Int?,
    @SerializedName("seconds")
    val seconds : Int?,
    @SerializedName("nanos")
    val nanos : Int?,
    @SerializedName("utcOffset")
    val utcOffset : String? = null,
    @SerializedName("time_zone")
    val time_zone: TimeZone? = null
)

data class TimeZone(
    @SerializedName("id")
    val id: String? =null,//"America/Los_Angeles",
    @SerializedName("version")
    val version: String?=null
)

data class CrashRateQueryBody(
    @SerializedName("timeline_spec")
    val timeline_spec: TimelineSpec,
    @SerializedName("dimensions")
    val dimensions: ArrayList<String>?,
    @SerializedName("metrics")
    val metrics: ArrayList<String>?,
    @SerializedName("filter")
    val filter: String?=null,
    @SerializedName("pageSize")
    val pageSize: Int=1000,
    @SerializedName("pageToken")
    val pageToken: String=""

)
```

i called google play developer reporting api, and i expected some crash rate record that i threw.

but they gives nothing

Body:
I'm trying to get crash rate of my app on play store by reporting api.

so, i threw some exception in downloaded app.

in google play console, crash was recorded.

but reporting api still gives nothing.

response code: 200

Json: {} (nothing in json)

how can i do that..

documentis here

and my code:

Main.kt

val metricRetrofit = Retrofit.Builder()
    .baseUrl(BaseUrl.CRASH_RATE_BASE_URL)
    .addConverterFactory(GsonConverterFactory.create())
    .addCallAdapterFactory(CoroutineCallAdapterFactory())
    .client(OkHttpClient.Builder().build())
    .build()
    .create(MetricSetApi::class.java)

val startTime = DateTime(year = 2021, month = 11, day = 1,null,null,null,null)// time_zone = TimeZone())
val endTime = DateTime(year = 2022, month = 12, day = 6,null,null,null,null)// time_zone = TimeZone())

val crashMQueryBody = CrashRateQueryBody(
    TimelineSpec(
        aggregation_period = "DAILY",
        startTime = startTime,//TimeZone()),
        endTime = endTime//TimeZone())
    ), arrayListOf("apiLevel"), arrayListOf("crashRate")
)
val mBody = metricRetrofit.postCrashRageMetricSet("Bearer $token", "{my package name}", crashMQueryBody)

interface for retrofit

interface MetricSetApi {

    @POST("{packageName}/crashRateMetricSet:query")
    suspend fun postCrashRageMetricSet(
        @Header("Authorization")
        token:String,
        @Path("packageName")
        packageName:String,
        @Body
        body: CrashRateQueryBody
    ): Response<ResponseBody>
}

data class for body

data class TimelineSpec(
    @SerializedName("aggregation_period")
    val aggregation_period: String =
        "DAILY",
    @SerializedName("startTime")
    val startTime: DateTime?,
    @SerializedName("endTime")
    val endTime: DateTime?
)

data class DateTime(
    @SerializedName("year")
    val year: Int = 0,
    @SerializedName("month")
    val month: Int = 0,
    @SerializedName("day")
    val day: Int = 0,
    @SerializedName("hours")
    val hours : Int?,
    @SerializedName("minutes")
    val minutes : Int?,
    @SerializedName("seconds")
    val seconds : Int?,
    @SerializedName("nanos")
    val nanos : Int?,
    @SerializedName("utcOffset")
    val utcOffset : String? = null,
    @SerializedName("time_zone")
    val time_zone: TimeZone? = null
)

data class TimeZone(
    @SerializedName("id")
    val id: String? =null,//"America/Los_Angeles",
    @SerializedName("version")
    val version: String?=null
)

data class CrashRateQueryBody(
    @SerializedName("timeline_spec")
    val timeline_spec: TimelineSpec,
    @SerializedName("dimensions")
    val dimensions: ArrayList<String>?,
    @SerializedName("metrics")
    val metrics: ArrayList<String>?,
    @SerializedName("filter")
    val filter: String?=null,
    @SerializedName("pageSize")
    val pageSize: Int=1000,
    @SerializedName("pageToken")
    val pageToken: String=""

)

i called google play developer reporting api, and i expected some crash rate record that i threw.

but they gives nothing


问:
Excel 2016 pivottable pagefield will not let me use values that are working in MDX against the same SSAS cube
I've got a few legacy (Excel 2016 VBA driven pivot table reports) reports which need to talk to a new SSAS cube I've made (Multi-dim as our server cannot support tabular yet).

Construction of most of the pagefields works except for Date which on the SSAS cube is a dimension linked to the facts via id and has a Date field with a real date value.

I have a custom C# DLL I've written which generates MDX for a user and with this I am successfully able to use WHERE [Date].[Date].[2022-12-07] however this fails in the VBA.

Fortunately I have OLAP EXtensions plugin so I checked the MDX that Excel was generating and it's using [Date].[Date].&[3] which is the underlying key. The key/ID changes currently as there's a rolling daily SQL prep stored proc/script preparing all of the data. I don't want to have to request the possible IDs first. I could just change the prep to use 1 & 2, as currently there's only 2 days of data, but in the future there will be more days/IDs at play.

Why can Excel not 'see' the Date values which MDX can (and returns valid data)? I added CubeFields to a watch and dug around in the various properties but I couldn't see anything...


问:
Laravel 9 in docker cannot connect to MySQL database
I am new to docker and I try to dockerize laravel9 app.
Here is my Dockerfile at the project root

```<code># Set master image
FROM php:8.1-fpm-alpine

# Copy composer.lock and composer.json
COPY composer.lock composer.json /var/www/html/

# Set working directory
WORKDIR /var/www/html

# Install Additional dependencies
RUN apk update && apk add --no-cache \
    build-base shadow nano  curl

# Add and Enable PHP-PDO Extenstions
RUN docker-php-ext-install pdo pdo_mysql
RUN docker-php-ext-enable pdo_mysql

# Install PHP Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

# Remove Cache
RUN rm -rf /var/cache/apk/*

# Add UID '1000' to www-data
RUN usermod -u 1000 www-data

# Copy existing application directory permissions
COPY --chown=www-data:www-data . /var/www/html

# Change current user to www
USER www-data

# Expose port 9000 and start php-fpm server
EXPOSE 9000
CMD ["php-fpm"]
</code>```

Then my docker-compose.yml

```<code>version: '3'
services:

  #Laravel App
  app:
    build:
      context: .
      dockerfile: Dockerfile
    image: compagnon-backend/laravel
    container_name: app
    restart: unless-stopped
    tty: true
    environment:
      SERVICE_NAME: app
      SERVICE_TAGS: dev
    working_dir: /var/www/html
    volumes:
      - ./:/var/www/html
    networks:
      - mynet

  #Nginx Service
  nginx:
    image: nginx:alpine
    container_name: nginx
    restart: unless-stopped
    tty: true
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./:/var/www/html
      - ./nginx/conf.d/:/etc/nginx/conf.d/
      - ./nginx/ssl/:/etc/nginx/ssl/
    networks:
      - mynet

  #MySQL Service
  db:
    image: mysql:latest
    container_name: db
    restart: unless-stopped
    tty: true
    ports:
      - "3306:3306"
    environment:
      MYSQL_DATABASE: laraveldb
      MYSQL_USER: laravel
      MYSQL_PASSWORD: laravelpassworddb
      MYSQL_ROOT_PASSWORD: rootpasswordmysql
    volumes:
      - mysqldata:/var/lib/mysql/
    networks:
      - mynet

#Docker Networks
networks:
  mynet:
    driver: bridge
#Volumes
volumes:
  mysqldata:
    driver: local

</code>```

Then my .env

```<code>APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:8z6QUUPvvVEZY9UmsWGE7o8LmkmcdQiDjSqvFKfznPo=
APP_DEBUG=true
APP_URL=http://compagnon-backend.fr

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=laraveldb
DB_USERNAME=laravel
DB_PASSWORD=laravelpassworddb
BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

MEMCACHED_HOST=127.0.0.1

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_HOST=
PUSHER_PORT=443
PUSHER_SCHEME=https
PUSHER_APP_CLUSTER=mt1

VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
</code>```

the docker-compose build command succeeds
After having launched docker-compose up -d

I use these commands

```<code>docker-compose exec app php artisan config:cache
</code>```

OK.

```<code>docker-compose exec app php artisan migrate
</code>```

This command fails with this message

SQLSTATE[HY000] [1130] Host '172.21.0.3' is not allowed to connect to
this MySQL server (SQL: select * from information_schema.tables where
table_schema = laraveldb and table_name = migrations and table_type =
'BASE TABLE')

What is wrong ?

Body:
I am new to docker and I try to dockerize laravel9 app.
Here is my Dockerfile at the project root

# Set master image
FROM php:8.1-fpm-alpine

# Copy composer.lock and composer.json
COPY composer.lock composer.json /var/www/html/

# Set working directory
WORKDIR /var/www/html

# Install Additional dependencies
RUN apk update && apk add --no-cache \
    build-base shadow nano  curl

# Add and Enable PHP-PDO Extenstions
RUN docker-php-ext-install pdo pdo_mysql
RUN docker-php-ext-enable pdo_mysql

# Install PHP Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

# Remove Cache
RUN rm -rf /var/cache/apk/*

# Add UID '1000' to www-data
RUN usermod -u 1000 www-data

# Copy existing application directory permissions
COPY --chown=www-data:www-data . /var/www/html

# Change current user to www
USER www-data

# Expose port 9000 and start php-fpm server
EXPOSE 9000
CMD ["php-fpm"]

Then my docker-compose.yml

version: '3'
services:

  #Laravel App
  app:
    build:
      context: .
      dockerfile: Dockerfile
    image: compagnon-backend/laravel
    container_name: app
    restart: unless-stopped
    tty: true
    environment:
      SERVICE_NAME: app
      SERVICE_TAGS: dev
    working_dir: /var/www/html
    volumes:
      - ./:/var/www/html
    networks:
      - mynet

  #Nginx Service
  nginx:
    image: nginx:alpine
    container_name: nginx
    restart: unless-stopped
    tty: true
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./:/var/www/html
      - ./nginx/conf.d/:/etc/nginx/conf.d/
      - ./nginx/ssl/:/etc/nginx/ssl/
    networks:
      - mynet

  #MySQL Service
  db:
    image: mysql:latest
    container_name: db
    restart: unless-stopped
    tty: true
    ports:
      - "3306:3306"
    environment:
      MYSQL_DATABASE: laraveldb
      MYSQL_USER: laravel
      MYSQL_PASSWORD: laravelpassworddb
      MYSQL_ROOT_PASSWORD: rootpasswordmysql
    volumes:
      - mysqldata:/var/lib/mysql/
    networks:
      - mynet

#Docker Networks
networks:
  mynet:
    driver: bridge
#Volumes
volumes:
  mysqldata:
    driver: local

Then my .env

APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:8z6QUUPvvVEZY9UmsWGE7o8LmkmcdQiDjSqvFKfznPo=
APP_DEBUG=true
APP_URL=http://compagnon-backend.fr

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=laraveldb
DB_USERNAME=laravel
DB_PASSWORD=laravelpassworddb
BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

MEMCACHED_HOST=127.0.0.1

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_HOST=
PUSHER_PORT=443
PUSHER_SCHEME=https
PUSHER_APP_CLUSTER=mt1

VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

the docker-compose build command succeeds
After having launched docker-compose up -d

I use these commands

docker-compose exec app php artisan config:cache

OK.

docker-compose exec app php artisan migrate

This command fails with this message

SQLSTATE[HY000] [1130] Host '172.21.0.3' is not allowed to connect to
this MySQL server (SQL: select * from information_schema.tables where
table_schema = laraveldb and table_name = migrations and table_type =
'BASE TABLE')

What is wrong ?


问:
VUE striking 2 times console.log
I got a problem with console.log in my script>methods>console.log

I dont understand, why I sending 2 times request when I got only 1 time write console.log.

I tried to delete methods and move under data>return... still work but still twice.

```<code>// ....
// ...
<form
      @submit.prevent="getLogin"
      id="form"
      <div class="mb-4">
        <input
          name="text"
          type="text"
          placeholder="1547089"
          v-model="loginForm.text"
          id="order-id"
          required
          minlength="5"
          />
      </div>
    <div>
        <input
          name="password"
          type="password"
          placeholder="****"
          v-model="loginForm.password"
          required
          minlength="4"
          maxlength="4"/>
    </div>
        <div
          id="div-submit">
            <button
              type="submit"
              v-on:click="getLogin"
              v-bind:disabled="loginForm.password.length < 4"
              id="submit">
            </button>
        </div>
    </form>
  </div>
</template>

<script>

export default {
  data() {
    return {
      loginForm:{
        text: '',
        password: ''
      }
    }
  },
  methods: {
    getLogin(){
      console.log("Posielam do konzole", this.loginForm)
    }
  }
}
</script>

</code>```

Title: VUE striking 2 times console.log

Body:
I got a problem with console.log in my script>methods>console.log

I dont understand, why I sending 2 times request when I got only 1 time write console.log.

I tried to delete methods and move under data>return... still work but still twice.

// ....
// ...
<form
      @submit.prevent="getLogin"
      id="form"

        <input
          name="text"
          type="text"
          placeholder="1547089"
          v-model="loginForm.text"
          id="order-id"
          required
          minlength="5"
          />

        <input
          name="password"
          type="password"
          placeholder="****"
          v-model="loginForm.password"
          required
          minlength="4"
          maxlength="4"/>

            <button
              type="submit"
              v-on:click="getLogin"
              v-bind:disabled="loginForm.password.length < 4"
              id="submit">
            </button>

    </form>

</template>


问:
Factor dropdown filter in DT::datatable, not showing all options
The filter for a factor column for DT::datatable, not displaying all values in the dropdown. The list is only showing the first 1000 values. Rest of the values are not displayed on the dropdown. But if we start typing the text, the values can be found. Please see the below re-producible example.

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

shinyApp(
ui = fluidPage(
fluidRow(
column(12,
DTOutput('table')
)
)
),
server = function(input, output) {

df <- data.frame(A = seq(1, 20000, by=1))

df <-
  df %>% mutate_if(is.numeric, as.factor)

output$table <- renderDT(df,
                         rownames = FALSE,
                         filter = "top",
                         options = list(
                           pageLength = 5
                         )
)
}
)
</code>```

We tried to have a dropdown menu for one Rshiny datatable.

Body:
The filter for a factor column for DT::datatable, not displaying all values in the dropdown. The list is only showing the first 1000 values. Rest of the values are not displayed on the dropdown. But if we start typing the text, the values can be found. Please see the below re-producible example.

library(shiny)
library(DT)

shinyApp(
ui = fluidPage(
fluidRow(
column(12,
DTOutput('table')
)
)
),
server = function(input, output) {

df <- data.frame(A = seq(1, 20000, by=1))

df <-
  df %>% mutate_if(is.numeric, as.factor)

output$table <- renderDT(df,
                         rownames = FALSE,
                         filter = "top",
                         options = list(
                           pageLength = 5
                         )
)
}
)

We tried to have a dropdown menu for one Rshiny datatable.


问:
How to acquire current StreamsBuilder in Spring Cloud Stream function?
If I try to inject a StreamsBuilder in my Kafka Streams based Spring Cloud Stream app, then the start of the app fails as no instance can be found. Is there a way to access the current instance from within the class or the function?

@Configuration
class StreamConfiguration {
    @Bean
    fun stream() = {}
}
```


问:
problem on sending firebase push notification in app background in Android 12 and 13 only in ionic5
We created project in Ionic 5, it's properly working on Android below 12 and 13 versions. But I got problem on sending firebase push notification in app background in Android 12 and 13 only. Is there is any solution for this? If you have any documentation please provide us.

Thank you.

provide the stepes to resolve the issue.


问:
Animation : :leave element is in foreground
I'm new to angular animations.
Here a stackblit of what I have for now : https://stackblitz.com/edit/angular-ivy-b3xmca?file=src/app/app.component.ts

What I would like to do is that on navigation between "Login" component and "Reset" component, I would like that only a part of the components are moving (title, fields and buttons). White container, Logo and footer should stay still.

Also I need that when landing on Login/Reset page, with a page reload or so (not using navigation), nothing should moves. Animation should happen only when navigate between Login and Reset.

What I did :

I have a trigger on the router-outlet wrapping div to be fired when a navigation happens.
This trigger is only linked to an transition which calls animateChild()

I have a trigger on an inner div in each component (Login and Reset) which is linked to a transition which will move div from left to right or right to left.

Here I got 2 issues :

when comming back and forth from Login to Reset, animation is ok except that the :leave form is behind the :enter component, so it can only be seen when it's out the :enter component.

when I reload page, annimation happens.

Is there any way to achieve what I need ?
Thx


问:
Symbols become question marks in terminal
I have a problem when printing some symbols in my terminal. They become question marks, but I can't seem to fix it I am printing:

```<code>System.out.println("╭" + "─".repeat(msg.length()) + "╮");
System.out.println("│" + msg + "│");
System.out.println("│" + " ".repeat(msg.length()) + "│");
System.out.println( "│" + msg2 + " ".repeat(msg.length() - msg2.length()) + "│" );
System.out.println("╰" + "─".repeat(msg.length()) + "╯");
</code>```

But all of the lines I try to print becomes question marks in my terminal. Does anyone have a solution?

```<code>?????????????????????????????????????????????? ?
WebServer running on http://localhost:8080 ? ? ? ?

Boot-up time: 0,8588 seconds. ? ??????????????????????????????????????????????
</code>```

Seems like it doesn't "know" the symbols, and they are replaced by a "?" instead

I have tried to change the encoding, but it dosent change the encoding in the terminal.

I use MacBook.

Body:
I have a problem when printing some symbols in my terminal. They become question marks, but I can't seem to fix it I am printing:

System.out.println("╭" + "─".repeat(msg.length()) + "╮");
System.out.println("│" + msg + "│");
System.out.println("│" + " ".repeat(msg.length()) + "│");
System.out.println( "│" + msg2 + " ".repeat(msg.length() - msg2.length()) + "│" );
System.out.println("╰" + "─".repeat(msg.length()) + "╯");

But all of the lines I try to print becomes question marks in my terminal. Does anyone have a solution?

?????????????????????????????????????????????? ?
WebServer running on http://localhost:8080 ? ? ? ?

Boot-up time: 0,8588 seconds. ? ??????????????????????????????????????????????

Seems like it doesn't "know" the symbols, and they are replaced by a "?" instead

I have tried to change the encoding, but it dosent change the encoding in the terminal.

I use MacBook.


问:
Download attributon on link opens link and not download it
This is the code:

```<code>    const puppeteer = require('puppeteer');
var browser;
var page;

async function download(url) {
    await page.evaluate((url) => {
        const btn = document.createElement('a');
        btn.setAttribute('href', url);
        btn.setAttribute('download', 'download.ts');
        btn.click(); // should download the file and not open it in browser
    }, url);
}

(async function () {
    browser = await puppeteer.launch({
        headless: false,
    });
    page = await browser.newPage();
    await page.setViewport({width: 1200, height: 800});
    await download('https://eedols.com/m3u8/20221205130402-SiBOhsUsJbTdZLP-DfqGGLn5cF-6-l_1080p_00001.ts');
    await page.waitForTimeout(300000);
})();
</code>```

The click on link does not download the file, but opens it inside the browser.
On normal chrome, this snippet works fine.

Body:
This is the code:

    const puppeteer = require('puppeteer');
var browser;
var page;

async function download(url) {
    await page.evaluate((url) => {
        const btn = document.createElement('a');
        btn.setAttribute('href', url);
        btn.setAttribute('download', 'download.ts');
        btn.click(); // should download the file and not open it in browser
    }, url);
}

(async function () {
    browser = await puppeteer.launch({
        headless: false,
    });
    page = await browser.newPage();
    await page.setViewport({width: 1200, height: 800});
    await download('https://eedols.com/m3u8/20221205130402-SiBOhsUsJbTdZLP-DfqGGLn5cF-6-l_1080p_00001.ts');
    await page.waitForTimeout(300000);
})();

The click on link does not download the file, but opens it inside the browser.
On normal chrome, this snippet works fine.


问:
Error handling: Run function if function fails
When ssh with PublicIpAddress fails, run ssh with PrivateIpAddress. I'm handling this way but it doesn't seem to work, ssh with PublicIpAddress exits with code 255 and doesn't try ssh with PrivateIpAddress.

```<code>    for _, machine := range selected {
        err := ssh(machine.KeyName, Username, machine.PublicIpAddress)
        if err != nil {
            err = ssh(machine.KeyName, Username, machine.PrivateIpAddress)
        }
        if err != nil {
            fmt.Println(err)
        }
    }
</code>```

SSH func

```<code>func ssh(keyname string, user string, address string) error {
  var err error
  //

  if err := cmd.Run(); err != nil {
        fmt.Println(err.Error())
  }
  return err
}
</code>```

Body:
When ssh with PublicIpAddress fails, run ssh with PrivateIpAddress. I'm handling this way but it doesn't seem to work, ssh with PublicIpAddress exits with code 255 and doesn't try ssh with PrivateIpAddress.

    for _, machine := range selected {
        err := ssh(machine.KeyName, Username, machine.PublicIpAddress)
        if err != nil {
            err = ssh(machine.KeyName, Username, machine.PrivateIpAddress)
        }
        if err != nil {
            fmt.Println(err)
        }
    }

SSH func

func ssh(keyname string, user string, address string) error {
  var err error
  //

  if err := cmd.Run(); err != nil {
        fmt.Println(err.Error())
  }
  return err
}


问:
dotnet data protection to database without using entity framework in .net5
I am able to implement data protection in .net with entity framework as suggested in
https://learn.microsoft.com/en-us/aspnet/core/security/data-protection/configuration/overview?view=aspnetcore-5.0

```<code>public class DataProtectionKeyContext : DbContext, IDataProtectionKeyContext
{
    public DataProtectionKeyContext(DbContextOptions<DataProtectionKeyContext> options)
        : base(options) { }

    public DbSet<DataProtectionKey> DataProtectionKeys { get; set; }

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        modelBuilder.Entity<DataProtectionKey>()
            .ToTable("DataProtectionKey");
    }
}

services.AddDataProtection()
                .PersistKeysToFileSystem(new
DirectoryInfo(_settings.DataProtectionLocation));
            services.AddDbContext<DataProtectionKeyContext>(o =>
            {
                o.UseSqlServer(Configuration.GetConnectionString("DataConnection"));
                o.UseQueryTrackingBehavior(QueryTrackingBehavior.NoTracking);
                o.EnableSensitiveDataLogging();
            }).AddDataProtection()
          .PersistKeysToDbContext<DataProtectionKeyContext>()
          .SetDefaultKeyLifetime(TimeSpan.FromDays(7));
</code>```

Is there any way to avoid entity framework in here ? I am using third party insight database adapter already in project. I am just trying to avoid multiple ORM's ? Please help ? I still want to save to database using custom adapter calls instead of ef dbcontext

Body:
I am able to implement data protection in .net with entity framework as suggested in
https://learn.microsoft.com/en-us/aspnet/core/security/data-protection/configuration/overview?view=aspnetcore-5.0

public class DataProtectionKeyContext : DbContext, IDataProtectionKeyContext
{
    public DataProtectionKeyContext(DbContextOptions<DataProtectionKeyContext> options)
        : base(options) { }

    public DbSet<DataProtectionKey> DataProtectionKeys { get; set; }

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        modelBuilder.Entity<DataProtectionKey>()
            .ToTable("DataProtectionKey");
    }
}

services.AddDataProtection()
                .PersistKeysToFileSystem(new
DirectoryInfo(_settings.DataProtectionLocation));
            services.AddDbContext<DataProtectionKeyContext>(o =>
            {
                o.UseSqlServer(Configuration.GetConnectionString("DataConnection"));
                o.UseQueryTrackingBehavior(QueryTrackingBehavior.NoTracking);
                o.EnableSensitiveDataLogging();
            }).AddDataProtection()
          .PersistKeysToDbContext<DataProtectionKeyContext>()
          .SetDefaultKeyLifetime(TimeSpan.FromDays(7));

Is there any way to avoid entity framework in here ? I am using third party insight database adapter already in project. I am just trying to avoid multiple ORM's ? Please help ? I still want to save to database using custom adapter calls instead of ef dbcontext


问:
Storing different types of data in a single django database column
I have a problem that I can't quite fix, I have a table built on the basis of a model:

```<code>class MessageData(models.Model):
    messageID = models.IntegerField()
    fieldID = models.IntegerField()
    value = models.CharField(max_length=60)

    class Meta:
        verbose_name = 'MessageData'
        verbose_name_plural = 'MessagesData'
</code>```

I need to somehow, when creating a request, in some posts, in the value field, transfer the file and then save it to the media folder, and in some posts, the text is simply taken from the textarea,
Meybe someone knows a simple method to implement this without adding new fields to the model?
The data i get from this template using this method:

```<code>def clientPage(request, link_code):
if request.method == 'POST':
    files = request.FILES
    req = request.POST.copy()
    print(files)
    print(req)

{% block content %}
<div class="card bg-dark">
    <div class="card-header">
        <h5 class="text-light">From associate: {{ message }}</h5>
    </div>
    <form method="post" enctype="multipart/form-data">
        {% csrf_token %}
        <fieldset>
            <div class="card-body">
                <div class="form-group">
                    <label for="subjectInput" class="form-label mt-4 text-light">Subject</label>
                    <input class="form-control" id="subjectInput" placeholder="Enter subject" name="subject">
                </div>
                <div class="form-group">
                    <label for="Textarea" class="form-label mt-4 text-light">Text Area</label>
                    <textarea class="form-control" id="Textarea" rows="3" name="textArea"></textarea>
                </div>
                <div class="form-group">
                    <label for="formFileMultiple" class="form-label">Multiple files input</label>
                    <input class="form-control" type="file" id="formFileMultiple" name="file" multiple/>
                </div>

            </div>

            <div class="card-footer">
                <button class="btn btn-success" type="submit">Send Data</button>
            </div>
        </fieldset>
    </form>
</div>
{% endblock %}
</code>```

Body:
I have a problem that I can't quite fix, I have a table built on the basis of a model:

class MessageData(models.Model):
    messageID = models.IntegerField()
    fieldID = models.IntegerField()
    value = models.CharField(max_length=60)

    class Meta:
        verbose_name = 'MessageData'
        verbose_name_plural = 'MessagesData'

I need to somehow, when creating a request, in some posts, in the value field, transfer the file and then save it to the media folder, and in some posts, the text is simply taken from the textarea,
Meybe someone knows a simple method to implement this without adding new fields to the model?
The data i get from this template using this method:

def clientPage(request, link_code):
if request.method == 'POST':
    files = request.FILES
    req = request.POST.copy()
    print(files)
    print(req)

{% block content %}

From associate: {{ message }}

    <form method="post" enctype="multipart/form-data">
        {% csrf_token %}
        <fieldset>

                    Subject
                    <input class="form-control" id="subjectInput" placeholder="Enter subject" name="subject">

                    Text Area
                    <textarea class="form-control" id="Textarea" rows="3" name="textArea"></textarea>

                    Multiple files input
                    <input class="form-control" type="file" id="formFileMultiple" name="file" multiple/>

                <button class="btn btn-success" type="submit">Send Data</button>

        </fieldset>
    </form>

{% endblock %}


问:
sourcetree after merge can not perform any operation
I got a mac computer instead of windows.
I use source tree as git ui.
I want to merge branches, and after I press the merge the source tree says conflicts.
I want to remove the files to stash them I just want to return before the merge.
in windows when I select the files and press stash it stashed however in mac source tree not let me stash, not let me delete the branch and for conclusion not let me do anything.

Is their any solution instead of clone the project again from this situation?
just want to stash, just want not the get the merge.
I tried to remove the branch it is not allowd I try to select all files and stash and it is not allowed.
just want not to do the merge


问:
webpagetest server install fails for Ubuntu 18.04.6 LTS "cannot stat /proc/sys/net/ipv4/tcp_window_scaling: No such file or directory"
Im trying to install webpagetest open source from here: https://github.com/WPO-Foundation/wptserver-install

Which is basically this command:

bash <(curl -s https://raw.githubusercontent.com/WPO-Foundation/wptserver-install/master/ubuntu.sh)

However, the install doesn't actually work (nothing on port 80 or 443)

```<code>sysctl: cannot stat /proc/sys/net/ipv4/tcp_window_scaling: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv4/tcp_max_syn_backlog: No such file or directory
net.core.somaxconn = 65535
sysctl: cannot stat /proc/sys/net/ipv4/tcp_max_tw_buckets: No such file or directory
sysctl: cannot stat /proc/sys/net/core/rmem_default: No such file or directory
sysctl: cannot stat /proc/sys/net/core/rmem_max: No such file or directory
sysctl: cannot stat /proc/sys/net/core/wmem_max: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv4/tcp_rmem: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv4/tcp_wmem: No such file or directory
</code>```

Ubuntu 18.04.6 LTS
New cloud server from vpscity.co.uz

if I look in /var/www I see:

html webpagetest wptserver-install

So the install script did do something.

Body:
Im trying to install webpagetest open source from here: https://github.com/WPO-Foundation/wptserver-install

Which is basically this command:

bash <(curl -s https://raw.githubusercontent.com/WPO-Foundation/wptserver-install/master/ubuntu.sh)

However, the install doesn't actually work (nothing on port 80 or 443)

sysctl: cannot stat /proc/sys/net/ipv4/tcp_window_scaling: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv4/tcp_max_syn_backlog: No such file or directory
net.core.somaxconn = 65535
sysctl: cannot stat /proc/sys/net/ipv4/tcp_max_tw_buckets: No such file or directory
sysctl: cannot stat /proc/sys/net/core/rmem_default: No such file or directory
sysctl: cannot stat /proc/sys/net/core/rmem_max: No such file or directory
sysctl: cannot stat /proc/sys/net/core/wmem_max: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv4/tcp_rmem: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv4/tcp_wmem: No such file or directory

Ubuntu 18.04.6 LTS
New cloud server from vpscity.co.uz

if I look in /var/www I see:

html webpagetest wptserver-install

So the install script did do something.