问:
Handle server side redirection on react application
Currently I have a react application with the login done with OAuth2 Authorization Code PKCE flow in the back-end. on successfully submitting the login credentials the server redirects to a redirectURI with the authorization code as a url parameter. currently I have a created a matching route in the front-end, but the redirection is not happening. Is there any possible way to handle this redirection from the front-end using react?

Below is the ss of the requests

The redirected URL throws 404 not found error, even though a route matching the redirected URL is present in the react-router-dom (<Route path="/account-info/" element = { } />).


来源: stackexchange

问:
Flutter : Making MyApp (starting class) a WidgetsBindingObserver?
My app has a websocket backbone, but it's connection is severed whenever the app goes into inactive (or background) for more than 10~ish seconds.

So I decided to make

```<code>class MyApp extends StatelessWidget {...}
</code>```

into

```<code>class MyApp extends StatelessWidget with WidgetsBindingObserver {

   ...

   AppLifecycleState state = AppLifecycleState.detached;
   @override
   void didChangeAppLifecycleState(AppLifecycleState state) {
     if(state != this.state) {
       this.state = state;
       if (state == AppLifecycleState.resumed) {
         // if websocket is dead, bring it back up
         sc.sc.isActive ? debugPrint('is still active') : sc.activate();
       }
     }
   }

   @override
   Widget build(BuildContext context) {
      WidgetBinding.instance.addObserver(this);
      ...
   }

   ...

}
</code>```

(where sc is my websocket)

I've implemented the above change and the app still runs fine.
But I just wanted to check if this is a feasible way to implement such feature.

I'm new to Flutter and whenever I make changes like these, I feel pretty lost.

Like when MyApp is yelling at me for using non-final variables within an immutable classes; I mean it doesn't seem so bad or wrong, but I didn't "learn" Flutter so I'm not sure if its "okay" to leave it that way.

Anyways, any input will be appreciated! Thanks in advance.

ContentLicense: CC BY-SA 4.0

Body:
My app has a websocket backbone, but it's connection is severed whenever the app goes into inactive (or background) for more than 10~ish seconds.

So I decided to make

class MyApp extends StatelessWidget {...}

into

class MyApp extends StatelessWidget with WidgetsBindingObserver {

   ...

   AppLifecycleState state = AppLifecycleState.detached;
   @override
   void didChangeAppLifecycleState(AppLifecycleState state) {
     if(state != this.state) {
       this.state = state;
       if (state == AppLifecycleState.resumed) {
         // if websocket is dead, bring it back up
         sc.sc.isActive ? debugPrint('is still active') : sc.activate();
       }
     }
   }

   @override
   Widget build(BuildContext context) {
      WidgetBinding.instance.addObserver(this);
      ...
   }

   ...

}

(where sc is my websocket)

I've implemented the above change and the app still runs fine.
But I just wanted to check if this is a feasible way to implement such feature.

I'm new to Flutter and whenever I make changes like these, I feel pretty lost.

Like when MyApp is yelling at me for using non-final variables within an immutable classes; I mean it doesn't seem so bad or wrong, but I didn't "learn" Flutter so I'm not sure if its "okay" to leave it that way.

Anyways, any input will be appreciated! Thanks in advance.


问:
Anychart Line chart for Android does not show the line
I am using Anychart for Android to display the total per sub category of grocery items. However, I am having trouble regarding with displaying the line in the line chart. When I hover my mouse, I can see that there were data, but the line is invisible. The data in the chart was from firebase.

Here's my code:

```<code></code>```
```<code>itemList = new ArrayList<>();

Cartesian cartesian = AnyChart.line();

DatabaseReference spendingReference = FirebaseDatabase.getInstance().getReference().child("Customers").child("Inventories").child(FirebaseAuth.getInstance().getUid());

spendingReference.addValueEventListener(new ValueEventListener() {
    @Override
    public void onDataChange(@NonNull DataSnapshot snapshot) {
        List<DataEntry> seriesData = new ArrayList<>();

        int facialTotal = 0;

        for (DataSnapshot yearSnap : snapshot.getChildren()) {

            for (DataSnapshot monthSnap : yearSnap.getChildren()) {

                String monthKey = monthSnap.getKey();

                if (monthKey.equalsIgnoreCase("December")) {

                    for (DataSnapshot cartSnap : monthSnap.getChildren()) {

                        for (DataSnapshot categorySnap : cartSnap.getChildren()) {

                            String categoryKey = categorySnap.getKey();

                            if (categoryKey.equalsIgnoreCase("Beauty & Personal Care")) {

                                for (DataSnapshot subCategorySnap : categorySnap.getChildren()) {

                                    String subCategoryKey = subCategorySnap.getKey();

                                    if (subCategoryKey.equalsIgnoreCase("Facial Products")) {
                                        itemList.clear();

                                        for (DataSnapshot snap : subCategorySnap.getChildren()) {

                                            GroceryItemModelCart groceryItemModelCart = snap.getValue(GroceryItemModelCart.class);
                                            itemList.add(groceryItemModelCart);

                                        }

                                        float totalAve = 0;
                                        for (int i = 0; i < itemList.size(); i++) {
                                            totalAve += Float.parseFloat(itemList.get(i).getGroceryTotalItemPrice());
                                        }

                                        facialTotal = (int) totalAve;

                                    }

                                }

                                seriesData.add( new CustomDataEntry(monthKey, facialTotal));

                            }

                        }

                    }

                }

            }

        }

        cartesian.animation(true);

        cartesian.padding(10d, 20d, 5d, 20d);

        cartesian.crosshair().enabled(true);
        cartesian.crosshair()
                .yLabel(true)
                .yStroke((Stroke) null, null, null, (String) null, (String) null);

        cartesian.tooltip().positionMode(TooltipPositionMode.POINT);

        cartesian.title("Spending per Beauty & Personal Care Sub-Category");

        cartesian.yAxis(0).title("Expenses in Peso(₱))");
        cartesian.xAxis(0).labels().padding(5d, 5d, 5d, 5d);

        Set set = Set.instantiate();
        set.data(seriesData);
        Mapping series1Mapping = set.mapAs("{ x: 'x', value: 'value' }");

        Line series1 = cartesian.line(series1Mapping);
        series1.name("Facial Products");
        series1.hovered().markers().enabled(true);
        series1.hovered().markers()
                .type(MarkerType.CIRCLE)
                .size(4d);
        series1.tooltip()
                .position("right")
                .anchor(Anchor.LEFT_CENTER)
                .offsetX(5d)
                .offsetY(5d);

    }

    @Override
    public void onCancelled(@NonNull DatabaseError error) {

    }
});

cartesian.legend().enabled(true);
cartesian.legend().fontSize(13d);
cartesian.legend().padding(0d, 0d, 10d, 0d);

foodSubCategoryAnychart.setChart(cartesian);
</code>```

}

private class CustomDataEntry extends ValueDataEntry {

```<code>CustomDataEntry(String x, Number value) {
    super(x, value);
    //setValue("value2", value2);
}
</code>```

}

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

Here's the screenshot of my chart
enter image description here

As you can see on the image, it does not draw the line on the chart

Body:
I am using Anychart for Android to display the total per sub category of grocery items. However, I am having trouble regarding with displaying the line in the line chart. When I hover my mouse, I can see that there were data, but the line is invisible. The data in the chart was from firebase.

Here's my code:

itemList = new ArrayList<>();

Cartesian cartesian = AnyChart.line();

DatabaseReference spendingReference = FirebaseDatabase.getInstance().getReference().child("Customers").child("Inventories").child(FirebaseAuth.getInstance().getUid());

spendingReference.addValueEventListener(new ValueEventListener() {
    @Override
    public void onDataChange(@NonNull DataSnapshot snapshot) {
        List<DataEntry> seriesData = new ArrayList<>();

        int facialTotal = 0;

        for (DataSnapshot yearSnap : snapshot.getChildren()) {

            for (DataSnapshot monthSnap : yearSnap.getChildren()) {

                String monthKey = monthSnap.getKey();

                if (monthKey.equalsIgnoreCase("December")) {

                    for (DataSnapshot cartSnap : monthSnap.getChildren()) {

                        for (DataSnapshot categorySnap : cartSnap.getChildren()) {

                            String categoryKey = categorySnap.getKey();

                            if (categoryKey.equalsIgnoreCase("Beauty & Personal Care")) {

                                for (DataSnapshot subCategorySnap : categorySnap.getChildren()) {

                                    String subCategoryKey = subCategorySnap.getKey();

                                    if (subCategoryKey.equalsIgnoreCase("Facial Products")) {
                                        itemList.clear();

                                        for (DataSnapshot snap : subCategorySnap.getChildren()) {

                                            GroceryItemModelCart groceryItemModelCart = snap.getValue(GroceryItemModelCart.class);
                                            itemList.add(groceryItemModelCart);

                                        }

                                        float totalAve = 0;
                                        for (int i = 0; i < itemList.size(); i++) {
                                            totalAve += Float.parseFloat(itemList.get(i).getGroceryTotalItemPrice());
                                        }

                                        facialTotal = (int) totalAve;

                                    }

                                }

                                seriesData.add( new CustomDataEntry(monthKey, facialTotal));

                            }

                        }

                    }

                }

            }

        }

        cartesian.animation(true);

        cartesian.padding(10d, 20d, 5d, 20d);

        cartesian.crosshair().enabled(true);
        cartesian.crosshair()
                .yLabel(true)
                .yStroke((Stroke) null, null, null, (String) null, (String) null);

        cartesian.tooltip().positionMode(TooltipPositionMode.POINT);

        cartesian.title("Spending per Beauty & Personal Care Sub-Category");

        cartesian.yAxis(0).title("Expenses in Peso(₱))");
        cartesian.xAxis(0).labels().padding(5d, 5d, 5d, 5d);

        Set set = Set.instantiate();
        set.data(seriesData);
        Mapping series1Mapping = set.mapAs("{ x: 'x', value: 'value' }");

        Line series1 = cartesian.line(series1Mapping);
        series1.name("Facial Products");
        series1.hovered().markers().enabled(true);
        series1.hovered().markers()
                .type(MarkerType.CIRCLE)
                .size(4d);
        series1.tooltip()
                .position("right")
                .anchor(Anchor.LEFT_CENTER)
                .offsetX(5d)
                .offsetY(5d);

    }

    @Override
    public void onCancelled(@NonNull DatabaseError error) {

    }
});

cartesian.legend().enabled(true);
cartesian.legend().fontSize(13d);
cartesian.legend().padding(0d, 0d, 10d, 0d);

foodSubCategoryAnychart.setChart(cartesian);

}

private class CustomDataEntry extends ValueDataEntry {

CustomDataEntry(String x, Number value) {
    super(x, value);
    //setValue("value2", value2);
}

}

Here's the screenshot of my chart
enter image description here

As you can see on the image, it does not draw the line on the chart


问:
Python Quantlib construct YTM (not zero) curve
I have non-par yields and maturities.

Is there a way to construct a government bond YTM curve using quantlib and YTM of not spot/zero yields, but coupon paying bonds?
I am looking at the documentation for Term Structures and Curves; but there is nothing about YTM curve

https://quantlibjl.readthedocs.io/en/latest/term_structures.html

I want to construct the said YTM curve, and spot rate curve using the same data, to compare the results?


问:
Approach to display graphical data on Home page
I have this design which I need to implement in our web application.

[Design Page] (https://i.stack.imgur.com/zW7v3.png)

Our application stack is c#, .Net MVC, JS, html, CSS

Anyone please provides your expertise how should I proceed with this?

Can I use any JS library to build bar chart?

However, data which will show will be dynamic, it changes based on USER.

Really appreciate your suggestion and advice.

I have tried with ChartJs library and able to create barchart in required format

[Using Chart JS bar chart design] (https://i.stack.imgur.com/YetMo.png)

to User Chart JS, I have create lots of Canvas + all canvas will need its own script.

```<code>    <!DOCTYPE html>
    <html>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.min.js"></script>
    <body>
    <div style="display:flex;" id="test">
    <canvas id="myChart3" style="width:100%;max-width:50px;height:110px;"></canvas>
    <canvas id="myChart" style="width:100%;max-width:100px;height:110px;"></canvas>
    <canvas id="myChart2" style="width:100%;max-width:100px;height:110px;"></canvas>
    </div>

    <script>
    var xValues = ["2021", "2022"];
    var yValues = [1, 2.5];
    var barColors = ["red", "green","blue","orange","brown"];

    new Chart("myChart3", {
       type: "bar",
       options: {
       maintainAspectRatio: false,
       legend: {display: false},

       scales: {
         xAxes: [{
         display: true,
         gridLines: {
           display: false,
           drawBorder:false,
         },
         labels: {
           show: true,
         }
       }],
       yAxes: [{
         type: "linear",
         display: true,
         position: "left",
         id: "y-axis-1",
         gridLines: {
           display: true,
           drawborder:false,
         },
         labels: {
           show: true,

         },
         ticks: {
           beginAtZero: true,
           userCallback: function(label, index, labels) {
             if (Math.floor(label) === label) {
               return label;
             }

           },
           max: 5.5,
           stepSize: 1
         }

        }]
       },
      }
    });

    new Chart("myChart", {
      type: "bar",
      data: {
    labels: xValues,
    datasets: [{
      backgroundColor: barColors,
      data: yValues
    }]
    },
   options: {
   maintainAspectRatio: false,
    legend: {display: false},

    scales: {
         xAxes: [{
         display: true,
         gridLines: {
           display: false
         },
         labels: {
           show: true,
         }
       }],
       yAxes: [{
         type: "linear",
         display: true,
         position: "left",
         id: "y-axis-1",
         gridLines: {
           display: true,
           drawBorder:false,
         },
         labels: {
           show: true,

         },
         ticks: {
         display:false,
           beginAtZero: true,
           userCallback: function(label, index, labels) {
             if (Math.floor(label) === label) {
               return label;
             }

           },
           max: 5.5,
           stepSize: 1
         }

       }]
     },
    }
    });

     new Chart("myChart2", {
     type: "bar",
     data: {
      labels: xValues,
      datasets: [{
      backgroundColor: barColors,
      data: [3, 3.5]
     }]
    },
    options: {
    maintainAspectRatio: false,
    legend: {display: false},

    scales: {
         xAxes: [{
         display: true,
         gridLines: {
           display: false
         },
         labels: {
           show: true,
         }
       }],
       yAxes: [{
         type: "linear",
         display: true,
         position: "left",
         id: "y-axis-1",
         gridLines: {
           display: true,
           drawBorder: false,
         },
         labels: {
           show: true,

         },
         ticks: {
         display:false,
           beginAtZero: true,
           userCallback: function(label, index, labels) {
             if (Math.floor(label) === label) {
               return label;
             }

           },
           max: 5.5,
           stepSize: 1
         }

       }]
     },
    }
    });

    </script>

    </body>
    </html>

</code>```

this is just for three canvas, I will have more than 100 data which needs to be display.

Any better approach which I can follow to make it proper and faster also.

Thanks and Regards,
Ankit

Body:
I have this design which I need to implement in our web application.

[Design Page] (https://i.stack.imgur.com/zW7v3.png)

Our application stack is c#, .Net MVC, JS, html, CSS

Anyone please provides your expertise how should I proceed with this?

Can I use any JS library to build bar chart?

However, data which will show will be dynamic, it changes based on USER.

Really appreciate your suggestion and advice.

I have tried with ChartJs library and able to create barchart in required format

[Using Chart JS bar chart design] (https://i.stack.imgur.com/YetMo.png)

to User Chart JS, I have create lots of Canvas + all canvas will need its own script.

    <!DOCTYPE html>

    <canvas id="myChart3" style="width:100%;max-width:50px;height:110px;"></canvas>
    <canvas id="myChart" style="width:100%;max-width:100px;height:110px;"></canvas>
    <canvas id="myChart2" style="width:100%;max-width:100px;height:110px;"></canvas>

this is just for three canvas, I will have more than 100 data which needs to be display.

Any better approach which I can follow to make it proper and faster also.

Thanks and Regards,
Ankit


问:
Web Application works from Local PC but not from Server
I have created a simple web application which works perfectly fine when i run from VS.Net. I made some arrangements to make it works from IIS so I can directly run it as a standalone application. but it does not work and gives me the following message:

```<code><%@ Page Language="VB" AutoEventWireup="true" Codefile="MainPage.aspx.vb" Inherits="MainPage"%>
</code>```

the DropDownLists do not render either, nor the data is shown from Database

any one can give me a hand and give me a hint ?

Body:
I have created a simple web application which works perfectly fine when i run from VS.Net. I made some arrangements to make it works from IIS so I can directly run it as a standalone application. but it does not work and gives me the following message:

<%@ Page Language="VB" AutoEventWireup="true" Codefile="MainPage.aspx.vb" Inherits="MainPage"%>

the DropDownLists do not render either, nor the data is shown from Database

any one can give me a hand and give me a hint ?


问:
ffmpeg -stream_loop doesnt work on hls file
Can someone pls help me figure out my problem with ffmpeg. When I try to add -stream_loop option on the command, I got an error

[AVIOContext @ 0x7f8c42705080] Statistics: 362088 bytes read, 0 seeks296.7kbits/s speed=1.01x Seek to start failed. playlist_main2.m3u8: Operation not permitted

And here is my ffmpeg command
ffmpeg -stream_loop -1 -i playlist_main2.m3u8 -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 file.mp4

Im thinking the problem might be on the .ts file, since I dont encounter this error when testing differet hls files, but I want to have a proof that the source is the proble. Pls help me. Attached is the m3u8 file and the .ts file.
HLS FILE

Tried different hls file and the command works. Now im suspecting the problem is on the video (.ts) file itself but i cant prove it.


问:
Model ->view update
I am new to ASP.NET MVC concepts.

The values address shown in the view are supposed to be changed based on the dropdown value selected. But it shows the previous/initial values every time.

On dropdown, I call a function in jQuery showMyProfile(). And this fn pass values to action method LoadProfile() returning a view _CandDtls.cshtml. Now the updated or queried results are assigned to the properties in objonline_application_model and it is passed to the view. But the view still shows the old values.

Should I assign values via Jquery for each fields or the view itself should get changed when model is passed to it automatically.

Right now I update the fields using Jquery from the success call but is that the right way? Please help. Because there are too many fields supposed to be updated. For security issues, I could not post them.

JS:

```<code>function showMyProfile(RID, CID, AID) {
    $.ajax({
        type: 'GET',
        url: absURL('CandidateApp/LoadMyProfile'),
        data: { RID, CID, AID },
        'async': false,
        datatype: 'json',
        contentType: 'application/json; charset=utf-8',
        beforeSend: function () {
            dvajaxloadshow();
        },
        success: function (message) {
            //Personal details fields

            //Address related fields
            $("#txtAdd1").val(message.add1);
            $("#txtAdd2").val(message.add2);
            $("#txtAdd3").val(message.add3);
            $("#cmbPerCountry").val(message.country_id);
            $("#cmbPerState").val(message.state_id);
            $("#cmbPerCity").val(message.city_id);
            $("#txtPin").val(message.pin);
            $("#txtCommAdd1").val(message.commAdd1);
            $("#txtCommAdd2").val(message.commAdd2);
            $("#txtCommAdd3").val(message.commAdd3);
            $("#cmbCommCountry").val(message.commCountry_id);
            $("#cmbCommState").val(message.commState_id);
            $("#cmbCommCity").val(message.commCity_id);
            $("#txtCommPin").val(message.commPin);

        },
        complete: function () {
            dvajaxloadhide();
        },
        error: function () {
            dvajaxloadhide();
        }
    });
}
</code>```

Controller:

```<code>public ActionResult LoadMyProfile(long formid = 0, long id = 0, long docid = 0, long recruit_id = 0, long cand_user_id = 0, long desig_id = 0,
                                          long post_id = 0, string recruit_end_date = "", long application_id = 0)
{
    online_application_model _objonline_application_model = new online_application_model();
    _objonline_application_model = _objCandidateOnlineApplicationRepo.GetSelectedCandidateDetails(cand_user_id, docid, recruit_id, post_id, application_id);
    //_objonline_application_model have latest values set
    return Json(_objonline_application_model, JsonRequestBehavior.AllowGet);
}
</code>```

HTML or view:

```<code>@model NOIT.ViewModels.online_application_model
<td>
    @Html.TextBoxFor(model => model.commAdd1, new
                        {
                            @class = "txt",
                            @id = "txtCommAdd1",
                            @data_ele_msg = "Communication Address1 Required.",
                            @data_ele_req = "true",
                            @maxlength = "100"
                        })
</td>
</code>```

Title: Model ->view update

Body:
I am new to ASP.NET MVC concepts.

The values address shown in the view are supposed to be changed based on the dropdown value selected. But it shows the previous/initial values every time.

On dropdown, I call a function in jQuery showMyProfile(). And this fn pass values to action method LoadProfile() returning a view _CandDtls.cshtml. Now the updated or queried results are assigned to the properties in objonline_application_model and it is passed to the view. But the view still shows the old values.

Should I assign values via Jquery for each fields or the view itself should get changed when model is passed to it automatically.

Right now I update the fields using Jquery from the success call but is that the right way? Please help. Because there are too many fields supposed to be updated. For security issues, I could not post them.

JS:

function showMyProfile(RID, CID, AID) {
    $.ajax({
        type: 'GET',
        url: absURL('CandidateApp/LoadMyProfile'),
        data: { RID, CID, AID },
        'async': false,
        datatype: 'json',
        contentType: 'application/json; charset=utf-8',
        beforeSend: function () {
            dvajaxloadshow();
        },
        success: function (message) {
            //Personal details fields

            //Address related fields
            $("#txtAdd1").val(message.add1);
            $("#txtAdd2").val(message.add2);
            $("#txtAdd3").val(message.add3);
            $("#cmbPerCountry").val(message.country_id);
            $("#cmbPerState").val(message.state_id);
            $("#cmbPerCity").val(message.city_id);
            $("#txtPin").val(message.pin);
            $("#txtCommAdd1").val(message.commAdd1);
            $("#txtCommAdd2").val(message.commAdd2);
            $("#txtCommAdd3").val(message.commAdd3);
            $("#cmbCommCountry").val(message.commCountry_id);
            $("#cmbCommState").val(message.commState_id);
            $("#cmbCommCity").val(message.commCity_id);
            $("#txtCommPin").val(message.commPin);

        },
        complete: function () {
            dvajaxloadhide();
        },
        error: function () {
            dvajaxloadhide();
        }
    });
}

Controller:

public ActionResult LoadMyProfile(long formid = 0, long id = 0, long docid = 0, long recruit_id = 0, long cand_user_id = 0, long desig_id = 0,
                                          long post_id = 0, string recruit_end_date = "", long application_id = 0)
{
    online_application_model _objonline_application_model = new online_application_model();
    _objonline_application_model = _objCandidateOnlineApplicationRepo.GetSelectedCandidateDetails(cand_user_id, docid, recruit_id, post_id, application_id);
    //_objonline_application_model have latest values set
    return Json(_objonline_application_model, JsonRequestBehavior.AllowGet);
}

HTML or view:

@model NOIT.ViewModels.online_application_model

    @Html.TextBoxFor(model => model.commAdd1, new
                        {
                            @class = "txt",
                            @id = "txtCommAdd1",
                            @data_ele_msg = "Communication Address1 Required.",
                            @data_ele_req = "true",
                            @maxlength = "100"
                        })


问:
log4j2 stops writing to file after few logs
I am working with log4j2. The logger initializes and creates output logfile. After writing few logs logger stops and does not write anything. The logger logs are as below:

```<code>`DEBUG StatusLogger PluginManager 'Lookup' found 16 plugins
DEBUG StatusLogger PluginManager 'Lookup' found 16 plugins
DEBUG StatusLogger PluginManager 'Converter' found 45 plugins
DEBUG StatusLogger Starting OutputStreamManager SYSTEM_OUT.false.false-1
DEBUG StatusLogger Starting LoggerContext[name=3bb8aabc, org.apache.logging.log4j.core.LoggerContext@73010765]...
DEBUG StatusLogger Reconfiguration started for context[name=3bb8aabc] at URI null (org.apache.logging.log4j.core.LoggerContext@73010765) with optional ClassLoader: null
DEBUG StatusLogger PluginManager 'Lookup' found 16 plugins
DEBUG StatusLogger PluginManager 'ConfigurationFactory' found 4 plugins
DEBUG StatusLogger PluginManager 'Lookup' found 16 plugins
DEBUG StatusLogger PluginManager 'Lookup' found 16 plugins
DEBUG StatusLogger Missing dependencies for Yaml support, ConfigurationFactory org.apache.logging.log4j.core.config.yaml.YamlConfigurationFactory is inactive
DEBUG StatusLogger PluginManager 'Lookup' found 16 plugins
DEBUG StatusLogger Missing dependencies for Json support, ConfigurationFactory org.apache.logging.log4j.core.config.json.JsonConfigurationFactory is inactive
DEBUG StatusLogger PluginManager 'Lookup' found 16 plugins
DEBUG StatusLogger Using configurationFactory org.apache.logging.log4j.core.config.ConfigurationFactory$Factory@26b95b0b
WARN StatusLogger Error parsing URI C:\myApplication\config\logger-config.xml
DEBUG StatusLogger PluginManager 'Lookup' found 16 plugins
DEBUG StatusLogger Closing FileInputStream java.io.FileInputStream@245ec1a6
DEBUG StatusLogger Apache Log4j Core 2.18.0 initializing configuration XmlConfiguration[location=C:\myApplication\config\logger-config.xml]
DEBUG StatusLogger PluginManager 'Core' found 130 plugins
DEBUG StatusLogger PluginManager 'Level' found 0 plugins
DEBUG StatusLogger PluginManager 'Lookup' found 16 plugins
DEBUG StatusLogger Building Plugin[name=layout, class=org.apache.logging.log4j.core.layout.PatternLayout].
TRACE StatusLogger TypeConverterRegistry initializing.
DEBUG StatusLogger PluginManager 'TypeConverter' found 26 plugins
DEBUG StatusLogger PatternLayout$Builder(pattern="[%d] [%t] [%-5p] [%l][%M] %m%n", PatternSelector=null, Configuration(C:\myApplication\config\logger-config.xml), Replace=null, charset="null", alwaysWriteExceptions="null", disableAnsi="null", noConsoleNoAnsi="null", header="null", footer="null")
DEBUG StatusLogger PluginManager 'Converter' found 45 plugins
DEBUG StatusLogger Building Plugin[name=TimeBasedTriggeringPolicy, class=org.apache.logging.log4j.core.appender.rolling.TimeBasedTriggeringPolicy].
DEBUG StatusLogger TimeBasedTriggeringPolicy$Builder(interval="null", modulate="null", maxRandomDelay="null")
DEBUG StatusLogger Building Plugin[name=SizeBasedTriggeringPolicy, class=org.apache.logging.log4j.core.appender.rolling.SizeBasedTriggeringPolicy].
DEBUG StatusLogger createPolicy(size="1000KB")
DEBUG StatusLogger Building Plugin[name=Policies, class=org.apache.logging.log4j.core.appender.rolling.CompositeTriggeringPolicy].
DEBUG StatusLogger createPolicy(={TimeBasedTriggeringPolicy(nextRolloverMillis=0, interval=1, modulate=false), SizeBasedTriggeringPolicy(size=1024000)})
DEBUG StatusLogger Building Plugin[name=DefaultRolloverStrategy, class=org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy].
DEBUG StatusLogger DefaultRolloverStrategy$Builder(max="5", min="null", fileIndex="null", compressionLevel="null", ={}, stopCustomActionsOnError="null", tempCompressedFilePattern="null", Configuration(C:\myApplication\config\logger-config.xml))
DEBUG StatusLogger Building Plugin[name=appender, class=org.apache.logging.log4j.core.appender.RollingFileAppender].
DEBUG StatusLogger RollingFileAppender$Builder(fileName="C:/logs/applicationLogs.log", filePattern="C:/logs_backup/${date:yyyy-MM}/applicationLogs-%d{MM-dd-yyyy}-%i.log.gz", append="null", locking="null", Policies(CompositeTriggeringPolicy(policies=[TimeBasedTriggeringPolicy(nextRolloverMillis=0, interval=1, modulate=false), SizeBasedTriggeringPolicy(size=1024000)])), DefaultRolloverStrategy(DefaultRolloverStrategy(min=1, max=5, useMax=true)), advertise="null", advertiseUri="null", createOnDemand="null", filePermissions="null", fileOwner="null", fileGroup="null", bufferedIo="null", bufferSize="null", immediateFlush="null", ignoreExceptions="null", PatternLayout([%d] [%t] [%-5p] [%l][%M] %m%n), name="CASRollingfileAppender", Configuration(C:\myApplication\config\logger-config.xml), Filter=null, ={})
TRACE StatusLogger New file 'C:/logs/applicationLogs.log' created = true
DEBUG StatusLogger Returning file creation time for C:\logs\applicationLogs.log
DEBUG StatusLogger Starting RollingFileManager C:/logs/applicationLogs.log
DEBUG StatusLogger PluginManager 'FileConverter' found 2 plugins
DEBUG StatusLogger Setting prev file time to 2022-12-06T23:48:23.928-0800
DEBUG StatusLogger Initializing triggering policy CompositeTriggeringPolicy(policies=[TimeBasedTriggeringPolicy(nextRolloverMillis=0, interval=1, modulate=false), SizeBasedTriggeringPolicy(size=1024000)])
DEBUG StatusLogger Initializing triggering policy TimeBasedTriggeringPolicy(nextRolloverMillis=0, interval=1, modulate=false)
TRACE StatusLogger PatternProcessor.getNextTime returning 2022/12/07-00:00:00.000, nextFileTime=2022/12/06-00:00:00.000, prevFileTime=1969/12/31-16:00:00.000, current=2022/12/06-23:48:23.959, freq=DAILY
TRACE StatusLogger PatternProcessor.getNextTime returning 2022/12/07-00:00:00.000, nextFileTime=2022/12/06-00:00:00.000, prevFileTime=2022/12/06-00:00:00.000, current=2022/12/06-23:48:23.959, freq=DAILY
DEBUG StatusLogger Initializing triggering policy SizeBasedTriggeringPolicy(size=1024000)
DEBUG StatusLogger Building Plugin[name=appenders, class=org.apache.logging.log4j.core.config.AppendersPlugin].
DEBUG StatusLogger createAppenders(={CASRollingfileAppender})
DEBUG StatusLogger Building Plugin[name=AppenderRef, class=org.apache.logging.log4j.core.config.AppenderRef].
DEBUG StatusLogger createAppenderRef(ref="CASRollingfileAppender", level="null", Filter=null)
DEBUG StatusLogger Building Plugin[name=logger, class=org.apache.logging.log4j.core.config.LoggerConfig].
DEBUG StatusLogger LoggerConfig$Builder(additivity="false", level="DEBUG", levelAndRefs="null", name="com.test.myApplication.logging", includeLocation="null", ={CASRollingfileAppender}, ={}, Configuration(C:\myApplication\config\logger-config.xml), Filter=null)
DEBUG StatusLogger Building Plugin[name=AppenderRef, class=org.apache.logging.log4j.core.config.AppenderRef].
DEBUG StatusLogger createAppenderRef(ref="CASRollingfileAppender", level="null", Filter=null)
DEBUG StatusLogger Building Plugin[name=root, class=org.apache.logging.log4j.core.config.LoggerConfig$RootLogger].
DEBUG StatusLogger LoggerConfig$RootLogger$Builder(additivity="null", level="WARN", levelAndRefs="null", includeLocation="null", ={CASRollingfileAppender}, ={}, Configuration(C:\myApplication\config\logger-config.xml), Filter=null)
DEBUG StatusLogger Building Plugin[name=loggers, class=org.apache.logging.log4j.core.config.LoggersPlugin].
DEBUG StatusLogger createLoggers(={com.test.myApplication.logging, root})
DEBUG StatusLogger Configuration XmlConfiguration[location=C:\myApplication\config\logger-config.xml] initialized
DEBUG StatusLogger Starting configuration XmlConfiguration[location=C:\myApplication\config\logger-config.xml]
DEBUG StatusLogger Started configuration XmlConfiguration[location=C:\myApplication\config\logger-config.xml] OK.
TRACE StatusLogger Stopping org.apache.logging.log4j.core.config.DefaultConfiguration@608bc8f8...
TRACE StatusLogger DefaultConfiguration notified 1 ReliabilityStrategies that config will be stopped.
TRACE StatusLogger DefaultConfiguration stopping root LoggerConfig.
TRACE StatusLogger DefaultConfiguration notifying ReliabilityStrategies that appenders will be stopped.
TRACE StatusLogger DefaultConfiguration stopping remaining Appenders.
DEBUG StatusLogger Shutting down OutputStreamManager SYSTEM_OUT.false.false-1
DEBUG StatusLogger OutputStream closed
DEBUG StatusLogger Shut down OutputStreamManager SYSTEM_OUT.false.false-1, all resources released: true
DEBUG StatusLogger Appender DefaultConsole-1 stopped with status true
TRACE StatusLogger DefaultConfiguration stopped 1 remaining Appenders.
TRACE StatusLogger DefaultConfiguration cleaning Appenders from 1 LoggerConfigs.
DEBUG StatusLogger Stopped org.apache.logging.log4j.core.config.DefaultConfiguration@608bc8f8 OK
TRACE StatusLogger Reregistering MBeans after reconfigure. Selector=org.apache.logging.log4j.core.selector.ClassLoaderContextSelector@2a3194c6
TRACE StatusLogger Reregistering context (1/1): '3bb8aabc' org.apache.logging.log4j.core.LoggerContext@73010765
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=3bb8aabc'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=3bb8aabc,component=StatusLogger'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=3bb8aabc,component=ContextSelector'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=3bb8aabc,component=Loggers,name=*'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=3bb8aabc,component=Appenders,name=*'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=3bb8aabc,component=AsyncAppenders,name=*'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=3bb8aabc,component=AsyncLoggerRingBuffer'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=3bb8aabc,component=Loggers,name=*,subtype=RingBuffer'
DEBUG StatusLogger Registering MBean org.apache.logging.log4j2:type=3bb8aabc
DEBUG StatusLogger Registering MBean org.apache.logging.log4j2:type=3bb8aabc,component=StatusLogger
DEBUG StatusLogger Registering MBean org.apache.logging.log4j2:type=3bb8aabc,component=ContextSelector
DEBUG StatusLogger Registering MBean org.apache.logging.log4j2:type=3bb8aabc,component=Loggers,name=
DEBUG StatusLogger Registering MBean org.apache.logging.log4j2:type=3bb8aabc,component=Loggers,name=com.test.myApplication.logging
DEBUG StatusLogger Registering MBean org.apache.logging.log4j2:type=3bb8aabc,component=Appenders,name=CASRollingfileAppender
TRACE StatusLogger Using default SystemClock for timestamps.
DEBUG StatusLogger org.apache.logging.log4j.core.util.SystemClock does not support precise timestamps.
TRACE StatusLogger Using DummyNanoClock for nanosecond timestamps.
DEBUG StatusLogger Reconfiguration complete for context[name=3bb8aabc] at URI C:\myApplication\config\logger-config.xml (org.apache.logging.log4j.core.LoggerContext@73010765) with optional ClassLoader: null
DEBUG StatusLogger Shutdown hook enabled. Registering a new one.
DEBUG StatusLogger LoggerContext[name=3bb8aabc, org.apache.logging.log4j.core.LoggerContext@73010765] started OK.
DEBUG StatusLogger AsyncLogger.ThreadNameStrategy=UNCACHED (user specified null, default is UNCACHED)
TRACE StatusLogger Using default SystemClock for timestamps.
DEBUG StatusLogger org.apache.logging.log4j.core.util.SystemClock does not support precise timestamps.
</code>```

and the logger config file as:

```<code><?xml version="1.0" encoding="UTF-8"?>
<Configuration>
    <Appenders>
        <RollingFile name="CASRollingfileAppender"
            fileName="C:/logs/applicationLogs.log"
            filePattern="C:/logs_backup/$${date:yyyy-MM}/applicationLogs-%d{MM-dd-yyyy}-%i.log.gz">
            <PatternLayout pattern="[%d] [%t] [%-5p] [%l][%M] %m%n" />
            <Policies>
                <TimeBasedTriggeringPolicy />
                <SizeBasedTriggeringPolicy size="1000KB" />
            </Policies>
            <DefaultRolloverStrategy max="5" />
        </RollingFile>
    </Appenders>
    <Loggers>
        <Logger
            name="com.test.myApplication.logging"
            level="DEBUG" additivity="false">
            <AppenderRef ref="CASRollingfileAppender" />
        </Logger>

        <Root level="WARN">
            <AppenderRef ref="CASRollingfileAppender" />
        </Root>
    </Loggers>
</Configuration>
</code>```

Any suggestions on what is going wrong here?

In logs it shows a warning as:

```<code>WARN StatusLogger Error parsing URI C:\myApplication\config\logger-config.xml
</code>```

However, I think the config file is working properly. Why does the logger stop writing after it writes a few logs?

Body:
I am working with log4j2. The logger initializes and creates output logfile. After writing few logs logger stops and does not write anything. The logger logs are as below:

`DEBUG StatusLogger PluginManager 'Lookup' found 16 plugins
DEBUG StatusLogger PluginManager 'Lookup' found 16 plugins
DEBUG StatusLogger PluginManager 'Converter' found 45 plugins
DEBUG StatusLogger Starting OutputStreamManager SYSTEM_OUT.false.false-1
DEBUG StatusLogger Starting LoggerContext[name=3bb8aabc, org.apache.logging.log4j.core.LoggerContext@73010765]...
DEBUG StatusLogger Reconfiguration started for context[name=3bb8aabc] at URI null (org.apache.logging.log4j.core.LoggerContext@73010765) with optional ClassLoader: null
DEBUG StatusLogger PluginManager 'Lookup' found 16 plugins
DEBUG StatusLogger PluginManager 'ConfigurationFactory' found 4 plugins
DEBUG StatusLogger PluginManager 'Lookup' found 16 plugins
DEBUG StatusLogger PluginManager 'Lookup' found 16 plugins
DEBUG StatusLogger Missing dependencies for Yaml support, ConfigurationFactory org.apache.logging.log4j.core.config.yaml.YamlConfigurationFactory is inactive
DEBUG StatusLogger PluginManager 'Lookup' found 16 plugins
DEBUG StatusLogger Missing dependencies for Json support, ConfigurationFactory org.apache.logging.log4j.core.config.json.JsonConfigurationFactory is inactive
DEBUG StatusLogger PluginManager 'Lookup' found 16 plugins
DEBUG StatusLogger Using configurationFactory org.apache.logging.log4j.core.config.ConfigurationFactory$Factory@26b95b0b
WARN StatusLogger Error parsing URI C:\myApplication\config\logger-config.xml
DEBUG StatusLogger PluginManager 'Lookup' found 16 plugins
DEBUG StatusLogger Closing FileInputStream java.io.FileInputStream@245ec1a6
DEBUG StatusLogger Apache Log4j Core 2.18.0 initializing configuration XmlConfiguration[location=C:\myApplication\config\logger-config.xml]
DEBUG StatusLogger PluginManager 'Core' found 130 plugins
DEBUG StatusLogger PluginManager 'Level' found 0 plugins
DEBUG StatusLogger PluginManager 'Lookup' found 16 plugins
DEBUG StatusLogger Building Plugin[name=layout, class=org.apache.logging.log4j.core.layout.PatternLayout].
TRACE StatusLogger TypeConverterRegistry initializing.
DEBUG StatusLogger PluginManager 'TypeConverter' found 26 plugins
DEBUG StatusLogger PatternLayout$Builder(pattern="[%d] [%t] [%-5p] [%l][%M] %m%n", PatternSelector=null, Configuration(C:\myApplication\config\logger-config.xml), Replace=null, charset="null", alwaysWriteExceptions="null", disableAnsi="null", noConsoleNoAnsi="null", header="null", footer="null")
DEBUG StatusLogger PluginManager 'Converter' found 45 plugins
DEBUG StatusLogger Building Plugin[name=TimeBasedTriggeringPolicy, class=org.apache.logging.log4j.core.appender.rolling.TimeBasedTriggeringPolicy].
DEBUG StatusLogger TimeBasedTriggeringPolicy$Builder(interval="null", modulate="null", maxRandomDelay="null")
DEBUG StatusLogger Building Plugin[name=SizeBasedTriggeringPolicy, class=org.apache.logging.log4j.core.appender.rolling.SizeBasedTriggeringPolicy].
DEBUG StatusLogger createPolicy(size="1000KB")
DEBUG StatusLogger Building Plugin[name=Policies, class=org.apache.logging.log4j.core.appender.rolling.CompositeTriggeringPolicy].
DEBUG StatusLogger createPolicy(={TimeBasedTriggeringPolicy(nextRolloverMillis=0, interval=1, modulate=false), SizeBasedTriggeringPolicy(size=1024000)})
DEBUG StatusLogger Building Plugin[name=DefaultRolloverStrategy, class=org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy].
DEBUG StatusLogger DefaultRolloverStrategy$Builder(max="5", min="null", fileIndex="null", compressionLevel="null", ={}, stopCustomActionsOnError="null", tempCompressedFilePattern="null", Configuration(C:\myApplication\config\logger-config.xml))
DEBUG StatusLogger Building Plugin[name=appender, class=org.apache.logging.log4j.core.appender.RollingFileAppender].
DEBUG StatusLogger RollingFileAppender$Builder(fileName="C:/logs/applicationLogs.log", filePattern="C:/logs_backup/${date:yyyy-MM}/applicationLogs-%d{MM-dd-yyyy}-%i.log.gz", append="null", locking="null", Policies(CompositeTriggeringPolicy(policies=[TimeBasedTriggeringPolicy(nextRolloverMillis=0, interval=1, modulate=false), SizeBasedTriggeringPolicy(size=1024000)])), DefaultRolloverStrategy(DefaultRolloverStrategy(min=1, max=5, useMax=true)), advertise="null", advertiseUri="null", createOnDemand="null", filePermissions="null", fileOwner="null", fileGroup="null", bufferedIo="null", bufferSize="null", immediateFlush="null", ignoreExceptions="null", PatternLayout([%d] [%t] [%-5p] [%l][%M] %m%n), name="CASRollingfileAppender", Configuration(C:\myApplication\config\logger-config.xml), Filter=null, ={})
TRACE StatusLogger New file 'C:/logs/applicationLogs.log' created = true
DEBUG StatusLogger Returning file creation time for C:\logs\applicationLogs.log
DEBUG StatusLogger Starting RollingFileManager C:/logs/applicationLogs.log
DEBUG StatusLogger PluginManager 'FileConverter' found 2 plugins
DEBUG StatusLogger Setting prev file time to 2022-12-06T23:48:23.928-0800
DEBUG StatusLogger Initializing triggering policy CompositeTriggeringPolicy(policies=[TimeBasedTriggeringPolicy(nextRolloverMillis=0, interval=1, modulate=false), SizeBasedTriggeringPolicy(size=1024000)])
DEBUG StatusLogger Initializing triggering policy TimeBasedTriggeringPolicy(nextRolloverMillis=0, interval=1, modulate=false)
TRACE StatusLogger PatternProcessor.getNextTime returning 2022/12/07-00:00:00.000, nextFileTime=2022/12/06-00:00:00.000, prevFileTime=1969/12/31-16:00:00.000, current=2022/12/06-23:48:23.959, freq=DAILY
TRACE StatusLogger PatternProcessor.getNextTime returning 2022/12/07-00:00:00.000, nextFileTime=2022/12/06-00:00:00.000, prevFileTime=2022/12/06-00:00:00.000, current=2022/12/06-23:48:23.959, freq=DAILY
DEBUG StatusLogger Initializing triggering policy SizeBasedTriggeringPolicy(size=1024000)
DEBUG StatusLogger Building Plugin[name=appenders, class=org.apache.logging.log4j.core.config.AppendersPlugin].
DEBUG StatusLogger createAppenders(={CASRollingfileAppender})
DEBUG StatusLogger Building Plugin[name=AppenderRef, class=org.apache.logging.log4j.core.config.AppenderRef].
DEBUG StatusLogger createAppenderRef(ref="CASRollingfileAppender", level="null", Filter=null)
DEBUG StatusLogger Building Plugin[name=logger, class=org.apache.logging.log4j.core.config.LoggerConfig].
DEBUG StatusLogger LoggerConfig$Builder(additivity="false", level="DEBUG", levelAndRefs="null", name="com.test.myApplication.logging", includeLocation="null", ={CASRollingfileAppender}, ={}, Configuration(C:\myApplication\config\logger-config.xml), Filter=null)
DEBUG StatusLogger Building Plugin[name=AppenderRef, class=org.apache.logging.log4j.core.config.AppenderRef].
DEBUG StatusLogger createAppenderRef(ref="CASRollingfileAppender", level="null", Filter=null)
DEBUG StatusLogger Building Plugin[name=root, class=org.apache.logging.log4j.core.config.LoggerConfig$RootLogger].
DEBUG StatusLogger LoggerConfig$RootLogger$Builder(additivity="null", level="WARN", levelAndRefs="null", includeLocation="null", ={CASRollingfileAppender}, ={}, Configuration(C:\myApplication\config\logger-config.xml), Filter=null)
DEBUG StatusLogger Building Plugin[name=loggers, class=org.apache.logging.log4j.core.config.LoggersPlugin].
DEBUG StatusLogger createLoggers(={com.test.myApplication.logging, root})
DEBUG StatusLogger Configuration XmlConfiguration[location=C:\myApplication\config\logger-config.xml] initialized
DEBUG StatusLogger Starting configuration XmlConfiguration[location=C:\myApplication\config\logger-config.xml]
DEBUG StatusLogger Started configuration XmlConfiguration[location=C:\myApplication\config\logger-config.xml] OK.
TRACE StatusLogger Stopping org.apache.logging.log4j.core.config.DefaultConfiguration@608bc8f8...
TRACE StatusLogger DefaultConfiguration notified 1 ReliabilityStrategies that config will be stopped.
TRACE StatusLogger DefaultConfiguration stopping root LoggerConfig.
TRACE StatusLogger DefaultConfiguration notifying ReliabilityStrategies that appenders will be stopped.
TRACE StatusLogger DefaultConfiguration stopping remaining Appenders.
DEBUG StatusLogger Shutting down OutputStreamManager SYSTEM_OUT.false.false-1
DEBUG StatusLogger OutputStream closed
DEBUG StatusLogger Shut down OutputStreamManager SYSTEM_OUT.false.false-1, all resources released: true
DEBUG StatusLogger Appender DefaultConsole-1 stopped with status true
TRACE StatusLogger DefaultConfiguration stopped 1 remaining Appenders.
TRACE StatusLogger DefaultConfiguration cleaning Appenders from 1 LoggerConfigs.
DEBUG StatusLogger Stopped org.apache.logging.log4j.core.config.DefaultConfiguration@608bc8f8 OK
TRACE StatusLogger Reregistering MBeans after reconfigure. Selector=org.apache.logging.log4j.core.selector.ClassLoaderContextSelector@2a3194c6
TRACE StatusLogger Reregistering context (1/1): '3bb8aabc' org.apache.logging.log4j.core.LoggerContext@73010765
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=3bb8aabc'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=3bb8aabc,component=StatusLogger'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=3bb8aabc,component=ContextSelector'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=3bb8aabc,component=Loggers,name=*'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=3bb8aabc,component=Appenders,name=*'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=3bb8aabc,component=AsyncAppenders,name=*'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=3bb8aabc,component=AsyncLoggerRingBuffer'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=3bb8aabc,component=Loggers,name=*,subtype=RingBuffer'
DEBUG StatusLogger Registering MBean org.apache.logging.log4j2:type=3bb8aabc
DEBUG StatusLogger Registering MBean org.apache.logging.log4j2:type=3bb8aabc,component=StatusLogger
DEBUG StatusLogger Registering MBean org.apache.logging.log4j2:type=3bb8aabc,component=ContextSelector
DEBUG StatusLogger Registering MBean org.apache.logging.log4j2:type=3bb8aabc,component=Loggers,name=
DEBUG StatusLogger Registering MBean org.apache.logging.log4j2:type=3bb8aabc,component=Loggers,name=com.test.myApplication.logging
DEBUG StatusLogger Registering MBean org.apache.logging.log4j2:type=3bb8aabc,component=Appenders,name=CASRollingfileAppender
TRACE StatusLogger Using default SystemClock for timestamps.
DEBUG StatusLogger org.apache.logging.log4j.core.util.SystemClock does not support precise timestamps.
TRACE StatusLogger Using DummyNanoClock for nanosecond timestamps.
DEBUG StatusLogger Reconfiguration complete for context[name=3bb8aabc] at URI C:\myApplication\config\logger-config.xml (org.apache.logging.log4j.core.LoggerContext@73010765) with optional ClassLoader: null
DEBUG StatusLogger Shutdown hook enabled. Registering a new one.
DEBUG StatusLogger LoggerContext[name=3bb8aabc, org.apache.logging.log4j.core.LoggerContext@73010765] started OK.
DEBUG StatusLogger AsyncLogger.ThreadNameStrategy=UNCACHED (user specified null, default is UNCACHED)
TRACE StatusLogger Using default SystemClock for timestamps.
DEBUG StatusLogger org.apache.logging.log4j.core.util.SystemClock does not support precise timestamps.

and the logger config file as:

<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
    <Appenders>
        <RollingFile name="CASRollingfileAppender"
            fileName="C:/logs/applicationLogs.log"
            filePattern="C:/logs_backup/$${date:yyyy-MM}/applicationLogs-%d{MM-dd-yyyy}-%i.log.gz">
            <PatternLayout pattern="[%d] [%t] [%-5p] [%l][%M] %m%n" />
            <Policies>
                <TimeBasedTriggeringPolicy />
                <SizeBasedTriggeringPolicy size="1000KB" />
            </Policies>
            <DefaultRolloverStrategy max="5" />
        </RollingFile>
    </Appenders>
    <Loggers>
        <Logger
            name="com.test.myApplication.logging"
            level="DEBUG" additivity="false">
            <AppenderRef ref="CASRollingfileAppender" />
        </Logger>

        <Root level="WARN">
            <AppenderRef ref="CASRollingfileAppender" />
        </Root>
    </Loggers>
</Configuration>

Any suggestions on what is going wrong here?

In logs it shows a warning as:

WARN StatusLogger Error parsing URI C:\myApplication\config\logger-config.xml

However, I think the config file is working properly. Why does the logger stop writing after it writes a few logs?


问:
How to associate / dissociate multiple file extensions in IntelliJ-IDEA navigation bar
Sometimes when two files have the same name but different file extensions like .md and .html. The two files are displayed in a folder of the name of the file.

Is it possible to control this behavior to add or remove custom associations like .puml and .svg ?


问:
How can i transpile a jsx file imported dynamically in nodejs?
I am currently working on a nodejs command-line package that should dynamically import a React component basing on the path of the component passed as parameter. My code is the following:

```<code>const path = require('path')

const pathArg = process.argv[2]
const componentPath = path.join(filePath, '../../../', pathArg)

const {default} = await import(componentPath)
</code>```

The component i want to import would be something like

```<code>// src/components/Button/index.jsx

function Button () {
  return <button>Click me!</button>
}

module.exports = Button
</code>```

However, when i run my script passing src/components/Button/index.jsx as param, i receive unexpected token "<" while reading <button>, since the file is in jsx.

How can i transpile the React file dynamically (e.g. with Babel) and get rid of the error?

Body:
I am currently working on a nodejs command-line package that should dynamically import a React component basing on the path of the component passed as parameter. My code is the following:

const path = require('path')

const pathArg = process.argv[2]
const componentPath = path.join(filePath, '../../../', pathArg)

const {default} = await import(componentPath)

The component i want to import would be something like

// src/components/Button/index.jsx

function Button () {
  return <button>Click me!</button>
}

module.exports = Button

However, when i run my script passing src/components/Button/index.jsx as param, i receive unexpected token "<" while reading <button>, since the file is in jsx.

How can i transpile the React file dynamically (e.g. with Babel) and get rid of the error?


问:
How to you put a prepared statement index value into a global variable
I need to use the data entered into the preparedstatement.setString(1,input.nextLine()) into a public variable and use it in a different class. Please help.

String sql = "insert into customer(customerName, customerAddress, column_name)
              values(?,?,?)"; //  Initialize a string with the SQL query

System.out.println();
System.out.println("___________________________Hello Customer
                    ___________________________");

PreparedStatement preparedStatement = connection.prepareStatement(sql);
System.out.print("Enter Your Name : ");
preparedStatement.setString(1,input.nextLine());

System.out.print("Enter Your  Address : ");
preparedStatement.setString(2, input.nextLine());
```

I don't know too much about Java, so please dumb it down for me.

Body:
I need to use the data entered into the preparedstatement.setString(1,input.nextLine()) into a public variable and use it in a different class. Please help.

String sql = "insert into customer(customerName, customerAddress, column_name)
              values(?,?,?)"; //  Initialize a string with the SQL query

System.out.println();
System.out.println("___________________________Hello Customer
                    ___________________________");

PreparedStatement preparedStatement = connection.prepareStatement(sql);
System.out.print("Enter Your Name : ");
preparedStatement.setString(1,input.nextLine());

System.out.print("Enter Your  Address : ");
preparedStatement.setString(2, input.nextLine());

I don't know too much about Java, so please dumb it down for me.


问:
AttributeError: 'numpy.ndarray' object has no attribute 'lower' - how to fix it?
The full error is this. I am not sure how to fix it. I'm trying to predict the link between gender and aggresiveness in tweets.
(https://i.stack.imgur.com/T4Ual.png)

This is the whole script

```<code>import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

#De specifikke, vi ved vi kommer til at bruge
from sklearn import linear_model
from sklearn.model_selection import train_test_split
from sklearn.metrics import r2_score
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.model_selection import train_test_split
from sklearn.naive_bayes import MultinomialNB #Gør at man kan have mere end 2 classes

data = pd.read_csv('/work/90301/Individual project/TheClimateChangeTwitterDataset.csv')

#corpus=data['text']
#corpus=text.loc[:,['aggressiveness', 'gender']]

cv=CountVectorizer() #Take some text and turn it into a matrix
X = cv.fit_transform(data.values).toarray()
#x = X['aggressiveness'].values
#y = X['gender'].values
y=data['gender'].values
print(X.shape)
print(y.shape)
X_train,X_test, y_train, y_test = train_test_split(X, y, test_size=0.20)

#Instantiate and train Naive Bayes
classifier = MultinomialNB(fit_prior=True)
classifier.fit(X_train, y_train)

#test model
y_pred = classifier.predict(X_test)
cm = confusion_matrix(y_test, y_pred)
print(cm)

print(f'Relative accuracy: {accuracy_score(y_test, y_pred)}')
print(f'Accuracy in instances: {accuracy_score(y_test, y_pred, normalize=False)}')

#Infer the label (spam/ham) of a message
aggressiveness=[corpus]
#print(email)
aggressiveness_array = cv.transform(aggressiveness).toarray()
print(classifier.predict(aggressiveness_array))
</code>```

Body:
The full error is this. I am not sure how to fix it. I'm trying to predict the link between gender and aggresiveness in tweets.
(https://i.stack.imgur.com/T4Ual.png)

This is the whole script

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

#De specifikke, vi ved vi kommer til at bruge
from sklearn import linear_model
from sklearn.model_selection import train_test_split
from sklearn.metrics import r2_score
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.model_selection import train_test_split
from sklearn.naive_bayes import MultinomialNB #Gør at man kan have mere end 2 classes

data = pd.read_csv('/work/90301/Individual project/TheClimateChangeTwitterDataset.csv')

#corpus=data['text']
#corpus=text.loc[:,['aggressiveness', 'gender']]

cv=CountVectorizer() #Take some text and turn it into a matrix
X = cv.fit_transform(data.values).toarray()
#x = X['aggressiveness'].values
#y = X['gender'].values
y=data['gender'].values
print(X.shape)
print(y.shape)
X_train,X_test, y_train, y_test = train_test_split(X, y, test_size=0.20)

#Instantiate and train Naive Bayes
classifier = MultinomialNB(fit_prior=True)
classifier.fit(X_train, y_train)

#test model
y_pred = classifier.predict(X_test)
cm = confusion_matrix(y_test, y_pred)
print(cm)

print(f'Relative accuracy: {accuracy_score(y_test, y_pred)}')
print(f'Accuracy in instances: {accuracy_score(y_test, y_pred, normalize=False)}')

#Infer the label (spam/ham) of a message
aggressiveness=[corpus]
#print(email)
aggressiveness_array = cv.transform(aggressiveness).toarray()
print(classifier.predict(aggressiveness_array))


问:
Azure Built-in auth and Custom Auth Difference for implementing PKCE
So I'm trying to implement a SPA on an Azure App Service and was asked to use MSAL.js 2.0 for PKCE. I'm reading the documentation but I'm confused about the built-in auth from the Azure side and applying custom authentication. Can Built-in Auth be used for login and not rely on MSAL.js 2.0 anymore? Or is it something you apply both, like a Built-in Auth with MSAL.js 2.0 on code?

I'm expected to apply MSAL.js 2.0 but they're also saying I should use Built-in Auth. We've applied the App Registration for Built-in Auth but it's an Implicit Grant so I'm thinking it will not satisfy the requirement of using PKCE. So I'm confused if it's 2 separate things that shouldn't be done together or if they are dependent on each other.


问:
How to run a Cron job for every 5 mins for only 30 mins?
I want to run a Cron job for every 5 mins for 30 mins, starting at 22:30 till 23:00.

To do this I wrote it like this

0 30,0/5 22 ? * * *

If you put this in https://crontab.cronhub.io/

It will say:

At 30 minutes past the hour and every 5 minutes, starting every hour, between 10:00 PM and 10:59 PM

But when I looked at the logs, I see it started the run at 22:00 till 22:55.

Why is this happening? Also, how can I make it work like the way I want it to.