Latest Questions

C# ASP.NET Core DI with logging

I'm looking for DI solution for the following problem. I'm writing a custom SeriLog sync that requires a dependency from my serviceprovider. I can't seem to fig

How can I stop Apache tomcat to log 404 errors in Application Insights? GET/* Error

I have deployed an angular application in a Tomcat app server in Azure App Service. In order to enable fallback into index.html I included a web.xml file inside

Using only Lodash, how do i isolate an element that occurs the most in an array?

I am currently following a tutorial that covers Lodash and it is prompting me to return this value : { author: "Robert C. Martin", blogs: 3 } given this ar

realm swift - filter objects with a property that starts with a string included in a list

I have a list of strings filterList = ['x0', 'x1', 'x2'] My object is as follows: class Item: Object { @Persisted var name: String? } I want to get all obj

Can someone help me fix the bottom two rows of my nested loop? They shouldn't be the same lengths, but they are

I'm working on a project where I'd like to create the following pattern: X XX XXX XXXX .. and so forth. There are twenty rows in all, and the twentieth row sho

"gdstk.h No such file or directory"

Answered below! Thanks @drescherjm I am having some trouble generating the initial red rectangle in gdstk. I have copy-pasted source code below into a "Hello Wo

How to find data in other row with laravel-excel

I'm using maatwebsite/excel to import an excel file with laravel and save data to database In my excel file I have a column name "Ref" and an other name "toRef"

How to make MathJax faster?

I was working on a website that contains a lot of mathematical expressions. I use MathJax with React (using 'react-mathjax-preview') but I noticed that renderin

How to set the download file extension for blob data

In my site video use the blob data, when the video was downloaded, the saved filename is the blob name with .txt(4671addc-3ce0-4eb6-b414-ddf3406b1fe5.txt) exten

Graph API - Temporary Access Pass Generation

Have the following script that is trying to create a csv of TAP codes using the Graph API. Currently getting an Error 401 Unathorised error when reaching Invoke

cms Enveloped Data binary encoding problem in pkijs

I'm trying trying to implement exchange of CMS encrypted content using the pkijs library. Basically I've just copied the example from here: https://pkijs.org/ex

How do I rerun the editor after the git commit-msg hook?

I have a git commit-msg hook that looks like this: #!/bin/bash COMMIT_MESSAGE_FILE="$1" COMMIT_MESSAGE=$(cat "$COMMIT_MESSAGE_FILE") if echo $COMMIT_MESSAGE |

Lodash custom orderBy then by

I need to use lodash to implement a custom sort based on classification, then by creation time, with more recently created items with the same classification ha

How to use sshpass without TTY on a Node.JS backend?

I am running the following in a script: pubkey=$(gpg2 --verbose --export-ssh-key $EXPORT_THIS_ID) sshpass -p$REMOTE_PASS ssh -o IdentitiesOnly=yes -o StrictHost

How do I close one specific csv file that is open in the excel application on windows using python, given the path to that file?

I have a script that writes data to a csv file, but if that csv file is open (in the excel application on Windows 10) then it generates a PermissionError. This

OpenAPI throws Could not resolve reference: Could not resolve pointer: for @ExampleObject files

I am developing a Quarkus service-based application for which I am adding open API based annotations such as @ExampleObject. For this, I would like to add the r

TypeError: iter() returned non-iterator of type 'NoneType'

from collections.abc import Iterable from collections.abc import Iterator class MyList(object): def __init__(self): self.Container = [11, 22, 33] def

Python tkinter - Display all the checkbuttons selected

I created a GUI with 2 input boxes and a list of checkbuttons (derived from list 'a') with scroll. Now, I want to display all the checkbuttons which have been s

Four values to be non zero and non negative

Suppose I have four variables x, y, z, w. I want to print: "hello all non zero values" only if all x, y, z, w are non-negative and non-zero values. If all the

How to change default value size parameter of the terms aggregation?

By default, the terms aggregation returns the top ten terms with the most documents. How to change default value of the size parameter of terms aggregation? Ela

RecyclerView sorting process and getting position issue

I have an activity that shows model comes from Firebase in a recyclerView. Each row has a delete button and user can delete which row he/she wants. The problem

What's the ideal way to add set data to a database in Nest.JS when starting the app for the first time?

I have a database with quite a few tables, and some of those tables need to have default information in them - stuff like categories, permissions, roles, tags,

How to take a JSON content and return it in a wordpress function (php)?

I have a wordpress endpoint and I have some json data. Unfortunately I dont know how to return this json data in the function. I tried json_decode but it doesn'

Using Firebase with npm

I would like to use Firebase in my project with NPM and I installed it using "npm i firebase". This worked fine so I made a new file called "app.js". Here I wou

Determine the exact error of a long python line

I have long lines in my code such as: if (currentExcelDep[excelPackageName]== depDataCollection[depDataCollectionSet][depDataCollectionSetElement][excelPath] an

How to generate confusion matrix using test results?

I obtained test results(bbox size, location) via code below, !./darknet detector map data/data.obj cfg/yolov4-obj.cfg backup/yolov4_last.weights -ext_output <

Python - browser pages managment

I am using Google Chrome and I need to find a way of finding on existing window and existing page way of interaction with it ( clicking on something and all tha

Static builds of react js giving error for array.map but developmemnt server is running well

The error is in the functionality where the frontend requests for data from the backend and then uses array.map to display each element of the data. The data is

OData Queries on Entities with Dynamic Fields

I am using OData on a dynamic model. The MyObject data is stored in two different ways on the database - in a main MyObject table and in a secondary table of ke