Latest Questions

implementing dijkstra's algorithm using a priority queue

So I'm trying to implement Dijkstra's algorithm. I understand Dijkstra's works, but I struggle to turn the concept into code. I have what I thought would be the

Conditional KinesisStreamSpecification in CloudFormation script

I am new to CloudFoundation scripts and trying to set the conditional attribute for AWS DDB table using the yaml files. Tried with below but getting error durin

DevEcoStudio: No SDK file downloaded on installing DevEcoStudio

I have an issue in downloading SDK file in version 3.0.0.800. After I installed DevEcoStudio I realized that SDK file did not get installed with it. So when I g

Return sub list of elements based on matching sub strings from another list

I want to filter a list of string based on another list of sub strings. main_list=['London','England','Japan','China','Netherland'] sub_list=['don','land'] I w

can't import torchtext.legacy.data

as i know, from torchtext 0.9.0, torchtext.data and torchtext.dataset are moved to torchtext.legacy but my 0.12.0 torchtext can't import torchtext.legacy while

Pandas store a json into a pandas column

I have a pandas dataframe like this data = {"Name": ["Tom", "nick", "kish", "jack"], "Age": [20, 21, 19, 18]}

The error of several nn.GRU layers in Pytorch model

Recently, I made a GRU model with Pytorch. When the model has one nn.GRU layer, it runs well. But when there are more than one GRU layer, the model would report

When I run the program, I don't get any errors, but after I have already set the value of the variables, I get this error

When I run the program, I don't get any errors: #include <iostream> #include <string.h> using namespace std; int main() { string s1, s2, s3;

Remove zeros from Dataframe of lists

I have such a DataFrame: index B 0 [0,1,2,0,4] 1 [1,0,2,0,0,1,7] I want to count the non zero values of each list for each row. Result: index B 0 3 1 4

get returned data to display inside of vue model

I have a simple set of data that will come in from my method. I need the data to display inside of my vue model thats all which is inside an object or array. Ho

Azure managed application: How to allow resources in the application access each other with system assigned identities

The way we use Azure Managed Applications is to offer an end-to-end solution to the customer. We must be able to hide the intellectual property, while offering

How to map PagingSource to another object

I implement paging 3 follow this codelab. codelab But when i create UserPagingRepository, i have problem that data class is not map. In Room DataBase, i use Use

Replace contents of an item in a list using Kustomize

I'm having difficulty trying to get kustomize to replace contents of an item in a list. My kustomize file apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kust

TypeError: Class extends value undefined is not a constructor or null while using stream-browserify

While using stream-browserify to import Transform class and extend it in the code causing the following exception in the browser console AudioUtils.ts:52 Uncaug

MPI communication problem, passing wrong values

I have just installed OpenMPI-4.1.3 on my Ubuntu 22.04 64 bit OS. I tested the MPI communication with a sample. The idea is that all ranks sends its rank ID to

add collection to firestore with kotlin problems

I am trying to understand and use firebasefirestore from android studio with kotlin. I have been following tutorials from the official docs, and from udemy and

Is it possible to perform an automatic action on the order when using a coupon? - WooCommerce

First of all, I will try to explain my problem. Basically, I have an online store built in WooCommerce and, so far, everything is working properly. In parallel

data format to predict with model fitted via Sagemaker's XGBoost built-in algorithm and training container

Looking at the following code, taken from here, I wonder what format dtest is (sorry I could not gleen this from the post): import pickle as pkl import tarfile

How to add the value passed in the view to a href attribute in a pug view

Here is the function passing the data to the view I don't understand what i am doing wrong that i receive an error at this line when the view is loaded a(href="

Angular RouterModule - getting 404 on page refresh with path defined in routes Azure Static Web Apps

I had created child components to lazy load based on nav menu click which has paths "HTML". The app-routing.module.ts has the following routes defined, const ro

Saving PDF file in SQL Server using Golang

I'm having issue in saving a PDF file in SQL Server database using stored procedure in Golang. Below is the code. tsql := fmt.Sprintf("DECLARE @tmp varbinary(ma

C# WPF Datagrid slow Scrolling

I have a problem with scrolling my datagrid. I am using a WPF C# application with the 4.7.2 .NET Framework. I load about 5000 datasets into a datatable, which I

Why history on chrome not working when added a new state?

I have pushed some states into browser but when I clicking on the back button browser it can not navigate to previous state. Although, I clicked and hold on the

how to apply displacement map to a vertex shader in Webgl?

Hello I have an image of displacement like this. I want to make the surface displace more when the part of image getting darker. Here is my code in vertex shad

Every time i refreshes my app it logs out even though i've used this onAuthStateChanged. Below is my code of loading screen

I'm using this screen to navigate between two screens by using the onAuthStateChanged but still every time It refresh the app it logs out even though I'm not lo

How to get numbers to cycle around specific range in JavaScript?

I have this which isn't working, for cycling like 1 2 3 4 5 6 7 8 9 1 2 3 4 ..., cycling between 1 and 9. const cycle = integers => { let i = 0 let x

Using a multiple arrays in order to find the lowest "Ranking" in an character defined ranking system

Wordy title but I was interviewed on this question, couldn't derive the answer and really would love to better understand array usage in excel. Question: You ha

Trying to refactor React App to React-Redux issue w/ volume slider

I've been doing freecodecamps Drum Machine app. I was able to complete the app completely with React but I made a copy to try and get familiar with using react-

extracting holder exponents and singularity spectrum from signal in python

Is there any way of computing the holder exponents and singularity spectrum of a signal using multifractal 1-D wavelet leader estimates? Matlab has dwtleader: h

Data-content gets stuck on hover (Bootstrap)

Whenever I hover over an element and data-content shows on hover, if I scroll fast or quickly, the content gets stuck on page even if I scroll. enter image desc