Latest Questions

Creating Docker container for a micro-service based on node.js & grpc

I am trying to build a chat-service by using node.js and grpc, where two services running on different port can communicate to each other. I have created a sing

swapping array elements without a temporary variable

The following code: var words = ['javascript', 'hmtl', 'css', 'python']; words[0] = words[3]; words[3] = words[0]; alert(words); ...gives

How to run Gitlab-CI pipelines only branch and tag?

I just want to run pipelines when tagged from main branch. I tried using workflow but it doesn't work. This is my .gitlab-ci.yml file. workflow: rules: -

react-hook-form's validate function always returns errors

This is the one that occurs problem. <input type="text" name="nickname" {...register('nickname', { required: true, validate: async

how to convert lmd file to csv? [Flow Cytometry data]

lmd file extension is often used for generating flow cytometry data. But this couldn't be directly used for processing either in R or Python. Is there a way to

How to recognize Id attribute in rails form_tag?

I am using a form in rails to pass an id. That id will trigger the javascript Sweet Alert function which will pop up a modal with a confirmation message. When t

How to verify if the submodule hash is pushed to the remote?

I've a monorepo with many submodules,everytime a PR is raised on my monrepo to update hashes of the submodule, i need to run a jenkins job to see if the hashes

JavaFX wait for all listeners to finish

I created a method that accepts a CheckListView (controlsFX), an item List, a TextField searchField and a BiPredicate. This functions allows for filtering the i

rails tutorial Test errors that occur after Chapter 6

I'm a beginner. rails tutorial I got an error like this when I did a rails test after finishing Chapter 6 and before giving it to git. I did an integration test

Check Google pay's authentication mode

I'd like to set my Google pay to accept both authentication modes: "PAN_ONLY" and "CRYPTOGRAM_3DS". Then, during transaction flow, when I get the token, before

How do you initialize reference type class properties in a nullable context in Unity?

As you are supposed to use the Start() or Awake() methods instead of the class constructors in Unity to initialize your class properties, VisualStudio complains

How to use 15 length character key in flutter encrypt package

I'm going to use this package for encryption in the flutter application. It doesn't accept keys lower than 16 characters long. But I want to use 15 characters k

How should I optimize the order by index

1.select * from transactions where from_account_id = 51118 order by block_number, index desc limit 20; Limit (cost=295.39..4973.89 rows=20 width=605) ->

How to Close Statements and Connection in This Method

How to Close Statements and Connection in This Method public static ResultSet getData (String query){ try { Connection con = ConnectionPro

How to disable scroll on body when clicking on a p-dropdown within it

I am using few p-dropdown in my table header where I also have a horizontal scroll for it's container. When I click on any of these dropdowns, instead of openin

Why am I getting .slice is not a function? [closed]

I know that .slice() can only work on arrays and strings. I'm calling .slice() on an array and I am still getting that error. Here is my code:

Fetching data in level 3 of self-referencing / parent-child relationship

I am programming a multilevel menu / submenu in ASP.NET MVC. I have this table: Id Name ParentId ---------------------------------- 1

How to dynamically change material ui icon depending on the backend response?

I have a table and in this table, there is a column named status, and in this column, three values are returned from the backend, which are "approve", "Review"

How to convert CMSampleBuffer to OpenCV's Mat instance in swift

I am working on an OpenCV project where I am taking input from iPhone native camera as CMSampleBuffer now I wanted to create Mat instance that is required in Op

Mongodb aggregate group by then conditional sum, or, filter, push, using c#

Can someone please help to convert this query to C# .NET core? db.getCollection("accout").aggregate().match({ $or: [{"clientnum1": "xxxx"},{ "clientnum2": ""}],

how to combine ADRESH and ADRESL on 12 bit ADC

MICRO: PIC18LF47K42 compiler: XC8 application: MPLABX Hi, im trying to combine the values in my 12 bit ADC. they go into ADRESH and ADRESL. my ADC is set up for

Visual Studio 2022 C++ standard libraries could not be found

I installed the visual studio 2022 community edition with a C++ Desktop development packageScreenshot of Visual Studio Installer. When a new console application

OpenAI Gym - Env.Render() function returning "Display surface quit"

A screenshot of my code with error I am following the tutorial seen at https://www.youtube.com/watch?v=7SVv07QXO5M&ab_channel=HackersRealm The exact code I

Spring boot mongodb QuerydslPredicateExecutor ClassNotFoundException: com.querydsl.mongodb.document.MongodbDocumentSerializer

I'm trying to use QuerydslPredicateExecutor. Here is my repository interface: public interface ProductsRepository extends MongoRepository<Product, String

Django hot reload only working on certain files

I have this weird issue where not all file edits are being picked up by the hot reloader for Django. I have this structure: / app/ ... apps in here. config/

set knockout.js value programatically from "outside"

I am brand new to knockout.js - I have taken over an existing app written in it, the previous maintainers having left - and I want to start by writing tests tha

Is there a way of comparing 2 variables in a grid like way instead of nested if statements?

I am dealing with a prisoners paradox type problem where there are multiple combinations (2x2 -> 4) and each has a different result. Is there a good way of l

CFG for L = {a^mb^nc^k: k = m×n}

Can we write CFG for this language? I searched multiple websites but I couldn't find any answers.

Is it possible to remove title underneath iOS home screen widget?

Many users ask me, can you remove title underneath the widget? But as per Apple's design guidelines, we can't keep the app name empty or remove the home screen

Trying to perform setcap from Qt program

I'm trying to perform setcap from Qt program this way: QProcess process; QString command = "cat"; QStringList args; args << _fileName; process.start(comm