Latest Questions

Collect data, but skip non-zero referenced-data

i have the following fnf([],[],[]). fnf([RH|RT],[CH|CT],[[RH,CH]|Res]) :- get(RH,CH,V), V == 0, fnf(RT,CT,Res). i'm trying to collect only elements of Cs and R

How to create synthetic data based on dataset with mixed data types for classification problem?

I am trying to build a classification model, but I don't have enough data. What would be the most appropriate way to create synthetic data based on my existing

Project '..' targets 'net5.0'. It cannot be referenced by a project that targets '.NETFramework,Version=v4.7.2'

I created my initial project that targets Framework version v4.7.2. I needed to add a class library in my project using visual studio 2022 Community. While doin

How to make Plotly animated chart display all the categories (not only ones present in first frame)

To illustrate my problem, I use sample Plotly animated chart included on their website: https://plotly.com/python/animations/ Orginal code: df = px.data.gapmind

Buildozer issue: sh.CommandNotFound: ./gradlew

I've been trying to package an application created using python and kivy for android on buildozer by running on Ubuntu wsl: buildozer -v android debug deploy ru

Do a connection using EventSource from Android with HTTPS to Spring-Boot server (JAVA)

I have a spring-boot server which only accepts https requests, the point is that I need it to be able to communicate with the client (android) using SSE. I have

Inserting a new entry into a 1 dimensional numpy array without distrubing other entries [duplicate]

Consider the following: If I have a 1 dimensional array like the following import numpy as np x=np.array([1,2,4,5]) Say now that I have the n

How to pre-download items from a JSON list array in React JS?

Here the Codesandbox example. I have a list array of songs: const tracks = [ { name: "Sunny", src: "https://www.bensound.com/bensound-music/

Develop a multi-threaded application. Don't use synchronized word [duplicate]

Free checkout. The fast food restaurant has several cash desks. Customers stand in line at a particular cash desk, but can move to another que

Bank reconciliation for NSF payment journal entries

Normally in case of any check bounced due to non-sufficient funds, statement will show that two lines and NSF charges. Now in Odoo system we already reserves th

Rewriting url without a speicifc query parameter using regex

I'm trying to rewrite the URL without a specific query string https://example.com?specialVar=xXx1x&para1=xxxx&specialVar=1234&para2=xxxxxx&speci

Code being marked as dead in if/else statement

I am building a WiFi app for an IoT device, I am generating a list of WiFi networks, and what I would like to accomplish is when the SSID is pressed it changes

Schema for saving a lot of questions MongoDb

If I have a survey application for child tracking what is the best way to save survey questions in MongoDB? Knowing that survey is divided into stages (about 12

How to receive data from server to client in C#

My client program takes input from a user in a text box, sends it to a server which processes it by capitalizing the message and sends it back to the client. Th

IntelliJ IDEA & Mockito.spy - source code does not match the bytecode

I am using IntellIj IDEA, when I try to debug into a mockito spied object, it gave me error "source code does not match the bytecode". can anyone help?

Uri Concatenate and Future

import 'package:http/http.dart' as http; import 'package:teste3/Post.dart'; import 'dart:convert'; import 'dart:async'; class Consumo extends StatefulWidget {

How do I get notified when someone creates a new Repository in Gitlab?

I need to be notified when someone creates a new Repository in a group (or in the instance) of my gitlab. I want only to be notified on new repositories, not al

Xcode version 13.3.1: Update to recommended settings

I'm using the newest version of Xcode, version 13.3.1 (13E500a). Xcode currently shows a yellow warning sign Update to recommended settings. When I click on thi

WatchService large number of directory (recursive)

I want to detect changes inside a directory, so I implement by using WatchService public class DirWatcher implements Runnable { private Path path; priv

TreeSet Sorting Order Confusion

I know that TreeSet in Java sort its elements in ascending order. For integer it would be 1, 2, 3, 4, 5, for String it would be alphabetical. However, what if I

Azure devops appsettings.json variable substitution from Key Vault in pipelines not working

I have a .Net 6 web application that I am building in devops. I am trying to substitute settings in the appsettings.json, but somehow can't get it working. What

What are my options to deal with this stale closure in React besides using ref

I'm using the library React Datasheet Grid, the main component has a property called OnActiveCellChange, to which i'm passing my custom function: const [selecte

Command 'SFDX: Create Project' resulted in an error (command 'sfdx.force.project.create' not found)" error

I cannot create an SF project in my VS Code. it gives the "Command 'SFDX: Create Project' resulted in an error (command 'sfdx.force.project.create' not found)"

How to deserialize generic JSON with List type in Dart

I want to deserialize some JSON data that contains a list of article information { "data": [ { "id": 1, "title": "First arti

What is the difference in the user defined in Dockerfile and docker-compose file?

I have a Dockerfile as below: FROM jenkins/jenkins:latest USER root RUN whoami USER jenkins RUN whoami and this docker-compose file version: '2' services:

How can we truncate and load the documents to a cosmos dB collection with out dropping it in pyspark

I have a monthly job in databricks where I want to truncate all records for previous month and then load for current month in cosmos db so I tried with option("

How to use the visibilitychange event to display messages when tab is hidden?

When an customer opens a new tab or goes away from the current sites tab, I'm trying to insert an promo message in the tab of a browser that flashes back and fo

Quantum mechanics operator valued function in sympy

Is it possible to have operator valued functions in sympy? Here, by operator I'm talking about the class sympy.physics.quantum.operator.Operator. Somewhat equiv

Add one2many field to a website form odoo 13

I have a web form it contains many input fields. I want to add an one2many field to it so that the user can select multiple lines and save them to DB. I want so