Latest Questions

how to see number of each line in text input of kivy?

There are some text editing softwares that show us the number of lines in order. like this: I want to have this effect in text input of kivy but i do not know

Why is my runtime dangerous permission auto denied?

I am trying to use the "new" way of requesting external storage write permission. But the request is automatically denied and no window pops up asking the user

Convert SDR image to HDR with python openCV?

I wish to do the following in python with openCV to increase the brightness of an image. The aim is to turn an SDR photo into an HDR image (to increase the dyna

Plot variant abundance vs. time (e,g, of mutant strains) in python

Given [absolute] numbers for each of a number of variants over time, I would like to produce a plot like the following: Is there a function for this in Python

How to manually extract context or span from incoming http request in NodeJS?

I trying to migrate my Node.js application from jaeger-client to @opentelemetry/* packages In my Node.js application i have a simple http server and i want to c

How to rename files and folders recursively?

I have this PowerShell code which goes through a folder and creates a list of all files and subfolders in the folder and renames them for me (replacing spaces w

When i create Django Project with environment i have had a mistake line but when i deleted the environment file the line had disappeared !! Any Idea?

import os from django.core.wsgi import get_wsgi_application // Mistake in any import commands line but it is working os.environ.setdefault('DJANGO_SETTINGS_MODU

Python csv rearrange columns and calling from a dictionary (no pandas)

I need the code to rearrange the columns while changing the header names without using Pandas. I also need to omit some of the columns in the new csv file. Samp

findOneAndUpdate. Select array of messages, select message object and update likes array inside it

I use mongoose findOneAndUpdate method, but could't achieve the result. I always get the same object back. No errors. Here's my code. User object: { "_id" :

Javascript - draw a rectangular selection on an image

I need some help to implement a feature in my vuejs capacitor app. I'm getting a snapshot from an ip cam every second and this will simulate a video stream sinc

Nested REST API resource not found

This feels like what should be a very common question but I cannot find anything related to it. I am working on a 'REST' API with nested / sub-resources GET /us

How to register store as global variable object?

Currently I'm using a reactive store.js like so: import {reactive} from "vue"; const re = reactive({}) export default { re } which then can be used in co

Pyomo constraint: use continuous variable as boolean?

I am looking to use a continuous variable in a bool statement. For example, if m.N[t] is the continuous variable, I'd like to do the following: @m.Constraint(m.

How to setup turborepo with sveltekit and pnpm

I am trying to add Turborepo to my Svelte apps but looks like the npx create-turbo@latest command and also the examples currently only support NextJs. How can I

Prisma: Finding items where two fields have the same value

I would like to find items in a Prisma db where the values for two columns are the same. The use case is to compare the 'created_at' and 'updated_at' fields to

Mikrotik routing between networks via l2tp

I have 2 Mikrotik routers: Home(static WAN IP): LAN - 192.168.30.1/24 VPN IP - 192.168.146.1 Office(Cloud): LAN - 192.168.20.1/24 VPN IP - 192.1

NestJs e2e returns 201 created response though required form data is missing, expected 400 bad request

I'm trying to write a test that checks if request body does not have proper data, it should return an error, and the status code should be 400. Which I think is

How to use Oauth2 Provider instead of Oauth1 in Laravel Socialite?

I'm currently developing social listening API with twitter, the flow is logged in user (using basic API Token to send request to the API) are redirected to twit

Go generics: invalid composite literal type T

package main import ( "google.golang.org/protobuf/proto" ) type NetMessage struct { Data []byte } type Route struct { } type AbstractParse interface

BIts Per Sample / Pixel libtiff vs WIC

TIFF *TiffImage; uint16 photo, bps, spp, fillorder; uint32 width,height; unsigned long stripSize; unsigned long imageOffset, result; int stripMax, stripCount; u

How do I link to another page in my MUI mini drawer sidebar?

I've tried to encapsulate my ListItem component with <Link to"/create> but it doesn't work, i've also tried using the history option but that confused me.

Finding intersection between two lists without duplicates in prolog

I am using Prolog and I am trying to find the intersection or the common elements between two lists and the result should not contain duplicates. In addition, t

Can I set readOnly false when I use findById with JPA

I have a problem with modifying data while setting database replication Before DB replication, I get data that I want to modify using repository.findById() and

How to change value of iRow depending on object value?

I am looking for the iRow value to be dependent on whether the object value. I have 2 buttons: Private Sub OptionButton1_Click() End Sub and Private Sub Optio

How to translate an raw SQL query to TypeORM query builder?

How would I convert the subQuery select with distinct to TypeORM querybuilder? Thanks. SELECT `time`, (case when `start` is NULL then 0 else 1 end) `is_reserved

How to detect message content Discord.js?

I am working on a code for a Discord bot for my server, and I'm currently stumped on a magic 8 ball feature, go figure. I'm trying to get it to check if there i

What is the difference between cross-platform and multi-platform?

Can someone clearly tell the difference between the terms "cross platform" and "multi platform"

When would Git move remote-tracking branches automatically, without 'git fetch'?

The Git documentation (https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches) says: "Remote-tracking branches are references to the state of remote branc

Strange result in loop when use special chars

I have strange problem when special chars in loop when add br and use specal chars, if don´t use words with special chars no have problems but when use sp

File reading with fgetc in C

I have a simple file reading algorithm but it's not returning the values that are in the file. The below is the code. The input txt values are 200 53 65 98 183