Latest Questions

copy text onclick from <p> tag

<div class="d-flex flex-row justify-content-between"> <p class="mb-0 me-1 py-2 ps-4 add-text" id=

Javascript functions stop working when using import at top of script, even without trying to use what's imported

I'm trying to recreate a simple program of mine using lit instead of just basic js, but adding import statements seems to break every function. Things seem to w

C# properties and "tostring" method

I was trying to understand properties better and I came across this page with this example: https://www.tutorialspoint.com/csharp/csharp_properties.htm using Sy

Adding Python 2.7 to an app packet after macOS 12.3 does no longer include Python

Last year I got a PortJump packet from Codeweavers for an open source Windows software, not knowing that it uses Python 2.7 supplied by macOS < 12.3 only (P

Bad Request | CSRF Token Not Found | CSRF Handling for Flask WTF

The Issue I work for a couple of simple volunteering organizations helping with management and running campaigns, but we needed a system to track peoples hours

Create a date object in a specific time zone and convert it to UTC in JavaScript

My application is currently storing the date and time of a particular event in the following format: date: 2022-05-06 time: 00:00 // (12:00 AM) Each event's ti

How to determine the winner in a race?

I have created a program that places several nodes (which act as animals) on the screen; they're supposed to race eachother. Animal.js is the parent object of t

Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code

I am running a react application and it shows the following error: Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in yo

What is the right way to measure server/client latency (TCP & UDP)

I am sending and recieving packets between two boards (a Jeston and a Pi). I tried using TCP then UDP, theoritically UDP is faster but I want to verify this wit

can not generate resource nestjs : typeScript

I am getting this error: TypeError: Cannot read property 'properties' of undefined Failed to execute command: node @nestjs/schematics:resource --name=post --

Spring Data JPA: how to make one to one relationship with SQL Server JSON column

Spring Data JPA: how to make one to one relationship with SQL Server JSON column? Class EntityA { long id; @Type(type = "json") @Column(columnDefinition =

How to do a for loop in html(razor) using c#

Hello guys i am trying to create a table with all information i have taken from an api in .cshtml.cs and to show them in the html page. But i can't quite figure

Measure compute shader execution time in Unity

Is there a way to measure the execution time of a given compute shader in Unity ? I thought to "artificialy" add a compute buffer in this compute shader and mak

Heroku deployment with Git fails with 504 Gateway TImeout

Due to the recent problems on Heroku´s Dashboard, I am trying to deploy directly my app through Git as stated here: https://devcenter.heroku.com/articles

How can I detect image artifacts?

I need to make the script that will return True if image contains visual artifacts that look like gray clusters of pixels Kind of artifact that I want to catch

Create role only if FindInMap value is present? / What to do if Mapping doesn't have values for some keys?

I have a role that I want to create only if there are entries for the given keys in the Mapping. The confusion comes when I have no values to put in for certain

kafka and parallel consumer: why order is important into a microservice architecture

I started to dive into kafka ecosystem. I was surprised to find out that by default, each consumer only digests one "event" at a time, sequentially! It's given

how to build libxml2 for Android NDK

I try to compile libxml2 for android ndk but I get this error: libxml2-2.9.8/include/libxml/encoding.h:28:19: fatal error: iconv.h: No such file or directory Y

Adding 2nd fxml within pane of 1st fxml

I'm brand new to javafx so apologies for the basic question! My question is how to add a 2nd fxml inside a pane from the 1st fxml. I've got a mini program here.

Seeing no way to avoid (deeper) inheritance tree without producing code duplication

I am rather new to OOP and I can't wrap my head around a problem I have frequently encountered by now. I hope, I understand the reasoning behind why composition

State VS Strategy design pattern

I really know that when we have a state-dependent behaviour, we automatically think of state design pattern, especially when it comes to a behaviour that change

Why we need to constructor inside a model in ASP.NET MVC using C#, and what is the purpose of this?

public class TagVM { public string TagName { get; set; } } public class TagListVM { public List<TagVM> TagList { get; set; } public TagListV

Flutter - How to change color of marker based on magnitude of an int?

I want to create markers at each GPS point with a color on a scale from white to red that corresponds to how slow or fast the GPS data indicates the speed is at

Create XML file from Maven

There are many Maven plugins for file manipulation, filtering, copying etc. But is there also a way to create a new XML file from Maven (without creating my own

pandas - how to access the value of next 16 rows as a list of 16 numbers

Say I have just 2 columns in pandas. Column 1 has all numerical values and column 2 has values only at the every 16th position (so column 2 has value at index 0

Segmentation Fault With Array object when calling constructor

This is the base class class Product{ protected: string model; double price; int qty; public:

How to search by dict keys in ElasticSearch

I am new in elasticsearch and I need to write query described below I have an elasticsearch index with documents like this one Numbers mean entries of words in

Synchronously acquiring the Response.Content of asynchronous HttpClient.SendAsync, in .NET Standard 2.0

How can I properly extract an HttpResponseMessage Content property (of type HttpContent) in .NET Standard 2.0 plain synchronous manner, acquired after using asy