Latest Questions

looping throught each row till the end of a 2d array of integer in postgresql

so basically I got a 2d array in a table. table SQL CREATE TABLE IF NOT EXISTS public.table_name ( "Person_Id" numeric(24,0) NOT NULL, "Items" integer[], ); so

How to read grayscale img from a video with OpenCV?

I read all pictures from my pic directory and then convert them each to gray-scale with canny edge detections before writing it all to a video. But, when I use

Weird resource leak related to gulpfile or git or cmd prompt

I have a gulpfile in a project directory. I use gulp frequently and this file is similar to my different gulpfile's that I've used many times before. I first be

Any sample cose for api integration with telegra,

I want to know any sample code for API integration like Spotify, or digistore24 kind of. please inform me if you have any

Stand-alone React 18 page warning: importing createRoot from "react-dom"

I'm trying to create a stand-alone webpage that uses React 18: <!DOCTYPE html> <html lang="en"> <head> <title>Hello React!</

How to use WHERE statement on JSON stored in Presto SQL column to filter?

In Presto, I have data for a column in a table is as follows: header header 2 {Data: [{'item1': 'stuff1', 'item2': 'stuff2', 'item3': 'stuff3'}, {...}]} cell 2

Unit testing with get request

I am trying to create a unit test for one of my api. In the frontend, I send it this way... params = { participants: JSON.stringify(participants), secti

How to redirect URL with query string without name to new url

I have these URLs https://example.com/team?1892 https://example.com/team/?1892 which I need to redirect to https://example.com/team/whatever/ How can I do tha

Kafka Topic - filter and dispatch messages

Background Our software solution collects data ("events") per customer. Some of the customers (a small fraction ~3%) ask to get this data into "their systems" (

How to get selected value on SelectionChanged event of ComboBox in ViewModel (WPF-MVVM)?

I am new in WPF Application with pattern MVVM and I have a particular situation that I do not know how to solve it. I builted a system to switch environments (P

ForgeGradle actions causing IntelliJ to crash

The gradle process fails when I tried to build or sync my Forge mod written in Kotlin with IntelliJ The way to find any output is from the logs: [ 34623] WAR

Is there a PyTorch transform to go from 1 Channel data to 3 Channels?

I am using the emnist data set via the PyTorch datasets together with a neural network that expects a 3 Channel input. I would like to use PyTorch transforms to

ValueError: Shapes (None, 1) and (None, 5) are incompatible in keras

model = Sequential() model.add(Conv2D(128, (3, 3), activation='relu', input_shape=(64, 64, 3), padding='same')) model.add(MaxPooling2D(pool_size=(2, 2))) mode

ValueError: Shapes (None, 1) and (None, 5) are incompatible in keras

model = Sequential() model.add(Conv2D(128, (3, 3), activation='relu', input_shape=(64, 64, 3), padding='same')) model.add(MaxPooling2D(pool_size=(2, 2))) mode

Install specific version of package using ansible

I want to install pexpect using Ansible. I am using ansible.builtin.package module. But old version is getting installed. I need pexpect version >=3.3. How c

STS intellisense stops working after some time

I have an i7 laptop with 16 GB of RAM. I'm working with SpringSource ToolSuite 4.8 and after some time of work, intellisense gets stuck and then never shows sug

Cannot update a component (`BrowserRouter`) while rendering a different component

Warning: Cannot update a component (BrowserRouter) while rendering a different component (Register). To locate the bad setState() call inside Register, follow t

Install specific version of package using ansible

I want to install pexpect using Ansible. I am using ansible.builtin.package module. But old version is getting installed. I need pexpect version >=3.3. How c

May I use questasim synthesizer instead of quartus synthesizer to fit vhdl 2008

I'm attempting to synthesis VHDL-2008 to fit on a DE-10 lite fpga board. For the time being, I'm using Quartus II 21.10 lite edition which has drop support for

Difficulty converting html page with CSS and images to PDF in Django

I am trying to convert an HTML page which uses quite the bootstrap and styling. I tried everything from reportlab to weasyprint to xhtml2pdf and nothing works!

How to delete a document attribute in Sanity iO?

I have an array of objects in my Sanity Document called Images called Comments an example comment object in comments[] array looks like : { "_key": "651

Cannot update a component (`BrowserRouter`) while rendering a different component

Warning: Cannot update a component (BrowserRouter) while rendering a different component (Register). To locate the bad setState() call inside Register, follow t

How to get first N number of elements from an array

I am working with Javascript(ES6) /FaceBook react and trying to get the first 3 elements of an array that varies in size. I would like do the equivalent of Linq

Delete specific record from file of records

I have the next data structure : Type TMyRecord=Record Num:String[50]; ID:String[50]; End; and I have a file of record

React Big Calendar Navigate

In my calendar, I made the option to open and close it, but when I close it, and open it again, it is in the month I stopped after closing it, and not in the cu

how can I pass the multiple .html file names in to a single txt output file that outputs all the href links in html along with their file names?

import pandas as pd import glob import csv import re from bs4 import BeautifulSoup links_with_text = [] textfile = open("a_file.txt", "w") for filename in glob

Can't import openzeppelin library into smart contract in brownie framework

I can't import openzeppelin's ERC721 contract. I have installed it using brownie pm install and also added it to brownie-config.yaml I appreciate any help Test.

Tunning MYSQL have many schemas

I have a DB MYSQL with many schema. Around 5k - 7k schemas. My system sometime meet OOM Killer case. Is that unnormal ? we have 5 scheme different structure. Th